diff --git a/.eslintrc.js b/.eslintrc.js index 9eaa7e3f47b0e2..7b075ab83463aa 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -58,6 +58,8 @@ module.exports = { 'test/es-module/test-esm-example-loader.js', 'test/es-module/test-esm-type-flag.js', 'test/es-module/test-esm-type-flag-alias.js', + 'test/es-module/test-require-module-detect-entry-point.js', + 'test/es-module/test-require-module-detect-entry-point-aou.js', ], parserOptions: { sourceType: 'module' }, }, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 98fdf0b6f498d6..bbb1fd0adc5729 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -170,6 +170,9 @@ /src/permission/* @nodejs/security-wg /test/parallel/test-permission-* @nodejs/security-wg +# Security Release +/doc/contributing/security-release-process.md @nodejs/security-stewards + # Dependency Update Tools /.github/workflows/tools.yml @nodejs/security-wg diff --git a/.github/workflows/create-release-proposal.yml b/.github/workflows/create-release-proposal.yml index f3add22090cbc0..0b580eab81ac76 100644 --- a/.github/workflows/create-release-proposal.yml +++ b/.github/workflows/create-release-proposal.yml @@ -61,7 +61,7 @@ jobs: - name: Set up ghauth config (Ubuntu) run: | mkdir -p "${XDG_CONFIG_HOME:-~/.config}/changelog-maker" - echo '{}' | jq '{user: env.GITHUB_ACTOR, token: env.TOKEN}' > "${XDG_CONFIG_HOME:-~/.config}/changelog-maker/config.json" + jq --null-input '{user: env.GITHUB_ACTOR, token: env.TOKEN}' > "${XDG_CONFIG_HOME:-~/.config}/changelog-maker/config.json" env: TOKEN: ${{ github.token }} @@ -73,9 +73,8 @@ jobs: - name: Start git node release prepare # The curl command is to make sure we run the version of the script corresponding to the current workflow. run: | - git update-index --assume-unchanged tools/actions/create-release.sh - curl -fsSLo tools/actions/create-release.sh https://github.com/${GITHUB_REPOSITORY}/raw/${GITHUB_SHA}/tools/actions/create-release.sh - ./tools/actions/create-release.sh "${RELEASE_DATE}" "${RELEASE_LINE}" "${GITHUB_ACTOR}" + curl -fsSL https://github.com/${GITHUB_REPOSITORY}/raw/${GITHUB_SHA}/tools/actions/create-release-proposal.sh |\ + sh -s -- "${RELEASE_DATE}" "${RELEASE_LINE}" "${GITHUB_ACTOR}" env: GH_TOKEN: ${{ github.token }} # We want the bot to push the push the release commit so CI runs on it. diff --git a/.github/workflows/lint-release-proposal.yml b/.github/workflows/lint-release-proposal.yml index 1ea2b4b1b173e2..9d8ba5998a7a5c 100644 --- a/.github/workflows/lint-release-proposal.yml +++ b/.github/workflows/lint-release-proposal.yml @@ -19,6 +19,8 @@ permissions: jobs: lint-release-commit: runs-on: ubuntu-latest + permissions: + pull-requests: read steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -33,30 +35,43 @@ jobs: echo "COMMIT_SUBJECT=$COMMIT_SUBJECT" >> "$GITHUB_ENV" - name: Lint release commit message trailers run: | - EXPECTED_TRAILER="^PR-URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/[[:digit:]]+\$" + EXPECTED_TRAILER="^$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/[[:digit:]]+\$" echo "Expected trailer format: $EXPECTED_TRAILER" - ACTUAL="$(git --no-pager log -1 --format=%b | git interpret-trailers --parse --no-divider)" + PR_URL="$(git --no-pager log -1 --format='%(trailers:key=PR-URL,valueonly)')" echo "Actual: $ACTUAL" - echo "$ACTUAL" | grep -E -q "$EXPECTED_TRAILER" + echo "$PR_URL" | grep -E -q "$EXPECTED_TRAILER" - PR_URL="${ACTUAL:8}" PR_HEAD="$(gh pr view "$PR_URL" --json headRefOid -q .headRefOid)" echo "Head of $PR_URL: $PR_HEAD" echo "Current commit: $GITHUB_SHA" [ "$PR_HEAD" = "$GITHUB_SHA" ] env: GH_TOKEN: ${{ github.token }} + - name: Verify it's release-ready + run: | + SKIP_XZ=1 make release-only - name: Validate CHANGELOG id: releaser-info run: | EXPECTED_CHANGELOG_TITLE_INTRO="## $COMMIT_SUBJECT, @" echo "Expected CHANGELOG section title: $EXPECTED_CHANGELOG_TITLE_INTRO" - CHANGELOG_TITLE="$(grep "$EXPECTED_CHANGELOG_TITLE_INTRO" "doc/changelogs/CHANGELOG_V${COMMIT_SUBJECT:20:2}.md")" + MAJOR="$(awk '/^#define NODE_MAJOR_VERSION / { print $3 }' src/node_version.h)" + CHANGELOG_PATH="doc/changelogs/CHANGELOG_V${MAJOR}.md" + CHANGELOG_TITLE="$(grep "$EXPECTED_CHANGELOG_TITLE_INTRO" "$CHANGELOG_PATH")" echo "Actual: $CHANGELOG_TITLE" [ "${CHANGELOG_TITLE%%@*}@" = "$EXPECTED_CHANGELOG_TITLE_INTRO" ] - - name: Verify NODE_VERSION_IS_RELEASE bit is correctly set - run: | - grep -q '^#define NODE_VERSION_IS_RELEASE 1$' src/node_version.h - - name: Check for placeholders in documentation - run: | - ! grep "REPLACEME" doc/api/*.md + gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + --jq '.commits.[] | { smallSha: .sha[0:10] } + (.commit.message|capture("^(?.+)\n\n(.*\n)*PR-URL: (?<prURL>.+)\n"))' \ + "/repos/${GITHUB_REPOSITORY}/compare/v${MAJOR}.x...$GITHUB_SHA" --paginate \ + | node tools/actions/lint-release-proposal-commit-list.mjs "$CHANGELOG_PATH" "$GITHUB_SHA" \ + | while IFS= read -r PR_URL; do + LABEL="dont-land-on-v${MAJOR}.x" gh pr view \ + --json labels,url \ + --jq 'if (.labels|map(.name==env.LABEL)|any) then error("\(.url) has the \(env.LABEL) label, forbidding it to be in this release proposal") end' \ + "$PR_URL" > /dev/null + done + shell: bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option. + env: + GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 6bb22265032605..56e8d6fdd65999 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -38,7 +38,11 @@ permissions: jobs: test-macOS: if: github.event.pull_request.draft == false - runs-on: macos-14 + strategy: + fail-fast: false + matrix: + macos-version: [macos-13, macos-14] + runs-on: ${{ matrix.macos-version }} env: CC: sccache gcc CXX: sccache g++ diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 7e25f49f56db29..c4bf9d16151299 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -16,7 +16,6 @@ on: - acorn - acorn-walk - ada - - base64 - brotli - c-ares - cjs-module-lexer @@ -80,14 +79,6 @@ jobs: cat temp-output tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true rm temp-output - - id: base64 - subsystem: deps - label: dependencies - run: | - ./tools/dep_updaters/update-base64.sh > temp-output - cat temp-output - tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true - rm temp-output - id: brotli subsystem: deps label: dependencies @@ -297,6 +288,10 @@ jobs: tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true rm temp-output steps: + - name: Setup Git config + run: | + git config --global user.name "Node.js GitHub Bot" + git config --global user.email "github-bot@iojs.org" - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id with: @@ -314,17 +309,15 @@ jobs: if: env.COMMIT_MSG == '' && (github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id) run: | echo "COMMIT_MSG=${{ matrix.subsystem }}: update ${{ matrix.id }} to ${{ env.NEW_VERSION }}" >> "$GITHUB_ENV" - - uses: gr2m/create-or-update-pull-request-action@86ec1766034c8173518f61d2075cc2a173fb8c97 # v1.9.4 + - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id # Creates a PR or update the Action's existing PR, or # no-op if the base branch is already up-to-date. - env: - GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} with: - author: Node.js GitHub Bot <github-bot@iojs.org> - body: This is an automated update of ${{ matrix.id }} to ${{ env.NEW_VERSION }}. + token: ${{ secrets.GH_USER_TOKEN }} branch: actions/tools-update-${{ matrix.id }} # Custom branch *just* for this Action. + delete-branch: true commit-message: ${{ env.COMMIT_MSG }} labels: ${{ matrix.label }} title: '${{ matrix.subsystem }}: update ${{ matrix.id }} to ${{ env.NEW_VERSION }}' - update-pull-request-title-and-body: true + body: This is an automated update of ${{ matrix.id }} to ${{ env.NEW_VERSION }}. diff --git a/BUILDING.md b/BUILDING.md index 683d10e211ccf2..f99862462c5941 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -243,7 +243,7 @@ Consult previous versions of this document for older versions of Node.js: Installation via Linux package manager can be achieved with: -* Ubuntu, Debian: `sudo apt-get install python3 g++ make python3-pip` +* Ubuntu, Debian: `sudo apt-get install python3 g++-12 gcc-12 make python3-pip` * Fedora: `sudo dnf install python3 gcc-c++ make python3-pip` * CentOS and RHEL: `sudo yum install python3 gcc-c++ make python3-pip` * OpenSUSE: `sudo zypper install python3 gcc-c++ make python3-pip` @@ -271,6 +271,7 @@ fail. To build Node.js: ```bash +export CXX=g++-12 ./configure make -j4 ``` diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f7e219141cf6..6abfebadc97775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,8 @@ release. </tr> <tr> <td valign="top"> -<b><a href="doc/changelogs/CHANGELOG_V20.md#20.18.3">20.18.3</a></b><br/> +<b><a href="doc/changelogs/CHANGELOG_V20.md#20.19.0">20.19.0</a></b><br/> +<a href="doc/changelogs/CHANGELOG_V20.md#20.18.3">20.18.3</a><br/> <a href="doc/changelogs/CHANGELOG_V20.md#20.18.2">20.18.2</a><br/> <a href="doc/changelogs/CHANGELOG_V20.md#20.18.1">20.18.1</a><br/> <a href="doc/changelogs/CHANGELOG_V20.md#20.18.0">20.18.0</a><br/> diff --git a/LICENSE b/LICENSE index e4f0804ee5bdb1..a64a3c60861524 100644 --- a/LICENSE +++ b/LICENSE @@ -2168,35 +2168,3 @@ The externally maintained libraries used by Node.js are: 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. """ - -- base64, located at deps/base64/base64/, is licensed as follows: - """ - Copyright (c) 2005-2007, Nick Galbreath - Copyright (c) 2015-2018, Wojciech Muła - Copyright (c) 2016-2017, Matthieu Darbois - Copyright (c) 2013-2022, Alfred Klomp - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - """ diff --git a/Makefile b/Makefile index b31a252ff0fd63..6af722038efcc5 100644 --- a/Makefile +++ b/Makefile @@ -607,6 +607,10 @@ test-debug: BUILDTYPE_LOWER=debug test-release test-debug: test-build $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) +.PHONY: test-test426 +test-test426: all ## Run the Web Platform Tests. + $(PYTHON) tools/test.py $(PARALLEL_ARGS) test426 + .PHONY: test-wpt test-wpt: all $(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt diff --git a/README.md b/README.md index 0f793614a6e47f..82ce19db742f46 100644 --- a/README.md +++ b/README.md @@ -180,8 +180,6 @@ For information about the governance of the Node.js project, see **Matteo Collina** <<matteo.collina@gmail.com>> (he/him) * [mhdawson](https://github.com/mhdawson) - **Michael Dawson** <<midawson@redhat.com>> (he/him) -* [MoLow](https://github.com/MoLow) - - **Moshe Atlow** <<moshe@atlow.co.il>> (he/him) * [RafaelGSS](https://github.com/RafaelGSS) - **Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him) * [richardlau](https://github.com/richardlau) - @@ -199,8 +197,6 @@ For information about the governance of the Node.js project, see #### TSC regular members -* [apapirovski](https://github.com/apapirovski) - - **Anatoli Papirovski** <<apapirovski@mac.com>> (he/him) * [BethGriggs](https://github.com/BethGriggs) - **Beth Griggs** <<bethanyngriggs@gmail.com>> (she/her) * [bnoordhuis](https://github.com/bnoordhuis) - @@ -211,6 +207,8 @@ For information about the governance of the Node.js project, see **Shelley Vohr** <<shelley.vohr@gmail.com>> (she/her) * [GeoffreyBooth](https://github.com/GeoffreyBooth) - **Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him) +* [MoLow](https://github.com/MoLow) - + **Moshe Atlow** <<moshe@atlow.co.il>> (he/him) * [Trott](https://github.com/Trott) - **Rich Trott** <<rtrott@gmail.com>> (he/him) @@ -222,6 +220,8 @@ For information about the governance of the Node.js project, see * [addaleax](https://github.com/addaleax) - **Anna Henningsen** <<anna@addaleax.net>> (she/her) +* [apapirovski](https://github.com/apapirovski) - + **Anatoli Papirovski** <<apapirovski@mac.com>> (he/him) * [ChALkeR](https://github.com/ChALkeR) - **Сковорода Никита Андреевич** <<chalkerx@gmail.com>> (he/him) * [chrisdickinson](https://github.com/chrisdickinson) - @@ -291,8 +291,6 @@ For information about the governance of the Node.js project, see **Antoine du Hamel** <<duhamelantoine1995@gmail.com>> (he/him) - [Support me](https://github.com/sponsors/aduh95) * [anonrig](https://github.com/anonrig) - **Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him) - [Support me](https://github.com/sponsors/anonrig) -* [apapirovski](https://github.com/apapirovski) - - **Anatoli Papirovski** <<apapirovski@mac.com>> (he/him) * [atlowChemi](https://github.com/atlowChemi) - **Chemi Atlow** <<chemi@atlow.co.il>> (he/him) * [Ayase-252](https://github.com/Ayase-252) - @@ -451,8 +449,6 @@ For information about the governance of the Node.js project, see **Vladimir Morozov** <<vmorozov@microsoft.com>> (he/him) * [VoltrexKeyva](https://github.com/VoltrexKeyva) - **Mohammed Keyvanzadeh** <<mohammadkeyvanzade94@gmail.com>> (he/him) -* [watilde](https://github.com/watilde) - - **Daijiro Wachi** <<daijiro.wachi@gmail.com>> (he/him) * [zcbenz](https://github.com/zcbenz) - **Cheng Zhao** <<zcbenz@gmail.com>> (he/him) * [ZYSzys](https://github.com/ZYSzys) - @@ -477,6 +473,8 @@ For information about the governance of the Node.js project, see **Anna M. Kedzierska** <<anna.m.kedzierska@gmail.com>> * [antsmartian](https://github.com/antsmartian) - **Anto Aravinth** <<anto.aravinth.cse@gmail.com>> (he/him) +* [apapirovski](https://github.com/apapirovski) - + **Anatoli Papirovski** <<apapirovski@mac.com>> (he/him) * [aqrln](https://github.com/aqrln) - **Alexey Orlenko** <<eaglexrlnk@gmail.com>> (he/him) * [AshCripps](https://github.com/AshCripps) - @@ -707,6 +705,8 @@ For information about the governance of the Node.js project, see **Vladimir Kurchatkin** <<vladimir.kurchatkin@gmail.com>> * [vsemozhetbyt](https://github.com/vsemozhetbyt) - **Vse Mozhet Byt** <<vsemozhetbyt@gmail.com>> (he/him) +* [watilde](https://github.com/watilde) - + **Daijiro Wachi** <<daijiro.wachi@gmail.com>> (he/him) * [watson](https://github.com/watson) - **Thomas Watson** <<w@tson.dk>> * [whitlockjc](https://github.com/whitlockjc) - diff --git a/SECURITY.md b/SECURITY.md index 19e876939f0f55..b8f54307d5ed5b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -82,23 +82,23 @@ Vulnerabilities related to this case may be fixed by a documentation update. **Node.js does NOT trust**: -1. Data received from the remote end of inbound network connections - that are accepted through the use of Node.js APIs and - which is transformed/validated by Node.js before being passed - to the application. This includes: - * HTTP APIs (all flavors) server APIs. -2. The data received from the remote end of outbound network connections - that are created through the use of Node.js APIs and - which is transformed/validated by Node.js before being passed - to the application EXCEPT with respect to payload length. Node.js trusts - that applications make connections/requests which will avoid payload - sizes that will result in a Denial of Service. - * HTTP APIs (all flavors) client APIs. - * DNS APIs. -3. Consumers of data protected through the use of Node.js APIs (for example, - people who have access to data encrypted through the Node.js crypto APIs). -4. The file content or other I/O that is opened for reading or writing by the - use of Node.js APIs (ex: stdin, stdout, stderr). +* Data received from the remote end of inbound network connections + that are accepted through the use of Node.js APIs and + which is transformed/validated by Node.js before being passed + to the application. This includes: + * HTTP APIs (all flavors) server APIs. +* The data received from the remote end of outbound network connections + that are created through the use of Node.js APIs and + which is transformed/validated by Node.js before being passed + to the application EXCEPT with respect to payload length. Node.js trusts + that applications make connections/requests which will avoid payload + sizes that will result in a Denial of Service. + * HTTP APIs (all flavors) client APIs. + * DNS APIs. +* Consumers of data protected through the use of Node.js APIs (for example, + people who have access to data encrypted through the Node.js crypto APIs). +* The file content or other I/O that is opened for reading or writing by the + use of Node.js APIs (ex: stdin, stdout, stderr). In other words, if the data passing through Node.js to/from the application can trigger actions other than those documented for the APIs, there is likely @@ -108,23 +108,23 @@ lead to a loss of confidentiality, integrity, or availability. **Node.js trusts everything else**. Examples include: -1. The developers and infrastructure that runs it. -2. The operating system that Node.js is running under and its configuration, - along with anything under control of the operating system. -3. The code it is asked to run, including JavaScript and native code, even if - said code is dynamically loaded, e.g., all dependencies installed from the - npm registry. - The code run inherits all the privileges of the execution user. -4. Inputs provided to it by the code it is asked to run, as it is the - responsibility of the application to perform the required input validations, - e.g. the input to `JSON.parse()`. -5. Any connection used for inspector (debugger protocol) regardless of being - opened by command line options or Node.js APIs, and regardless of the remote - end being on the local machine or remote. -6. The file system when requiring a module. - See <https://nodejs.org/api/modules.html#all-together>. -7. The `node:wasi` module does not currently provide the comprehensive file - system security properties provided by some WASI runtimes. +* The developers and infrastructure that runs it. +* The operating system that Node.js is running under and its configuration, + along with anything under control of the operating system. +* The code it is asked to run, including JavaScript, WASM and native code, even + if said code is dynamically loaded, e.g., all dependencies installed from the + npm registry. + The code run inherits all the privileges of the execution user. +* Inputs provided to it by the code it is asked to run, as it is the + responsibility of the application to perform the required input validations, + e.g. the input to `JSON.parse()`. +* Any connection used for inspector (debugger protocol) regardless of being + opened by command line options or Node.js APIs, and regardless of the remote + end being on the local machine or remote. +* The file system when requiring a module. + See <https://nodejs.org/api/modules.html#all-together>. +* The `node:wasi` module does not currently provide the comprehensive file + system security properties provided by some WASI runtimes. Any unexpected behavior from the data manipulation from Node.js Internal functions may be considered a vulnerability if they are exploitable via diff --git a/benchmark/misc/startup-core.js b/benchmark/misc/startup-core.js index 62ead40742f61d..053a1ec0cbff8f 100644 --- a/benchmark/misc/startup-core.js +++ b/benchmark/misc/startup-core.js @@ -9,6 +9,7 @@ const bench = common.createBenchmark(main, { script: [ 'benchmark/fixtures/require-builtins', 'test/fixtures/semicolon', + 'test/fixtures/snapshot/typescript', ], mode: ['process', 'worker'], n: [30], diff --git a/benchmark/test_runner/run-single-test-file.js b/benchmark/test_runner/run-single-test-file.js new file mode 100644 index 00000000000000..00e95e088a223e --- /dev/null +++ b/benchmark/test_runner/run-single-test-file.js @@ -0,0 +1,62 @@ +'use strict'; +const common = require('../common'); + +const tmpdir = require('../../test/common/tmpdir'); +const { run } = require('node:test'); +const { writeFileSync, mkdirSync } = require('node:fs'); +const { join } = require('node:path'); + +const fixtureContent = "const test = require('node:test'); test('test has ran');"; + +function makeTestDirWithFiles(dirPath, count) { + mkdirSync(dirPath); + for (let i = 0; i < count; i++) { + writeFileSync(join(dirPath, `test-${i}.js`), fixtureContent); + } +} + +function getTestDirPath(numberOfTestFiles) { + return join(tmpdir.path, `${numberOfTestFiles}-tests`); +} + +function setup(numberOfTestFiles) { + tmpdir.refresh(); + const dirPath = getTestDirPath(numberOfTestFiles); + makeTestDirWithFiles(dirPath, numberOfTestFiles); +} + +/** + * This benchmark evaluates the overhead of running a single test file under different + * isolation modes. + * Specifically, it compares the performance of running tests in the + * same process versus creating multiple processes. + */ +const bench = common.createBenchmark(main, { + numberOfTestFiles: [1, 10, 100], + isolation: ['none', 'process'], +}, { + // We don't want to test the reporter here + flags: ['--test-reporter=./benchmark/fixtures/empty-test-reporter.js'], +}); + +async function runBenchmark({ numberOfTestFiles, isolation }) { + const dirPath = getTestDirPath(numberOfTestFiles); + const stream = run({ + cwd: dirPath, + isolation, + concurrency: false, // We don't want to run tests concurrently + }); + + // eslint-disable-next-line no-unused-vars + for await (const _ of stream); + + return numberOfTestFiles; +} + +function main(params) { + setup(params.numberOfTestFiles); + bench.start(); + runBenchmark(params).then(() => { + bench.end(1); + }); +} diff --git a/benchmark/util/style-text.js b/benchmark/util/style-text.js index 195907bba5c628..282a96150f0b94 100644 --- a/benchmark/util/style-text.js +++ b/benchmark/util/style-text.js @@ -3,14 +3,16 @@ const common = require('../common.js'); const { styleText } = require('node:util'); +const assert = require('node:assert'); const bench = common.createBenchmark(main, { messageType: ['string', 'number', 'boolean', 'invalid'], format: ['red', 'italic', 'invalid'], + validateStream: [1, 0], n: [1e3], }); -function main({ messageType, format, n }) { +function main({ messageType, format, validateStream, n }) { let str; switch (messageType) { case 'string': @@ -29,8 +31,10 @@ function main({ messageType, format, n }) { bench.start(); for (let i = 0; i < n; i++) { + let colored = ''; try { - styleText(format, str); + colored = styleText(format, str, { validateStream }); + assert.ok(colored); // Attempt to avoid dead-code elimination } catch { // eslint-disable no-empty } diff --git a/common.gypi b/common.gypi index 04852d81103ef8..d3c17d47bc141b 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.25', + 'v8_embedder_string': '-node.26', ##### V8 defaults for Node.js ##### diff --git a/deps/base64/BUILD.gn b/deps/base64/BUILD.gn deleted file mode 100644 index 172dd960910439..00000000000000 --- a/deps/base64/BUILD.gn +++ /dev/null @@ -1,14 +0,0 @@ -############################################################################## -# # -# DO NOT EDIT THIS FILE! # -# # -############################################################################## - -# This file is used by GN for building, which is NOT the build system used for -# building official binaries. -# Please modify the gyp files if you are making changes to build system. - -import("unofficial.gni") - -base64_gn_build("base64") { -} diff --git a/deps/base64/README.md b/deps/base64/README.md deleted file mode 100644 index 330d979e9180bd..00000000000000 --- a/deps/base64/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# base64 - -This project boosts base64 encoding/decoding performance by utilizing SIMD -operations where possible. - -The source is pulled from: https://github.com/aklomp/base64 - -Active development occurs in the default branch (currently named `master`). - -## Updating - -```sh -$ git clone https://github.com/aklomp/base64 -``` diff --git a/deps/base64/base64.gyp b/deps/base64/base64.gyp deleted file mode 100644 index 5d0a0c05dc2a08..00000000000000 --- a/deps/base64/base64.gyp +++ /dev/null @@ -1,221 +0,0 @@ -{ - 'variables': { - 'arm_fpu%': '', - 'target_arch%': '', - 'base64_sources_common': [ - 'base64/include/libbase64.h', - 'base64/lib/arch/generic/codec.c', - 'base64/lib/tables/tables.c', - 'base64/lib/codec_choose.c', - 'base64/lib/codecs.h', - 'base64/lib/lib.c', - ], - }, - 'targets': [ - { - 'target_name': 'base64', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'direct_dependent_settings': { - 'include_dirs': [ 'base64/include' ], - 'defines': [ 'BASE64_STATIC_DEFINE' ], - }, - 'defines': [ 'BASE64_STATIC_DEFINE' ], - 'sources': [ - '<@(base64_sources_common)', - ], - - 'conditions': [ - [ 'arm_fpu=="neon" and target_arch=="arm"', { - 'defines': [ 'HAVE_NEON32=1' ], - 'dependencies': [ 'base64_neon32' ], - }, { - 'sources': [ 'base64/lib/arch/neon32/codec.c' ], - }], - - # arm64 requires NEON, so it's safe to always use it - [ 'target_arch=="arm64"', { - 'defines': [ 'HAVE_NEON64=1' ], - 'dependencies': [ 'base64_neon64' ], - }, { - 'sources': [ 'base64/lib/arch/neon64/codec.c' ], - }], - - # Runtime detection will happen for x86 CPUs - [ 'target_arch in "ia32 x64 x32"', { - 'defines': [ - 'HAVE_SSSE3=1', - 'HAVE_SSE41=1', - 'HAVE_SSE42=1', - 'HAVE_AVX=1', - 'HAVE_AVX2=1', - 'HAVE_AVX512=1', - ], - 'dependencies': [ - 'base64_ssse3', - 'base64_sse41', - 'base64_sse42', - 'base64_avx', - 'base64_avx2', - 'base64_avx512', - ], - }, { - 'sources': [ - 'base64/lib/arch/ssse3/codec.c', - 'base64/lib/arch/sse41/codec.c', - 'base64/lib/arch/sse42/codec.c', - 'base64/lib/arch/avx/codec.c', - 'base64/lib/arch/avx2/codec.c', - 'base64/lib/arch/avx512/codec.c', - ], - }], - ], - }, - - { - 'target_name': 'base64_ssse3', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'sources': [ 'base64/lib/arch/ssse3/codec.c' ], - 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSSE3=1' ], - 'conditions': [ - [ 'OS!="win"', { - 'cflags': [ '-mssse3' ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-mssse3' ] - }, - }], - ], - }, - - { - 'target_name': 'base64_sse41', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'sources': [ 'base64/lib/arch/sse41/codec.c' ], - 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSE41=1' ], - 'conditions': [ - [ 'OS!="win"', { - 'cflags': [ '-msse4.1' ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-msse4.1' ] - }, - }], - ], - }, - - { - 'target_name': 'base64_sse42', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'sources': [ 'base64/lib/arch/sse42/codec.c' ], - 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSE42=1' ], - 'conditions': [ - [ 'OS!="win"', { - 'cflags': [ '-msse4.2' ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-msse4.2' ] - }, - }], - ], - }, - - { - 'target_name': 'base64_avx', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'sources': [ 'base64/lib/arch/avx/codec.c' ], - 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_AVX=1' ], - 'conditions': [ - [ 'OS!="win"', { - 'cflags': [ '-mavx' ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-mavx' ] - }, - }, { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - '/arch:AVX' - ], - }, - }, - }], - ], - }, - - { - 'target_name': 'base64_avx2', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'sources': [ 'base64/lib/arch/avx2/codec.c' ], - 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_AVX2=1' ], - 'conditions': [ - [ 'OS!="win"', { - 'cflags': [ '-mavx2' ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-mavx2' ] - }, - }, { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - '/arch:AVX2' - ], - }, - }, - }], - ], - }, - - { - 'target_name': 'base64_avx512', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'sources': [ 'base64/lib/arch/avx512/codec.c' ], - 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_AVX512=1' ], - 'conditions': [ - [ 'OS!="win"', { - 'cflags': [ '-mavx512vl', '-mavx512vbmi' ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-mavx512vl', '-mavx512vbmi' ] - }, - }, { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - '/arch:AVX512' - ], - }, - }, - }], - ], - }, - - { - 'target_name': 'base64_neon32', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'sources': [ 'base64/lib/arch/neon32/codec.c' ], - 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_NEON32=1' ], - 'conditions': [ - [ 'OS!="win"', { - 'cflags': [ '-mfpu=neon' ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-mfpu=neon' ] - }, - }], - ], - }, - - { - 'target_name': 'base64_neon64', - 'type': 'static_library', - 'include_dirs': [ 'base64/include', 'base64/lib' ], - 'sources': [ 'base64/lib/arch/neon64/codec.c' ], - 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_NEON64=1' ], - # NEON is required in arm64, so no -mfpu flag is needed - } - - ] -} diff --git a/deps/base64/base64/.editorconfig b/deps/base64/base64/.editorconfig deleted file mode 100644 index f6b4d2a07c192c..00000000000000 --- a/deps/base64/base64/.editorconfig +++ /dev/null @@ -1,22 +0,0 @@ -# https://EditorConfig.org -root = true - -[*] -charset = utf-8 -insert_final_newline = true -trim_trailing_whitespace = true - -indent_style = tab -tab_width = 8 -indent_size = 8 - -[CMakeLists.txt] -tab_width = 4 -indent_style = space -[*.cmake] -tab_width = 4 -indent_style = space - -[*.py] -tab_width = 4 -indent_style = space diff --git a/deps/base64/base64/.gitignore b/deps/base64/base64/.gitignore deleted file mode 100644 index bb7b160deb3702..00000000000000 --- a/deps/base64/base64/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Intentionally empty diff --git a/deps/base64/base64/CMakeLists.txt b/deps/base64/base64/CMakeLists.txt deleted file mode 100644 index ff9f6f21e1ee28..00000000000000 --- a/deps/base64/base64/CMakeLists.txt +++ /dev/null @@ -1,290 +0,0 @@ -# Written in 2016-2017, 2021 by Henrik Steffen Gaßmann henrik@gassmann.onl -# -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any warranty. -# -# You should have received a copy of the CC0 Public Domain Dedication -# along with this software. If not, see -# -# http://creativecommons.org/publicdomain/zero/1.0/ -# -######################################################################## -cmake_minimum_required(VERSION 3.10.2) - -# new dependent option syntax. We are already compliant -if (POLICY CMP0127) - cmake_policy(SET CMP0127 NEW) -endif() - -project(base64 LANGUAGES C VERSION 0.5.2) - -include(GNUInstallDirs) -include(CMakeDependentOption) -include(CheckIncludeFile) -include(FeatureSummary) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") - -####################################################################### -# platform detection -include(TargetArch) -detect_target_architecture(_TARGET_ARCH) - -check_include_file(getopt.h HAVE_GETOPT_H) -cmake_dependent_option(BASE64_BUILD_CLI "Build the cli for encoding and decoding" ON "HAVE_GETOPT_H" OFF) -add_feature_info(CLI BASE64_BUILD_CLI "enables the CLI executable for encoding and decoding") - -################################################################### -# optional/conditional dependencies -find_package(OpenMP) -set_package_properties(OpenMP PROPERTIES - TYPE OPTIONAL - PURPOSE "Allows to utilize OpenMP" -) - - -######################################################################## -# Compilation options -option(BASE64_WERROR "Treat warnings as error" ON) -option(BASE64_BUILD_TESTS "add test projects" OFF) -cmake_dependent_option(BASE64_WITH_OpenMP "use OpenMP" OFF "OpenMP_FOUND" OFF) -add_feature_info("OpenMP codec" BASE64_WITH_OpenMP "spreads codec work accross multiple threads") -cmake_dependent_option(BASE64_REGENERATE_TABLES "regenerate the codec tables" OFF "NOT CMAKE_CROSSCOMPILING" OFF) - -set(_IS_X86 "_TARGET_ARCH_x86 OR _TARGET_ARCH_x64") -cmake_dependent_option(BASE64_WITH_SSSE3 "add SSSE 3 codepath" ON ${_IS_X86} OFF) -add_feature_info(SSSE3 BASE64_WITH_SSSE3 "add SSSE 3 codepath") -cmake_dependent_option(BASE64_WITH_SSE41 "add SSE 4.1 codepath" ON ${_IS_X86} OFF) -add_feature_info(SSE4.1 BASE64_WITH_SSE41 "add SSE 4.1 codepath") -cmake_dependent_option(BASE64_WITH_SSE42 "add SSE 4.2 codepath" ON ${_IS_X86} OFF) -add_feature_info(SSE4.2 BASE64_WITH_SSE42 "add SSE 4.2 codepath") -cmake_dependent_option(BASE64_WITH_AVX "add AVX codepath" ON ${_IS_X86} OFF) -add_feature_info(AVX BASE64_WITH_AVX "add AVX codepath") -cmake_dependent_option(BASE64_WITH_AVX2 "add AVX 2 codepath" ON ${_IS_X86} OFF) -add_feature_info(AVX2 BASE64_WITH_AVX2 "add AVX2 codepath") -cmake_dependent_option(BASE64_WITH_AVX512 "add AVX 512 codepath" ON ${_IS_X86} OFF) -add_feature_info(AVX512 BASE64_WITH_AVX512 "add AVX512 codepath") - -cmake_dependent_option(BASE64_WITH_NEON32 "add NEON32 codepath" OFF _TARGET_ARCH_arm OFF) -add_feature_info(NEON32 BASE64_WITH_NEON32 "add NEON32 codepath") - -cmake_dependent_option(BASE64_WITH_NEON64 "add NEON64 codepath" ON _TARGET_ARCH_arm64 OFF) -add_feature_info(NEON64 BASE64_WITH_NEON64 "add NEON64 codepath") - -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") - -######################################################################## -# Regenerate headers - -if (BASE64_REGENERATE_TABLES) - # Generate tables in build folder and copy to source tree. - # Don't add the tables in the source tree to the outputs, to avoid `make clean` removing them. - add_executable(table_generator - lib/tables/table_generator.c - ) - - add_custom_command(OUTPUT table_dec_32bit.h "${CMAKE_CURRENT_SOURCE_DIR}/lib/tables/table_dec_32bit.h" - COMMAND table_generator > table_dec_32bit.h - COMMAND "${CMAKE_COMMAND}" -E copy table_dec_32bit.h "${CMAKE_CURRENT_SOURCE_DIR}/lib/tables/table_dec_32bit.h" - DEPENDS table_generator - ) - set(Python_ADDITIONAL_VERSIONS 3) - find_package(PythonInterp REQUIRED) - add_custom_command(OUTPUT table_enc_12bit.h "${CMAKE_CURRENT_SOURCE_DIR}/lib/tables/table_enc_12bit.h" - COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/lib/tables/table_enc_12bit.py" > table_enc_12bit.h - COMMAND "${CMAKE_COMMAND}" -E copy table_enc_12bit.h "${CMAKE_CURRENT_SOURCE_DIR}/lib/tables/table_enc_12bit.h" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/lib/tables/table_enc_12bit.py" - ) -endif() - - -######################################################################## -# library project -add_library(base64 - # library files - lib/lib.c - lib/codec_choose.c - include/libbase64.h - - lib/tables/tables.c - # Add generated headers explicitly to target, to insert them in the dependency tree - lib/tables/table_dec_32bit.h - lib/tables/table_enc_12bit.h - - # codec implementations - lib/arch/generic/codec.c - - lib/arch/ssse3/codec.c - lib/arch/sse41/codec.c - lib/arch/sse42/codec.c - lib/arch/avx/codec.c - lib/arch/avx2/codec.c - lib/arch/avx512/codec.c - - lib/arch/neon32/codec.c - lib/arch/neon64/codec.c -) - -target_include_directories(base64 - PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> - PRIVATE - "${CMAKE_CURRENT_BINARY_DIR}" -) - -#################################################################### -# platform/compiler specific configuration -set_target_properties(base64 PROPERTIES - C_STANDARD 99 - C_STANDARD_REQUIRED YES - C_EXTENSIONS OFF - DEFINE_SYMBOL BASE64_EXPORTS - VERSION ${PROJECT_VERSION} - SOVERSION ${PROJECT_VERSION_MAJOR} -) - -#generate_export_header(base64) -# the following definitions and those in libbase64.h have been -# kept forward compatible in case we ever switch to generate_export_header -if (BUILD_SHARED_LIBS) - set_target_properties(base64 PROPERTIES - C_VISIBILITY_PRESET hidden - ) -else() - target_compile_definitions(base64 - PUBLIC - BASE64_STATIC_DEFINE - ) -endif() - -target_compile_options(base64 PRIVATE - $<$<C_COMPILER_ID:MSVC>: - /W4 - /we4013 # Error warning C4013: 'function' undefined; assuming extern returning int - /we4700 # Error warning C4700: uninitialized local variable - /we4715 # not all control paths return a value - /we4003 # not enough actual parameters for macro - /wd4456 # disable warning C4456: declaration of 'xxx' hides previous local declaration - > - $<$<NOT:$<C_COMPILER_ID:MSVC>>: - -Wall - -Wextra - -Wpedantic - > - $<$<BOOL:${BASE64_WERROR}>:$<IF:$<C_COMPILER_ID:MSVC>,/WX,-Werror>> -) - -target_compile_definitions(base64 PRIVATE - $<$<C_COMPILER_ID:MSVC>: - # remove unnecessary warnings about unchecked iterators - _SCL_SECURE_NO_WARNINGS - > -) - -######################################################################## -# SIMD settings -include(TargetSIMDInstructionSet) -define_SIMD_compile_flags() - -if (_TARGET_ARCH STREQUAL "x86" OR _TARGET_ARCH STREQUAL "x64") - macro(configure_codec _TYPE) - if (BASE64_WITH_${_TYPE}) - string(TOLOWER "${_TYPE}" _DIR) - set_source_files_properties("lib/arch/${_DIR}/codec.c" PROPERTIES - COMPILE_FLAGS "${COMPILE_FLAGS_${_TYPE}}" - ) - - if (${ARGC} GREATER 1 AND MSVC) - set_source_files_properties("lib/arch/${_DIR}/codec.c" PROPERTIES - COMPILE_DEFINITIONS ${ARGV1} - ) - endif() - endif() - endmacro() - - configure_codec(SSSE3 __SSSE3__) - configure_codec(SSE41 __SSSE4_1__) - configure_codec(SSE42 __SSSE4_2__) - configure_codec(AVX) - configure_codec(AVX2) - configure_codec(AVX512) - -elseif (_TARGET_ARCH STREQUAL "arm") - set(BASE64_NEON32_CFLAGS "${COMPILE_FLAGS_NEON32}" CACHE STRING "the NEON32 compile flags (for 'lib/arch/neon32/codec.c')") - mark_as_advanced(BASE64_NEON32_CFLAGS) - - if (BASE64_WITH_NEON32) - set_source_files_properties("lib/arch/neon32/codec.c" PROPERTIES - COMPILE_FLAGS "${BASE64_NEON32_CFLAGS} " - ) - endif() - -#elseif (_TARGET_ARCH STREQUAL "arm64" AND BASE64_WITH_NEON64) - -endif() - -configure_file("${CMAKE_CURRENT_LIST_DIR}/cmake/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) - -######################################################################## -# OpenMP Settings -if (BASE64_WITH_OpenMP) - target_link_libraries(base64 PRIVATE OpenMP::OpenMP_C) -endif() - -######################################################################## -if (BASE64_BUILD_TESTS) - enable_testing() - add_subdirectory(test) -endif() - -######################################################################## -# base64 -if (BASE64_BUILD_CLI) - add_executable(base64-bin - bin/base64.c - ) - target_link_libraries(base64-bin PRIVATE base64) - set_target_properties(base64-bin PROPERTIES - OUTPUT_NAME base64 - ) -endif() - -######################################################################## -# cmake install -install(DIRECTORY include/ TYPE INCLUDE) -install(TARGETS base64 - EXPORT base64-targets - DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -) -if (BASE64_BUILD_CLI) - install(TARGETS base64-bin EXPORT base64-targets DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() - -include(CMakePackageConfigHelpers) -configure_package_config_file(cmake/base64-config.cmake.in - "${CMAKE_CURRENT_BINARY_DIR}/base64-config.cmake" - - INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -) -write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/base64-config-version.cmake" - VERSION ${BASE64_VERSION} - COMPATIBILITY SameMajorVersion -) - -install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/base64-config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/base64-config-version.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -) - -install(EXPORT base64-targets - NAMESPACE aklomp:: - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -) - -######################################################################## -feature_summary(WHAT PACKAGES_FOUND PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) diff --git a/deps/base64/base64/LICENSE b/deps/base64/base64/LICENSE deleted file mode 100644 index 109d6521b122c0..00000000000000 --- a/deps/base64/base64/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2005-2007, Nick Galbreath -Copyright (c) 2015-2018, Wojciech Muła -Copyright (c) 2016-2017, Matthieu Darbois -Copyright (c) 2013-2022, Alfred Klomp -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/base64/base64/Makefile b/deps/base64/base64/Makefile deleted file mode 100644 index bba3fde4dd05bf..00000000000000 --- a/deps/base64/base64/Makefile +++ /dev/null @@ -1,109 +0,0 @@ -CFLAGS += -std=c99 -O3 -Wall -Wextra -pedantic -DBASE64_STATIC_DEFINE - -# Set OBJCOPY if not defined by environment: -OBJCOPY ?= objcopy - -OBJS = \ - lib/arch/avx512/codec.o \ - lib/arch/avx2/codec.o \ - lib/arch/generic/codec.o \ - lib/arch/neon32/codec.o \ - lib/arch/neon64/codec.o \ - lib/arch/ssse3/codec.o \ - lib/arch/sse41/codec.o \ - lib/arch/sse42/codec.o \ - lib/arch/avx/codec.o \ - lib/lib.o \ - lib/codec_choose.o \ - lib/tables/tables.o - -HAVE_AVX512 = 0 -HAVE_AVX2 = 0 -HAVE_NEON32 = 0 -HAVE_NEON64 = 0 -HAVE_SSSE3 = 0 -HAVE_SSE41 = 0 -HAVE_SSE42 = 0 -HAVE_AVX = 0 - -# The user should supply compiler flags for the codecs they want to build. -# Check which codecs we're going to include: -ifdef AVX512_CFLAGS - HAVE_AVX512 = 1 -endif -ifdef AVX2_CFLAGS - HAVE_AVX2 = 1 -endif -ifdef NEON32_CFLAGS - HAVE_NEON32 = 1 -endif -ifdef NEON64_CFLAGS - HAVE_NEON64 = 1 -endif -ifdef SSSE3_CFLAGS - HAVE_SSSE3 = 1 -endif -ifdef SSE41_CFLAGS - HAVE_SSE41 = 1 -endif -ifdef SSE42_CFLAGS - HAVE_SSE42 = 1 -endif -ifdef AVX_CFLAGS - HAVE_AVX = 1 -endif -ifdef OPENMP - CFLAGS += -fopenmp -endif - -TARGET := $(shell $(CC) -dumpmachine) - -.PHONY: all analyze clean - -all: bin/base64 lib/libbase64.o - -bin/base64: bin/base64.o lib/libbase64.o - $(CC) $(CFLAGS) -o $@ $^ - -# Workaround: mangle exported function names on MinGW32. -lib/exports.build.txt: lib/exports.txt -ifeq (i686-w64-mingw32, $(TARGET)) - sed -e 's/^/_/' $< > $@ -else - cp -f $< $@ -endif - -lib/libbase64.o: lib/exports.build.txt $(OBJS) - $(LD) -r -o $@ $(OBJS) - $(OBJCOPY) --keep-global-symbols=$< $@ - -lib/config.h: - @echo "#define HAVE_AVX512 $(HAVE_AVX512)" > $@ - @echo "#define HAVE_AVX2 $(HAVE_AVX2)" >> $@ - @echo "#define HAVE_NEON32 $(HAVE_NEON32)" >> $@ - @echo "#define HAVE_NEON64 $(HAVE_NEON64)" >> $@ - @echo "#define HAVE_SSSE3 $(HAVE_SSSE3)" >> $@ - @echo "#define HAVE_SSE41 $(HAVE_SSE41)" >> $@ - @echo "#define HAVE_SSE42 $(HAVE_SSE42)" >> $@ - @echo "#define HAVE_AVX $(HAVE_AVX)" >> $@ - -$(OBJS): lib/config.h -$(OBJS): CFLAGS += -Ilib - -lib/arch/avx512/codec.o: CFLAGS += $(AVX512_CFLAGS) -lib/arch/avx2/codec.o: CFLAGS += $(AVX2_CFLAGS) -lib/arch/neon32/codec.o: CFLAGS += $(NEON32_CFLAGS) -lib/arch/neon64/codec.o: CFLAGS += $(NEON64_CFLAGS) -lib/arch/ssse3/codec.o: CFLAGS += $(SSSE3_CFLAGS) -lib/arch/sse41/codec.o: CFLAGS += $(SSE41_CFLAGS) -lib/arch/sse42/codec.o: CFLAGS += $(SSE42_CFLAGS) -lib/arch/avx/codec.o: CFLAGS += $(AVX_CFLAGS) - -%.o: %.c - $(CC) $(CFLAGS) -o $@ -c $< - -analyze: clean - scan-build --use-analyzer=`which clang` --status-bugs make - -clean: - rm -f bin/base64 bin/base64.o lib/libbase64.o lib/config.h lib/exports.build.txt $(OBJS) diff --git a/deps/base64/base64/README.md b/deps/base64/base64/README.md deleted file mode 100644 index ae0a914965e101..00000000000000 --- a/deps/base64/base64/README.md +++ /dev/null @@ -1,491 +0,0 @@ -# Fast Base64 stream encoder/decoder - -[![Build Status](https://github.com/aklomp/base64/actions/workflows/test.yml/badge.svg)](https://github.com/aklomp/base64/actions/workflows/test.yml) - -This is an implementation of a base64 stream encoding/decoding library in C99 -with SIMD (AVX2, AVX512, NEON, AArch64/NEON, SSSE3, SSE4.1, SSE4.2, AVX) and -[OpenMP](http://www.openmp.org) acceleration. It also contains wrapper functions -to encode/decode simple length-delimited strings. This library aims to be: - -- FAST; -- easy to use; -- elegant. - -On x86, the library does runtime feature detection. The first time it's called, -the library will determine the appropriate encoding/decoding routines for the -machine. It then remembers them for the lifetime of the program. If your -processor supports AVX2, SSSE3, SSE4.1, SSE4.2 or AVX instructions, the library -will pick an optimized codec that lets it encode/decode 12 or 24 bytes at a -time, which gives a speedup of four or more times compared to the "plain" -bytewise codec. - -AVX512 support is only for encoding at present, utilizing the AVX512 VL and VBMI -instructions. Decoding part reused AVX2 implementations. For CPUs later than -Cannonlake (manufactured in 2018) supports these instructions. - -NEON support is hardcoded to on or off at compile time, because portable -runtime feature detection is unavailable on ARM. - -Even if your processor does not support SIMD instructions, this is a very fast -library. The fallback routine can process 32 or 64 bits of input in one round, -depending on your processor's word width, which still makes it significantly -faster than naive bytewise implementations. On some 64-bit machines, the 64-bit -routines even outperform the SSSE3 ones. - -To the author's knowledge, at the time of original release, this was the only -Base64 library to offer SIMD acceleration. The author wrote -[an article](http://www.alfredklomp.com/programming/sse-base64) explaining one -possible SIMD approach to encoding/decoding Base64. The article can help figure -out what the code is doing, and why. - -Notable features: - -- Really fast on x86 and ARM systems by using SIMD vector processing; -- Can use [OpenMP](http://www.openmp.org) for even more parallel speedups; -- Really fast on other 32 or 64-bit platforms through optimized routines; -- Reads/writes blocks of streaming data; -- Does not dynamically allocate memory; -- Valid C99 that compiles with pedantic options on; -- Re-entrant and threadsafe; -- Unit tested; -- Uses Duff's Device. - -## Acknowledgements - -The original AVX2, NEON and Aarch64/NEON codecs were generously contributed by -[Inkymail](https://github.com/inkymail/base64), who, in their fork, also -implemented some additional features. Their work is slowly being backported -into this project. - -The SSSE3 and AVX2 codecs were substantially improved by using some very clever -optimizations described by Wojciech Muła in a -[series](http://0x80.pl/notesen/2016-01-12-sse-base64-encoding.html) of -[articles](http://0x80.pl/notesen/2016-01-17-sse-base64-decoding.html). -His own code is [here](https://github.com/WojciechMula/toys/tree/master/base64). - -The AVX512 encoder is based on code from Wojciech Muła's -[base64simd](https://github.com/WojciechMula/base64simd) library. - -The OpenMP implementation was added by Ferry Toth (@htot) from [Exalon Delft](http://www.exalondelft.nl). - -## Building - -The `lib` directory contains the code for the actual library. -Typing `make` in the toplevel directory will build `lib/libbase64.o` and `bin/base64`. -The first is a single, self-contained object file that you can link into your own project. -The second is a standalone test binary that works similarly to the `base64` system utility. - -The matching header file needed to use this library is in `include/libbase64.h`. - -To compile just the "plain" library without SIMD codecs, type: - -```sh -make lib/libbase64.o -``` - -Optional SIMD codecs can be included by specifying the `AVX2_CFLAGS`, `AVX512_CFLAGS`, -`NEON32_CFLAGS`, `NEON64_CFLAGS`, `SSSE3_CFLAGS`, `SSE41_CFLAGS`, `SSE42_CFLAGS` and/or `AVX_CFLAGS` environment variables. -A typical build invocation on x86 looks like this: - -```sh -AVX2_CFLAGS=-mavx2 SSSE3_CFLAGS=-mssse3 SSE41_CFLAGS=-msse4.1 SSE42_CFLAGS=-msse4.2 AVX_CFLAGS=-mavx make lib/libbase64.o -``` - -### AVX2 - -To build and include the AVX2 codec, set the `AVX2_CFLAGS` environment variable to a value that will turn on AVX2 support in your compiler, typically `-mavx2`. -Example: - -```sh -AVX2_CFLAGS=-mavx2 make -``` - -### AVX512 - -To build and include the AVX512 codec, set the `AVX512_CFLAGS` environment variable to a value that will turn on AVX512 support in your compiler, typically `-mavx512vl -mavx512vbmi`. -Example: - -```sh -AVX512_CFLAGS="-mavx512vl -mavx512vbmi" make -``` - -The codec will only be used if runtime feature detection shows that the target machine supports AVX2. - -### SSSE3 - -To build and include the SSSE3 codec, set the `SSSE3_CFLAGS` environment variable to a value that will turn on SSSE3 support in your compiler, typically `-mssse3`. -Example: - -```sh -SSSE3_CFLAGS=-mssse3 make -``` - -The codec will only be used if runtime feature detection shows that the target machine supports SSSE3. - -### NEON - -This library includes two NEON codecs: one for regular 32-bit ARM and one for the 64-bit AArch64 with NEON, which has double the amount of SIMD registers and can do full 64-byte table lookups. -These codecs encode in 48-byte chunks and decode in massive 64-byte chunks, so they had to be augmented with an uint32/64 codec to stay fast on smaller inputs! - -Use LLVM/Clang for compiling the NEON codecs. -The code generation of at least GCC 4.6 (the version shipped with Raspbian and used for testing) contains a bug when compiling `vstq4_u8()`, and the generated assembly code is of low quality. -NEON intrinsics are a known weak area of GCC. -Clang does a better job. - -NEON support can unfortunately not be portably detected at runtime from userland (the `mrc` instruction is privileged), so the default value for using the NEON codec is determined at compile-time. -But you can do your own runtime detection. -You can include the NEON codec and make it the default, then do a runtime check if the CPU has NEON support, and if not, force a downgrade to non-NEON with `BASE64_FORCE_PLAIN`. - -These are your options: - -1. Don't include NEON support; -2. build NEON support and make it the default, but build all other code without NEON flags so that you can override the default at runtime with `BASE64_FORCE_PLAIN`; -3. build everything with NEON support and make it the default; -4. build everything with NEON support, but don't make it the default (which makes no sense). - -For option 1, simply don't specify any NEON-specific compiler flags at all, like so: - -```sh -CC=clang CFLAGS="-march=armv6" make -``` - -For option 2, keep your `CFLAGS` plain, but set the `NEON32_CFLAGS` environment variable to a value that will build NEON support. -The line below, for instance, will build all the code at ARMv6 level, except for the NEON codec, which is built at ARMv7. -It will also make the NEON codec the default. -For ARMv6 platforms, override that default at runtime with the `BASE64_FORCE_PLAIN` flag. -No ARMv7/NEON code will then be touched. - -```sh -CC=clang CFLAGS="-march=armv6" NEON32_CFLAGS="-march=armv7 -mfpu=neon" make -``` - -For option 3, put everything in your `CFLAGS` and use a stub, but non-empty, `NEON32_CFLAGS`. -This example works for the Raspberry Pi 2B V1.1, which has NEON support: - -```sh -CC=clang CFLAGS="-march=armv7 -mtune=cortex-a7" NEON32_CFLAGS="-mfpu=neon" make -``` - -To build and include the NEON64 codec, use `CFLAGS` as usual to define the platform and set `NEON64_CFLAGS` to a nonempty stub. -(The AArch64 target has mandatory NEON64 support.) -Example: - -```sh -CC=clang CFLAGS="--target=aarch64-linux-gnu -march=armv8-a" NEON64_CFLAGS=" " make -``` - -### OpenMP - -To enable OpenMP on GCC you need to build with `-fopenmp`. This can be by setting the the `OPENMP` environment variable to `1`. - -Example: - -```sh -OPENMP=1 make -``` - -This will let the compiler define `_OPENMP`, which in turn will include the OpenMP optimized `lib_openmp.c` into `lib.c`. - -By default the number of parallel threads will be equal to the number of cores of the processor. -On a quad core with hyperthreading eight cores will be detected, but hyperthreading will not increase the performance. - -To get verbose information about OpenMP start the program with `OMP_DISPLAY_ENV=VERBOSE`, for instance - -```sh -OMP_DISPLAY_ENV=VERBOSE test/benchmark -``` - -To put a limit on the number of threads, start the program with `OMP_THREAD_LIMIT=n`, for instance - -```sh -OMP_THREAD_LIMIT=2 test/benchmark -``` - -An example of running a benchmark with OpenMP, SSSE3 and AVX2 enabled: - -```sh -make clean && OPENMP=1 SSSE3_CFLAGS=-mssse3 AVX2_CFLAGS=-mavx2 make && OPENMP=1 make -C test -``` - -## API reference - -Strings are represented as a pointer and a length; they are not -zero-terminated. This was a conscious design decision. In the decoding step, -relying on zero-termination would make no sense since the output could contain -legitimate zero bytes. In the encoding step, returning the length saves the -overhead of calling `strlen()` on the output. If you insist on the trailing -zero, you can easily add it yourself at the given offset. - -### Flags - -Some API calls take a `flags` argument. -That argument can be used to force the use of a specific codec, even if that codec is a no-op in the current build. -Mainly there for testing purposes, this is also useful on ARM where the only way to do runtime NEON detection is to ask the OS if it's available. -The following constants can be used: - -- `BASE64_FORCE_AVX2` -- `BASE64_FORCE_AVX512` -- `BASE64_FORCE_NEON32` -- `BASE64_FORCE_NEON64` -- `BASE64_FORCE_PLAIN` -- `BASE64_FORCE_SSSE3` -- `BASE64_FORCE_SSE41` -- `BASE64_FORCE_SSE42` -- `BASE64_FORCE_AVX` - -Set `flags` to `0` for the default behavior, which is runtime feature detection on x86, a compile-time fixed codec on ARM, and the plain codec on other platforms. - -### Encoding - -#### base64_encode - -```c -void base64_encode - ( const char *src - , size_t srclen - , char *out - , size_t *outlen - , int flags - ) ; -``` - -Wrapper function to encode a plain string of given length. -Output is written to `out` without trailing zero. -Output length in bytes is written to `outlen`. -The buffer in `out` has been allocated by the caller and is at least 4/3 the size of the input. - -#### base64_stream_encode_init - -```c -void base64_stream_encode_init - ( struct base64_state *state - , int flags - ) ; -``` - -Call this before calling `base64_stream_encode()` to init the state. - -#### base64_stream_encode - -```c -void base64_stream_encode - ( struct base64_state *state - , const char *src - , size_t srclen - , char *out - , size_t *outlen - ) ; -``` - -Encodes the block of data of given length at `src`, into the buffer at `out`. -Caller is responsible for allocating a large enough out-buffer; it must be at least 4/3 the size of the in-buffer, but take some margin. -Places the number of new bytes written into `outlen` (which is set to zero when the function starts). -Does not zero-terminate or finalize the output. - -#### base64_stream_encode_final - -```c -void base64_stream_encode_final - ( struct base64_state *state - , char *out - , size_t *outlen - ) ; -``` - -Finalizes the output begun by previous calls to `base64_stream_encode()`. -Adds the required end-of-stream markers if appropriate. -`outlen` is modified and will contain the number of new bytes written at `out` (which will quite often be zero). - -### Decoding - -#### base64_decode - -```c -int base64_decode - ( const char *src - , size_t srclen - , char *out - , size_t *outlen - , int flags - ) ; -``` - -Wrapper function to decode a plain string of given length. -Output is written to `out` without trailing zero. Output length in bytes is written to `outlen`. -The buffer in `out` has been allocated by the caller and is at least 3/4 the size of the input. -Returns `1` for success, and `0` when a decode error has occured due to invalid input. -Returns `-1` if the chosen codec is not included in the current build. - -#### base64_stream_decode_init - -```c -void base64_stream_decode_init - ( struct base64_state *state - , int flags - ) ; -``` - -Call this before calling `base64_stream_decode()` to init the state. - -#### base64_stream_decode - -```c -int base64_stream_decode - ( struct base64_state *state - , const char *src - , size_t srclen - , char *out - , size_t *outlen - ) ; -``` - -Decodes the block of data of given length at `src`, into the buffer at `out`. -Caller is responsible for allocating a large enough out-buffer; it must be at least 3/4 the size of the in-buffer, but take some margin. -Places the number of new bytes written into `outlen` (which is set to zero when the function starts). -Does not zero-terminate the output. -Returns 1 if all is well, and 0 if a decoding error was found, such as an invalid character. -Returns -1 if the chosen codec is not included in the current build. -Used by the test harness to check whether a codec is available for testing. - -## Examples - -A simple example of encoding a static string to base64 and printing the output -to stdout: - -```c -#include <stdio.h> /* fwrite */ -#include "libbase64.h" - -int main () -{ - char src[] = "hello world"; - char out[20]; - size_t srclen = sizeof(src) - 1; - size_t outlen; - - base64_encode(src, srclen, out, &outlen, 0); - - fwrite(out, outlen, 1, stdout); - - return 0; -} -``` - -A simple example (no error checking, etc) of stream encoding standard input to -standard output: - -```c -#include <stdio.h> -#include "libbase64.h" - -int main () -{ - size_t nread, nout; - char buf[12000], out[16000]; - struct base64_state state; - - // Initialize stream encoder: - base64_stream_encode_init(&state, 0); - - // Read contents of stdin into buffer: - while ((nread = fread(buf, 1, sizeof(buf), stdin)) > 0) { - - // Encode buffer: - base64_stream_encode(&state, buf, nread, out, &nout); - - // If there's output, print it to stdout: - if (nout) { - fwrite(out, nout, 1, stdout); - } - - // If an error occurred, exit the loop: - if (feof(stdin)) { - break; - } - } - - // Finalize encoding: - base64_stream_encode_final(&state, out, &nout); - - // If the finalizing resulted in extra output bytes, print them: - if (nout) { - fwrite(out, nout, 1, stdout); - } - - return 0; -} -``` - -Also see `bin/base64.c` for a simple re-implementation of the `base64` utility. -A file or standard input is fed through the encoder/decoder, and the output is -written to standard output. - -## Tests - -See `tests/` for a small test suite. Testing is automated with -[GitHub Actions](https://github.com/aklomp/base64/actions), which builds and -tests the code across various architectures. - -## Benchmarks - -Benchmarks can be run with the built-in benchmark program as follows: - -```sh -make -C test benchmark <buildflags> && test/benchmark -``` - -It will run an encoding and decoding benchmark for all of the compiled-in codecs. - -The tables below contain some results on random machines. All numbers measured with a 10MB buffer in MB/sec, rounded to the nearest integer. - -\*: Update needed - -x86 processors - -| Processor | Plain enc | Plain dec | SSSE3 enc | SSSE3 dec | AVX enc | AVX dec | AVX2 enc | AVX2 dec | -|-------------------------------------------|----------:|----------:|----------:|----------:|--------:|--------:|---------:|---------:| -| i7-4771 @ 3.5 GHz | 833\* | 1111\* | 3333\* | 4444\* | TBD | TBD | 4999\* | 6666\* | -| i7-4770 @ 3.4 GHz DDR1600 | 1790\* | 3038\* | 4899\* | 4043\* | 4796\* | 5709\* | 4681\* | 6386\* | -| i7-4770 @ 3.4 GHz DDR1600 OPENMP 1 thread | 1784\* | 3041\* | 4945\* | 4035\* | 4776\* | 5719\* | 4661\* | 6294\* | -| i7-4770 @ 3.4 GHz DDR1600 OPENMP 2 thread | 3401\* | 5729\* | 5489\* | 7444\* | 5003\* | 8624\* | 5105\* | 8558\* | -| i7-4770 @ 3.4 GHz DDR1600 OPENMP 4 thread | 4884\* | 7099\* | 4917\* | 7057\* | 4799\* | 7143\* | 4902\* | 7219\* | -| i7-4770 @ 3.4 GHz DDR1600 OPENMP 8 thread | 5212\* | 8849\* | 5284\* | 9099\* | 5289\* | 9220\* | 4849\* | 9200\* | -| i7-4870HQ @ 2.5 GHz | 1471\* | 3066\* | 6721\* | 6962\* | 7015\* | 8267\* | 8328\* | 11576\* | -| i5-4590S @ 3.0 GHz | 3356 | 3197 | 4363 | 6104 | 4243\* | 6233 | 4160\* | 6344 | -| Xeon X5570 @ 2.93 GHz | 2161 | 1508 | 3160 | 3915 | - | - | - | - | -| Pentium4 @ 3.4 GHz | 896 | 740 | - | - | - | - | - | - | -| Atom N270 | 243 | 266 | 508 | 387 | - | - | - | - | -| AMD E-450 | 645 | 564 | 625 | 634 | - | - | - | - | -| Intel Edison @ 500 MHz | 79\* | 92\* | 152\* | 172\* | - | - | - | - | -| Intel Edison @ 500 MHz OPENMP 2 thread | 158\* | 184\* | 300\* | 343\* | - | - | - | - | -| Intel Edison @ 500 MHz (x86-64) | 162 | 119 | 209 | 164 | - | - | - | - | -| Intel Edison @ 500 MHz (x86-64) 2 thread | 319 | 237 | 412 | 329 | - | - | - | - | - -ARM processors - -| Processor | Plain enc | Plain dec | NEON32 enc | NEON32 dec | NEON64 enc | NEON64 dec | -|-------------------------------------------|----------:|----------:|-----------:|-----------:|-----------:|-----------:| -| Raspberry PI B+ V1.2 | 46\* | 40\* | - | - | - | - | -| Raspberry PI 2 B V1.1 | 85 | 141 | 300 | 225 | - | - | -| Apple iPhone SE armv7 | 1056\* | 895\* | 2943\* | 2618\* | - | - | -| Apple iPhone SE arm64 | 1061\* | 1239\* | - | - | 4098\* | 3983\* | - -PowerPC processors - -| Processor | Plain enc | Plain dec | -|-------------------------------------------|----------:|----------:| -| PowerPC E6500 @ 1.8GHz | 270\* | 265\* | - - -Benchmarks on i7-4770 @ 3.4 GHz DDR1600 with varrying buffer sizes: -![Benchmarks](base64-benchmarks.png) - -Note: optimal buffer size to take advantage of the cache is in the range of 100 kB to 1 MB, leading to 12x faster AVX encoding/decoding compared to Plain, or a throughput of 24/27GB/sec. -Also note the performance degradation when the buffer size is less than 10 kB due to thread creation overhead. -To prevent this from happening `lib_openmp.c` defines `OMP_THRESHOLD 20000`, requiring at least a 20000 byte buffer to enable multithreading. - -## License - -This repository is licensed under the -[BSD 2-clause License](http://opensource.org/licenses/BSD-2-Clause). See the -LICENSE file. diff --git a/deps/base64/base64/base64-benchmarks.png b/deps/base64/base64/base64-benchmarks.png deleted file mode 100644 index de0d7d42e8d00e..00000000000000 Binary files a/deps/base64/base64/base64-benchmarks.png and /dev/null differ diff --git a/deps/base64/base64/bin/base64.c b/deps/base64/base64/bin/base64.c deleted file mode 100644 index 0e32ed03762df7..00000000000000 --- a/deps/base64/base64/bin/base64.c +++ /dev/null @@ -1,591 +0,0 @@ -// Test for MinGW. -#if defined(__MINGW32__) || defined(__MINGW64__) -# define MINGW -#endif - -// Decide if the writev(2) system call needs to be emulated as a series of -// write(2) calls. At least MinGW does not support writev(2). -#ifdef MINGW -# define EMULATE_WRITEV -#endif - -// Include the necessary system header when using the system's writev(2). -#ifndef EMULATE_WRITEV -# define _XOPEN_SOURCE // Unlock IOV_MAX -# include <sys/uio.h> -#endif - -#include <stdbool.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <getopt.h> -#include <errno.h> -#include <limits.h> - -#include "../include/libbase64.h" - -// Size of the buffer for the "raw" (not base64-encoded) data in bytes. -#define BUFFER_RAW_SIZE (1024 * 1024) - -// Size of the buffer for the base64-encoded data in bytes. The base64-encoded -// data is 4/3 the size of the input, with some margin to be sure. -#define BUFFER_ENC_SIZE (BUFFER_RAW_SIZE * 4 / 3 + 16) - -// Global config structure. -struct config { - - // Name by which the program was called on the command line. - const char *name; - - // Name of the input file for logging purposes. - const char *file; - - // Input file handle. - FILE *fp; - - // Wrap width in characters, for encoding only. - size_t wrap; - - // Whether to run in decode mode. - bool decode; - - // Whether to just print the help text and exit. - bool print_help; -}; - -// Input/output buffer structure. -struct buffer { - - // Runtime-allocated buffer for raw (unencoded) data. - char *raw; - - // Runtime-allocated buffer for base64-encoded data. - char *enc; -}; - -// Optionally emulate writev(2) as a series of write calls. -#ifdef EMULATE_WRITEV - -// Quick and dirty definition of IOV_MAX as it is probably not defined. -#ifndef IOV_MAX -# define IOV_MAX 1024 -#endif - -// Quick and dirty definition of this system struct, for local use only. -struct iovec { - - // Opaque data pointer. - void *iov_base; - - // Length of the data in bytes. - size_t iov_len; -}; - -static ssize_t -writev (const int fd, const struct iovec *iov, int iovcnt) -{ - ssize_t r, nwrite = 0; - - // Reset the error marker. - errno = 0; - - while (iovcnt-- > 0) { - - // Write the vector; propagate errors back to the caller. Note - // that this loses information about how much vectors have been - // successfully written, but that also seems to be the case - // with the real function. The API is somewhat flawed. - if ((r = write(fd, iov->iov_base, iov->iov_len)) < 0) { - return r; - } - - // Update the total write count. - nwrite += r; - - // Return early after a partial write; the caller should retry. - if ((size_t) r != iov->iov_len) { - break; - } - - // Move to the next vector. - iov++; - } - - return nwrite; -} - -#endif // EMULATE_WRITEV - -static bool -buffer_alloc (const struct config *config, struct buffer *buf) -{ - if ((buf->raw = malloc(BUFFER_RAW_SIZE)) == NULL || - (buf->enc = malloc(BUFFER_ENC_SIZE)) == NULL) { - free(buf->raw); - fprintf(stderr, "%s: malloc: %s\n", - config->name, strerror(errno)); - return false; - } - - return true; -} - -static void -buffer_free (struct buffer *buf) -{ - free(buf->raw); - free(buf->enc); -} - -static bool -writev_retry (const struct config *config, struct iovec *iov, size_t nvec) -{ - // Writing nothing always succeeds. - if (nvec == 0) { - return true; - } - - while (true) { - ssize_t nwrite; - - // Try to write the vectors to stdout. - if ((nwrite = writev(1, iov, nvec)) < 0) { - - // Retry on EINTR. - if (errno == EINTR) { - continue; - } - - // Quit on other errors. - fprintf(stderr, "%s: writev: %s\n", - config->name, strerror(errno)); - return false; - } - - // The return value of `writev' is the number of bytes written. - // To check for success, we traverse the list and remove all - // written vectors. The call succeeded if the list is empty. - while (true) { - - // Retry if this vector is not or partially written. - if (iov->iov_len > (size_t) nwrite) { - char *base = iov->iov_base; - - iov->iov_base = (size_t) nwrite + base; - iov->iov_len -= (size_t) nwrite; - break; - } - - // Move to the next vector. - nwrite -= iov->iov_len; - iov++; - - // Return successfully if all vectors were written. - if (--nvec == 0) { - return true; - } - } - } -} - -static inline bool -iov_append (const struct config *config, struct iovec *iov, - size_t *nvec, char *base, const size_t len) -{ - // Add the buffer to the IO vector array. - iov[*nvec].iov_base = base; - iov[*nvec].iov_len = len; - - // Increment the array index. Flush the array if it is full. - if (++(*nvec) == IOV_MAX) { - if (writev_retry(config, iov, IOV_MAX) == false) { - return false; - } - *nvec = 0; - } - - return true; -} - -static bool -write_stdout (const struct config *config, const char *buf, size_t len) -{ - while (len > 0) { - ssize_t nwrite; - - // Try to write the buffer to stdout. - if ((nwrite = write(1, buf, len)) < 0) { - - // Retry on EINTR. - if (errno == EINTR) { - continue; - } - - // Quit on other errors. - fprintf(stderr, "%s: write: %s\n", - config->name, strerror(errno)); - return false; - } - - // Update the buffer position. - buf += (size_t) nwrite; - len -= (size_t) nwrite; - } - - return true; -} - -static bool -write_wrapped (const struct config *config, char *buf, size_t len) -{ - static size_t col = 0; - - // Special case: if buf is NULL, print final trailing newline. - if (buf == NULL) { - if (config->wrap > 0 && col > 0) { - return write_stdout(config, "\n", 1); - } - return true; - } - - // If no wrap width is given, write the entire buffer. - if (config->wrap == 0) { - return write_stdout(config, buf, len); - } - - // Statically allocated IO vector buffer. - static struct iovec iov[IOV_MAX]; - size_t nvec = 0; - - while (len > 0) { - - // Number of characters to fill the current line. - size_t nwrite = config->wrap - col; - - // Do not write more data than is available. - if (nwrite > len) { - nwrite = len; - } - - // Append the data to the IO vector array. - if (iov_append(config, iov, &nvec, buf, nwrite) == false) { - return false; - } - - // Advance the buffer. - len -= nwrite; - buf += nwrite; - col += nwrite; - - // If the line is full, append a newline. - if (col == config->wrap) { - if (iov_append(config, iov, &nvec, "\n", 1) == false) { - return false; - } - col = 0; - } - } - - // Write the remaining vectors. - if (writev_retry(config, iov, nvec) == false) { - return false; - } - - return true; -} - -static bool -encode (const struct config *config, struct buffer *buf) -{ - size_t nread, nout; - struct base64_state state; - - // Initialize the encoder's state structure. - base64_stream_encode_init(&state, 0); - - // Read raw data into the buffer. - while ((nread = fread(buf->raw, 1, BUFFER_RAW_SIZE, config->fp)) > 0) { - - // Encode the raw input into the encoded buffer. - base64_stream_encode(&state, buf->raw, nread, buf->enc, &nout); - - // Append the encoded data to the output stream. - if (write_wrapped(config, buf->enc, nout) == false) { - return false; - } - } - - // Check for stream errors. - if (ferror(config->fp)) { - fprintf(stderr, "%s: %s: read error\n", - config->name, config->file); - return false; - } - - // Finalize the encoding by adding proper stream terminators. - base64_stream_encode_final(&state, buf->enc, &nout); - - // Append this tail to the output stream. - if (write_wrapped(config, buf->enc, nout) == false) { - return false; - } - - // Print optional trailing newline. - if (write_wrapped(config, NULL, 0) == false) { - return false; - } - - return true; -} - -static inline size_t -find_newline (const char *p, const size_t avail) -{ - // This is very naive and can probably be improved by vectorization. - for (size_t len = 0; len < avail; len++) { - if (p[len] == '\n') { - return len; - } - } - - return avail; -} - -static bool -decode (const struct config *config, struct buffer *buf) -{ - size_t avail; - struct base64_state state; - - // Initialize the decoder's state structure. - base64_stream_decode_init(&state, 0); - - // Read encoded data into the buffer. Use the smallest buffer size to - // be on the safe side: the decoded output will fit the raw buffer. - while ((avail = fread(buf->enc, 1, BUFFER_RAW_SIZE, config->fp)) > 0) { - char *start = buf->enc; - char *outbuf = buf->raw; - size_t ototal = 0; - - // By popular demand, this utility tries to be bug-compatible - // with GNU `base64'. That includes silently ignoring newlines - // in the input. Tokenize the input on newline characters. - while (avail > 0) { - - // Find the offset of the next newline character, which - // is also the length of the next chunk. - size_t outlen, len = find_newline(start, avail); - - // Ignore empty chunks. - if (len == 0) { - start++; - avail--; - continue; - } - - // Decode the chunk into the raw buffer. - if (base64_stream_decode(&state, start, len, - outbuf, &outlen) == 0) { - fprintf(stderr, "%s: %s: decoding error\n", - config->name, config->file); - return false; - } - - // Update the output buffer pointer and total size. - outbuf += outlen; - ototal += outlen; - - // Bail out if the whole string has been consumed. - if (len == avail) { - break; - } - - // Move the start pointer past the newline. - start += len + 1; - avail -= len + 1; - } - - // Append the raw data to the output stream. - if (write_stdout(config, buf->raw, ototal) == false) { - return false; - } - } - - // Check for stream errors. - if (ferror(config->fp)) { - fprintf(stderr, "%s: %s: read error\n", - config->name, config->file); - return false; - } - - return true; -} - -static void -usage (FILE *fp, const struct config *config) -{ - const char *usage = - "Usage: %s [OPTION]... [FILE]\n" - "If no FILE is given or is specified as '-', " - "read from standard input.\n" - "Options:\n" - " -d, --decode Decode a base64 stream.\n" - " -h, --help Print this help text.\n" - " -w, --wrap=COLS Wrap encoded lines at this column. " - "Default 76, 0 to disable.\n"; - - fprintf(fp, usage, config->name); -} - -static bool -get_wrap (struct config *config, const char *str) -{ - char *eptr; - - // Reject empty strings. - if (*str == '\0') { - return false; - } - - // Convert the input string to a signed long. - const long wrap = strtol(str, &eptr, 10); - - // Reject negative numbers. - if (wrap < 0) { - return false; - } - - // Reject strings containing non-digits. - if (*eptr != '\0') { - return false; - } - - config->wrap = (size_t) wrap; - return true; -} - -static bool -parse_opts (int argc, char **argv, struct config *config) -{ - int c; - static const struct option opts[] = { - { "decode", no_argument, NULL, 'd' }, - { "help", no_argument, NULL, 'h' }, - { "wrap", required_argument, NULL, 'w' }, - { NULL } - }; - - // Remember the program's name. - config->name = *argv; - - // Parse command line options. - while ((c = getopt_long(argc, argv, ":dhw:", opts, NULL)) != -1) { - switch (c) { - case 'd': - config->decode = true; - break; - - case 'h': - config->print_help = true; - return true; - - case 'w': - if (get_wrap(config, optarg) == false) { - fprintf(stderr, - "%s: invalid wrap value '%s'\n", - config->name, optarg); - return false; - } - break; - - case ':': - fprintf(stderr, "%s: missing argument for '%c'\n", - config->name, optopt); - return false; - - default: - fprintf(stderr, "%s: unknown option '%c'\n", - config->name, optopt); - return false; - } - } - - // Return successfully if no filename was given. - if (optind >= argc) { - return true; - } - - // Return unsuccessfully if more than one filename was given. - if (optind + 1 < argc) { - fprintf(stderr, "%s: too many files\n", config->name); - return false; - } - - // For compatibility with GNU Coreutils base64, treat a filename of '-' - // as standard input. - if (strcmp(argv[optind], "-") == 0) { - return true; - } - - // Save the name of the file. - config->file = argv[optind]; - - // Open the file. - if ((config->fp = fopen(config->file, "rb")) == NULL) { - fprintf(stderr, "%s: %s: %s\n", - config->name, config->file, strerror(errno)); - return false; - } - - return true; -} - -int -main (int argc, char **argv) -{ - // Default program config. - struct config config = { - .file = "stdin", - .fp = stdin, - .wrap = 76, - .decode = false, - .print_help = false, - }; - struct buffer buf; - - // Parse options from the command line. - if (parse_opts(argc, argv, &config) == false) { - usage(stderr, &config); - return 1; - } - - // Return early if the user just wanted the help text. - if (config.print_help) { - usage(stdout, &config); - return 0; - } - - // Allocate buffers. - if (buffer_alloc(&config, &buf) == false) { - return 1; - } - - // Encode or decode the input based on the user's choice. - const bool ret = config.decode - ? decode(&config, &buf) - : encode(&config, &buf); - - // Free the buffers. - buffer_free(&buf); - - // Close the input file. - fclose(config.fp); - - // Close the output stream. - fclose(stdout); - - // That's all, folks. - return ret ? 0 : 1; -} diff --git a/deps/base64/base64/cmake/Modules/TargetArch.cmake b/deps/base64/base64/cmake/Modules/TargetArch.cmake deleted file mode 100644 index d5b0a50bb1fc5d..00000000000000 --- a/deps/base64/base64/cmake/Modules/TargetArch.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# Written in 2017 by Henrik Steffen Gaßmann henrik@gassmann.onl -# -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any warranty. -# -# You should have received a copy of the CC0 Public Domain Dedication -# along with this software. If not, see -# -# http://creativecommons.org/publicdomain/zero/1.0/ -# -######################################################################## - -set(TARGET_ARCHITECTURE_TEST_FILE "${CMAKE_CURRENT_LIST_DIR}/../test-arch.c") - -function(detect_target_architecture OUTPUT_VARIABLE) - message(STATUS "${CMAKE_CURRENT_LIST_DIR}") - try_compile(_IGNORED "${CMAKE_CURRENT_BINARY_DIR}" - "${TARGET_ARCHITECTURE_TEST_FILE}" - OUTPUT_VARIABLE _LOG - ) - - string(REGEX MATCH "##arch=([^#]+)##" _IGNORED "${_LOG}") - - set(${OUTPUT_VARIABLE} "${CMAKE_MATCH_1}" PARENT_SCOPE) - set("${OUTPUT_VARIABLE}_${CMAKE_MATCH_1}" 1 PARENT_SCOPE) - if (CMAKE_MATCH_1 STREQUAL "unknown") - message(WARNING "could not detect the target architecture.") - endif() -endfunction() diff --git a/deps/base64/base64/cmake/Modules/TargetSIMDInstructionSet.cmake b/deps/base64/base64/cmake/Modules/TargetSIMDInstructionSet.cmake deleted file mode 100644 index 485080905319a6..00000000000000 --- a/deps/base64/base64/cmake/Modules/TargetSIMDInstructionSet.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# Written in 2016-2017 by Henrik Steffen Gaßmann henrik@gassmann.onl -# -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any warranty. -# -# You should have received a copy of the CC0 Public Domain Dedication -# along with this software. If not, see -# -# http://creativecommons.org/publicdomain/zero/1.0/ -# -######################################################################## - -######################################################################## -# compiler flags definition -macro(define_SIMD_compile_flags) - if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang") - # x86 - set(COMPILE_FLAGS_SSSE3 "-mssse3") - set(COMPILE_FLAGS_SSE41 "-msse4.1") - set(COMPILE_FLAGS_SSE42 "-msse4.2") - set(COMPILE_FLAGS_AVX "-mavx") - set(COMPILE_FLAGS_AVX2 "-mavx2") - set(COMPILE_FLAGS_AVX512 "-mavx512vl -mavx512vbmi") - - #arm - set(COMPILE_FLAGS_NEON32 "-mfpu=neon") - elseif(MSVC) - set(COMPILE_FLAGS_SSSE3 " ") - set(COMPILE_FLAGS_SSE41 " ") - set(COMPILE_FLAGS_SSE42 " ") - set(COMPILE_FLAGS_AVX "/arch:AVX") - set(COMPILE_FLAGS_AVX2 "/arch:AVX2") - set(COMPILE_FLAGS_AVX512 "/arch:AVX512") - endif() -endmacro(define_SIMD_compile_flags) diff --git a/deps/base64/base64/cmake/base64-config.cmake.in b/deps/base64/base64/cmake/base64-config.cmake.in deleted file mode 100644 index d009bf73ad7475..00000000000000 --- a/deps/base64/base64/cmake/base64-config.cmake.in +++ /dev/null @@ -1,5 +0,0 @@ -@PACKAGE_INIT@ - -include("${CMAKE_CURRENT_LIST_DIR}/base64-targets.cmake") - -check_required_components(base64) diff --git a/deps/base64/base64/cmake/config.h.in b/deps/base64/base64/cmake/config.h.in deleted file mode 100644 index c7faa94bc0903d..00000000000000 --- a/deps/base64/base64/cmake/config.h.in +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef BASE64_CONFIG_H -#define BASE64_CONFIG_H - -#cmakedefine01 BASE64_WITH_SSSE3 -#define HAVE_SSSE3 BASE64_WITH_SSSE3 - -#cmakedefine01 BASE64_WITH_SSE41 -#define HAVE_SSE41 BASE64_WITH_SSE41 - -#cmakedefine01 BASE64_WITH_SSE42 -#define HAVE_SSE42 BASE64_WITH_SSE42 - -#cmakedefine01 BASE64_WITH_AVX -#define HAVE_AVX BASE64_WITH_AVX - -#cmakedefine01 BASE64_WITH_AVX2 -#define HAVE_AVX2 BASE64_WITH_AVX2 - -#cmakedefine01 BASE64_WITH_AVX512 -#define HAVE_AVX512 BASE64_WITH_AVX512 - -#cmakedefine01 BASE64_WITH_NEON32 -#define HAVE_NEON32 BASE64_WITH_NEON32 - -#cmakedefine01 BASE64_WITH_NEON64 -#define HAVE_NEON64 BASE64_WITH_NEON64 - -#endif // BASE64_CONFIG_H diff --git a/deps/base64/base64/cmake/test-arch.c b/deps/base64/base64/cmake/test-arch.c deleted file mode 100644 index b438405e358b5e..00000000000000 --- a/deps/base64/base64/cmake/test-arch.c +++ /dev/null @@ -1,35 +0,0 @@ -// Written in 2017 by Henrik Steffen Gaßmann henrik@gassmann.onl -// -// To the extent possible under law, the author(s) have dedicated all -// copyright and related and neighboring rights to this software to the -// public domain worldwide. This software is distributed without any warranty. -// -// You should have received a copy of the CC0 Public Domain Dedication -// along with this software. If not, see -// -// http://creativecommons.org/publicdomain/zero/1.0/ -// -//////////////////////////////////////////////////////////////////////////////// - -// ARM 64-Bit -#if defined(__aarch64__) -#error ##arch=arm64## - -// ARM 32-Bit -#elif defined(__arm__) \ - || defined(_M_ARM) -#error ##arch=arm## - -// x86 64-Bit -#elif defined(__x86_64__) \ - || defined(_M_X64) -#error ##arch=x64## - -// x86 32-Bit -#elif defined(__i386__) \ - || defined(_M_IX86) -#error ##arch=x86## - -#else -#error ##arch=unknown## -#endif diff --git a/deps/base64/base64/include/libbase64.h b/deps/base64/base64/include/libbase64.h deleted file mode 100644 index c5908973c5e73c..00000000000000 --- a/deps/base64/base64/include/libbase64.h +++ /dev/null @@ -1,146 +0,0 @@ -#ifndef LIBBASE64_H -#define LIBBASE64_H - -#include <stddef.h> /* size_t */ - - -#if defined(_WIN32) || defined(__CYGWIN__) -#define BASE64_SYMBOL_IMPORT __declspec(dllimport) -#define BASE64_SYMBOL_EXPORT __declspec(dllexport) -#define BASE64_SYMBOL_PRIVATE - -#elif __GNUC__ >= 4 -#define BASE64_SYMBOL_IMPORT __attribute__ ((visibility ("default"))) -#define BASE64_SYMBOL_EXPORT __attribute__ ((visibility ("default"))) -#define BASE64_SYMBOL_PRIVATE __attribute__ ((visibility ("hidden"))) - -#else -#define BASE64_SYMBOL_IMPORT -#define BASE64_SYMBOL_EXPORT -#define BASE64_SYMBOL_PRIVATE -#endif - -#if defined(BASE64_STATIC_DEFINE) -#define BASE64_EXPORT -#define BASE64_NO_EXPORT - -#else -#if defined(BASE64_EXPORTS) // defined if we are building the shared library -#define BASE64_EXPORT BASE64_SYMBOL_EXPORT - -#else -#define BASE64_EXPORT BASE64_SYMBOL_IMPORT -#endif - -#define BASE64_NO_EXPORT BASE64_SYMBOL_PRIVATE -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -/* These are the flags that can be passed in the `flags` argument. The values - * below force the use of a given codec, even if that codec is a no-op in the - * current build. Used in testing. Set to 0 for the default behavior, which is - * runtime feature detection on x86, a compile-time fixed codec on ARM, and - * the plain codec on other platforms: */ -#define BASE64_FORCE_AVX2 (1 << 0) -#define BASE64_FORCE_NEON32 (1 << 1) -#define BASE64_FORCE_NEON64 (1 << 2) -#define BASE64_FORCE_PLAIN (1 << 3) -#define BASE64_FORCE_SSSE3 (1 << 4) -#define BASE64_FORCE_SSE41 (1 << 5) -#define BASE64_FORCE_SSE42 (1 << 6) -#define BASE64_FORCE_AVX (1 << 7) -#define BASE64_FORCE_AVX512 (1 << 8) - -struct base64_state { - int eof; - int bytes; - int flags; - unsigned char carry; -}; - -/* Wrapper function to encode a plain string of given length. Output is written - * to *out without trailing zero. Output length in bytes is written to *outlen. - * The buffer in `out` has been allocated by the caller and is at least 4/3 the - * size of the input. See above for `flags`; set to 0 for default operation: */ -void BASE64_EXPORT base64_encode - ( const char *src - , size_t srclen - , char *out - , size_t *outlen - , int flags - ) ; - -/* Call this before calling base64_stream_encode() to init the state. See above - * for `flags`; set to 0 for default operation: */ -void BASE64_EXPORT base64_stream_encode_init - ( struct base64_state *state - , int flags - ) ; - -/* Encodes the block of data of given length at `src`, into the buffer at - * `out`. Caller is responsible for allocating a large enough out-buffer; it - * must be at least 4/3 the size of the in-buffer, but take some margin. Places - * the number of new bytes written into `outlen` (which is set to zero when the - * function starts). Does not zero-terminate or finalize the output. */ -void BASE64_EXPORT base64_stream_encode - ( struct base64_state *state - , const char *src - , size_t srclen - , char *out - , size_t *outlen - ) ; - -/* Finalizes the output begun by previous calls to `base64_stream_encode()`. - * Adds the required end-of-stream markers if appropriate. `outlen` is modified - * and will contain the number of new bytes written at `out` (which will quite - * often be zero). */ -void BASE64_EXPORT base64_stream_encode_final - ( struct base64_state *state - , char *out - , size_t *outlen - ) ; - -/* Wrapper function to decode a plain string of given length. Output is written - * to *out without trailing zero. Output length in bytes is written to *outlen. - * The buffer in `out` has been allocated by the caller and is at least 3/4 the - * size of the input. See above for `flags`, set to 0 for default operation: */ -int BASE64_EXPORT base64_decode - ( const char *src - , size_t srclen - , char *out - , size_t *outlen - , int flags - ) ; - -/* Call this before calling base64_stream_decode() to init the state. See above - * for `flags`; set to 0 for default operation: */ -void BASE64_EXPORT base64_stream_decode_init - ( struct base64_state *state - , int flags - ) ; - -/* Decodes the block of data of given length at `src`, into the buffer at - * `out`. Caller is responsible for allocating a large enough out-buffer; it - * must be at least 3/4 the size of the in-buffer, but take some margin. Places - * the number of new bytes written into `outlen` (which is set to zero when the - * function starts). Does not zero-terminate the output. Returns 1 if all is - * well, and 0 if a decoding error was found, such as an invalid character. - * Returns -1 if the chosen codec is not included in the current build. Used by - * the test harness to check whether a codec is available for testing. */ -int BASE64_EXPORT base64_stream_decode - ( struct base64_state *state - , const char *src - , size_t srclen - , char *out - , size_t *outlen - ) ; - -#ifdef __cplusplus -} -#endif - -#endif /* LIBBASE64_H */ diff --git a/deps/base64/base64/lib/arch/avx/codec.c b/deps/base64/base64/lib/arch/avx/codec.c deleted file mode 100644 index b069618e29463e..00000000000000 --- a/deps/base64/base64/lib/arch/avx/codec.c +++ /dev/null @@ -1,66 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <stdlib.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#if HAVE_AVX -#include <immintrin.h> - -// Only enable inline assembly on supported compilers and on 64-bit CPUs. -#ifndef BASE64_AVX_USE_ASM -# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 -# define BASE64_AVX_USE_ASM 1 -# else -# define BASE64_AVX_USE_ASM 0 -# endif -#endif - -#include "../ssse3/dec_reshuffle.c" -#include "../ssse3/dec_loop.c" - -#if BASE64_AVX_USE_ASM -# include "enc_loop_asm.c" -#else -# include "../ssse3/enc_translate.c" -# include "../ssse3/enc_reshuffle.c" -# include "../ssse3/enc_loop.c" -#endif - -#endif // HAVE_AVX - -BASE64_ENC_FUNCTION(avx) -{ -#if HAVE_AVX - #include "../generic/enc_head.c" - - // For supported compilers, use a hand-optimized inline assembly - // encoder. Otherwise fall back on the SSSE3 encoder, but compiled with - // AVX flags to generate better optimized AVX code. - -#if BASE64_AVX_USE_ASM - enc_loop_avx(&s, &slen, &o, &olen); -#else - enc_loop_ssse3(&s, &slen, &o, &olen); -#endif - - #include "../generic/enc_tail.c" -#else - BASE64_ENC_STUB -#endif -} - -BASE64_DEC_FUNCTION(avx) -{ -#if HAVE_AVX - #include "../generic/dec_head.c" - dec_loop_ssse3(&s, &slen, &o, &olen); - #include "../generic/dec_tail.c" -#else - BASE64_DEC_STUB -#endif -} diff --git a/deps/base64/base64/lib/arch/avx/enc_loop_asm.c b/deps/base64/base64/lib/arch/avx/enc_loop_asm.c deleted file mode 100644 index 979269af57740e..00000000000000 --- a/deps/base64/base64/lib/arch/avx/enc_loop_asm.c +++ /dev/null @@ -1,264 +0,0 @@ -// Apologies in advance for combining the preprocessor with inline assembly, -// two notoriously gnarly parts of C, but it was necessary to avoid a lot of -// code repetition. The preprocessor is used to template large sections of -// inline assembly that differ only in the registers used. If the code was -// written out by hand, it would become very large and hard to audit. - -// Generate a block of inline assembly that loads register R0 from memory. The -// offset at which the register is loaded is set by the given round. -#define LOAD(R0, ROUND) \ - "vlddqu ("#ROUND" * 12)(%[src]), %["R0"] \n\t" - -// Generate a block of inline assembly that deinterleaves and shuffles register -// R0 using preloaded constants. Outputs in R0 and R1. -#define SHUF(R0, R1, R2) \ - "vpshufb %[lut0], %["R0"], %["R1"] \n\t" \ - "vpand %["R1"], %[msk0], %["R2"] \n\t" \ - "vpand %["R1"], %[msk2], %["R1"] \n\t" \ - "vpmulhuw %["R2"], %[msk1], %["R2"] \n\t" \ - "vpmullw %["R1"], %[msk3], %["R1"] \n\t" \ - "vpor %["R1"], %["R2"], %["R1"] \n\t" - -// Generate a block of inline assembly that takes R0 and R1 and translates -// their contents to the base64 alphabet, using preloaded constants. -#define TRAN(R0, R1, R2) \ - "vpsubusb %[n51], %["R1"], %["R0"] \n\t" \ - "vpcmpgtb %[n25], %["R1"], %["R2"] \n\t" \ - "vpsubb %["R2"], %["R0"], %["R0"] \n\t" \ - "vpshufb %["R0"], %[lut1], %["R2"] \n\t" \ - "vpaddb %["R1"], %["R2"], %["R0"] \n\t" - -// Generate a block of inline assembly that stores the given register R0 at an -// offset set by the given round. -#define STOR(R0, ROUND) \ - "vmovdqu %["R0"], ("#ROUND" * 16)(%[dst]) \n\t" - -// Generate a block of inline assembly that generates a single self-contained -// encoder round: fetch the data, process it, and store the result. Then update -// the source and destination pointers. -#define ROUND() \ - LOAD("a", 0) \ - SHUF("a", "b", "c") \ - TRAN("a", "b", "c") \ - STOR("a", 0) \ - "add $12, %[src] \n\t" \ - "add $16, %[dst] \n\t" - -// Define a macro that initiates a three-way interleaved encoding round by -// preloading registers a, b and c from memory. -// The register graph shows which registers are in use during each step, and -// is a visual aid for choosing registers for that step. Symbol index: -// -// + indicates that a register is loaded by that step. -// | indicates that a register is in use and must not be touched. -// - indicates that a register is decommissioned by that step. -// x indicates that a register is used as a temporary by that step. -// V indicates that a register is an input or output to the macro. -// -#define ROUND_3_INIT() /* a b c d e f */ \ - LOAD("a", 0) /* + */ \ - SHUF("a", "d", "e") /* | + x */ \ - LOAD("b", 1) /* | + | */ \ - TRAN("a", "d", "e") /* | | - x */ \ - LOAD("c", 2) /* V V V */ - -// Define a macro that translates, shuffles and stores the input registers A, B -// and C, and preloads registers D, E and F for the next round. -// This macro can be arbitrarily daisy-chained by feeding output registers D, E -// and F back into the next round as input registers A, B and C. The macro -// carefully interleaves memory operations with data operations for optimal -// pipelined performance. - -#define ROUND_3(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ - LOAD(D, (ROUND + 3)) /* V V V + */ \ - SHUF(B, E, F) /* | | | | + x */ \ - STOR(A, (ROUND + 0)) /* - | | | | */ \ - TRAN(B, E, F) /* | | | - x */ \ - LOAD(E, (ROUND + 4)) /* | | | + */ \ - SHUF(C, A, F) /* + | | | | x */ \ - STOR(B, (ROUND + 1)) /* | - | | | */ \ - TRAN(C, A, F) /* - | | | x */ \ - LOAD(F, (ROUND + 5)) /* | | | + */ \ - SHUF(D, A, B) /* + x | | | | */ \ - STOR(C, (ROUND + 2)) /* | - | | | */ \ - TRAN(D, A, B) /* - x V V V */ - -// Define a macro that terminates a ROUND_3 macro by taking pre-loaded -// registers D, E and F, and translating, shuffling and storing them. -#define ROUND_3_END(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ - SHUF(E, A, B) /* + x V V V */ \ - STOR(D, (ROUND + 3)) /* | - | | */ \ - TRAN(E, A, B) /* - x | | */ \ - SHUF(F, C, D) /* + x | | */ \ - STOR(E, (ROUND + 4)) /* | - | */ \ - TRAN(F, C, D) /* - x | */ \ - STOR(F, (ROUND + 5)) /* - */ - -// Define a type A round. Inputs are a, b, and c, outputs are d, e, and f. -#define ROUND_3_A(ROUND) \ - ROUND_3(ROUND, "a", "b", "c", "d", "e", "f") - -// Define a type B round. Inputs and outputs are swapped with regard to type A. -#define ROUND_3_B(ROUND) \ - ROUND_3(ROUND, "d", "e", "f", "a", "b", "c") - -// Terminating macro for a type A round. -#define ROUND_3_A_LAST(ROUND) \ - ROUND_3_A(ROUND) \ - ROUND_3_END(ROUND, "a", "b", "c", "d", "e", "f") - -// Terminating macro for a type B round. -#define ROUND_3_B_LAST(ROUND) \ - ROUND_3_B(ROUND) \ - ROUND_3_END(ROUND, "d", "e", "f", "a", "b", "c") - -// Suppress clang's warning that the literal string in the asm statement is -// overlong (longer than the ISO-mandated minimum size of 4095 bytes for C99 -// compilers). It may be true, but the goal here is not C99 portability. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Woverlength-strings" - -static inline void -enc_loop_avx (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - // For a clearer explanation of the algorithm used by this function, - // please refer to the plain (not inline assembly) implementation. This - // function follows the same basic logic. - - if (*slen < 16) { - return; - } - - // Process blocks of 12 bytes at a time. Input is read in blocks of 16 - // bytes, so "reserve" four bytes from the input buffer to ensure that - // we never read beyond the end of the input buffer. - size_t rounds = (*slen - 4) / 12; - - *slen -= rounds * 12; // 12 bytes consumed per round - *olen += rounds * 16; // 16 bytes produced per round - - // Number of times to go through the 36x loop. - size_t loops = rounds / 36; - - // Number of rounds remaining after the 36x loop. - rounds %= 36; - - // Lookup tables. - const __m128i lut0 = _mm_set_epi8( - 10, 11, 9, 10, 7, 8, 6, 7, 4, 5, 3, 4, 1, 2, 0, 1); - - const __m128i lut1 = _mm_setr_epi8( - 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0); - - // Temporary registers. - __m128i a, b, c, d, e, f; - - __asm__ volatile ( - - // If there are 36 rounds or more, enter a 36x unrolled loop of - // interleaved encoding rounds. The rounds interleave memory - // operations (load/store) with data operations (table lookups, - // etc) to maximize pipeline throughput. - " test %[loops], %[loops] \n\t" - " jz 18f \n\t" - " jmp 36f \n\t" - " \n\t" - ".balign 64 \n\t" - "36: " ROUND_3_INIT() - " " ROUND_3_A( 0) - " " ROUND_3_B( 3) - " " ROUND_3_A( 6) - " " ROUND_3_B( 9) - " " ROUND_3_A(12) - " " ROUND_3_B(15) - " " ROUND_3_A(18) - " " ROUND_3_B(21) - " " ROUND_3_A(24) - " " ROUND_3_B(27) - " " ROUND_3_A_LAST(30) - " add $(12 * 36), %[src] \n\t" - " add $(16 * 36), %[dst] \n\t" - " dec %[loops] \n\t" - " jnz 36b \n\t" - - // Enter an 18x unrolled loop for rounds of 18 or more. - "18: cmp $18, %[rounds] \n\t" - " jl 9f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A(0) - " " ROUND_3_B(3) - " " ROUND_3_A(6) - " " ROUND_3_B(9) - " " ROUND_3_A_LAST(12) - " sub $18, %[rounds] \n\t" - " add $(12 * 18), %[src] \n\t" - " add $(16 * 18), %[dst] \n\t" - - // Enter a 9x unrolled loop for rounds of 9 or more. - "9: cmp $9, %[rounds] \n\t" - " jl 6f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A(0) - " " ROUND_3_B_LAST(3) - " sub $9, %[rounds] \n\t" - " add $(12 * 9), %[src] \n\t" - " add $(16 * 9), %[dst] \n\t" - - // Enter a 6x unrolled loop for rounds of 6 or more. - "6: cmp $6, %[rounds] \n\t" - " jl 55f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A_LAST(0) - " sub $6, %[rounds] \n\t" - " add $(12 * 6), %[src] \n\t" - " add $(16 * 6), %[dst] \n\t" - - // Dispatch the remaining rounds 0..5. - "55: cmp $3, %[rounds] \n\t" - " jg 45f \n\t" - " je 3f \n\t" - " cmp $1, %[rounds] \n\t" - " jg 2f \n\t" - " je 1f \n\t" - " jmp 0f \n\t" - - "45: cmp $4, %[rounds] \n\t" - " je 4f \n\t" - - // Block of non-interlaced encoding rounds, which can each - // individually be jumped to. Rounds fall through to the next. - "5: " ROUND() - "4: " ROUND() - "3: " ROUND() - "2: " ROUND() - "1: " ROUND() - "0: \n\t" - - // Outputs (modified). - : [rounds] "+r" (rounds), - [loops] "+r" (loops), - [src] "+r" (*s), - [dst] "+r" (*o), - [a] "=&x" (a), - [b] "=&x" (b), - [c] "=&x" (c), - [d] "=&x" (d), - [e] "=&x" (e), - [f] "=&x" (f) - - // Inputs (not modified). - : [lut0] "x" (lut0), - [lut1] "x" (lut1), - [msk0] "x" (_mm_set1_epi32(0x0FC0FC00)), - [msk1] "x" (_mm_set1_epi32(0x04000040)), - [msk2] "x" (_mm_set1_epi32(0x003F03F0)), - [msk3] "x" (_mm_set1_epi32(0x01000010)), - [n51] "x" (_mm_set1_epi8(51)), - [n25] "x" (_mm_set1_epi8(25)) - - // Clobbers. - : "cc", "memory" - ); -} - -#pragma GCC diagnostic pop diff --git a/deps/base64/base64/lib/arch/avx2/codec.c b/deps/base64/base64/lib/arch/avx2/codec.c deleted file mode 100644 index 8a2aa4a6071500..00000000000000 --- a/deps/base64/base64/lib/arch/avx2/codec.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <stdlib.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#if HAVE_AVX2 -#include <immintrin.h> - -// Only enable inline assembly on supported compilers and on 64-bit CPUs. -#ifndef BASE64_AVX2_USE_ASM -# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 -# define BASE64_AVX2_USE_ASM 1 -# else -# define BASE64_AVX2_USE_ASM 0 -# endif -#endif - -#include "dec_reshuffle.c" -#include "dec_loop.c" - -#if BASE64_AVX2_USE_ASM -# include "enc_loop_asm.c" -#else -# include "enc_translate.c" -# include "enc_reshuffle.c" -# include "enc_loop.c" -#endif - -#endif // HAVE_AVX2 - -BASE64_ENC_FUNCTION(avx2) -{ -#if HAVE_AVX2 - #include "../generic/enc_head.c" - enc_loop_avx2(&s, &slen, &o, &olen); - #include "../generic/enc_tail.c" -#else - BASE64_ENC_STUB -#endif -} - -BASE64_DEC_FUNCTION(avx2) -{ -#if HAVE_AVX2 - #include "../generic/dec_head.c" - dec_loop_avx2(&s, &slen, &o, &olen); - #include "../generic/dec_tail.c" -#else - BASE64_DEC_STUB -#endif -} diff --git a/deps/base64/base64/lib/arch/avx2/dec_loop.c b/deps/base64/base64/lib/arch/avx2/dec_loop.c deleted file mode 100644 index f959fc4ba2be7e..00000000000000 --- a/deps/base64/base64/lib/arch/avx2/dec_loop.c +++ /dev/null @@ -1,110 +0,0 @@ -static inline int -dec_loop_avx2_inner (const uint8_t **s, uint8_t **o, size_t *rounds) -{ - const __m256i lut_lo = _mm256_setr_epi8( - 0x15, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, - 0x11, 0x11, 0x13, 0x1A, 0x1B, 0x1B, 0x1B, 0x1A, - 0x15, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, - 0x11, 0x11, 0x13, 0x1A, 0x1B, 0x1B, 0x1B, 0x1A); - - const __m256i lut_hi = _mm256_setr_epi8( - 0x10, 0x10, 0x01, 0x02, 0x04, 0x08, 0x04, 0x08, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x01, 0x02, 0x04, 0x08, 0x04, 0x08, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10); - - const __m256i lut_roll = _mm256_setr_epi8( - 0, 16, 19, 4, -65, -65, -71, -71, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 16, 19, 4, -65, -65, -71, -71, - 0, 0, 0, 0, 0, 0, 0, 0); - - const __m256i mask_2F = _mm256_set1_epi8(0x2F); - - // Load input: - __m256i str = _mm256_loadu_si256((__m256i *) *s); - - // See the SSSE3 decoder for an explanation of the algorithm. - const __m256i hi_nibbles = _mm256_and_si256(_mm256_srli_epi32(str, 4), mask_2F); - const __m256i lo_nibbles = _mm256_and_si256(str, mask_2F); - const __m256i hi = _mm256_shuffle_epi8(lut_hi, hi_nibbles); - const __m256i lo = _mm256_shuffle_epi8(lut_lo, lo_nibbles); - - if (!_mm256_testz_si256(lo, hi)) { - return 0; - } - - const __m256i eq_2F = _mm256_cmpeq_epi8(str, mask_2F); - const __m256i roll = _mm256_shuffle_epi8(lut_roll, _mm256_add_epi8(eq_2F, hi_nibbles)); - - // Now simply add the delta values to the input: - str = _mm256_add_epi8(str, roll); - - // Reshuffle the input to packed 12-byte output format: - str = dec_reshuffle(str); - - // Store the output: - _mm256_storeu_si256((__m256i *) *o, str); - - *s += 32; - *o += 24; - *rounds -= 1; - - return 1; -} - -static inline void -dec_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 45) { - return; - } - - // Process blocks of 32 bytes per round. Because 8 extra zero bytes are - // written after the output, ensure that there will be at least 13 - // bytes of input data left to cover the gap. (11 data bytes and up to - // two end-of-string markers.) - size_t rounds = (*slen - 13) / 32; - - *slen -= rounds * 32; // 32 bytes consumed per round - *olen += rounds * 24; // 24 bytes produced per round - - do { - if (rounds >= 8) { - if (dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds)) { - continue; - } - break; - } - if (rounds >= 4) { - if (dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds)) { - continue; - } - break; - } - if (rounds >= 2) { - if (dec_loop_avx2_inner(s, o, &rounds) && - dec_loop_avx2_inner(s, o, &rounds)) { - continue; - } - break; - } - dec_loop_avx2_inner(s, o, &rounds); - break; - - } while (rounds > 0); - - // Adjust for any rounds that were skipped: - *slen += rounds * 32; - *olen -= rounds * 24; -} diff --git a/deps/base64/base64/lib/arch/avx2/dec_reshuffle.c b/deps/base64/base64/lib/arch/avx2/dec_reshuffle.c deleted file mode 100644 index f3518098191ca4..00000000000000 --- a/deps/base64/base64/lib/arch/avx2/dec_reshuffle.c +++ /dev/null @@ -1,34 +0,0 @@ -static inline __m256i -dec_reshuffle (const __m256i in) -{ - // in, lower lane, bits, upper case are most significant bits, lower - // case are least significant bits: - // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ - // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG - // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD - // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA - - const __m256i merge_ab_and_bc = _mm256_maddubs_epi16(in, _mm256_set1_epi32(0x01400140)); - // 0000kkkk LLllllll 0000JJJJ JJjjKKKK - // 0000hhhh IIiiiiii 0000GGGG GGggHHHH - // 0000eeee FFffffff 0000DDDD DDddEEEE - // 0000bbbb CCcccccc 0000AAAA AAaaBBBB - - __m256i out = _mm256_madd_epi16(merge_ab_and_bc, _mm256_set1_epi32(0x00011000)); - // 00000000 JJJJJJjj KKKKkkkk LLllllll - // 00000000 GGGGGGgg HHHHhhhh IIiiiiii - // 00000000 DDDDDDdd EEEEeeee FFffffff - // 00000000 AAAAAAaa BBBBbbbb CCcccccc - - // Pack bytes together in each lane: - out = _mm256_shuffle_epi8(out, _mm256_setr_epi8( - 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1, - 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1)); - // 00000000 00000000 00000000 00000000 - // LLllllll KKKKkkkk JJJJJJjj IIiiiiii - // HHHHhhhh GGGGGGgg FFffffff EEEEeeee - // DDDDDDdd CCcccccc BBBBbbbb AAAAAAaa - - // Pack lanes: - return _mm256_permutevar8x32_epi32(out, _mm256_setr_epi32(0, 1, 2, 4, 5, 6, -1, -1)); -} diff --git a/deps/base64/base64/lib/arch/avx2/enc_loop.c b/deps/base64/base64/lib/arch/avx2/enc_loop.c deleted file mode 100644 index b9e2736fc828bd..00000000000000 --- a/deps/base64/base64/lib/arch/avx2/enc_loop.c +++ /dev/null @@ -1,89 +0,0 @@ -static inline void -enc_loop_avx2_inner_first (const uint8_t **s, uint8_t **o) -{ - // First load is done at s - 0 to not get a segfault: - __m256i src = _mm256_loadu_si256((__m256i *) *s); - - // Shift by 4 bytes, as required by enc_reshuffle: - src = _mm256_permutevar8x32_epi32(src, _mm256_setr_epi32(0, 0, 1, 2, 3, 4, 5, 6)); - - // Reshuffle, translate, store: - src = enc_reshuffle(src); - src = enc_translate(src); - _mm256_storeu_si256((__m256i *) *o, src); - - // Subsequent loads will be done at s - 4, set pointer for next round: - *s += 20; - *o += 32; -} - -static inline void -enc_loop_avx2_inner (const uint8_t **s, uint8_t **o) -{ - // Load input: - __m256i src = _mm256_loadu_si256((__m256i *) *s); - - // Reshuffle, translate, store: - src = enc_reshuffle(src); - src = enc_translate(src); - _mm256_storeu_si256((__m256i *) *o, src); - - *s += 24; - *o += 32; -} - -static inline void -enc_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 32) { - return; - } - - // Process blocks of 24 bytes at a time. Because blocks are loaded 32 - // bytes at a time an offset of -4, ensure that there will be at least - // 4 remaining bytes after the last round, so that the final read will - // not pass beyond the bounds of the input buffer: - size_t rounds = (*slen - 4) / 24; - - *slen -= rounds * 24; // 24 bytes consumed per round - *olen += rounds * 32; // 32 bytes produced per round - - // The first loop iteration requires special handling to ensure that - // the read, which is done at an offset, does not underflow the buffer: - enc_loop_avx2_inner_first(s, o); - rounds--; - - while (rounds > 0) { - if (rounds >= 8) { - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - rounds -= 8; - continue; - } - if (rounds >= 4) { - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - rounds -= 4; - continue; - } - if (rounds >= 2) { - enc_loop_avx2_inner(s, o); - enc_loop_avx2_inner(s, o); - rounds -= 2; - continue; - } - enc_loop_avx2_inner(s, o); - break; - } - - // Add the offset back: - *s += 4; -} diff --git a/deps/base64/base64/lib/arch/avx2/enc_loop_asm.c b/deps/base64/base64/lib/arch/avx2/enc_loop_asm.c deleted file mode 100644 index eb775a1d1f03d0..00000000000000 --- a/deps/base64/base64/lib/arch/avx2/enc_loop_asm.c +++ /dev/null @@ -1,291 +0,0 @@ -// Apologies in advance for combining the preprocessor with inline assembly, -// two notoriously gnarly parts of C, but it was necessary to avoid a lot of -// code repetition. The preprocessor is used to template large sections of -// inline assembly that differ only in the registers used. If the code was -// written out by hand, it would become very large and hard to audit. - -// Generate a block of inline assembly that loads register R0 from memory. The -// offset at which the register is loaded is set by the given round and a -// constant offset. -#define LOAD(R0, ROUND, OFFSET) \ - "vlddqu ("#ROUND" * 24 + "#OFFSET")(%[src]), %["R0"] \n\t" - -// Generate a block of inline assembly that deinterleaves and shuffles register -// R0 using preloaded constants. Outputs in R0 and R1. -#define SHUF(R0, R1, R2) \ - "vpshufb %[lut0], %["R0"], %["R1"] \n\t" \ - "vpand %["R1"], %[msk0], %["R2"] \n\t" \ - "vpand %["R1"], %[msk2], %["R1"] \n\t" \ - "vpmulhuw %["R2"], %[msk1], %["R2"] \n\t" \ - "vpmullw %["R1"], %[msk3], %["R1"] \n\t" \ - "vpor %["R1"], %["R2"], %["R1"] \n\t" - -// Generate a block of inline assembly that takes R0 and R1 and translates -// their contents to the base64 alphabet, using preloaded constants. -#define TRAN(R0, R1, R2) \ - "vpsubusb %[n51], %["R1"], %["R0"] \n\t" \ - "vpcmpgtb %[n25], %["R1"], %["R2"] \n\t" \ - "vpsubb %["R2"], %["R0"], %["R0"] \n\t" \ - "vpshufb %["R0"], %[lut1], %["R2"] \n\t" \ - "vpaddb %["R1"], %["R2"], %["R0"] \n\t" - -// Generate a block of inline assembly that stores the given register R0 at an -// offset set by the given round. -#define STOR(R0, ROUND) \ - "vmovdqu %["R0"], ("#ROUND" * 32)(%[dst]) \n\t" - -// Generate a block of inline assembly that generates a single self-contained -// encoder round: fetch the data, process it, and store the result. Then update -// the source and destination pointers. -#define ROUND() \ - LOAD("a", 0, -4) \ - SHUF("a", "b", "c") \ - TRAN("a", "b", "c") \ - STOR("a", 0) \ - "add $24, %[src] \n\t" \ - "add $32, %[dst] \n\t" - -// Define a macro that initiates a three-way interleaved encoding round by -// preloading registers a, b and c from memory. -// The register graph shows which registers are in use during each step, and -// is a visual aid for choosing registers for that step. Symbol index: -// -// + indicates that a register is loaded by that step. -// | indicates that a register is in use and must not be touched. -// - indicates that a register is decommissioned by that step. -// x indicates that a register is used as a temporary by that step. -// V indicates that a register is an input or output to the macro. -// -#define ROUND_3_INIT() /* a b c d e f */ \ - LOAD("a", 0, -4) /* + */ \ - SHUF("a", "d", "e") /* | + x */ \ - LOAD("b", 1, -4) /* | + | */ \ - TRAN("a", "d", "e") /* | | - x */ \ - LOAD("c", 2, -4) /* V V V */ - -// Define a macro that translates, shuffles and stores the input registers A, B -// and C, and preloads registers D, E and F for the next round. -// This macro can be arbitrarily daisy-chained by feeding output registers D, E -// and F back into the next round as input registers A, B and C. The macro -// carefully interleaves memory operations with data operations for optimal -// pipelined performance. - -#define ROUND_3(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ - LOAD(D, (ROUND + 3), -4) /* V V V + */ \ - SHUF(B, E, F) /* | | | | + x */ \ - STOR(A, (ROUND + 0)) /* - | | | | */ \ - TRAN(B, E, F) /* | | | - x */ \ - LOAD(E, (ROUND + 4), -4) /* | | | + */ \ - SHUF(C, A, F) /* + | | | | x */ \ - STOR(B, (ROUND + 1)) /* | - | | | */ \ - TRAN(C, A, F) /* - | | | x */ \ - LOAD(F, (ROUND + 5), -4) /* | | | + */ \ - SHUF(D, A, B) /* + x | | | | */ \ - STOR(C, (ROUND + 2)) /* | - | | | */ \ - TRAN(D, A, B) /* - x V V V */ - -// Define a macro that terminates a ROUND_3 macro by taking pre-loaded -// registers D, E and F, and translating, shuffling and storing them. -#define ROUND_3_END(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ - SHUF(E, A, B) /* + x V V V */ \ - STOR(D, (ROUND + 3)) /* | - | | */ \ - TRAN(E, A, B) /* - x | | */ \ - SHUF(F, C, D) /* + x | | */ \ - STOR(E, (ROUND + 4)) /* | - | */ \ - TRAN(F, C, D) /* - x | */ \ - STOR(F, (ROUND + 5)) /* - */ - -// Define a type A round. Inputs are a, b, and c, outputs are d, e, and f. -#define ROUND_3_A(ROUND) \ - ROUND_3(ROUND, "a", "b", "c", "d", "e", "f") - -// Define a type B round. Inputs and outputs are swapped with regard to type A. -#define ROUND_3_B(ROUND) \ - ROUND_3(ROUND, "d", "e", "f", "a", "b", "c") - -// Terminating macro for a type A round. -#define ROUND_3_A_LAST(ROUND) \ - ROUND_3_A(ROUND) \ - ROUND_3_END(ROUND, "a", "b", "c", "d", "e", "f") - -// Terminating macro for a type B round. -#define ROUND_3_B_LAST(ROUND) \ - ROUND_3_B(ROUND) \ - ROUND_3_END(ROUND, "d", "e", "f", "a", "b", "c") - -// Suppress clang's warning that the literal string in the asm statement is -// overlong (longer than the ISO-mandated minimum size of 4095 bytes for C99 -// compilers). It may be true, but the goal here is not C99 portability. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Woverlength-strings" - -static inline void -enc_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - // For a clearer explanation of the algorithm used by this function, - // please refer to the plain (not inline assembly) implementation. This - // function follows the same basic logic. - - if (*slen < 32) { - return; - } - - // Process blocks of 24 bytes at a time. Because blocks are loaded 32 - // bytes at a time an offset of -4, ensure that there will be at least - // 4 remaining bytes after the last round, so that the final read will - // not pass beyond the bounds of the input buffer. - size_t rounds = (*slen - 4) / 24; - - *slen -= rounds * 24; // 24 bytes consumed per round - *olen += rounds * 32; // 32 bytes produced per round - - // Pre-decrement the number of rounds to get the number of rounds - // *after* the first round, which is handled as a special case. - rounds--; - - // Number of times to go through the 36x loop. - size_t loops = rounds / 36; - - // Number of rounds remaining after the 36x loop. - rounds %= 36; - - // Lookup tables. - const __m256i lut0 = _mm256_set_epi8( - 10, 11, 9, 10, 7, 8, 6, 7, 4, 5, 3, 4, 1, 2, 0, 1, - 14, 15, 13, 14, 11, 12, 10, 11, 8, 9, 7, 8, 5, 6, 4, 5); - - const __m256i lut1 = _mm256_setr_epi8( - 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0, - 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0); - - // Temporary registers. - __m256i a, b, c, d, e; - - // Temporary register f doubles as the shift mask for the first round. - __m256i f = _mm256_setr_epi32(0, 0, 1, 2, 3, 4, 5, 6); - - __asm__ volatile ( - - // The first loop iteration requires special handling to ensure - // that the read, which is normally done at an offset of -4, - // does not underflow the buffer. Load the buffer at an offset - // of 0 and permute the input to achieve the same effect. - LOAD("a", 0, 0) - "vpermd %[a], %[f], %[a] \n\t" - - // Perform the standard shuffling and translation steps. - SHUF("a", "b", "c") - TRAN("a", "b", "c") - - // Store the result and increment the source and dest pointers. - "vmovdqu %[a], (%[dst]) \n\t" - "add $24, %[src] \n\t" - "add $32, %[dst] \n\t" - - // If there are 36 rounds or more, enter a 36x unrolled loop of - // interleaved encoding rounds. The rounds interleave memory - // operations (load/store) with data operations (table lookups, - // etc) to maximize pipeline throughput. - " test %[loops], %[loops] \n\t" - " jz 18f \n\t" - " jmp 36f \n\t" - " \n\t" - ".balign 64 \n\t" - "36: " ROUND_3_INIT() - " " ROUND_3_A( 0) - " " ROUND_3_B( 3) - " " ROUND_3_A( 6) - " " ROUND_3_B( 9) - " " ROUND_3_A(12) - " " ROUND_3_B(15) - " " ROUND_3_A(18) - " " ROUND_3_B(21) - " " ROUND_3_A(24) - " " ROUND_3_B(27) - " " ROUND_3_A_LAST(30) - " add $(24 * 36), %[src] \n\t" - " add $(32 * 36), %[dst] \n\t" - " dec %[loops] \n\t" - " jnz 36b \n\t" - - // Enter an 18x unrolled loop for rounds of 18 or more. - "18: cmp $18, %[rounds] \n\t" - " jl 9f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A(0) - " " ROUND_3_B(3) - " " ROUND_3_A(6) - " " ROUND_3_B(9) - " " ROUND_3_A_LAST(12) - " sub $18, %[rounds] \n\t" - " add $(24 * 18), %[src] \n\t" - " add $(32 * 18), %[dst] \n\t" - - // Enter a 9x unrolled loop for rounds of 9 or more. - "9: cmp $9, %[rounds] \n\t" - " jl 6f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A(0) - " " ROUND_3_B_LAST(3) - " sub $9, %[rounds] \n\t" - " add $(24 * 9), %[src] \n\t" - " add $(32 * 9), %[dst] \n\t" - - // Enter a 6x unrolled loop for rounds of 6 or more. - "6: cmp $6, %[rounds] \n\t" - " jl 55f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A_LAST(0) - " sub $6, %[rounds] \n\t" - " add $(24 * 6), %[src] \n\t" - " add $(32 * 6), %[dst] \n\t" - - // Dispatch the remaining rounds 0..5. - "55: cmp $3, %[rounds] \n\t" - " jg 45f \n\t" - " je 3f \n\t" - " cmp $1, %[rounds] \n\t" - " jg 2f \n\t" - " je 1f \n\t" - " jmp 0f \n\t" - - "45: cmp $4, %[rounds] \n\t" - " je 4f \n\t" - - // Block of non-interlaced encoding rounds, which can each - // individually be jumped to. Rounds fall through to the next. - "5: " ROUND() - "4: " ROUND() - "3: " ROUND() - "2: " ROUND() - "1: " ROUND() - "0: \n\t" - - // Outputs (modified). - : [rounds] "+r" (rounds), - [loops] "+r" (loops), - [src] "+r" (*s), - [dst] "+r" (*o), - [a] "=&x" (a), - [b] "=&x" (b), - [c] "=&x" (c), - [d] "=&x" (d), - [e] "=&x" (e), - [f] "+x" (f) - - // Inputs (not modified). - : [lut0] "x" (lut0), - [lut1] "x" (lut1), - [msk0] "x" (_mm256_set1_epi32(0x0FC0FC00)), - [msk1] "x" (_mm256_set1_epi32(0x04000040)), - [msk2] "x" (_mm256_set1_epi32(0x003F03F0)), - [msk3] "x" (_mm256_set1_epi32(0x01000010)), - [n51] "x" (_mm256_set1_epi8(51)), - [n25] "x" (_mm256_set1_epi8(25)) - - // Clobbers. - : "cc", "memory" - ); -} - -#pragma GCC diagnostic pop diff --git a/deps/base64/base64/lib/arch/avx2/enc_reshuffle.c b/deps/base64/base64/lib/arch/avx2/enc_reshuffle.c deleted file mode 100644 index ba166903e9e153..00000000000000 --- a/deps/base64/base64/lib/arch/avx2/enc_reshuffle.c +++ /dev/null @@ -1,83 +0,0 @@ -static inline __m256i -enc_reshuffle (const __m256i input) -{ - // Translation of the SSSE3 reshuffling algorithm to AVX2. This one - // works with shifted (4 bytes) input in order to be able to work - // efficiently in the two 128-bit lanes. - - // Input, bytes MSB to LSB: - // 0 0 0 0 x w v u t s r q p o n m - // l k j i h g f e d c b a 0 0 0 0 - - const __m256i in = _mm256_shuffle_epi8(input, _mm256_set_epi8( - 10, 11, 9, 10, - 7, 8, 6, 7, - 4, 5, 3, 4, - 1, 2, 0, 1, - - 14, 15, 13, 14, - 11, 12, 10, 11, - 8, 9, 7, 8, - 5, 6, 4, 5)); - // in, bytes MSB to LSB: - // w x v w - // t u s t - // q r p q - // n o m n - // k l j k - // h i g h - // e f d e - // b c a b - - const __m256i t0 = _mm256_and_si256(in, _mm256_set1_epi32(0x0FC0FC00)); - // bits, upper case are most significant bits, lower case are least - // significant bits. - // 0000wwww XX000000 VVVVVV00 00000000 - // 0000tttt UU000000 SSSSSS00 00000000 - // 0000qqqq RR000000 PPPPPP00 00000000 - // 0000nnnn OO000000 MMMMMM00 00000000 - // 0000kkkk LL000000 JJJJJJ00 00000000 - // 0000hhhh II000000 GGGGGG00 00000000 - // 0000eeee FF000000 DDDDDD00 00000000 - // 0000bbbb CC000000 AAAAAA00 00000000 - - const __m256i t1 = _mm256_mulhi_epu16(t0, _mm256_set1_epi32(0x04000040)); - // 00000000 00wwwwXX 00000000 00VVVVVV - // 00000000 00ttttUU 00000000 00SSSSSS - // 00000000 00qqqqRR 00000000 00PPPPPP - // 00000000 00nnnnOO 00000000 00MMMMMM - // 00000000 00kkkkLL 00000000 00JJJJJJ - // 00000000 00hhhhII 00000000 00GGGGGG - // 00000000 00eeeeFF 00000000 00DDDDDD - // 00000000 00bbbbCC 00000000 00AAAAAA - - const __m256i t2 = _mm256_and_si256(in, _mm256_set1_epi32(0x003F03F0)); - // 00000000 00xxxxxx 000000vv WWWW0000 - // 00000000 00uuuuuu 000000ss TTTT0000 - // 00000000 00rrrrrr 000000pp QQQQ0000 - // 00000000 00oooooo 000000mm NNNN0000 - // 00000000 00llllll 000000jj KKKK0000 - // 00000000 00iiiiii 000000gg HHHH0000 - // 00000000 00ffffff 000000dd EEEE0000 - // 00000000 00cccccc 000000aa BBBB0000 - - const __m256i t3 = _mm256_mullo_epi16(t2, _mm256_set1_epi32(0x01000010)); - // 00xxxxxx 00000000 00vvWWWW 00000000 - // 00uuuuuu 00000000 00ssTTTT 00000000 - // 00rrrrrr 00000000 00ppQQQQ 00000000 - // 00oooooo 00000000 00mmNNNN 00000000 - // 00llllll 00000000 00jjKKKK 00000000 - // 00iiiiii 00000000 00ggHHHH 00000000 - // 00ffffff 00000000 00ddEEEE 00000000 - // 00cccccc 00000000 00aaBBBB 00000000 - - return _mm256_or_si256(t1, t3); - // 00xxxxxx 00wwwwXX 00vvWWWW 00VVVVVV - // 00uuuuuu 00ttttUU 00ssTTTT 00SSSSSS - // 00rrrrrr 00qqqqRR 00ppQQQQ 00PPPPPP - // 00oooooo 00nnnnOO 00mmNNNN 00MMMMMM - // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ - // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG - // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD - // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA -} diff --git a/deps/base64/base64/lib/arch/avx2/enc_translate.c b/deps/base64/base64/lib/arch/avx2/enc_translate.c deleted file mode 100644 index 46173cd1f0cbf1..00000000000000 --- a/deps/base64/base64/lib/arch/avx2/enc_translate.c +++ /dev/null @@ -1,30 +0,0 @@ -static inline __m256i -enc_translate (const __m256i in) -{ - // A lookup table containing the absolute offsets for all ranges: - const __m256i lut = _mm256_setr_epi8( - 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0, - 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0); - - // Translate values 0..63 to the Base64 alphabet. There are five sets: - // # From To Abs Index Characters - // 0 [0..25] [65..90] +65 0 ABCDEFGHIJKLMNOPQRSTUVWXYZ - // 1 [26..51] [97..122] +71 1 abcdefghijklmnopqrstuvwxyz - // 2 [52..61] [48..57] -4 [2..11] 0123456789 - // 3 [62] [43] -19 12 + - // 4 [63] [47] -16 13 / - - // Create LUT indices from the input. The index for range #0 is right, - // others are 1 less than expected: - __m256i indices = _mm256_subs_epu8(in, _mm256_set1_epi8(51)); - - // mask is 0xFF (-1) for range #[1..4] and 0x00 for range #0: - const __m256i mask = _mm256_cmpgt_epi8(in, _mm256_set1_epi8(25)); - - // Subtract -1, so add 1 to indices for range #[1..4]. All indices are - // now correct: - indices = _mm256_sub_epi8(indices, mask); - - // Add offsets to input values: - return _mm256_add_epi8(in, _mm256_shuffle_epi8(lut, indices)); -} diff --git a/deps/base64/base64/lib/arch/avx512/codec.c b/deps/base64/base64/lib/arch/avx512/codec.c deleted file mode 100644 index 664120853d4316..00000000000000 --- a/deps/base64/base64/lib/arch/avx512/codec.c +++ /dev/null @@ -1,42 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <stdlib.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#if HAVE_AVX512 -#include <immintrin.h> - -#include "../avx2/dec_reshuffle.c" -#include "../avx2/dec_loop.c" -#include "enc_reshuffle_translate.c" -#include "enc_loop.c" - -#endif // HAVE_AVX512 - -BASE64_ENC_FUNCTION(avx512) -{ -#if HAVE_AVX512 - #include "../generic/enc_head.c" - enc_loop_avx512(&s, &slen, &o, &olen); - #include "../generic/enc_tail.c" -#else - BASE64_ENC_STUB -#endif -} - -// Reuse AVX2 decoding. Not supporting AVX512 at present -BASE64_DEC_FUNCTION(avx512) -{ -#if HAVE_AVX512 - #include "../generic/dec_head.c" - dec_loop_avx2(&s, &slen, &o, &olen); - #include "../generic/dec_tail.c" -#else - BASE64_DEC_STUB -#endif -} diff --git a/deps/base64/base64/lib/arch/avx512/enc_loop.c b/deps/base64/base64/lib/arch/avx512/enc_loop.c deleted file mode 100644 index 4c71e160ae820a..00000000000000 --- a/deps/base64/base64/lib/arch/avx512/enc_loop.c +++ /dev/null @@ -1,61 +0,0 @@ -static inline void -enc_loop_avx512_inner (const uint8_t **s, uint8_t **o) -{ - // Load input. - __m512i src = _mm512_loadu_si512((__m512i *) *s); - - // Reshuffle, translate, store. - src = enc_reshuffle_translate(src); - _mm512_storeu_si512((__m512i *) *o, src); - - *s += 48; - *o += 64; -} - -static inline void -enc_loop_avx512 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 64) { - return; - } - - // Process blocks of 48 bytes at a time. Because blocks are loaded 64 - // bytes at a time, ensure that there will be at least 24 remaining - // bytes after the last round, so that the final read will not pass - // beyond the bounds of the input buffer. - size_t rounds = (*slen - 24) / 48; - - *slen -= rounds * 48; // 48 bytes consumed per round - *olen += rounds * 64; // 64 bytes produced per round - - while (rounds > 0) { - if (rounds >= 8) { - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - rounds -= 8; - continue; - } - if (rounds >= 4) { - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - rounds -= 4; - continue; - } - if (rounds >= 2) { - enc_loop_avx512_inner(s, o); - enc_loop_avx512_inner(s, o); - rounds -= 2; - continue; - } - enc_loop_avx512_inner(s, o); - break; - } -} diff --git a/deps/base64/base64/lib/arch/avx512/enc_reshuffle_translate.c b/deps/base64/base64/lib/arch/avx512/enc_reshuffle_translate.c deleted file mode 100644 index 5c332bb24ca4e3..00000000000000 --- a/deps/base64/base64/lib/arch/avx512/enc_reshuffle_translate.c +++ /dev/null @@ -1,50 +0,0 @@ -// AVX512 algorithm is based on permutevar and multishift. The code is based on -// https://github.com/WojciechMula/base64simd which is under BSD-2 license. - -static inline __m512i -enc_reshuffle_translate (const __m512i input) -{ - // 32-bit input - // [ 0 0 0 0 0 0 0 0|c1 c0 d5 d4 d3 d2 d1 d0| - // b3 b2 b1 b0 c5 c4 c3 c2|a5 a4 a3 a2 a1 a0 b5 b4] - // output order [1, 2, 0, 1] - // [b3 b2 b1 b0 c5 c4 c3 c2|c1 c0 d5 d4 d3 d2 d1 d0| - // a5 a4 a3 a2 a1 a0 b5 b4|b3 b2 b1 b0 c3 c2 c1 c0] - - const __m512i shuffle_input = _mm512_setr_epi32(0x01020001, - 0x04050304, - 0x07080607, - 0x0a0b090a, - 0x0d0e0c0d, - 0x10110f10, - 0x13141213, - 0x16171516, - 0x191a1819, - 0x1c1d1b1c, - 0x1f201e1f, - 0x22232122, - 0x25262425, - 0x28292728, - 0x2b2c2a2b, - 0x2e2f2d2e); - - // Reorder bytes - // [b3 b2 b1 b0 c5 c4 c3 c2|c1 c0 d5 d4 d3 d2 d1 d0| - // a5 a4 a3 a2 a1 a0 b5 b4|b3 b2 b1 b0 c3 c2 c1 c0] - const __m512i in = _mm512_permutexvar_epi8(shuffle_input, input); - - // After multishift a single 32-bit lane has following layout - // [c1 c0 d5 d4 d3 d2 d1 d0|b1 b0 c5 c4 c3 c2 c1 c0| - // a1 a0 b5 b4 b3 b2 b1 b0|d1 d0 a5 a4 a3 a2 a1 a0] - // (a = [10:17], b = [4:11], c = [22:27], d = [16:21]) - - // 48, 54, 36, 42, 16, 22, 4, 10 - const __m512i shifts = _mm512_set1_epi64(0x3036242a1016040alu); - __m512i shuffled_in = _mm512_multishift_epi64_epi8(shifts, in); - - // Translate immediatedly after reshuffled. - const __m512i lookup = _mm512_loadu_si512(base64_table_enc_6bit); - - // Translation 6-bit values to ASCII. - return _mm512_permutexvar_epi8(shuffled_in, lookup); -} diff --git a/deps/base64/base64/lib/arch/generic/32/dec_loop.c b/deps/base64/base64/lib/arch/generic/32/dec_loop.c deleted file mode 100644 index 8a8260f25e47fc..00000000000000 --- a/deps/base64/base64/lib/arch/generic/32/dec_loop.c +++ /dev/null @@ -1,86 +0,0 @@ -static inline int -dec_loop_generic_32_inner (const uint8_t **s, uint8_t **o, size_t *rounds) -{ - const uint32_t str - = base64_table_dec_32bit_d0[(*s)[0]] - | base64_table_dec_32bit_d1[(*s)[1]] - | base64_table_dec_32bit_d2[(*s)[2]] - | base64_table_dec_32bit_d3[(*s)[3]]; - -#if BASE64_LITTLE_ENDIAN - - // LUTs for little-endian set MSB in case of invalid character: - if (str & UINT32_C(0x80000000)) { - return 0; - } -#else - // LUTs for big-endian set LSB in case of invalid character: - if (str & UINT32_C(1)) { - return 0; - } -#endif - // Store the output: - memcpy(*o, &str, sizeof (str)); - - *s += 4; - *o += 3; - *rounds -= 1; - - return 1; -} - -static inline void -dec_loop_generic_32 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 8) { - return; - } - - // Process blocks of 4 bytes per round. Because one extra zero byte is - // written after the output, ensure that there will be at least 4 bytes - // of input data left to cover the gap. (Two data bytes and up to two - // end-of-string markers.) - size_t rounds = (*slen - 4) / 4; - - *slen -= rounds * 4; // 4 bytes consumed per round - *olen += rounds * 3; // 3 bytes produced per round - - do { - if (rounds >= 8) { - if (dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds)) { - continue; - } - break; - } - if (rounds >= 4) { - if (dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds)) { - continue; - } - break; - } - if (rounds >= 2) { - if (dec_loop_generic_32_inner(s, o, &rounds) && - dec_loop_generic_32_inner(s, o, &rounds)) { - continue; - } - break; - } - dec_loop_generic_32_inner(s, o, &rounds); - break; - - } while (rounds > 0); - - // Adjust for any rounds that were skipped: - *slen += rounds * 4; - *olen -= rounds * 3; -} diff --git a/deps/base64/base64/lib/arch/generic/32/enc_loop.c b/deps/base64/base64/lib/arch/generic/32/enc_loop.c deleted file mode 100644 index f4870a75dc75e0..00000000000000 --- a/deps/base64/base64/lib/arch/generic/32/enc_loop.c +++ /dev/null @@ -1,73 +0,0 @@ -static inline void -enc_loop_generic_32_inner (const uint8_t **s, uint8_t **o) -{ - uint32_t src; - - // Load input: - memcpy(&src, *s, sizeof (src)); - - // Reorder to 32-bit big-endian, if not already in that format. The - // workset must be in big-endian, otherwise the shifted bits do not - // carry over properly among adjacent bytes: - src = BASE64_HTOBE32(src); - - // Two indices for the 12-bit lookup table: - const size_t index0 = (src >> 20) & 0xFFFU; - const size_t index1 = (src >> 8) & 0xFFFU; - - // Table lookup and store: - memcpy(*o + 0, base64_table_enc_12bit + index0, 2); - memcpy(*o + 2, base64_table_enc_12bit + index1, 2); - - *s += 3; - *o += 4; -} - -static inline void -enc_loop_generic_32 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 4) { - return; - } - - // Process blocks of 3 bytes at a time. Because blocks are loaded 4 - // bytes at a time, ensure that there will be at least one remaining - // byte after the last round, so that the final read will not pass - // beyond the bounds of the input buffer: - size_t rounds = (*slen - 1) / 3; - - *slen -= rounds * 3; // 3 bytes consumed per round - *olen += rounds * 4; // 4 bytes produced per round - - do { - if (rounds >= 8) { - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - rounds -= 8; - continue; - } - if (rounds >= 4) { - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - rounds -= 4; - continue; - } - if (rounds >= 2) { - enc_loop_generic_32_inner(s, o); - enc_loop_generic_32_inner(s, o); - rounds -= 2; - continue; - } - enc_loop_generic_32_inner(s, o); - break; - - } while (rounds > 0); -} diff --git a/deps/base64/base64/lib/arch/generic/64/enc_loop.c b/deps/base64/base64/lib/arch/generic/64/enc_loop.c deleted file mode 100644 index 0840bc73c50e25..00000000000000 --- a/deps/base64/base64/lib/arch/generic/64/enc_loop.c +++ /dev/null @@ -1,77 +0,0 @@ -static inline void -enc_loop_generic_64_inner (const uint8_t **s, uint8_t **o) -{ - uint64_t src; - - // Load input: - memcpy(&src, *s, sizeof (src)); - - // Reorder to 64-bit big-endian, if not already in that format. The - // workset must be in big-endian, otherwise the shifted bits do not - // carry over properly among adjacent bytes: - src = BASE64_HTOBE64(src); - - // Four indices for the 12-bit lookup table: - const size_t index0 = (src >> 52) & 0xFFFU; - const size_t index1 = (src >> 40) & 0xFFFU; - const size_t index2 = (src >> 28) & 0xFFFU; - const size_t index3 = (src >> 16) & 0xFFFU; - - // Table lookup and store: - memcpy(*o + 0, base64_table_enc_12bit + index0, 2); - memcpy(*o + 2, base64_table_enc_12bit + index1, 2); - memcpy(*o + 4, base64_table_enc_12bit + index2, 2); - memcpy(*o + 6, base64_table_enc_12bit + index3, 2); - - *s += 6; - *o += 8; -} - -static inline void -enc_loop_generic_64 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 8) { - return; - } - - // Process blocks of 6 bytes at a time. Because blocks are loaded 8 - // bytes at a time, ensure that there will be at least 2 remaining - // bytes after the last round, so that the final read will not pass - // beyond the bounds of the input buffer: - size_t rounds = (*slen - 2) / 6; - - *slen -= rounds * 6; // 6 bytes consumed per round - *olen += rounds * 8; // 8 bytes produced per round - - do { - if (rounds >= 8) { - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - rounds -= 8; - continue; - } - if (rounds >= 4) { - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - rounds -= 4; - continue; - } - if (rounds >= 2) { - enc_loop_generic_64_inner(s, o); - enc_loop_generic_64_inner(s, o); - rounds -= 2; - continue; - } - enc_loop_generic_64_inner(s, o); - break; - - } while (rounds > 0); -} diff --git a/deps/base64/base64/lib/arch/generic/codec.c b/deps/base64/base64/lib/arch/generic/codec.c deleted file mode 100644 index 8dd5af235949d4..00000000000000 --- a/deps/base64/base64/lib/arch/generic/codec.c +++ /dev/null @@ -1,39 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <string.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#if BASE64_WORDSIZE == 32 -# include "32/enc_loop.c" -#elif BASE64_WORDSIZE == 64 -# include "64/enc_loop.c" -#endif - -#if BASE64_WORDSIZE >= 32 -# include "32/dec_loop.c" -#endif - -BASE64_ENC_FUNCTION(plain) -{ - #include "enc_head.c" -#if BASE64_WORDSIZE == 32 - enc_loop_generic_32(&s, &slen, &o, &olen); -#elif BASE64_WORDSIZE == 64 - enc_loop_generic_64(&s, &slen, &o, &olen); -#endif - #include "enc_tail.c" -} - -BASE64_DEC_FUNCTION(plain) -{ - #include "dec_head.c" -#if BASE64_WORDSIZE >= 32 - dec_loop_generic_32(&s, &slen, &o, &olen); -#endif - #include "dec_tail.c" -} diff --git a/deps/base64/base64/lib/arch/generic/dec_head.c b/deps/base64/base64/lib/arch/generic/dec_head.c deleted file mode 100644 index 179a31b63ff4ec..00000000000000 --- a/deps/base64/base64/lib/arch/generic/dec_head.c +++ /dev/null @@ -1,37 +0,0 @@ -int ret = 0; -const uint8_t *s = (const uint8_t *) src; -uint8_t *o = (uint8_t *) out; -uint8_t q; - -// Use local temporaries to avoid cache thrashing: -size_t olen = 0; -size_t slen = srclen; -struct base64_state st; -st.eof = state->eof; -st.bytes = state->bytes; -st.carry = state->carry; - -// If we previously saw an EOF or an invalid character, bail out: -if (st.eof) { - *outlen = 0; - ret = 0; - // If there was a trailing '=' to check, check it: - if (slen && (st.eof == BASE64_AEOF)) { - state->bytes = 0; - state->eof = BASE64_EOF; - ret = ((base64_table_dec_8bit[*s++] == 254) && (slen == 1)) ? 1 : 0; - } - return ret; -} - -// Turn four 6-bit numbers into three bytes: -// out[0] = 11111122 -// out[1] = 22223333 -// out[2] = 33444444 - -// Duff's device again: -switch (st.bytes) -{ - for (;;) - { - case 0: diff --git a/deps/base64/base64/lib/arch/generic/dec_tail.c b/deps/base64/base64/lib/arch/generic/dec_tail.c deleted file mode 100644 index e64f7247f3f122..00000000000000 --- a/deps/base64/base64/lib/arch/generic/dec_tail.c +++ /dev/null @@ -1,91 +0,0 @@ - if (slen-- == 0) { - ret = 1; - break; - } - if ((q = base64_table_dec_8bit[*s++]) >= 254) { - st.eof = BASE64_EOF; - // Treat character '=' as invalid for byte 0: - break; - } - st.carry = q << 2; - st.bytes++; - - // Deliberate fallthrough: - BASE64_FALLTHROUGH - - case 1: if (slen-- == 0) { - ret = 1; - break; - } - if ((q = base64_table_dec_8bit[*s++]) >= 254) { - st.eof = BASE64_EOF; - // Treat character '=' as invalid for byte 1: - break; - } - *o++ = st.carry | (q >> 4); - st.carry = q << 4; - st.bytes++; - olen++; - - // Deliberate fallthrough: - BASE64_FALLTHROUGH - - case 2: if (slen-- == 0) { - ret = 1; - break; - } - if ((q = base64_table_dec_8bit[*s++]) >= 254) { - st.bytes++; - // When q == 254, the input char is '='. - // Check if next byte is also '=': - if (q == 254) { - if (slen-- != 0) { - st.bytes = 0; - // EOF: - st.eof = BASE64_EOF; - q = base64_table_dec_8bit[*s++]; - ret = ((q == 254) && (slen == 0)) ? 1 : 0; - break; - } - else { - // Almost EOF - st.eof = BASE64_AEOF; - ret = 1; - break; - } - } - // If we get here, there was an error: - break; - } - *o++ = st.carry | (q >> 2); - st.carry = q << 6; - st.bytes++; - olen++; - - // Deliberate fallthrough: - BASE64_FALLTHROUGH - - case 3: if (slen-- == 0) { - ret = 1; - break; - } - if ((q = base64_table_dec_8bit[*s++]) >= 254) { - st.bytes = 0; - st.eof = BASE64_EOF; - // When q == 254, the input char is '='. Return 1 and EOF. - // When q == 255, the input char is invalid. Return 0 and EOF. - ret = ((q == 254) && (slen == 0)) ? 1 : 0; - break; - } - *o++ = st.carry | q; - st.carry = 0; - st.bytes = 0; - olen++; - } -} - -state->eof = st.eof; -state->bytes = st.bytes; -state->carry = st.carry; -*outlen = olen; -return ret; diff --git a/deps/base64/base64/lib/arch/generic/enc_head.c b/deps/base64/base64/lib/arch/generic/enc_head.c deleted file mode 100644 index 38d60b2c62b534..00000000000000 --- a/deps/base64/base64/lib/arch/generic/enc_head.c +++ /dev/null @@ -1,24 +0,0 @@ -// Assume that *out is large enough to contain the output. -// Theoretically it should be 4/3 the length of src. -const uint8_t *s = (const uint8_t *) src; -uint8_t *o = (uint8_t *) out; - -// Use local temporaries to avoid cache thrashing: -size_t olen = 0; -size_t slen = srclen; -struct base64_state st; -st.bytes = state->bytes; -st.carry = state->carry; - -// Turn three bytes into four 6-bit numbers: -// in[0] = 00111111 -// in[1] = 00112222 -// in[2] = 00222233 -// in[3] = 00333333 - -// Duff's device, a for() loop inside a switch() statement. Legal! -switch (st.bytes) -{ - for (;;) - { - case 0: diff --git a/deps/base64/base64/lib/arch/generic/enc_tail.c b/deps/base64/base64/lib/arch/generic/enc_tail.c deleted file mode 100644 index cbd573376812d7..00000000000000 --- a/deps/base64/base64/lib/arch/generic/enc_tail.c +++ /dev/null @@ -1,34 +0,0 @@ - if (slen-- == 0) { - break; - } - *o++ = base64_table_enc_6bit[*s >> 2]; - st.carry = (*s++ << 4) & 0x30; - st.bytes++; - olen += 1; - - // Deliberate fallthrough: - BASE64_FALLTHROUGH - - case 1: if (slen-- == 0) { - break; - } - *o++ = base64_table_enc_6bit[st.carry | (*s >> 4)]; - st.carry = (*s++ << 2) & 0x3C; - st.bytes++; - olen += 1; - - // Deliberate fallthrough: - BASE64_FALLTHROUGH - - case 2: if (slen-- == 0) { - break; - } - *o++ = base64_table_enc_6bit[st.carry | (*s >> 6)]; - *o++ = base64_table_enc_6bit[*s++ & 0x3F]; - st.bytes = 0; - olen += 2; - } -} -state->bytes = st.bytes; -state->carry = st.carry; -*outlen = olen; diff --git a/deps/base64/base64/lib/arch/neon32/codec.c b/deps/base64/base64/lib/arch/neon32/codec.c deleted file mode 100644 index a0b27f9ff6ac95..00000000000000 --- a/deps/base64/base64/lib/arch/neon32/codec.c +++ /dev/null @@ -1,77 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <string.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#ifdef __arm__ -# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && HAVE_NEON32 -# define BASE64_USE_NEON32 -# endif -#endif - -#ifdef BASE64_USE_NEON32 -#include <arm_neon.h> - -// Only enable inline assembly on supported compilers. -#if defined(__GNUC__) || defined(__clang__) -#define BASE64_NEON32_USE_ASM -#endif - -static inline uint8x16_t -vqtbl1q_u8 (const uint8x16_t lut, const uint8x16_t indices) -{ - // NEON32 only supports 64-bit wide lookups in 128-bit tables. Emulate - // the NEON64 `vqtbl1q_u8` intrinsic to do 128-bit wide lookups. - uint8x8x2_t lut2; - uint8x8x2_t result; - - lut2.val[0] = vget_low_u8(lut); - lut2.val[1] = vget_high_u8(lut); - - result.val[0] = vtbl2_u8(lut2, vget_low_u8(indices)); - result.val[1] = vtbl2_u8(lut2, vget_high_u8(indices)); - - return vcombine_u8(result.val[0], result.val[1]); -} - -#include "../generic/32/dec_loop.c" -#include "../generic/32/enc_loop.c" -#include "dec_loop.c" -#include "enc_reshuffle.c" -#include "enc_translate.c" -#include "enc_loop.c" - -#endif // BASE64_USE_NEON32 - -// Stride size is so large on these NEON 32-bit functions -// (48 bytes encode, 32 bytes decode) that we inline the -// uint32 codec to stay performant on smaller inputs. - -BASE64_ENC_FUNCTION(neon32) -{ -#ifdef BASE64_USE_NEON32 - #include "../generic/enc_head.c" - enc_loop_neon32(&s, &slen, &o, &olen); - enc_loop_generic_32(&s, &slen, &o, &olen); - #include "../generic/enc_tail.c" -#else - BASE64_ENC_STUB -#endif -} - -BASE64_DEC_FUNCTION(neon32) -{ -#ifdef BASE64_USE_NEON32 - #include "../generic/dec_head.c" - dec_loop_neon32(&s, &slen, &o, &olen); - dec_loop_generic_32(&s, &slen, &o, &olen); - #include "../generic/dec_tail.c" -#else - BASE64_DEC_STUB -#endif -} diff --git a/deps/base64/base64/lib/arch/neon32/dec_loop.c b/deps/base64/base64/lib/arch/neon32/dec_loop.c deleted file mode 100644 index 2216b39599da18..00000000000000 --- a/deps/base64/base64/lib/arch/neon32/dec_loop.c +++ /dev/null @@ -1,106 +0,0 @@ -static inline int -is_nonzero (const uint8x16_t v) -{ - uint64_t u64; - const uint64x2_t v64 = vreinterpretq_u64_u8(v); - const uint32x2_t v32 = vqmovn_u64(v64); - - vst1_u64(&u64, vreinterpret_u64_u32(v32)); - return u64 != 0; -} - -static inline uint8x16_t -delta_lookup (const uint8x16_t v) -{ - const uint8x8_t lut = { - 0, 16, 19, 4, (uint8_t) -65, (uint8_t) -65, (uint8_t) -71, (uint8_t) -71, - }; - - return vcombine_u8( - vtbl1_u8(lut, vget_low_u8(v)), - vtbl1_u8(lut, vget_high_u8(v))); -} - -static inline uint8x16_t -dec_loop_neon32_lane (uint8x16_t *lane) -{ - // See the SSSE3 decoder for an explanation of the algorithm. - const uint8x16_t lut_lo = { - 0x15, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, - 0x11, 0x11, 0x13, 0x1A, 0x1B, 0x1B, 0x1B, 0x1A - }; - - const uint8x16_t lut_hi = { - 0x10, 0x10, 0x01, 0x02, 0x04, 0x08, 0x04, 0x08, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 - }; - - const uint8x16_t mask_0F = vdupq_n_u8(0x0F); - const uint8x16_t mask_2F = vdupq_n_u8(0x2F); - - const uint8x16_t hi_nibbles = vshrq_n_u8(*lane, 4); - const uint8x16_t lo_nibbles = vandq_u8(*lane, mask_0F); - const uint8x16_t eq_2F = vceqq_u8(*lane, mask_2F); - - const uint8x16_t hi = vqtbl1q_u8(lut_hi, hi_nibbles); - const uint8x16_t lo = vqtbl1q_u8(lut_lo, lo_nibbles); - - // Now simply add the delta values to the input: - *lane = vaddq_u8(*lane, delta_lookup(vaddq_u8(eq_2F, hi_nibbles))); - - // Return the validity mask: - return vandq_u8(lo, hi); -} - -static inline void -dec_loop_neon32 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 64) { - return; - } - - // Process blocks of 64 bytes per round. Unlike the SSE codecs, no - // extra trailing zero bytes are written, so it is not necessary to - // reserve extra input bytes: - size_t rounds = *slen / 64; - - *slen -= rounds * 64; // 64 bytes consumed per round - *olen += rounds * 48; // 48 bytes produced per round - - do { - uint8x16x3_t dec; - - // Load 64 bytes and deinterleave: - uint8x16x4_t str = vld4q_u8(*s); - - // Decode each lane, collect a mask of invalid inputs: - const uint8x16_t classified - = dec_loop_neon32_lane(&str.val[0]) - | dec_loop_neon32_lane(&str.val[1]) - | dec_loop_neon32_lane(&str.val[2]) - | dec_loop_neon32_lane(&str.val[3]); - - // Check for invalid input: if any of the delta values are - // zero, fall back on bytewise code to do error checking and - // reporting: - if (is_nonzero(classified)) { - break; - } - - // Compress four bytes into three: - dec.val[0] = vorrq_u8(vshlq_n_u8(str.val[0], 2), vshrq_n_u8(str.val[1], 4)); - dec.val[1] = vorrq_u8(vshlq_n_u8(str.val[1], 4), vshrq_n_u8(str.val[2], 2)); - dec.val[2] = vorrq_u8(vshlq_n_u8(str.val[2], 6), str.val[3]); - - // Interleave and store decoded result: - vst3q_u8(*o, dec); - - *s += 64; - *o += 48; - - } while (--rounds > 0); - - // Adjust for any rounds that were skipped: - *slen += rounds * 64; - *olen -= rounds * 48; -} diff --git a/deps/base64/base64/lib/arch/neon32/enc_loop.c b/deps/base64/base64/lib/arch/neon32/enc_loop.c deleted file mode 100644 index d694b33733cd61..00000000000000 --- a/deps/base64/base64/lib/arch/neon32/enc_loop.c +++ /dev/null @@ -1,170 +0,0 @@ -#ifdef BASE64_NEON32_USE_ASM -static inline void -enc_loop_neon32_inner_asm (const uint8_t **s, uint8_t **o) -{ - // This function duplicates the functionality of enc_loop_neon32_inner, - // but entirely with inline assembly. This gives a significant speedup - // over using NEON intrinsics, which do not always generate very good - // code. The logic of the assembly is directly lifted from the - // intrinsics version, so it can be used as a guide to this code. - - // Temporary registers, used as scratch space. - uint8x16_t tmp0, tmp1, tmp2, tmp3; - uint8x16_t mask0, mask1, mask2, mask3; - - // A lookup table containing the absolute offsets for all ranges. - const uint8x16_t lut = { - 65U, 71U, 252U, 252U, - 252U, 252U, 252U, 252U, - 252U, 252U, 252U, 252U, - 237U, 240U, 0U, 0U - }; - - // Numeric constants. - const uint8x16_t n51 = vdupq_n_u8(51); - const uint8x16_t n25 = vdupq_n_u8(25); - const uint8x16_t n63 = vdupq_n_u8(63); - - __asm__ ( - - // Load 48 bytes and deinterleave. The bytes are loaded to - // hard-coded registers q12, q13 and q14, to ensure that they - // are contiguous. Increment the source pointer. - "vld3.8 {d24, d26, d28}, [%[src]]! \n\t" - "vld3.8 {d25, d27, d29}, [%[src]]! \n\t" - - // Reshuffle the bytes using temporaries. - "vshr.u8 %q[t0], q12, #2 \n\t" - "vshr.u8 %q[t1], q13, #4 \n\t" - "vshr.u8 %q[t2], q14, #6 \n\t" - "vsli.8 %q[t1], q12, #4 \n\t" - "vsli.8 %q[t2], q13, #2 \n\t" - "vand.u8 %q[t1], %q[t1], %q[n63] \n\t" - "vand.u8 %q[t2], %q[t2], %q[n63] \n\t" - "vand.u8 %q[t3], q14, %q[n63] \n\t" - - // t0..t3 are the reshuffled inputs. Create LUT indices. - "vqsub.u8 q12, %q[t0], %q[n51] \n\t" - "vqsub.u8 q13, %q[t1], %q[n51] \n\t" - "vqsub.u8 q14, %q[t2], %q[n51] \n\t" - "vqsub.u8 q15, %q[t3], %q[n51] \n\t" - - // Create the mask for range #0. - "vcgt.u8 %q[m0], %q[t0], %q[n25] \n\t" - "vcgt.u8 %q[m1], %q[t1], %q[n25] \n\t" - "vcgt.u8 %q[m2], %q[t2], %q[n25] \n\t" - "vcgt.u8 %q[m3], %q[t3], %q[n25] \n\t" - - // Subtract -1 to correct the LUT indices. - "vsub.u8 q12, %q[m0] \n\t" - "vsub.u8 q13, %q[m1] \n\t" - "vsub.u8 q14, %q[m2] \n\t" - "vsub.u8 q15, %q[m3] \n\t" - - // Lookup the delta values. - "vtbl.u8 d24, {%q[lut]}, d24 \n\t" - "vtbl.u8 d25, {%q[lut]}, d25 \n\t" - "vtbl.u8 d26, {%q[lut]}, d26 \n\t" - "vtbl.u8 d27, {%q[lut]}, d27 \n\t" - "vtbl.u8 d28, {%q[lut]}, d28 \n\t" - "vtbl.u8 d29, {%q[lut]}, d29 \n\t" - "vtbl.u8 d30, {%q[lut]}, d30 \n\t" - "vtbl.u8 d31, {%q[lut]}, d31 \n\t" - - // Add the delta values. - "vadd.u8 q12, %q[t0] \n\t" - "vadd.u8 q13, %q[t1] \n\t" - "vadd.u8 q14, %q[t2] \n\t" - "vadd.u8 q15, %q[t3] \n\t" - - // Store 64 bytes and interleave. Increment the dest pointer. - "vst4.8 {d24, d26, d28, d30}, [%[dst]]! \n\t" - "vst4.8 {d25, d27, d29, d31}, [%[dst]]! \n\t" - - // Outputs (modified). - : [src] "+r" (*s), - [dst] "+r" (*o), - [t0] "=&w" (tmp0), - [t1] "=&w" (tmp1), - [t2] "=&w" (tmp2), - [t3] "=&w" (tmp3), - [m0] "=&w" (mask0), - [m1] "=&w" (mask1), - [m2] "=&w" (mask2), - [m3] "=&w" (mask3) - - // Inputs (not modified). - : [lut] "w" (lut), - [n25] "w" (n25), - [n51] "w" (n51), - [n63] "w" (n63) - - // Clobbers. - : "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31", - "cc", "memory" - ); -} -#endif - -static inline void -enc_loop_neon32_inner (const uint8_t **s, uint8_t **o) -{ -#ifdef BASE64_NEON32_USE_ASM - enc_loop_neon32_inner_asm(s, o); -#else - // Load 48 bytes and deinterleave: - uint8x16x3_t src = vld3q_u8(*s); - - // Reshuffle: - uint8x16x4_t out = enc_reshuffle(src); - - // Translate reshuffled bytes to the Base64 alphabet: - out = enc_translate(out); - - // Interleave and store output: - vst4q_u8(*o, out); - - *s += 48; - *o += 64; -#endif -} - -static inline void -enc_loop_neon32 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - size_t rounds = *slen / 48; - - *slen -= rounds * 48; // 48 bytes consumed per round - *olen += rounds * 64; // 64 bytes produced per round - - while (rounds > 0) { - if (rounds >= 8) { - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - rounds -= 8; - continue; - } - if (rounds >= 4) { - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - rounds -= 4; - continue; - } - if (rounds >= 2) { - enc_loop_neon32_inner(s, o); - enc_loop_neon32_inner(s, o); - rounds -= 2; - continue; - } - enc_loop_neon32_inner(s, o); - break; - } -} diff --git a/deps/base64/base64/lib/arch/neon32/enc_reshuffle.c b/deps/base64/base64/lib/arch/neon32/enc_reshuffle.c deleted file mode 100644 index d6e97cb5f815e4..00000000000000 --- a/deps/base64/base64/lib/arch/neon32/enc_reshuffle.c +++ /dev/null @@ -1,31 +0,0 @@ -static inline uint8x16x4_t -enc_reshuffle (uint8x16x3_t in) -{ - uint8x16x4_t out; - - // Input: - // in[0] = a7 a6 a5 a4 a3 a2 a1 a0 - // in[1] = b7 b6 b5 b4 b3 b2 b1 b0 - // in[2] = c7 c6 c5 c4 c3 c2 c1 c0 - - // Output: - // out[0] = 00 00 a7 a6 a5 a4 a3 a2 - // out[1] = 00 00 a1 a0 b7 b6 b5 b4 - // out[2] = 00 00 b3 b2 b1 b0 c7 c6 - // out[3] = 00 00 c5 c4 c3 c2 c1 c0 - - // Move the input bits to where they need to be in the outputs. Except - // for the first output, the high two bits are not cleared. - out.val[0] = vshrq_n_u8(in.val[0], 2); - out.val[1] = vshrq_n_u8(in.val[1], 4); - out.val[2] = vshrq_n_u8(in.val[2], 6); - out.val[1] = vsliq_n_u8(out.val[1], in.val[0], 4); - out.val[2] = vsliq_n_u8(out.val[2], in.val[1], 2); - - // Clear the high two bits in the second, third and fourth output. - out.val[1] = vandq_u8(out.val[1], vdupq_n_u8(0x3F)); - out.val[2] = vandq_u8(out.val[2], vdupq_n_u8(0x3F)); - out.val[3] = vandq_u8(in.val[2], vdupq_n_u8(0x3F)); - - return out; -} diff --git a/deps/base64/base64/lib/arch/neon32/enc_translate.c b/deps/base64/base64/lib/arch/neon32/enc_translate.c deleted file mode 100644 index e616d54bc15dc7..00000000000000 --- a/deps/base64/base64/lib/arch/neon32/enc_translate.c +++ /dev/null @@ -1,57 +0,0 @@ -static inline uint8x16x4_t -enc_translate (const uint8x16x4_t in) -{ - // A lookup table containing the absolute offsets for all ranges: - const uint8x16_t lut = { - 65U, 71U, 252U, 252U, - 252U, 252U, 252U, 252U, - 252U, 252U, 252U, 252U, - 237U, 240U, 0U, 0U - }; - - const uint8x16_t offset = vdupq_n_u8(51); - - uint8x16x4_t indices, mask, delta, out; - - // Translate values 0..63 to the Base64 alphabet. There are five sets: - // # From To Abs Index Characters - // 0 [0..25] [65..90] +65 0 ABCDEFGHIJKLMNOPQRSTUVWXYZ - // 1 [26..51] [97..122] +71 1 abcdefghijklmnopqrstuvwxyz - // 2 [52..61] [48..57] -4 [2..11] 0123456789 - // 3 [62] [43] -19 12 + - // 4 [63] [47] -16 13 / - - // Create LUT indices from input: - // the index for range #0 is right, others are 1 less than expected: - indices.val[0] = vqsubq_u8(in.val[0], offset); - indices.val[1] = vqsubq_u8(in.val[1], offset); - indices.val[2] = vqsubq_u8(in.val[2], offset); - indices.val[3] = vqsubq_u8(in.val[3], offset); - - // mask is 0xFF (-1) for range #[1..4] and 0x00 for range #0: - mask.val[0] = vcgtq_u8(in.val[0], vdupq_n_u8(25)); - mask.val[1] = vcgtq_u8(in.val[1], vdupq_n_u8(25)); - mask.val[2] = vcgtq_u8(in.val[2], vdupq_n_u8(25)); - mask.val[3] = vcgtq_u8(in.val[3], vdupq_n_u8(25)); - - // Subtract -1, so add 1 to indices for range #[1..4], All indices are - // now correct: - indices.val[0] = vsubq_u8(indices.val[0], mask.val[0]); - indices.val[1] = vsubq_u8(indices.val[1], mask.val[1]); - indices.val[2] = vsubq_u8(indices.val[2], mask.val[2]); - indices.val[3] = vsubq_u8(indices.val[3], mask.val[3]); - - // Lookup delta values: - delta.val[0] = vqtbl1q_u8(lut, indices.val[0]); - delta.val[1] = vqtbl1q_u8(lut, indices.val[1]); - delta.val[2] = vqtbl1q_u8(lut, indices.val[2]); - delta.val[3] = vqtbl1q_u8(lut, indices.val[3]); - - // Add delta values: - out.val[0] = vaddq_u8(in.val[0], delta.val[0]); - out.val[1] = vaddq_u8(in.val[1], delta.val[1]); - out.val[2] = vaddq_u8(in.val[2], delta.val[2]); - out.val[3] = vaddq_u8(in.val[3], delta.val[3]); - - return out; -} diff --git a/deps/base64/base64/lib/arch/neon64/codec.c b/deps/base64/base64/lib/arch/neon64/codec.c deleted file mode 100644 index 79789bb7d0ecbc..00000000000000 --- a/deps/base64/base64/lib/arch/neon64/codec.c +++ /dev/null @@ -1,97 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <string.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#ifdef __aarch64__ -# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && HAVE_NEON64 -# define BASE64_USE_NEON64 -# endif -#endif - -#ifdef BASE64_USE_NEON64 -#include <arm_neon.h> - -// Only enable inline assembly on supported compilers. -#if defined(__GNUC__) || defined(__clang__) -#define BASE64_NEON64_USE_ASM -#endif - -static inline uint8x16x4_t -load_64byte_table (const uint8_t *p) -{ -#ifdef BASE64_NEON64_USE_ASM - - // Force the table to be loaded into contiguous registers. GCC will not - // normally allocate contiguous registers for a `uint8x16x4_t'. These - // registers are chosen to not conflict with the ones in the enc loop. - register uint8x16_t t0 __asm__ ("v8"); - register uint8x16_t t1 __asm__ ("v9"); - register uint8x16_t t2 __asm__ ("v10"); - register uint8x16_t t3 __asm__ ("v11"); - - __asm__ ( - "ld1 {%[t0].16b, %[t1].16b, %[t2].16b, %[t3].16b}, [%[src]], #64 \n\t" - : [src] "+r" (p), - [t0] "=w" (t0), - [t1] "=w" (t1), - [t2] "=w" (t2), - [t3] "=w" (t3) - ); - - return (uint8x16x4_t) { - .val[0] = t0, - .val[1] = t1, - .val[2] = t2, - .val[3] = t3, - }; -#else - return vld1q_u8_x4(p); -#endif -} - -#include "../generic/32/dec_loop.c" -#include "../generic/64/enc_loop.c" -#include "dec_loop.c" - -#ifdef BASE64_NEON64_USE_ASM -# include "enc_loop_asm.c" -#else -# include "enc_reshuffle.c" -# include "enc_loop.c" -#endif - -#endif // BASE64_USE_NEON64 - -// Stride size is so large on these NEON 64-bit functions -// (48 bytes encode, 64 bytes decode) that we inline the -// uint64 codec to stay performant on smaller inputs. - -BASE64_ENC_FUNCTION(neon64) -{ -#ifdef BASE64_USE_NEON64 - #include "../generic/enc_head.c" - enc_loop_neon64(&s, &slen, &o, &olen); - enc_loop_generic_64(&s, &slen, &o, &olen); - #include "../generic/enc_tail.c" -#else - BASE64_ENC_STUB -#endif -} - -BASE64_DEC_FUNCTION(neon64) -{ -#ifdef BASE64_USE_NEON64 - #include "../generic/dec_head.c" - dec_loop_neon64(&s, &slen, &o, &olen); - dec_loop_generic_32(&s, &slen, &o, &olen); - #include "../generic/dec_tail.c" -#else - BASE64_DEC_STUB -#endif -} diff --git a/deps/base64/base64/lib/arch/neon64/dec_loop.c b/deps/base64/base64/lib/arch/neon64/dec_loop.c deleted file mode 100644 index 48232f2049228d..00000000000000 --- a/deps/base64/base64/lib/arch/neon64/dec_loop.c +++ /dev/null @@ -1,129 +0,0 @@ -// The input consists of five valid character sets in the Base64 alphabet, -// which we need to map back to the 6-bit values they represent. -// There are three ranges, two singles, and then there's the rest. -// -// # From To LUT Characters -// 1 [0..42] [255] #1 invalid input -// 2 [43] [62] #1 + -// 3 [44..46] [255] #1 invalid input -// 4 [47] [63] #1 / -// 5 [48..57] [52..61] #1 0..9 -// 6 [58..63] [255] #1 invalid input -// 7 [64] [255] #2 invalid input -// 8 [65..90] [0..25] #2 A..Z -// 9 [91..96] [255] #2 invalid input -// 10 [97..122] [26..51] #2 a..z -// 11 [123..126] [255] #2 invalid input -// (12) Everything else => invalid input - -// The first LUT will use the VTBL instruction (out of range indices are set to -// 0 in destination). -static const uint8_t dec_lut1[] = { - 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, - 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, - 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 255U, 62U, 255U, 255U, 255U, 63U, - 52U, 53U, 54U, 55U, 56U, 57U, 58U, 59U, 60U, 61U, 255U, 255U, 255U, 255U, 255U, 255U, -}; - -// The second LUT will use the VTBX instruction (out of range indices will be -// unchanged in destination). Input [64..126] will be mapped to index [1..63] -// in this LUT. Index 0 means that value comes from LUT #1. -static const uint8_t dec_lut2[] = { - 0U, 255U, 0U, 1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U, 11U, 12U, 13U, - 14U, 15U, 16U, 17U, 18U, 19U, 20U, 21U, 22U, 23U, 24U, 25U, 255U, 255U, 255U, 255U, - 255U, 255U, 26U, 27U, 28U, 29U, 30U, 31U, 32U, 33U, 34U, 35U, 36U, 37U, 38U, 39U, - 40U, 41U, 42U, 43U, 44U, 45U, 46U, 47U, 48U, 49U, 50U, 51U, 255U, 255U, 255U, 255U, -}; - -// All input values in range for the first look-up will be 0U in the second -// look-up result. All input values out of range for the first look-up will be -// 0U in the first look-up result. Thus, the two results can be ORed without -// conflicts. -// -// Invalid characters that are in the valid range for either look-up will be -// set to 255U in the combined result. Other invalid characters will just be -// passed through with the second look-up result (using the VTBX instruction). -// Since the second LUT is 64 bytes, those passed-through values are guaranteed -// to have a value greater than 63U. Therefore, valid characters will be mapped -// to the valid [0..63] range and all invalid characters will be mapped to -// values greater than 63. - -static inline void -dec_loop_neon64 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 64) { - return; - } - - // Process blocks of 64 bytes per round. Unlike the SSE codecs, no - // extra trailing zero bytes are written, so it is not necessary to - // reserve extra input bytes: - size_t rounds = *slen / 64; - - *slen -= rounds * 64; // 64 bytes consumed per round - *olen += rounds * 48; // 48 bytes produced per round - - const uint8x16x4_t tbl_dec1 = load_64byte_table(dec_lut1); - const uint8x16x4_t tbl_dec2 = load_64byte_table(dec_lut2); - - do { - const uint8x16_t offset = vdupq_n_u8(63U); - uint8x16x4_t dec1, dec2; - uint8x16x3_t dec; - - // Load 64 bytes and deinterleave: - uint8x16x4_t str = vld4q_u8((uint8_t *) *s); - - // Get indices for second LUT: - dec2.val[0] = vqsubq_u8(str.val[0], offset); - dec2.val[1] = vqsubq_u8(str.val[1], offset); - dec2.val[2] = vqsubq_u8(str.val[2], offset); - dec2.val[3] = vqsubq_u8(str.val[3], offset); - - // Get values from first LUT: - dec1.val[0] = vqtbl4q_u8(tbl_dec1, str.val[0]); - dec1.val[1] = vqtbl4q_u8(tbl_dec1, str.val[1]); - dec1.val[2] = vqtbl4q_u8(tbl_dec1, str.val[2]); - dec1.val[3] = vqtbl4q_u8(tbl_dec1, str.val[3]); - - // Get values from second LUT: - dec2.val[0] = vqtbx4q_u8(dec2.val[0], tbl_dec2, dec2.val[0]); - dec2.val[1] = vqtbx4q_u8(dec2.val[1], tbl_dec2, dec2.val[1]); - dec2.val[2] = vqtbx4q_u8(dec2.val[2], tbl_dec2, dec2.val[2]); - dec2.val[3] = vqtbx4q_u8(dec2.val[3], tbl_dec2, dec2.val[3]); - - // Get final values: - str.val[0] = vorrq_u8(dec1.val[0], dec2.val[0]); - str.val[1] = vorrq_u8(dec1.val[1], dec2.val[1]); - str.val[2] = vorrq_u8(dec1.val[2], dec2.val[2]); - str.val[3] = vorrq_u8(dec1.val[3], dec2.val[3]); - - // Check for invalid input, any value larger than 63: - const uint8x16_t classified - = vcgtq_u8(str.val[0], vdupq_n_u8(63)) - | vcgtq_u8(str.val[1], vdupq_n_u8(63)) - | vcgtq_u8(str.val[2], vdupq_n_u8(63)) - | vcgtq_u8(str.val[3], vdupq_n_u8(63)); - - // Check that all bits are zero: - if (vmaxvq_u8(classified) != 0U) { - break; - } - - // Compress four bytes into three: - dec.val[0] = vshlq_n_u8(str.val[0], 2) | vshrq_n_u8(str.val[1], 4); - dec.val[1] = vshlq_n_u8(str.val[1], 4) | vshrq_n_u8(str.val[2], 2); - dec.val[2] = vshlq_n_u8(str.val[2], 6) | str.val[3]; - - // Interleave and store decoded result: - vst3q_u8((uint8_t *) *o, dec); - - *s += 64; - *o += 48; - - } while (--rounds > 0); - - // Adjust for any rounds that were skipped: - *slen += rounds * 64; - *olen -= rounds * 48; -} diff --git a/deps/base64/base64/lib/arch/neon64/enc_loop.c b/deps/base64/base64/lib/arch/neon64/enc_loop.c deleted file mode 100644 index 59a1c59728a139..00000000000000 --- a/deps/base64/base64/lib/arch/neon64/enc_loop.c +++ /dev/null @@ -1,66 +0,0 @@ -static inline void -enc_loop_neon64_inner (const uint8_t **s, uint8_t **o, const uint8x16x4_t tbl_enc) -{ - // Load 48 bytes and deinterleave: - uint8x16x3_t src = vld3q_u8(*s); - - // Divide bits of three input bytes over four output bytes: - uint8x16x4_t out = enc_reshuffle(src); - - // The bits have now been shifted to the right locations; - // translate their values 0..63 to the Base64 alphabet. - // Use a 64-byte table lookup: - out.val[0] = vqtbl4q_u8(tbl_enc, out.val[0]); - out.val[1] = vqtbl4q_u8(tbl_enc, out.val[1]); - out.val[2] = vqtbl4q_u8(tbl_enc, out.val[2]); - out.val[3] = vqtbl4q_u8(tbl_enc, out.val[3]); - - // Interleave and store output: - vst4q_u8(*o, out); - - *s += 48; - *o += 64; -} - -static inline void -enc_loop_neon64 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - size_t rounds = *slen / 48; - - *slen -= rounds * 48; // 48 bytes consumed per round - *olen += rounds * 64; // 64 bytes produced per round - - // Load the encoding table: - const uint8x16x4_t tbl_enc = load_64byte_table(base64_table_enc_6bit); - - while (rounds > 0) { - if (rounds >= 8) { - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - rounds -= 8; - continue; - } - if (rounds >= 4) { - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - rounds -= 4; - continue; - } - if (rounds >= 2) { - enc_loop_neon64_inner(s, o, tbl_enc); - enc_loop_neon64_inner(s, o, tbl_enc); - rounds -= 2; - continue; - } - enc_loop_neon64_inner(s, o, tbl_enc); - break; - } -} diff --git a/deps/base64/base64/lib/arch/neon64/enc_loop_asm.c b/deps/base64/base64/lib/arch/neon64/enc_loop_asm.c deleted file mode 100644 index 182e9cdf4a17db..00000000000000 --- a/deps/base64/base64/lib/arch/neon64/enc_loop_asm.c +++ /dev/null @@ -1,168 +0,0 @@ -// Apologies in advance for combining the preprocessor with inline assembly, -// two notoriously gnarly parts of C, but it was necessary to avoid a lot of -// code repetition. The preprocessor is used to template large sections of -// inline assembly that differ only in the registers used. If the code was -// written out by hand, it would become very large and hard to audit. - -// Generate a block of inline assembly that loads three user-defined registers -// A, B, C from memory and deinterleaves them, post-incrementing the src -// pointer. The register set should be sequential. -#define LOAD(A, B, C) \ - "ld3 {"A".16b, "B".16b, "C".16b}, [%[src]], #48 \n\t" - -// Generate a block of inline assembly that takes three deinterleaved registers -// and shuffles the bytes. The output is in temporary registers t0..t3. -#define SHUF(A, B, C) \ - "ushr %[t0].16b, "A".16b, #2 \n\t" \ - "ushr %[t1].16b, "B".16b, #4 \n\t" \ - "ushr %[t2].16b, "C".16b, #6 \n\t" \ - "sli %[t1].16b, "A".16b, #4 \n\t" \ - "sli %[t2].16b, "B".16b, #2 \n\t" \ - "and %[t1].16b, %[t1].16b, %[n63].16b \n\t" \ - "and %[t2].16b, %[t2].16b, %[n63].16b \n\t" \ - "and %[t3].16b, "C".16b, %[n63].16b \n\t" - -// Generate a block of inline assembly that takes temporary registers t0..t3 -// and translates them to the base64 alphabet, using a table loaded into -// v8..v11. The output is in user-defined registers A..D. -#define TRAN(A, B, C, D) \ - "tbl "A".16b, {v8.16b-v11.16b}, %[t0].16b \n\t" \ - "tbl "B".16b, {v8.16b-v11.16b}, %[t1].16b \n\t" \ - "tbl "C".16b, {v8.16b-v11.16b}, %[t2].16b \n\t" \ - "tbl "D".16b, {v8.16b-v11.16b}, %[t3].16b \n\t" - -// Generate a block of inline assembly that interleaves four registers and -// stores them, post-incrementing the destination pointer. -#define STOR(A, B, C, D) \ - "st4 {"A".16b, "B".16b, "C".16b, "D".16b}, [%[dst]], #64 \n\t" - -// Generate a block of inline assembly that generates a single self-contained -// encoder round: fetch the data, process it, and store the result. -#define ROUND() \ - LOAD("v12", "v13", "v14") \ - SHUF("v12", "v13", "v14") \ - TRAN("v12", "v13", "v14", "v15") \ - STOR("v12", "v13", "v14", "v15") - -// Generate a block of assembly that generates a type A interleaved encoder -// round. It uses registers that were loaded by the previous type B round, and -// in turn loads registers for the next type B round. -#define ROUND_A() \ - SHUF("v2", "v3", "v4") \ - LOAD("v12", "v13", "v14") \ - TRAN("v2", "v3", "v4", "v5") \ - STOR("v2", "v3", "v4", "v5") - -// Type B interleaved encoder round. Same as type A, but register sets swapped. -#define ROUND_B() \ - SHUF("v12", "v13", "v14") \ - LOAD("v2", "v3", "v4") \ - TRAN("v12", "v13", "v14", "v15") \ - STOR("v12", "v13", "v14", "v15") - -// The first type A round needs to load its own registers. -#define ROUND_A_FIRST() \ - LOAD("v2", "v3", "v4") \ - ROUND_A() - -// The last type B round omits the load for the next step. -#define ROUND_B_LAST() \ - SHUF("v12", "v13", "v14") \ - TRAN("v12", "v13", "v14", "v15") \ - STOR("v12", "v13", "v14", "v15") - -// Suppress clang's warning that the literal string in the asm statement is -// overlong (longer than the ISO-mandated minimum size of 4095 bytes for C99 -// compilers). It may be true, but the goal here is not C99 portability. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Woverlength-strings" - -static inline void -enc_loop_neon64 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - size_t rounds = *slen / 48; - - if (rounds == 0) { - return; - } - - *slen -= rounds * 48; // 48 bytes consumed per round. - *olen += rounds * 64; // 64 bytes produced per round. - - // Number of times to go through the 8x loop. - size_t loops = rounds / 8; - - // Number of rounds remaining after the 8x loop. - rounds %= 8; - - // Temporary registers, used as scratch space. - uint8x16_t tmp0, tmp1, tmp2, tmp3; - - __asm__ volatile ( - - // Load the encoding table into v8..v11. - " ld1 {v8.16b-v11.16b}, [%[tbl]] \n\t" - - // If there are eight rounds or more, enter an 8x unrolled loop - // of interleaved encoding rounds. The rounds interleave memory - // operations (load/store) with data operations to maximize - // pipeline throughput. - " cbz %[loops], 4f \n\t" - - // The SIMD instructions do not touch the flags. - "88: subs %[loops], %[loops], #1 \n\t" - " " ROUND_A_FIRST() - " " ROUND_B() - " " ROUND_A() - " " ROUND_B() - " " ROUND_A() - " " ROUND_B() - " " ROUND_A() - " " ROUND_B_LAST() - " b.ne 88b \n\t" - - // Enter a 4x unrolled loop for rounds of 4 or more. - "4: cmp %[rounds], #4 \n\t" - " b.lt 30f \n\t" - " " ROUND_A_FIRST() - " " ROUND_B() - " " ROUND_A() - " " ROUND_B_LAST() - " sub %[rounds], %[rounds], #4 \n\t" - - // Dispatch the remaining rounds 0..3. - "30: cbz %[rounds], 0f \n\t" - " cmp %[rounds], #2 \n\t" - " b.eq 2f \n\t" - " b.lt 1f \n\t" - - // Block of non-interlaced encoding rounds, which can each - // individually be jumped to. Rounds fall through to the next. - "3: " ROUND() - "2: " ROUND() - "1: " ROUND() - "0: \n\t" - - // Outputs (modified). - : [loops] "+r" (loops), - [src] "+r" (*s), - [dst] "+r" (*o), - [t0] "=&w" (tmp0), - [t1] "=&w" (tmp1), - [t2] "=&w" (tmp2), - [t3] "=&w" (tmp3) - - // Inputs (not modified). - : [rounds] "r" (rounds), - [tbl] "r" (base64_table_enc_6bit), - [n63] "w" (vdupq_n_u8(63)) - - // Clobbers. - : "v2", "v3", "v4", "v5", - "v8", "v9", "v10", "v11", - "v12", "v13", "v14", "v15", - "cc", "memory" - ); -} - -#pragma GCC diagnostic pop diff --git a/deps/base64/base64/lib/arch/neon64/enc_reshuffle.c b/deps/base64/base64/lib/arch/neon64/enc_reshuffle.c deleted file mode 100644 index ea543e04ec7da4..00000000000000 --- a/deps/base64/base64/lib/arch/neon64/enc_reshuffle.c +++ /dev/null @@ -1,31 +0,0 @@ -static inline uint8x16x4_t -enc_reshuffle (const uint8x16x3_t in) -{ - uint8x16x4_t out; - - // Input: - // in[0] = a7 a6 a5 a4 a3 a2 a1 a0 - // in[1] = b7 b6 b5 b4 b3 b2 b1 b0 - // in[2] = c7 c6 c5 c4 c3 c2 c1 c0 - - // Output: - // out[0] = 00 00 a7 a6 a5 a4 a3 a2 - // out[1] = 00 00 a1 a0 b7 b6 b5 b4 - // out[2] = 00 00 b3 b2 b1 b0 c7 c6 - // out[3] = 00 00 c5 c4 c3 c2 c1 c0 - - // Move the input bits to where they need to be in the outputs. Except - // for the first output, the high two bits are not cleared. - out.val[0] = vshrq_n_u8(in.val[0], 2); - out.val[1] = vshrq_n_u8(in.val[1], 4); - out.val[2] = vshrq_n_u8(in.val[2], 6); - out.val[1] = vsliq_n_u8(out.val[1], in.val[0], 4); - out.val[2] = vsliq_n_u8(out.val[2], in.val[1], 2); - - // Clear the high two bits in the second, third and fourth output. - out.val[1] = vandq_u8(out.val[1], vdupq_n_u8(0x3F)); - out.val[2] = vandq_u8(out.val[2], vdupq_n_u8(0x3F)); - out.val[3] = vandq_u8(in.val[2], vdupq_n_u8(0x3F)); - - return out; -} diff --git a/deps/base64/base64/lib/arch/sse41/codec.c b/deps/base64/base64/lib/arch/sse41/codec.c deleted file mode 100644 index 6e5afe30011b7b..00000000000000 --- a/deps/base64/base64/lib/arch/sse41/codec.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <stdlib.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#if HAVE_SSE41 -#include <smmintrin.h> - -// Only enable inline assembly on supported compilers and on 64-bit CPUs. -#ifndef BASE64_SSE41_USE_ASM -# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 -# define BASE64_SSE41_USE_ASM 1 -# else -# define BASE64_SSE41_USE_ASM 0 -# endif -#endif - -#include "../ssse3/dec_reshuffle.c" -#include "../ssse3/dec_loop.c" - -#if BASE64_SSE41_USE_ASM -# include "../ssse3/enc_loop_asm.c" -#else -# include "../ssse3/enc_translate.c" -# include "../ssse3/enc_reshuffle.c" -# include "../ssse3/enc_loop.c" -#endif - -#endif // HAVE_SSE41 - -BASE64_ENC_FUNCTION(sse41) -{ -#if HAVE_SSE41 - #include "../generic/enc_head.c" - enc_loop_ssse3(&s, &slen, &o, &olen); - #include "../generic/enc_tail.c" -#else - BASE64_ENC_STUB -#endif -} - -BASE64_DEC_FUNCTION(sse41) -{ -#if HAVE_SSE41 - #include "../generic/dec_head.c" - dec_loop_ssse3(&s, &slen, &o, &olen); - #include "../generic/dec_tail.c" -#else - BASE64_DEC_STUB -#endif -} diff --git a/deps/base64/base64/lib/arch/sse42/codec.c b/deps/base64/base64/lib/arch/sse42/codec.c deleted file mode 100644 index dde823b7aa0aa6..00000000000000 --- a/deps/base64/base64/lib/arch/sse42/codec.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <stdlib.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#if HAVE_SSE42 -#include <nmmintrin.h> - -// Only enable inline assembly on supported compilers and on 64-bit CPUs. -#ifndef BASE64_SSE42_USE_ASM -# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 -# define BASE64_SSE42_USE_ASM 1 -# else -# define BASE64_SSE42_USE_ASM 0 -# endif -#endif - -#include "../ssse3/dec_reshuffle.c" -#include "../ssse3/dec_loop.c" - -#if BASE64_SSE42_USE_ASM -# include "../ssse3/enc_loop_asm.c" -#else -# include "../ssse3/enc_translate.c" -# include "../ssse3/enc_reshuffle.c" -# include "../ssse3/enc_loop.c" -#endif - -#endif // HAVE_SSE42 - -BASE64_ENC_FUNCTION(sse42) -{ -#if HAVE_SSE42 - #include "../generic/enc_head.c" - enc_loop_ssse3(&s, &slen, &o, &olen); - #include "../generic/enc_tail.c" -#else - BASE64_ENC_STUB -#endif -} - -BASE64_DEC_FUNCTION(sse42) -{ -#if HAVE_SSE42 - #include "../generic/dec_head.c" - dec_loop_ssse3(&s, &slen, &o, &olen); - #include "../generic/dec_tail.c" -#else - BASE64_DEC_STUB -#endif -} diff --git a/deps/base64/base64/lib/arch/ssse3/codec.c b/deps/base64/base64/lib/arch/ssse3/codec.c deleted file mode 100644 index a812a2901f4efb..00000000000000 --- a/deps/base64/base64/lib/arch/ssse3/codec.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#include <stdlib.h> - -#include "../../../include/libbase64.h" -#include "../../tables/tables.h" -#include "../../codecs.h" -#include "config.h" -#include "../../env.h" - -#if HAVE_SSSE3 -#include <tmmintrin.h> - -// Only enable inline assembly on supported compilers and on 64-bit CPUs. -// 32-bit CPUs with SSSE3 support, such as low-end Atoms, only have eight XMM -// registers, which is not enough to run the inline assembly. -#ifndef BASE64_SSSE3_USE_ASM -# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 -# define BASE64_SSSE3_USE_ASM 1 -# else -# define BASE64_SSSE3_USE_ASM 0 -# endif -#endif - -#include "dec_reshuffle.c" -#include "dec_loop.c" - -#if BASE64_SSSE3_USE_ASM -# include "enc_loop_asm.c" -#else -# include "enc_reshuffle.c" -# include "enc_translate.c" -# include "enc_loop.c" -#endif - -#endif // HAVE_SSSE3 - -BASE64_ENC_FUNCTION(ssse3) -{ -#if HAVE_SSSE3 - #include "../generic/enc_head.c" - enc_loop_ssse3(&s, &slen, &o, &olen); - #include "../generic/enc_tail.c" -#else - BASE64_ENC_STUB -#endif -} - -BASE64_DEC_FUNCTION(ssse3) -{ -#if HAVE_SSSE3 - #include "../generic/dec_head.c" - dec_loop_ssse3(&s, &slen, &o, &olen); - #include "../generic/dec_tail.c" -#else - BASE64_DEC_STUB -#endif -} diff --git a/deps/base64/base64/lib/arch/ssse3/dec_loop.c b/deps/base64/base64/lib/arch/ssse3/dec_loop.c deleted file mode 100644 index 9da71abef48f56..00000000000000 --- a/deps/base64/base64/lib/arch/ssse3/dec_loop.c +++ /dev/null @@ -1,173 +0,0 @@ -// The input consists of six character sets in the Base64 alphabet, which we -// need to map back to the 6-bit values they represent. There are three ranges, -// two singles, and then there's the rest. -// -// # From To Add Characters -// 1 [43] [62] +19 + -// 2 [47] [63] +16 / -// 3 [48..57] [52..61] +4 0..9 -// 4 [65..90] [0..25] -65 A..Z -// 5 [97..122] [26..51] -71 a..z -// (6) Everything else => invalid input -// -// We will use lookup tables for character validation and offset computation. -// Remember that 0x2X and 0x0X are the same index for _mm_shuffle_epi8, this -// allows to mask with 0x2F instead of 0x0F and thus save one constant -// declaration (register and/or memory access). -// -// For offsets: -// Perfect hash for lut = ((src >> 4) & 0x2F) + ((src == 0x2F) ? 0xFF : 0x00) -// 0000 = garbage -// 0001 = / -// 0010 = + -// 0011 = 0-9 -// 0100 = A-Z -// 0101 = A-Z -// 0110 = a-z -// 0111 = a-z -// 1000 >= garbage -// -// For validation, here's the table. -// A character is valid if and only if the AND of the 2 lookups equals 0: -// -// hi \ lo 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 -// LUT 0x15 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x13 0x1A 0x1B 0x1B 0x1B 0x1A -// -// 0000 0x10 char NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI -// andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// -// 0001 0x10 char DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US -// andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// -// 0010 0x01 char ! " # $ % & ' ( ) * + , - . / -// andlut 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x00 0x01 0x01 0x01 0x00 -// -// 0011 0x02 char 0 1 2 3 4 5 6 7 8 9 : ; < = > ? -// andlut 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x02 0x02 0x02 0x02 0x02 0x02 -// -// 0100 0x04 char @ A B C D E F G H I J K L M N O -// andlut 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -// -// 0101 0x08 char P Q R S T U V W X Y Z [ \ ] ^ _ -// andlut 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x08 0x08 0x08 0x08 -// -// 0110 0x04 char ` a b c d e f g h i j k l m n o -// andlut 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -// 0111 0x08 char p q r s t u v w x y z { | } ~ -// andlut 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x08 0x08 0x08 0x08 -// -// 1000 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// 1001 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// 1010 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// 1011 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// 1100 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// 1101 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// 1110 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 -// 1111 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 - -static inline int -dec_loop_ssse3_inner (const uint8_t **s, uint8_t **o, size_t *rounds) -{ - const __m128i lut_lo = _mm_setr_epi8( - 0x15, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, - 0x11, 0x11, 0x13, 0x1A, 0x1B, 0x1B, 0x1B, 0x1A); - - const __m128i lut_hi = _mm_setr_epi8( - 0x10, 0x10, 0x01, 0x02, 0x04, 0x08, 0x04, 0x08, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10); - - const __m128i lut_roll = _mm_setr_epi8( - 0, 16, 19, 4, -65, -65, -71, -71, - 0, 0, 0, 0, 0, 0, 0, 0); - - const __m128i mask_2F = _mm_set1_epi8(0x2F); - - // Load input: - __m128i str = _mm_loadu_si128((__m128i *) *s); - - // Table lookups: - const __m128i hi_nibbles = _mm_and_si128(_mm_srli_epi32(str, 4), mask_2F); - const __m128i lo_nibbles = _mm_and_si128(str, mask_2F); - const __m128i hi = _mm_shuffle_epi8(lut_hi, hi_nibbles); - const __m128i lo = _mm_shuffle_epi8(lut_lo, lo_nibbles); - - // Check for invalid input: if any "and" values from lo and hi are not - // zero, fall back on bytewise code to do error checking and reporting: - if (_mm_movemask_epi8(_mm_cmpgt_epi8(_mm_and_si128(lo, hi), _mm_setzero_si128())) != 0) { - return 0; - } - - const __m128i eq_2F = _mm_cmpeq_epi8(str, mask_2F); - const __m128i roll = _mm_shuffle_epi8(lut_roll, _mm_add_epi8(eq_2F, hi_nibbles)); - - // Now simply add the delta values to the input: - str = _mm_add_epi8(str, roll); - - // Reshuffle the input to packed 12-byte output format: - str = dec_reshuffle(str); - - // Store the output: - _mm_storeu_si128((__m128i *) *o, str); - - *s += 16; - *o += 12; - *rounds -= 1; - - return 1; -} - -static inline void -dec_loop_ssse3 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 24) { - return; - } - - // Process blocks of 16 bytes per round. Because 4 extra zero bytes are - // written after the output, ensure that there will be at least 8 bytes - // of input data left to cover the gap. (6 data bytes and up to two - // end-of-string markers.) - size_t rounds = (*slen - 8) / 16; - - *slen -= rounds * 16; // 16 bytes consumed per round - *olen += rounds * 12; // 12 bytes produced per round - - do { - if (rounds >= 8) { - if (dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds)) { - continue; - } - break; - } - if (rounds >= 4) { - if (dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds)) { - continue; - } - break; - } - if (rounds >= 2) { - if (dec_loop_ssse3_inner(s, o, &rounds) && - dec_loop_ssse3_inner(s, o, &rounds)) { - continue; - } - break; - } - dec_loop_ssse3_inner(s, o, &rounds); - break; - - } while (rounds > 0); - - // Adjust for any rounds that were skipped: - *slen += rounds * 16; - *olen -= rounds * 12; -} diff --git a/deps/base64/base64/lib/arch/ssse3/dec_reshuffle.c b/deps/base64/base64/lib/arch/ssse3/dec_reshuffle.c deleted file mode 100644 index fdf587fea2ee91..00000000000000 --- a/deps/base64/base64/lib/arch/ssse3/dec_reshuffle.c +++ /dev/null @@ -1,33 +0,0 @@ -static inline __m128i -dec_reshuffle (const __m128i in) -{ - // in, bits, upper case are most significant bits, lower case are least significant bits - // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ - // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG - // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD - // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA - - const __m128i merge_ab_and_bc = _mm_maddubs_epi16(in, _mm_set1_epi32(0x01400140)); - // 0000kkkk LLllllll 0000JJJJ JJjjKKKK - // 0000hhhh IIiiiiii 0000GGGG GGggHHHH - // 0000eeee FFffffff 0000DDDD DDddEEEE - // 0000bbbb CCcccccc 0000AAAA AAaaBBBB - - const __m128i out = _mm_madd_epi16(merge_ab_and_bc, _mm_set1_epi32(0x00011000)); - // 00000000 JJJJJJjj KKKKkkkk LLllllll - // 00000000 GGGGGGgg HHHHhhhh IIiiiiii - // 00000000 DDDDDDdd EEEEeeee FFffffff - // 00000000 AAAAAAaa BBBBbbbb CCcccccc - - // Pack bytes together: - return _mm_shuffle_epi8(out, _mm_setr_epi8( - 2, 1, 0, - 6, 5, 4, - 10, 9, 8, - 14, 13, 12, - -1, -1, -1, -1)); - // 00000000 00000000 00000000 00000000 - // LLllllll KKKKkkkk JJJJJJjj IIiiiiii - // HHHHhhhh GGGGGGgg FFffffff EEEEeeee - // DDDDDDdd CCcccccc BBBBbbbb AAAAAAaa -} diff --git a/deps/base64/base64/lib/arch/ssse3/enc_loop.c b/deps/base64/base64/lib/arch/ssse3/enc_loop.c deleted file mode 100644 index 6de652e1c9719b..00000000000000 --- a/deps/base64/base64/lib/arch/ssse3/enc_loop.c +++ /dev/null @@ -1,67 +0,0 @@ -static inline void -enc_loop_ssse3_inner (const uint8_t **s, uint8_t **o) -{ - // Load input: - __m128i str = _mm_loadu_si128((__m128i *) *s); - - // Reshuffle: - str = enc_reshuffle(str); - - // Translate reshuffled bytes to the Base64 alphabet: - str = enc_translate(str); - - // Store: - _mm_storeu_si128((__m128i *) *o, str); - - *s += 12; - *o += 16; -} - -static inline void -enc_loop_ssse3 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - if (*slen < 16) { - return; - } - - // Process blocks of 12 bytes at a time. Because blocks are loaded 16 - // bytes at a time, ensure that there will be at least 4 remaining - // bytes after the last round, so that the final read will not pass - // beyond the bounds of the input buffer: - size_t rounds = (*slen - 4) / 12; - - *slen -= rounds * 12; // 12 bytes consumed per round - *olen += rounds * 16; // 16 bytes produced per round - - do { - if (rounds >= 8) { - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - rounds -= 8; - continue; - } - if (rounds >= 4) { - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - rounds -= 4; - continue; - } - if (rounds >= 2) { - enc_loop_ssse3_inner(s, o); - enc_loop_ssse3_inner(s, o); - rounds -= 2; - continue; - } - enc_loop_ssse3_inner(s, o); - break; - - } while (rounds > 0); -} diff --git a/deps/base64/base64/lib/arch/ssse3/enc_loop_asm.c b/deps/base64/base64/lib/arch/ssse3/enc_loop_asm.c deleted file mode 100644 index 0cdb340a63b7fc..00000000000000 --- a/deps/base64/base64/lib/arch/ssse3/enc_loop_asm.c +++ /dev/null @@ -1,268 +0,0 @@ -// Apologies in advance for combining the preprocessor with inline assembly, -// two notoriously gnarly parts of C, but it was necessary to avoid a lot of -// code repetition. The preprocessor is used to template large sections of -// inline assembly that differ only in the registers used. If the code was -// written out by hand, it would become very large and hard to audit. - -// Generate a block of inline assembly that loads register R0 from memory. The -// offset at which the register is loaded is set by the given round. -#define LOAD(R0, ROUND) \ - "lddqu ("#ROUND" * 12)(%[src]), %["R0"] \n\t" - -// Generate a block of inline assembly that deinterleaves and shuffles register -// R0 using preloaded constants. Outputs in R0 and R1. -#define SHUF(R0, R1) \ - "pshufb %[lut0], %["R0"] \n\t" \ - "movdqa %["R0"], %["R1"] \n\t" \ - "pand %[msk0], %["R0"] \n\t" \ - "pand %[msk2], %["R1"] \n\t" \ - "pmulhuw %[msk1], %["R0"] \n\t" \ - "pmullw %[msk3], %["R1"] \n\t" \ - "por %["R1"], %["R0"] \n\t" - -// Generate a block of inline assembly that takes R0 and R1 and translates -// their contents to the base64 alphabet, using preloaded constants. -#define TRAN(R0, R1, R2) \ - "movdqa %["R0"], %["R1"] \n\t" \ - "movdqa %["R0"], %["R2"] \n\t" \ - "psubusb %[n51], %["R1"] \n\t" \ - "pcmpgtb %[n25], %["R2"] \n\t" \ - "psubb %["R2"], %["R1"] \n\t" \ - "movdqa %[lut1], %["R2"] \n\t" \ - "pshufb %["R1"], %["R2"] \n\t" \ - "paddb %["R2"], %["R0"] \n\t" - -// Generate a block of inline assembly that stores the given register R0 at an -// offset set by the given round. -#define STOR(R0, ROUND) \ - "movdqu %["R0"], ("#ROUND" * 16)(%[dst]) \n\t" - -// Generate a block of inline assembly that generates a single self-contained -// encoder round: fetch the data, process it, and store the result. Then update -// the source and destination pointers. -#define ROUND() \ - LOAD("a", 0) \ - SHUF("a", "b") \ - TRAN("a", "b", "c") \ - STOR("a", 0) \ - "add $12, %[src] \n\t" \ - "add $16, %[dst] \n\t" - -// Define a macro that initiates a three-way interleaved encoding round by -// preloading registers a, b and c from memory. -// The register graph shows which registers are in use during each step, and -// is a visual aid for choosing registers for that step. Symbol index: -// -// + indicates that a register is loaded by that step. -// | indicates that a register is in use and must not be touched. -// - indicates that a register is decommissioned by that step. -// x indicates that a register is used as a temporary by that step. -// V indicates that a register is an input or output to the macro. -// -#define ROUND_3_INIT() /* a b c d e f */ \ - LOAD("a", 0) /* + */ \ - SHUF("a", "d") /* | + */ \ - LOAD("b", 1) /* | + | */ \ - TRAN("a", "d", "e") /* | | - x */ \ - LOAD("c", 2) /* V V V */ - -// Define a macro that translates, shuffles and stores the input registers A, B -// and C, and preloads registers D, E and F for the next round. -// This macro can be arbitrarily daisy-chained by feeding output registers D, E -// and F back into the next round as input registers A, B and C. The macro -// carefully interleaves memory operations with data operations for optimal -// pipelined performance. - -#define ROUND_3(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ - LOAD(D, (ROUND + 3)) /* V V V + */ \ - SHUF(B, E) /* | | | | + */ \ - STOR(A, (ROUND + 0)) /* - | | | | */ \ - TRAN(B, E, F) /* | | | - x */ \ - LOAD(E, (ROUND + 4)) /* | | | + */ \ - SHUF(C, A) /* + | | | | */ \ - STOR(B, (ROUND + 1)) /* | - | | | */ \ - TRAN(C, A, F) /* - | | | x */ \ - LOAD(F, (ROUND + 5)) /* | | | + */ \ - SHUF(D, A) /* + | | | | */ \ - STOR(C, (ROUND + 2)) /* | - | | | */ \ - TRAN(D, A, B) /* - x V V V */ - -// Define a macro that terminates a ROUND_3 macro by taking pre-loaded -// registers D, E and F, and translating, shuffling and storing them. -#define ROUND_3_END(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ - SHUF(E, A) /* + V V V */ \ - STOR(D, (ROUND + 3)) /* | - | | */ \ - TRAN(E, A, B) /* - x | | */ \ - SHUF(F, C) /* + | | */ \ - STOR(E, (ROUND + 4)) /* | - | */ \ - TRAN(F, C, D) /* - x | */ \ - STOR(F, (ROUND + 5)) /* - */ - -// Define a type A round. Inputs are a, b, and c, outputs are d, e, and f. -#define ROUND_3_A(ROUND) \ - ROUND_3(ROUND, "a", "b", "c", "d", "e", "f") - -// Define a type B round. Inputs and outputs are swapped with regard to type A. -#define ROUND_3_B(ROUND) \ - ROUND_3(ROUND, "d", "e", "f", "a", "b", "c") - -// Terminating macro for a type A round. -#define ROUND_3_A_LAST(ROUND) \ - ROUND_3_A(ROUND) \ - ROUND_3_END(ROUND, "a", "b", "c", "d", "e", "f") - -// Terminating macro for a type B round. -#define ROUND_3_B_LAST(ROUND) \ - ROUND_3_B(ROUND) \ - ROUND_3_END(ROUND, "d", "e", "f", "a", "b", "c") - -// Suppress clang's warning that the literal string in the asm statement is -// overlong (longer than the ISO-mandated minimum size of 4095 bytes for C99 -// compilers). It may be true, but the goal here is not C99 portability. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Woverlength-strings" - -static inline void -enc_loop_ssse3 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) -{ - // For a clearer explanation of the algorithm used by this function, - // please refer to the plain (not inline assembly) implementation. This - // function follows the same basic logic. - - if (*slen < 16) { - return; - } - - // Process blocks of 12 bytes at a time. Input is read in blocks of 16 - // bytes, so "reserve" four bytes from the input buffer to ensure that - // we never read beyond the end of the input buffer. - size_t rounds = (*slen - 4) / 12; - - *slen -= rounds * 12; // 12 bytes consumed per round - *olen += rounds * 16; // 16 bytes produced per round - - // Number of times to go through the 36x loop. - size_t loops = rounds / 36; - - // Number of rounds remaining after the 36x loop. - rounds %= 36; - - // Lookup tables. - const __m128i lut0 = _mm_set_epi8( - 10, 11, 9, 10, 7, 8, 6, 7, 4, 5, 3, 4, 1, 2, 0, 1); - - const __m128i lut1 = _mm_setr_epi8( - 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0); - - // Temporary registers. - __m128i a, b, c, d, e, f; - - __asm__ volatile ( - - // If there are 36 rounds or more, enter a 36x unrolled loop of - // interleaved encoding rounds. The rounds interleave memory - // operations (load/store) with data operations (table lookups, - // etc) to maximize pipeline throughput. - " test %[loops], %[loops] \n\t" - " jz 18f \n\t" - " jmp 36f \n\t" - " \n\t" - ".balign 64 \n\t" - "36: " ROUND_3_INIT() - " " ROUND_3_A( 0) - " " ROUND_3_B( 3) - " " ROUND_3_A( 6) - " " ROUND_3_B( 9) - " " ROUND_3_A(12) - " " ROUND_3_B(15) - " " ROUND_3_A(18) - " " ROUND_3_B(21) - " " ROUND_3_A(24) - " " ROUND_3_B(27) - " " ROUND_3_A_LAST(30) - " add $(12 * 36), %[src] \n\t" - " add $(16 * 36), %[dst] \n\t" - " dec %[loops] \n\t" - " jnz 36b \n\t" - - // Enter an 18x unrolled loop for rounds of 18 or more. - "18: cmp $18, %[rounds] \n\t" - " jl 9f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A(0) - " " ROUND_3_B(3) - " " ROUND_3_A(6) - " " ROUND_3_B(9) - " " ROUND_3_A_LAST(12) - " sub $18, %[rounds] \n\t" - " add $(12 * 18), %[src] \n\t" - " add $(16 * 18), %[dst] \n\t" - - // Enter a 9x unrolled loop for rounds of 9 or more. - "9: cmp $9, %[rounds] \n\t" - " jl 6f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A(0) - " " ROUND_3_B_LAST(3) - " sub $9, %[rounds] \n\t" - " add $(12 * 9), %[src] \n\t" - " add $(16 * 9), %[dst] \n\t" - - // Enter a 6x unrolled loop for rounds of 6 or more. - "6: cmp $6, %[rounds] \n\t" - " jl 55f \n\t" - " " ROUND_3_INIT() - " " ROUND_3_A_LAST(0) - " sub $6, %[rounds] \n\t" - " add $(12 * 6), %[src] \n\t" - " add $(16 * 6), %[dst] \n\t" - - // Dispatch the remaining rounds 0..5. - "55: cmp $3, %[rounds] \n\t" - " jg 45f \n\t" - " je 3f \n\t" - " cmp $1, %[rounds] \n\t" - " jg 2f \n\t" - " je 1f \n\t" - " jmp 0f \n\t" - - "45: cmp $4, %[rounds] \n\t" - " je 4f \n\t" - - // Block of non-interlaced encoding rounds, which can each - // individually be jumped to. Rounds fall through to the next. - "5: " ROUND() - "4: " ROUND() - "3: " ROUND() - "2: " ROUND() - "1: " ROUND() - "0: \n\t" - - // Outputs (modified). - : [rounds] "+r" (rounds), - [loops] "+r" (loops), - [src] "+r" (*s), - [dst] "+r" (*o), - [a] "=&x" (a), - [b] "=&x" (b), - [c] "=&x" (c), - [d] "=&x" (d), - [e] "=&x" (e), - [f] "=&x" (f) - - // Inputs (not modified). - : [lut0] "x" (lut0), - [lut1] "x" (lut1), - [msk0] "x" (_mm_set1_epi32(0x0FC0FC00)), - [msk1] "x" (_mm_set1_epi32(0x04000040)), - [msk2] "x" (_mm_set1_epi32(0x003F03F0)), - [msk3] "x" (_mm_set1_epi32(0x01000010)), - [n51] "x" (_mm_set1_epi8(51)), - [n25] "x" (_mm_set1_epi8(25)) - - // Clobbers. - : "cc", "memory" - ); -} - -#pragma GCC diagnostic pop diff --git a/deps/base64/base64/lib/arch/ssse3/enc_reshuffle.c b/deps/base64/base64/lib/arch/ssse3/enc_reshuffle.c deleted file mode 100644 index b738591f9f2683..00000000000000 --- a/deps/base64/base64/lib/arch/ssse3/enc_reshuffle.c +++ /dev/null @@ -1,48 +0,0 @@ -static inline __m128i -enc_reshuffle (__m128i in) -{ - // Input, bytes MSB to LSB: - // 0 0 0 0 l k j i h g f e d c b a - - in = _mm_shuffle_epi8(in, _mm_set_epi8( - 10, 11, 9, 10, - 7, 8, 6, 7, - 4, 5, 3, 4, - 1, 2, 0, 1)); - // in, bytes MSB to LSB: - // k l j k - // h i g h - // e f d e - // b c a b - - const __m128i t0 = _mm_and_si128(in, _mm_set1_epi32(0x0FC0FC00)); - // bits, upper case are most significant bits, lower case are least significant bits - // 0000kkkk LL000000 JJJJJJ00 00000000 - // 0000hhhh II000000 GGGGGG00 00000000 - // 0000eeee FF000000 DDDDDD00 00000000 - // 0000bbbb CC000000 AAAAAA00 00000000 - - const __m128i t1 = _mm_mulhi_epu16(t0, _mm_set1_epi32(0x04000040)); - // 00000000 00kkkkLL 00000000 00JJJJJJ - // 00000000 00hhhhII 00000000 00GGGGGG - // 00000000 00eeeeFF 00000000 00DDDDDD - // 00000000 00bbbbCC 00000000 00AAAAAA - - const __m128i t2 = _mm_and_si128(in, _mm_set1_epi32(0x003F03F0)); - // 00000000 00llllll 000000jj KKKK0000 - // 00000000 00iiiiii 000000gg HHHH0000 - // 00000000 00ffffff 000000dd EEEE0000 - // 00000000 00cccccc 000000aa BBBB0000 - - const __m128i t3 = _mm_mullo_epi16(t2, _mm_set1_epi32(0x01000010)); - // 00llllll 00000000 00jjKKKK 00000000 - // 00iiiiii 00000000 00ggHHHH 00000000 - // 00ffffff 00000000 00ddEEEE 00000000 - // 00cccccc 00000000 00aaBBBB 00000000 - - return _mm_or_si128(t1, t3); - // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ - // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG - // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD - // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA -} diff --git a/deps/base64/base64/lib/arch/ssse3/enc_translate.c b/deps/base64/base64/lib/arch/ssse3/enc_translate.c deleted file mode 100644 index 04f288fccb62b1..00000000000000 --- a/deps/base64/base64/lib/arch/ssse3/enc_translate.c +++ /dev/null @@ -1,33 +0,0 @@ -static inline __m128i -enc_translate (const __m128i in) -{ - // A lookup table containing the absolute offsets for all ranges: - const __m128i lut = _mm_setr_epi8( - 65, 71, -4, -4, - -4, -4, -4, -4, - -4, -4, -4, -4, - -19, -16, 0, 0 - ); - - // Translate values 0..63 to the Base64 alphabet. There are five sets: - // # From To Abs Index Characters - // 0 [0..25] [65..90] +65 0 ABCDEFGHIJKLMNOPQRSTUVWXYZ - // 1 [26..51] [97..122] +71 1 abcdefghijklmnopqrstuvwxyz - // 2 [52..61] [48..57] -4 [2..11] 0123456789 - // 3 [62] [43] -19 12 + - // 4 [63] [47] -16 13 / - - // Create LUT indices from the input. The index for range #0 is right, - // others are 1 less than expected: - __m128i indices = _mm_subs_epu8(in, _mm_set1_epi8(51)); - - // mask is 0xFF (-1) for range #[1..4] and 0x00 for range #0: - __m128i mask = _mm_cmpgt_epi8(in, _mm_set1_epi8(25)); - - // Subtract -1, so add 1 to indices for range #[1..4]. All indices are - // now correct: - indices = _mm_sub_epi8(indices, mask); - - // Add offsets to input values: - return _mm_add_epi8(in, _mm_shuffle_epi8(lut, indices)); -} diff --git a/deps/base64/base64/lib/codec_choose.c b/deps/base64/base64/lib/codec_choose.c deleted file mode 100644 index abef3f2ae9f403..00000000000000 --- a/deps/base64/base64/lib/codec_choose.c +++ /dev/null @@ -1,305 +0,0 @@ -#include <stdbool.h> -#include <stdint.h> -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> - -#include "../include/libbase64.h" -#include "codecs.h" -#include "config.h" -#include "env.h" - -#if (__x86_64__ || __i386__ || _M_X86 || _M_X64) - #define BASE64_X86 - #if (HAVE_SSSE3 || HAVE_SSE41 || HAVE_SSE42 || HAVE_AVX || HAVE_AVX2 || HAVE_AVX512) - #define BASE64_X86_SIMD - #endif -#endif - -#ifdef BASE64_X86 -#ifdef _MSC_VER - #include <intrin.h> - #define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ - { \ - int info[4]; \ - __cpuidex(info, __level, __count); \ - __eax = info[0]; \ - __ebx = info[1]; \ - __ecx = info[2]; \ - __edx = info[3]; \ - } - #define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ - __cpuid_count(__level, 0, __eax, __ebx, __ecx, __edx) -#else - #include <cpuid.h> - #if HAVE_AVX512 || HAVE_AVX2 || HAVE_AVX - #if ((__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__clang_major__ >= 3)) - static inline uint64_t _xgetbv (uint32_t index) - { - uint32_t eax, edx; - __asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index)); - return ((uint64_t)edx << 32) | eax; - } - #else - #error "Platform not supported" - #endif - #endif -#endif - -#ifndef bit_AVX512vl -#define bit_AVX512vl (1 << 31) -#endif -#ifndef bit_AVX512vbmi -#define bit_AVX512vbmi (1 << 1) -#endif -#ifndef bit_AVX2 -#define bit_AVX2 (1 << 5) -#endif -#ifndef bit_SSSE3 -#define bit_SSSE3 (1 << 9) -#endif -#ifndef bit_SSE41 -#define bit_SSE41 (1 << 19) -#endif -#ifndef bit_SSE42 -#define bit_SSE42 (1 << 20) -#endif -#ifndef bit_AVX -#define bit_AVX (1 << 28) -#endif - -#define bit_XSAVE_XRSTORE (1 << 27) - -#ifndef _XCR_XFEATURE_ENABLED_MASK -#define _XCR_XFEATURE_ENABLED_MASK 0 -#endif - -#define _XCR_XMM_AND_YMM_STATE_ENABLED_BY_OS 0x6 -#endif - -// Function declarations: -#define BASE64_CODEC_FUNCS(arch) \ - BASE64_ENC_FUNCTION(arch); \ - BASE64_DEC_FUNCTION(arch); \ - -BASE64_CODEC_FUNCS(avx512) -BASE64_CODEC_FUNCS(avx2) -BASE64_CODEC_FUNCS(neon32) -BASE64_CODEC_FUNCS(neon64) -BASE64_CODEC_FUNCS(plain) -BASE64_CODEC_FUNCS(ssse3) -BASE64_CODEC_FUNCS(sse41) -BASE64_CODEC_FUNCS(sse42) -BASE64_CODEC_FUNCS(avx) - -static bool -codec_choose_forced (struct codec *codec, int flags) -{ - // If the user wants to use a certain codec, - // always allow it, even if the codec is a no-op. - // For testing purposes. - - if (!(flags & 0xFFFF)) { - return false; - } - - if (flags & BASE64_FORCE_AVX2) { - codec->enc = base64_stream_encode_avx2; - codec->dec = base64_stream_decode_avx2; - return true; - } - if (flags & BASE64_FORCE_NEON32) { - codec->enc = base64_stream_encode_neon32; - codec->dec = base64_stream_decode_neon32; - return true; - } - if (flags & BASE64_FORCE_NEON64) { - codec->enc = base64_stream_encode_neon64; - codec->dec = base64_stream_decode_neon64; - return true; - } - if (flags & BASE64_FORCE_PLAIN) { - codec->enc = base64_stream_encode_plain; - codec->dec = base64_stream_decode_plain; - return true; - } - if (flags & BASE64_FORCE_SSSE3) { - codec->enc = base64_stream_encode_ssse3; - codec->dec = base64_stream_decode_ssse3; - return true; - } - if (flags & BASE64_FORCE_SSE41) { - codec->enc = base64_stream_encode_sse41; - codec->dec = base64_stream_decode_sse41; - return true; - } - if (flags & BASE64_FORCE_SSE42) { - codec->enc = base64_stream_encode_sse42; - codec->dec = base64_stream_decode_sse42; - return true; - } - if (flags & BASE64_FORCE_AVX) { - codec->enc = base64_stream_encode_avx; - codec->dec = base64_stream_decode_avx; - return true; - } - if (flags & BASE64_FORCE_AVX512) { - codec->enc = base64_stream_encode_avx512; - codec->dec = base64_stream_decode_avx512; - return true; - } - return false; -} - -static bool -codec_choose_arm (struct codec *codec) -{ -#if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && ((defined(__aarch64__) && HAVE_NEON64) || HAVE_NEON32) - - // Unfortunately there is no portable way to check for NEON - // support at runtime from userland in the same way that x86 - // has cpuid, so just stick to the compile-time configuration: - - #if defined(__aarch64__) && HAVE_NEON64 - codec->enc = base64_stream_encode_neon64; - codec->dec = base64_stream_decode_neon64; - #else - codec->enc = base64_stream_encode_neon32; - codec->dec = base64_stream_decode_neon32; - #endif - - return true; - -#else - (void)codec; - return false; -#endif -} - -static bool -codec_choose_x86 (struct codec *codec) -{ -#ifdef BASE64_X86_SIMD - - unsigned int eax, ebx = 0, ecx = 0, edx; - unsigned int max_level; - - #ifdef _MSC_VER - int info[4]; - __cpuidex(info, 0, 0); - max_level = info[0]; - #else - max_level = __get_cpuid_max(0, NULL); - #endif - - #if HAVE_AVX512 || HAVE_AVX2 || HAVE_AVX - // Check for AVX/AVX2/AVX512 support: - // Checking for AVX requires 3 things: - // 1) CPUID indicates that the OS uses XSAVE and XRSTORE instructions - // (allowing saving YMM registers on context switch) - // 2) CPUID indicates support for AVX - // 3) XGETBV indicates the AVX registers will be saved and restored on - // context switch - // - // Note that XGETBV is only available on 686 or later CPUs, so the - // instruction needs to be conditionally run. - if (max_level >= 1) { - __cpuid_count(1, 0, eax, ebx, ecx, edx); - if (ecx & bit_XSAVE_XRSTORE) { - uint64_t xcr_mask; - xcr_mask = _xgetbv(_XCR_XFEATURE_ENABLED_MASK); - if ((xcr_mask & _XCR_XMM_AND_YMM_STATE_ENABLED_BY_OS) == _XCR_XMM_AND_YMM_STATE_ENABLED_BY_OS) { // check multiple bits at once - #if HAVE_AVX512 - if (max_level >= 7) { - __cpuid_count(7, 0, eax, ebx, ecx, edx); - if ((ebx & bit_AVX512vl) && (ecx & bit_AVX512vbmi)) { - codec->enc = base64_stream_encode_avx512; - codec->dec = base64_stream_decode_avx512; - return true; - } - } - #endif - #if HAVE_AVX2 - if (max_level >= 7) { - __cpuid_count(7, 0, eax, ebx, ecx, edx); - if (ebx & bit_AVX2) { - codec->enc = base64_stream_encode_avx2; - codec->dec = base64_stream_decode_avx2; - return true; - } - } - #endif - #if HAVE_AVX - __cpuid_count(1, 0, eax, ebx, ecx, edx); - if (ecx & bit_AVX) { - codec->enc = base64_stream_encode_avx; - codec->dec = base64_stream_decode_avx; - return true; - } - #endif - } - } - } - #endif - - #if HAVE_SSE42 - // Check for SSE42 support: - if (max_level >= 1) { - __cpuid(1, eax, ebx, ecx, edx); - if (ecx & bit_SSE42) { - codec->enc = base64_stream_encode_sse42; - codec->dec = base64_stream_decode_sse42; - return true; - } - } - #endif - - #if HAVE_SSE41 - // Check for SSE41 support: - if (max_level >= 1) { - __cpuid(1, eax, ebx, ecx, edx); - if (ecx & bit_SSE41) { - codec->enc = base64_stream_encode_sse41; - codec->dec = base64_stream_decode_sse41; - return true; - } - } - #endif - - #if HAVE_SSSE3 - // Check for SSSE3 support: - if (max_level >= 1) { - __cpuid(1, eax, ebx, ecx, edx); - if (ecx & bit_SSSE3) { - codec->enc = base64_stream_encode_ssse3; - codec->dec = base64_stream_decode_ssse3; - return true; - } - } - #endif - -#else - (void)codec; -#endif - - return false; -} - -void -codec_choose (struct codec *codec, int flags) -{ - // User forced a codec: - if (codec_choose_forced(codec, flags)) { - return; - } - - // Runtime feature detection: - if (codec_choose_arm(codec)) { - return; - } - if (codec_choose_x86(codec)) { - return; - } - codec->enc = base64_stream_encode_plain; - codec->dec = base64_stream_decode_plain; -} diff --git a/deps/base64/base64/lib/codecs.h b/deps/base64/base64/lib/codecs.h deleted file mode 100644 index 441fd600a45e02..00000000000000 --- a/deps/base64/base64/lib/codecs.h +++ /dev/null @@ -1,65 +0,0 @@ -#include <stdint.h> -#include <stddef.h> - -#include "../include/libbase64.h" -#include "config.h" - -// Function parameters for encoding functions: -#define BASE64_ENC_PARAMS \ - ( struct base64_state *state \ - , const char *src \ - , size_t srclen \ - , char *out \ - , size_t *outlen \ - ) - -// Function parameters for decoding functions: -#define BASE64_DEC_PARAMS \ - ( struct base64_state *state \ - , const char *src \ - , size_t srclen \ - , char *out \ - , size_t *outlen \ - ) - -// Function signature for encoding functions: -#define BASE64_ENC_FUNCTION(arch) \ - void \ - base64_stream_encode_ ## arch \ - BASE64_ENC_PARAMS - -// Function signature for decoding functions: -#define BASE64_DEC_FUNCTION(arch) \ - int \ - base64_stream_decode_ ## arch \ - BASE64_DEC_PARAMS - -// Cast away unused variable, silence compiler: -#define UNUSED(x) ((void)(x)) - -// Stub function when encoder arch unsupported: -#define BASE64_ENC_STUB \ - UNUSED(state); \ - UNUSED(src); \ - UNUSED(srclen); \ - UNUSED(out); \ - \ - *outlen = 0; - -// Stub function when decoder arch unsupported: -#define BASE64_DEC_STUB \ - UNUSED(state); \ - UNUSED(src); \ - UNUSED(srclen); \ - UNUSED(out); \ - UNUSED(outlen); \ - \ - return -1; - -struct codec -{ - void (* enc) BASE64_ENC_PARAMS; - int (* dec) BASE64_DEC_PARAMS; -}; - -extern void codec_choose (struct codec *, int flags); diff --git a/deps/base64/base64/lib/config.h b/deps/base64/base64/lib/config.h deleted file mode 100644 index 5885289003f0a4..00000000000000 --- a/deps/base64/base64/lib/config.h +++ /dev/null @@ -1 +0,0 @@ -// Intentionally empty diff --git a/deps/base64/base64/lib/env.h b/deps/base64/base64/lib/env.h deleted file mode 100644 index d489ba54215bbf..00000000000000 --- a/deps/base64/base64/lib/env.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef BASE64_ENV_H -#define BASE64_ENV_H - -#include <stdint.h> - -// This header file contains macro definitions that describe certain aspects of -// the compile-time environment. Compatibility and portability macros go here. - -// Define machine endianness. This is for GCC: -#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) -# define BASE64_LITTLE_ENDIAN 1 -#else -# define BASE64_LITTLE_ENDIAN 0 -#endif - -// This is for Clang: -#ifdef __LITTLE_ENDIAN__ -# define BASE64_LITTLE_ENDIAN 1 -#endif - -#ifdef __BIG_ENDIAN__ -# define BASE64_LITTLE_ENDIAN 0 -#endif - -// MSVC++ needs intrin.h for _byteswap_uint64 (issue #68): -#if BASE64_LITTLE_ENDIAN && defined(_MSC_VER) -# include <intrin.h> -#endif - -// Endian conversion functions: -#if BASE64_LITTLE_ENDIAN -# ifdef _MSC_VER -// Microsoft Visual C++: -# define BASE64_HTOBE32(x) _byteswap_ulong(x) -# define BASE64_HTOBE64(x) _byteswap_uint64(x) -# else -// GCC and Clang: -# define BASE64_HTOBE32(x) __builtin_bswap32(x) -# define BASE64_HTOBE64(x) __builtin_bswap64(x) -# endif -#else -// No conversion needed: -# define BASE64_HTOBE32(x) (x) -# define BASE64_HTOBE64(x) (x) -#endif - -// Detect word size: -#if defined (__x86_64__) -// This also works for the x32 ABI, which has a 64-bit word size. -# define BASE64_WORDSIZE 64 -#elif SIZE_MAX == UINT32_MAX -# define BASE64_WORDSIZE 32 -#elif SIZE_MAX == UINT64_MAX -# define BASE64_WORDSIZE 64 -#else -# error BASE64_WORDSIZE_NOT_DEFINED -#endif - -// End-of-file definitions. -// Almost end-of-file when waiting for the last '=' character: -#define BASE64_AEOF 1 -// End-of-file when stream end has been reached or invalid input provided: -#define BASE64_EOF 2 - -// GCC 7 defaults to issuing a warning for fallthrough in switch statements, -// unless the fallthrough cases are marked with an attribute. As we use -// fallthrough deliberately, define an alias for the attribute: -#if __GNUC__ >= 7 -# define BASE64_FALLTHROUGH __attribute__((fallthrough)); -#else -# define BASE64_FALLTHROUGH -#endif - -#endif // BASE64_ENV_H diff --git a/deps/base64/base64/lib/exports.txt b/deps/base64/base64/lib/exports.txt deleted file mode 100644 index 67d45588f50575..00000000000000 --- a/deps/base64/base64/lib/exports.txt +++ /dev/null @@ -1,7 +0,0 @@ -base64_encode -base64_stream_encode -base64_stream_encode_init -base64_stream_encode_final -base64_decode -base64_stream_decode -base64_stream_decode_init diff --git a/deps/base64/base64/lib/lib.c b/deps/base64/base64/lib/lib.c deleted file mode 100644 index 053931a9918b2b..00000000000000 --- a/deps/base64/base64/lib/lib.c +++ /dev/null @@ -1,164 +0,0 @@ -#include <stdint.h> -#include <stddef.h> -#ifdef _OPENMP -#include <omp.h> -#endif - -#include "../include/libbase64.h" -#include "tables/tables.h" -#include "codecs.h" -#include "env.h" - -// These static function pointers are initialized once when the library is -// first used, and remain in use for the remaining lifetime of the program. -// The idea being that CPU features don't change at runtime. -static struct codec codec = { NULL, NULL }; - -void -base64_stream_encode_init (struct base64_state *state, int flags) -{ - // If any of the codec flags are set, redo choice: - if (codec.enc == NULL || flags & 0xFF) { - codec_choose(&codec, flags); - } - state->eof = 0; - state->bytes = 0; - state->carry = 0; - state->flags = flags; -} - -void -base64_stream_encode - ( struct base64_state *state - , const char *src - , size_t srclen - , char *out - , size_t *outlen - ) -{ - codec.enc(state, src, srclen, out, outlen); -} - -void -base64_stream_encode_final - ( struct base64_state *state - , char *out - , size_t *outlen - ) -{ - uint8_t *o = (uint8_t *)out; - - if (state->bytes == 1) { - *o++ = base64_table_enc_6bit[state->carry]; - *o++ = '='; - *o++ = '='; - *outlen = 3; - return; - } - if (state->bytes == 2) { - *o++ = base64_table_enc_6bit[state->carry]; - *o++ = '='; - *outlen = 2; - return; - } - *outlen = 0; -} - -void -base64_stream_decode_init (struct base64_state *state, int flags) -{ - // If any of the codec flags are set, redo choice: - if (codec.dec == NULL || flags & 0xFFFF) { - codec_choose(&codec, flags); - } - state->eof = 0; - state->bytes = 0; - state->carry = 0; - state->flags = flags; -} - -int -base64_stream_decode - ( struct base64_state *state - , const char *src - , size_t srclen - , char *out - , size_t *outlen - ) -{ - return codec.dec(state, src, srclen, out, outlen); -} - -#ifdef _OPENMP - - // Due to the overhead of initializing OpenMP and creating a team of - // threads, we require the data length to be larger than a threshold: - #define OMP_THRESHOLD 20000 - - // Conditionally include OpenMP-accelerated codec implementations: - #include "lib_openmp.c" -#endif - -void -base64_encode - ( const char *src - , size_t srclen - , char *out - , size_t *outlen - , int flags - ) -{ - size_t s; - size_t t; - struct base64_state state; - - #ifdef _OPENMP - if (srclen >= OMP_THRESHOLD) { - base64_encode_openmp(src, srclen, out, outlen, flags); - return; - } - #endif - - // Init the stream reader: - base64_stream_encode_init(&state, flags); - - // Feed the whole string to the stream reader: - base64_stream_encode(&state, src, srclen, out, &s); - - // Finalize the stream by writing trailer if any: - base64_stream_encode_final(&state, out + s, &t); - - // Final output length is stream length plus tail: - *outlen = s + t; -} - -int -base64_decode - ( const char *src - , size_t srclen - , char *out - , size_t *outlen - , int flags - ) -{ - int ret; - struct base64_state state; - - #ifdef _OPENMP - if (srclen >= OMP_THRESHOLD) { - return base64_decode_openmp(src, srclen, out, outlen, flags); - } - #endif - - // Init the stream reader: - base64_stream_decode_init(&state, flags); - - // Feed the whole string to the stream reader: - ret = base64_stream_decode(&state, src, srclen, out, outlen); - - // If when decoding a whole block, we're still waiting for input then fail: - if (ret && (state.bytes == 0)) { - return ret; - } - return 0; -} diff --git a/deps/base64/base64/lib/lib_openmp.c b/deps/base64/base64/lib/lib_openmp.c deleted file mode 100644 index 6b87c52486bb49..00000000000000 --- a/deps/base64/base64/lib/lib_openmp.c +++ /dev/null @@ -1,149 +0,0 @@ -// This code makes some assumptions on the implementation of -// base64_stream_encode_init(), base64_stream_encode() and base64_stream_decode(). -// Basically these assumptions boil down to that when breaking the src into -// parts, out parts can be written without side effects. -// This is met when: -// 1) base64_stream_encode() and base64_stream_decode() don't use globals; -// 2) the shared variables src and out are not read or written outside of the -// bounds of their parts, i.e. when base64_stream_encode() reads a multiple -// of 3 bytes, it must write no more then a multiple of 4 bytes, not even -// temporarily; -// 3) the state flag can be discarded after base64_stream_encode() and -// base64_stream_decode() on the parts. - -static inline void -base64_encode_openmp - ( const char *src - , size_t srclen - , char *out - , size_t *outlen - , int flags - ) -{ - size_t s; - size_t t; - size_t sum = 0, len, last_len; - struct base64_state state, initial_state; - int num_threads, i; - - // Request a number of threads but not necessarily get them: - #pragma omp parallel - { - // Get the number of threads used from one thread only, - // as num_threads is a shared var: - #pragma omp single - { - num_threads = omp_get_num_threads(); - - // Split the input string into num_threads parts, each - // part a multiple of 3 bytes. The remaining bytes will - // be done later: - len = srclen / (num_threads * 3); - len *= 3; - last_len = srclen - num_threads * len; - - // Init the stream reader: - base64_stream_encode_init(&state, flags); - initial_state = state; - } - - // Single has an implicit barrier for all threads to wait here - // for the above to complete: - #pragma omp for firstprivate(state) private(s) reduction(+:sum) schedule(static,1) - for (i = 0; i < num_threads; i++) - { - // Feed each part of the string to the stream reader: - base64_stream_encode(&state, src + i * len, len, out + i * len * 4 / 3, &s); - sum += s; - } - } - - // As encoding should never fail and we encode an exact multiple - // of 3 bytes, we can discard state: - state = initial_state; - - // Encode the remaining bytes: - base64_stream_encode(&state, src + num_threads * len, last_len, out + num_threads * len * 4 / 3, &s); - - // Finalize the stream by writing trailer if any: - base64_stream_encode_final(&state, out + num_threads * len * 4 / 3 + s, &t); - - // Final output length is stream length plus tail: - sum += s + t; - *outlen = sum; -} - -static inline int -base64_decode_openmp - ( const char *src - , size_t srclen - , char *out - , size_t *outlen - , int flags - ) -{ - int num_threads, result = 0, i; - size_t sum = 0, len, last_len, s; - struct base64_state state, initial_state; - - // Request a number of threads but not necessarily get them: - #pragma omp parallel - { - // Get the number of threads used from one thread only, - // as num_threads is a shared var: - #pragma omp single - { - num_threads = omp_get_num_threads(); - - // Split the input string into num_threads parts, each - // part a multiple of 4 bytes. The remaining bytes will - // be done later: - len = srclen / (num_threads * 4); - len *= 4; - last_len = srclen - num_threads * len; - - // Init the stream reader: - base64_stream_decode_init(&state, flags); - - initial_state = state; - } - - // Single has an implicit barrier to wait here for the above to - // complete: - #pragma omp for firstprivate(state) private(s) reduction(+:sum, result) schedule(static,1) - for (i = 0; i < num_threads; i++) - { - int this_result; - - // Feed each part of the string to the stream reader: - this_result = base64_stream_decode(&state, src + i * len, len, out + i * len * 3 / 4, &s); - sum += s; - result += this_result; - } - } - - // If `result' equals `-num_threads', then all threads returned -1, - // indicating that the requested codec is not available: - if (result == -num_threads) { - return -1; - } - - // If `result' does not equal `num_threads', then at least one of the - // threads hit a decode error: - if (result != num_threads) { - return 0; - } - - // So far so good, now decode whatever remains in the buffer. Reuse the - // initial state, since we are at a 4-byte boundary: - state = initial_state; - result = base64_stream_decode(&state, src + num_threads * len, last_len, out + num_threads * len * 3 / 4, &s); - sum += s; - *outlen = sum; - - // If when decoding a whole block, we're still waiting for input then fail: - if (result && (state.bytes == 0)) { - return result; - } - return 0; -} diff --git a/deps/base64/base64/lib/tables/.gitignore b/deps/base64/base64/lib/tables/.gitignore deleted file mode 100644 index 68043ffdf17d3e..00000000000000 --- a/deps/base64/base64/lib/tables/.gitignore +++ /dev/null @@ -1 +0,0 @@ -table_generator diff --git a/deps/base64/base64/lib/tables/Makefile b/deps/base64/base64/lib/tables/Makefile deleted file mode 100644 index b47b93e77498ed..00000000000000 --- a/deps/base64/base64/lib/tables/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -.PHONY: all clean - -TARGETS := table_dec_32bit.h table_enc_12bit.h table_generator - -all: $(TARGETS) - -clean: - $(RM) $(TARGETS) - -table_dec_32bit.h: table_generator - ./$^ > $@ - -table_enc_12bit.h: table_enc_12bit.py - ./$^ > $@ - -table_generator: table_generator.c - $(CC) $(CFLAGS) -o $@ $^ diff --git a/deps/base64/base64/lib/tables/table_dec_32bit.h b/deps/base64/base64/lib/tables/table_dec_32bit.h deleted file mode 100644 index f5d951fa79c717..00000000000000 --- a/deps/base64/base64/lib/tables/table_dec_32bit.h +++ /dev/null @@ -1,393 +0,0 @@ -#include <stdint.h> -#define CHAR62 '+' -#define CHAR63 '/' -#define CHARPAD '=' - - -#if BASE64_LITTLE_ENDIAN - - -/* SPECIAL DECODE TABLES FOR LITTLE ENDIAN (INTEL) CPUS */ - -const uint32_t base64_table_dec_32bit_d0[256] = { -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x000000f8, 0xffffffff, 0xffffffff, 0xffffffff, 0x000000fc, -0x000000d0, 0x000000d4, 0x000000d8, 0x000000dc, 0x000000e0, 0x000000e4, -0x000000e8, 0x000000ec, 0x000000f0, 0x000000f4, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, -0x00000004, 0x00000008, 0x0000000c, 0x00000010, 0x00000014, 0x00000018, -0x0000001c, 0x00000020, 0x00000024, 0x00000028, 0x0000002c, 0x00000030, -0x00000034, 0x00000038, 0x0000003c, 0x00000040, 0x00000044, 0x00000048, -0x0000004c, 0x00000050, 0x00000054, 0x00000058, 0x0000005c, 0x00000060, -0x00000064, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x00000068, 0x0000006c, 0x00000070, 0x00000074, 0x00000078, -0x0000007c, 0x00000080, 0x00000084, 0x00000088, 0x0000008c, 0x00000090, -0x00000094, 0x00000098, 0x0000009c, 0x000000a0, 0x000000a4, 0x000000a8, -0x000000ac, 0x000000b0, 0x000000b4, 0x000000b8, 0x000000bc, 0x000000c0, -0x000000c4, 0x000000c8, 0x000000cc, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff -}; - - -const uint32_t base64_table_dec_32bit_d1[256] = { -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x0000e003, 0xffffffff, 0xffffffff, 0xffffffff, 0x0000f003, -0x00004003, 0x00005003, 0x00006003, 0x00007003, 0x00008003, 0x00009003, -0x0000a003, 0x0000b003, 0x0000c003, 0x0000d003, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, -0x00001000, 0x00002000, 0x00003000, 0x00004000, 0x00005000, 0x00006000, -0x00007000, 0x00008000, 0x00009000, 0x0000a000, 0x0000b000, 0x0000c000, -0x0000d000, 0x0000e000, 0x0000f000, 0x00000001, 0x00001001, 0x00002001, -0x00003001, 0x00004001, 0x00005001, 0x00006001, 0x00007001, 0x00008001, -0x00009001, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x0000a001, 0x0000b001, 0x0000c001, 0x0000d001, 0x0000e001, -0x0000f001, 0x00000002, 0x00001002, 0x00002002, 0x00003002, 0x00004002, -0x00005002, 0x00006002, 0x00007002, 0x00008002, 0x00009002, 0x0000a002, -0x0000b002, 0x0000c002, 0x0000d002, 0x0000e002, 0x0000f002, 0x00000003, -0x00001003, 0x00002003, 0x00003003, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff -}; - - -const uint32_t base64_table_dec_32bit_d2[256] = { -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x00800f00, 0xffffffff, 0xffffffff, 0xffffffff, 0x00c00f00, -0x00000d00, 0x00400d00, 0x00800d00, 0x00c00d00, 0x00000e00, 0x00400e00, -0x00800e00, 0x00c00e00, 0x00000f00, 0x00400f00, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, -0x00400000, 0x00800000, 0x00c00000, 0x00000100, 0x00400100, 0x00800100, -0x00c00100, 0x00000200, 0x00400200, 0x00800200, 0x00c00200, 0x00000300, -0x00400300, 0x00800300, 0x00c00300, 0x00000400, 0x00400400, 0x00800400, -0x00c00400, 0x00000500, 0x00400500, 0x00800500, 0x00c00500, 0x00000600, -0x00400600, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x00800600, 0x00c00600, 0x00000700, 0x00400700, 0x00800700, -0x00c00700, 0x00000800, 0x00400800, 0x00800800, 0x00c00800, 0x00000900, -0x00400900, 0x00800900, 0x00c00900, 0x00000a00, 0x00400a00, 0x00800a00, -0x00c00a00, 0x00000b00, 0x00400b00, 0x00800b00, 0x00c00b00, 0x00000c00, -0x00400c00, 0x00800c00, 0x00c00c00, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff -}; - - -const uint32_t base64_table_dec_32bit_d3[256] = { -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x003e0000, 0xffffffff, 0xffffffff, 0xffffffff, 0x003f0000, -0x00340000, 0x00350000, 0x00360000, 0x00370000, 0x00380000, 0x00390000, -0x003a0000, 0x003b0000, 0x003c0000, 0x003d0000, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, -0x00010000, 0x00020000, 0x00030000, 0x00040000, 0x00050000, 0x00060000, -0x00070000, 0x00080000, 0x00090000, 0x000a0000, 0x000b0000, 0x000c0000, -0x000d0000, 0x000e0000, 0x000f0000, 0x00100000, 0x00110000, 0x00120000, -0x00130000, 0x00140000, 0x00150000, 0x00160000, 0x00170000, 0x00180000, -0x00190000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x001a0000, 0x001b0000, 0x001c0000, 0x001d0000, 0x001e0000, -0x001f0000, 0x00200000, 0x00210000, 0x00220000, 0x00230000, 0x00240000, -0x00250000, 0x00260000, 0x00270000, 0x00280000, 0x00290000, 0x002a0000, -0x002b0000, 0x002c0000, 0x002d0000, 0x002e0000, 0x002f0000, 0x00300000, -0x00310000, 0x00320000, 0x00330000, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff -}; - - -#else - - -/* SPECIAL DECODE TABLES FOR BIG ENDIAN (IBM/MOTOROLA/SUN) CPUS */ - -const uint32_t base64_table_dec_32bit_d0[256] = { -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xf8000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xfc000000, -0xd0000000, 0xd4000000, 0xd8000000, 0xdc000000, 0xe0000000, 0xe4000000, -0xe8000000, 0xec000000, 0xf0000000, 0xf4000000, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, -0x04000000, 0x08000000, 0x0c000000, 0x10000000, 0x14000000, 0x18000000, -0x1c000000, 0x20000000, 0x24000000, 0x28000000, 0x2c000000, 0x30000000, -0x34000000, 0x38000000, 0x3c000000, 0x40000000, 0x44000000, 0x48000000, -0x4c000000, 0x50000000, 0x54000000, 0x58000000, 0x5c000000, 0x60000000, -0x64000000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x68000000, 0x6c000000, 0x70000000, 0x74000000, 0x78000000, -0x7c000000, 0x80000000, 0x84000000, 0x88000000, 0x8c000000, 0x90000000, -0x94000000, 0x98000000, 0x9c000000, 0xa0000000, 0xa4000000, 0xa8000000, -0xac000000, 0xb0000000, 0xb4000000, 0xb8000000, 0xbc000000, 0xc0000000, -0xc4000000, 0xc8000000, 0xcc000000, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff -}; - - -const uint32_t base64_table_dec_32bit_d1[256] = { -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x03e00000, 0xffffffff, 0xffffffff, 0xffffffff, 0x03f00000, -0x03400000, 0x03500000, 0x03600000, 0x03700000, 0x03800000, 0x03900000, -0x03a00000, 0x03b00000, 0x03c00000, 0x03d00000, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, -0x00100000, 0x00200000, 0x00300000, 0x00400000, 0x00500000, 0x00600000, -0x00700000, 0x00800000, 0x00900000, 0x00a00000, 0x00b00000, 0x00c00000, -0x00d00000, 0x00e00000, 0x00f00000, 0x01000000, 0x01100000, 0x01200000, -0x01300000, 0x01400000, 0x01500000, 0x01600000, 0x01700000, 0x01800000, -0x01900000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x01a00000, 0x01b00000, 0x01c00000, 0x01d00000, 0x01e00000, -0x01f00000, 0x02000000, 0x02100000, 0x02200000, 0x02300000, 0x02400000, -0x02500000, 0x02600000, 0x02700000, 0x02800000, 0x02900000, 0x02a00000, -0x02b00000, 0x02c00000, 0x02d00000, 0x02e00000, 0x02f00000, 0x03000000, -0x03100000, 0x03200000, 0x03300000, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff -}; - - -const uint32_t base64_table_dec_32bit_d2[256] = { -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x000f8000, 0xffffffff, 0xffffffff, 0xffffffff, 0x000fc000, -0x000d0000, 0x000d4000, 0x000d8000, 0x000dc000, 0x000e0000, 0x000e4000, -0x000e8000, 0x000ec000, 0x000f0000, 0x000f4000, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, -0x00004000, 0x00008000, 0x0000c000, 0x00010000, 0x00014000, 0x00018000, -0x0001c000, 0x00020000, 0x00024000, 0x00028000, 0x0002c000, 0x00030000, -0x00034000, 0x00038000, 0x0003c000, 0x00040000, 0x00044000, 0x00048000, -0x0004c000, 0x00050000, 0x00054000, 0x00058000, 0x0005c000, 0x00060000, -0x00064000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x00068000, 0x0006c000, 0x00070000, 0x00074000, 0x00078000, -0x0007c000, 0x00080000, 0x00084000, 0x00088000, 0x0008c000, 0x00090000, -0x00094000, 0x00098000, 0x0009c000, 0x000a0000, 0x000a4000, 0x000a8000, -0x000ac000, 0x000b0000, 0x000b4000, 0x000b8000, 0x000bc000, 0x000c0000, -0x000c4000, 0x000c8000, 0x000cc000, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff -}; - - -const uint32_t base64_table_dec_32bit_d3[256] = { -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x00003e00, 0xffffffff, 0xffffffff, 0xffffffff, 0x00003f00, -0x00003400, 0x00003500, 0x00003600, 0x00003700, 0x00003800, 0x00003900, -0x00003a00, 0x00003b00, 0x00003c00, 0x00003d00, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000, -0x00000100, 0x00000200, 0x00000300, 0x00000400, 0x00000500, 0x00000600, -0x00000700, 0x00000800, 0x00000900, 0x00000a00, 0x00000b00, 0x00000c00, -0x00000d00, 0x00000e00, 0x00000f00, 0x00001000, 0x00001100, 0x00001200, -0x00001300, 0x00001400, 0x00001500, 0x00001600, 0x00001700, 0x00001800, -0x00001900, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0x00001a00, 0x00001b00, 0x00001c00, 0x00001d00, 0x00001e00, -0x00001f00, 0x00002000, 0x00002100, 0x00002200, 0x00002300, 0x00002400, -0x00002500, 0x00002600, 0x00002700, 0x00002800, 0x00002900, 0x00002a00, -0x00002b00, 0x00002c00, 0x00002d00, 0x00002e00, 0x00002f00, 0x00003000, -0x00003100, 0x00003200, 0x00003300, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, -0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff -}; - - -#endif diff --git a/deps/base64/base64/lib/tables/table_enc_12bit.h b/deps/base64/base64/lib/tables/table_enc_12bit.h deleted file mode 100644 index 2bc0d23068753a..00000000000000 --- a/deps/base64/base64/lib/tables/table_enc_12bit.h +++ /dev/null @@ -1,1031 +0,0 @@ -#include <stdint.h> - -const uint16_t base64_table_enc_12bit[] = { -#if BASE64_LITTLE_ENDIAN - 0x4141U, 0x4241U, 0x4341U, 0x4441U, 0x4541U, 0x4641U, 0x4741U, 0x4841U, - 0x4941U, 0x4A41U, 0x4B41U, 0x4C41U, 0x4D41U, 0x4E41U, 0x4F41U, 0x5041U, - 0x5141U, 0x5241U, 0x5341U, 0x5441U, 0x5541U, 0x5641U, 0x5741U, 0x5841U, - 0x5941U, 0x5A41U, 0x6141U, 0x6241U, 0x6341U, 0x6441U, 0x6541U, 0x6641U, - 0x6741U, 0x6841U, 0x6941U, 0x6A41U, 0x6B41U, 0x6C41U, 0x6D41U, 0x6E41U, - 0x6F41U, 0x7041U, 0x7141U, 0x7241U, 0x7341U, 0x7441U, 0x7541U, 0x7641U, - 0x7741U, 0x7841U, 0x7941U, 0x7A41U, 0x3041U, 0x3141U, 0x3241U, 0x3341U, - 0x3441U, 0x3541U, 0x3641U, 0x3741U, 0x3841U, 0x3941U, 0x2B41U, 0x2F41U, - 0x4142U, 0x4242U, 0x4342U, 0x4442U, 0x4542U, 0x4642U, 0x4742U, 0x4842U, - 0x4942U, 0x4A42U, 0x4B42U, 0x4C42U, 0x4D42U, 0x4E42U, 0x4F42U, 0x5042U, - 0x5142U, 0x5242U, 0x5342U, 0x5442U, 0x5542U, 0x5642U, 0x5742U, 0x5842U, - 0x5942U, 0x5A42U, 0x6142U, 0x6242U, 0x6342U, 0x6442U, 0x6542U, 0x6642U, - 0x6742U, 0x6842U, 0x6942U, 0x6A42U, 0x6B42U, 0x6C42U, 0x6D42U, 0x6E42U, - 0x6F42U, 0x7042U, 0x7142U, 0x7242U, 0x7342U, 0x7442U, 0x7542U, 0x7642U, - 0x7742U, 0x7842U, 0x7942U, 0x7A42U, 0x3042U, 0x3142U, 0x3242U, 0x3342U, - 0x3442U, 0x3542U, 0x3642U, 0x3742U, 0x3842U, 0x3942U, 0x2B42U, 0x2F42U, - 0x4143U, 0x4243U, 0x4343U, 0x4443U, 0x4543U, 0x4643U, 0x4743U, 0x4843U, - 0x4943U, 0x4A43U, 0x4B43U, 0x4C43U, 0x4D43U, 0x4E43U, 0x4F43U, 0x5043U, - 0x5143U, 0x5243U, 0x5343U, 0x5443U, 0x5543U, 0x5643U, 0x5743U, 0x5843U, - 0x5943U, 0x5A43U, 0x6143U, 0x6243U, 0x6343U, 0x6443U, 0x6543U, 0x6643U, - 0x6743U, 0x6843U, 0x6943U, 0x6A43U, 0x6B43U, 0x6C43U, 0x6D43U, 0x6E43U, - 0x6F43U, 0x7043U, 0x7143U, 0x7243U, 0x7343U, 0x7443U, 0x7543U, 0x7643U, - 0x7743U, 0x7843U, 0x7943U, 0x7A43U, 0x3043U, 0x3143U, 0x3243U, 0x3343U, - 0x3443U, 0x3543U, 0x3643U, 0x3743U, 0x3843U, 0x3943U, 0x2B43U, 0x2F43U, - 0x4144U, 0x4244U, 0x4344U, 0x4444U, 0x4544U, 0x4644U, 0x4744U, 0x4844U, - 0x4944U, 0x4A44U, 0x4B44U, 0x4C44U, 0x4D44U, 0x4E44U, 0x4F44U, 0x5044U, - 0x5144U, 0x5244U, 0x5344U, 0x5444U, 0x5544U, 0x5644U, 0x5744U, 0x5844U, - 0x5944U, 0x5A44U, 0x6144U, 0x6244U, 0x6344U, 0x6444U, 0x6544U, 0x6644U, - 0x6744U, 0x6844U, 0x6944U, 0x6A44U, 0x6B44U, 0x6C44U, 0x6D44U, 0x6E44U, - 0x6F44U, 0x7044U, 0x7144U, 0x7244U, 0x7344U, 0x7444U, 0x7544U, 0x7644U, - 0x7744U, 0x7844U, 0x7944U, 0x7A44U, 0x3044U, 0x3144U, 0x3244U, 0x3344U, - 0x3444U, 0x3544U, 0x3644U, 0x3744U, 0x3844U, 0x3944U, 0x2B44U, 0x2F44U, - 0x4145U, 0x4245U, 0x4345U, 0x4445U, 0x4545U, 0x4645U, 0x4745U, 0x4845U, - 0x4945U, 0x4A45U, 0x4B45U, 0x4C45U, 0x4D45U, 0x4E45U, 0x4F45U, 0x5045U, - 0x5145U, 0x5245U, 0x5345U, 0x5445U, 0x5545U, 0x5645U, 0x5745U, 0x5845U, - 0x5945U, 0x5A45U, 0x6145U, 0x6245U, 0x6345U, 0x6445U, 0x6545U, 0x6645U, - 0x6745U, 0x6845U, 0x6945U, 0x6A45U, 0x6B45U, 0x6C45U, 0x6D45U, 0x6E45U, - 0x6F45U, 0x7045U, 0x7145U, 0x7245U, 0x7345U, 0x7445U, 0x7545U, 0x7645U, - 0x7745U, 0x7845U, 0x7945U, 0x7A45U, 0x3045U, 0x3145U, 0x3245U, 0x3345U, - 0x3445U, 0x3545U, 0x3645U, 0x3745U, 0x3845U, 0x3945U, 0x2B45U, 0x2F45U, - 0x4146U, 0x4246U, 0x4346U, 0x4446U, 0x4546U, 0x4646U, 0x4746U, 0x4846U, - 0x4946U, 0x4A46U, 0x4B46U, 0x4C46U, 0x4D46U, 0x4E46U, 0x4F46U, 0x5046U, - 0x5146U, 0x5246U, 0x5346U, 0x5446U, 0x5546U, 0x5646U, 0x5746U, 0x5846U, - 0x5946U, 0x5A46U, 0x6146U, 0x6246U, 0x6346U, 0x6446U, 0x6546U, 0x6646U, - 0x6746U, 0x6846U, 0x6946U, 0x6A46U, 0x6B46U, 0x6C46U, 0x6D46U, 0x6E46U, - 0x6F46U, 0x7046U, 0x7146U, 0x7246U, 0x7346U, 0x7446U, 0x7546U, 0x7646U, - 0x7746U, 0x7846U, 0x7946U, 0x7A46U, 0x3046U, 0x3146U, 0x3246U, 0x3346U, - 0x3446U, 0x3546U, 0x3646U, 0x3746U, 0x3846U, 0x3946U, 0x2B46U, 0x2F46U, - 0x4147U, 0x4247U, 0x4347U, 0x4447U, 0x4547U, 0x4647U, 0x4747U, 0x4847U, - 0x4947U, 0x4A47U, 0x4B47U, 0x4C47U, 0x4D47U, 0x4E47U, 0x4F47U, 0x5047U, - 0x5147U, 0x5247U, 0x5347U, 0x5447U, 0x5547U, 0x5647U, 0x5747U, 0x5847U, - 0x5947U, 0x5A47U, 0x6147U, 0x6247U, 0x6347U, 0x6447U, 0x6547U, 0x6647U, - 0x6747U, 0x6847U, 0x6947U, 0x6A47U, 0x6B47U, 0x6C47U, 0x6D47U, 0x6E47U, - 0x6F47U, 0x7047U, 0x7147U, 0x7247U, 0x7347U, 0x7447U, 0x7547U, 0x7647U, - 0x7747U, 0x7847U, 0x7947U, 0x7A47U, 0x3047U, 0x3147U, 0x3247U, 0x3347U, - 0x3447U, 0x3547U, 0x3647U, 0x3747U, 0x3847U, 0x3947U, 0x2B47U, 0x2F47U, - 0x4148U, 0x4248U, 0x4348U, 0x4448U, 0x4548U, 0x4648U, 0x4748U, 0x4848U, - 0x4948U, 0x4A48U, 0x4B48U, 0x4C48U, 0x4D48U, 0x4E48U, 0x4F48U, 0x5048U, - 0x5148U, 0x5248U, 0x5348U, 0x5448U, 0x5548U, 0x5648U, 0x5748U, 0x5848U, - 0x5948U, 0x5A48U, 0x6148U, 0x6248U, 0x6348U, 0x6448U, 0x6548U, 0x6648U, - 0x6748U, 0x6848U, 0x6948U, 0x6A48U, 0x6B48U, 0x6C48U, 0x6D48U, 0x6E48U, - 0x6F48U, 0x7048U, 0x7148U, 0x7248U, 0x7348U, 0x7448U, 0x7548U, 0x7648U, - 0x7748U, 0x7848U, 0x7948U, 0x7A48U, 0x3048U, 0x3148U, 0x3248U, 0x3348U, - 0x3448U, 0x3548U, 0x3648U, 0x3748U, 0x3848U, 0x3948U, 0x2B48U, 0x2F48U, - 0x4149U, 0x4249U, 0x4349U, 0x4449U, 0x4549U, 0x4649U, 0x4749U, 0x4849U, - 0x4949U, 0x4A49U, 0x4B49U, 0x4C49U, 0x4D49U, 0x4E49U, 0x4F49U, 0x5049U, - 0x5149U, 0x5249U, 0x5349U, 0x5449U, 0x5549U, 0x5649U, 0x5749U, 0x5849U, - 0x5949U, 0x5A49U, 0x6149U, 0x6249U, 0x6349U, 0x6449U, 0x6549U, 0x6649U, - 0x6749U, 0x6849U, 0x6949U, 0x6A49U, 0x6B49U, 0x6C49U, 0x6D49U, 0x6E49U, - 0x6F49U, 0x7049U, 0x7149U, 0x7249U, 0x7349U, 0x7449U, 0x7549U, 0x7649U, - 0x7749U, 0x7849U, 0x7949U, 0x7A49U, 0x3049U, 0x3149U, 0x3249U, 0x3349U, - 0x3449U, 0x3549U, 0x3649U, 0x3749U, 0x3849U, 0x3949U, 0x2B49U, 0x2F49U, - 0x414AU, 0x424AU, 0x434AU, 0x444AU, 0x454AU, 0x464AU, 0x474AU, 0x484AU, - 0x494AU, 0x4A4AU, 0x4B4AU, 0x4C4AU, 0x4D4AU, 0x4E4AU, 0x4F4AU, 0x504AU, - 0x514AU, 0x524AU, 0x534AU, 0x544AU, 0x554AU, 0x564AU, 0x574AU, 0x584AU, - 0x594AU, 0x5A4AU, 0x614AU, 0x624AU, 0x634AU, 0x644AU, 0x654AU, 0x664AU, - 0x674AU, 0x684AU, 0x694AU, 0x6A4AU, 0x6B4AU, 0x6C4AU, 0x6D4AU, 0x6E4AU, - 0x6F4AU, 0x704AU, 0x714AU, 0x724AU, 0x734AU, 0x744AU, 0x754AU, 0x764AU, - 0x774AU, 0x784AU, 0x794AU, 0x7A4AU, 0x304AU, 0x314AU, 0x324AU, 0x334AU, - 0x344AU, 0x354AU, 0x364AU, 0x374AU, 0x384AU, 0x394AU, 0x2B4AU, 0x2F4AU, - 0x414BU, 0x424BU, 0x434BU, 0x444BU, 0x454BU, 0x464BU, 0x474BU, 0x484BU, - 0x494BU, 0x4A4BU, 0x4B4BU, 0x4C4BU, 0x4D4BU, 0x4E4BU, 0x4F4BU, 0x504BU, - 0x514BU, 0x524BU, 0x534BU, 0x544BU, 0x554BU, 0x564BU, 0x574BU, 0x584BU, - 0x594BU, 0x5A4BU, 0x614BU, 0x624BU, 0x634BU, 0x644BU, 0x654BU, 0x664BU, - 0x674BU, 0x684BU, 0x694BU, 0x6A4BU, 0x6B4BU, 0x6C4BU, 0x6D4BU, 0x6E4BU, - 0x6F4BU, 0x704BU, 0x714BU, 0x724BU, 0x734BU, 0x744BU, 0x754BU, 0x764BU, - 0x774BU, 0x784BU, 0x794BU, 0x7A4BU, 0x304BU, 0x314BU, 0x324BU, 0x334BU, - 0x344BU, 0x354BU, 0x364BU, 0x374BU, 0x384BU, 0x394BU, 0x2B4BU, 0x2F4BU, - 0x414CU, 0x424CU, 0x434CU, 0x444CU, 0x454CU, 0x464CU, 0x474CU, 0x484CU, - 0x494CU, 0x4A4CU, 0x4B4CU, 0x4C4CU, 0x4D4CU, 0x4E4CU, 0x4F4CU, 0x504CU, - 0x514CU, 0x524CU, 0x534CU, 0x544CU, 0x554CU, 0x564CU, 0x574CU, 0x584CU, - 0x594CU, 0x5A4CU, 0x614CU, 0x624CU, 0x634CU, 0x644CU, 0x654CU, 0x664CU, - 0x674CU, 0x684CU, 0x694CU, 0x6A4CU, 0x6B4CU, 0x6C4CU, 0x6D4CU, 0x6E4CU, - 0x6F4CU, 0x704CU, 0x714CU, 0x724CU, 0x734CU, 0x744CU, 0x754CU, 0x764CU, - 0x774CU, 0x784CU, 0x794CU, 0x7A4CU, 0x304CU, 0x314CU, 0x324CU, 0x334CU, - 0x344CU, 0x354CU, 0x364CU, 0x374CU, 0x384CU, 0x394CU, 0x2B4CU, 0x2F4CU, - 0x414DU, 0x424DU, 0x434DU, 0x444DU, 0x454DU, 0x464DU, 0x474DU, 0x484DU, - 0x494DU, 0x4A4DU, 0x4B4DU, 0x4C4DU, 0x4D4DU, 0x4E4DU, 0x4F4DU, 0x504DU, - 0x514DU, 0x524DU, 0x534DU, 0x544DU, 0x554DU, 0x564DU, 0x574DU, 0x584DU, - 0x594DU, 0x5A4DU, 0x614DU, 0x624DU, 0x634DU, 0x644DU, 0x654DU, 0x664DU, - 0x674DU, 0x684DU, 0x694DU, 0x6A4DU, 0x6B4DU, 0x6C4DU, 0x6D4DU, 0x6E4DU, - 0x6F4DU, 0x704DU, 0x714DU, 0x724DU, 0x734DU, 0x744DU, 0x754DU, 0x764DU, - 0x774DU, 0x784DU, 0x794DU, 0x7A4DU, 0x304DU, 0x314DU, 0x324DU, 0x334DU, - 0x344DU, 0x354DU, 0x364DU, 0x374DU, 0x384DU, 0x394DU, 0x2B4DU, 0x2F4DU, - 0x414EU, 0x424EU, 0x434EU, 0x444EU, 0x454EU, 0x464EU, 0x474EU, 0x484EU, - 0x494EU, 0x4A4EU, 0x4B4EU, 0x4C4EU, 0x4D4EU, 0x4E4EU, 0x4F4EU, 0x504EU, - 0x514EU, 0x524EU, 0x534EU, 0x544EU, 0x554EU, 0x564EU, 0x574EU, 0x584EU, - 0x594EU, 0x5A4EU, 0x614EU, 0x624EU, 0x634EU, 0x644EU, 0x654EU, 0x664EU, - 0x674EU, 0x684EU, 0x694EU, 0x6A4EU, 0x6B4EU, 0x6C4EU, 0x6D4EU, 0x6E4EU, - 0x6F4EU, 0x704EU, 0x714EU, 0x724EU, 0x734EU, 0x744EU, 0x754EU, 0x764EU, - 0x774EU, 0x784EU, 0x794EU, 0x7A4EU, 0x304EU, 0x314EU, 0x324EU, 0x334EU, - 0x344EU, 0x354EU, 0x364EU, 0x374EU, 0x384EU, 0x394EU, 0x2B4EU, 0x2F4EU, - 0x414FU, 0x424FU, 0x434FU, 0x444FU, 0x454FU, 0x464FU, 0x474FU, 0x484FU, - 0x494FU, 0x4A4FU, 0x4B4FU, 0x4C4FU, 0x4D4FU, 0x4E4FU, 0x4F4FU, 0x504FU, - 0x514FU, 0x524FU, 0x534FU, 0x544FU, 0x554FU, 0x564FU, 0x574FU, 0x584FU, - 0x594FU, 0x5A4FU, 0x614FU, 0x624FU, 0x634FU, 0x644FU, 0x654FU, 0x664FU, - 0x674FU, 0x684FU, 0x694FU, 0x6A4FU, 0x6B4FU, 0x6C4FU, 0x6D4FU, 0x6E4FU, - 0x6F4FU, 0x704FU, 0x714FU, 0x724FU, 0x734FU, 0x744FU, 0x754FU, 0x764FU, - 0x774FU, 0x784FU, 0x794FU, 0x7A4FU, 0x304FU, 0x314FU, 0x324FU, 0x334FU, - 0x344FU, 0x354FU, 0x364FU, 0x374FU, 0x384FU, 0x394FU, 0x2B4FU, 0x2F4FU, - 0x4150U, 0x4250U, 0x4350U, 0x4450U, 0x4550U, 0x4650U, 0x4750U, 0x4850U, - 0x4950U, 0x4A50U, 0x4B50U, 0x4C50U, 0x4D50U, 0x4E50U, 0x4F50U, 0x5050U, - 0x5150U, 0x5250U, 0x5350U, 0x5450U, 0x5550U, 0x5650U, 0x5750U, 0x5850U, - 0x5950U, 0x5A50U, 0x6150U, 0x6250U, 0x6350U, 0x6450U, 0x6550U, 0x6650U, - 0x6750U, 0x6850U, 0x6950U, 0x6A50U, 0x6B50U, 0x6C50U, 0x6D50U, 0x6E50U, - 0x6F50U, 0x7050U, 0x7150U, 0x7250U, 0x7350U, 0x7450U, 0x7550U, 0x7650U, - 0x7750U, 0x7850U, 0x7950U, 0x7A50U, 0x3050U, 0x3150U, 0x3250U, 0x3350U, - 0x3450U, 0x3550U, 0x3650U, 0x3750U, 0x3850U, 0x3950U, 0x2B50U, 0x2F50U, - 0x4151U, 0x4251U, 0x4351U, 0x4451U, 0x4551U, 0x4651U, 0x4751U, 0x4851U, - 0x4951U, 0x4A51U, 0x4B51U, 0x4C51U, 0x4D51U, 0x4E51U, 0x4F51U, 0x5051U, - 0x5151U, 0x5251U, 0x5351U, 0x5451U, 0x5551U, 0x5651U, 0x5751U, 0x5851U, - 0x5951U, 0x5A51U, 0x6151U, 0x6251U, 0x6351U, 0x6451U, 0x6551U, 0x6651U, - 0x6751U, 0x6851U, 0x6951U, 0x6A51U, 0x6B51U, 0x6C51U, 0x6D51U, 0x6E51U, - 0x6F51U, 0x7051U, 0x7151U, 0x7251U, 0x7351U, 0x7451U, 0x7551U, 0x7651U, - 0x7751U, 0x7851U, 0x7951U, 0x7A51U, 0x3051U, 0x3151U, 0x3251U, 0x3351U, - 0x3451U, 0x3551U, 0x3651U, 0x3751U, 0x3851U, 0x3951U, 0x2B51U, 0x2F51U, - 0x4152U, 0x4252U, 0x4352U, 0x4452U, 0x4552U, 0x4652U, 0x4752U, 0x4852U, - 0x4952U, 0x4A52U, 0x4B52U, 0x4C52U, 0x4D52U, 0x4E52U, 0x4F52U, 0x5052U, - 0x5152U, 0x5252U, 0x5352U, 0x5452U, 0x5552U, 0x5652U, 0x5752U, 0x5852U, - 0x5952U, 0x5A52U, 0x6152U, 0x6252U, 0x6352U, 0x6452U, 0x6552U, 0x6652U, - 0x6752U, 0x6852U, 0x6952U, 0x6A52U, 0x6B52U, 0x6C52U, 0x6D52U, 0x6E52U, - 0x6F52U, 0x7052U, 0x7152U, 0x7252U, 0x7352U, 0x7452U, 0x7552U, 0x7652U, - 0x7752U, 0x7852U, 0x7952U, 0x7A52U, 0x3052U, 0x3152U, 0x3252U, 0x3352U, - 0x3452U, 0x3552U, 0x3652U, 0x3752U, 0x3852U, 0x3952U, 0x2B52U, 0x2F52U, - 0x4153U, 0x4253U, 0x4353U, 0x4453U, 0x4553U, 0x4653U, 0x4753U, 0x4853U, - 0x4953U, 0x4A53U, 0x4B53U, 0x4C53U, 0x4D53U, 0x4E53U, 0x4F53U, 0x5053U, - 0x5153U, 0x5253U, 0x5353U, 0x5453U, 0x5553U, 0x5653U, 0x5753U, 0x5853U, - 0x5953U, 0x5A53U, 0x6153U, 0x6253U, 0x6353U, 0x6453U, 0x6553U, 0x6653U, - 0x6753U, 0x6853U, 0x6953U, 0x6A53U, 0x6B53U, 0x6C53U, 0x6D53U, 0x6E53U, - 0x6F53U, 0x7053U, 0x7153U, 0x7253U, 0x7353U, 0x7453U, 0x7553U, 0x7653U, - 0x7753U, 0x7853U, 0x7953U, 0x7A53U, 0x3053U, 0x3153U, 0x3253U, 0x3353U, - 0x3453U, 0x3553U, 0x3653U, 0x3753U, 0x3853U, 0x3953U, 0x2B53U, 0x2F53U, - 0x4154U, 0x4254U, 0x4354U, 0x4454U, 0x4554U, 0x4654U, 0x4754U, 0x4854U, - 0x4954U, 0x4A54U, 0x4B54U, 0x4C54U, 0x4D54U, 0x4E54U, 0x4F54U, 0x5054U, - 0x5154U, 0x5254U, 0x5354U, 0x5454U, 0x5554U, 0x5654U, 0x5754U, 0x5854U, - 0x5954U, 0x5A54U, 0x6154U, 0x6254U, 0x6354U, 0x6454U, 0x6554U, 0x6654U, - 0x6754U, 0x6854U, 0x6954U, 0x6A54U, 0x6B54U, 0x6C54U, 0x6D54U, 0x6E54U, - 0x6F54U, 0x7054U, 0x7154U, 0x7254U, 0x7354U, 0x7454U, 0x7554U, 0x7654U, - 0x7754U, 0x7854U, 0x7954U, 0x7A54U, 0x3054U, 0x3154U, 0x3254U, 0x3354U, - 0x3454U, 0x3554U, 0x3654U, 0x3754U, 0x3854U, 0x3954U, 0x2B54U, 0x2F54U, - 0x4155U, 0x4255U, 0x4355U, 0x4455U, 0x4555U, 0x4655U, 0x4755U, 0x4855U, - 0x4955U, 0x4A55U, 0x4B55U, 0x4C55U, 0x4D55U, 0x4E55U, 0x4F55U, 0x5055U, - 0x5155U, 0x5255U, 0x5355U, 0x5455U, 0x5555U, 0x5655U, 0x5755U, 0x5855U, - 0x5955U, 0x5A55U, 0x6155U, 0x6255U, 0x6355U, 0x6455U, 0x6555U, 0x6655U, - 0x6755U, 0x6855U, 0x6955U, 0x6A55U, 0x6B55U, 0x6C55U, 0x6D55U, 0x6E55U, - 0x6F55U, 0x7055U, 0x7155U, 0x7255U, 0x7355U, 0x7455U, 0x7555U, 0x7655U, - 0x7755U, 0x7855U, 0x7955U, 0x7A55U, 0x3055U, 0x3155U, 0x3255U, 0x3355U, - 0x3455U, 0x3555U, 0x3655U, 0x3755U, 0x3855U, 0x3955U, 0x2B55U, 0x2F55U, - 0x4156U, 0x4256U, 0x4356U, 0x4456U, 0x4556U, 0x4656U, 0x4756U, 0x4856U, - 0x4956U, 0x4A56U, 0x4B56U, 0x4C56U, 0x4D56U, 0x4E56U, 0x4F56U, 0x5056U, - 0x5156U, 0x5256U, 0x5356U, 0x5456U, 0x5556U, 0x5656U, 0x5756U, 0x5856U, - 0x5956U, 0x5A56U, 0x6156U, 0x6256U, 0x6356U, 0x6456U, 0x6556U, 0x6656U, - 0x6756U, 0x6856U, 0x6956U, 0x6A56U, 0x6B56U, 0x6C56U, 0x6D56U, 0x6E56U, - 0x6F56U, 0x7056U, 0x7156U, 0x7256U, 0x7356U, 0x7456U, 0x7556U, 0x7656U, - 0x7756U, 0x7856U, 0x7956U, 0x7A56U, 0x3056U, 0x3156U, 0x3256U, 0x3356U, - 0x3456U, 0x3556U, 0x3656U, 0x3756U, 0x3856U, 0x3956U, 0x2B56U, 0x2F56U, - 0x4157U, 0x4257U, 0x4357U, 0x4457U, 0x4557U, 0x4657U, 0x4757U, 0x4857U, - 0x4957U, 0x4A57U, 0x4B57U, 0x4C57U, 0x4D57U, 0x4E57U, 0x4F57U, 0x5057U, - 0x5157U, 0x5257U, 0x5357U, 0x5457U, 0x5557U, 0x5657U, 0x5757U, 0x5857U, - 0x5957U, 0x5A57U, 0x6157U, 0x6257U, 0x6357U, 0x6457U, 0x6557U, 0x6657U, - 0x6757U, 0x6857U, 0x6957U, 0x6A57U, 0x6B57U, 0x6C57U, 0x6D57U, 0x6E57U, - 0x6F57U, 0x7057U, 0x7157U, 0x7257U, 0x7357U, 0x7457U, 0x7557U, 0x7657U, - 0x7757U, 0x7857U, 0x7957U, 0x7A57U, 0x3057U, 0x3157U, 0x3257U, 0x3357U, - 0x3457U, 0x3557U, 0x3657U, 0x3757U, 0x3857U, 0x3957U, 0x2B57U, 0x2F57U, - 0x4158U, 0x4258U, 0x4358U, 0x4458U, 0x4558U, 0x4658U, 0x4758U, 0x4858U, - 0x4958U, 0x4A58U, 0x4B58U, 0x4C58U, 0x4D58U, 0x4E58U, 0x4F58U, 0x5058U, - 0x5158U, 0x5258U, 0x5358U, 0x5458U, 0x5558U, 0x5658U, 0x5758U, 0x5858U, - 0x5958U, 0x5A58U, 0x6158U, 0x6258U, 0x6358U, 0x6458U, 0x6558U, 0x6658U, - 0x6758U, 0x6858U, 0x6958U, 0x6A58U, 0x6B58U, 0x6C58U, 0x6D58U, 0x6E58U, - 0x6F58U, 0x7058U, 0x7158U, 0x7258U, 0x7358U, 0x7458U, 0x7558U, 0x7658U, - 0x7758U, 0x7858U, 0x7958U, 0x7A58U, 0x3058U, 0x3158U, 0x3258U, 0x3358U, - 0x3458U, 0x3558U, 0x3658U, 0x3758U, 0x3858U, 0x3958U, 0x2B58U, 0x2F58U, - 0x4159U, 0x4259U, 0x4359U, 0x4459U, 0x4559U, 0x4659U, 0x4759U, 0x4859U, - 0x4959U, 0x4A59U, 0x4B59U, 0x4C59U, 0x4D59U, 0x4E59U, 0x4F59U, 0x5059U, - 0x5159U, 0x5259U, 0x5359U, 0x5459U, 0x5559U, 0x5659U, 0x5759U, 0x5859U, - 0x5959U, 0x5A59U, 0x6159U, 0x6259U, 0x6359U, 0x6459U, 0x6559U, 0x6659U, - 0x6759U, 0x6859U, 0x6959U, 0x6A59U, 0x6B59U, 0x6C59U, 0x6D59U, 0x6E59U, - 0x6F59U, 0x7059U, 0x7159U, 0x7259U, 0x7359U, 0x7459U, 0x7559U, 0x7659U, - 0x7759U, 0x7859U, 0x7959U, 0x7A59U, 0x3059U, 0x3159U, 0x3259U, 0x3359U, - 0x3459U, 0x3559U, 0x3659U, 0x3759U, 0x3859U, 0x3959U, 0x2B59U, 0x2F59U, - 0x415AU, 0x425AU, 0x435AU, 0x445AU, 0x455AU, 0x465AU, 0x475AU, 0x485AU, - 0x495AU, 0x4A5AU, 0x4B5AU, 0x4C5AU, 0x4D5AU, 0x4E5AU, 0x4F5AU, 0x505AU, - 0x515AU, 0x525AU, 0x535AU, 0x545AU, 0x555AU, 0x565AU, 0x575AU, 0x585AU, - 0x595AU, 0x5A5AU, 0x615AU, 0x625AU, 0x635AU, 0x645AU, 0x655AU, 0x665AU, - 0x675AU, 0x685AU, 0x695AU, 0x6A5AU, 0x6B5AU, 0x6C5AU, 0x6D5AU, 0x6E5AU, - 0x6F5AU, 0x705AU, 0x715AU, 0x725AU, 0x735AU, 0x745AU, 0x755AU, 0x765AU, - 0x775AU, 0x785AU, 0x795AU, 0x7A5AU, 0x305AU, 0x315AU, 0x325AU, 0x335AU, - 0x345AU, 0x355AU, 0x365AU, 0x375AU, 0x385AU, 0x395AU, 0x2B5AU, 0x2F5AU, - 0x4161U, 0x4261U, 0x4361U, 0x4461U, 0x4561U, 0x4661U, 0x4761U, 0x4861U, - 0x4961U, 0x4A61U, 0x4B61U, 0x4C61U, 0x4D61U, 0x4E61U, 0x4F61U, 0x5061U, - 0x5161U, 0x5261U, 0x5361U, 0x5461U, 0x5561U, 0x5661U, 0x5761U, 0x5861U, - 0x5961U, 0x5A61U, 0x6161U, 0x6261U, 0x6361U, 0x6461U, 0x6561U, 0x6661U, - 0x6761U, 0x6861U, 0x6961U, 0x6A61U, 0x6B61U, 0x6C61U, 0x6D61U, 0x6E61U, - 0x6F61U, 0x7061U, 0x7161U, 0x7261U, 0x7361U, 0x7461U, 0x7561U, 0x7661U, - 0x7761U, 0x7861U, 0x7961U, 0x7A61U, 0x3061U, 0x3161U, 0x3261U, 0x3361U, - 0x3461U, 0x3561U, 0x3661U, 0x3761U, 0x3861U, 0x3961U, 0x2B61U, 0x2F61U, - 0x4162U, 0x4262U, 0x4362U, 0x4462U, 0x4562U, 0x4662U, 0x4762U, 0x4862U, - 0x4962U, 0x4A62U, 0x4B62U, 0x4C62U, 0x4D62U, 0x4E62U, 0x4F62U, 0x5062U, - 0x5162U, 0x5262U, 0x5362U, 0x5462U, 0x5562U, 0x5662U, 0x5762U, 0x5862U, - 0x5962U, 0x5A62U, 0x6162U, 0x6262U, 0x6362U, 0x6462U, 0x6562U, 0x6662U, - 0x6762U, 0x6862U, 0x6962U, 0x6A62U, 0x6B62U, 0x6C62U, 0x6D62U, 0x6E62U, - 0x6F62U, 0x7062U, 0x7162U, 0x7262U, 0x7362U, 0x7462U, 0x7562U, 0x7662U, - 0x7762U, 0x7862U, 0x7962U, 0x7A62U, 0x3062U, 0x3162U, 0x3262U, 0x3362U, - 0x3462U, 0x3562U, 0x3662U, 0x3762U, 0x3862U, 0x3962U, 0x2B62U, 0x2F62U, - 0x4163U, 0x4263U, 0x4363U, 0x4463U, 0x4563U, 0x4663U, 0x4763U, 0x4863U, - 0x4963U, 0x4A63U, 0x4B63U, 0x4C63U, 0x4D63U, 0x4E63U, 0x4F63U, 0x5063U, - 0x5163U, 0x5263U, 0x5363U, 0x5463U, 0x5563U, 0x5663U, 0x5763U, 0x5863U, - 0x5963U, 0x5A63U, 0x6163U, 0x6263U, 0x6363U, 0x6463U, 0x6563U, 0x6663U, - 0x6763U, 0x6863U, 0x6963U, 0x6A63U, 0x6B63U, 0x6C63U, 0x6D63U, 0x6E63U, - 0x6F63U, 0x7063U, 0x7163U, 0x7263U, 0x7363U, 0x7463U, 0x7563U, 0x7663U, - 0x7763U, 0x7863U, 0x7963U, 0x7A63U, 0x3063U, 0x3163U, 0x3263U, 0x3363U, - 0x3463U, 0x3563U, 0x3663U, 0x3763U, 0x3863U, 0x3963U, 0x2B63U, 0x2F63U, - 0x4164U, 0x4264U, 0x4364U, 0x4464U, 0x4564U, 0x4664U, 0x4764U, 0x4864U, - 0x4964U, 0x4A64U, 0x4B64U, 0x4C64U, 0x4D64U, 0x4E64U, 0x4F64U, 0x5064U, - 0x5164U, 0x5264U, 0x5364U, 0x5464U, 0x5564U, 0x5664U, 0x5764U, 0x5864U, - 0x5964U, 0x5A64U, 0x6164U, 0x6264U, 0x6364U, 0x6464U, 0x6564U, 0x6664U, - 0x6764U, 0x6864U, 0x6964U, 0x6A64U, 0x6B64U, 0x6C64U, 0x6D64U, 0x6E64U, - 0x6F64U, 0x7064U, 0x7164U, 0x7264U, 0x7364U, 0x7464U, 0x7564U, 0x7664U, - 0x7764U, 0x7864U, 0x7964U, 0x7A64U, 0x3064U, 0x3164U, 0x3264U, 0x3364U, - 0x3464U, 0x3564U, 0x3664U, 0x3764U, 0x3864U, 0x3964U, 0x2B64U, 0x2F64U, - 0x4165U, 0x4265U, 0x4365U, 0x4465U, 0x4565U, 0x4665U, 0x4765U, 0x4865U, - 0x4965U, 0x4A65U, 0x4B65U, 0x4C65U, 0x4D65U, 0x4E65U, 0x4F65U, 0x5065U, - 0x5165U, 0x5265U, 0x5365U, 0x5465U, 0x5565U, 0x5665U, 0x5765U, 0x5865U, - 0x5965U, 0x5A65U, 0x6165U, 0x6265U, 0x6365U, 0x6465U, 0x6565U, 0x6665U, - 0x6765U, 0x6865U, 0x6965U, 0x6A65U, 0x6B65U, 0x6C65U, 0x6D65U, 0x6E65U, - 0x6F65U, 0x7065U, 0x7165U, 0x7265U, 0x7365U, 0x7465U, 0x7565U, 0x7665U, - 0x7765U, 0x7865U, 0x7965U, 0x7A65U, 0x3065U, 0x3165U, 0x3265U, 0x3365U, - 0x3465U, 0x3565U, 0x3665U, 0x3765U, 0x3865U, 0x3965U, 0x2B65U, 0x2F65U, - 0x4166U, 0x4266U, 0x4366U, 0x4466U, 0x4566U, 0x4666U, 0x4766U, 0x4866U, - 0x4966U, 0x4A66U, 0x4B66U, 0x4C66U, 0x4D66U, 0x4E66U, 0x4F66U, 0x5066U, - 0x5166U, 0x5266U, 0x5366U, 0x5466U, 0x5566U, 0x5666U, 0x5766U, 0x5866U, - 0x5966U, 0x5A66U, 0x6166U, 0x6266U, 0x6366U, 0x6466U, 0x6566U, 0x6666U, - 0x6766U, 0x6866U, 0x6966U, 0x6A66U, 0x6B66U, 0x6C66U, 0x6D66U, 0x6E66U, - 0x6F66U, 0x7066U, 0x7166U, 0x7266U, 0x7366U, 0x7466U, 0x7566U, 0x7666U, - 0x7766U, 0x7866U, 0x7966U, 0x7A66U, 0x3066U, 0x3166U, 0x3266U, 0x3366U, - 0x3466U, 0x3566U, 0x3666U, 0x3766U, 0x3866U, 0x3966U, 0x2B66U, 0x2F66U, - 0x4167U, 0x4267U, 0x4367U, 0x4467U, 0x4567U, 0x4667U, 0x4767U, 0x4867U, - 0x4967U, 0x4A67U, 0x4B67U, 0x4C67U, 0x4D67U, 0x4E67U, 0x4F67U, 0x5067U, - 0x5167U, 0x5267U, 0x5367U, 0x5467U, 0x5567U, 0x5667U, 0x5767U, 0x5867U, - 0x5967U, 0x5A67U, 0x6167U, 0x6267U, 0x6367U, 0x6467U, 0x6567U, 0x6667U, - 0x6767U, 0x6867U, 0x6967U, 0x6A67U, 0x6B67U, 0x6C67U, 0x6D67U, 0x6E67U, - 0x6F67U, 0x7067U, 0x7167U, 0x7267U, 0x7367U, 0x7467U, 0x7567U, 0x7667U, - 0x7767U, 0x7867U, 0x7967U, 0x7A67U, 0x3067U, 0x3167U, 0x3267U, 0x3367U, - 0x3467U, 0x3567U, 0x3667U, 0x3767U, 0x3867U, 0x3967U, 0x2B67U, 0x2F67U, - 0x4168U, 0x4268U, 0x4368U, 0x4468U, 0x4568U, 0x4668U, 0x4768U, 0x4868U, - 0x4968U, 0x4A68U, 0x4B68U, 0x4C68U, 0x4D68U, 0x4E68U, 0x4F68U, 0x5068U, - 0x5168U, 0x5268U, 0x5368U, 0x5468U, 0x5568U, 0x5668U, 0x5768U, 0x5868U, - 0x5968U, 0x5A68U, 0x6168U, 0x6268U, 0x6368U, 0x6468U, 0x6568U, 0x6668U, - 0x6768U, 0x6868U, 0x6968U, 0x6A68U, 0x6B68U, 0x6C68U, 0x6D68U, 0x6E68U, - 0x6F68U, 0x7068U, 0x7168U, 0x7268U, 0x7368U, 0x7468U, 0x7568U, 0x7668U, - 0x7768U, 0x7868U, 0x7968U, 0x7A68U, 0x3068U, 0x3168U, 0x3268U, 0x3368U, - 0x3468U, 0x3568U, 0x3668U, 0x3768U, 0x3868U, 0x3968U, 0x2B68U, 0x2F68U, - 0x4169U, 0x4269U, 0x4369U, 0x4469U, 0x4569U, 0x4669U, 0x4769U, 0x4869U, - 0x4969U, 0x4A69U, 0x4B69U, 0x4C69U, 0x4D69U, 0x4E69U, 0x4F69U, 0x5069U, - 0x5169U, 0x5269U, 0x5369U, 0x5469U, 0x5569U, 0x5669U, 0x5769U, 0x5869U, - 0x5969U, 0x5A69U, 0x6169U, 0x6269U, 0x6369U, 0x6469U, 0x6569U, 0x6669U, - 0x6769U, 0x6869U, 0x6969U, 0x6A69U, 0x6B69U, 0x6C69U, 0x6D69U, 0x6E69U, - 0x6F69U, 0x7069U, 0x7169U, 0x7269U, 0x7369U, 0x7469U, 0x7569U, 0x7669U, - 0x7769U, 0x7869U, 0x7969U, 0x7A69U, 0x3069U, 0x3169U, 0x3269U, 0x3369U, - 0x3469U, 0x3569U, 0x3669U, 0x3769U, 0x3869U, 0x3969U, 0x2B69U, 0x2F69U, - 0x416AU, 0x426AU, 0x436AU, 0x446AU, 0x456AU, 0x466AU, 0x476AU, 0x486AU, - 0x496AU, 0x4A6AU, 0x4B6AU, 0x4C6AU, 0x4D6AU, 0x4E6AU, 0x4F6AU, 0x506AU, - 0x516AU, 0x526AU, 0x536AU, 0x546AU, 0x556AU, 0x566AU, 0x576AU, 0x586AU, - 0x596AU, 0x5A6AU, 0x616AU, 0x626AU, 0x636AU, 0x646AU, 0x656AU, 0x666AU, - 0x676AU, 0x686AU, 0x696AU, 0x6A6AU, 0x6B6AU, 0x6C6AU, 0x6D6AU, 0x6E6AU, - 0x6F6AU, 0x706AU, 0x716AU, 0x726AU, 0x736AU, 0x746AU, 0x756AU, 0x766AU, - 0x776AU, 0x786AU, 0x796AU, 0x7A6AU, 0x306AU, 0x316AU, 0x326AU, 0x336AU, - 0x346AU, 0x356AU, 0x366AU, 0x376AU, 0x386AU, 0x396AU, 0x2B6AU, 0x2F6AU, - 0x416BU, 0x426BU, 0x436BU, 0x446BU, 0x456BU, 0x466BU, 0x476BU, 0x486BU, - 0x496BU, 0x4A6BU, 0x4B6BU, 0x4C6BU, 0x4D6BU, 0x4E6BU, 0x4F6BU, 0x506BU, - 0x516BU, 0x526BU, 0x536BU, 0x546BU, 0x556BU, 0x566BU, 0x576BU, 0x586BU, - 0x596BU, 0x5A6BU, 0x616BU, 0x626BU, 0x636BU, 0x646BU, 0x656BU, 0x666BU, - 0x676BU, 0x686BU, 0x696BU, 0x6A6BU, 0x6B6BU, 0x6C6BU, 0x6D6BU, 0x6E6BU, - 0x6F6BU, 0x706BU, 0x716BU, 0x726BU, 0x736BU, 0x746BU, 0x756BU, 0x766BU, - 0x776BU, 0x786BU, 0x796BU, 0x7A6BU, 0x306BU, 0x316BU, 0x326BU, 0x336BU, - 0x346BU, 0x356BU, 0x366BU, 0x376BU, 0x386BU, 0x396BU, 0x2B6BU, 0x2F6BU, - 0x416CU, 0x426CU, 0x436CU, 0x446CU, 0x456CU, 0x466CU, 0x476CU, 0x486CU, - 0x496CU, 0x4A6CU, 0x4B6CU, 0x4C6CU, 0x4D6CU, 0x4E6CU, 0x4F6CU, 0x506CU, - 0x516CU, 0x526CU, 0x536CU, 0x546CU, 0x556CU, 0x566CU, 0x576CU, 0x586CU, - 0x596CU, 0x5A6CU, 0x616CU, 0x626CU, 0x636CU, 0x646CU, 0x656CU, 0x666CU, - 0x676CU, 0x686CU, 0x696CU, 0x6A6CU, 0x6B6CU, 0x6C6CU, 0x6D6CU, 0x6E6CU, - 0x6F6CU, 0x706CU, 0x716CU, 0x726CU, 0x736CU, 0x746CU, 0x756CU, 0x766CU, - 0x776CU, 0x786CU, 0x796CU, 0x7A6CU, 0x306CU, 0x316CU, 0x326CU, 0x336CU, - 0x346CU, 0x356CU, 0x366CU, 0x376CU, 0x386CU, 0x396CU, 0x2B6CU, 0x2F6CU, - 0x416DU, 0x426DU, 0x436DU, 0x446DU, 0x456DU, 0x466DU, 0x476DU, 0x486DU, - 0x496DU, 0x4A6DU, 0x4B6DU, 0x4C6DU, 0x4D6DU, 0x4E6DU, 0x4F6DU, 0x506DU, - 0x516DU, 0x526DU, 0x536DU, 0x546DU, 0x556DU, 0x566DU, 0x576DU, 0x586DU, - 0x596DU, 0x5A6DU, 0x616DU, 0x626DU, 0x636DU, 0x646DU, 0x656DU, 0x666DU, - 0x676DU, 0x686DU, 0x696DU, 0x6A6DU, 0x6B6DU, 0x6C6DU, 0x6D6DU, 0x6E6DU, - 0x6F6DU, 0x706DU, 0x716DU, 0x726DU, 0x736DU, 0x746DU, 0x756DU, 0x766DU, - 0x776DU, 0x786DU, 0x796DU, 0x7A6DU, 0x306DU, 0x316DU, 0x326DU, 0x336DU, - 0x346DU, 0x356DU, 0x366DU, 0x376DU, 0x386DU, 0x396DU, 0x2B6DU, 0x2F6DU, - 0x416EU, 0x426EU, 0x436EU, 0x446EU, 0x456EU, 0x466EU, 0x476EU, 0x486EU, - 0x496EU, 0x4A6EU, 0x4B6EU, 0x4C6EU, 0x4D6EU, 0x4E6EU, 0x4F6EU, 0x506EU, - 0x516EU, 0x526EU, 0x536EU, 0x546EU, 0x556EU, 0x566EU, 0x576EU, 0x586EU, - 0x596EU, 0x5A6EU, 0x616EU, 0x626EU, 0x636EU, 0x646EU, 0x656EU, 0x666EU, - 0x676EU, 0x686EU, 0x696EU, 0x6A6EU, 0x6B6EU, 0x6C6EU, 0x6D6EU, 0x6E6EU, - 0x6F6EU, 0x706EU, 0x716EU, 0x726EU, 0x736EU, 0x746EU, 0x756EU, 0x766EU, - 0x776EU, 0x786EU, 0x796EU, 0x7A6EU, 0x306EU, 0x316EU, 0x326EU, 0x336EU, - 0x346EU, 0x356EU, 0x366EU, 0x376EU, 0x386EU, 0x396EU, 0x2B6EU, 0x2F6EU, - 0x416FU, 0x426FU, 0x436FU, 0x446FU, 0x456FU, 0x466FU, 0x476FU, 0x486FU, - 0x496FU, 0x4A6FU, 0x4B6FU, 0x4C6FU, 0x4D6FU, 0x4E6FU, 0x4F6FU, 0x506FU, - 0x516FU, 0x526FU, 0x536FU, 0x546FU, 0x556FU, 0x566FU, 0x576FU, 0x586FU, - 0x596FU, 0x5A6FU, 0x616FU, 0x626FU, 0x636FU, 0x646FU, 0x656FU, 0x666FU, - 0x676FU, 0x686FU, 0x696FU, 0x6A6FU, 0x6B6FU, 0x6C6FU, 0x6D6FU, 0x6E6FU, - 0x6F6FU, 0x706FU, 0x716FU, 0x726FU, 0x736FU, 0x746FU, 0x756FU, 0x766FU, - 0x776FU, 0x786FU, 0x796FU, 0x7A6FU, 0x306FU, 0x316FU, 0x326FU, 0x336FU, - 0x346FU, 0x356FU, 0x366FU, 0x376FU, 0x386FU, 0x396FU, 0x2B6FU, 0x2F6FU, - 0x4170U, 0x4270U, 0x4370U, 0x4470U, 0x4570U, 0x4670U, 0x4770U, 0x4870U, - 0x4970U, 0x4A70U, 0x4B70U, 0x4C70U, 0x4D70U, 0x4E70U, 0x4F70U, 0x5070U, - 0x5170U, 0x5270U, 0x5370U, 0x5470U, 0x5570U, 0x5670U, 0x5770U, 0x5870U, - 0x5970U, 0x5A70U, 0x6170U, 0x6270U, 0x6370U, 0x6470U, 0x6570U, 0x6670U, - 0x6770U, 0x6870U, 0x6970U, 0x6A70U, 0x6B70U, 0x6C70U, 0x6D70U, 0x6E70U, - 0x6F70U, 0x7070U, 0x7170U, 0x7270U, 0x7370U, 0x7470U, 0x7570U, 0x7670U, - 0x7770U, 0x7870U, 0x7970U, 0x7A70U, 0x3070U, 0x3170U, 0x3270U, 0x3370U, - 0x3470U, 0x3570U, 0x3670U, 0x3770U, 0x3870U, 0x3970U, 0x2B70U, 0x2F70U, - 0x4171U, 0x4271U, 0x4371U, 0x4471U, 0x4571U, 0x4671U, 0x4771U, 0x4871U, - 0x4971U, 0x4A71U, 0x4B71U, 0x4C71U, 0x4D71U, 0x4E71U, 0x4F71U, 0x5071U, - 0x5171U, 0x5271U, 0x5371U, 0x5471U, 0x5571U, 0x5671U, 0x5771U, 0x5871U, - 0x5971U, 0x5A71U, 0x6171U, 0x6271U, 0x6371U, 0x6471U, 0x6571U, 0x6671U, - 0x6771U, 0x6871U, 0x6971U, 0x6A71U, 0x6B71U, 0x6C71U, 0x6D71U, 0x6E71U, - 0x6F71U, 0x7071U, 0x7171U, 0x7271U, 0x7371U, 0x7471U, 0x7571U, 0x7671U, - 0x7771U, 0x7871U, 0x7971U, 0x7A71U, 0x3071U, 0x3171U, 0x3271U, 0x3371U, - 0x3471U, 0x3571U, 0x3671U, 0x3771U, 0x3871U, 0x3971U, 0x2B71U, 0x2F71U, - 0x4172U, 0x4272U, 0x4372U, 0x4472U, 0x4572U, 0x4672U, 0x4772U, 0x4872U, - 0x4972U, 0x4A72U, 0x4B72U, 0x4C72U, 0x4D72U, 0x4E72U, 0x4F72U, 0x5072U, - 0x5172U, 0x5272U, 0x5372U, 0x5472U, 0x5572U, 0x5672U, 0x5772U, 0x5872U, - 0x5972U, 0x5A72U, 0x6172U, 0x6272U, 0x6372U, 0x6472U, 0x6572U, 0x6672U, - 0x6772U, 0x6872U, 0x6972U, 0x6A72U, 0x6B72U, 0x6C72U, 0x6D72U, 0x6E72U, - 0x6F72U, 0x7072U, 0x7172U, 0x7272U, 0x7372U, 0x7472U, 0x7572U, 0x7672U, - 0x7772U, 0x7872U, 0x7972U, 0x7A72U, 0x3072U, 0x3172U, 0x3272U, 0x3372U, - 0x3472U, 0x3572U, 0x3672U, 0x3772U, 0x3872U, 0x3972U, 0x2B72U, 0x2F72U, - 0x4173U, 0x4273U, 0x4373U, 0x4473U, 0x4573U, 0x4673U, 0x4773U, 0x4873U, - 0x4973U, 0x4A73U, 0x4B73U, 0x4C73U, 0x4D73U, 0x4E73U, 0x4F73U, 0x5073U, - 0x5173U, 0x5273U, 0x5373U, 0x5473U, 0x5573U, 0x5673U, 0x5773U, 0x5873U, - 0x5973U, 0x5A73U, 0x6173U, 0x6273U, 0x6373U, 0x6473U, 0x6573U, 0x6673U, - 0x6773U, 0x6873U, 0x6973U, 0x6A73U, 0x6B73U, 0x6C73U, 0x6D73U, 0x6E73U, - 0x6F73U, 0x7073U, 0x7173U, 0x7273U, 0x7373U, 0x7473U, 0x7573U, 0x7673U, - 0x7773U, 0x7873U, 0x7973U, 0x7A73U, 0x3073U, 0x3173U, 0x3273U, 0x3373U, - 0x3473U, 0x3573U, 0x3673U, 0x3773U, 0x3873U, 0x3973U, 0x2B73U, 0x2F73U, - 0x4174U, 0x4274U, 0x4374U, 0x4474U, 0x4574U, 0x4674U, 0x4774U, 0x4874U, - 0x4974U, 0x4A74U, 0x4B74U, 0x4C74U, 0x4D74U, 0x4E74U, 0x4F74U, 0x5074U, - 0x5174U, 0x5274U, 0x5374U, 0x5474U, 0x5574U, 0x5674U, 0x5774U, 0x5874U, - 0x5974U, 0x5A74U, 0x6174U, 0x6274U, 0x6374U, 0x6474U, 0x6574U, 0x6674U, - 0x6774U, 0x6874U, 0x6974U, 0x6A74U, 0x6B74U, 0x6C74U, 0x6D74U, 0x6E74U, - 0x6F74U, 0x7074U, 0x7174U, 0x7274U, 0x7374U, 0x7474U, 0x7574U, 0x7674U, - 0x7774U, 0x7874U, 0x7974U, 0x7A74U, 0x3074U, 0x3174U, 0x3274U, 0x3374U, - 0x3474U, 0x3574U, 0x3674U, 0x3774U, 0x3874U, 0x3974U, 0x2B74U, 0x2F74U, - 0x4175U, 0x4275U, 0x4375U, 0x4475U, 0x4575U, 0x4675U, 0x4775U, 0x4875U, - 0x4975U, 0x4A75U, 0x4B75U, 0x4C75U, 0x4D75U, 0x4E75U, 0x4F75U, 0x5075U, - 0x5175U, 0x5275U, 0x5375U, 0x5475U, 0x5575U, 0x5675U, 0x5775U, 0x5875U, - 0x5975U, 0x5A75U, 0x6175U, 0x6275U, 0x6375U, 0x6475U, 0x6575U, 0x6675U, - 0x6775U, 0x6875U, 0x6975U, 0x6A75U, 0x6B75U, 0x6C75U, 0x6D75U, 0x6E75U, - 0x6F75U, 0x7075U, 0x7175U, 0x7275U, 0x7375U, 0x7475U, 0x7575U, 0x7675U, - 0x7775U, 0x7875U, 0x7975U, 0x7A75U, 0x3075U, 0x3175U, 0x3275U, 0x3375U, - 0x3475U, 0x3575U, 0x3675U, 0x3775U, 0x3875U, 0x3975U, 0x2B75U, 0x2F75U, - 0x4176U, 0x4276U, 0x4376U, 0x4476U, 0x4576U, 0x4676U, 0x4776U, 0x4876U, - 0x4976U, 0x4A76U, 0x4B76U, 0x4C76U, 0x4D76U, 0x4E76U, 0x4F76U, 0x5076U, - 0x5176U, 0x5276U, 0x5376U, 0x5476U, 0x5576U, 0x5676U, 0x5776U, 0x5876U, - 0x5976U, 0x5A76U, 0x6176U, 0x6276U, 0x6376U, 0x6476U, 0x6576U, 0x6676U, - 0x6776U, 0x6876U, 0x6976U, 0x6A76U, 0x6B76U, 0x6C76U, 0x6D76U, 0x6E76U, - 0x6F76U, 0x7076U, 0x7176U, 0x7276U, 0x7376U, 0x7476U, 0x7576U, 0x7676U, - 0x7776U, 0x7876U, 0x7976U, 0x7A76U, 0x3076U, 0x3176U, 0x3276U, 0x3376U, - 0x3476U, 0x3576U, 0x3676U, 0x3776U, 0x3876U, 0x3976U, 0x2B76U, 0x2F76U, - 0x4177U, 0x4277U, 0x4377U, 0x4477U, 0x4577U, 0x4677U, 0x4777U, 0x4877U, - 0x4977U, 0x4A77U, 0x4B77U, 0x4C77U, 0x4D77U, 0x4E77U, 0x4F77U, 0x5077U, - 0x5177U, 0x5277U, 0x5377U, 0x5477U, 0x5577U, 0x5677U, 0x5777U, 0x5877U, - 0x5977U, 0x5A77U, 0x6177U, 0x6277U, 0x6377U, 0x6477U, 0x6577U, 0x6677U, - 0x6777U, 0x6877U, 0x6977U, 0x6A77U, 0x6B77U, 0x6C77U, 0x6D77U, 0x6E77U, - 0x6F77U, 0x7077U, 0x7177U, 0x7277U, 0x7377U, 0x7477U, 0x7577U, 0x7677U, - 0x7777U, 0x7877U, 0x7977U, 0x7A77U, 0x3077U, 0x3177U, 0x3277U, 0x3377U, - 0x3477U, 0x3577U, 0x3677U, 0x3777U, 0x3877U, 0x3977U, 0x2B77U, 0x2F77U, - 0x4178U, 0x4278U, 0x4378U, 0x4478U, 0x4578U, 0x4678U, 0x4778U, 0x4878U, - 0x4978U, 0x4A78U, 0x4B78U, 0x4C78U, 0x4D78U, 0x4E78U, 0x4F78U, 0x5078U, - 0x5178U, 0x5278U, 0x5378U, 0x5478U, 0x5578U, 0x5678U, 0x5778U, 0x5878U, - 0x5978U, 0x5A78U, 0x6178U, 0x6278U, 0x6378U, 0x6478U, 0x6578U, 0x6678U, - 0x6778U, 0x6878U, 0x6978U, 0x6A78U, 0x6B78U, 0x6C78U, 0x6D78U, 0x6E78U, - 0x6F78U, 0x7078U, 0x7178U, 0x7278U, 0x7378U, 0x7478U, 0x7578U, 0x7678U, - 0x7778U, 0x7878U, 0x7978U, 0x7A78U, 0x3078U, 0x3178U, 0x3278U, 0x3378U, - 0x3478U, 0x3578U, 0x3678U, 0x3778U, 0x3878U, 0x3978U, 0x2B78U, 0x2F78U, - 0x4179U, 0x4279U, 0x4379U, 0x4479U, 0x4579U, 0x4679U, 0x4779U, 0x4879U, - 0x4979U, 0x4A79U, 0x4B79U, 0x4C79U, 0x4D79U, 0x4E79U, 0x4F79U, 0x5079U, - 0x5179U, 0x5279U, 0x5379U, 0x5479U, 0x5579U, 0x5679U, 0x5779U, 0x5879U, - 0x5979U, 0x5A79U, 0x6179U, 0x6279U, 0x6379U, 0x6479U, 0x6579U, 0x6679U, - 0x6779U, 0x6879U, 0x6979U, 0x6A79U, 0x6B79U, 0x6C79U, 0x6D79U, 0x6E79U, - 0x6F79U, 0x7079U, 0x7179U, 0x7279U, 0x7379U, 0x7479U, 0x7579U, 0x7679U, - 0x7779U, 0x7879U, 0x7979U, 0x7A79U, 0x3079U, 0x3179U, 0x3279U, 0x3379U, - 0x3479U, 0x3579U, 0x3679U, 0x3779U, 0x3879U, 0x3979U, 0x2B79U, 0x2F79U, - 0x417AU, 0x427AU, 0x437AU, 0x447AU, 0x457AU, 0x467AU, 0x477AU, 0x487AU, - 0x497AU, 0x4A7AU, 0x4B7AU, 0x4C7AU, 0x4D7AU, 0x4E7AU, 0x4F7AU, 0x507AU, - 0x517AU, 0x527AU, 0x537AU, 0x547AU, 0x557AU, 0x567AU, 0x577AU, 0x587AU, - 0x597AU, 0x5A7AU, 0x617AU, 0x627AU, 0x637AU, 0x647AU, 0x657AU, 0x667AU, - 0x677AU, 0x687AU, 0x697AU, 0x6A7AU, 0x6B7AU, 0x6C7AU, 0x6D7AU, 0x6E7AU, - 0x6F7AU, 0x707AU, 0x717AU, 0x727AU, 0x737AU, 0x747AU, 0x757AU, 0x767AU, - 0x777AU, 0x787AU, 0x797AU, 0x7A7AU, 0x307AU, 0x317AU, 0x327AU, 0x337AU, - 0x347AU, 0x357AU, 0x367AU, 0x377AU, 0x387AU, 0x397AU, 0x2B7AU, 0x2F7AU, - 0x4130U, 0x4230U, 0x4330U, 0x4430U, 0x4530U, 0x4630U, 0x4730U, 0x4830U, - 0x4930U, 0x4A30U, 0x4B30U, 0x4C30U, 0x4D30U, 0x4E30U, 0x4F30U, 0x5030U, - 0x5130U, 0x5230U, 0x5330U, 0x5430U, 0x5530U, 0x5630U, 0x5730U, 0x5830U, - 0x5930U, 0x5A30U, 0x6130U, 0x6230U, 0x6330U, 0x6430U, 0x6530U, 0x6630U, - 0x6730U, 0x6830U, 0x6930U, 0x6A30U, 0x6B30U, 0x6C30U, 0x6D30U, 0x6E30U, - 0x6F30U, 0x7030U, 0x7130U, 0x7230U, 0x7330U, 0x7430U, 0x7530U, 0x7630U, - 0x7730U, 0x7830U, 0x7930U, 0x7A30U, 0x3030U, 0x3130U, 0x3230U, 0x3330U, - 0x3430U, 0x3530U, 0x3630U, 0x3730U, 0x3830U, 0x3930U, 0x2B30U, 0x2F30U, - 0x4131U, 0x4231U, 0x4331U, 0x4431U, 0x4531U, 0x4631U, 0x4731U, 0x4831U, - 0x4931U, 0x4A31U, 0x4B31U, 0x4C31U, 0x4D31U, 0x4E31U, 0x4F31U, 0x5031U, - 0x5131U, 0x5231U, 0x5331U, 0x5431U, 0x5531U, 0x5631U, 0x5731U, 0x5831U, - 0x5931U, 0x5A31U, 0x6131U, 0x6231U, 0x6331U, 0x6431U, 0x6531U, 0x6631U, - 0x6731U, 0x6831U, 0x6931U, 0x6A31U, 0x6B31U, 0x6C31U, 0x6D31U, 0x6E31U, - 0x6F31U, 0x7031U, 0x7131U, 0x7231U, 0x7331U, 0x7431U, 0x7531U, 0x7631U, - 0x7731U, 0x7831U, 0x7931U, 0x7A31U, 0x3031U, 0x3131U, 0x3231U, 0x3331U, - 0x3431U, 0x3531U, 0x3631U, 0x3731U, 0x3831U, 0x3931U, 0x2B31U, 0x2F31U, - 0x4132U, 0x4232U, 0x4332U, 0x4432U, 0x4532U, 0x4632U, 0x4732U, 0x4832U, - 0x4932U, 0x4A32U, 0x4B32U, 0x4C32U, 0x4D32U, 0x4E32U, 0x4F32U, 0x5032U, - 0x5132U, 0x5232U, 0x5332U, 0x5432U, 0x5532U, 0x5632U, 0x5732U, 0x5832U, - 0x5932U, 0x5A32U, 0x6132U, 0x6232U, 0x6332U, 0x6432U, 0x6532U, 0x6632U, - 0x6732U, 0x6832U, 0x6932U, 0x6A32U, 0x6B32U, 0x6C32U, 0x6D32U, 0x6E32U, - 0x6F32U, 0x7032U, 0x7132U, 0x7232U, 0x7332U, 0x7432U, 0x7532U, 0x7632U, - 0x7732U, 0x7832U, 0x7932U, 0x7A32U, 0x3032U, 0x3132U, 0x3232U, 0x3332U, - 0x3432U, 0x3532U, 0x3632U, 0x3732U, 0x3832U, 0x3932U, 0x2B32U, 0x2F32U, - 0x4133U, 0x4233U, 0x4333U, 0x4433U, 0x4533U, 0x4633U, 0x4733U, 0x4833U, - 0x4933U, 0x4A33U, 0x4B33U, 0x4C33U, 0x4D33U, 0x4E33U, 0x4F33U, 0x5033U, - 0x5133U, 0x5233U, 0x5333U, 0x5433U, 0x5533U, 0x5633U, 0x5733U, 0x5833U, - 0x5933U, 0x5A33U, 0x6133U, 0x6233U, 0x6333U, 0x6433U, 0x6533U, 0x6633U, - 0x6733U, 0x6833U, 0x6933U, 0x6A33U, 0x6B33U, 0x6C33U, 0x6D33U, 0x6E33U, - 0x6F33U, 0x7033U, 0x7133U, 0x7233U, 0x7333U, 0x7433U, 0x7533U, 0x7633U, - 0x7733U, 0x7833U, 0x7933U, 0x7A33U, 0x3033U, 0x3133U, 0x3233U, 0x3333U, - 0x3433U, 0x3533U, 0x3633U, 0x3733U, 0x3833U, 0x3933U, 0x2B33U, 0x2F33U, - 0x4134U, 0x4234U, 0x4334U, 0x4434U, 0x4534U, 0x4634U, 0x4734U, 0x4834U, - 0x4934U, 0x4A34U, 0x4B34U, 0x4C34U, 0x4D34U, 0x4E34U, 0x4F34U, 0x5034U, - 0x5134U, 0x5234U, 0x5334U, 0x5434U, 0x5534U, 0x5634U, 0x5734U, 0x5834U, - 0x5934U, 0x5A34U, 0x6134U, 0x6234U, 0x6334U, 0x6434U, 0x6534U, 0x6634U, - 0x6734U, 0x6834U, 0x6934U, 0x6A34U, 0x6B34U, 0x6C34U, 0x6D34U, 0x6E34U, - 0x6F34U, 0x7034U, 0x7134U, 0x7234U, 0x7334U, 0x7434U, 0x7534U, 0x7634U, - 0x7734U, 0x7834U, 0x7934U, 0x7A34U, 0x3034U, 0x3134U, 0x3234U, 0x3334U, - 0x3434U, 0x3534U, 0x3634U, 0x3734U, 0x3834U, 0x3934U, 0x2B34U, 0x2F34U, - 0x4135U, 0x4235U, 0x4335U, 0x4435U, 0x4535U, 0x4635U, 0x4735U, 0x4835U, - 0x4935U, 0x4A35U, 0x4B35U, 0x4C35U, 0x4D35U, 0x4E35U, 0x4F35U, 0x5035U, - 0x5135U, 0x5235U, 0x5335U, 0x5435U, 0x5535U, 0x5635U, 0x5735U, 0x5835U, - 0x5935U, 0x5A35U, 0x6135U, 0x6235U, 0x6335U, 0x6435U, 0x6535U, 0x6635U, - 0x6735U, 0x6835U, 0x6935U, 0x6A35U, 0x6B35U, 0x6C35U, 0x6D35U, 0x6E35U, - 0x6F35U, 0x7035U, 0x7135U, 0x7235U, 0x7335U, 0x7435U, 0x7535U, 0x7635U, - 0x7735U, 0x7835U, 0x7935U, 0x7A35U, 0x3035U, 0x3135U, 0x3235U, 0x3335U, - 0x3435U, 0x3535U, 0x3635U, 0x3735U, 0x3835U, 0x3935U, 0x2B35U, 0x2F35U, - 0x4136U, 0x4236U, 0x4336U, 0x4436U, 0x4536U, 0x4636U, 0x4736U, 0x4836U, - 0x4936U, 0x4A36U, 0x4B36U, 0x4C36U, 0x4D36U, 0x4E36U, 0x4F36U, 0x5036U, - 0x5136U, 0x5236U, 0x5336U, 0x5436U, 0x5536U, 0x5636U, 0x5736U, 0x5836U, - 0x5936U, 0x5A36U, 0x6136U, 0x6236U, 0x6336U, 0x6436U, 0x6536U, 0x6636U, - 0x6736U, 0x6836U, 0x6936U, 0x6A36U, 0x6B36U, 0x6C36U, 0x6D36U, 0x6E36U, - 0x6F36U, 0x7036U, 0x7136U, 0x7236U, 0x7336U, 0x7436U, 0x7536U, 0x7636U, - 0x7736U, 0x7836U, 0x7936U, 0x7A36U, 0x3036U, 0x3136U, 0x3236U, 0x3336U, - 0x3436U, 0x3536U, 0x3636U, 0x3736U, 0x3836U, 0x3936U, 0x2B36U, 0x2F36U, - 0x4137U, 0x4237U, 0x4337U, 0x4437U, 0x4537U, 0x4637U, 0x4737U, 0x4837U, - 0x4937U, 0x4A37U, 0x4B37U, 0x4C37U, 0x4D37U, 0x4E37U, 0x4F37U, 0x5037U, - 0x5137U, 0x5237U, 0x5337U, 0x5437U, 0x5537U, 0x5637U, 0x5737U, 0x5837U, - 0x5937U, 0x5A37U, 0x6137U, 0x6237U, 0x6337U, 0x6437U, 0x6537U, 0x6637U, - 0x6737U, 0x6837U, 0x6937U, 0x6A37U, 0x6B37U, 0x6C37U, 0x6D37U, 0x6E37U, - 0x6F37U, 0x7037U, 0x7137U, 0x7237U, 0x7337U, 0x7437U, 0x7537U, 0x7637U, - 0x7737U, 0x7837U, 0x7937U, 0x7A37U, 0x3037U, 0x3137U, 0x3237U, 0x3337U, - 0x3437U, 0x3537U, 0x3637U, 0x3737U, 0x3837U, 0x3937U, 0x2B37U, 0x2F37U, - 0x4138U, 0x4238U, 0x4338U, 0x4438U, 0x4538U, 0x4638U, 0x4738U, 0x4838U, - 0x4938U, 0x4A38U, 0x4B38U, 0x4C38U, 0x4D38U, 0x4E38U, 0x4F38U, 0x5038U, - 0x5138U, 0x5238U, 0x5338U, 0x5438U, 0x5538U, 0x5638U, 0x5738U, 0x5838U, - 0x5938U, 0x5A38U, 0x6138U, 0x6238U, 0x6338U, 0x6438U, 0x6538U, 0x6638U, - 0x6738U, 0x6838U, 0x6938U, 0x6A38U, 0x6B38U, 0x6C38U, 0x6D38U, 0x6E38U, - 0x6F38U, 0x7038U, 0x7138U, 0x7238U, 0x7338U, 0x7438U, 0x7538U, 0x7638U, - 0x7738U, 0x7838U, 0x7938U, 0x7A38U, 0x3038U, 0x3138U, 0x3238U, 0x3338U, - 0x3438U, 0x3538U, 0x3638U, 0x3738U, 0x3838U, 0x3938U, 0x2B38U, 0x2F38U, - 0x4139U, 0x4239U, 0x4339U, 0x4439U, 0x4539U, 0x4639U, 0x4739U, 0x4839U, - 0x4939U, 0x4A39U, 0x4B39U, 0x4C39U, 0x4D39U, 0x4E39U, 0x4F39U, 0x5039U, - 0x5139U, 0x5239U, 0x5339U, 0x5439U, 0x5539U, 0x5639U, 0x5739U, 0x5839U, - 0x5939U, 0x5A39U, 0x6139U, 0x6239U, 0x6339U, 0x6439U, 0x6539U, 0x6639U, - 0x6739U, 0x6839U, 0x6939U, 0x6A39U, 0x6B39U, 0x6C39U, 0x6D39U, 0x6E39U, - 0x6F39U, 0x7039U, 0x7139U, 0x7239U, 0x7339U, 0x7439U, 0x7539U, 0x7639U, - 0x7739U, 0x7839U, 0x7939U, 0x7A39U, 0x3039U, 0x3139U, 0x3239U, 0x3339U, - 0x3439U, 0x3539U, 0x3639U, 0x3739U, 0x3839U, 0x3939U, 0x2B39U, 0x2F39U, - 0x412BU, 0x422BU, 0x432BU, 0x442BU, 0x452BU, 0x462BU, 0x472BU, 0x482BU, - 0x492BU, 0x4A2BU, 0x4B2BU, 0x4C2BU, 0x4D2BU, 0x4E2BU, 0x4F2BU, 0x502BU, - 0x512BU, 0x522BU, 0x532BU, 0x542BU, 0x552BU, 0x562BU, 0x572BU, 0x582BU, - 0x592BU, 0x5A2BU, 0x612BU, 0x622BU, 0x632BU, 0x642BU, 0x652BU, 0x662BU, - 0x672BU, 0x682BU, 0x692BU, 0x6A2BU, 0x6B2BU, 0x6C2BU, 0x6D2BU, 0x6E2BU, - 0x6F2BU, 0x702BU, 0x712BU, 0x722BU, 0x732BU, 0x742BU, 0x752BU, 0x762BU, - 0x772BU, 0x782BU, 0x792BU, 0x7A2BU, 0x302BU, 0x312BU, 0x322BU, 0x332BU, - 0x342BU, 0x352BU, 0x362BU, 0x372BU, 0x382BU, 0x392BU, 0x2B2BU, 0x2F2BU, - 0x412FU, 0x422FU, 0x432FU, 0x442FU, 0x452FU, 0x462FU, 0x472FU, 0x482FU, - 0x492FU, 0x4A2FU, 0x4B2FU, 0x4C2FU, 0x4D2FU, 0x4E2FU, 0x4F2FU, 0x502FU, - 0x512FU, 0x522FU, 0x532FU, 0x542FU, 0x552FU, 0x562FU, 0x572FU, 0x582FU, - 0x592FU, 0x5A2FU, 0x612FU, 0x622FU, 0x632FU, 0x642FU, 0x652FU, 0x662FU, - 0x672FU, 0x682FU, 0x692FU, 0x6A2FU, 0x6B2FU, 0x6C2FU, 0x6D2FU, 0x6E2FU, - 0x6F2FU, 0x702FU, 0x712FU, 0x722FU, 0x732FU, 0x742FU, 0x752FU, 0x762FU, - 0x772FU, 0x782FU, 0x792FU, 0x7A2FU, 0x302FU, 0x312FU, 0x322FU, 0x332FU, - 0x342FU, 0x352FU, 0x362FU, 0x372FU, 0x382FU, 0x392FU, 0x2B2FU, 0x2F2FU, -#else - 0x4141U, 0x4142U, 0x4143U, 0x4144U, 0x4145U, 0x4146U, 0x4147U, 0x4148U, - 0x4149U, 0x414AU, 0x414BU, 0x414CU, 0x414DU, 0x414EU, 0x414FU, 0x4150U, - 0x4151U, 0x4152U, 0x4153U, 0x4154U, 0x4155U, 0x4156U, 0x4157U, 0x4158U, - 0x4159U, 0x415AU, 0x4161U, 0x4162U, 0x4163U, 0x4164U, 0x4165U, 0x4166U, - 0x4167U, 0x4168U, 0x4169U, 0x416AU, 0x416BU, 0x416CU, 0x416DU, 0x416EU, - 0x416FU, 0x4170U, 0x4171U, 0x4172U, 0x4173U, 0x4174U, 0x4175U, 0x4176U, - 0x4177U, 0x4178U, 0x4179U, 0x417AU, 0x4130U, 0x4131U, 0x4132U, 0x4133U, - 0x4134U, 0x4135U, 0x4136U, 0x4137U, 0x4138U, 0x4139U, 0x412BU, 0x412FU, - 0x4241U, 0x4242U, 0x4243U, 0x4244U, 0x4245U, 0x4246U, 0x4247U, 0x4248U, - 0x4249U, 0x424AU, 0x424BU, 0x424CU, 0x424DU, 0x424EU, 0x424FU, 0x4250U, - 0x4251U, 0x4252U, 0x4253U, 0x4254U, 0x4255U, 0x4256U, 0x4257U, 0x4258U, - 0x4259U, 0x425AU, 0x4261U, 0x4262U, 0x4263U, 0x4264U, 0x4265U, 0x4266U, - 0x4267U, 0x4268U, 0x4269U, 0x426AU, 0x426BU, 0x426CU, 0x426DU, 0x426EU, - 0x426FU, 0x4270U, 0x4271U, 0x4272U, 0x4273U, 0x4274U, 0x4275U, 0x4276U, - 0x4277U, 0x4278U, 0x4279U, 0x427AU, 0x4230U, 0x4231U, 0x4232U, 0x4233U, - 0x4234U, 0x4235U, 0x4236U, 0x4237U, 0x4238U, 0x4239U, 0x422BU, 0x422FU, - 0x4341U, 0x4342U, 0x4343U, 0x4344U, 0x4345U, 0x4346U, 0x4347U, 0x4348U, - 0x4349U, 0x434AU, 0x434BU, 0x434CU, 0x434DU, 0x434EU, 0x434FU, 0x4350U, - 0x4351U, 0x4352U, 0x4353U, 0x4354U, 0x4355U, 0x4356U, 0x4357U, 0x4358U, - 0x4359U, 0x435AU, 0x4361U, 0x4362U, 0x4363U, 0x4364U, 0x4365U, 0x4366U, - 0x4367U, 0x4368U, 0x4369U, 0x436AU, 0x436BU, 0x436CU, 0x436DU, 0x436EU, - 0x436FU, 0x4370U, 0x4371U, 0x4372U, 0x4373U, 0x4374U, 0x4375U, 0x4376U, - 0x4377U, 0x4378U, 0x4379U, 0x437AU, 0x4330U, 0x4331U, 0x4332U, 0x4333U, - 0x4334U, 0x4335U, 0x4336U, 0x4337U, 0x4338U, 0x4339U, 0x432BU, 0x432FU, - 0x4441U, 0x4442U, 0x4443U, 0x4444U, 0x4445U, 0x4446U, 0x4447U, 0x4448U, - 0x4449U, 0x444AU, 0x444BU, 0x444CU, 0x444DU, 0x444EU, 0x444FU, 0x4450U, - 0x4451U, 0x4452U, 0x4453U, 0x4454U, 0x4455U, 0x4456U, 0x4457U, 0x4458U, - 0x4459U, 0x445AU, 0x4461U, 0x4462U, 0x4463U, 0x4464U, 0x4465U, 0x4466U, - 0x4467U, 0x4468U, 0x4469U, 0x446AU, 0x446BU, 0x446CU, 0x446DU, 0x446EU, - 0x446FU, 0x4470U, 0x4471U, 0x4472U, 0x4473U, 0x4474U, 0x4475U, 0x4476U, - 0x4477U, 0x4478U, 0x4479U, 0x447AU, 0x4430U, 0x4431U, 0x4432U, 0x4433U, - 0x4434U, 0x4435U, 0x4436U, 0x4437U, 0x4438U, 0x4439U, 0x442BU, 0x442FU, - 0x4541U, 0x4542U, 0x4543U, 0x4544U, 0x4545U, 0x4546U, 0x4547U, 0x4548U, - 0x4549U, 0x454AU, 0x454BU, 0x454CU, 0x454DU, 0x454EU, 0x454FU, 0x4550U, - 0x4551U, 0x4552U, 0x4553U, 0x4554U, 0x4555U, 0x4556U, 0x4557U, 0x4558U, - 0x4559U, 0x455AU, 0x4561U, 0x4562U, 0x4563U, 0x4564U, 0x4565U, 0x4566U, - 0x4567U, 0x4568U, 0x4569U, 0x456AU, 0x456BU, 0x456CU, 0x456DU, 0x456EU, - 0x456FU, 0x4570U, 0x4571U, 0x4572U, 0x4573U, 0x4574U, 0x4575U, 0x4576U, - 0x4577U, 0x4578U, 0x4579U, 0x457AU, 0x4530U, 0x4531U, 0x4532U, 0x4533U, - 0x4534U, 0x4535U, 0x4536U, 0x4537U, 0x4538U, 0x4539U, 0x452BU, 0x452FU, - 0x4641U, 0x4642U, 0x4643U, 0x4644U, 0x4645U, 0x4646U, 0x4647U, 0x4648U, - 0x4649U, 0x464AU, 0x464BU, 0x464CU, 0x464DU, 0x464EU, 0x464FU, 0x4650U, - 0x4651U, 0x4652U, 0x4653U, 0x4654U, 0x4655U, 0x4656U, 0x4657U, 0x4658U, - 0x4659U, 0x465AU, 0x4661U, 0x4662U, 0x4663U, 0x4664U, 0x4665U, 0x4666U, - 0x4667U, 0x4668U, 0x4669U, 0x466AU, 0x466BU, 0x466CU, 0x466DU, 0x466EU, - 0x466FU, 0x4670U, 0x4671U, 0x4672U, 0x4673U, 0x4674U, 0x4675U, 0x4676U, - 0x4677U, 0x4678U, 0x4679U, 0x467AU, 0x4630U, 0x4631U, 0x4632U, 0x4633U, - 0x4634U, 0x4635U, 0x4636U, 0x4637U, 0x4638U, 0x4639U, 0x462BU, 0x462FU, - 0x4741U, 0x4742U, 0x4743U, 0x4744U, 0x4745U, 0x4746U, 0x4747U, 0x4748U, - 0x4749U, 0x474AU, 0x474BU, 0x474CU, 0x474DU, 0x474EU, 0x474FU, 0x4750U, - 0x4751U, 0x4752U, 0x4753U, 0x4754U, 0x4755U, 0x4756U, 0x4757U, 0x4758U, - 0x4759U, 0x475AU, 0x4761U, 0x4762U, 0x4763U, 0x4764U, 0x4765U, 0x4766U, - 0x4767U, 0x4768U, 0x4769U, 0x476AU, 0x476BU, 0x476CU, 0x476DU, 0x476EU, - 0x476FU, 0x4770U, 0x4771U, 0x4772U, 0x4773U, 0x4774U, 0x4775U, 0x4776U, - 0x4777U, 0x4778U, 0x4779U, 0x477AU, 0x4730U, 0x4731U, 0x4732U, 0x4733U, - 0x4734U, 0x4735U, 0x4736U, 0x4737U, 0x4738U, 0x4739U, 0x472BU, 0x472FU, - 0x4841U, 0x4842U, 0x4843U, 0x4844U, 0x4845U, 0x4846U, 0x4847U, 0x4848U, - 0x4849U, 0x484AU, 0x484BU, 0x484CU, 0x484DU, 0x484EU, 0x484FU, 0x4850U, - 0x4851U, 0x4852U, 0x4853U, 0x4854U, 0x4855U, 0x4856U, 0x4857U, 0x4858U, - 0x4859U, 0x485AU, 0x4861U, 0x4862U, 0x4863U, 0x4864U, 0x4865U, 0x4866U, - 0x4867U, 0x4868U, 0x4869U, 0x486AU, 0x486BU, 0x486CU, 0x486DU, 0x486EU, - 0x486FU, 0x4870U, 0x4871U, 0x4872U, 0x4873U, 0x4874U, 0x4875U, 0x4876U, - 0x4877U, 0x4878U, 0x4879U, 0x487AU, 0x4830U, 0x4831U, 0x4832U, 0x4833U, - 0x4834U, 0x4835U, 0x4836U, 0x4837U, 0x4838U, 0x4839U, 0x482BU, 0x482FU, - 0x4941U, 0x4942U, 0x4943U, 0x4944U, 0x4945U, 0x4946U, 0x4947U, 0x4948U, - 0x4949U, 0x494AU, 0x494BU, 0x494CU, 0x494DU, 0x494EU, 0x494FU, 0x4950U, - 0x4951U, 0x4952U, 0x4953U, 0x4954U, 0x4955U, 0x4956U, 0x4957U, 0x4958U, - 0x4959U, 0x495AU, 0x4961U, 0x4962U, 0x4963U, 0x4964U, 0x4965U, 0x4966U, - 0x4967U, 0x4968U, 0x4969U, 0x496AU, 0x496BU, 0x496CU, 0x496DU, 0x496EU, - 0x496FU, 0x4970U, 0x4971U, 0x4972U, 0x4973U, 0x4974U, 0x4975U, 0x4976U, - 0x4977U, 0x4978U, 0x4979U, 0x497AU, 0x4930U, 0x4931U, 0x4932U, 0x4933U, - 0x4934U, 0x4935U, 0x4936U, 0x4937U, 0x4938U, 0x4939U, 0x492BU, 0x492FU, - 0x4A41U, 0x4A42U, 0x4A43U, 0x4A44U, 0x4A45U, 0x4A46U, 0x4A47U, 0x4A48U, - 0x4A49U, 0x4A4AU, 0x4A4BU, 0x4A4CU, 0x4A4DU, 0x4A4EU, 0x4A4FU, 0x4A50U, - 0x4A51U, 0x4A52U, 0x4A53U, 0x4A54U, 0x4A55U, 0x4A56U, 0x4A57U, 0x4A58U, - 0x4A59U, 0x4A5AU, 0x4A61U, 0x4A62U, 0x4A63U, 0x4A64U, 0x4A65U, 0x4A66U, - 0x4A67U, 0x4A68U, 0x4A69U, 0x4A6AU, 0x4A6BU, 0x4A6CU, 0x4A6DU, 0x4A6EU, - 0x4A6FU, 0x4A70U, 0x4A71U, 0x4A72U, 0x4A73U, 0x4A74U, 0x4A75U, 0x4A76U, - 0x4A77U, 0x4A78U, 0x4A79U, 0x4A7AU, 0x4A30U, 0x4A31U, 0x4A32U, 0x4A33U, - 0x4A34U, 0x4A35U, 0x4A36U, 0x4A37U, 0x4A38U, 0x4A39U, 0x4A2BU, 0x4A2FU, - 0x4B41U, 0x4B42U, 0x4B43U, 0x4B44U, 0x4B45U, 0x4B46U, 0x4B47U, 0x4B48U, - 0x4B49U, 0x4B4AU, 0x4B4BU, 0x4B4CU, 0x4B4DU, 0x4B4EU, 0x4B4FU, 0x4B50U, - 0x4B51U, 0x4B52U, 0x4B53U, 0x4B54U, 0x4B55U, 0x4B56U, 0x4B57U, 0x4B58U, - 0x4B59U, 0x4B5AU, 0x4B61U, 0x4B62U, 0x4B63U, 0x4B64U, 0x4B65U, 0x4B66U, - 0x4B67U, 0x4B68U, 0x4B69U, 0x4B6AU, 0x4B6BU, 0x4B6CU, 0x4B6DU, 0x4B6EU, - 0x4B6FU, 0x4B70U, 0x4B71U, 0x4B72U, 0x4B73U, 0x4B74U, 0x4B75U, 0x4B76U, - 0x4B77U, 0x4B78U, 0x4B79U, 0x4B7AU, 0x4B30U, 0x4B31U, 0x4B32U, 0x4B33U, - 0x4B34U, 0x4B35U, 0x4B36U, 0x4B37U, 0x4B38U, 0x4B39U, 0x4B2BU, 0x4B2FU, - 0x4C41U, 0x4C42U, 0x4C43U, 0x4C44U, 0x4C45U, 0x4C46U, 0x4C47U, 0x4C48U, - 0x4C49U, 0x4C4AU, 0x4C4BU, 0x4C4CU, 0x4C4DU, 0x4C4EU, 0x4C4FU, 0x4C50U, - 0x4C51U, 0x4C52U, 0x4C53U, 0x4C54U, 0x4C55U, 0x4C56U, 0x4C57U, 0x4C58U, - 0x4C59U, 0x4C5AU, 0x4C61U, 0x4C62U, 0x4C63U, 0x4C64U, 0x4C65U, 0x4C66U, - 0x4C67U, 0x4C68U, 0x4C69U, 0x4C6AU, 0x4C6BU, 0x4C6CU, 0x4C6DU, 0x4C6EU, - 0x4C6FU, 0x4C70U, 0x4C71U, 0x4C72U, 0x4C73U, 0x4C74U, 0x4C75U, 0x4C76U, - 0x4C77U, 0x4C78U, 0x4C79U, 0x4C7AU, 0x4C30U, 0x4C31U, 0x4C32U, 0x4C33U, - 0x4C34U, 0x4C35U, 0x4C36U, 0x4C37U, 0x4C38U, 0x4C39U, 0x4C2BU, 0x4C2FU, - 0x4D41U, 0x4D42U, 0x4D43U, 0x4D44U, 0x4D45U, 0x4D46U, 0x4D47U, 0x4D48U, - 0x4D49U, 0x4D4AU, 0x4D4BU, 0x4D4CU, 0x4D4DU, 0x4D4EU, 0x4D4FU, 0x4D50U, - 0x4D51U, 0x4D52U, 0x4D53U, 0x4D54U, 0x4D55U, 0x4D56U, 0x4D57U, 0x4D58U, - 0x4D59U, 0x4D5AU, 0x4D61U, 0x4D62U, 0x4D63U, 0x4D64U, 0x4D65U, 0x4D66U, - 0x4D67U, 0x4D68U, 0x4D69U, 0x4D6AU, 0x4D6BU, 0x4D6CU, 0x4D6DU, 0x4D6EU, - 0x4D6FU, 0x4D70U, 0x4D71U, 0x4D72U, 0x4D73U, 0x4D74U, 0x4D75U, 0x4D76U, - 0x4D77U, 0x4D78U, 0x4D79U, 0x4D7AU, 0x4D30U, 0x4D31U, 0x4D32U, 0x4D33U, - 0x4D34U, 0x4D35U, 0x4D36U, 0x4D37U, 0x4D38U, 0x4D39U, 0x4D2BU, 0x4D2FU, - 0x4E41U, 0x4E42U, 0x4E43U, 0x4E44U, 0x4E45U, 0x4E46U, 0x4E47U, 0x4E48U, - 0x4E49U, 0x4E4AU, 0x4E4BU, 0x4E4CU, 0x4E4DU, 0x4E4EU, 0x4E4FU, 0x4E50U, - 0x4E51U, 0x4E52U, 0x4E53U, 0x4E54U, 0x4E55U, 0x4E56U, 0x4E57U, 0x4E58U, - 0x4E59U, 0x4E5AU, 0x4E61U, 0x4E62U, 0x4E63U, 0x4E64U, 0x4E65U, 0x4E66U, - 0x4E67U, 0x4E68U, 0x4E69U, 0x4E6AU, 0x4E6BU, 0x4E6CU, 0x4E6DU, 0x4E6EU, - 0x4E6FU, 0x4E70U, 0x4E71U, 0x4E72U, 0x4E73U, 0x4E74U, 0x4E75U, 0x4E76U, - 0x4E77U, 0x4E78U, 0x4E79U, 0x4E7AU, 0x4E30U, 0x4E31U, 0x4E32U, 0x4E33U, - 0x4E34U, 0x4E35U, 0x4E36U, 0x4E37U, 0x4E38U, 0x4E39U, 0x4E2BU, 0x4E2FU, - 0x4F41U, 0x4F42U, 0x4F43U, 0x4F44U, 0x4F45U, 0x4F46U, 0x4F47U, 0x4F48U, - 0x4F49U, 0x4F4AU, 0x4F4BU, 0x4F4CU, 0x4F4DU, 0x4F4EU, 0x4F4FU, 0x4F50U, - 0x4F51U, 0x4F52U, 0x4F53U, 0x4F54U, 0x4F55U, 0x4F56U, 0x4F57U, 0x4F58U, - 0x4F59U, 0x4F5AU, 0x4F61U, 0x4F62U, 0x4F63U, 0x4F64U, 0x4F65U, 0x4F66U, - 0x4F67U, 0x4F68U, 0x4F69U, 0x4F6AU, 0x4F6BU, 0x4F6CU, 0x4F6DU, 0x4F6EU, - 0x4F6FU, 0x4F70U, 0x4F71U, 0x4F72U, 0x4F73U, 0x4F74U, 0x4F75U, 0x4F76U, - 0x4F77U, 0x4F78U, 0x4F79U, 0x4F7AU, 0x4F30U, 0x4F31U, 0x4F32U, 0x4F33U, - 0x4F34U, 0x4F35U, 0x4F36U, 0x4F37U, 0x4F38U, 0x4F39U, 0x4F2BU, 0x4F2FU, - 0x5041U, 0x5042U, 0x5043U, 0x5044U, 0x5045U, 0x5046U, 0x5047U, 0x5048U, - 0x5049U, 0x504AU, 0x504BU, 0x504CU, 0x504DU, 0x504EU, 0x504FU, 0x5050U, - 0x5051U, 0x5052U, 0x5053U, 0x5054U, 0x5055U, 0x5056U, 0x5057U, 0x5058U, - 0x5059U, 0x505AU, 0x5061U, 0x5062U, 0x5063U, 0x5064U, 0x5065U, 0x5066U, - 0x5067U, 0x5068U, 0x5069U, 0x506AU, 0x506BU, 0x506CU, 0x506DU, 0x506EU, - 0x506FU, 0x5070U, 0x5071U, 0x5072U, 0x5073U, 0x5074U, 0x5075U, 0x5076U, - 0x5077U, 0x5078U, 0x5079U, 0x507AU, 0x5030U, 0x5031U, 0x5032U, 0x5033U, - 0x5034U, 0x5035U, 0x5036U, 0x5037U, 0x5038U, 0x5039U, 0x502BU, 0x502FU, - 0x5141U, 0x5142U, 0x5143U, 0x5144U, 0x5145U, 0x5146U, 0x5147U, 0x5148U, - 0x5149U, 0x514AU, 0x514BU, 0x514CU, 0x514DU, 0x514EU, 0x514FU, 0x5150U, - 0x5151U, 0x5152U, 0x5153U, 0x5154U, 0x5155U, 0x5156U, 0x5157U, 0x5158U, - 0x5159U, 0x515AU, 0x5161U, 0x5162U, 0x5163U, 0x5164U, 0x5165U, 0x5166U, - 0x5167U, 0x5168U, 0x5169U, 0x516AU, 0x516BU, 0x516CU, 0x516DU, 0x516EU, - 0x516FU, 0x5170U, 0x5171U, 0x5172U, 0x5173U, 0x5174U, 0x5175U, 0x5176U, - 0x5177U, 0x5178U, 0x5179U, 0x517AU, 0x5130U, 0x5131U, 0x5132U, 0x5133U, - 0x5134U, 0x5135U, 0x5136U, 0x5137U, 0x5138U, 0x5139U, 0x512BU, 0x512FU, - 0x5241U, 0x5242U, 0x5243U, 0x5244U, 0x5245U, 0x5246U, 0x5247U, 0x5248U, - 0x5249U, 0x524AU, 0x524BU, 0x524CU, 0x524DU, 0x524EU, 0x524FU, 0x5250U, - 0x5251U, 0x5252U, 0x5253U, 0x5254U, 0x5255U, 0x5256U, 0x5257U, 0x5258U, - 0x5259U, 0x525AU, 0x5261U, 0x5262U, 0x5263U, 0x5264U, 0x5265U, 0x5266U, - 0x5267U, 0x5268U, 0x5269U, 0x526AU, 0x526BU, 0x526CU, 0x526DU, 0x526EU, - 0x526FU, 0x5270U, 0x5271U, 0x5272U, 0x5273U, 0x5274U, 0x5275U, 0x5276U, - 0x5277U, 0x5278U, 0x5279U, 0x527AU, 0x5230U, 0x5231U, 0x5232U, 0x5233U, - 0x5234U, 0x5235U, 0x5236U, 0x5237U, 0x5238U, 0x5239U, 0x522BU, 0x522FU, - 0x5341U, 0x5342U, 0x5343U, 0x5344U, 0x5345U, 0x5346U, 0x5347U, 0x5348U, - 0x5349U, 0x534AU, 0x534BU, 0x534CU, 0x534DU, 0x534EU, 0x534FU, 0x5350U, - 0x5351U, 0x5352U, 0x5353U, 0x5354U, 0x5355U, 0x5356U, 0x5357U, 0x5358U, - 0x5359U, 0x535AU, 0x5361U, 0x5362U, 0x5363U, 0x5364U, 0x5365U, 0x5366U, - 0x5367U, 0x5368U, 0x5369U, 0x536AU, 0x536BU, 0x536CU, 0x536DU, 0x536EU, - 0x536FU, 0x5370U, 0x5371U, 0x5372U, 0x5373U, 0x5374U, 0x5375U, 0x5376U, - 0x5377U, 0x5378U, 0x5379U, 0x537AU, 0x5330U, 0x5331U, 0x5332U, 0x5333U, - 0x5334U, 0x5335U, 0x5336U, 0x5337U, 0x5338U, 0x5339U, 0x532BU, 0x532FU, - 0x5441U, 0x5442U, 0x5443U, 0x5444U, 0x5445U, 0x5446U, 0x5447U, 0x5448U, - 0x5449U, 0x544AU, 0x544BU, 0x544CU, 0x544DU, 0x544EU, 0x544FU, 0x5450U, - 0x5451U, 0x5452U, 0x5453U, 0x5454U, 0x5455U, 0x5456U, 0x5457U, 0x5458U, - 0x5459U, 0x545AU, 0x5461U, 0x5462U, 0x5463U, 0x5464U, 0x5465U, 0x5466U, - 0x5467U, 0x5468U, 0x5469U, 0x546AU, 0x546BU, 0x546CU, 0x546DU, 0x546EU, - 0x546FU, 0x5470U, 0x5471U, 0x5472U, 0x5473U, 0x5474U, 0x5475U, 0x5476U, - 0x5477U, 0x5478U, 0x5479U, 0x547AU, 0x5430U, 0x5431U, 0x5432U, 0x5433U, - 0x5434U, 0x5435U, 0x5436U, 0x5437U, 0x5438U, 0x5439U, 0x542BU, 0x542FU, - 0x5541U, 0x5542U, 0x5543U, 0x5544U, 0x5545U, 0x5546U, 0x5547U, 0x5548U, - 0x5549U, 0x554AU, 0x554BU, 0x554CU, 0x554DU, 0x554EU, 0x554FU, 0x5550U, - 0x5551U, 0x5552U, 0x5553U, 0x5554U, 0x5555U, 0x5556U, 0x5557U, 0x5558U, - 0x5559U, 0x555AU, 0x5561U, 0x5562U, 0x5563U, 0x5564U, 0x5565U, 0x5566U, - 0x5567U, 0x5568U, 0x5569U, 0x556AU, 0x556BU, 0x556CU, 0x556DU, 0x556EU, - 0x556FU, 0x5570U, 0x5571U, 0x5572U, 0x5573U, 0x5574U, 0x5575U, 0x5576U, - 0x5577U, 0x5578U, 0x5579U, 0x557AU, 0x5530U, 0x5531U, 0x5532U, 0x5533U, - 0x5534U, 0x5535U, 0x5536U, 0x5537U, 0x5538U, 0x5539U, 0x552BU, 0x552FU, - 0x5641U, 0x5642U, 0x5643U, 0x5644U, 0x5645U, 0x5646U, 0x5647U, 0x5648U, - 0x5649U, 0x564AU, 0x564BU, 0x564CU, 0x564DU, 0x564EU, 0x564FU, 0x5650U, - 0x5651U, 0x5652U, 0x5653U, 0x5654U, 0x5655U, 0x5656U, 0x5657U, 0x5658U, - 0x5659U, 0x565AU, 0x5661U, 0x5662U, 0x5663U, 0x5664U, 0x5665U, 0x5666U, - 0x5667U, 0x5668U, 0x5669U, 0x566AU, 0x566BU, 0x566CU, 0x566DU, 0x566EU, - 0x566FU, 0x5670U, 0x5671U, 0x5672U, 0x5673U, 0x5674U, 0x5675U, 0x5676U, - 0x5677U, 0x5678U, 0x5679U, 0x567AU, 0x5630U, 0x5631U, 0x5632U, 0x5633U, - 0x5634U, 0x5635U, 0x5636U, 0x5637U, 0x5638U, 0x5639U, 0x562BU, 0x562FU, - 0x5741U, 0x5742U, 0x5743U, 0x5744U, 0x5745U, 0x5746U, 0x5747U, 0x5748U, - 0x5749U, 0x574AU, 0x574BU, 0x574CU, 0x574DU, 0x574EU, 0x574FU, 0x5750U, - 0x5751U, 0x5752U, 0x5753U, 0x5754U, 0x5755U, 0x5756U, 0x5757U, 0x5758U, - 0x5759U, 0x575AU, 0x5761U, 0x5762U, 0x5763U, 0x5764U, 0x5765U, 0x5766U, - 0x5767U, 0x5768U, 0x5769U, 0x576AU, 0x576BU, 0x576CU, 0x576DU, 0x576EU, - 0x576FU, 0x5770U, 0x5771U, 0x5772U, 0x5773U, 0x5774U, 0x5775U, 0x5776U, - 0x5777U, 0x5778U, 0x5779U, 0x577AU, 0x5730U, 0x5731U, 0x5732U, 0x5733U, - 0x5734U, 0x5735U, 0x5736U, 0x5737U, 0x5738U, 0x5739U, 0x572BU, 0x572FU, - 0x5841U, 0x5842U, 0x5843U, 0x5844U, 0x5845U, 0x5846U, 0x5847U, 0x5848U, - 0x5849U, 0x584AU, 0x584BU, 0x584CU, 0x584DU, 0x584EU, 0x584FU, 0x5850U, - 0x5851U, 0x5852U, 0x5853U, 0x5854U, 0x5855U, 0x5856U, 0x5857U, 0x5858U, - 0x5859U, 0x585AU, 0x5861U, 0x5862U, 0x5863U, 0x5864U, 0x5865U, 0x5866U, - 0x5867U, 0x5868U, 0x5869U, 0x586AU, 0x586BU, 0x586CU, 0x586DU, 0x586EU, - 0x586FU, 0x5870U, 0x5871U, 0x5872U, 0x5873U, 0x5874U, 0x5875U, 0x5876U, - 0x5877U, 0x5878U, 0x5879U, 0x587AU, 0x5830U, 0x5831U, 0x5832U, 0x5833U, - 0x5834U, 0x5835U, 0x5836U, 0x5837U, 0x5838U, 0x5839U, 0x582BU, 0x582FU, - 0x5941U, 0x5942U, 0x5943U, 0x5944U, 0x5945U, 0x5946U, 0x5947U, 0x5948U, - 0x5949U, 0x594AU, 0x594BU, 0x594CU, 0x594DU, 0x594EU, 0x594FU, 0x5950U, - 0x5951U, 0x5952U, 0x5953U, 0x5954U, 0x5955U, 0x5956U, 0x5957U, 0x5958U, - 0x5959U, 0x595AU, 0x5961U, 0x5962U, 0x5963U, 0x5964U, 0x5965U, 0x5966U, - 0x5967U, 0x5968U, 0x5969U, 0x596AU, 0x596BU, 0x596CU, 0x596DU, 0x596EU, - 0x596FU, 0x5970U, 0x5971U, 0x5972U, 0x5973U, 0x5974U, 0x5975U, 0x5976U, - 0x5977U, 0x5978U, 0x5979U, 0x597AU, 0x5930U, 0x5931U, 0x5932U, 0x5933U, - 0x5934U, 0x5935U, 0x5936U, 0x5937U, 0x5938U, 0x5939U, 0x592BU, 0x592FU, - 0x5A41U, 0x5A42U, 0x5A43U, 0x5A44U, 0x5A45U, 0x5A46U, 0x5A47U, 0x5A48U, - 0x5A49U, 0x5A4AU, 0x5A4BU, 0x5A4CU, 0x5A4DU, 0x5A4EU, 0x5A4FU, 0x5A50U, - 0x5A51U, 0x5A52U, 0x5A53U, 0x5A54U, 0x5A55U, 0x5A56U, 0x5A57U, 0x5A58U, - 0x5A59U, 0x5A5AU, 0x5A61U, 0x5A62U, 0x5A63U, 0x5A64U, 0x5A65U, 0x5A66U, - 0x5A67U, 0x5A68U, 0x5A69U, 0x5A6AU, 0x5A6BU, 0x5A6CU, 0x5A6DU, 0x5A6EU, - 0x5A6FU, 0x5A70U, 0x5A71U, 0x5A72U, 0x5A73U, 0x5A74U, 0x5A75U, 0x5A76U, - 0x5A77U, 0x5A78U, 0x5A79U, 0x5A7AU, 0x5A30U, 0x5A31U, 0x5A32U, 0x5A33U, - 0x5A34U, 0x5A35U, 0x5A36U, 0x5A37U, 0x5A38U, 0x5A39U, 0x5A2BU, 0x5A2FU, - 0x6141U, 0x6142U, 0x6143U, 0x6144U, 0x6145U, 0x6146U, 0x6147U, 0x6148U, - 0x6149U, 0x614AU, 0x614BU, 0x614CU, 0x614DU, 0x614EU, 0x614FU, 0x6150U, - 0x6151U, 0x6152U, 0x6153U, 0x6154U, 0x6155U, 0x6156U, 0x6157U, 0x6158U, - 0x6159U, 0x615AU, 0x6161U, 0x6162U, 0x6163U, 0x6164U, 0x6165U, 0x6166U, - 0x6167U, 0x6168U, 0x6169U, 0x616AU, 0x616BU, 0x616CU, 0x616DU, 0x616EU, - 0x616FU, 0x6170U, 0x6171U, 0x6172U, 0x6173U, 0x6174U, 0x6175U, 0x6176U, - 0x6177U, 0x6178U, 0x6179U, 0x617AU, 0x6130U, 0x6131U, 0x6132U, 0x6133U, - 0x6134U, 0x6135U, 0x6136U, 0x6137U, 0x6138U, 0x6139U, 0x612BU, 0x612FU, - 0x6241U, 0x6242U, 0x6243U, 0x6244U, 0x6245U, 0x6246U, 0x6247U, 0x6248U, - 0x6249U, 0x624AU, 0x624BU, 0x624CU, 0x624DU, 0x624EU, 0x624FU, 0x6250U, - 0x6251U, 0x6252U, 0x6253U, 0x6254U, 0x6255U, 0x6256U, 0x6257U, 0x6258U, - 0x6259U, 0x625AU, 0x6261U, 0x6262U, 0x6263U, 0x6264U, 0x6265U, 0x6266U, - 0x6267U, 0x6268U, 0x6269U, 0x626AU, 0x626BU, 0x626CU, 0x626DU, 0x626EU, - 0x626FU, 0x6270U, 0x6271U, 0x6272U, 0x6273U, 0x6274U, 0x6275U, 0x6276U, - 0x6277U, 0x6278U, 0x6279U, 0x627AU, 0x6230U, 0x6231U, 0x6232U, 0x6233U, - 0x6234U, 0x6235U, 0x6236U, 0x6237U, 0x6238U, 0x6239U, 0x622BU, 0x622FU, - 0x6341U, 0x6342U, 0x6343U, 0x6344U, 0x6345U, 0x6346U, 0x6347U, 0x6348U, - 0x6349U, 0x634AU, 0x634BU, 0x634CU, 0x634DU, 0x634EU, 0x634FU, 0x6350U, - 0x6351U, 0x6352U, 0x6353U, 0x6354U, 0x6355U, 0x6356U, 0x6357U, 0x6358U, - 0x6359U, 0x635AU, 0x6361U, 0x6362U, 0x6363U, 0x6364U, 0x6365U, 0x6366U, - 0x6367U, 0x6368U, 0x6369U, 0x636AU, 0x636BU, 0x636CU, 0x636DU, 0x636EU, - 0x636FU, 0x6370U, 0x6371U, 0x6372U, 0x6373U, 0x6374U, 0x6375U, 0x6376U, - 0x6377U, 0x6378U, 0x6379U, 0x637AU, 0x6330U, 0x6331U, 0x6332U, 0x6333U, - 0x6334U, 0x6335U, 0x6336U, 0x6337U, 0x6338U, 0x6339U, 0x632BU, 0x632FU, - 0x6441U, 0x6442U, 0x6443U, 0x6444U, 0x6445U, 0x6446U, 0x6447U, 0x6448U, - 0x6449U, 0x644AU, 0x644BU, 0x644CU, 0x644DU, 0x644EU, 0x644FU, 0x6450U, - 0x6451U, 0x6452U, 0x6453U, 0x6454U, 0x6455U, 0x6456U, 0x6457U, 0x6458U, - 0x6459U, 0x645AU, 0x6461U, 0x6462U, 0x6463U, 0x6464U, 0x6465U, 0x6466U, - 0x6467U, 0x6468U, 0x6469U, 0x646AU, 0x646BU, 0x646CU, 0x646DU, 0x646EU, - 0x646FU, 0x6470U, 0x6471U, 0x6472U, 0x6473U, 0x6474U, 0x6475U, 0x6476U, - 0x6477U, 0x6478U, 0x6479U, 0x647AU, 0x6430U, 0x6431U, 0x6432U, 0x6433U, - 0x6434U, 0x6435U, 0x6436U, 0x6437U, 0x6438U, 0x6439U, 0x642BU, 0x642FU, - 0x6541U, 0x6542U, 0x6543U, 0x6544U, 0x6545U, 0x6546U, 0x6547U, 0x6548U, - 0x6549U, 0x654AU, 0x654BU, 0x654CU, 0x654DU, 0x654EU, 0x654FU, 0x6550U, - 0x6551U, 0x6552U, 0x6553U, 0x6554U, 0x6555U, 0x6556U, 0x6557U, 0x6558U, - 0x6559U, 0x655AU, 0x6561U, 0x6562U, 0x6563U, 0x6564U, 0x6565U, 0x6566U, - 0x6567U, 0x6568U, 0x6569U, 0x656AU, 0x656BU, 0x656CU, 0x656DU, 0x656EU, - 0x656FU, 0x6570U, 0x6571U, 0x6572U, 0x6573U, 0x6574U, 0x6575U, 0x6576U, - 0x6577U, 0x6578U, 0x6579U, 0x657AU, 0x6530U, 0x6531U, 0x6532U, 0x6533U, - 0x6534U, 0x6535U, 0x6536U, 0x6537U, 0x6538U, 0x6539U, 0x652BU, 0x652FU, - 0x6641U, 0x6642U, 0x6643U, 0x6644U, 0x6645U, 0x6646U, 0x6647U, 0x6648U, - 0x6649U, 0x664AU, 0x664BU, 0x664CU, 0x664DU, 0x664EU, 0x664FU, 0x6650U, - 0x6651U, 0x6652U, 0x6653U, 0x6654U, 0x6655U, 0x6656U, 0x6657U, 0x6658U, - 0x6659U, 0x665AU, 0x6661U, 0x6662U, 0x6663U, 0x6664U, 0x6665U, 0x6666U, - 0x6667U, 0x6668U, 0x6669U, 0x666AU, 0x666BU, 0x666CU, 0x666DU, 0x666EU, - 0x666FU, 0x6670U, 0x6671U, 0x6672U, 0x6673U, 0x6674U, 0x6675U, 0x6676U, - 0x6677U, 0x6678U, 0x6679U, 0x667AU, 0x6630U, 0x6631U, 0x6632U, 0x6633U, - 0x6634U, 0x6635U, 0x6636U, 0x6637U, 0x6638U, 0x6639U, 0x662BU, 0x662FU, - 0x6741U, 0x6742U, 0x6743U, 0x6744U, 0x6745U, 0x6746U, 0x6747U, 0x6748U, - 0x6749U, 0x674AU, 0x674BU, 0x674CU, 0x674DU, 0x674EU, 0x674FU, 0x6750U, - 0x6751U, 0x6752U, 0x6753U, 0x6754U, 0x6755U, 0x6756U, 0x6757U, 0x6758U, - 0x6759U, 0x675AU, 0x6761U, 0x6762U, 0x6763U, 0x6764U, 0x6765U, 0x6766U, - 0x6767U, 0x6768U, 0x6769U, 0x676AU, 0x676BU, 0x676CU, 0x676DU, 0x676EU, - 0x676FU, 0x6770U, 0x6771U, 0x6772U, 0x6773U, 0x6774U, 0x6775U, 0x6776U, - 0x6777U, 0x6778U, 0x6779U, 0x677AU, 0x6730U, 0x6731U, 0x6732U, 0x6733U, - 0x6734U, 0x6735U, 0x6736U, 0x6737U, 0x6738U, 0x6739U, 0x672BU, 0x672FU, - 0x6841U, 0x6842U, 0x6843U, 0x6844U, 0x6845U, 0x6846U, 0x6847U, 0x6848U, - 0x6849U, 0x684AU, 0x684BU, 0x684CU, 0x684DU, 0x684EU, 0x684FU, 0x6850U, - 0x6851U, 0x6852U, 0x6853U, 0x6854U, 0x6855U, 0x6856U, 0x6857U, 0x6858U, - 0x6859U, 0x685AU, 0x6861U, 0x6862U, 0x6863U, 0x6864U, 0x6865U, 0x6866U, - 0x6867U, 0x6868U, 0x6869U, 0x686AU, 0x686BU, 0x686CU, 0x686DU, 0x686EU, - 0x686FU, 0x6870U, 0x6871U, 0x6872U, 0x6873U, 0x6874U, 0x6875U, 0x6876U, - 0x6877U, 0x6878U, 0x6879U, 0x687AU, 0x6830U, 0x6831U, 0x6832U, 0x6833U, - 0x6834U, 0x6835U, 0x6836U, 0x6837U, 0x6838U, 0x6839U, 0x682BU, 0x682FU, - 0x6941U, 0x6942U, 0x6943U, 0x6944U, 0x6945U, 0x6946U, 0x6947U, 0x6948U, - 0x6949U, 0x694AU, 0x694BU, 0x694CU, 0x694DU, 0x694EU, 0x694FU, 0x6950U, - 0x6951U, 0x6952U, 0x6953U, 0x6954U, 0x6955U, 0x6956U, 0x6957U, 0x6958U, - 0x6959U, 0x695AU, 0x6961U, 0x6962U, 0x6963U, 0x6964U, 0x6965U, 0x6966U, - 0x6967U, 0x6968U, 0x6969U, 0x696AU, 0x696BU, 0x696CU, 0x696DU, 0x696EU, - 0x696FU, 0x6970U, 0x6971U, 0x6972U, 0x6973U, 0x6974U, 0x6975U, 0x6976U, - 0x6977U, 0x6978U, 0x6979U, 0x697AU, 0x6930U, 0x6931U, 0x6932U, 0x6933U, - 0x6934U, 0x6935U, 0x6936U, 0x6937U, 0x6938U, 0x6939U, 0x692BU, 0x692FU, - 0x6A41U, 0x6A42U, 0x6A43U, 0x6A44U, 0x6A45U, 0x6A46U, 0x6A47U, 0x6A48U, - 0x6A49U, 0x6A4AU, 0x6A4BU, 0x6A4CU, 0x6A4DU, 0x6A4EU, 0x6A4FU, 0x6A50U, - 0x6A51U, 0x6A52U, 0x6A53U, 0x6A54U, 0x6A55U, 0x6A56U, 0x6A57U, 0x6A58U, - 0x6A59U, 0x6A5AU, 0x6A61U, 0x6A62U, 0x6A63U, 0x6A64U, 0x6A65U, 0x6A66U, - 0x6A67U, 0x6A68U, 0x6A69U, 0x6A6AU, 0x6A6BU, 0x6A6CU, 0x6A6DU, 0x6A6EU, - 0x6A6FU, 0x6A70U, 0x6A71U, 0x6A72U, 0x6A73U, 0x6A74U, 0x6A75U, 0x6A76U, - 0x6A77U, 0x6A78U, 0x6A79U, 0x6A7AU, 0x6A30U, 0x6A31U, 0x6A32U, 0x6A33U, - 0x6A34U, 0x6A35U, 0x6A36U, 0x6A37U, 0x6A38U, 0x6A39U, 0x6A2BU, 0x6A2FU, - 0x6B41U, 0x6B42U, 0x6B43U, 0x6B44U, 0x6B45U, 0x6B46U, 0x6B47U, 0x6B48U, - 0x6B49U, 0x6B4AU, 0x6B4BU, 0x6B4CU, 0x6B4DU, 0x6B4EU, 0x6B4FU, 0x6B50U, - 0x6B51U, 0x6B52U, 0x6B53U, 0x6B54U, 0x6B55U, 0x6B56U, 0x6B57U, 0x6B58U, - 0x6B59U, 0x6B5AU, 0x6B61U, 0x6B62U, 0x6B63U, 0x6B64U, 0x6B65U, 0x6B66U, - 0x6B67U, 0x6B68U, 0x6B69U, 0x6B6AU, 0x6B6BU, 0x6B6CU, 0x6B6DU, 0x6B6EU, - 0x6B6FU, 0x6B70U, 0x6B71U, 0x6B72U, 0x6B73U, 0x6B74U, 0x6B75U, 0x6B76U, - 0x6B77U, 0x6B78U, 0x6B79U, 0x6B7AU, 0x6B30U, 0x6B31U, 0x6B32U, 0x6B33U, - 0x6B34U, 0x6B35U, 0x6B36U, 0x6B37U, 0x6B38U, 0x6B39U, 0x6B2BU, 0x6B2FU, - 0x6C41U, 0x6C42U, 0x6C43U, 0x6C44U, 0x6C45U, 0x6C46U, 0x6C47U, 0x6C48U, - 0x6C49U, 0x6C4AU, 0x6C4BU, 0x6C4CU, 0x6C4DU, 0x6C4EU, 0x6C4FU, 0x6C50U, - 0x6C51U, 0x6C52U, 0x6C53U, 0x6C54U, 0x6C55U, 0x6C56U, 0x6C57U, 0x6C58U, - 0x6C59U, 0x6C5AU, 0x6C61U, 0x6C62U, 0x6C63U, 0x6C64U, 0x6C65U, 0x6C66U, - 0x6C67U, 0x6C68U, 0x6C69U, 0x6C6AU, 0x6C6BU, 0x6C6CU, 0x6C6DU, 0x6C6EU, - 0x6C6FU, 0x6C70U, 0x6C71U, 0x6C72U, 0x6C73U, 0x6C74U, 0x6C75U, 0x6C76U, - 0x6C77U, 0x6C78U, 0x6C79U, 0x6C7AU, 0x6C30U, 0x6C31U, 0x6C32U, 0x6C33U, - 0x6C34U, 0x6C35U, 0x6C36U, 0x6C37U, 0x6C38U, 0x6C39U, 0x6C2BU, 0x6C2FU, - 0x6D41U, 0x6D42U, 0x6D43U, 0x6D44U, 0x6D45U, 0x6D46U, 0x6D47U, 0x6D48U, - 0x6D49U, 0x6D4AU, 0x6D4BU, 0x6D4CU, 0x6D4DU, 0x6D4EU, 0x6D4FU, 0x6D50U, - 0x6D51U, 0x6D52U, 0x6D53U, 0x6D54U, 0x6D55U, 0x6D56U, 0x6D57U, 0x6D58U, - 0x6D59U, 0x6D5AU, 0x6D61U, 0x6D62U, 0x6D63U, 0x6D64U, 0x6D65U, 0x6D66U, - 0x6D67U, 0x6D68U, 0x6D69U, 0x6D6AU, 0x6D6BU, 0x6D6CU, 0x6D6DU, 0x6D6EU, - 0x6D6FU, 0x6D70U, 0x6D71U, 0x6D72U, 0x6D73U, 0x6D74U, 0x6D75U, 0x6D76U, - 0x6D77U, 0x6D78U, 0x6D79U, 0x6D7AU, 0x6D30U, 0x6D31U, 0x6D32U, 0x6D33U, - 0x6D34U, 0x6D35U, 0x6D36U, 0x6D37U, 0x6D38U, 0x6D39U, 0x6D2BU, 0x6D2FU, - 0x6E41U, 0x6E42U, 0x6E43U, 0x6E44U, 0x6E45U, 0x6E46U, 0x6E47U, 0x6E48U, - 0x6E49U, 0x6E4AU, 0x6E4BU, 0x6E4CU, 0x6E4DU, 0x6E4EU, 0x6E4FU, 0x6E50U, - 0x6E51U, 0x6E52U, 0x6E53U, 0x6E54U, 0x6E55U, 0x6E56U, 0x6E57U, 0x6E58U, - 0x6E59U, 0x6E5AU, 0x6E61U, 0x6E62U, 0x6E63U, 0x6E64U, 0x6E65U, 0x6E66U, - 0x6E67U, 0x6E68U, 0x6E69U, 0x6E6AU, 0x6E6BU, 0x6E6CU, 0x6E6DU, 0x6E6EU, - 0x6E6FU, 0x6E70U, 0x6E71U, 0x6E72U, 0x6E73U, 0x6E74U, 0x6E75U, 0x6E76U, - 0x6E77U, 0x6E78U, 0x6E79U, 0x6E7AU, 0x6E30U, 0x6E31U, 0x6E32U, 0x6E33U, - 0x6E34U, 0x6E35U, 0x6E36U, 0x6E37U, 0x6E38U, 0x6E39U, 0x6E2BU, 0x6E2FU, - 0x6F41U, 0x6F42U, 0x6F43U, 0x6F44U, 0x6F45U, 0x6F46U, 0x6F47U, 0x6F48U, - 0x6F49U, 0x6F4AU, 0x6F4BU, 0x6F4CU, 0x6F4DU, 0x6F4EU, 0x6F4FU, 0x6F50U, - 0x6F51U, 0x6F52U, 0x6F53U, 0x6F54U, 0x6F55U, 0x6F56U, 0x6F57U, 0x6F58U, - 0x6F59U, 0x6F5AU, 0x6F61U, 0x6F62U, 0x6F63U, 0x6F64U, 0x6F65U, 0x6F66U, - 0x6F67U, 0x6F68U, 0x6F69U, 0x6F6AU, 0x6F6BU, 0x6F6CU, 0x6F6DU, 0x6F6EU, - 0x6F6FU, 0x6F70U, 0x6F71U, 0x6F72U, 0x6F73U, 0x6F74U, 0x6F75U, 0x6F76U, - 0x6F77U, 0x6F78U, 0x6F79U, 0x6F7AU, 0x6F30U, 0x6F31U, 0x6F32U, 0x6F33U, - 0x6F34U, 0x6F35U, 0x6F36U, 0x6F37U, 0x6F38U, 0x6F39U, 0x6F2BU, 0x6F2FU, - 0x7041U, 0x7042U, 0x7043U, 0x7044U, 0x7045U, 0x7046U, 0x7047U, 0x7048U, - 0x7049U, 0x704AU, 0x704BU, 0x704CU, 0x704DU, 0x704EU, 0x704FU, 0x7050U, - 0x7051U, 0x7052U, 0x7053U, 0x7054U, 0x7055U, 0x7056U, 0x7057U, 0x7058U, - 0x7059U, 0x705AU, 0x7061U, 0x7062U, 0x7063U, 0x7064U, 0x7065U, 0x7066U, - 0x7067U, 0x7068U, 0x7069U, 0x706AU, 0x706BU, 0x706CU, 0x706DU, 0x706EU, - 0x706FU, 0x7070U, 0x7071U, 0x7072U, 0x7073U, 0x7074U, 0x7075U, 0x7076U, - 0x7077U, 0x7078U, 0x7079U, 0x707AU, 0x7030U, 0x7031U, 0x7032U, 0x7033U, - 0x7034U, 0x7035U, 0x7036U, 0x7037U, 0x7038U, 0x7039U, 0x702BU, 0x702FU, - 0x7141U, 0x7142U, 0x7143U, 0x7144U, 0x7145U, 0x7146U, 0x7147U, 0x7148U, - 0x7149U, 0x714AU, 0x714BU, 0x714CU, 0x714DU, 0x714EU, 0x714FU, 0x7150U, - 0x7151U, 0x7152U, 0x7153U, 0x7154U, 0x7155U, 0x7156U, 0x7157U, 0x7158U, - 0x7159U, 0x715AU, 0x7161U, 0x7162U, 0x7163U, 0x7164U, 0x7165U, 0x7166U, - 0x7167U, 0x7168U, 0x7169U, 0x716AU, 0x716BU, 0x716CU, 0x716DU, 0x716EU, - 0x716FU, 0x7170U, 0x7171U, 0x7172U, 0x7173U, 0x7174U, 0x7175U, 0x7176U, - 0x7177U, 0x7178U, 0x7179U, 0x717AU, 0x7130U, 0x7131U, 0x7132U, 0x7133U, - 0x7134U, 0x7135U, 0x7136U, 0x7137U, 0x7138U, 0x7139U, 0x712BU, 0x712FU, - 0x7241U, 0x7242U, 0x7243U, 0x7244U, 0x7245U, 0x7246U, 0x7247U, 0x7248U, - 0x7249U, 0x724AU, 0x724BU, 0x724CU, 0x724DU, 0x724EU, 0x724FU, 0x7250U, - 0x7251U, 0x7252U, 0x7253U, 0x7254U, 0x7255U, 0x7256U, 0x7257U, 0x7258U, - 0x7259U, 0x725AU, 0x7261U, 0x7262U, 0x7263U, 0x7264U, 0x7265U, 0x7266U, - 0x7267U, 0x7268U, 0x7269U, 0x726AU, 0x726BU, 0x726CU, 0x726DU, 0x726EU, - 0x726FU, 0x7270U, 0x7271U, 0x7272U, 0x7273U, 0x7274U, 0x7275U, 0x7276U, - 0x7277U, 0x7278U, 0x7279U, 0x727AU, 0x7230U, 0x7231U, 0x7232U, 0x7233U, - 0x7234U, 0x7235U, 0x7236U, 0x7237U, 0x7238U, 0x7239U, 0x722BU, 0x722FU, - 0x7341U, 0x7342U, 0x7343U, 0x7344U, 0x7345U, 0x7346U, 0x7347U, 0x7348U, - 0x7349U, 0x734AU, 0x734BU, 0x734CU, 0x734DU, 0x734EU, 0x734FU, 0x7350U, - 0x7351U, 0x7352U, 0x7353U, 0x7354U, 0x7355U, 0x7356U, 0x7357U, 0x7358U, - 0x7359U, 0x735AU, 0x7361U, 0x7362U, 0x7363U, 0x7364U, 0x7365U, 0x7366U, - 0x7367U, 0x7368U, 0x7369U, 0x736AU, 0x736BU, 0x736CU, 0x736DU, 0x736EU, - 0x736FU, 0x7370U, 0x7371U, 0x7372U, 0x7373U, 0x7374U, 0x7375U, 0x7376U, - 0x7377U, 0x7378U, 0x7379U, 0x737AU, 0x7330U, 0x7331U, 0x7332U, 0x7333U, - 0x7334U, 0x7335U, 0x7336U, 0x7337U, 0x7338U, 0x7339U, 0x732BU, 0x732FU, - 0x7441U, 0x7442U, 0x7443U, 0x7444U, 0x7445U, 0x7446U, 0x7447U, 0x7448U, - 0x7449U, 0x744AU, 0x744BU, 0x744CU, 0x744DU, 0x744EU, 0x744FU, 0x7450U, - 0x7451U, 0x7452U, 0x7453U, 0x7454U, 0x7455U, 0x7456U, 0x7457U, 0x7458U, - 0x7459U, 0x745AU, 0x7461U, 0x7462U, 0x7463U, 0x7464U, 0x7465U, 0x7466U, - 0x7467U, 0x7468U, 0x7469U, 0x746AU, 0x746BU, 0x746CU, 0x746DU, 0x746EU, - 0x746FU, 0x7470U, 0x7471U, 0x7472U, 0x7473U, 0x7474U, 0x7475U, 0x7476U, - 0x7477U, 0x7478U, 0x7479U, 0x747AU, 0x7430U, 0x7431U, 0x7432U, 0x7433U, - 0x7434U, 0x7435U, 0x7436U, 0x7437U, 0x7438U, 0x7439U, 0x742BU, 0x742FU, - 0x7541U, 0x7542U, 0x7543U, 0x7544U, 0x7545U, 0x7546U, 0x7547U, 0x7548U, - 0x7549U, 0x754AU, 0x754BU, 0x754CU, 0x754DU, 0x754EU, 0x754FU, 0x7550U, - 0x7551U, 0x7552U, 0x7553U, 0x7554U, 0x7555U, 0x7556U, 0x7557U, 0x7558U, - 0x7559U, 0x755AU, 0x7561U, 0x7562U, 0x7563U, 0x7564U, 0x7565U, 0x7566U, - 0x7567U, 0x7568U, 0x7569U, 0x756AU, 0x756BU, 0x756CU, 0x756DU, 0x756EU, - 0x756FU, 0x7570U, 0x7571U, 0x7572U, 0x7573U, 0x7574U, 0x7575U, 0x7576U, - 0x7577U, 0x7578U, 0x7579U, 0x757AU, 0x7530U, 0x7531U, 0x7532U, 0x7533U, - 0x7534U, 0x7535U, 0x7536U, 0x7537U, 0x7538U, 0x7539U, 0x752BU, 0x752FU, - 0x7641U, 0x7642U, 0x7643U, 0x7644U, 0x7645U, 0x7646U, 0x7647U, 0x7648U, - 0x7649U, 0x764AU, 0x764BU, 0x764CU, 0x764DU, 0x764EU, 0x764FU, 0x7650U, - 0x7651U, 0x7652U, 0x7653U, 0x7654U, 0x7655U, 0x7656U, 0x7657U, 0x7658U, - 0x7659U, 0x765AU, 0x7661U, 0x7662U, 0x7663U, 0x7664U, 0x7665U, 0x7666U, - 0x7667U, 0x7668U, 0x7669U, 0x766AU, 0x766BU, 0x766CU, 0x766DU, 0x766EU, - 0x766FU, 0x7670U, 0x7671U, 0x7672U, 0x7673U, 0x7674U, 0x7675U, 0x7676U, - 0x7677U, 0x7678U, 0x7679U, 0x767AU, 0x7630U, 0x7631U, 0x7632U, 0x7633U, - 0x7634U, 0x7635U, 0x7636U, 0x7637U, 0x7638U, 0x7639U, 0x762BU, 0x762FU, - 0x7741U, 0x7742U, 0x7743U, 0x7744U, 0x7745U, 0x7746U, 0x7747U, 0x7748U, - 0x7749U, 0x774AU, 0x774BU, 0x774CU, 0x774DU, 0x774EU, 0x774FU, 0x7750U, - 0x7751U, 0x7752U, 0x7753U, 0x7754U, 0x7755U, 0x7756U, 0x7757U, 0x7758U, - 0x7759U, 0x775AU, 0x7761U, 0x7762U, 0x7763U, 0x7764U, 0x7765U, 0x7766U, - 0x7767U, 0x7768U, 0x7769U, 0x776AU, 0x776BU, 0x776CU, 0x776DU, 0x776EU, - 0x776FU, 0x7770U, 0x7771U, 0x7772U, 0x7773U, 0x7774U, 0x7775U, 0x7776U, - 0x7777U, 0x7778U, 0x7779U, 0x777AU, 0x7730U, 0x7731U, 0x7732U, 0x7733U, - 0x7734U, 0x7735U, 0x7736U, 0x7737U, 0x7738U, 0x7739U, 0x772BU, 0x772FU, - 0x7841U, 0x7842U, 0x7843U, 0x7844U, 0x7845U, 0x7846U, 0x7847U, 0x7848U, - 0x7849U, 0x784AU, 0x784BU, 0x784CU, 0x784DU, 0x784EU, 0x784FU, 0x7850U, - 0x7851U, 0x7852U, 0x7853U, 0x7854U, 0x7855U, 0x7856U, 0x7857U, 0x7858U, - 0x7859U, 0x785AU, 0x7861U, 0x7862U, 0x7863U, 0x7864U, 0x7865U, 0x7866U, - 0x7867U, 0x7868U, 0x7869U, 0x786AU, 0x786BU, 0x786CU, 0x786DU, 0x786EU, - 0x786FU, 0x7870U, 0x7871U, 0x7872U, 0x7873U, 0x7874U, 0x7875U, 0x7876U, - 0x7877U, 0x7878U, 0x7879U, 0x787AU, 0x7830U, 0x7831U, 0x7832U, 0x7833U, - 0x7834U, 0x7835U, 0x7836U, 0x7837U, 0x7838U, 0x7839U, 0x782BU, 0x782FU, - 0x7941U, 0x7942U, 0x7943U, 0x7944U, 0x7945U, 0x7946U, 0x7947U, 0x7948U, - 0x7949U, 0x794AU, 0x794BU, 0x794CU, 0x794DU, 0x794EU, 0x794FU, 0x7950U, - 0x7951U, 0x7952U, 0x7953U, 0x7954U, 0x7955U, 0x7956U, 0x7957U, 0x7958U, - 0x7959U, 0x795AU, 0x7961U, 0x7962U, 0x7963U, 0x7964U, 0x7965U, 0x7966U, - 0x7967U, 0x7968U, 0x7969U, 0x796AU, 0x796BU, 0x796CU, 0x796DU, 0x796EU, - 0x796FU, 0x7970U, 0x7971U, 0x7972U, 0x7973U, 0x7974U, 0x7975U, 0x7976U, - 0x7977U, 0x7978U, 0x7979U, 0x797AU, 0x7930U, 0x7931U, 0x7932U, 0x7933U, - 0x7934U, 0x7935U, 0x7936U, 0x7937U, 0x7938U, 0x7939U, 0x792BU, 0x792FU, - 0x7A41U, 0x7A42U, 0x7A43U, 0x7A44U, 0x7A45U, 0x7A46U, 0x7A47U, 0x7A48U, - 0x7A49U, 0x7A4AU, 0x7A4BU, 0x7A4CU, 0x7A4DU, 0x7A4EU, 0x7A4FU, 0x7A50U, - 0x7A51U, 0x7A52U, 0x7A53U, 0x7A54U, 0x7A55U, 0x7A56U, 0x7A57U, 0x7A58U, - 0x7A59U, 0x7A5AU, 0x7A61U, 0x7A62U, 0x7A63U, 0x7A64U, 0x7A65U, 0x7A66U, - 0x7A67U, 0x7A68U, 0x7A69U, 0x7A6AU, 0x7A6BU, 0x7A6CU, 0x7A6DU, 0x7A6EU, - 0x7A6FU, 0x7A70U, 0x7A71U, 0x7A72U, 0x7A73U, 0x7A74U, 0x7A75U, 0x7A76U, - 0x7A77U, 0x7A78U, 0x7A79U, 0x7A7AU, 0x7A30U, 0x7A31U, 0x7A32U, 0x7A33U, - 0x7A34U, 0x7A35U, 0x7A36U, 0x7A37U, 0x7A38U, 0x7A39U, 0x7A2BU, 0x7A2FU, - 0x3041U, 0x3042U, 0x3043U, 0x3044U, 0x3045U, 0x3046U, 0x3047U, 0x3048U, - 0x3049U, 0x304AU, 0x304BU, 0x304CU, 0x304DU, 0x304EU, 0x304FU, 0x3050U, - 0x3051U, 0x3052U, 0x3053U, 0x3054U, 0x3055U, 0x3056U, 0x3057U, 0x3058U, - 0x3059U, 0x305AU, 0x3061U, 0x3062U, 0x3063U, 0x3064U, 0x3065U, 0x3066U, - 0x3067U, 0x3068U, 0x3069U, 0x306AU, 0x306BU, 0x306CU, 0x306DU, 0x306EU, - 0x306FU, 0x3070U, 0x3071U, 0x3072U, 0x3073U, 0x3074U, 0x3075U, 0x3076U, - 0x3077U, 0x3078U, 0x3079U, 0x307AU, 0x3030U, 0x3031U, 0x3032U, 0x3033U, - 0x3034U, 0x3035U, 0x3036U, 0x3037U, 0x3038U, 0x3039U, 0x302BU, 0x302FU, - 0x3141U, 0x3142U, 0x3143U, 0x3144U, 0x3145U, 0x3146U, 0x3147U, 0x3148U, - 0x3149U, 0x314AU, 0x314BU, 0x314CU, 0x314DU, 0x314EU, 0x314FU, 0x3150U, - 0x3151U, 0x3152U, 0x3153U, 0x3154U, 0x3155U, 0x3156U, 0x3157U, 0x3158U, - 0x3159U, 0x315AU, 0x3161U, 0x3162U, 0x3163U, 0x3164U, 0x3165U, 0x3166U, - 0x3167U, 0x3168U, 0x3169U, 0x316AU, 0x316BU, 0x316CU, 0x316DU, 0x316EU, - 0x316FU, 0x3170U, 0x3171U, 0x3172U, 0x3173U, 0x3174U, 0x3175U, 0x3176U, - 0x3177U, 0x3178U, 0x3179U, 0x317AU, 0x3130U, 0x3131U, 0x3132U, 0x3133U, - 0x3134U, 0x3135U, 0x3136U, 0x3137U, 0x3138U, 0x3139U, 0x312BU, 0x312FU, - 0x3241U, 0x3242U, 0x3243U, 0x3244U, 0x3245U, 0x3246U, 0x3247U, 0x3248U, - 0x3249U, 0x324AU, 0x324BU, 0x324CU, 0x324DU, 0x324EU, 0x324FU, 0x3250U, - 0x3251U, 0x3252U, 0x3253U, 0x3254U, 0x3255U, 0x3256U, 0x3257U, 0x3258U, - 0x3259U, 0x325AU, 0x3261U, 0x3262U, 0x3263U, 0x3264U, 0x3265U, 0x3266U, - 0x3267U, 0x3268U, 0x3269U, 0x326AU, 0x326BU, 0x326CU, 0x326DU, 0x326EU, - 0x326FU, 0x3270U, 0x3271U, 0x3272U, 0x3273U, 0x3274U, 0x3275U, 0x3276U, - 0x3277U, 0x3278U, 0x3279U, 0x327AU, 0x3230U, 0x3231U, 0x3232U, 0x3233U, - 0x3234U, 0x3235U, 0x3236U, 0x3237U, 0x3238U, 0x3239U, 0x322BU, 0x322FU, - 0x3341U, 0x3342U, 0x3343U, 0x3344U, 0x3345U, 0x3346U, 0x3347U, 0x3348U, - 0x3349U, 0x334AU, 0x334BU, 0x334CU, 0x334DU, 0x334EU, 0x334FU, 0x3350U, - 0x3351U, 0x3352U, 0x3353U, 0x3354U, 0x3355U, 0x3356U, 0x3357U, 0x3358U, - 0x3359U, 0x335AU, 0x3361U, 0x3362U, 0x3363U, 0x3364U, 0x3365U, 0x3366U, - 0x3367U, 0x3368U, 0x3369U, 0x336AU, 0x336BU, 0x336CU, 0x336DU, 0x336EU, - 0x336FU, 0x3370U, 0x3371U, 0x3372U, 0x3373U, 0x3374U, 0x3375U, 0x3376U, - 0x3377U, 0x3378U, 0x3379U, 0x337AU, 0x3330U, 0x3331U, 0x3332U, 0x3333U, - 0x3334U, 0x3335U, 0x3336U, 0x3337U, 0x3338U, 0x3339U, 0x332BU, 0x332FU, - 0x3441U, 0x3442U, 0x3443U, 0x3444U, 0x3445U, 0x3446U, 0x3447U, 0x3448U, - 0x3449U, 0x344AU, 0x344BU, 0x344CU, 0x344DU, 0x344EU, 0x344FU, 0x3450U, - 0x3451U, 0x3452U, 0x3453U, 0x3454U, 0x3455U, 0x3456U, 0x3457U, 0x3458U, - 0x3459U, 0x345AU, 0x3461U, 0x3462U, 0x3463U, 0x3464U, 0x3465U, 0x3466U, - 0x3467U, 0x3468U, 0x3469U, 0x346AU, 0x346BU, 0x346CU, 0x346DU, 0x346EU, - 0x346FU, 0x3470U, 0x3471U, 0x3472U, 0x3473U, 0x3474U, 0x3475U, 0x3476U, - 0x3477U, 0x3478U, 0x3479U, 0x347AU, 0x3430U, 0x3431U, 0x3432U, 0x3433U, - 0x3434U, 0x3435U, 0x3436U, 0x3437U, 0x3438U, 0x3439U, 0x342BU, 0x342FU, - 0x3541U, 0x3542U, 0x3543U, 0x3544U, 0x3545U, 0x3546U, 0x3547U, 0x3548U, - 0x3549U, 0x354AU, 0x354BU, 0x354CU, 0x354DU, 0x354EU, 0x354FU, 0x3550U, - 0x3551U, 0x3552U, 0x3553U, 0x3554U, 0x3555U, 0x3556U, 0x3557U, 0x3558U, - 0x3559U, 0x355AU, 0x3561U, 0x3562U, 0x3563U, 0x3564U, 0x3565U, 0x3566U, - 0x3567U, 0x3568U, 0x3569U, 0x356AU, 0x356BU, 0x356CU, 0x356DU, 0x356EU, - 0x356FU, 0x3570U, 0x3571U, 0x3572U, 0x3573U, 0x3574U, 0x3575U, 0x3576U, - 0x3577U, 0x3578U, 0x3579U, 0x357AU, 0x3530U, 0x3531U, 0x3532U, 0x3533U, - 0x3534U, 0x3535U, 0x3536U, 0x3537U, 0x3538U, 0x3539U, 0x352BU, 0x352FU, - 0x3641U, 0x3642U, 0x3643U, 0x3644U, 0x3645U, 0x3646U, 0x3647U, 0x3648U, - 0x3649U, 0x364AU, 0x364BU, 0x364CU, 0x364DU, 0x364EU, 0x364FU, 0x3650U, - 0x3651U, 0x3652U, 0x3653U, 0x3654U, 0x3655U, 0x3656U, 0x3657U, 0x3658U, - 0x3659U, 0x365AU, 0x3661U, 0x3662U, 0x3663U, 0x3664U, 0x3665U, 0x3666U, - 0x3667U, 0x3668U, 0x3669U, 0x366AU, 0x366BU, 0x366CU, 0x366DU, 0x366EU, - 0x366FU, 0x3670U, 0x3671U, 0x3672U, 0x3673U, 0x3674U, 0x3675U, 0x3676U, - 0x3677U, 0x3678U, 0x3679U, 0x367AU, 0x3630U, 0x3631U, 0x3632U, 0x3633U, - 0x3634U, 0x3635U, 0x3636U, 0x3637U, 0x3638U, 0x3639U, 0x362BU, 0x362FU, - 0x3741U, 0x3742U, 0x3743U, 0x3744U, 0x3745U, 0x3746U, 0x3747U, 0x3748U, - 0x3749U, 0x374AU, 0x374BU, 0x374CU, 0x374DU, 0x374EU, 0x374FU, 0x3750U, - 0x3751U, 0x3752U, 0x3753U, 0x3754U, 0x3755U, 0x3756U, 0x3757U, 0x3758U, - 0x3759U, 0x375AU, 0x3761U, 0x3762U, 0x3763U, 0x3764U, 0x3765U, 0x3766U, - 0x3767U, 0x3768U, 0x3769U, 0x376AU, 0x376BU, 0x376CU, 0x376DU, 0x376EU, - 0x376FU, 0x3770U, 0x3771U, 0x3772U, 0x3773U, 0x3774U, 0x3775U, 0x3776U, - 0x3777U, 0x3778U, 0x3779U, 0x377AU, 0x3730U, 0x3731U, 0x3732U, 0x3733U, - 0x3734U, 0x3735U, 0x3736U, 0x3737U, 0x3738U, 0x3739U, 0x372BU, 0x372FU, - 0x3841U, 0x3842U, 0x3843U, 0x3844U, 0x3845U, 0x3846U, 0x3847U, 0x3848U, - 0x3849U, 0x384AU, 0x384BU, 0x384CU, 0x384DU, 0x384EU, 0x384FU, 0x3850U, - 0x3851U, 0x3852U, 0x3853U, 0x3854U, 0x3855U, 0x3856U, 0x3857U, 0x3858U, - 0x3859U, 0x385AU, 0x3861U, 0x3862U, 0x3863U, 0x3864U, 0x3865U, 0x3866U, - 0x3867U, 0x3868U, 0x3869U, 0x386AU, 0x386BU, 0x386CU, 0x386DU, 0x386EU, - 0x386FU, 0x3870U, 0x3871U, 0x3872U, 0x3873U, 0x3874U, 0x3875U, 0x3876U, - 0x3877U, 0x3878U, 0x3879U, 0x387AU, 0x3830U, 0x3831U, 0x3832U, 0x3833U, - 0x3834U, 0x3835U, 0x3836U, 0x3837U, 0x3838U, 0x3839U, 0x382BU, 0x382FU, - 0x3941U, 0x3942U, 0x3943U, 0x3944U, 0x3945U, 0x3946U, 0x3947U, 0x3948U, - 0x3949U, 0x394AU, 0x394BU, 0x394CU, 0x394DU, 0x394EU, 0x394FU, 0x3950U, - 0x3951U, 0x3952U, 0x3953U, 0x3954U, 0x3955U, 0x3956U, 0x3957U, 0x3958U, - 0x3959U, 0x395AU, 0x3961U, 0x3962U, 0x3963U, 0x3964U, 0x3965U, 0x3966U, - 0x3967U, 0x3968U, 0x3969U, 0x396AU, 0x396BU, 0x396CU, 0x396DU, 0x396EU, - 0x396FU, 0x3970U, 0x3971U, 0x3972U, 0x3973U, 0x3974U, 0x3975U, 0x3976U, - 0x3977U, 0x3978U, 0x3979U, 0x397AU, 0x3930U, 0x3931U, 0x3932U, 0x3933U, - 0x3934U, 0x3935U, 0x3936U, 0x3937U, 0x3938U, 0x3939U, 0x392BU, 0x392FU, - 0x2B41U, 0x2B42U, 0x2B43U, 0x2B44U, 0x2B45U, 0x2B46U, 0x2B47U, 0x2B48U, - 0x2B49U, 0x2B4AU, 0x2B4BU, 0x2B4CU, 0x2B4DU, 0x2B4EU, 0x2B4FU, 0x2B50U, - 0x2B51U, 0x2B52U, 0x2B53U, 0x2B54U, 0x2B55U, 0x2B56U, 0x2B57U, 0x2B58U, - 0x2B59U, 0x2B5AU, 0x2B61U, 0x2B62U, 0x2B63U, 0x2B64U, 0x2B65U, 0x2B66U, - 0x2B67U, 0x2B68U, 0x2B69U, 0x2B6AU, 0x2B6BU, 0x2B6CU, 0x2B6DU, 0x2B6EU, - 0x2B6FU, 0x2B70U, 0x2B71U, 0x2B72U, 0x2B73U, 0x2B74U, 0x2B75U, 0x2B76U, - 0x2B77U, 0x2B78U, 0x2B79U, 0x2B7AU, 0x2B30U, 0x2B31U, 0x2B32U, 0x2B33U, - 0x2B34U, 0x2B35U, 0x2B36U, 0x2B37U, 0x2B38U, 0x2B39U, 0x2B2BU, 0x2B2FU, - 0x2F41U, 0x2F42U, 0x2F43U, 0x2F44U, 0x2F45U, 0x2F46U, 0x2F47U, 0x2F48U, - 0x2F49U, 0x2F4AU, 0x2F4BU, 0x2F4CU, 0x2F4DU, 0x2F4EU, 0x2F4FU, 0x2F50U, - 0x2F51U, 0x2F52U, 0x2F53U, 0x2F54U, 0x2F55U, 0x2F56U, 0x2F57U, 0x2F58U, - 0x2F59U, 0x2F5AU, 0x2F61U, 0x2F62U, 0x2F63U, 0x2F64U, 0x2F65U, 0x2F66U, - 0x2F67U, 0x2F68U, 0x2F69U, 0x2F6AU, 0x2F6BU, 0x2F6CU, 0x2F6DU, 0x2F6EU, - 0x2F6FU, 0x2F70U, 0x2F71U, 0x2F72U, 0x2F73U, 0x2F74U, 0x2F75U, 0x2F76U, - 0x2F77U, 0x2F78U, 0x2F79U, 0x2F7AU, 0x2F30U, 0x2F31U, 0x2F32U, 0x2F33U, - 0x2F34U, 0x2F35U, 0x2F36U, 0x2F37U, 0x2F38U, 0x2F39U, 0x2F2BU, 0x2F2FU, -#endif -}; diff --git a/deps/base64/base64/lib/tables/table_enc_12bit.py b/deps/base64/base64/lib/tables/table_enc_12bit.py deleted file mode 100755 index 613ab81af1de97..00000000000000 --- a/deps/base64/base64/lib/tables/table_enc_12bit.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/python3 - -def tr(x): - """Translate a 6-bit value to the Base64 alphabet.""" - s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' \ - + 'abcdefghijklmnopqrstuvwxyz' \ - + '0123456789' \ - + '+/' - return ord(s[x]) - -def table(fn): - """Generate a 12-bit lookup table.""" - ret = [] - for n in range(0, 2**12): - pre = "\n\t" if n % 8 == 0 else " " - pre = "\t" if n == 0 else pre - ret.append("{}0x{:04X}U,".format(pre, fn(n))) - return "".join(ret) - -def table_be(): - """Generate a 12-bit big-endian lookup table.""" - return table(lambda n: (tr(n & 0x3F) << 0) | (tr(n >> 6) << 8)) - -def table_le(): - """Generate a 12-bit little-endian lookup table.""" - return table(lambda n: (tr(n >> 6) << 0) | (tr(n & 0x3F) << 8)) - -def main(): - """Entry point.""" - lines = [ - "#include <stdint.h>", - "", - "const uint16_t base64_table_enc_12bit[] = {", - "#if BASE64_LITTLE_ENDIAN", - table_le(), - "#else", - table_be(), - "#endif", - "};" - ] - for line in lines: - print(line) - -if __name__ == "__main__": - main() diff --git a/deps/base64/base64/lib/tables/table_generator.c b/deps/base64/base64/lib/tables/table_generator.c deleted file mode 100644 index 64f239302bf5db..00000000000000 --- a/deps/base64/base64/lib/tables/table_generator.c +++ /dev/null @@ -1,184 +0,0 @@ -/** - * - * Copyright 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com - * Copyright 2017 Matthieu Darbois - * All rights reserved. - * - * http://modp.com/release/base64 - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/****************************/ - -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <inttypes.h> - -static uint8_t b64chars[64] = { - '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', '+', '/' -}; - -static uint8_t padchar = '='; - -static void printStart(void) -{ - printf("#include <stdint.h>\n"); - printf("#define CHAR62 '%c'\n", b64chars[62]); - printf("#define CHAR63 '%c'\n", b64chars[63]); - printf("#define CHARPAD '%c'\n", padchar); -} - -static void clearDecodeTable(uint32_t* ary) -{ - int i = 0; - for (i = 0; i < 256; ++i) { - ary[i] = 0xFFFFFFFF; - } -} - -/* dump uint32_t as hex digits */ -void uint32_array_to_c_hex(const uint32_t* ary, size_t sz, const char* name) -{ - size_t i = 0; - - printf("const uint32_t %s[%d] = {\n", name, (int)sz); - for (;;) { - printf("0x%08" PRIx32, ary[i]); - ++i; - if (i == sz) - break; - if (i % 6 == 0) { - printf(",\n"); - } else { - printf(", "); - } - } - printf("\n};\n"); -} - -int main(int argc, char** argv) -{ - uint32_t x; - uint32_t i = 0; - uint32_t ary[256]; - - /* over-ride standard alphabet */ - if (argc == 2) { - uint8_t* replacements = (uint8_t*)argv[1]; - if (strlen((char*)replacements) != 3) { - fprintf(stderr, "input must be a string of 3 characters '-', '.' or '_'\n"); - exit(1); - } - fprintf(stderr, "fusing '%s' as replacements in base64 encoding\n", replacements); - b64chars[62] = replacements[0]; - b64chars[63] = replacements[1]; - padchar = replacements[2]; - } - - printStart(); - - printf("\n\n#if BASE64_LITTLE_ENDIAN\n"); - - printf("\n\n/* SPECIAL DECODE TABLES FOR LITTLE ENDIAN (INTEL) CPUS */\n\n"); - - clearDecodeTable(ary); - for (i = 0; i < 64; ++i) { - x = b64chars[i]; - ary[x] = i << 2; - } - uint32_array_to_c_hex(ary, sizeof(ary) / sizeof(uint32_t), "base64_table_dec_32bit_d0"); - printf("\n\n"); - - clearDecodeTable(ary); - for (i = 0; i < 64; ++i) { - x = b64chars[i]; - ary[x] = ((i & 0x30) >> 4) | ((i & 0x0F) << 12); - } - uint32_array_to_c_hex(ary, sizeof(ary) / sizeof(uint32_t), "base64_table_dec_32bit_d1"); - printf("\n\n"); - - clearDecodeTable(ary); - for (i = 0; i < 64; ++i) { - x = b64chars[i]; - ary[x] = ((i & 0x03) << 22) | ((i & 0x3c) << 6); - } - uint32_array_to_c_hex(ary, sizeof(ary) / sizeof(uint32_t), "base64_table_dec_32bit_d2"); - printf("\n\n"); - - clearDecodeTable(ary); - for (i = 0; i < 64; ++i) { - x = b64chars[i]; - ary[x] = i << 16; - } - uint32_array_to_c_hex(ary, sizeof(ary) / sizeof(uint32_t), "base64_table_dec_32bit_d3"); - printf("\n\n"); - - printf("#else\n"); - - printf("\n\n/* SPECIAL DECODE TABLES FOR BIG ENDIAN (IBM/MOTOROLA/SUN) CPUS */\n\n"); - - clearDecodeTable(ary); - for (i = 0; i < 64; ++i) { - x = b64chars[i]; - ary[x] = i << 26; - } - uint32_array_to_c_hex(ary, sizeof(ary) / sizeof(uint32_t), "base64_table_dec_32bit_d0"); - printf("\n\n"); - - clearDecodeTable(ary); - for (i = 0; i < 64; ++i) { - x = b64chars[i]; - ary[x] = i << 20; - } - uint32_array_to_c_hex(ary, sizeof(ary) / sizeof(uint32_t), "base64_table_dec_32bit_d1"); - printf("\n\n"); - - clearDecodeTable(ary); - for (i = 0; i < 64; ++i) { - x = b64chars[i]; - ary[x] = i << 14; - } - uint32_array_to_c_hex(ary, sizeof(ary) / sizeof(uint32_t), "base64_table_dec_32bit_d2"); - printf("\n\n"); - - clearDecodeTable(ary); - for (i = 0; i < 64; ++i) { - x = b64chars[i]; - ary[x] = i << 8; - } - uint32_array_to_c_hex(ary, sizeof(ary) / sizeof(uint32_t), "base64_table_dec_32bit_d3"); - printf("\n\n"); - - printf("#endif\n"); - - return 0; -} diff --git a/deps/base64/base64/lib/tables/tables.c b/deps/base64/base64/lib/tables/tables.c deleted file mode 100644 index 45778b6befdd6e..00000000000000 --- a/deps/base64/base64/lib/tables/tables.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "tables.h" - -const uint8_t -base64_table_enc_6bit[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789" - "+/"; - -// In the lookup table below, note that the value for '=' (character 61) is -// 254, not 255. This character is used for in-band signaling of the end of -// the datastream, and we will use that later. The characters A-Z, a-z, 0-9 -// and + / are mapped to their "decoded" values. The other bytes all map to -// the value 255, which flags them as "invalid input". - -const uint8_t -base64_table_dec_8bit[] = -{ - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 0..15 - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 16..31 - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, // 32..47 - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 254, 255, 255, // 48..63 - 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 64..79 - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, // 80..95 - 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 96..111 - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255, // 112..127 - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 128..143 - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, -}; - -#if BASE64_WORDSIZE >= 32 -# include "table_dec_32bit.h" -# include "table_enc_12bit.h" -#endif diff --git a/deps/base64/base64/lib/tables/tables.h b/deps/base64/base64/lib/tables/tables.h deleted file mode 100644 index cb74268a4bf12b..00000000000000 --- a/deps/base64/base64/lib/tables/tables.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef BASE64_TABLES_H -#define BASE64_TABLES_H - -#include <stdint.h> - -#include "../env.h" - -// These tables are used by all codecs for fallback plain encoding/decoding: -extern const uint8_t base64_table_enc_6bit[]; -extern const uint8_t base64_table_dec_8bit[]; - -// These tables are used for the 32-bit and 64-bit generic decoders: -#if BASE64_WORDSIZE >= 32 -extern const uint32_t base64_table_dec_32bit_d0[]; -extern const uint32_t base64_table_dec_32bit_d1[]; -extern const uint32_t base64_table_dec_32bit_d2[]; -extern const uint32_t base64_table_dec_32bit_d3[]; - -// This table is used by the 32 and 64-bit generic encoders: -extern const uint16_t base64_table_enc_12bit[]; -#endif - -#endif // BASE64_TABLES_H diff --git a/deps/base64/base64/test/CMakeLists.txt b/deps/base64/base64/test/CMakeLists.txt deleted file mode 100644 index f07b65a00c2cb4..00000000000000 --- a/deps/base64/base64/test/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -# Written in 2016 by Henrik Steffen Gaßmann henrik@gassmann.onl -# -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any warranty. -# -# You should have received a copy of the CC0 Public Domain Dedication -# along with this software. If not, see -# -# http://creativecommons.org/publicdomain/zero/1.0/ -# -######################################################################## - -function(add_base64_test TEST_NAME) - unset(SRC_FILE) - foreach(SRC_FILE ${ARGN}) - list(APPEND SRC_FILES "${SRC_FILE}") - endforeach() - - add_executable(${TEST_NAME} ${SRC_FILES}) - target_link_libraries(${TEST_NAME} PRIVATE base64) - - add_test(NAME ${TEST_NAME} - COMMAND ${TEST_NAME} - ) - install(TARGETS ${TEST_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) -endfunction() - - -add_base64_test(test_base64 - codec_supported.c - test_base64.c -) - -add_base64_test(benchmark - codec_supported.c - benchmark.c -) - -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - target_link_libraries(benchmark PRIVATE rt) -endif() - diff --git a/deps/base64/base64/test/Makefile b/deps/base64/base64/test/Makefile deleted file mode 100644 index 7ecb893a6363b9..00000000000000 --- a/deps/base64/base64/test/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -CFLAGS += -std=c99 -O3 -Wall -Wextra -pedantic -DBASE64_STATIC_DEFINE -ifdef OPENMP - CFLAGS += -fopenmp -endif - -TARGET := $(shell $(CC) -dumpmachine) -ifneq (, $(findstring darwin, $(TARGET))) - BENCH_LDFLAGS= -else ifneq (, $(findstring mingw, $(TARGET))) - BENCH_LDFLAGS= -else - # default to linux, -lrt needed - BENCH_LDFLAGS=-lrt -endif - -.PHONY: clean test valgrind - -test: clean test_base64 benchmark - ./test_base64 - ./benchmark - -valgrind: clean test_base64 - valgrind --error-exitcode=2 ./test_base64 - -test_base64: test_base64.c codec_supported.o ../lib/libbase64.o - $(CC) $(CFLAGS) -o $@ $^ - -benchmark: benchmark.c codec_supported.o ../lib/libbase64.o - $(CC) $(CFLAGS) -o $@ $^ $(BENCH_LDFLAGS) - -../%: - make -C .. $* - -%.o: %.c - $(CC) $(CFLAGS) -o $@ -c $< - -clean: - rm -f benchmark test_base64 *.o diff --git a/deps/base64/base64/test/benchmark.c b/deps/base64/base64/test/benchmark.c deleted file mode 100644 index e78b696bedb6b3..00000000000000 --- a/deps/base64/base64/test/benchmark.c +++ /dev/null @@ -1,286 +0,0 @@ -// For clock_gettime(2): -#ifndef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 199309L -#endif - -// For CLOCK_REALTIME on FreeBSD: -#ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 600 -#endif - -// Standard cross-platform includes. -#include <stdbool.h> -#include <stdlib.h> -#include <stdio.h> - -// Platform-specific includes. -#if defined(_WIN32) || defined(_WIN64) -# include <windows.h> -# include <wincrypt.h> -#else -# include <sys/types.h> -# include <sys/stat.h> -# include <fcntl.h> -# include <unistd.h> -# include <time.h> -#endif - -#if defined(__MACH__) -# include <mach/mach_time.h> -#endif - -#include "../include/libbase64.h" -#include "codec_supported.h" - -#define KB 1024 -#define MB (1024 * KB) - -#define RANDOMDEV "/dev/urandom" - -struct buffers { - char *reg; - char *enc; - size_t regsz; - size_t encsz; -}; - -// Define buffer sizes to test with: -static struct bufsize { - char *label; - size_t len; - int repeat; - int batch; -} -sizes[] = { - { "10 MB", MB * 10, 10, 1 }, - { "1 MB", MB * 1, 10, 10 }, - { "100 KB", KB * 100, 10, 100 }, - { "10 KB", KB * 10, 100, 100 }, - { "1 KB", KB * 1, 100, 1000 }, -}; - -static inline float -bytes_to_mb (size_t bytes) -{ - return bytes / (float) MB; -} - -static bool -get_random_data (struct buffers *b, char **errmsg) -{ -#if defined(_WIN32) || defined(_WIN64) - HCRYPTPROV hProvider = 0; - - if (!CryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { - *errmsg = "Error: CryptAcquireContext"; - return false; - } - - if (!CryptGenRandom(hProvider, b->regsz, b->reg)) { - CryptReleaseContext(hProvider, 0); - *errmsg = "Error: CryptGenRandom"; - return false; - } - - if (!CryptReleaseContext(hProvider, 0)) { - *errmsg = "Error: CryptReleaseContext"; - return false; - } - - return true; -#else - int fd; - ssize_t nread; - size_t total_read = 0; - - // Open random device for semi-random data: - if ((fd = open(RANDOMDEV, O_RDONLY)) < 0) { - *errmsg = "Cannot open " RANDOMDEV; - return false; - } - - printf("Filling buffer with %.1f MB of random data...\n", bytes_to_mb(b->regsz)); - - while (total_read < b->regsz) { - if ((nread = read(fd, b->reg + total_read, b->regsz - total_read)) < 0) { - *errmsg = "Read error"; - close(fd); - return false; - } - total_read += nread; - } - - close(fd); - return true; -#endif -} - -#if defined(__MACH__) -typedef uint64_t base64_timespec; - -static void -base64_gettime (base64_timespec *t) -{ - *t = mach_absolute_time(); -} - -static float -timediff_sec (base64_timespec *start, base64_timespec *end) -{ - uint64_t diff = *end - *start; - mach_timebase_info_data_t tb = { 0, 0 }; - mach_timebase_info(&tb); - - return (float)((diff * tb.numer) / tb.denom) / 1e9f; -} -#elif defined(_WIN32) || defined(_WIN64) -typedef ULARGE_INTEGER base64_timespec; - -static void -base64_gettime (base64_timespec *t) -{ - FILETIME current_time_ft; - - GetSystemTimePreciseAsFileTime(¤t_time_ft); - - t->LowPart = current_time_ft.dwLowDateTime; - t->HighPart = current_time_ft.dwHighDateTime; -} - -static float -timediff_sec (base64_timespec *start, base64_timespec *end) -{ - // Timer resolution is 100 nanoseconds (10^-7 sec). - return (end->QuadPart - start->QuadPart) / 1e7f; -} -#else -typedef struct timespec base64_timespec; - -static void -base64_gettime (base64_timespec *t) -{ - clock_gettime(CLOCK_REALTIME, t); -} - -static float -timediff_sec (base64_timespec *start, base64_timespec *end) -{ - return (end->tv_sec - start->tv_sec) + (end->tv_nsec - start->tv_nsec) / 1e9f; -} -#endif - -static void -codec_bench_enc (struct buffers *b, const struct bufsize *bs, const char *name, unsigned int flags) -{ - float timediff, fastest = -1.0f; - base64_timespec start, end; - - // Reset buffer size: - b->regsz = bs->len; - - // Repeat benchmark a number of times for a fair test: - for (int i = bs->repeat; i; i--) { - - // Timing loop, use batches to increase timer resolution: - base64_gettime(&start); - for (int j = bs->batch; j; j--) - base64_encode(b->reg, b->regsz, b->enc, &b->encsz, flags); - base64_gettime(&end); - - // Calculate average time of batch: - timediff = timediff_sec(&start, &end) / bs->batch; - - // Update fastest time seen: - if (fastest < 0.0f || timediff < fastest) - fastest = timediff; - } - - printf("%s\tencode\t%.02f MB/sec\n", name, bytes_to_mb(b->regsz) / fastest); -} - -static void -codec_bench_dec (struct buffers *b, const struct bufsize *bs, const char *name, unsigned int flags) -{ - float timediff, fastest = -1.0f; - base64_timespec start, end; - - // Reset buffer size: - b->encsz = bs->len; - - // Repeat benchmark a number of times for a fair test: - for (int i = bs->repeat; i; i--) { - - // Timing loop, use batches to increase timer resolution: - base64_gettime(&start); - for (int j = bs->batch; j; j--) - base64_decode(b->enc, b->encsz, b->reg, &b->regsz, flags); - base64_gettime(&end); - - // Calculate average time of batch: - timediff = timediff_sec(&start, &end) / bs->batch; - - // Update fastest time seen: - if (fastest < 0.0f || timediff < fastest) - fastest = timediff; - } - - printf("%s\tdecode\t%.02f MB/sec\n", name, bytes_to_mb(b->encsz) / fastest); -} - -static void -codec_bench (struct buffers *b, const struct bufsize *bs, const char *name, unsigned int flags) -{ - codec_bench_enc(b, bs, name, flags); - codec_bench_dec(b, bs, name, flags); -} - -int -main () -{ - int ret = 0; - char *errmsg = NULL; - struct buffers b; - - // Set buffer sizes to largest buffer length: - b.regsz = sizes[0].len; - b.encsz = sizes[0].len * 5 / 3; - - // Allocate space for megabytes of random data: - if ((b.reg = malloc(b.regsz)) == NULL) { - errmsg = "Out of memory"; - ret = 1; - goto err0; - } - - // Allocate space for encoded output: - if ((b.enc = malloc(b.encsz)) == NULL) { - errmsg = "Out of memory"; - ret = 1; - goto err1; - } - - // Fill buffer with random data: - if (get_random_data(&b, &errmsg) == false) { - ret = 1; - goto err2; - } - - // Loop over all buffer sizes: - for (size_t i = 0; i < sizeof(sizes) / sizeof(sizes[0]); i++) { - printf("Testing with buffer size %s, fastest of %d * %d\n", - sizes[i].label, sizes[i].repeat, sizes[i].batch); - - // Loop over all codecs: - for (size_t j = 0; codecs[j]; j++) - if (codec_supported(1 << j)) - codec_bench(&b, &sizes[i], codecs[j], 1 << j); - }; - - // Free memory: -err2: free(b.enc); -err1: free(b.reg); -err0: if (errmsg) - fputs(errmsg, stderr); - - return ret; -} diff --git a/deps/base64/base64/test/ci/analysis.sh b/deps/base64/base64/test/ci/analysis.sh deleted file mode 100755 index f7da1857fe05e3..00000000000000 --- a/deps/base64/base64/test/ci/analysis.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -ve - -MACHINE=$(uname -m) -export CC=gcc - -uname -a -clang --version # make analyse -${CC} --version # make -C test valgrind - -for USE_ASSEMBLY in 0 1; do - if [ "${MACHINE}" == "x86_64" ]; then - export SSSE3_CFLAGS="-mssse3 -DBASE64_SSSE3_USE_ASM=${USE_ASSEMBLY}" - export SSE41_CFLAGS="-msse4.1 -DBASE64_SSE41_USE_ASM=${USE_ASSEMBLY}" - export SSE42_CFLAGS="-msse4.2 -DBASE64_SSE42_USE_ASM=${USE_ASSEMBLY}" - export AVX_CFLAGS="-mavx -DBASE64_AVX_USE_ASM=${USE_ASSEMBLY}" - export AVX2_CFLAGS="-mavx2 -DBASE64_AVX2_USE_ASM=${USE_ASSEMBLY}" - # Temporarily disable AVX512; it is not available in CI yet. - # export AVX512_CFLAGS="-mavx512vl -mavx512vbmi" - elif [ "${MACHINE}" == "aarch64" ]; then - export NEON64_CFLAGS="-march=armv8-a" - elif [ "${MACHINE}" == "armv7l" ]; then - export NEON32_CFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=neon" - fi - - if [ ${USE_ASSEMBLY} -eq 0 ]; then - echo "::group::analyze" - make analyze - echo "::endgroup::" - fi - - echo "::group::valgrind (USE_ASSEMBLY=${USE_ASSEMBLY})" - make clean - make - make -C test valgrind - echo "::endgroup::" -done diff --git a/deps/base64/base64/test/ci/test.sh b/deps/base64/base64/test/ci/test.sh deleted file mode 100755 index fb188418cca0a9..00000000000000 --- a/deps/base64/base64/test/ci/test.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -ve - -MACHINE=$(uname -m) -if [ "${MACHINE}" == "x86_64" ]; then - export SSSE3_CFLAGS=-mssse3 - export SSE41_CFLAGS=-msse4.1 - export SSE42_CFLAGS=-msse4.2 - export AVX_CFLAGS=-mavx - # no AVX2 or AVX512 on GHA macOS - if [ "$(uname -s)" != "Darwin" ]; then - export AVX2_CFLAGS=-mavx2 - # Temporarily disable AVX512; it is not available in CI yet. - # export AVX512_CFLAGS="-mavx512vl -mavx512vbmi" - fi -elif [ "${MACHINE}" == "aarch64" ]; then - export NEON64_CFLAGS="-march=armv8-a" -elif [ "${MACHINE}" == "armv7l" ]; then - export NEON32_CFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=neon" -fi - -if [ "${OPENMP:-}" == "0" ]; then - unset OPENMP -fi - -uname -a -${CC} --version - -make -make -C test diff --git a/deps/base64/base64/test/codec_supported.c b/deps/base64/base64/test/codec_supported.c deleted file mode 100644 index f68c766875abcd..00000000000000 --- a/deps/base64/base64/test/codec_supported.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <string.h> - -#include "../include/libbase64.h" - -static char *_codecs[] = -{ "AVX2" -, "NEON32" -, "NEON64" -, "plain" -, "SSSE3" -, "SSE41" -, "SSE42" -, "AVX" -, "AVX512" -, NULL -} ; - -char **codecs = _codecs; - -int -codec_supported (int flags) -{ - // Check if given codec is supported by trying to decode a test string: - char *a = "aGVsbG8="; - char b[10]; - size_t outlen; - - return (base64_decode(a, strlen(a), b, &outlen, flags) != -1); -} diff --git a/deps/base64/base64/test/codec_supported.h b/deps/base64/base64/test/codec_supported.h deleted file mode 100644 index 18baec08154adf..00000000000000 --- a/deps/base64/base64/test/codec_supported.h +++ /dev/null @@ -1,3 +0,0 @@ -extern char **codecs; - -int codec_supported (int flags); diff --git a/deps/base64/base64/test/moby_dick.h b/deps/base64/base64/test/moby_dick.h deleted file mode 100644 index 19705355897016..00000000000000 --- a/deps/base64/base64/test/moby_dick.h +++ /dev/null @@ -1,41 +0,0 @@ -static const char *moby_dick_plain = - "Call me Ishmael. Some years ago--never mind how long precisely--having\n" - "little or no money in my purse, and nothing particular to interest me on\n" - "shore, I thought I would sail about a little and see the watery part of\n" - "the world. It is a way I have of driving off the spleen and regulating\n" - "the circulation. Whenever I find myself growing grim about the mouth;\n" - "whenever it is a damp, drizzly November in my soul; whenever I find\n" - "myself involuntarily pausing before coffin warehouses, and bringing up\n" - "the rear of every funeral I meet; and especially whenever my hypos get\n" - "such an upper hand of me, that it requires a strong moral principle to\n" - "prevent me from deliberately stepping into the street, and methodically\n" - "knocking people's hats off--then, I account it high time to get to sea\n" - "as soon as I can. This is my substitute for pistol and ball. With a\n" - "philosophical flourish Cato throws himself upon his sword; I quietly\n" - "take to the ship. There is nothing surprising in this. If they but knew\n" - "it, almost all men in their degree, some time or other, cherish very\n" - "nearly the same feelings towards the ocean with me.\n"; - -static const char *moby_dick_base64 = - "Q2FsbCBtZSBJc2htYWVsLiBTb21lIHllYXJzIGFnby0tbmV2ZXIgbWluZCBob3cgbG9uZ" - "yBwcmVjaXNlbHktLWhhdmluZwpsaXR0bGUgb3Igbm8gbW9uZXkgaW4gbXkgcHVyc2UsIG" - "FuZCBub3RoaW5nIHBhcnRpY3VsYXIgdG8gaW50ZXJlc3QgbWUgb24Kc2hvcmUsIEkgdGh" - "vdWdodCBJIHdvdWxkIHNhaWwgYWJvdXQgYSBsaXR0bGUgYW5kIHNlZSB0aGUgd2F0ZXJ5" - "IHBhcnQgb2YKdGhlIHdvcmxkLiBJdCBpcyBhIHdheSBJIGhhdmUgb2YgZHJpdmluZyBvZ" - "mYgdGhlIHNwbGVlbiBhbmQgcmVndWxhdGluZwp0aGUgY2lyY3VsYXRpb24uIFdoZW5ldm" - "VyIEkgZmluZCBteXNlbGYgZ3Jvd2luZyBncmltIGFib3V0IHRoZSBtb3V0aDsKd2hlbmV" - "2ZXIgaXQgaXMgYSBkYW1wLCBkcml6emx5IE5vdmVtYmVyIGluIG15IHNvdWw7IHdoZW5l" - "dmVyIEkgZmluZApteXNlbGYgaW52b2x1bnRhcmlseSBwYXVzaW5nIGJlZm9yZSBjb2Zma" - "W4gd2FyZWhvdXNlcywgYW5kIGJyaW5naW5nIHVwCnRoZSByZWFyIG9mIGV2ZXJ5IGZ1bm" - "VyYWwgSSBtZWV0OyBhbmQgZXNwZWNpYWxseSB3aGVuZXZlciBteSBoeXBvcyBnZXQKc3V" - "jaCBhbiB1cHBlciBoYW5kIG9mIG1lLCB0aGF0IGl0IHJlcXVpcmVzIGEgc3Ryb25nIG1v" - "cmFsIHByaW5jaXBsZSB0bwpwcmV2ZW50IG1lIGZyb20gZGVsaWJlcmF0ZWx5IHN0ZXBwa" - "W5nIGludG8gdGhlIHN0cmVldCwgYW5kIG1ldGhvZGljYWxseQprbm9ja2luZyBwZW9wbG" - "UncyBoYXRzIG9mZi0tdGhlbiwgSSBhY2NvdW50IGl0IGhpZ2ggdGltZSB0byBnZXQgdG8" - "gc2VhCmFzIHNvb24gYXMgSSBjYW4uIFRoaXMgaXMgbXkgc3Vic3RpdHV0ZSBmb3IgcGlz" - "dG9sIGFuZCBiYWxsLiBXaXRoIGEKcGhpbG9zb3BoaWNhbCBmbG91cmlzaCBDYXRvIHRoc" - "m93cyBoaW1zZWxmIHVwb24gaGlzIHN3b3JkOyBJIHF1aWV0bHkKdGFrZSB0byB0aGUgc2" - "hpcC4gVGhlcmUgaXMgbm90aGluZyBzdXJwcmlzaW5nIGluIHRoaXMuIElmIHRoZXkgYnV" - "0IGtuZXcKaXQsIGFsbW9zdCBhbGwgbWVuIGluIHRoZWlyIGRlZ3JlZSwgc29tZSB0aW1l" - "IG9yIG90aGVyLCBjaGVyaXNoIHZlcnkKbmVhcmx5IHRoZSBzYW1lIGZlZWxpbmdzIHRvd" - "2FyZHMgdGhlIG9jZWFuIHdpdGggbWUuCg=="; diff --git a/deps/base64/base64/test/moby_dick_base64.txt b/deps/base64/base64/test/moby_dick_base64.txt deleted file mode 100644 index 3083dcfbcb3e87..00000000000000 --- a/deps/base64/base64/test/moby_dick_base64.txt +++ /dev/null @@ -1 +0,0 @@ -Q2FsbCBtZSBJc2htYWVsLiBTb21lIHllYXJzIGFnby0tbmV2ZXIgbWluZCBob3cgbG9uZyBwcmVjaXNlbHktLWhhdmluZwpsaXR0bGUgb3Igbm8gbW9uZXkgaW4gbXkgcHVyc2UsIGFuZCBub3RoaW5nIHBhcnRpY3VsYXIgdG8gaW50ZXJlc3QgbWUgb24Kc2hvcmUsIEkgdGhvdWdodCBJIHdvdWxkIHNhaWwgYWJvdXQgYSBsaXR0bGUgYW5kIHNlZSB0aGUgd2F0ZXJ5IHBhcnQgb2YKdGhlIHdvcmxkLiBJdCBpcyBhIHdheSBJIGhhdmUgb2YgZHJpdmluZyBvZmYgdGhlIHNwbGVlbiBhbmQgcmVndWxhdGluZwp0aGUgY2lyY3VsYXRpb24uIFdoZW5ldmVyIEkgZmluZCBteXNlbGYgZ3Jvd2luZyBncmltIGFib3V0IHRoZSBtb3V0aDsKd2hlbmV2ZXIgaXQgaXMgYSBkYW1wLCBkcml6emx5IE5vdmVtYmVyIGluIG15IHNvdWw7IHdoZW5ldmVyIEkgZmluZApteXNlbGYgaW52b2x1bnRhcmlseSBwYXVzaW5nIGJlZm9yZSBjb2ZmaW4gd2FyZWhvdXNlcywgYW5kIGJyaW5naW5nIHVwCnRoZSByZWFyIG9mIGV2ZXJ5IGZ1bmVyYWwgSSBtZWV0OyBhbmQgZXNwZWNpYWxseSB3aGVuZXZlciBteSBoeXBvcyBnZXQKc3VjaCBhbiB1cHBlciBoYW5kIG9mIG1lLCB0aGF0IGl0IHJlcXVpcmVzIGEgc3Ryb25nIG1vcmFsIHByaW5jaXBsZSB0bwpwcmV2ZW50IG1lIGZyb20gZGVsaWJlcmF0ZWx5IHN0ZXBwaW5nIGludG8gdGhlIHN0cmVldCwgYW5kIG1ldGhvZGljYWxseQprbm9ja2luZyBwZW9wbGUncyBoYXRzIG9mZi0tdGhlbiwgSSBhY2NvdW50IGl0IGhpZ2ggdGltZSB0byBnZXQgdG8gc2VhCmFzIHNvb24gYXMgSSBjYW4uIFRoaXMgaXMgbXkgc3Vic3RpdHV0ZSBmb3IgcGlzdG9sIGFuZCBiYWxsLiBXaXRoIGEKcGhpbG9zb3BoaWNhbCBmbG91cmlzaCBDYXRvIHRocm93cyBoaW1zZWxmIHVwb24gaGlzIHN3b3JkOyBJIHF1aWV0bHkKdGFrZSB0byB0aGUgc2hpcC4gVGhlcmUgaXMgbm90aGluZyBzdXJwcmlzaW5nIGluIHRoaXMuIElmIHRoZXkgYnV0IGtuZXcKaXQsIGFsbW9zdCBhbGwgbWVuIGluIHRoZWlyIGRlZ3JlZSwgc29tZSB0aW1lIG9yIG90aGVyLCBjaGVyaXNoIHZlcnkKbmVhcmx5IHRoZSBzYW1lIGZlZWxpbmdzIHRvd2FyZHMgdGhlIG9jZWFuIHdpdGggbWUuCg== \ No newline at end of file diff --git a/deps/base64/base64/test/moby_dick_plain.txt b/deps/base64/base64/test/moby_dick_plain.txt deleted file mode 100644 index 425d1ed02c8dbb..00000000000000 --- a/deps/base64/base64/test/moby_dick_plain.txt +++ /dev/null @@ -1,16 +0,0 @@ -Call me Ishmael. Some years ago--never mind how long precisely--having -little or no money in my purse, and nothing particular to interest me on -shore, I thought I would sail about a little and see the watery part of -the world. It is a way I have of driving off the spleen and regulating -the circulation. Whenever I find myself growing grim about the mouth; -whenever it is a damp, drizzly November in my soul; whenever I find -myself involuntarily pausing before coffin warehouses, and bringing up -the rear of every funeral I meet; and especially whenever my hypos get -such an upper hand of me, that it requires a strong moral principle to -prevent me from deliberately stepping into the street, and methodically -knocking people's hats off--then, I account it high time to get to sea -as soon as I can. This is my substitute for pistol and ball. With a -philosophical flourish Cato throws himself upon his sword; I quietly -take to the ship. There is nothing surprising in this. If they but knew -it, almost all men in their degree, some time or other, cherish very -nearly the same feelings towards the ocean with me. diff --git a/deps/base64/base64/test/test_base64.c b/deps/base64/base64/test/test_base64.c deleted file mode 100644 index 94aad2d489b9f7..00000000000000 --- a/deps/base64/base64/test/test_base64.c +++ /dev/null @@ -1,388 +0,0 @@ -#include <stdbool.h> -#include <string.h> -#include <stdio.h> -#include <stdlib.h> -#include "../include/libbase64.h" -#include "codec_supported.h" -#include "moby_dick.h" - -static char out[2000]; -static size_t outlen; - -static bool -assert_enc (int flags, const char *src, const char *dst) -{ - size_t srclen = strlen(src); - size_t dstlen = strlen(dst); - - base64_encode(src, srclen, out, &outlen, flags); - - if (outlen != dstlen) { - printf("FAIL: encoding of '%s': length expected %lu, got %lu\n", src, - (unsigned long)dstlen, - (unsigned long)outlen - ); - return true; - } - if (strncmp(dst, out, outlen) != 0) { - out[outlen] = '\0'; - printf("FAIL: encoding of '%s': expected output '%s', got '%s'\n", src, dst, out); - return true; - } - return false; -} - -static bool -assert_dec (int flags, const char *src, const char *dst) -{ - size_t srclen = strlen(src); - size_t dstlen = strlen(dst); - - if (!base64_decode(src, srclen, out, &outlen, flags)) { - printf("FAIL: decoding of '%s': decoding error\n", src); - return true; - } - if (outlen != dstlen) { - printf("FAIL: encoding of '%s': " - "length expected %lu, got %lu\n", src, - (unsigned long)dstlen, - (unsigned long)outlen - ); - return true; - } - if (strncmp(dst, out, outlen) != 0) { - out[outlen] = '\0'; - printf("FAIL: decoding of '%s': expected output '%s', got '%s'\n", src, dst, out); - return true; - } - return false; -} - -static int -assert_roundtrip (int flags, const char *src) -{ - char tmp[1500]; - size_t tmplen; - size_t srclen = strlen(src); - - // Encode the input into global buffer: - base64_encode(src, srclen, out, &outlen, flags); - - // Decode the global buffer into local temp buffer: - if (!base64_decode(out, outlen, tmp, &tmplen, flags)) { - printf("FAIL: decoding of '%s': decoding error\n", out); - return true; - } - - // Check that 'src' is identical to 'tmp': - if (srclen != tmplen) { - printf("FAIL: roundtrip of '%s': " - "length expected %lu, got %lu\n", src, - (unsigned long)srclen, - (unsigned long)tmplen - ); - return true; - } - if (strncmp(src, tmp, tmplen) != 0) { - tmp[tmplen] = '\0'; - printf("FAIL: roundtrip of '%s': got '%s'\n", src, tmp); - return true; - } - - return false; -} - -static int -test_char_table (int flags, bool use_malloc) -{ - bool fail = false; - char chr[256]; - char enc[400], dec[400]; - size_t enclen, declen; - - // Fill array with all characters 0..255: - for (int i = 0; i < 256; i++) - chr[i] = (unsigned char)i; - - // Loop, using each char as a starting position to increase test coverage: - for (int i = 0; i < 256; i++) { - - size_t chrlen = 256 - i; - char* src = &chr[i]; - if (use_malloc) { - src = malloc(chrlen); /* malloc/copy this so valgrind can find out-of-bound access */ - if (src == NULL) { - printf( - "FAIL: encoding @ %d: allocation of %lu bytes failed\n", - i, (unsigned long)chrlen - ); - fail = true; - continue; - } - memcpy(src, &chr[i], chrlen); - } - - base64_encode(src, chrlen, enc, &enclen, flags); - if (use_malloc) { - free(src); - } - - if (!base64_decode(enc, enclen, dec, &declen, flags)) { - printf("FAIL: decoding @ %d: decoding error\n", i); - fail = true; - continue; - } - if (declen != chrlen) { - printf("FAIL: roundtrip @ %d: " - "length expected %lu, got %lu\n", i, - (unsigned long)chrlen, - (unsigned long)declen - ); - fail = true; - continue; - } - if (strncmp(&chr[i], dec, declen) != 0) { - printf("FAIL: roundtrip @ %d: decoded output not same as input\n", i); - fail = true; - } - } - - return fail; -} - -static int -test_streaming (int flags) -{ - bool fail = false; - char chr[256]; - char ref[400], enc[400]; - size_t reflen; - struct base64_state state; - - // Fill array with all characters 0..255: - for (int i = 0; i < 256; i++) - chr[i] = (unsigned char)i; - - // Create reference base64 encoding: - base64_encode(chr, 256, ref, &reflen, BASE64_FORCE_PLAIN); - - // Encode the table with various block sizes and compare to reference: - for (size_t bs = 1; bs < 255; bs++) - { - size_t inpos = 0; - size_t partlen = 0; - size_t enclen = 0; - - base64_stream_encode_init(&state, flags); - memset(enc, 0, 400); - for (;;) { - base64_stream_encode(&state, &chr[inpos], (inpos + bs > 256) ? 256 - inpos : bs, &enc[enclen], &partlen); - enclen += partlen; - if (inpos + bs > 256) { - break; - } - inpos += bs; - } - base64_stream_encode_final(&state, &enc[enclen], &partlen); - enclen += partlen; - - if (enclen != reflen) { - printf("FAIL: stream encoding gave incorrect size: " - "%lu instead of %lu\n", - (unsigned long)enclen, - (unsigned long)reflen - ); - fail = true; - } - if (strncmp(ref, enc, reflen) != 0) { - printf("FAIL: stream encoding with blocksize %lu failed\n", - (unsigned long)bs - ); - fail = true; - } - } - - // Decode the reference encoding with various block sizes and - // compare to input char table: - for (size_t bs = 1; bs < 255; bs++) - { - size_t inpos = 0; - size_t partlen = 0; - size_t enclen = 0; - - base64_stream_decode_init(&state, flags); - memset(enc, 0, 400); - while (base64_stream_decode(&state, &ref[inpos], (inpos + bs > reflen) ? reflen - inpos : bs, &enc[enclen], &partlen)) { - enclen += partlen; - inpos += bs; - - // Has the entire buffer been consumed? - if (inpos >= 400) { - break; - } - } - if (enclen != 256) { - printf("FAIL: stream decoding gave incorrect size: " - "%lu instead of 255\n", - (unsigned long)enclen - ); - fail = true; - } - if (strncmp(chr, enc, 256) != 0) { - printf("FAIL: stream decoding with blocksize %lu failed\n", - (unsigned long)bs - ); - fail = true; - } - } - - return fail; -} - -static int -test_invalid_dec_input (int flags) -{ - // Subset of invalid characters to cover all ranges - static const char invalid_set[] = { '\0', -1, '!', '-', ';', '_', '|' }; - static const char* invalid_strings[] = { - "Zm9vYg=", - "Zm9vYg", - "Zm9vY", - "Zm9vYmF=Zm9v" - }; - - bool fail = false; - char chr[256]; - char enc[400], dec[400]; - size_t enclen, declen; - - // Fill array with all characters 0..255: - for (int i = 0; i < 256; i++) - chr[i] = (unsigned char)i; - - // Create reference base64 encoding: - base64_encode(chr, 256, enc, &enclen, BASE64_FORCE_PLAIN); - - // Test invalid strings returns error. - for (size_t i = 0U; i < sizeof(invalid_strings) / sizeof(invalid_strings[0]); ++i) { - if (base64_decode(invalid_strings[i], strlen(invalid_strings[i]), dec, &declen, flags)) { - printf("FAIL: decoding invalid input \"%s\": no decoding error\n", invalid_strings[i]); - fail = true; - } - } - - // Loop, corrupting each char to increase test coverage: - for (size_t c = 0U; c < sizeof(invalid_set); ++c) { - for (size_t i = 0U; i < enclen; i++) { - char backup = enc[i]; - - enc[i] = invalid_set[c]; - - if (base64_decode(enc, enclen, dec, &declen, flags)) { - printf("FAIL: decoding invalid input @ %d: no decoding error\n", (int)i); - fail = true; - enc[i] = backup; - continue; - } - enc[i] = backup; - } - } - - // Loop, corrupting two chars to increase test coverage: - for (size_t c = 0U; c < sizeof(invalid_set); ++c) { - for (size_t i = 0U; i < enclen - 2U; i++) { - char backup = enc[i+0]; - char backup2 = enc[i+2]; - - enc[i+0] = invalid_set[c]; - enc[i+2] = invalid_set[c]; - - if (base64_decode(enc, enclen, dec, &declen, flags)) { - printf("FAIL: decoding invalid input @ %d: no decoding error\n", (int)i); - fail = true; - enc[i+0] = backup; - enc[i+2] = backup2; - continue; - } - enc[i+0] = backup; - enc[i+2] = backup2; - } - } - - return fail; -} - -static int -test_one_codec (const char *codec, int flags) -{ - bool fail = false; - - printf("Codec %s:\n", codec); - - // Skip if this codec is not supported: - if (!codec_supported(flags)) { - puts(" skipping"); - return false; - } - - // Test vectors: - struct { - const char *in; - const char *out; - } vec[] = { - - // These are the test vectors from RFC4648: - { "", "" }, - { "f", "Zg==" }, - { "fo", "Zm8=" }, - { "foo", "Zm9v" }, - { "foob", "Zm9vYg==" }, - { "fooba", "Zm9vYmE=" }, - { "foobar", "Zm9vYmFy" }, - - // The first paragraph from Moby Dick, - // to test the SIMD codecs with larger blocksize: - { moby_dick_plain, moby_dick_base64 }, - }; - - for (size_t i = 0; i < sizeof(vec) / sizeof(vec[0]); i++) { - - // Encode plain string, check against output: - fail |= assert_enc(flags, vec[i].in, vec[i].out); - - // Decode the output string, check if we get the input: - fail |= assert_dec(flags, vec[i].out, vec[i].in); - - // Do a roundtrip on the inputs and the outputs: - fail |= assert_roundtrip(flags, vec[i].in); - fail |= assert_roundtrip(flags, vec[i].out); - } - - fail |= test_char_table(flags, false); /* test with unaligned input buffer */ - fail |= test_char_table(flags, true); /* test for out-of-bound input read */ - fail |= test_streaming(flags); - fail |= test_invalid_dec_input(flags); - - if (!fail) - puts(" all tests passed."); - - return fail; -} - -int -main () -{ - bool fail = false; - - // Loop over all codecs: - for (size_t i = 0; codecs[i]; i++) { - - // Flags to invoke this codec: - int codec_flags = (1 << i); - - // Test this codec, merge the results: - fail |= test_one_codec(codecs[i], codec_flags); - } - - return (fail) ? 1 : 0; -} diff --git a/deps/base64/unofficial.gni b/deps/base64/unofficial.gni deleted file mode 100644 index 0e69d7383762f6..00000000000000 --- a/deps/base64/unofficial.gni +++ /dev/null @@ -1,153 +0,0 @@ -# This file is used by GN for building, which is NOT the build system used for -# building official binaries. -# Please edit the gyp files if you are making changes to build system. - -# The actual configurations are put inside a template in unofficial.gni to -# prevent accidental edits from contributors. -template("base64_gn_build") { - config("base64_external_config") { - include_dirs = [ "base64/include" ] - if (!is_component_build) { - defines = [ "BASE64_STATIC_DEFINE" ] - } - } - - config("base64_internal_config") { - include_dirs = [ "base64/lib" ] - if (is_component_build) { - defines = [ "BASE64_EXPORTS" ] - } else { - defines = [] - } - if (current_cpu == "x86" || current_cpu == "x64") { - defines += [ - "HAVE_SSSE3=1", - "HAVE_SSE41=1", - "HAVE_SSE42=1", - "HAVE_AVX=1", - "HAVE_AVX2=1", - "HAVE_AVX512=1", - ] - } - if (current_cpu == "arm") { - defines += [ "HAVE_NEON32=1" ] - } - if (current_cpu == "arm64") { - defines += [ "HAVE_NEON64=1" ] - } - if (is_clang || !is_win) { - cflags_c = [ - "-Wno-implicit-fallthrough", - "-Wno-shadow", - "-Wno-unused-but-set-variable", - ] - } - } - - gypi_values = exec_script("../../tools/gypi_to_gn.py", - [ rebase_path("base64.gyp") ], - "scope", - [ "base64.gyp" ]) - - component(target_name) { - forward_variables_from(invoker, "*") - configs += [ ":base64_internal_config" ] - public_configs = [ ":base64_external_config" ] - sources = gypi_values.base64_sources_common - deps = [ - ":base64_ssse3", - ":base64_sse41", - ":base64_sse42", - ":base64_avx", - ":base64_avx2", - ":base64_avx512", - ":base64_neon32", - ":base64_neon64", - ] - } - - source_set("base64_ssse3") { - configs += [ ":base64_internal_config" ] - sources = [ "base64/lib/arch/ssse3/codec.c" ] - if (current_cpu == "x86" || current_cpu == "x64") { - if (is_clang || !is_win) { - cflags_c = [ "-mssse3" ] - } - } - } - - source_set("base64_sse41") { - configs += [ ":base64_internal_config" ] - sources = [ "base64/lib/arch/sse41/codec.c" ] - if (current_cpu == "x86" || current_cpu == "x64") { - if (is_clang || !is_win) { - cflags_c = [ "-msse4.1" ] - } - } - } - - source_set("base64_sse42") { - configs += [ ":base64_internal_config" ] - sources = [ "base64/lib/arch/sse42/codec.c" ] - if (current_cpu == "x86" || current_cpu == "x64") { - if (is_clang || !is_win) { - cflags_c = [ "-msse4.2" ] - } - } - } - - source_set("base64_avx") { - configs += [ ":base64_internal_config" ] - sources = [ "base64/lib/arch/avx/codec.c" ] - if (current_cpu == "x86" || current_cpu == "x64") { - if (is_clang || !is_win) { - cflags_c = [ "-mavx" ] - } else if (is_win) { - cflags_c = [ "/arch:AVX" ] - } - } - } - - source_set("base64_avx2") { - configs += [ ":base64_internal_config" ] - sources = [ "base64/lib/arch/avx2/codec.c" ] - if (current_cpu == "x86" || current_cpu == "x64") { - if (is_clang || !is_win) { - cflags_c = [ "-mavx2" ] - } else if (is_win) { - cflags_c = [ "/arch:AVX2" ] - } - } - } - - source_set("base64_avx512") { - configs += [ ":base64_internal_config" ] - sources = [ "base64/lib/arch/avx512/codec.c" ] - if (current_cpu == "x86" || current_cpu == "x64") { - if (is_clang || !is_win) { - cflags_c = [ - "-mavx512vl", - "-mavx512vbmi", - ] - } else if (is_win) { - cflags_c = [ "/arch:AVX512" ] - } - } - } - - source_set("base64_neon32") { - configs += [ ":base64_internal_config" ] - sources = [ "base64/lib/arch/neon32/codec.c" ] - if (current_cpu == "arm") { - if (is_clang || !is_win) { - cflags_c = [ "-mfpu=neon" ] - } - } - } - - source_set("base64_neon64") { - configs += [ ":base64_internal_config" ] - sources = [ "base64/lib/arch/neon64/codec.c" ] - # NEON is required in arm64, so no -mfpu flag is needed - } -} diff --git a/deps/corepack/CHANGELOG.md b/deps/corepack/CHANGELOG.md index 941d0b6b7e5e25..88363683a9d5f6 100644 --- a/deps/corepack/CHANGELOG.md +++ b/deps/corepack/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [0.31.0](https://github.com/nodejs/corepack/compare/v0.30.0...v0.31.0) (2025-01-27) + + +### ⚠ BREAKING CHANGES + +* drop support for Node.js 21.x ([#594](https://github.com/nodejs/corepack/issues/594)) + +### Features + +* update package manager versions ([#595](https://github.com/nodejs/corepack/issues/595)) ([c7a9bde](https://github.com/nodejs/corepack/commit/c7a9bde16dcbbb7e6ef03fef740656cde7ade360)) + + +### Bug Fixes + +* only print message for `UsageError`s ([#602](https://github.com/nodejs/corepack/issues/602)) ([72a588c](https://github.com/nodejs/corepack/commit/72a588c2370c17e415b24fe389efdafb3c84e90b)) +* update npm registry keys ([#614](https://github.com/nodejs/corepack/issues/614)) ([8c90caa](https://github.com/nodejs/corepack/commit/8c90caab7f1c5c9b89f1de113bc1dfc441bf25d2)) + + +### Miscellaneous Chores + +* drop support for Node.js 21.x ([#594](https://github.com/nodejs/corepack/issues/594)) ([8bebc0c](https://github.com/nodejs/corepack/commit/8bebc0c0a5cbcdeec41673dcbaf581e6e1c1be11)) + ## [0.30.0](https://github.com/nodejs/corepack/compare/v0.29.4...v0.30.0) (2024-11-23) diff --git a/deps/corepack/README.md b/deps/corepack/README.md index d94614affc5353..66bfbc3fb6aae3 100644 --- a/deps/corepack/README.md +++ b/deps/corepack/README.md @@ -302,6 +302,8 @@ same major line. Should you need to upgrade to a new major, use an explicit ## Troubleshooting +The environment variable `DEBUG` can be set to `corepack` to enable additional debug logging. + ### Networking There are a wide variety of networking issues that can occur while running diff --git a/deps/corepack/dist/lib/corepack.cjs b/deps/corepack/dist/lib/corepack.cjs index e1919339dc38bd..7a92f3334f7687 100644 --- a/deps/corepack/dist/lib/corepack.cjs +++ b/deps/corepack/dist/lib/corepack.cjs @@ -21260,7 +21260,7 @@ function String2(descriptor, ...args) { } // package.json -var version = "0.30.0"; +var version = "0.31.0"; // sources/Engine.ts var import_fs9 = __toESM(require("fs")); @@ -21274,7 +21274,7 @@ var import_valid3 = __toESM(require_valid2()); var config_default = { definitions: { npm: { - default: "10.9.1+sha1.ab141c1229765c11c8c59060fc9cf450a2207bd6", + default: "11.0.0+sha1.7bba7c80740ef1f5b2c5d4cecc55e94912faa5e6", fetchLatestFrom: { type: "npm", package: "npm" @@ -21311,7 +21311,7 @@ var config_default = { } }, pnpm: { - default: "9.14.2+sha1.5202b50ab92394b3c922d2e293f196e2df6d441b", + default: "9.15.4+sha1.ffa0b5c573381e8035b354028ccff97c8e452047", fetchLatestFrom: { type: "npm", package: "pnpm" @@ -21375,7 +21375,7 @@ var config_default = { package: "yarn" }, transparent: { - default: "4.5.2+sha224.c2e2e9ed3cdadd6ec250589b3393f71ae56d5ec297af11cec1eba3b4", + default: "4.6.0+sha224.acd0786f07ffc6c933940eb65fc1d627131ddf5455bddcc295dc90fd", commands: [ [ "yarn", @@ -21438,11 +21438,18 @@ var config_default = { keys: { npm: [ { - expires: null, + expires: "2025-01-29T00:00:00.000Z", keyid: "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA", keytype: "ecdsa-sha2-nistp256", scheme: "ecdsa-sha2-nistp256", key: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg==" + }, + { + expires: null, + keyid: "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U", + keytype: "ecdsa-sha2-nistp256", + scheme: "ecdsa-sha2-nistp256", + key: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEY6Ya7W++7aUPzvMTrezH6Ycx3c+HOKYCcNGybJZSCJq/fd7Qa8uuAKtdIkUQtQiEKERhAmE5lMMJhP8OkDOa2g==" } ] } @@ -23099,10 +23106,18 @@ async function runMain(argv) { process.exitCode ??= code2; } } else { - await engine.executePackageManagerRequest(request, { - cwd: process.cwd(), - args: restArgs - }); + try { + await engine.executePackageManagerRequest(request, { + cwd: process.cwd(), + args: restArgs + }); + } catch (error) { + if (error?.name === `UsageError`) { + console.error(error.message); + process.exit(1); + } + throw error; + } } } // Annotate the CommonJS export names for ESM import in node: diff --git a/deps/corepack/package.json b/deps/corepack/package.json index c9c6662e99e6c9..91b95f31d77b54 100644 --- a/deps/corepack/package.json +++ b/deps/corepack/package.json @@ -1,6 +1,6 @@ { "name": "corepack", - "version": "0.30.0", + "version": "0.31.0", "homepage": "https://github.com/nodejs/corepack#readme", "bugs": { "url": "https://github.com/nodejs/corepack/issues" @@ -10,7 +10,7 @@ "url": "https://github.com/nodejs/corepack.git" }, "engines": { - "node": "^18.17.1 || >=20.10.0" + "node": "^18.17.1 || ^20.10.0 || >=22.11.0" }, "exports": { "./package.json": "./package.json" @@ -26,7 +26,7 @@ "@yarnpkg/eslint-config": "^2.0.0", "@yarnpkg/fslib": "^3.0.0-rc.48", "@zkochan/cmd-shim": "^6.0.0", - "better-sqlite3": "^10.0.0", + "better-sqlite3": "^11.7.2", "clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch", "debug": "^4.1.1", "esbuild": "^0.21.0", diff --git a/deps/googletest/include/gtest/gtest-matchers.h b/deps/googletest/include/gtest/gtest-matchers.h index eae210e99ddae4..78160f0e418da6 100644 --- a/deps/googletest/include/gtest/gtest-matchers.h +++ b/deps/googletest/include/gtest/gtest-matchers.h @@ -67,10 +67,10 @@ namespace testing { // To implement a matcher Foo for type T, define: // 1. a class FooMatcherMatcher that implements the matcher interface: // using is_gtest_matcher = void; -// bool MatchAndExplain(const T&, std::ostream*); +// bool MatchAndExplain(const T&, std::ostream*) const; // (MatchResultListener* can also be used instead of std::ostream*) -// void DescribeTo(std::ostream*); -// void DescribeNegationTo(std::ostream*); +// void DescribeTo(std::ostream*) const; +// void DescribeNegationTo(std::ostream*) const; // // 2. a factory function that creates a Matcher<T> object from a // FooMatcherMatcher. diff --git a/deps/googletest/include/gtest/gtest-printers.h b/deps/googletest/include/gtest/gtest-printers.h index b2822bcde23cc7..198a7693493a33 100644 --- a/deps/googletest/include/gtest/gtest-printers.h +++ b/deps/googletest/include/gtest/gtest-printers.h @@ -126,6 +126,10 @@ #include <span> // NOLINT #endif // GTEST_INTERNAL_HAS_STD_SPAN +#if GTEST_INTERNAL_HAS_COMPARE_LIB +#include <compare> // NOLINT +#endif // GTEST_INTERNAL_HAS_COMPARE_LIB + namespace testing { // Definitions in the internal* namespaces are subject to change without notice. @@ -782,6 +786,41 @@ void PrintTo(const std::shared_ptr<T>& ptr, std::ostream* os) { (PrintSmartPointer<T>)(ptr, os, 0); } +#if GTEST_INTERNAL_HAS_COMPARE_LIB +template <typename T> +void PrintOrderingHelper(T ordering, std::ostream* os) { + if (ordering == T::less) { + *os << "(less)"; + } else if (ordering == T::greater) { + *os << "(greater)"; + } else if (ordering == T::equivalent) { + *os << "(equivalent)"; + } else { + *os << "(unknown ordering)"; + } +} + +inline void PrintTo(std::strong_ordering ordering, std::ostream* os) { + if (ordering == std::strong_ordering::equal) { + *os << "(equal)"; + } else { + PrintOrderingHelper(ordering, os); + } +} + +inline void PrintTo(std::partial_ordering ordering, std::ostream* os) { + if (ordering == std::partial_ordering::unordered) { + *os << "(unordered)"; + } else { + PrintOrderingHelper(ordering, os); + } +} + +inline void PrintTo(std::weak_ordering ordering, std::ostream* os) { + PrintOrderingHelper(ordering, os); +} +#endif + // Helper function for printing a tuple. T must be instantiated with // a tuple type. template <typename T> diff --git a/deps/googletest/include/gtest/internal/gtest-port.h b/deps/googletest/include/gtest/internal/gtest-port.h index 8d27c2c4f72f94..ca18513e77f7a0 100644 --- a/deps/googletest/include/gtest/internal/gtest-port.h +++ b/deps/googletest/include/gtest/internal/gtest-port.h @@ -2533,4 +2533,12 @@ using Variant = ::std::variant<T...>; #define GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL 1 #endif +#if (defined(__cpp_lib_three_way_comparison) || \ + (GTEST_INTERNAL_HAS_INCLUDE(<compare>) && \ + GTEST_INTERNAL_CPLUSPLUS_LANG >= 201907L)) +#define GTEST_INTERNAL_HAS_COMPARE_LIB 1 +#else +#define GTEST_INTERNAL_HAS_COMPARE_LIB 0 +#endif + #endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ diff --git a/deps/googletest/src/gtest.cc b/deps/googletest/src/gtest.cc index c08ab4197c5500..3c1cac6ebe69fd 100644 --- a/deps/googletest/src/gtest.cc +++ b/deps/googletest/src/gtest.cc @@ -3989,6 +3989,12 @@ class XmlUnitTestResultPrinter : public EmptyTestEventListener { static void OutputXmlTestSuiteForTestResult(::std::ostream* stream, const TestResult& result); + // Streams a test case XML stanza containing the given test result. + // + // Requires: result.Failed() + static void OutputXmlTestCaseForTestResult(::std::ostream* stream, + const TestResult& result); + // Streams an XML representation of a TestResult object. static void OutputXmlTestResult(::std::ostream* stream, const TestResult& result); @@ -4236,6 +4242,15 @@ void XmlUnitTestResultPrinter::OutputXmlTestSuiteForTestResult( FormatEpochTimeInMillisAsIso8601(result.start_timestamp())); *stream << ">"; + OutputXmlTestCaseForTestResult(stream, result); + + // Complete the test suite. + *stream << " </testsuite>\n"; +} + +// Streams a test case XML stanza containing the given test result. +void XmlUnitTestResultPrinter::OutputXmlTestCaseForTestResult( + ::std::ostream* stream, const TestResult& result) { // Output the boilerplate for a minimal test case with a single test. *stream << " <testcase"; OutputXmlAttribute(stream, "testcase", "name", ""); @@ -4250,9 +4265,6 @@ void XmlUnitTestResultPrinter::OutputXmlTestSuiteForTestResult( // Output the actual test result. OutputXmlTestResult(stream, result); - - // Complete the test suite. - *stream << " </testsuite>\n"; } // Prints an XML representation of a TestInfo object. @@ -4379,6 +4391,10 @@ void XmlUnitTestResultPrinter::PrintXmlTestSuite(std::ostream* stream, if (test_suite.GetTestInfo(i)->is_reportable()) OutputXmlTestInfo(stream, test_suite.name(), *test_suite.GetTestInfo(i)); } + if (test_suite.ad_hoc_test_result().Failed()) { + OutputXmlTestCaseForTestResult(stream, test_suite.ad_hoc_test_result()); + } + *stream << " </" << kTestsuite << ">\n"; } @@ -4518,6 +4534,12 @@ class JsonUnitTestResultPrinter : public EmptyTestEventListener { static void OutputJsonTestSuiteForTestResult(::std::ostream* stream, const TestResult& result); + // Streams a test case JSON stanza containing the given test result. + // + // Requires: result.Failed() + static void OutputJsonTestCaseForTestResult(::std::ostream* stream, + const TestResult& result); + // Streams a JSON representation of a TestResult object. static void OutputJsonTestResult(::std::ostream* stream, const TestResult& result); @@ -4688,6 +4710,15 @@ void JsonUnitTestResultPrinter::OutputJsonTestSuiteForTestResult( } *stream << Indent(6) << "\"testsuite\": [\n"; + OutputJsonTestCaseForTestResult(stream, result); + + // Finish the test suite. + *stream << "\n" << Indent(6) << "]\n" << Indent(4) << "}"; +} + +// Streams a test case JSON stanza containing the given test result. +void JsonUnitTestResultPrinter::OutputJsonTestCaseForTestResult( + ::std::ostream* stream, const TestResult& result) { // Output the boilerplate for a new test case. *stream << Indent(8) << "{\n"; OutputJsonKey(stream, "testcase", "name", "", Indent(10)); @@ -4704,9 +4735,6 @@ void JsonUnitTestResultPrinter::OutputJsonTestSuiteForTestResult( // Output the actual test result. OutputJsonTestResult(stream, result); - - // Finish the test suite. - *stream << "\n" << Indent(6) << "]\n" << Indent(4) << "}"; } // Prints a JSON representation of a TestInfo object. @@ -4851,6 +4879,16 @@ void JsonUnitTestResultPrinter::PrintJsonTestSuite( OutputJsonTestInfo(stream, test_suite.name(), *test_suite.GetTestInfo(i)); } } + + // If there was a failure in the test suite setup or teardown include that in + // the output. + if (test_suite.ad_hoc_test_result().Failed()) { + if (comma) { + *stream << ",\n"; + } + OutputJsonTestCaseForTestResult(stream, test_suite.ad_hoc_test_result()); + } + *stream << "\n" << kIndent << "]\n" << Indent(4) << "}"; } diff --git a/deps/icu-small/LICENSE b/deps/icu-small/LICENSE index d67e1c8c667be1..180db98fcc66ca 100644 --- a/deps/icu-small/LICENSE +++ b/deps/icu-small/LICENSE @@ -433,6 +433,34 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- +JSON parsing library (nlohmann/json) + +File: vendor/json/upstream/single_include/nlohmann/json.hpp (only for ICU4C) + +MIT License + +Copyright (c) 2013-2022 Niels Lohmann + +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. + +---------------------------------------------------------------------- + File: aclocal.m4 (only for ICU4C) Section: pkg.m4 - Macros to locate and utilise pkg-config. @@ -473,7 +501,7 @@ File: config.guess (only for ICU4C) This file 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 +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 diff --git a/deps/icu-small/README-FULL-ICU.txt b/deps/icu-small/README-FULL-ICU.txt index 0b0ba540be71aa..46a34687d51b3e 100644 --- a/deps/icu-small/README-FULL-ICU.txt +++ b/deps/icu-small/README-FULL-ICU.txt @@ -1,8 +1,8 @@ ICU sources - auto generated by shrink-icu-src.py This directory contains the ICU subset used by --with-intl=full-icu -It is a strict subset of ICU 75 source files with the following exception(s): -* deps/icu-small/source/data/in/icudt75l.dat.bz2 : compressed data file +It is a strict subset of ICU 76 source files with the following exception(s): +* deps/icu-small/source/data/in/icudt76l.dat.bz2 : compressed data file To rebuild this directory, see ../../tools/icu/README.md diff --git a/deps/icu-small/source/common/appendable.cpp b/deps/icu-small/source/common/appendable.cpp index c0fbcc6530ad4a..de18148fe6d6c4 100644 --- a/deps/icu-small/source/common/appendable.cpp +++ b/deps/icu-small/source/common/appendable.cpp @@ -25,7 +25,7 @@ Appendable::~Appendable() {} UBool Appendable::appendCodePoint(UChar32 c) { if(c<=0xffff) { - return appendCodeUnit((char16_t)c); + return appendCodeUnit(static_cast<char16_t>(c)); } else { return appendCodeUnit(U16_LEAD(c)) && appendCodeUnit(U16_TRAIL(c)); } diff --git a/deps/icu-small/source/common/bmpset.cpp b/deps/icu-small/source/common/bmpset.cpp index 641c675c6706b6..9b2a2967f0dda3 100644 --- a/deps/icu-small/source/common/bmpset.cpp +++ b/deps/icu-small/source/common/bmpset.cpp @@ -75,7 +75,7 @@ static void set32x64Bits(uint32_t table[64], int32_t start, int32_t limit) { int32_t trail=start&0x3f; // Named for UTF-8 2-byte trail byte with lower 6 bits. // Set one bit indicating an all-one block. - uint32_t bits=(uint32_t)1<<lead; + uint32_t bits = static_cast<uint32_t>(1) << lead; if((start+1)==limit) { // Single-character shortcut. table[trail]|=bits; return; @@ -100,9 +100,9 @@ static void set32x64Bits(uint32_t table[64], int32_t start, int32_t limit) { ++lead; } if(lead<limitLead) { - bits=~(((unsigned)1<<lead)-1); + bits = ~((static_cast<unsigned>(1) << lead) - 1); if(limitLead<0x20) { - bits&=((unsigned)1<<limitLead)-1; + bits &= (static_cast<unsigned>(1) << limitLead) - 1; } for(trail=0; trail<64; ++trail) { table[trail]|=bits; @@ -111,7 +111,7 @@ static void set32x64Bits(uint32_t table[64], int32_t start, int32_t limit) { // limit<=0x800. If limit==0x800 then limitLead=32 and limitTrail=0. // In that case, bits=1<<limitLead is undefined but the bits value // is not used because trail<limitTrail is already false. - bits=(uint32_t)1<<((limitLead == 0x20) ? (limitLead - 1) : limitLead); + bits = static_cast<uint32_t>(1) << ((limitLead == 0x20) ? (limitLead - 1) : limitLead); for(trail=0; trail<limitTrail; ++trail) { table[trail]|=bits; } @@ -290,22 +290,22 @@ int32_t BMPSet::findCodePoint(UChar32 c, int32_t lo, int32_t hi) const { UBool BMPSet::contains(UChar32 c) const { - if((uint32_t)c<=0xff) { - return (UBool)latin1Contains[c]; - } else if((uint32_t)c<=0x7ff) { - return (UBool)((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0); - } else if((uint32_t)c<0xd800 || (c>=0xe000 && c<=0xffff)) { + if (static_cast<uint32_t>(c) <= 0xff) { + return latin1Contains[c]; + } else if (static_cast<uint32_t>(c) <= 0x7ff) { + return (table7FF[c & 0x3f] & (static_cast<uint32_t>(1) << (c >> 6))) != 0; + } else if (static_cast<uint32_t>(c) < 0xd800 || (c >= 0xe000 && c <= 0xffff)) { int lead=c>>12; uint32_t twoBits=(bmpBlockBits[(c>>6)&0x3f]>>lead)&0x10001; if(twoBits<=1) { // All 64 code points with the same bits 15..6 // are either in the set or not. - return (UBool)twoBits; + return twoBits; } else { // Look up the code point in its 4k block of code points. return containsSlow(c, list4kStarts[lead], list4kStarts[lead+1]); } - } else if((uint32_t)c<=0x10ffff) { + } else if (static_cast<uint32_t>(c) <= 0x10ffff) { // surrogate or supplementary code point return containsSlow(c, list4kStarts[0xd], list4kStarts[0x11]); } else { @@ -332,7 +332,7 @@ BMPSet::span(const char16_t *s, const char16_t *limit, USetSpanCondition spanCon break; } } else if(c<=0x7ff) { - if((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))==0) { + if ((table7FF[c & 0x3f] & (static_cast<uint32_t>(1) << (c >> 6))) == 0) { break; } } else if(c<0xd800 || c>=0xe000) { @@ -372,7 +372,7 @@ BMPSet::span(const char16_t *s, const char16_t *limit, USetSpanCondition spanCon break; } } else if(c<=0x7ff) { - if((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0) { + if ((table7FF[c & 0x3f] & (static_cast<uint32_t>(1) << (c >> 6))) != 0) { break; } } else if(c<0xd800 || c>=0xe000) { @@ -421,7 +421,7 @@ BMPSet::spanBack(const char16_t *s, const char16_t *limit, USetSpanCondition spa break; } } else if(c<=0x7ff) { - if((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))==0) { + if ((table7FF[c & 0x3f] & (static_cast<uint32_t>(1) << (c >> 6))) == 0) { break; } } else if(c<0xd800 || c>=0xe000) { @@ -464,7 +464,7 @@ BMPSet::spanBack(const char16_t *s, const char16_t *limit, USetSpanCondition spa break; } } else if(c<=0x7ff) { - if((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0) { + if ((table7FF[c & 0x3f] & (static_cast<uint32_t>(1) << (c >> 6))) != 0) { break; } } else if(c<0xd800 || c>=0xe000) { @@ -527,7 +527,7 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi b=*s; } while(U8_IS_SINGLE(b)); } - length=(int32_t)(limit-s); + length = static_cast<int32_t>(limit - s); } if(spanCondition!=USET_SPAN_NOT_CONTAINED) { @@ -547,7 +547,7 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi * the truncated sequence. */ b=*(limit-1); - if((int8_t)b<0) { + if (static_cast<int8_t>(b) < 0) { // b>=0x80: lead or trail byte if(b<0xc0) { // single trail byte, check for preceding 3- or 4-byte lead byte @@ -602,15 +602,15 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi if(b>=0xe0) { if(b<0xf0) { if( /* handle U+0000..U+FFFF inline */ - (t1=(uint8_t)(s[0]-0x80)) <= 0x3f && - (t2=(uint8_t)(s[1]-0x80)) <= 0x3f + (t1 = static_cast<uint8_t>(s[0] - 0x80)) <= 0x3f && + (t2 = static_cast<uint8_t>(s[1] - 0x80)) <= 0x3f ) { b&=0xf; uint32_t twoBits=(bmpBlockBits[t1]>>b)&0x10001; if(twoBits<=1) { // All 64 code points with this lead byte and middle trail byte // are either in the set or not. - if(twoBits!=(uint32_t)spanCondition) { + if (twoBits != static_cast<uint32_t>(spanCondition)) { return s-1; } } else { @@ -624,12 +624,12 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi continue; } } else if( /* handle U+10000..U+10FFFF inline */ - (t1=(uint8_t)(s[0]-0x80)) <= 0x3f && - (t2=(uint8_t)(s[1]-0x80)) <= 0x3f && - (t3=(uint8_t)(s[2]-0x80)) <= 0x3f + (t1 = static_cast<uint8_t>(s[0] - 0x80)) <= 0x3f && + (t2 = static_cast<uint8_t>(s[1] - 0x80)) <= 0x3f && + (t3 = static_cast<uint8_t>(s[2] - 0x80)) <= 0x3f ) { // Give an illegal sequence the same value as the result of contains(FFFD). - UChar32 c=((UChar32)(b-0xf0)<<18)|((UChar32)t1<<12)|(t2<<6)|t3; + UChar32 c = (static_cast<UChar32>(b - 0xf0) << 18) | (static_cast<UChar32>(t1) << 12) | (t2 << 6) | t3; if( ( (0x10000<=c && c<=0x10ffff) ? containsSlow(c, list4kStarts[0x10], list4kStarts[0x11]) : containsFFFD @@ -643,9 +643,9 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi } else { if( /* handle U+0000..U+07FF inline */ b>=0xc0 && - (t1=(uint8_t)(*s-0x80)) <= 0x3f + (t1 = static_cast<uint8_t>(*s - 0x80)) <= 0x3f ) { - if((USetSpanCondition)((table7FF[t1]&((uint32_t)1<<(b&0x1f)))!=0) != spanCondition) { + if (static_cast<USetSpanCondition>((table7FF[t1] & (static_cast<uint32_t>(1) << (b & 0x1f))) != 0) != spanCondition) { return s-1; } ++s; @@ -711,7 +711,7 @@ BMPSet::spanBackUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCon c=utf8_prevCharSafeBody(s, 0, &length, b, -3); // c is a valid code point, not ASCII, not a surrogate if(c<=0x7ff) { - if((USetSpanCondition)((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0) != spanCondition) { + if (static_cast<USetSpanCondition>((table7FF[c & 0x3f] & (static_cast<uint32_t>(1) << (c >> 6))) != 0) != spanCondition) { return prev+1; } } else if(c<=0xffff) { @@ -720,7 +720,7 @@ BMPSet::spanBackUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCon if(twoBits<=1) { // All 64 code points with the same bits 15..6 // are either in the set or not. - if(twoBits!=(uint32_t)spanCondition) { + if (twoBits != static_cast<uint32_t>(spanCondition)) { return prev+1; } } else { diff --git a/deps/icu-small/source/common/bmpset.h b/deps/icu-small/source/common/bmpset.h index fad0310038ac81..00253f97c1263f 100644 --- a/deps/icu-small/source/common/bmpset.h +++ b/deps/icu-small/source/common/bmpset.h @@ -156,7 +156,7 @@ class BMPSet : public UMemory { }; inline UBool BMPSet::containsSlow(UChar32 c, int32_t lo, int32_t hi) const { - return (UBool)(findCodePoint(c, lo, hi) & 1); + return findCodePoint(c, lo, hi) & 1; } U_NAMESPACE_END diff --git a/deps/icu-small/source/common/brkeng.cpp b/deps/icu-small/source/common/brkeng.cpp index e53a7b2ce4f584..a903357938c257 100644 --- a/deps/icu-small/source/common/brkeng.cpp +++ b/deps/icu-small/source/common/brkeng.cpp @@ -86,7 +86,7 @@ UnhandledEngine::findBreaks( UText *text, if (U_FAILURE(status)) return 0; utext_setNativeIndex(text, startPos); UChar32 c = utext_current32(text); - while((int32_t)utext_getNativeIndex(text) < endPos && fHandled->contains(c)) { + while (static_cast<int32_t>(utext_getNativeIndex(text)) < endPos && fHandled->contains(c)) { utext_next32(text); // TODO: recast loop to work with post-increment operations. c = utext_current32(text); } @@ -146,7 +146,7 @@ ICULanguageBreakFactory::getEngineFor(UChar32 c, const char* locale) { Mutex m(&gBreakEngineMutex); int32_t i = fEngines->size(); while (--i >= 0) { - lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i)); + lbe = static_cast<const LanguageBreakEngine*>(fEngines->elementAt(i)); if (lbe != nullptr && lbe->handles(c, locale)) { return lbe; } @@ -259,7 +259,7 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) { CharString ext; const char16_t *extStart = u_memrchr(dictfname, 0x002e, dictnlength); // last dot if (extStart != nullptr) { - int32_t len = (int32_t)(extStart - dictfname); + int32_t len = static_cast<int32_t>(extStart - dictfname); ext.appendInvariantChars(UnicodeString(false, extStart + 1, dictnlength - len - 1), status); dictnlength = len; } @@ -269,18 +269,18 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) { UDataMemory *file = udata_open(U_ICUDATA_BRKITR, ext.data(), dictnbuf.data(), &status); if (U_SUCCESS(status)) { // build trie - const uint8_t *data = (const uint8_t *)udata_getMemory(file); - const int32_t *indexes = (const int32_t *)data; + const uint8_t* data = static_cast<const uint8_t*>(udata_getMemory(file)); + const int32_t* indexes = reinterpret_cast<const int32_t*>(data); const int32_t offset = indexes[DictionaryData::IX_STRING_TRIE_OFFSET]; const int32_t trieType = indexes[DictionaryData::IX_TRIE_TYPE] & DictionaryData::TRIE_TYPE_MASK; DictionaryMatcher *m = nullptr; if (trieType == DictionaryData::TRIE_TYPE_BYTES) { const int32_t transform = indexes[DictionaryData::IX_TRANSFORM]; - const char *characters = (const char *)(data + offset); + const char* characters = reinterpret_cast<const char*>(data + offset); m = new BytesDictionaryMatcher(characters, transform, file); } else if (trieType == DictionaryData::TRIE_TYPE_UCHARS) { - const char16_t *characters = (const char16_t *)(data + offset); + const char16_t* characters = reinterpret_cast<const char16_t*>(data + offset); m = new UCharsDictionaryMatcher(characters, file); } if (m == nullptr) { @@ -337,12 +337,12 @@ int32_t BreakEngineWrapper::findBreaks( // extends towards the start or end of the text, depending on 'reverse'. utext_setNativeIndex(text, startPos); - int32_t start = (int32_t)utext_getNativeIndex(text); + int32_t start = static_cast<int32_t>(utext_getNativeIndex(text)); int32_t current; int32_t rangeStart; int32_t rangeEnd; UChar32 c = utext_current32(text); - while((current = (int32_t)utext_getNativeIndex(text)) < endPos && delegate->handles(c)) { + while ((current = static_cast<int32_t>(utext_getNativeIndex(text))) < endPos && delegate->handles(c)) { utext_next32(text); // TODO: recast loop for postincrement c = utext_current32(text); } diff --git a/deps/icu-small/source/common/brkiter.cpp b/deps/icu-small/source/common/brkiter.cpp index 4f2f0f3ace884b..4d945cc17e2bb6 100644 --- a/deps/icu-small/source/common/brkiter.cpp +++ b/deps/icu-small/source/common/brkiter.cpp @@ -85,7 +85,7 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st // Get the actual string brkfname = ures_getString(brkName, &size, &status); U_ASSERT((size_t)size<sizeof(fnbuff)); - if ((size_t)size>=sizeof(fnbuff)) { + if (static_cast<size_t>(size) >= sizeof(fnbuff)) { size=0; if (U_SUCCESS(status)) { status = U_BUFFER_OVERFLOW_ERROR; @@ -99,7 +99,7 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st char16_t* extStart=u_strchr(brkfname, 0x002e); int len = 0; if (extStart != nullptr){ - len = (int)(extStart-brkfname); + len = static_cast<int>(extStart - brkfname); u_UCharsToChars(extStart+1, ext, sizeof(ext)); // nul terminates the buff u_UCharsToChars(brkfname, fnbuff, len); } diff --git a/deps/icu-small/source/common/bytesinkutil.cpp b/deps/icu-small/source/common/bytesinkutil.cpp index a32254a7dbabc0..e99c10f0838b93 100644 --- a/deps/icu-small/source/common/bytesinkutil.cpp +++ b/deps/icu-small/source/common/bytesinkutil.cpp @@ -64,7 +64,7 @@ ByteSinkUtil::appendChange(const uint8_t *s, const uint8_t *limit, errorCode = U_INDEX_OUTOFBOUNDS_ERROR; return false; } - return appendChange((int32_t)(limit - s), s16, s16Length, sink, edits, errorCode); + return appendChange(static_cast<int32_t>(limit - s), s16, s16Length, sink, edits, errorCode); } void @@ -81,15 +81,15 @@ ByteSinkUtil::appendCodePoint(int32_t length, UChar32 c, ByteSink &sink, Edits * namespace { // See unicode/utf8.h U8_APPEND_UNSAFE(). -inline uint8_t getTwoByteLead(UChar32 c) { return (uint8_t)((c >> 6) | 0xc0); } -inline uint8_t getTwoByteTrail(UChar32 c) { return (uint8_t)((c & 0x3f) | 0x80); } +inline uint8_t getTwoByteLead(UChar32 c) { return static_cast<uint8_t>((c >> 6) | 0xc0); } +inline uint8_t getTwoByteTrail(UChar32 c) { return static_cast<uint8_t>((c & 0x3f) | 0x80); } } // namespace void ByteSinkUtil::appendTwoBytes(UChar32 c, ByteSink &sink) { U_ASSERT(0x80 <= c && c <= 0x7ff); // 2-byte UTF-8 - char s8[2] = { (char)getTwoByteLead(c), (char)getTwoByteTrail(c) }; + char s8[2] = {static_cast<char>(getTwoByteLead(c)), static_cast<char>(getTwoByteTrail(c))}; sink.Append(s8, 2); } @@ -114,7 +114,7 @@ ByteSinkUtil::appendUnchanged(const uint8_t *s, const uint8_t *limit, errorCode = U_INDEX_OUTOFBOUNDS_ERROR; return false; } - int32_t length = (int32_t)(limit - s); + int32_t length = static_cast<int32_t>(limit - s); if (length > 0) { appendNonEmptyUnchanged(s, length, sink, options, edits); } diff --git a/deps/icu-small/source/common/bytesinkutil.h b/deps/icu-small/source/common/bytesinkutil.h index b3bd487be1d690..eb3a622ae95743 100644 --- a/deps/icu-small/source/common/bytesinkutil.h +++ b/deps/icu-small/source/common/bytesinkutil.h @@ -73,7 +73,7 @@ class U_COMMON_API ByteSinkUtil { /** The few bytes at [src, nextSrc[ were mapped/changed to valid code point c. */ static inline void appendCodePoint(const uint8_t *src, const uint8_t *nextSrc, UChar32 c, ByteSink &sink, Edits *edits = nullptr) { - appendCodePoint((int32_t)(nextSrc - src), c, sink, edits); + appendCodePoint(static_cast<int32_t>(nextSrc - src), c, sink, edits); } /** Append the two-byte character (U+0080..U+07FF). */ diff --git a/deps/icu-small/source/common/bytestrie.cpp b/deps/icu-small/source/common/bytestrie.cpp index 532ea9e9c0a98f..048bbebb01afed 100644 --- a/deps/icu-small/source/common/bytestrie.cpp +++ b/deps/icu-small/source/common/bytestrie.cpp @@ -327,7 +327,7 @@ BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length, ++pos; // ignore a comparison byte // handle its value int32_t node=*pos++; - UBool isFinal=(UBool)(node&kValueIsFinal); + UBool isFinal = static_cast<UBool>(node & kValueIsFinal); int32_t value=readValue(pos, node>>1); pos=skipValue(pos, node); if(isFinal) { @@ -366,7 +366,7 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u // linear-match node pos+=node-kMinLinearMatch+1; // Ignore the match bytes. } else { - UBool isFinal=(UBool)(node&kValueIsFinal); + UBool isFinal = static_cast<UBool>(node & kValueIsFinal); int32_t value=readValue(pos, node>>1); if(haveUniqueValue) { if(value!=uniqueValue) { @@ -434,7 +434,7 @@ BytesTrie::getNextBranchBytes(const uint8_t *pos, int32_t length, ByteSink &out) void BytesTrie::append(ByteSink &out, int c) { - char ch=(char)c; + char ch = static_cast<char>(c); out.Append(&ch, 1); } diff --git a/deps/icu-small/source/common/bytestriebuilder.cpp b/deps/icu-small/source/common/bytestriebuilder.cpp index 876e0dfa16099d..03bbc28e6577ac 100644 --- a/deps/icu-small/source/common/bytestriebuilder.cpp +++ b/deps/icu-small/source/common/bytestriebuilder.cpp @@ -43,10 +43,10 @@ class BytesTrieElement : public UMemory { int32_t offset=stringOffset; int32_t length; if(offset>=0) { - length=(uint8_t)strings[offset++]; + length = static_cast<uint8_t>(strings[offset++]); } else { offset=~offset; - length=((int32_t)(uint8_t)strings[offset]<<8)|(uint8_t)strings[offset+1]; + length = (static_cast<int32_t>(static_cast<uint8_t>(strings[offset])) << 8) | static_cast<uint8_t>(strings[offset + 1]); offset+=2; } return StringPiece(strings.data()+offset, length); @@ -54,10 +54,10 @@ class BytesTrieElement : public UMemory { int32_t getStringLength(const CharString &strings) const { int32_t offset=stringOffset; if(offset>=0) { - return (uint8_t)strings[offset]; + return static_cast<uint8_t>(strings[offset]); } else { offset=~offset; - return ((int32_t)(uint8_t)strings[offset]<<8)|(uint8_t)strings[offset+1]; + return (static_cast<int32_t>(static_cast<uint8_t>(strings[offset])) << 8) | static_cast<uint8_t>(strings[offset + 1]); } } @@ -102,9 +102,9 @@ BytesTrieElement::setTo(StringPiece s, int32_t val, int32_t offset=strings.length(); if(length>0xff) { offset=~offset; - strings.append((char)(length>>8), errorCode); + strings.append(static_cast<char>(length >> 8), errorCode); } - strings.append((char)length, errorCode); + strings.append(static_cast<char>(length), errorCode); stringOffset=offset; value=val; strings.append(s, errorCode); @@ -229,7 +229,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err errorCode=U_INDEX_OUTOFBOUNDS_ERROR; return; } - uprv_sortArray(elements, elementsLength, (int32_t)sizeof(BytesTrieElement), + uprv_sortArray(elements, elementsLength, static_cast<int32_t>(sizeof(BytesTrieElement)), compareElementStrings, strings, false, // need not be a stable sort &errorCode); @@ -284,7 +284,7 @@ BytesTrieBuilder::getElementStringLength(int32_t i) const { char16_t BytesTrieBuilder::getElementUnit(int32_t i, int32_t byteIndex) const { - return (uint8_t)elements[i].charAt(byteIndex, *strings); + return static_cast<uint8_t>(elements[i].charAt(byteIndex, *strings)); } int32_t @@ -330,7 +330,7 @@ BytesTrieBuilder::skipElementsBySomeUnits(int32_t i, int32_t byteIndex, int32_t int32_t BytesTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, char16_t byte) const { - char b=(char)byte; + char b = static_cast<char>(byte); while(b==elements[i].charAt(byteIndex, *strings)) { ++i; } @@ -404,7 +404,7 @@ BytesTrieBuilder::write(int32_t byte) { int32_t newLength=bytesLength+1; if(ensureCapacity(newLength)) { bytesLength=newLength; - bytes[bytesCapacity-bytesLength]=(char)byte; + bytes[bytesCapacity - bytesLength] = static_cast<char>(byte); } return bytesLength; } @@ -432,30 +432,30 @@ BytesTrieBuilder::writeValueAndFinal(int32_t i, UBool isFinal) { char intBytes[5]; int32_t length=1; if(i<0 || i>0xffffff) { - intBytes[0]=(char)BytesTrie::kFiveByteValueLead; - intBytes[1]=(char)((uint32_t)i>>24); - intBytes[2]=(char)((uint32_t)i>>16); - intBytes[3]=(char)((uint32_t)i>>8); - intBytes[4]=(char)i; + intBytes[0] = static_cast<char>(BytesTrie::kFiveByteValueLead); + intBytes[1] = static_cast<char>(static_cast<uint32_t>(i) >> 24); + intBytes[2] = static_cast<char>(static_cast<uint32_t>(i) >> 16); + intBytes[3] = static_cast<char>(static_cast<uint32_t>(i) >> 8); + intBytes[4] = static_cast<char>(i); length=5; // } else if(i<=BytesTrie::kMaxOneByteValue) { // intBytes[0]=(char)(BytesTrie::kMinOneByteValueLead+i); } else { if(i<=BytesTrie::kMaxTwoByteValue) { - intBytes[0]=(char)(BytesTrie::kMinTwoByteValueLead+(i>>8)); + intBytes[0] = static_cast<char>(BytesTrie::kMinTwoByteValueLead + (i >> 8)); } else { if(i<=BytesTrie::kMaxThreeByteValue) { - intBytes[0]=(char)(BytesTrie::kMinThreeByteValueLead+(i>>16)); + intBytes[0] = static_cast<char>(BytesTrie::kMinThreeByteValueLead + (i >> 16)); } else { - intBytes[0]=(char)BytesTrie::kFourByteValueLead; - intBytes[1]=(char)(i>>16); + intBytes[0] = static_cast<char>(BytesTrie::kFourByteValueLead); + intBytes[1] = static_cast<char>(i >> 16); length=2; } - intBytes[length++]=(char)(i>>8); + intBytes[length++] = static_cast<char>(i >> 8); } - intBytes[length++]=(char)i; + intBytes[length++] = static_cast<char>(i); } - intBytes[0]=(char)((intBytes[0]<<1)|isFinal); + intBytes[0] = static_cast<char>((intBytes[0] << 1) | isFinal); return write(intBytes, length); } @@ -484,28 +484,28 @@ int32_t BytesTrieBuilder::internalEncodeDelta(int32_t i, char intBytes[]) { U_ASSERT(i>=0); if(i<=BytesTrie::kMaxOneByteDelta) { - intBytes[0]=(char)i; + intBytes[0] = static_cast<char>(i); return 1; } int32_t length=1; if(i<=BytesTrie::kMaxTwoByteDelta) { - intBytes[0]=(char)(BytesTrie::kMinTwoByteDeltaLead+(i>>8)); + intBytes[0] = static_cast<char>(BytesTrie::kMinTwoByteDeltaLead + (i >> 8)); } else { if(i<=BytesTrie::kMaxThreeByteDelta) { - intBytes[0]=(char)(BytesTrie::kMinThreeByteDeltaLead+(i>>16)); + intBytes[0] = static_cast<char>(BytesTrie::kMinThreeByteDeltaLead + (i >> 16)); } else { if(i<=0xffffff) { - intBytes[0]=(char)BytesTrie::kFourByteDeltaLead; + intBytes[0] = static_cast<char>(BytesTrie::kFourByteDeltaLead); } else { - intBytes[0]=(char)BytesTrie::kFiveByteDeltaLead; - intBytes[1]=(char)(i>>24); + intBytes[0] = static_cast<char>(BytesTrie::kFiveByteDeltaLead); + intBytes[1] = static_cast<char>(i >> 24); length=2; } - intBytes[length++]=(char)(i>>16); + intBytes[length++] = static_cast<char>(i >> 16); } - intBytes[length++]=(char)(i>>8); + intBytes[length++] = static_cast<char>(i >> 8); } - intBytes[length++]=(char)i; + intBytes[length++] = static_cast<char>(i); return length; } diff --git a/deps/icu-small/source/common/bytestrieiterator.cpp b/deps/icu-small/source/common/bytestrieiterator.cpp index 65f54be48ae8ab..b60806f1f357b0 100644 --- a/deps/icu-small/source/common/bytestrieiterator.cpp +++ b/deps/icu-small/source/common/bytestrieiterator.cpp @@ -115,14 +115,14 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) { pos=bytes_+stack_->elementAti(stackSize-2); stack_->setSize(stackSize-2); str_->truncate(length&0xffff); - length=(int32_t)((uint32_t)length>>16); + length = static_cast<int32_t>(static_cast<uint32_t>(length) >> 16); if(length>1) { pos=branchNext(pos, length, errorCode); if(pos==nullptr) { return true; // Reached a final value. } } else { - str_->append((char)*pos++, errorCode); + str_->append(static_cast<char>(*pos++), errorCode); } } if(remainingMatchLength_>=0) { @@ -134,7 +134,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) { int32_t node=*pos++; if(node>=kMinValueLead) { // Deliver value for the byte sequence so far. - UBool isFinal=(UBool)(node&kValueIsFinal); + UBool isFinal = static_cast<UBool>(node & kValueIsFinal); value_=readValue(pos, node>>1); if(isFinal || (maxLength_>0 && str_->length()==maxLength_)) { pos_=nullptr; @@ -186,7 +186,7 @@ BytesTrie::Iterator::branchNext(const uint8_t *pos, int32_t length, UErrorCode & while(length>kMaxBranchLinearSubNodeLength) { ++pos; // ignore the comparison byte // Push state for the greater-or-equal edge. - stack_->addElement((int32_t)(skipDelta(pos)-bytes_), errorCode); + stack_->addElement(static_cast<int32_t>(skipDelta(pos) - bytes_), errorCode); stack_->addElement(((length-(length>>1))<<16)|str_->length(), errorCode); // Follow the less-than edge. length>>=1; @@ -196,12 +196,12 @@ BytesTrie::Iterator::branchNext(const uint8_t *pos, int32_t length, UErrorCode & // Read the first (key, value) pair. uint8_t trieByte=*pos++; int32_t node=*pos++; - UBool isFinal=(UBool)(node&kValueIsFinal); + UBool isFinal = static_cast<UBool>(node & kValueIsFinal); int32_t value=readValue(pos, node>>1); pos=skipValue(pos, node); - stack_->addElement((int32_t)(pos-bytes_), errorCode); + stack_->addElement(static_cast<int32_t>(pos - bytes_), errorCode); stack_->addElement(((length-1)<<16)|str_->length(), errorCode); - str_->append((char)trieByte, errorCode); + str_->append(static_cast<char>(trieByte), errorCode); if(isFinal) { pos_=nullptr; value_=value; diff --git a/deps/icu-small/source/common/caniter.cpp b/deps/icu-small/source/common/caniter.cpp index 2c987306ec9ccb..1b2bc2ada0c99a 100644 --- a/deps/icu-small/source/common/caniter.cpp +++ b/deps/icu-small/source/common/caniter.cpp @@ -183,10 +183,10 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st // catch degenerate case if (newSource.length() == 0) { - pieces = (UnicodeString **)uprv_malloc(sizeof(UnicodeString *)); - pieces_lengths = (int32_t*)uprv_malloc(1 * sizeof(int32_t)); + pieces = static_cast<UnicodeString**>(uprv_malloc(sizeof(UnicodeString*))); + pieces_lengths = static_cast<int32_t*>(uprv_malloc(1 * sizeof(int32_t))); pieces_length = 1; - current = (int32_t*)uprv_malloc(1 * sizeof(int32_t)); + current = static_cast<int32_t*>(uprv_malloc(1 * sizeof(int32_t))); current_length = 1; if (pieces == nullptr || pieces_lengths == nullptr || current == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; @@ -229,10 +229,10 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st // allocate the arrays, and find the strings that are CE to each segment - pieces = (UnicodeString **)uprv_malloc(list_length * sizeof(UnicodeString *)); + pieces = static_cast<UnicodeString**>(uprv_malloc(list_length * sizeof(UnicodeString*))); pieces_length = list_length; - pieces_lengths = (int32_t*)uprv_malloc(list_length * sizeof(int32_t)); - current = (int32_t*)uprv_malloc(list_length * sizeof(int32_t)); + pieces_lengths = static_cast<int32_t*>(uprv_malloc(list_length * sizeof(int32_t))); + current = static_cast<int32_t*>(uprv_malloc(list_length * sizeof(int32_t))); current_length = list_length; if (pieces == nullptr || pieces_lengths == nullptr || current == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; @@ -330,7 +330,7 @@ void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros // prefix this character to all of them ne = subpermute.nextElement(el); while (ne != nullptr) { - UnicodeString *permRes = (UnicodeString *)(ne->value.pointer); + UnicodeString* permRes = static_cast<UnicodeString*>(ne->value.pointer); UnicodeString *chStr = new UnicodeString(cp); //test for nullptr if (chStr == nullptr) { @@ -363,6 +363,9 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i char16_t USeg[256]; int32_t segLen = segment.extract(USeg, 256, status); getEquivalents2(&basic, USeg, segLen, status); + if (U_FAILURE(status)) { + return nullptr; + } // now get all the permutations // add only the ones that are canonically equivalent @@ -375,7 +378,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i //while (it.hasNext()) while (ne != nullptr) { //String item = (String) it.next(); - UnicodeString item = *((UnicodeString *)(ne->value.pointer)); + UnicodeString item = *static_cast<UnicodeString*>(ne->value.pointer); permutations.removeAll(); permute(item, CANITER_SKIP_ZEROES, &permutations, status); @@ -387,7 +390,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i while (ne2 != nullptr) { //String possible = (String) it2.next(); //UnicodeString *possible = new UnicodeString(*((UnicodeString *)(ne2->value.pointer))); - UnicodeString possible(*((UnicodeString *)(ne2->value.pointer))); + UnicodeString possible(*static_cast<UnicodeString*>(ne2->value.pointer)); UnicodeString attempt; nfd->normalize(possible, attempt, status); @@ -429,7 +432,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i el = UHASH_FIRST; ne = result.nextElement(el); while(ne != nullptr) { - finalResult[result_len++] = *((UnicodeString *)(ne->value.pointer)); + finalResult[result_len++] = *static_cast<UnicodeString*>(ne->value.pointer); ne = result.nextElement(el); } @@ -466,6 +469,9 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const cha Hashtable remainder(status); remainder.setValueDeleter(uprv_deleteUObject); if (extract(&remainder, cp2, segment, segLen, i, status) == nullptr) { + if (U_FAILURE(status)) { + return nullptr; + } continue; } @@ -476,7 +482,7 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const cha int32_t el = UHASH_FIRST; const UHashElement *ne = remainder.nextElement(el); while (ne != nullptr) { - UnicodeString item = *((UnicodeString *)(ne->value.pointer)); + UnicodeString item = *static_cast<UnicodeString*>(ne->value.pointer); UnicodeString *toAdd = new UnicodeString(prefix); /* test for nullptr */ if (toAdd == nullptr) { @@ -490,6 +496,13 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const cha ne = remainder.nextElement(el); } + // ICU-22642 Guards against strings that have so many permutations + // that they would otherwise hang the function. + constexpr int32_t kResultLimit = 4096; + if (fillinResult->count() > kResultLimit) { + status = U_UNSUPPORTED_ERROR; + return nullptr; + } } } diff --git a/deps/icu-small/source/common/characterproperties.cpp b/deps/icu-small/source/common/characterproperties.cpp index f1e15b488d533d..963ac8342151e9 100644 --- a/deps/icu-small/source/common/characterproperties.cpp +++ b/deps/icu-small/source/common/characterproperties.cpp @@ -58,17 +58,17 @@ icu::UMutex cpMutex; // Does not use uset.h to reduce code dependencies void U_CALLCONV _set_add(USet *set, UChar32 c) { - ((UnicodeSet *)set)->add(c); + reinterpret_cast<UnicodeSet*>(set)->add(c); } void U_CALLCONV _set_addRange(USet *set, UChar32 start, UChar32 end) { - ((UnicodeSet *)set)->add(start, end); + reinterpret_cast<UnicodeSet*>(set)->add(start, end); } void U_CALLCONV _set_addString(USet *set, const char16_t *str, int32_t length) { - ((UnicodeSet *)set)->add(icu::UnicodeString((UBool)(length<0), str, length)); + reinterpret_cast<UnicodeSet*>(set)->add(icu::UnicodeString(static_cast<UBool>(length < 0), str, length)); } UBool U_CALLCONV characterproperties_cleanup() { @@ -103,7 +103,7 @@ void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { return; } USetAdder sa = { - (USet *)incl.getAlias(), + reinterpret_cast<USet*>(incl.getAlias()), _set_add, _set_addRange, _set_addString, @@ -184,8 +184,12 @@ void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { sa.add(sa.set, 0x2FFF + 1); break; case UPROPS_SRC_ID_COMPAT_MATH: + case UPROPS_SRC_MCM: uprops_addPropertyStarts(src, &sa, &errorCode); break; + case UPROPS_SRC_BLOCK: + ublock_addPropertyStarts(&sa, errorCode); + break; default: errorCode = U_INTERNAL_PROGRAM_ERROR; break; @@ -289,7 +293,7 @@ UnicodeSet *makeSet(UProperty property, UErrorCode &errorCode) { const icu::EmojiProps *ep = icu::EmojiProps::getSingleton(errorCode); if (U_FAILURE(errorCode)) { return nullptr; } USetAdder sa = { - (USet *)set.getAlias(), + reinterpret_cast<USet*>(set.getAlias()), _set_add, _set_addRange, _set_addString, diff --git a/deps/icu-small/source/common/cstring.cpp b/deps/icu-small/source/common/cstring.cpp index e95816c130160d..cc3f6deed89019 100644 --- a/deps/icu-small/source/common/cstring.cpp +++ b/deps/icu-small/source/common/cstring.cpp @@ -126,7 +126,7 @@ T_CString_toLowerCase(char* str) if (str) { do - *str = (char)uprv_tolower(*str); + *str = uprv_tolower(*str); while (*(str++)); } @@ -140,7 +140,7 @@ T_CString_toUpperCase(char* str) if (str) { do - *str = (char)uprv_toupper(*str); + *str = uprv_toupper(*str); while (*(str++)); } diff --git a/deps/icu-small/source/common/dictbe.cpp b/deps/icu-small/source/common/dictbe.cpp index 3d672c03bfb3ed..888716c8d89165 100644 --- a/deps/icu-small/source/common/dictbe.cpp +++ b/deps/icu-small/source/common/dictbe.cpp @@ -61,12 +61,12 @@ DictionaryBreakEngine::findBreaks( UText *text, // extends towards the start or end of the text, depending on 'reverse'. utext_setNativeIndex(text, startPos); - int32_t start = (int32_t)utext_getNativeIndex(text); + int32_t start = static_cast<int32_t>(utext_getNativeIndex(text)); int32_t current; int32_t rangeStart; int32_t rangeEnd; UChar32 c = utext_current32(text); - while((current = (int32_t)utext_getNativeIndex(text)) < endPos && fSet.contains(c)) { + while ((current = static_cast<int32_t>(utext_getNativeIndex(text))) < endPos && fSet.contains(c)) { utext_next32(text); // TODO: recast loop for postincrement c = utext_current32(text); } @@ -137,7 +137,7 @@ class PossibleWord { int32_t PossibleWord::candidates( UText *text, DictionaryMatcher *dict, int32_t rangeEnd ) { // TODO: If getIndex is too slow, use offset < 0 and add discardAll() - int32_t start = (int32_t)utext_getNativeIndex(text); + int32_t start = static_cast<int32_t>(utext_getNativeIndex(text)); if (start != offset) { offset = start; count = dict->matches(text, rangeEnd-start, UPRV_LENGTHOF(cuLengths), cuLengths, cpLengths, nullptr, &prefix); @@ -253,7 +253,7 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text, utext_setNativeIndex(text, rangeStart); - while (U_SUCCESS(status) && (current = (int32_t)utext_getNativeIndex(text)) < rangeEnd) { + while (U_SUCCESS(status) && (current = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd) { cpWordLength = 0; cuWordLength = 0; @@ -269,7 +269,7 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text, // If there was more than one, see which one can take us forward the most words else if (candidates > 1) { // If we're already at the end of the range, we're done - if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) >= rangeEnd) { goto foundBest; } do { @@ -278,7 +278,7 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text, words[wordsFound%THAI_LOOKAHEAD].markCurrent(); // If we're already at the end of the range, we're done - if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) >= rangeEnd) { goto foundBest; } @@ -308,7 +308,7 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text, // The text iterator should now be positioned at the end of the word we found. UChar32 uc = 0; - if ((int32_t)utext_getNativeIndex(text) < rangeEnd && cpWordLength < THAI_ROOT_COMBINE_THRESHOLD) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) < rangeEnd && cpWordLength < THAI_ROOT_COMBINE_THRESHOLD) { // if it is a dictionary word, do nothing. If it isn't, then if there is // no preceding word, or the non-word shares less than the minimum threshold // of characters with a dictionary word, then scan to resynchronize @@ -320,9 +320,9 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text, UChar32 pc; int32_t chars = 0; for (;;) { - int32_t pcIndex = (int32_t)utext_getNativeIndex(text); + int32_t pcIndex = static_cast<int32_t>(utext_getNativeIndex(text)); pc = utext_next32(text); - int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex; + int32_t pcSize = static_cast<int32_t>(utext_getNativeIndex(text)) - pcIndex; chars += pcSize; remaining -= pcSize; if (remaining <= 0) { @@ -356,28 +356,28 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text, utext_setNativeIndex(text, current+cuWordLength); } } - + // Never stop before a combining mark. int32_t currPos; - while ((currPos = (int32_t)utext_getNativeIndex(text)) < rangeEnd && fMarkSet.contains(utext_current32(text))) { + while ((currPos = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd && fMarkSet.contains(utext_current32(text))) { utext_next32(text); - cuWordLength += (int32_t)utext_getNativeIndex(text) - currPos; + cuWordLength += static_cast<int32_t>(utext_getNativeIndex(text)) - currPos; } - + // Look ahead for possible suffixes if a dictionary word does not follow. // We do this in code rather than using a rule so that the heuristic // resynch continues to function. For example, one of the suffix characters // could be a typo in the middle of a word. - if ((int32_t)utext_getNativeIndex(text) < rangeEnd && cuWordLength > 0) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) < rangeEnd && cuWordLength > 0) { if (words[wordsFound%THAI_LOOKAHEAD].candidates(text, fDictionary, rangeEnd) <= 0 && fSuffixSet.contains(uc = utext_current32(text))) { if (uc == THAI_PAIYANNOI) { if (!fSuffixSet.contains(utext_previous32(text))) { // Skip over previous end and PAIYANNOI utext_next32(text); - int32_t paiyannoiIndex = (int32_t)utext_getNativeIndex(text); + int32_t paiyannoiIndex = static_cast<int32_t>(utext_getNativeIndex(text)); utext_next32(text); - cuWordLength += (int32_t)utext_getNativeIndex(text) - paiyannoiIndex; // Add PAIYANNOI to word + cuWordLength += static_cast<int32_t>(utext_getNativeIndex(text)) - paiyannoiIndex; // Add PAIYANNOI to word uc = utext_current32(text); // Fetch next character } else { @@ -389,9 +389,9 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text, if (utext_previous32(text) != THAI_MAIYAMOK) { // Skip over previous end and MAIYAMOK utext_next32(text); - int32_t maiyamokIndex = (int32_t)utext_getNativeIndex(text); + int32_t maiyamokIndex = static_cast<int32_t>(utext_getNativeIndex(text)); utext_next32(text); - cuWordLength += (int32_t)utext_getNativeIndex(text) - maiyamokIndex; // Add MAIYAMOK to word + cuWordLength += static_cast<int32_t>(utext_getNativeIndex(text)) - maiyamokIndex; // Add MAIYAMOK to word } else { // Restore prior position @@ -489,7 +489,7 @@ LaoBreakEngine::divideUpDictionaryRange( UText *text, utext_setNativeIndex(text, rangeStart); - while (U_SUCCESS(status) && (current = (int32_t)utext_getNativeIndex(text)) < rangeEnd) { + while (U_SUCCESS(status) && (current = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd) { cuWordLength = 0; cpWordLength = 0; @@ -514,7 +514,7 @@ LaoBreakEngine::divideUpDictionaryRange( UText *text, words[wordsFound%LAO_LOOKAHEAD].markCurrent(); // If we're already at the end of the range, we're done - if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) >= rangeEnd) { goto foundBest; } @@ -541,7 +541,7 @@ LaoBreakEngine::divideUpDictionaryRange( UText *text, // just found (if there is one), but only if the preceding word does not exceed // the threshold. // The text iterator should now be positioned at the end of the word we found. - if ((int32_t)utext_getNativeIndex(text) < rangeEnd && cpWordLength < LAO_ROOT_COMBINE_THRESHOLD) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) < rangeEnd && cpWordLength < LAO_ROOT_COMBINE_THRESHOLD) { // if it is a dictionary word, do nothing. If it isn't, then if there is // no preceding word, or the non-word shares less than the minimum threshold // of characters with a dictionary word, then scan to resynchronize @@ -554,9 +554,9 @@ LaoBreakEngine::divideUpDictionaryRange( UText *text, UChar32 uc; int32_t chars = 0; for (;;) { - int32_t pcIndex = (int32_t)utext_getNativeIndex(text); + int32_t pcIndex = static_cast<int32_t>(utext_getNativeIndex(text)); pc = utext_next32(text); - int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex; + int32_t pcSize = static_cast<int32_t>(utext_getNativeIndex(text)) - pcIndex; chars += pcSize; remaining -= pcSize; if (remaining <= 0) { @@ -590,9 +590,9 @@ LaoBreakEngine::divideUpDictionaryRange( UText *text, // Never stop before a combining mark. int32_t currPos; - while ((currPos = (int32_t)utext_getNativeIndex(text)) < rangeEnd && fMarkSet.contains(utext_current32(text))) { + while ((currPos = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd && fMarkSet.contains(utext_current32(text))) { utext_next32(text); - cuWordLength += (int32_t)utext_getNativeIndex(text) - currPos; + cuWordLength += static_cast<int32_t>(utext_getNativeIndex(text)) - currPos; } // Look ahead for possible suffixes if a dictionary word does not follow. @@ -682,7 +682,7 @@ BurmeseBreakEngine::divideUpDictionaryRange( UText *text, utext_setNativeIndex(text, rangeStart); - while (U_SUCCESS(status) && (current = (int32_t)utext_getNativeIndex(text)) < rangeEnd) { + while (U_SUCCESS(status) && (current = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd) { cuWordLength = 0; cpWordLength = 0; @@ -707,7 +707,7 @@ BurmeseBreakEngine::divideUpDictionaryRange( UText *text, words[wordsFound%BURMESE_LOOKAHEAD].markCurrent(); // If we're already at the end of the range, we're done - if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) >= rangeEnd) { goto foundBest; } @@ -734,7 +734,7 @@ BurmeseBreakEngine::divideUpDictionaryRange( UText *text, // just found (if there is one), but only if the preceding word does not exceed // the threshold. // The text iterator should now be positioned at the end of the word we found. - if ((int32_t)utext_getNativeIndex(text) < rangeEnd && cpWordLength < BURMESE_ROOT_COMBINE_THRESHOLD) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) < rangeEnd && cpWordLength < BURMESE_ROOT_COMBINE_THRESHOLD) { // if it is a dictionary word, do nothing. If it isn't, then if there is // no preceding word, or the non-word shares less than the minimum threshold // of characters with a dictionary word, then scan to resynchronize @@ -747,9 +747,9 @@ BurmeseBreakEngine::divideUpDictionaryRange( UText *text, UChar32 uc; int32_t chars = 0; for (;;) { - int32_t pcIndex = (int32_t)utext_getNativeIndex(text); + int32_t pcIndex = static_cast<int32_t>(utext_getNativeIndex(text)); pc = utext_next32(text); - int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex; + int32_t pcSize = static_cast<int32_t>(utext_getNativeIndex(text)) - pcIndex; chars += pcSize; remaining -= pcSize; if (remaining <= 0) { @@ -783,9 +783,9 @@ BurmeseBreakEngine::divideUpDictionaryRange( UText *text, // Never stop before a combining mark. int32_t currPos; - while ((currPos = (int32_t)utext_getNativeIndex(text)) < rangeEnd && fMarkSet.contains(utext_current32(text))) { + while ((currPos = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd && fMarkSet.contains(utext_current32(text))) { utext_next32(text); - cuWordLength += (int32_t)utext_getNativeIndex(text) - currPos; + cuWordLength += static_cast<int32_t>(utext_getNativeIndex(text)) - currPos; } // Look ahead for possible suffixes if a dictionary word does not follow. @@ -888,7 +888,7 @@ KhmerBreakEngine::divideUpDictionaryRange( UText *text, utext_setNativeIndex(text, rangeStart); - while (U_SUCCESS(status) && (current = (int32_t)utext_getNativeIndex(text)) < rangeEnd) { + while (U_SUCCESS(status) && (current = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd) { cuWordLength = 0; cpWordLength = 0; @@ -905,7 +905,7 @@ KhmerBreakEngine::divideUpDictionaryRange( UText *text, // If there was more than one, see which one can take us forward the most words else if (candidates > 1) { // If we're already at the end of the range, we're done - if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) >= rangeEnd) { goto foundBest; } do { @@ -914,7 +914,7 @@ KhmerBreakEngine::divideUpDictionaryRange( UText *text, words[wordsFound % KHMER_LOOKAHEAD].markCurrent(); // If we're already at the end of the range, we're done - if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) >= rangeEnd) { goto foundBest; } @@ -941,7 +941,7 @@ KhmerBreakEngine::divideUpDictionaryRange( UText *text, // just found (if there is one), but only if the preceding word does not exceed // the threshold. // The text iterator should now be positioned at the end of the word we found. - if ((int32_t)utext_getNativeIndex(text) < rangeEnd && cpWordLength < KHMER_ROOT_COMBINE_THRESHOLD) { + if (static_cast<int32_t>(utext_getNativeIndex(text)) < rangeEnd && cpWordLength < KHMER_ROOT_COMBINE_THRESHOLD) { // if it is a dictionary word, do nothing. If it isn't, then if there is // no preceding word, or the non-word shares less than the minimum threshold // of characters with a dictionary word, then scan to resynchronize @@ -954,9 +954,9 @@ KhmerBreakEngine::divideUpDictionaryRange( UText *text, UChar32 uc; int32_t chars = 0; for (;;) { - int32_t pcIndex = (int32_t)utext_getNativeIndex(text); + int32_t pcIndex = static_cast<int32_t>(utext_getNativeIndex(text)); pc = utext_next32(text); - int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex; + int32_t pcSize = static_cast<int32_t>(utext_getNativeIndex(text)) - pcIndex; chars += pcSize; remaining -= pcSize; if (remaining <= 0) { @@ -989,9 +989,9 @@ KhmerBreakEngine::divideUpDictionaryRange( UText *text, // Never stop before a combining mark. int32_t currPos; - while ((currPos = (int32_t)utext_getNativeIndex(text)) < rangeEnd && fMarkSet.contains(utext_current32(text))) { + while ((currPos = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd && fMarkSet.contains(utext_current32(text))) { utext_next32(text); - cuWordLength += (int32_t)utext_getNativeIndex(text) - currPos; + cuWordLength += static_cast<int32_t>(utext_getNativeIndex(text)) - currPos; } // Look ahead for possible suffixes if a dictionary word does not follow. @@ -1120,7 +1120,7 @@ static inline bool isKatakana(UChar32 value) { // Replicates an internal UText function. static inline int32_t utext_i32_flag(int32_t bitIndex) { - return (int32_t)1 << bitIndex; + return static_cast<int32_t>(1) << bitIndex; } /* @@ -1167,14 +1167,14 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, int32_t limit = rangeEnd; U_ASSERT(limit <= utext_nativeLength(inText)); if (limit > utext_nativeLength(inText)) { - limit = (int32_t)utext_nativeLength(inText); + limit = static_cast<int32_t>(utext_nativeLength(inText)); } inputMap.adoptInsteadAndCheckErrorCode(new UVector32(status), status); if (U_FAILURE(status)) { return 0; } while (utext_getNativeIndex(inText) < limit) { - int32_t nativePosition = (int32_t)utext_getNativeIndex(inText); + int32_t nativePosition = static_cast<int32_t>(utext_getNativeIndex(inText)); UChar32 c = utext_next32(inText); U_ASSERT(c != U_SENTINEL); inString.append(c); @@ -1304,7 +1304,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, int32_t ix = 0; bool is_prev_katakana = false; for (int32_t i = 0; i < numCodePts; ++i, ix = inString.moveIndex32(ix, 1)) { - if ((uint32_t)bestSnlp.elementAti(i) == kuint32max) { + if (static_cast<uint32_t>(bestSnlp.elementAti(i)) == kuint32max) { continue; } @@ -1327,9 +1327,9 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, } for (int32_t j = 0; j < count; j++) { - uint32_t newSnlp = (uint32_t)bestSnlp.elementAti(i) + (uint32_t)values.elementAti(j); + uint32_t newSnlp = static_cast<uint32_t>(bestSnlp.elementAti(i)) + static_cast<uint32_t>(values.elementAti(j)); int32_t ln_j_i = lengths.elementAti(j) + i; - if (newSnlp < (uint32_t)bestSnlp.elementAti(ln_j_i)) { + if (newSnlp < static_cast<uint32_t>(bestSnlp.elementAti(ln_j_i))) { bestSnlp.setElementAt(newSnlp, ln_j_i); prev.setElementAt(i, ln_j_i); } @@ -1353,7 +1353,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, } if (katakanaRunLength < kMaxKatakanaGroupLength) { uint32_t newSnlp = bestSnlp.elementAti(i) + getKatakanaCost(katakanaRunLength); - if (newSnlp < (uint32_t)bestSnlp.elementAti(i+katakanaRunLength)) { + if (newSnlp < static_cast<uint32_t>(bestSnlp.elementAti(i + katakanaRunLength))) { bestSnlp.setElementAt(newSnlp, i+katakanaRunLength); prev.setElementAt(i, i+katakanaRunLength); // prev[j] = i; } @@ -1371,7 +1371,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, int32_t numBreaks = 0; // No segmentation found, set boundary to end of range - if ((uint32_t)bestSnlp.elementAti(numCodePts) == kuint32max) { + if (static_cast<uint32_t>(bestSnlp.elementAti(numCodePts)) == kuint32max) { t_boundary.addElement(numCodePts, status); numBreaks++; } else if (isPhraseBreaking) { diff --git a/deps/icu-small/source/common/dictionarydata.cpp b/deps/icu-small/source/common/dictionarydata.cpp index 80b6d82d56ae17..4bae0c6d335838 100644 --- a/deps/icu-small/source/common/dictionarydata.cpp +++ b/deps/icu-small/source/common/dictionarydata.cpp @@ -47,13 +47,13 @@ int32_t UCharsDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t int32_t *prefix) const { UCharsTrie uct(characters); - int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text); + int32_t startingTextIndex = static_cast<int32_t>(utext_getNativeIndex(text)); int32_t wordCount = 0; int32_t codePointsMatched = 0; for (UChar32 c = utext_next32(text); c >= 0; c=utext_next32(text)) { UStringTrieResult result = (codePointsMatched == 0) ? uct.first(c) : uct.next(c); - int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - startingTextIndex; + int32_t lengthMatched = static_cast<int32_t>(utext_getNativeIndex(text)) - startingTextIndex; codePointsMatched += 1; if (USTRINGTRIE_HAS_VALUE(result)) { if (wordCount < limit) { @@ -101,7 +101,7 @@ UChar32 BytesDictionaryMatcher::transform(UChar32 c) const { if (delta < 0 || 0xFD < delta) { return U_SENTINEL; } - return (UChar32)delta; + return static_cast<UChar32>(delta); } return c; } @@ -114,13 +114,13 @@ int32_t BytesDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t int32_t *lengths, int32_t *cpLengths, int32_t *values, int32_t *prefix) const { BytesTrie bt(characters); - int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text); + int32_t startingTextIndex = static_cast<int32_t>(utext_getNativeIndex(text)); int32_t wordCount = 0; int32_t codePointsMatched = 0; for (UChar32 c = utext_next32(text); c >= 0; c=utext_next32(text)) { UStringTrieResult result = (codePointsMatched == 0) ? bt.first(transform(c)) : bt.next(transform(c)); - int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - startingTextIndex; + int32_t lengthMatched = static_cast<int32_t>(utext_getNativeIndex(text)) - startingTextIndex; codePointsMatched += 1; if (USTRINGTRIE_HAS_VALUE(result)) { if (wordCount < limit) { diff --git a/deps/icu-small/source/common/edits.cpp b/deps/icu-small/source/common/edits.cpp index 3348145d48df6d..82055e5e543bfc 100644 --- a/deps/icu-small/source/common/edits.cpp +++ b/deps/icu-small/source/common/edits.cpp @@ -47,7 +47,7 @@ Edits &Edits::copyArray(const Edits &other) { return *this; } if (length > capacity) { - uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)length * 2); + uint16_t* newArray = static_cast<uint16_t*>(uprv_malloc(static_cast<size_t>(length) * 2)); if (newArray == nullptr) { length = delta = numChanges = 0; errorCode_ = U_MEMORY_ALLOCATION_ERROR; @@ -186,30 +186,30 @@ void Edits::addReplace(int32_t oldLength, int32_t newLength) { head |= oldLength << 6; } else if(oldLength <= 0x7fff) { head |= LENGTH_IN_1TRAIL << 6; - array[limit++] = (uint16_t)(0x8000 | oldLength); + array[limit++] = static_cast<uint16_t>(0x8000 | oldLength); } else { head |= (LENGTH_IN_2TRAIL + (oldLength >> 30)) << 6; - array[limit++] = (uint16_t)(0x8000 | (oldLength >> 15)); - array[limit++] = (uint16_t)(0x8000 | oldLength); + array[limit++] = static_cast<uint16_t>(0x8000 | (oldLength >> 15)); + array[limit++] = static_cast<uint16_t>(0x8000 | oldLength); } if(newLength < LENGTH_IN_1TRAIL) { head |= newLength; } else if(newLength <= 0x7fff) { head |= LENGTH_IN_1TRAIL; - array[limit++] = (uint16_t)(0x8000 | newLength); + array[limit++] = static_cast<uint16_t>(0x8000 | newLength); } else { head |= LENGTH_IN_2TRAIL + (newLength >> 30); - array[limit++] = (uint16_t)(0x8000 | (newLength >> 15)); - array[limit++] = (uint16_t)(0x8000 | newLength); + array[limit++] = static_cast<uint16_t>(0x8000 | (newLength >> 15)); + array[limit++] = static_cast<uint16_t>(0x8000 | newLength); } - array[length] = (uint16_t)head; + array[length] = static_cast<uint16_t>(head); length = limit; } } void Edits::append(int32_t r) { if(length < capacity || growArray()) { - array[length++] = (uint16_t)r; + array[length++] = static_cast<uint16_t>(r); } } @@ -232,7 +232,7 @@ UBool Edits::growArray() { errorCode_ = U_INDEX_OUTOFBOUNDS_ERROR; return false; } - uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)newCapacity * 2); + uint16_t* newArray = static_cast<uint16_t*>(uprv_malloc(static_cast<size_t>(newCapacity) * 2)); if (newArray == nullptr) { errorCode_ = U_MEMORY_ALLOCATION_ERROR; return false; @@ -415,7 +415,7 @@ int32_t Edits::Iterator::readLength(int32_t head) { U_ASSERT(array[index] >= 0x8000); U_ASSERT(array[index + 1] >= 0x8000); int32_t len = ((head & 1) << 30) | - ((int32_t)(array[index] & 0x7fff) << 15) | + (static_cast<int32_t>(array[index] & 0x7fff) << 15) | (array[index + 1] & 0x7fff); index += 2; return len; diff --git a/deps/icu-small/source/common/emojiprops.cpp b/deps/icu-small/source/common/emojiprops.cpp index f2b3f4762f339f..2e4fb0130ce8fc 100644 --- a/deps/icu-small/source/common/emojiprops.cpp +++ b/deps/icu-small/source/common/emojiprops.cpp @@ -83,8 +83,8 @@ void EmojiProps::load(UErrorCode &errorCode) { memory = udata_openChoice(nullptr, "icu", "uemoji", isAcceptable, this, &errorCode); if (U_FAILURE(errorCode)) { return; } - const uint8_t *inBytes = (const uint8_t *)udata_getMemory(memory); - const int32_t *inIndexes = (const int32_t *)inBytes; + const uint8_t* inBytes = static_cast<const uint8_t*>(udata_getMemory(memory)); + const int32_t* inIndexes = reinterpret_cast<const int32_t*>(inBytes); int32_t indexesLength = inIndexes[IX_CPTRIE_OFFSET] / 4; if (indexesLength <= IX_RGI_EMOJI_ZWJ_SEQUENCE_TRIE_OFFSET) { errorCode = U_INVALID_FORMAT_ERROR; // Not enough indexes. @@ -104,7 +104,7 @@ EmojiProps::load(UErrorCode &errorCode) { offset = inIndexes[i]; nextOffset = inIndexes[i + 1]; // Set/leave nullptr if there is no UCharsTrie. - const char16_t *p = nextOffset > offset ? (const char16_t *)(inBytes + offset) : nullptr; + const char16_t* p = nextOffset > offset ? reinterpret_cast<const char16_t*>(inBytes + offset) : nullptr; stringTries[getStringTrieIndex(i)] = p; } } diff --git a/deps/icu-small/source/common/filteredbrk.cpp b/deps/icu-small/source/common/filteredbrk.cpp index a1490b61213fe9..29b02dd38424ae 100644 --- a/deps/icu-small/source/common/filteredbrk.cpp +++ b/deps/icu-small/source/common/filteredbrk.cpp @@ -50,8 +50,8 @@ static void _fb_trace(const char *m, const UnicodeString *s, UBool b, int32_t d, * Used with sortedInsert() */ static int32_t U_CALLCONV compareUnicodeString(UElement t1, UElement t2) { - const UnicodeString &a = *(const UnicodeString*)t1.pointer; - const UnicodeString &b = *(const UnicodeString*)t2.pointer; + const UnicodeString& a = *static_cast<const UnicodeString*>(t1.pointer); + const UnicodeString& b = *static_cast<const UnicodeString*>(t2.pointer); return a.compare(b); } @@ -76,7 +76,7 @@ class UStringSet : public UVector { * Return the ith UnicodeString alias */ inline const UnicodeString* getStringAt(int32_t i) const { - return (const UnicodeString*)elementAt(i); + return static_cast<const UnicodeString*>(elementAt(i)); } /** * Adopt the UnicodeString if not already contained. diff --git a/deps/icu-small/source/common/icuplug.cpp b/deps/icu-small/source/common/icuplug.cpp index 7aa70a506b0887..521a125e43d8c0 100644 --- a/deps/icu-small/source/common/icuplug.cpp +++ b/deps/icu-small/source/common/icuplug.cpp @@ -747,7 +747,7 @@ uplug_init(UErrorCode *status) { FILE *f; CharString pluginFile; -#ifdef OS390BATCH +#ifdef ICU_PLUGINS_DD /* There are potentially a lot of ways to implement a plugin directory on OS390/zOS */ /* Keeping in mind that unauthorized file access is logged, monitored, and enforced */ /* I've chosen to open a DDNAME if BATCH and leave it alone for (presumably) UNIX */ diff --git a/deps/icu-small/source/common/loadednormalizer2impl.cpp b/deps/icu-small/source/common/loadednormalizer2impl.cpp index 99b8f3e86c6c32..bb5736137d7209 100644 --- a/deps/icu-small/source/common/loadednormalizer2impl.cpp +++ b/deps/icu-small/source/common/loadednormalizer2impl.cpp @@ -63,7 +63,7 @@ LoadedNormalizer2Impl::isAcceptable(void * /*context*/, pInfo->dataFormat[1]==0x72 && pInfo->dataFormat[2]==0x6d && pInfo->dataFormat[3]==0x32 && - pInfo->formatVersion[0]==4 + pInfo->formatVersion[0]==5 ) { // Normalizer2Impl *me=(Normalizer2Impl *)context; // uprv_memcpy(me->dataVersion, pInfo->dataVersion, 4); @@ -82,8 +82,8 @@ LoadedNormalizer2Impl::load(const char *packageName, const char *name, UErrorCod if(U_FAILURE(errorCode)) { return; } - const uint8_t *inBytes=(const uint8_t *)udata_getMemory(memory); - const int32_t *inIndexes=(const int32_t *)inBytes; + const uint8_t* inBytes = static_cast<const uint8_t*>(udata_getMemory(memory)); + const int32_t* inIndexes = reinterpret_cast<const int32_t*>(inBytes); int32_t indexesLength=inIndexes[IX_NORM_TRIE_OFFSET]/4; if(indexesLength<=IX_MIN_LCCC_CP) { errorCode=U_INVALID_FORMAT_ERROR; // Not enough indexes. @@ -101,7 +101,7 @@ LoadedNormalizer2Impl::load(const char *packageName, const char *name, UErrorCod offset=nextOffset; nextOffset=inIndexes[IX_SMALL_FCD_OFFSET]; - const uint16_t *inExtraData=(const uint16_t *)(inBytes+offset); + const uint16_t* inExtraData = reinterpret_cast<const uint16_t*>(inBytes + offset); // smallFCD: new in formatVersion 2 offset=nextOffset; @@ -311,7 +311,7 @@ Normalizer2::getInstance(const char *packageName, { Mutex lock; if(cache!=nullptr) { - allModes=(Norm2AllModes *)uhash_get(cache, name); + allModes = static_cast<Norm2AllModes*>(uhash_get(cache, name)); } } if(allModes==nullptr) { @@ -331,7 +331,7 @@ Normalizer2::getInstance(const char *packageName, void *temp=uhash_get(cache, name); if(temp==nullptr) { int32_t keyLength= static_cast<int32_t>(uprv_strlen(name)+1); - char *nameCopy=(char *)uprv_malloc(keyLength); + char* nameCopy = static_cast<char*>(uprv_malloc(keyLength)); if(nameCopy==nullptr) { errorCode=U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -341,7 +341,7 @@ Normalizer2::getInstance(const char *packageName, uhash_put(cache, nameCopy, localAllModes.orphan(), &errorCode); } else { // race condition - allModes=(Norm2AllModes *)temp; + allModes = static_cast<Norm2AllModes*>(temp); } } } diff --git a/deps/icu-small/source/common/localebuilder.cpp b/deps/icu-small/source/common/localebuilder.cpp index e53065a8a605c9..71969c847b19c1 100644 --- a/deps/icu-small/source/common/localebuilder.cpp +++ b/deps/icu-small/source/common/localebuilder.cpp @@ -1,6 +1,8 @@ // © 2019 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html +#include <optional> +#include <string_view> #include <utility> #include "bytesinkutil.h" // StringByteSink<CharString> @@ -162,12 +164,15 @@ _isKeywordValue(const char* key, const char* value, int32_t value_len) // otherwise: unicode extension value // We need to convert from legacy key/value to unicode // key/value - const char* unicode_locale_key = uloc_toUnicodeLocaleKey(key); - const char* unicode_locale_type = uloc_toUnicodeLocaleType(key, value); - - return unicode_locale_key && unicode_locale_type && - ultag_isUnicodeLocaleKey(unicode_locale_key, -1) && - ultag_isUnicodeLocaleType(unicode_locale_type, -1); + std::optional<std::string_view> unicode_locale_key = ulocimp_toBcpKeyWithFallback(key); + std::optional<std::string_view> unicode_locale_type = ulocimp_toBcpTypeWithFallback(key, value); + + return unicode_locale_key.has_value() && + unicode_locale_type.has_value() && + ultag_isUnicodeLocaleKey(unicode_locale_key->data(), + static_cast<int32_t>(unicode_locale_key->size())) && + ultag_isUnicodeLocaleType(unicode_locale_type->data(), + static_cast<int32_t>(unicode_locale_type->size())); } void diff --git a/deps/icu-small/source/common/localefallback_data.h b/deps/icu-small/source/common/localefallback_data.h index 7441ee307a9736..0accf0324d7eb2 100644 --- a/deps/icu-small/source/common/localefallback_data.h +++ b/deps/icu-small/source/common/localefallback_data.h @@ -15,111 +15,112 @@ const char scriptCodeChars[] = "Brah\0Cakm\0Cans\0Cari\0Cham\0Cher\0Chrs\0Copt\0Cprt\0Cyrl\0Deva\0" "Egyp\0Elym\0Ethi\0Geor\0Gong\0Gonm\0Goth\0Gran\0Grek\0Gujr\0Guru\0" "Hang\0Hani\0Hans\0Hant\0Hebr\0Hluw\0Hmnp\0Ital\0Java\0Jpan\0Kali\0" - "Kana\0Kawi\0Khar\0Khmr\0Kits\0Knda\0Kore\0Lana\0Laoo\0Lepc\0Lina\0" - "Linb\0Lisu\0Lyci\0Lydi\0Mand\0Mani\0Marc\0Medf\0Merc\0Mlym\0Modi\0" - "Mong\0Mroo\0Mtei\0Mymr\0Narb\0Newa\0Nkoo\0Nshu\0Ogam\0Olck\0Orkh\0" - "Orya\0Osge\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rjng\0Rohg\0Runr\0Samr\0" - "Sarb\0Saur\0Sgnw\0Sinh\0Sogd\0Sora\0Soyo\0Syrc\0Tagb\0Takr\0Tale\0" - "Talu\0Taml\0Tang\0Tavt\0Telu\0Tfng\0Thaa\0Thai\0Tibt\0Tnsa\0Toto\0" - "Ugar\0Vaii\0Wcho\0Xpeo\0Xsux\0Yiii\0"; + "Kana\0Kawi\0Khar\0Khmr\0Kits\0Knda\0Kore\0Lana\0Laoo\0Latf\0Latg\0" + "Lepc\0Lina\0Linb\0Lisu\0Lyci\0Lydi\0Mand\0Mani\0Marc\0Medf\0Merc\0" + "Mlym\0Modi\0Mong\0Mroo\0Mtei\0Mymr\0Narb\0Newa\0Nkoo\0Nshu\0Ogam\0" + "Olck\0Orkh\0Orya\0Osge\0Ougr\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rjng\0" + "Rohg\0Runr\0Samr\0Sarb\0Saur\0Sgnw\0Sinh\0Sogd\0Sora\0Soyo\0Sunu\0" + "Syrc\0Tagb\0Takr\0Tale\0Talu\0Taml\0Tang\0Tavt\0Telu\0Tfng\0Thaa\0" + "Thai\0Tibt\0Tnsa\0Toto\0Ugar\0Vaii\0Wcho\0Xpeo\0Xsux\0Yiii\0"; const char dsLocaleIDChars[] = "aaf\0aao\0aat\0ab\0abh\0abl\0abv\0acm\0acq\0acw\0acx\0adf\0adx\0" "ady\0ae\0aeb\0aec\0aee\0aeq\0afb\0agi\0agj\0agx\0ahg\0aho\0ahr\0" - "aib\0aij\0ain\0aio\0aiq\0akk\0akv\0alk\0all\0alr\0alt\0alw\0am\0" - "ams\0amw\0ani\0anp\0anr\0anu\0aot\0apc\0apd\0aph\0aqc\0ar\0arc\0" - "arq\0ars\0ary\0arz\0as\0ase\0ask\0atn\0atv\0auj\0auz\0av\0avd\0" - "avl\0awa\0awn\0axm\0ayh\0ayl\0ayn\0ayp\0az_IQ\0az_IR\0az_RU\0" - "azb\0ba\0bal\0bap\0bax\0bbl\0bcq\0bdv\0bdz\0be\0bee\0bej\0bfb\0" - "bfq\0bft\0bfu\0bfw\0bfy\0bfz\0bg\0bgc\0bgd\0bgn\0bgp\0bgq\0bgw\0" - "bgx\0bha\0bhb\0bhd\0bhe\0bhh\0bhi\0bhj\0bhm\0bhn\0bho\0bht\0bhu\0" - "biy\0bjf\0bjj\0bjm\0blk\0blt\0bmj\0bn\0bns\0bo\0bph\0bpx\0bpy\0" - "bqi\0bra\0brb\0brd\0brh\0brk\0brv\0brx\0bsh\0bsk\0bsq\0bst\0btd\0" - "btm\0btv\0bua\0bwe\0bxm\0bxu\0byh\0byn\0byw\0bzi\0cbn\0ccp\0cde\0" - "cdh\0cdi\0cdj\0cdm\0cdo\0cdz\0ce\0cgk\0chg\0chm\0chr\0chx\0cih\0" - "cja\0cji\0cjm\0cjy\0ckb\0ckt\0clh\0clw\0cmg\0cna\0cnp\0cog\0cop\0" - "cpg\0cr\0crh\0crj\0crk\0crl\0crm\0csh\0csp\0csw\0ctd\0ctg\0ctn\0" - "ctt\0cu\0cuu\0cv\0czh\0czk\0daq\0dar\0dcc\0ddo\0def\0deh\0der\0" - "dhi\0dhn\0dho\0dhw\0dka\0dlg\0dmf\0dmk\0dml\0dng\0dnu\0dnv\0doi\0" - "dox\0dre\0drq\0drs\0dry\0dso\0dty\0dub\0duh\0dus\0dv\0dwk\0dwz\0" - "dz\0dzl\0ecr\0ecy\0egy\0eky\0el\0emg\0emu\0enf\0enh\0era\0esg\0" - "esh\0ett\0eve\0evn\0fa\0fay\0faz\0fia\0fmu\0fub\0gan\0gaq\0gas\0" - "gau\0gbj\0gbk\0gbl\0gbm\0gbz\0gdb\0gdo\0gdx\0gez\0ggg\0gha\0ghe\0" - "ghr\0ght\0gig\0gin\0gjk\0gju\0gld\0glh\0glk\0gmv\0gmy\0goe\0gof\0" - "gok\0gom\0gon\0got\0gra\0grc\0grt\0gru\0gu\0gvr\0gwc\0gwf\0gwt\0" - "gyo\0gzi\0ha_CM\0ha_SD\0hac\0hak\0har\0haz\0hbo\0hdy\0he\0hi\0" - "hii\0hit\0hkh\0hlb\0hlu\0hmd\0hmj\0hmq\0hnd\0hne\0hnj\0hnj_AU\0" - "hnj_CN\0hnj_FR\0hnj_GF\0hnj_LA\0hnj_MM\0hnj_SR\0hnj_TH\0hnj_VN\0" - "hno\0hoc\0hoh\0hoj\0how\0hoy\0hpo\0hrt\0hrz\0hsn\0hss\0htx\0hut\0" - "huy\0huz\0hy\0hyw\0ii\0imy\0inh\0int\0ior\0iru\0isk\0itk\0itl\0" - "iu\0iw\0ja\0jad\0jat\0jbe\0jbn\0jct\0jda\0jdg\0jdt\0jee\0jge\0" - "ji\0jje\0jkm\0jml\0jna\0jnd\0jnl\0jns\0jog\0jpa\0jpr\0jrb\0jrb_MA\0" - "jul\0jun\0juy\0jya\0jye\0ka\0kaa\0kap\0kaw\0kbd\0kbu\0kby\0kca\0" - "kdq\0kdt\0ket\0kex\0key\0kfa\0kfb\0kfc\0kfd\0kfe\0kfh\0kfi\0kfk\0" - "kfm\0kfp\0kfq\0kfr\0kfs\0kfx\0kfy\0kgj\0kgy\0khb\0khf\0khg\0khn\0" - "kht\0khv\0khw\0kif\0kim\0kip\0kjg\0kjh\0kjl\0kjo\0kjp\0kjt\0kk\0" - "kk_AF\0kk_CN\0kk_IR\0kk_MN\0kkf\0kkh\0kkt\0kle\0klj\0klr\0km\0" - "kmj\0kmz\0kn\0ko\0koi\0kok\0kpt\0kpy\0kqd\0kqy\0kra\0krc\0krk\0" - "krr\0kru\0krv\0ks\0ksu\0ksw\0ksz\0ktb\0ktl\0ktp\0ku_LB\0kuf\0" - "kum\0kv\0kva\0kvq\0kvt\0kvx\0kvy\0kxf\0kxk\0kxm\0kxp\0ky\0ky_CN\0" - "kyu\0kyv\0kyw\0lab\0lad\0lae\0lah\0lbc\0lbe\0lbf\0lbj\0lbm\0lbo\0" - "lbr\0lcp\0lep\0lez\0lhm\0lhs\0lif\0lis\0lkh\0lki\0lmh\0lmn\0lo\0" - "loy\0lpo\0lrc\0lrk\0lrl\0lsa\0lsd\0lss\0luk\0luu\0luv\0luz\0lwl\0" - "lwm\0lya\0lzh\0mag\0mai\0man_GN\0mby\0mde\0mdf\0mdx\0mdy\0mfa\0" - "mfi\0mgp\0mhj\0mid\0mjl\0mjq\0mjr\0mjt\0mju\0mjv\0mjz\0mk\0mkb\0" - "mke\0mki\0mkm\0ml\0mlf\0mn\0mn_CN\0mni\0mnj\0mns\0mnw\0mpz\0mr\0" - "mra\0mrd\0mrj\0mro\0mrr\0ms_CC\0mtm\0mtr\0mud\0muk\0mut\0muv\0" - "muz\0mvf\0mvy\0mvz\0mwr\0mwt\0mww\0my\0mym\0myv\0myz\0mzn\0nan\0" - "nao\0ncd\0ncq\0ndf\0ne\0neg\0neh\0nei\0new\0ngt\0nio\0nit\0niv\0" - "nli\0nlm\0nlx\0nmm\0nnp\0nod\0noe\0nog\0noi\0non\0nos\0npb\0nqo\0" - "nsd\0nsf\0nsk\0nst\0nsv\0nty\0ntz\0nwc\0nwx\0nyl\0nyq\0oaa\0oac\0" - "oar\0oav\0obm\0obr\0odk\0oht\0oj\0ojs\0okm\0oko\0okz\0ola\0ole\0" - "omk\0omp\0omr\0oon\0or\0ort\0oru\0orv\0os\0osa\0osc\0osi\0ota\0" - "otb\0otk\0oty\0pa\0pa_PK\0pal\0paq\0pbt\0pcb\0pce\0pcf\0pcg\0" - "pch\0pci\0pcj\0peg\0peo\0pgd\0pgg\0pgl\0pgn\0phd\0phk\0phl\0phn\0" - "pho\0phr\0pht\0phv\0phw\0pi\0pka\0pkr\0plk\0pll\0pmh\0pnt\0pra\0" - "prc\0prd\0prt\0prx\0ps\0psh\0psi\0pst\0pum\0pwo\0pwr\0pww\0pyx\0" + "aib\0aii\0aij\0ain\0aio\0aiq\0akk\0akv\0alk\0all\0alr\0alt\0alw\0" + "am\0ams\0amw\0ani\0anp\0anq\0anr\0anu\0aot\0apc\0apd\0aph\0aqc\0" + "ar\0arc\0arq\0ars\0ary\0arz\0as\0ase\0ask\0asr\0atn\0atv\0auj\0" + "auz\0av\0avd\0avl\0awa\0awn\0axm\0ayh\0ayl\0ayn\0ayp\0az_IQ\0" + "az_IR\0az_RU\0azb\0ba\0bal\0bap\0bax\0bbl\0bcq\0bdv\0bdz\0be\0" + "bee\0bej\0bfb\0bfq\0bft\0bfu\0bfw\0bfy\0bfz\0bg\0bgc\0bgd\0bgn\0" + "bgp\0bgq\0bgw\0bgx\0bha\0bhb\0bhd\0bhe\0bhh\0bhi\0bhj\0bhm\0bhn\0" + "bho\0bht\0bhu\0biy\0bjf\0bjj\0bjm\0bkk\0blk\0blt\0bmj\0bn\0bns\0" + "bo\0bph\0bpx\0bpy\0bqi\0bra\0brb\0brd\0brh\0brk\0bro\0brv\0brw\0" + "brx\0bsh\0bsk\0bsq\0bst\0btd\0btm\0btv\0bua\0bwe\0bxm\0bxu\0byh\0" + "byn\0byw\0bzi\0cbn\0ccp\0cde\0cdh\0cdi\0cdj\0cdm\0cdo\0cdz\0ce\0" + "cgk\0chg\0chm\0chr\0chx\0cih\0cja\0cji\0cjm\0cjy\0ckb\0ckt\0clh\0" + "clw\0cmg\0cna\0cnp\0cog\0cop\0cpg\0cr\0crh\0crj\0crk\0crl\0crm\0" + "csh\0csp\0csw\0ctd\0ctg\0ctn\0ctt\0cty\0cu\0cuu\0cv\0czh\0czk\0" + "daq\0dar\0dcc\0ddo\0def\0deh\0der\0dgl\0dhi\0dhn\0dho\0dhw\0dka\0" + "dlg\0dmf\0dmk\0dml\0dng\0dnu\0dnv\0doi\0dox\0dre\0drq\0drs\0dry\0" + "dso\0dty\0dub\0duh\0dus\0dv\0dwk\0dwz\0dz\0dzl\0ecr\0ecy\0egy\0" + "eky\0el\0emg\0emu\0enf\0enh\0era\0esg\0esh\0ett\0eve\0evn\0fa\0" + "fay\0faz\0fia\0fmu\0fub\0gan\0gaq\0gas\0gau\0gbj\0gbk\0gbl\0gbm\0" + "gbz\0gdb\0gdo\0gdx\0gez\0ggg\0gha\0ghe\0gho\0ghr\0ght\0gig\0gin\0" + "gjk\0gju\0gld\0glh\0glk\0gml\0gmv\0gmy\0goe\0gof\0goj\0gok\0gon\0" + "got\0gra\0grc\0grt\0gru\0gu\0gvr\0gwc\0gwf\0gwt\0gyo\0gzi\0ha_CM\0" + "ha_SD\0hac\0hak\0har\0haz\0hbo\0hdy\0he\0hi\0hif\0hii\0hit\0hkh\0" + "hlb\0hlu\0hmd\0hmj\0hmq\0hnd\0hne\0hnj\0hno\0hoc\0hoh\0hoj\0how\0" + "hoy\0hpo\0hrt\0hrz\0hsn\0hss\0htx\0hut\0huy\0huz\0hy\0hyw\0ii\0" + "imy\0inh\0int\0ior\0iru\0isk\0itk\0itl\0iu\0iw\0ja\0jad\0jat\0" + "jbe\0jbn\0jct\0jda\0jdg\0jdt\0jee\0jge\0ji\0jje\0jkm\0jml\0jna\0" + "jnd\0jnl\0jns\0jog\0jpa\0jpr\0jrb\0jul\0jun\0juy\0jya\0jye\0ka\0" + "kaa\0kap\0kaw\0kbd\0kbg\0kbu\0kby\0kca\0kcy\0kdq\0kdt\0ket\0kev\0" + "kex\0key\0kfa\0kfb\0kfc\0kfd\0kfe\0kfg\0kfh\0kfi\0kfk\0kfm\0kfp\0" + "kfq\0kfr\0kfs\0kfu\0kfx\0kfy\0kgj\0kgy\0khb\0khf\0khg\0khn\0kho\0" + "kht\0khv\0khw\0kif\0kim\0kip\0kjg\0kjh\0kjl\0kjo\0kjp\0kjt\0kjz\0" + "kk\0kk_AF\0kk_CN\0kk_IR\0kk_MN\0kkf\0kkh\0kkt\0kle\0klj\0klr\0" + "km\0kmj\0kmz\0kn\0knn\0ko\0koi\0kok\0kpt\0kpy\0kqd\0kqy\0kra\0" + "krc\0krk\0krr\0kru\0krv\0ks\0ksu\0ksw\0ksz\0ktb\0kte\0ktl\0ktp\0" + "ku_LB\0kuf\0kum\0kv\0kva\0kvq\0kvt\0kvx\0kvy\0kxf\0kxk\0kxm\0" + "kxp\0ky\0ky_CN\0kyu\0kyv\0kyw\0lab\0lad\0lae\0lah\0lbe\0lbf\0" + "lbj\0lbm\0lbo\0lbr\0lcp\0lep\0lez\0lhm\0lhs\0lif\0lis\0lkh\0lki\0" + "lmh\0lmn\0lo\0loy\0lpo\0lrc\0lrk\0lrl\0lsa\0lsd\0lss\0ltc\0luk\0" + "luu\0luv\0luz\0lwl\0lwm\0lya\0lzh\0mag\0mai\0man_GN\0mby\0mde\0" + "mdf\0mdx\0mdy\0mfa\0mfi\0mga\0mgp\0mhj\0mid\0mjl\0mjq\0mjr\0mjt\0" + "mju\0mjv\0mjz\0mk\0mkb\0mke\0mki\0mkm\0ml\0mlf\0mn\0mn_CN\0mnc\0" + "mni\0mnj\0mns\0mnw\0mpz\0mr\0mra\0mrd\0mrj\0mro\0mrr\0ms_CC\0" + "mtm\0mtr\0mud\0muk\0mut\0muv\0muz\0mve\0mvf\0mvy\0mvz\0mwr\0mwt\0" + "mww\0my\0mym\0myv\0myz\0mzn\0nan\0nao\0ncd\0ncq\0ndf\0ne\0neg\0" + "neh\0nei\0new\0ngt\0nio\0nit\0niv\0nli\0nlm\0nlx\0nmm\0nnp\0nod\0" + "noe\0nog\0noi\0non\0nos\0npb\0nqo\0nrn\0nsd\0nsf\0nsk\0nst\0nsv\0" + "nty\0ntz\0nwc\0nwx\0nyl\0nyq\0nyw\0oaa\0oac\0oar\0oav\0obm\0obr\0" + "odk\0oht\0oj\0ojs\0okm\0oko\0okz\0ola\0ole\0omk\0omp\0omr\0omx\0" + "oon\0or\0ort\0oru\0orv\0os\0osa\0osc\0osi\0ota\0otb\0otk\0oty\0" + "oui\0pa\0pa_PK\0pal\0paq\0pbt\0pcb\0pce\0pcf\0pcg\0pch\0pci\0" + "pcj\0peg\0peo\0pgd\0pgg\0pgl\0pgn\0phd\0phk\0phl\0phn\0pho\0phr\0" + "pht\0phu\0phv\0phw\0pi\0pka\0pkr\0plk\0pll\0pmh\0pnt\0pra\0prc\0" + "prd\0prt\0prx\0ps\0psh\0psi\0pst\0psu\0pum\0pwo\0pwr\0pww\0pyx\0" "qxq\0raa\0rab\0raf\0rah\0raj\0rav\0rbb\0rdb\0rei\0rhg\0rji\0rjs\0" - "rka\0rki\0rkt\0rmi\0rmt\0rmz\0rom_BG\0rsk\0rtw\0ru\0rue\0rut\0" - "rwr\0ryu\0sa\0sah\0sam\0sat\0saz\0sbn\0sbu\0sck\0scl\0scl_IN\0" - "scp\0sct\0scu\0scx\0sd\0sd_IN\0sdb\0sdf\0sdg\0sdh\0sds\0sel\0" - "sfm\0sga\0sgh\0sgj\0sgr\0sgt\0sgw\0sgy\0shd\0shi\0shm\0shn\0shu\0" - "shv\0si\0sia\0sip\0siy\0siz\0sjd\0sjp\0sjt\0skb\0skj\0skr\0smh\0" - "smp\0smu\0smy\0soa\0sog\0soi\0sou\0spt\0spv\0sqo\0sqq\0sqt\0sr\0" - "srb\0srh\0srx\0srz\0ssh\0sss\0sts\0stv\0sty\0suz\0sva\0swb\0swi\0" - "swv\0syc\0syl\0syn\0syr\0syw\0ta\0tab\0taj\0tbk\0tcn\0tco\0tcx\0" - "tcy\0tda\0tdb\0tdd\0tdg\0tdh\0te\0tes\0tg\0tg_PK\0tge\0tgf\0th\0" - "the\0thf\0thi\0thl\0thm\0thq\0thr\0ths\0ti\0tig\0tij\0tin\0tjl\0" - "tjo\0tkb\0tks\0tkt\0tmr\0tnv\0tov\0tpu\0tra\0trg\0trm\0trw\0tsd\0" - "tsj\0tt\0tth\0tto\0tts\0tvn\0twm\0txg\0txo\0tyr\0tyv\0ude\0udg\0" - "udi\0udm\0ug\0ug_KZ\0ug_MN\0uga\0ugh\0ugo\0uk\0uki\0ulc\0unr\0" - "unr_NP\0unx\0ur\0urk\0ush\0uum\0uz_AF\0uz_CN\0uzs\0vaa\0vaf\0" - "vah\0vai\0vas\0vav\0vay\0vgr\0vmd\0vmh\0wal\0wbk\0wbq\0wbr\0wlo\0" - "wme\0wne\0wni\0wsg\0wsv\0wtm\0wuu\0xal\0xan\0xas\0xco\0xcr\0xdq\0" - "xhe\0xhm\0xis\0xka\0xkc\0xkj\0xkp\0xlc\0xld\0xly\0xmf\0xmn\0xmr\0" - "xna\0xnr\0xpg\0xpi\0xpm\0xpr\0xrm\0xrn\0xsa\0xsr\0xub\0xuj\0xve\0" - "xvi\0xwo\0xzh\0yai\0ybh\0ybi\0ydg\0yea\0yej\0yeu\0ygp\0yhd\0yi\0" - "yig\0yih\0yiv\0ykg\0yna\0ynk\0yoi\0yoy\0yrk\0ysd\0ysn\0ysp\0ysr\0" - "ysy\0yud\0yue\0yue_CN\0yug\0yux\0ywq\0ywu\0zau\0zba\0zch\0zdj\0" - "zeh\0zen\0zgb\0zgh\0zgm\0zgn\0zh\0zh_AU\0zh_BN\0zh_GB\0zh_GF\0" - "zh_HK\0zh_ID\0zh_MO\0zh_PA\0zh_PF\0zh_PH\0zh_SR\0zh_TH\0zh_TW\0" - "zh_US\0zh_VN\0zhd\0zhx\0zko\0zkt\0zkz\0zlj\0zln\0zlq\0zqe\0zrp\0" - "zum\0zyg\0zyn\0zzj\0"; + "rka\0rki\0rkt\0rmi\0rmt\0rmz\0rsk\0rtw\0ru\0rue\0rut\0rwr\0ryu\0" + "sa\0sah\0sam\0sat\0saz\0sbn\0sbu\0sck\0scl\0scp\0sct\0scu\0scx\0" + "sd\0sd_IN\0sdb\0sdf\0sdg\0sdh\0sdr\0sds\0sel\0sfm\0sga\0sgh\0" + "sgj\0sgr\0sgt\0sgw\0sgy\0shd\0shi\0shm\0shn\0shu\0shv\0si\0sia\0" + "sip\0siy\0siz\0sjd\0sjp\0sjt\0skb\0skj\0skr\0smh\0smp\0smu\0smy\0" + "soa\0sog\0soi\0sou\0spt\0spv\0sqo\0sqq\0sqt\0sr\0srb\0srh\0srx\0" + "srz\0ssh\0sss\0sts\0stv\0sty\0suz\0sva\0swb\0swi\0swv\0sxu\0syc\0" + "syl\0syn\0syr\0syw\0ta\0tab\0taj\0tbk\0tcn\0tco\0tcx\0tcy\0tda\0" + "tdb\0tdd\0tdg\0tdh\0te\0tes\0tg\0tg_PK\0tge\0tgf\0th\0the\0thf\0" + "thi\0thl\0thm\0thq\0thr\0ths\0ti\0tig\0tij\0tin\0tjl\0tjo\0tkb\0" + "tks\0tkt\0tmr\0tnv\0tov\0tpu\0tra\0trg\0trm\0trw\0tsd\0tsj\0tt\0" + "tth\0tto\0tts\0ttz\0tvn\0twm\0txg\0txo\0tyr\0tyv\0ude\0udg\0udi\0" + "udm\0ug\0ug_KZ\0ug_MN\0uga\0ugh\0ugo\0uk\0uki\0ulc\0unr\0unr_NP\0" + "unx\0ur\0urk\0ush\0uum\0uz_AF\0uz_CN\0uzs\0vaa\0vaf\0vah\0vai\0" + "vas\0vav\0vay\0vgr\0vjk\0vmd\0vmh\0wal\0wbk\0wbq\0wbr\0wle\0wlo\0" + "wme\0wne\0wni\0wsg\0wsv\0wtm\0wuu\0xag\0xal\0xan\0xas\0xco\0xcr\0" + "xdq\0xhe\0xhm\0xis\0xka\0xkc\0xkf\0xkj\0xkp\0xlc\0xld\0xly\0xmf\0" + "xmn\0xmr\0xna\0xnr\0xpg\0xpi\0xpm\0xpr\0xrm\0xrn\0xsa\0xsr\0xtq\0" + "xub\0xuj\0xve\0xvi\0xwo\0xzh\0yai\0ybh\0ybi\0ydg\0yea\0yej\0yeu\0" + "ygp\0yhd\0yi\0yig\0yih\0yiv\0ykg\0ykh\0yna\0ynk\0yoi\0yoy\0yrk\0" + "ysd\0ysn\0ysp\0ysr\0ysy\0yud\0yue\0yue_CN\0yug\0yux\0ywq\0ywu\0" + "zau\0zba\0zch\0zdj\0zeh\0zen\0zgb\0zgh\0zgm\0zgn\0zh\0zh_AU\0" + "zh_BN\0zh_GB\0zh_GF\0zh_HK\0zh_ID\0zh_MO\0zh_PA\0zh_PF\0zh_PH\0" + "zh_SR\0zh_TH\0zh_TW\0zh_US\0zh_VN\0zhd\0zhx\0zko\0zkt\0zkz\0zlj\0" + "zln\0zlq\0zqe\0zrg\0zrp\0zum\0zwa\0zyg\0zyn\0zzj\0"; const int32_t defaultScriptTable[] = { - 0, 320, // aaf -> Mlym + 0, 330, // aaf -> Mlym 4, 10, // aao -> Arab 8, 150, // aat -> Grek 12, 100, // ab -> Cyrl 15, 10, // abh -> Arab - 19, 420, // abl -> Rjng + 19, 435, // abl -> Rjng 23, 10, // abv -> Arab 27, 10, // acm -> Arab 31, 10, // acq -> Arab 35, 10, // acw -> Arab 39, 10, // acx -> Arab 43, 10, // adf -> Arab - 47, 535, // adx -> Tibt + 47, 555, // adx -> Tibt 51, 100, // ady -> Cyrl 55, 25, // ae -> Avst 58, 10, // aeb -> Arab @@ -134,994 +135,1022 @@ const int32_t defaultScriptTable[] = { 94, 5, // aho -> Ahom 98, 105, // ahr -> Deva 102, 10, // aib -> Arab - 106, 185, // aij -> Hebr - 110, 220, // ain -> Kana - 114, 345, // aio -> Mymr - 118, 10, // aiq -> Arab - 122, 570, // akk -> Xsux - 126, 100, // akv -> Cyrl - 130, 260, // alk -> Laoo - 134, 320, // all -> Mlym - 138, 100, // alr -> Cyrl - 142, 100, // alt -> Cyrl - 146, 120, // alw -> Ethi - 150, 120, // am -> Ethi - 153, 210, // ams -> Jpan - 157, 475, // amw -> Syrc - 161, 100, // ani -> Cyrl - 165, 105, // anp -> Deva - 169, 105, // anr -> Deva - 173, 120, // anu -> Ethi - 177, 45, // aot -> Beng - 181, 10, // apc -> Arab - 185, 10, // apd -> Arab - 189, 105, // aph -> Deva - 193, 100, // aqc -> Cyrl - 197, 10, // ar -> Arab - 200, 15, // arc -> Armi - 204, 10, // arq -> Arab - 208, 10, // ars -> Arab - 212, 10, // ary -> Arab - 216, 10, // arz -> Arab - 220, 45, // as -> Beng - 223, 450, // ase -> Sgnw - 227, 10, // ask -> Arab - 231, 10, // atn -> Arab - 235, 100, // atv -> Cyrl - 239, 10, // auj -> Arab - 243, 10, // auz -> Arab - 247, 100, // av -> Cyrl - 250, 10, // avd -> Arab - 254, 10, // avl -> Arab - 258, 105, // awa -> Deva - 262, 120, // awn -> Ethi - 266, 20, // axm -> Armn - 270, 10, // ayh -> Arab - 274, 10, // ayl -> Arab - 278, 10, // ayn -> Arab - 282, 10, // ayp -> Arab - 286, 10, // az_IQ -> Arab - 292, 10, // az_IR -> Arab - 298, 100, // az_RU -> Cyrl - 304, 10, // azb -> Arab - 308, 100, // ba -> Cyrl - 311, 10, // bal -> Arab - 315, 105, // bap -> Deva - 319, 30, // bax -> Bamu - 323, 125, // bbl -> Geor - 327, 120, // bcq -> Ethi - 331, 385, // bdv -> Orya - 335, 10, // bdz -> Arab - 339, 100, // be -> Cyrl - 342, 105, // bee -> Deva - 346, 10, // bej -> Arab - 350, 105, // bfb -> Deva - 354, 500, // bfq -> Taml - 358, 10, // bft -> Arab - 362, 535, // bfu -> Tibt - 366, 385, // bfw -> Orya - 370, 105, // bfy -> Deva - 374, 105, // bfz -> Deva - 378, 100, // bg -> Cyrl - 381, 105, // bgc -> Deva - 385, 105, // bgd -> Deva - 389, 10, // bgn -> Arab - 393, 10, // bgp -> Arab - 397, 105, // bgq -> Deva - 401, 105, // bgw -> Deva - 405, 150, // bgx -> Grek - 409, 105, // bha -> Deva - 413, 105, // bhb -> Deva - 417, 105, // bhd -> Deva - 421, 10, // bhe -> Arab - 425, 100, // bhh -> Cyrl - 429, 105, // bhi -> Deva - 433, 105, // bhj -> Deva - 437, 10, // bhm -> Arab - 441, 475, // bhn -> Syrc - 445, 105, // bho -> Deva - 449, 485, // bht -> Takr - 453, 105, // bhu -> Deva - 457, 105, // biy -> Deva - 461, 475, // bjf -> Syrc - 465, 105, // bjj -> Deva - 469, 10, // bjm -> Arab - 473, 345, // blk -> Mymr - 477, 510, // blt -> Tavt - 481, 105, // bmj -> Deva - 485, 45, // bn -> Beng - 488, 105, // bns -> Deva - 492, 535, // bo -> Tibt - 495, 100, // bph -> Cyrl - 499, 105, // bpx -> Deva - 503, 45, // bpy -> Beng - 507, 10, // bqi -> Arab - 511, 105, // bra -> Deva - 515, 235, // brb -> Khmr - 519, 105, // brd -> Deva - 523, 10, // brh -> Arab - 527, 10, // brk -> Arab - 531, 260, // brv -> Laoo - 535, 105, // brx -> Deva - 539, 10, // bsh -> Arab - 543, 10, // bsk -> Arab - 547, 35, // bsq -> Bass - 551, 120, // bst -> Ethi - 555, 40, // btd -> Batk - 559, 40, // btm -> Batk - 563, 105, // btv -> Deva - 567, 100, // bua -> Cyrl - 571, 345, // bwe -> Mymr - 575, 100, // bxm -> Cyrl - 579, 330, // bxu -> Mong - 583, 105, // byh -> Deva - 587, 120, // byn -> Ethi - 591, 105, // byw -> Deva - 595, 530, // bzi -> Thai - 599, 530, // cbn -> Thai - 603, 60, // ccp -> Cakm - 607, 515, // cde -> Telu - 611, 105, // cdh -> Deva - 615, 155, // cdi -> Gujr - 619, 105, // cdj -> Deva - 623, 105, // cdm -> Deva - 627, 175, // cdo -> Hans - 631, 45, // cdz -> Beng - 635, 100, // ce -> Cyrl - 638, 535, // cgk -> Tibt - 642, 10, // chg -> Arab - 646, 100, // chm -> Cyrl - 650, 80, // chr -> Cher - 654, 105, // chx -> Deva - 658, 105, // cih -> Deva - 662, 10, // cja -> Arab - 666, 100, // cji -> Cyrl - 670, 75, // cjm -> Cham - 674, 175, // cjy -> Hans - 678, 10, // ckb -> Arab - 682, 100, // ckt -> Cyrl - 686, 10, // clh -> Arab - 690, 100, // clw -> Cyrl - 694, 470, // cmg -> Soyo - 698, 535, // cna -> Tibt - 702, 175, // cnp -> Hans - 706, 530, // cog -> Thai - 710, 90, // cop -> Copt - 714, 150, // cpg -> Grek - 718, 65, // cr -> Cans - 721, 100, // crh -> Cyrl - 725, 65, // crj -> Cans - 729, 65, // crk -> Cans - 733, 65, // crl -> Cans - 737, 65, // crm -> Cans - 741, 345, // csh -> Mymr - 745, 175, // csp -> Hans - 749, 65, // csw -> Cans - 753, 395, // ctd -> Pauc - 757, 45, // ctg -> Beng - 761, 105, // ctn -> Deva - 765, 500, // ctt -> Taml - 769, 100, // cu -> Cyrl - 772, 255, // cuu -> Lana - 776, 100, // cv -> Cyrl - 779, 175, // czh -> Hans - 783, 185, // czk -> Hebr - 787, 105, // daq -> Deva - 791, 100, // dar -> Cyrl - 795, 10, // dcc -> Arab - 799, 100, // ddo -> Cyrl - 803, 10, // def -> Arab - 807, 10, // deh -> Arab - 811, 45, // der -> Beng - 815, 105, // dhi -> Deva - 819, 155, // dhn -> Gujr - 823, 105, // dho -> Deva - 827, 105, // dhw -> Deva - 831, 535, // dka -> Tibt - 835, 100, // dlg -> Cyrl - 839, 310, // dmf -> Medf - 843, 10, // dmk -> Arab - 847, 10, // dml -> Arab - 851, 100, // dng -> Cyrl - 855, 345, // dnu -> Mymr - 859, 345, // dnv -> Mymr - 863, 105, // doi -> Deva - 867, 120, // dox -> Ethi - 871, 535, // dre -> Tibt - 875, 105, // drq -> Deva - 879, 120, // drs -> Ethi - 883, 105, // dry -> Deva - 887, 385, // dso -> Orya - 891, 105, // dty -> Deva - 895, 155, // dub -> Gujr - 899, 105, // duh -> Deva - 903, 105, // dus -> Deva - 907, 525, // dv -> Thaa - 910, 385, // dwk -> Orya - 914, 105, // dwz -> Deva - 918, 535, // dz -> Tibt - 921, 535, // dzl -> Tibt - 925, 150, // ecr -> Grek - 929, 95, // ecy -> Cprt - 933, 110, // egy -> Egyp - 937, 215, // eky -> Kali - 941, 150, // el -> Grek - 944, 105, // emg -> Deva - 948, 105, // emu -> Deva - 952, 100, // enf -> Cyrl - 956, 100, // enh -> Cyrl - 960, 500, // era -> Taml - 964, 135, // esg -> Gonm - 968, 10, // esh -> Arab - 972, 200, // ett -> Ital - 976, 100, // eve -> Cyrl - 980, 100, // evn -> Cyrl - 984, 10, // fa -> Arab - 987, 10, // fay -> Arab - 991, 10, // faz -> Arab - 995, 10, // fia -> Arab - 999, 105, // fmu -> Deva - 1003, 10, // fub -> Arab - 1007, 175, // gan -> Hans - 1011, 385, // gaq -> Orya - 1015, 155, // gas -> Gujr - 1019, 515, // gau -> Telu - 1023, 385, // gbj -> Orya - 1027, 105, // gbk -> Deva - 1031, 155, // gbl -> Gujr - 1035, 105, // gbm -> Deva - 1039, 10, // gbz -> Arab - 1043, 385, // gdb -> Orya - 1047, 100, // gdo -> Cyrl - 1051, 105, // gdx -> Deva - 1055, 120, // gez -> Ethi - 1059, 10, // ggg -> Arab - 1063, 10, // gha -> Arab - 1067, 105, // ghe -> Deva - 1071, 10, // ghr -> Arab - 1075, 535, // ght -> Tibt - 1079, 10, // gig -> Arab - 1083, 100, // gin -> Cyrl - 1087, 10, // gjk -> Arab - 1091, 10, // gju -> Arab - 1095, 100, // gld -> Cyrl - 1099, 10, // glh -> Arab - 1103, 10, // glk -> Arab - 1107, 120, // gmv -> Ethi - 1111, 275, // gmy -> Linb - 1115, 535, // goe -> Tibt - 1119, 120, // gof -> Ethi - 1123, 105, // gok -> Deva - 1127, 105, // gom -> Deva - 1131, 515, // gon -> Telu - 1135, 140, // got -> Goth - 1139, 105, // gra -> Deva - 1143, 95, // grc -> Cprt - 1147, 45, // grt -> Beng - 1151, 120, // gru -> Ethi - 1155, 155, // gu -> Gujr - 1158, 105, // gvr -> Deva - 1162, 10, // gwc -> Arab - 1166, 10, // gwf -> Arab - 1170, 10, // gwt -> Arab - 1174, 105, // gyo -> Deva - 1178, 10, // gzi -> Arab - 1182, 10, // ha_CM -> Arab - 1188, 10, // ha_SD -> Arab - 1194, 10, // hac -> Arab - 1198, 175, // hak -> Hans - 1202, 120, // har -> Ethi - 1206, 10, // haz -> Arab - 1210, 185, // hbo -> Hebr - 1214, 120, // hdy -> Ethi - 1218, 185, // he -> Hebr - 1221, 105, // hi -> Deva - 1224, 485, // hii -> Takr - 1228, 570, // hit -> Xsux - 1232, 10, // hkh -> Arab - 1236, 105, // hlb -> Deva - 1240, 190, // hlu -> Hluw - 1244, 410, // hmd -> Plrd - 1248, 50, // hmj -> Bopo - 1252, 50, // hmq -> Bopo - 1256, 10, // hnd -> Arab - 1260, 105, // hne -> Deva - 1264, 195, // hnj -> Hmnp - 1268, 260, // hnj_AU -> Laoo - 1275, 260, // hnj_CN -> Laoo - 1282, 260, // hnj_FR -> Laoo - 1289, 260, // hnj_GF -> Laoo - 1296, 260, // hnj_LA -> Laoo - 1303, 260, // hnj_MM -> Laoo - 1310, 260, // hnj_SR -> Laoo - 1317, 260, // hnj_TH -> Laoo - 1324, 260, // hnj_VN -> Laoo - 1331, 10, // hno -> Arab - 1335, 105, // hoc -> Deva - 1339, 10, // hoh -> Arab - 1343, 105, // hoj -> Deva - 1347, 170, // how -> Hani - 1351, 105, // hoy -> Deva - 1355, 345, // hpo -> Mymr - 1359, 475, // hrt -> Syrc - 1363, 10, // hrz -> Arab - 1367, 175, // hsn -> Hans - 1371, 10, // hss -> Arab - 1375, 570, // htx -> Xsux - 1379, 105, // hut -> Deva - 1383, 185, // huy -> Hebr - 1387, 100, // huz -> Cyrl - 1391, 20, // hy -> Armn - 1394, 20, // hyw -> Armn - 1398, 575, // ii -> Yiii - 1401, 285, // imy -> Lyci - 1405, 100, // inh -> Cyrl - 1409, 345, // int -> Mymr - 1413, 120, // ior -> Ethi - 1417, 500, // iru -> Taml - 1421, 10, // isk -> Arab - 1425, 185, // itk -> Hebr - 1429, 100, // itl -> Cyrl - 1433, 65, // iu -> Cans - 1436, 185, // iw -> Hebr - 1439, 210, // ja -> Jpan - 1442, 10, // jad -> Arab - 1446, 10, // jat -> Arab - 1450, 185, // jbe -> Hebr - 1454, 10, // jbn -> Arab - 1458, 100, // jct -> Cyrl - 1462, 535, // jda -> Tibt - 1466, 10, // jdg -> Arab - 1470, 100, // jdt -> Cyrl - 1474, 105, // jee -> Deva - 1478, 125, // jge -> Geor - 1482, 185, // ji -> Hebr - 1485, 165, // jje -> Hang - 1489, 345, // jkm -> Mymr - 1493, 105, // jml -> Deva - 1497, 485, // jna -> Takr - 1501, 10, // jnd -> Arab - 1505, 105, // jnl -> Deva - 1509, 105, // jns -> Deva - 1513, 10, // jog -> Arab - 1517, 185, // jpa -> Hebr - 1521, 185, // jpr -> Hebr - 1525, 185, // jrb -> Hebr - 1529, 10, // jrb_MA -> Arab - 1536, 105, // jul -> Deva - 1540, 385, // jun -> Orya - 1544, 385, // juy -> Orya - 1548, 535, // jya -> Tibt - 1552, 185, // jye -> Hebr - 1556, 125, // ka -> Geor - 1559, 100, // kaa -> Cyrl - 1563, 100, // kap -> Cyrl - 1567, 225, // kaw -> Kawi - 1571, 100, // kbd -> Cyrl - 1575, 10, // kbu -> Arab - 1579, 10, // kby -> Arab - 1583, 100, // kca -> Cyrl - 1587, 45, // kdq -> Beng - 1591, 530, // kdt -> Thai - 1595, 100, // ket -> Cyrl - 1599, 105, // kex -> Deva - 1603, 515, // key -> Telu - 1607, 245, // kfa -> Knda - 1611, 105, // kfb -> Deva - 1615, 515, // kfc -> Telu - 1619, 245, // kfd -> Knda - 1623, 500, // kfe -> Taml - 1627, 320, // kfh -> Mlym - 1631, 500, // kfi -> Taml - 1635, 105, // kfk -> Deva - 1639, 10, // kfm -> Arab - 1643, 105, // kfp -> Deva - 1647, 105, // kfq -> Deva - 1651, 105, // kfr -> Deva - 1655, 105, // kfs -> Deva - 1659, 105, // kfx -> Deva - 1663, 105, // kfy -> Deva - 1667, 105, // kgj -> Deva - 1671, 105, // kgy -> Deva - 1675, 495, // khb -> Talu - 1679, 530, // khf -> Thai - 1683, 535, // khg -> Tibt - 1687, 105, // khn -> Deva - 1691, 345, // kht -> Mymr - 1695, 100, // khv -> Cyrl - 1699, 10, // khw -> Arab - 1703, 105, // kif -> Deva - 1707, 100, // kim -> Cyrl - 1711, 105, // kip -> Deva - 1715, 260, // kjg -> Laoo - 1719, 100, // kjh -> Cyrl - 1723, 105, // kjl -> Deva - 1727, 105, // kjo -> Deva - 1731, 345, // kjp -> Mymr - 1735, 530, // kjt -> Thai - 1739, 100, // kk -> Cyrl - 1742, 10, // kk_AF -> Arab - 1748, 10, // kk_CN -> Arab - 1754, 10, // kk_IR -> Arab - 1760, 10, // kk_MN -> Arab - 1766, 535, // kkf -> Tibt - 1770, 255, // kkh -> Lana - 1774, 105, // kkt -> Deva - 1778, 105, // kle -> Deva - 1782, 10, // klj -> Arab - 1786, 105, // klr -> Deva - 1790, 235, // km -> Khmr - 1793, 105, // kmj -> Deva - 1797, 10, // kmz -> Arab - 1801, 245, // kn -> Knda - 1804, 250, // ko -> Kore - 1807, 100, // koi -> Cyrl - 1811, 105, // kok -> Deva - 1815, 100, // kpt -> Cyrl - 1819, 100, // kpy -> Cyrl - 1823, 475, // kqd -> Syrc - 1827, 120, // kqy -> Ethi - 1831, 105, // kra -> Deva - 1835, 100, // krc -> Cyrl - 1839, 100, // krk -> Cyrl - 1843, 235, // krr -> Khmr - 1847, 105, // kru -> Deva - 1851, 235, // krv -> Khmr - 1855, 10, // ks -> Arab - 1858, 345, // ksu -> Mymr - 1862, 345, // ksw -> Mymr - 1866, 105, // ksz -> Deva - 1870, 120, // ktb -> Ethi - 1874, 10, // ktl -> Arab - 1878, 410, // ktp -> Plrd - 1882, 10, // ku_LB -> Arab - 1888, 260, // kuf -> Laoo - 1892, 100, // kum -> Cyrl - 1896, 100, // kv -> Cyrl - 1899, 100, // kva -> Cyrl - 1903, 345, // kvq -> Mymr - 1907, 345, // kvt -> Mymr - 1911, 10, // kvx -> Arab - 1915, 215, // kvy -> Kali - 1919, 345, // kxf -> Mymr - 1923, 345, // kxk -> Mymr - 1927, 530, // kxm -> Thai - 1931, 10, // kxp -> Arab - 1935, 100, // ky -> Cyrl - 1938, 10, // ky_CN -> Arab - 1944, 215, // kyu -> Kali - 1948, 105, // kyv -> Deva - 1952, 105, // kyw -> Deva - 1956, 270, // lab -> Lina - 1960, 185, // lad -> Hebr - 1964, 105, // lae -> Deva - 1968, 10, // lah -> Arab - 1972, 280, // lbc -> Lisu - 1976, 100, // lbe -> Cyrl - 1980, 105, // lbf -> Deva - 1984, 535, // lbj -> Tibt - 1988, 105, // lbm -> Deva - 1992, 260, // lbo -> Laoo - 1996, 105, // lbr -> Deva - 2000, 530, // lcp -> Thai - 2004, 265, // lep -> Lepc - 2008, 100, // lez -> Cyrl - 2012, 105, // lhm -> Deva - 2016, 475, // lhs -> Syrc - 2020, 105, // lif -> Deva - 2024, 280, // lis -> Lisu - 2028, 535, // lkh -> Tibt - 2032, 10, // lki -> Arab - 2036, 105, // lmh -> Deva - 2040, 515, // lmn -> Telu - 2044, 260, // lo -> Laoo - 2047, 105, // loy -> Deva - 2051, 410, // lpo -> Plrd - 2055, 10, // lrc -> Arab - 2059, 10, // lrk -> Arab - 2063, 10, // lrl -> Arab - 2067, 10, // lsa -> Arab - 2071, 185, // lsd -> Hebr - 2075, 10, // lss -> Arab - 2079, 535, // luk -> Tibt - 2083, 105, // luu -> Deva - 2087, 10, // luv -> Arab - 2091, 10, // luz -> Arab - 2095, 530, // lwl -> Thai - 2099, 530, // lwm -> Thai - 2103, 535, // lya -> Tibt - 2107, 175, // lzh -> Hans - 2111, 105, // mag -> Deva - 2115, 105, // mai -> Deva - 2119, 360, // man_GN -> Nkoo - 2126, 10, // mby -> Arab - 2130, 10, // mde -> Arab - 2134, 100, // mdf -> Cyrl - 2138, 120, // mdx -> Ethi - 2142, 120, // mdy -> Ethi - 2146, 10, // mfa -> Arab - 2150, 10, // mfi -> Arab - 2154, 105, // mgp -> Deva - 2158, 10, // mhj -> Arab - 2162, 295, // mid -> Mand - 2166, 105, // mjl -> Deva - 2170, 320, // mjq -> Mlym - 2174, 320, // mjr -> Mlym - 2178, 105, // mjt -> Deva - 2182, 515, // mju -> Telu - 2186, 320, // mjv -> Mlym - 2190, 105, // mjz -> Deva - 2194, 100, // mk -> Cyrl - 2197, 105, // mkb -> Deva - 2201, 105, // mke -> Deva - 2205, 10, // mki -> Arab - 2209, 530, // mkm -> Thai - 2213, 320, // ml -> Mlym - 2216, 530, // mlf -> Thai - 2220, 100, // mn -> Cyrl - 2223, 330, // mn_CN -> Mong - 2229, 45, // mni -> Beng - 2233, 10, // mnj -> Arab - 2237, 100, // mns -> Cyrl - 2241, 345, // mnw -> Mymr - 2245, 530, // mpz -> Thai - 2249, 105, // mr -> Deva - 2252, 530, // mra -> Thai - 2256, 105, // mrd -> Deva - 2260, 100, // mrj -> Cyrl - 2264, 335, // mro -> Mroo - 2268, 105, // mrr -> Deva - 2272, 10, // ms_CC -> Arab - 2278, 100, // mtm -> Cyrl - 2282, 105, // mtr -> Deva - 2286, 100, // mud -> Cyrl - 2290, 535, // muk -> Tibt - 2294, 105, // mut -> Deva - 2298, 500, // muv -> Taml - 2302, 120, // muz -> Ethi - 2306, 330, // mvf -> Mong - 2310, 10, // mvy -> Arab - 2314, 120, // mvz -> Ethi - 2318, 105, // mwr -> Deva - 2322, 345, // mwt -> Mymr - 2326, 195, // mww -> Hmnp - 2330, 345, // my -> Mymr - 2333, 120, // mym -> Ethi - 2337, 100, // myv -> Cyrl - 2341, 295, // myz -> Mand - 2345, 10, // mzn -> Arab - 2349, 175, // nan -> Hans - 2353, 105, // nao -> Deva - 2357, 105, // ncd -> Deva - 2361, 260, // ncq -> Laoo - 2365, 100, // ndf -> Cyrl - 2369, 105, // ne -> Deva - 2372, 100, // neg -> Cyrl - 2376, 535, // neh -> Tibt - 2380, 570, // nei -> Xsux - 2384, 105, // new -> Deva - 2388, 260, // ngt -> Laoo - 2392, 100, // nio -> Cyrl - 2396, 515, // nit -> Telu - 2400, 100, // niv -> Cyrl - 2404, 10, // nli -> Arab - 2408, 10, // nlm -> Arab - 2412, 105, // nlx -> Deva - 2416, 105, // nmm -> Deva - 2420, 560, // nnp -> Wcho - 2424, 255, // nod -> Lana - 2428, 105, // noe -> Deva - 2432, 100, // nog -> Cyrl - 2436, 105, // noi -> Deva - 2440, 430, // non -> Runr - 2444, 575, // nos -> Yiii - 2448, 535, // npb -> Tibt - 2452, 360, // nqo -> Nkoo - 2456, 575, // nsd -> Yiii - 2460, 575, // nsf -> Yiii - 2464, 65, // nsk -> Cans - 2468, 540, // nst -> Tnsa - 2472, 575, // nsv -> Yiii - 2476, 575, // nty -> Yiii - 2480, 10, // ntz -> Arab - 2484, 355, // nwc -> Newa - 2488, 105, // nwx -> Deva - 2492, 530, // nyl -> Thai - 2496, 10, // nyq -> Arab - 2500, 100, // oaa -> Cyrl - 2504, 100, // oac -> Cyrl - 2508, 475, // oar -> Syrc - 2512, 125, // oav -> Geor - 2516, 405, // obm -> Phnx - 2520, 345, // obr -> Mymr - 2524, 10, // odk -> Arab - 2528, 570, // oht -> Xsux - 2532, 65, // oj -> Cans - 2535, 65, // ojs -> Cans - 2539, 165, // okm -> Hang - 2543, 170, // oko -> Hani - 2547, 235, // okz -> Khmr - 2551, 105, // ola -> Deva - 2555, 535, // ole -> Tibt - 2559, 100, // omk -> Cyrl - 2563, 340, // omp -> Mtei - 2567, 325, // omr -> Modi - 2571, 105, // oon -> Deva - 2575, 385, // or -> Orya - 2578, 515, // ort -> Telu - 2582, 10, // oru -> Arab - 2586, 100, // orv -> Cyrl - 2590, 100, // os -> Cyrl - 2593, 390, // osa -> Osge - 2597, 200, // osc -> Ital - 2601, 205, // osi -> Java - 2605, 10, // ota -> Arab - 2609, 535, // otb -> Tibt - 2613, 380, // otk -> Orkh - 2617, 145, // oty -> Gran - 2621, 160, // pa -> Guru - 2624, 10, // pa_PK -> Arab - 2630, 400, // pal -> Phli - 2634, 100, // paq -> Cyrl - 2638, 10, // pbt -> Arab - 2642, 235, // pcb -> Khmr - 2646, 345, // pce -> Mymr - 2650, 320, // pcf -> Mlym - 2654, 320, // pcg -> Mlym - 2658, 105, // pch -> Deva - 2662, 105, // pci -> Deva - 2666, 515, // pcj -> Telu - 2670, 385, // peg -> Orya - 2674, 565, // peo -> Xpeo - 2678, 230, // pgd -> Khar - 2682, 105, // pgg -> Deva - 2686, 370, // pgl -> Ogam - 2690, 200, // pgn -> Ital - 2694, 105, // phd -> Deva - 2698, 345, // phk -> Mymr - 2702, 10, // phl -> Arab - 2706, 405, // phn -> Phnx - 2710, 260, // pho -> Laoo - 2714, 10, // phr -> Arab - 2718, 530, // pht -> Thai - 2722, 10, // phv -> Arab - 2726, 105, // phw -> Deva - 2730, 455, // pi -> Sinh - 2733, 55, // pka -> Brah - 2737, 320, // pkr -> Mlym - 2741, 10, // plk -> Arab - 2745, 345, // pll -> Mymr - 2749, 55, // pmh -> Brah - 2753, 150, // pnt -> Grek - 2757, 230, // pra -> Khar - 2761, 10, // prc -> Arab - 2765, 10, // prd -> Arab - 2769, 530, // prt -> Thai - 2773, 10, // prx -> Arab - 2777, 10, // ps -> Arab - 2780, 10, // psh -> Arab - 2784, 10, // psi -> Arab - 2788, 10, // pst -> Arab - 2792, 105, // pum -> Deva - 2796, 345, // pwo -> Mymr - 2800, 105, // pwr -> Deva - 2804, 530, // pww -> Thai - 2808, 345, // pyx -> Mymr - 2812, 10, // qxq -> Arab - 2816, 105, // raa -> Deva - 2820, 105, // rab -> Deva - 2824, 105, // raf -> Deva - 2828, 45, // rah -> Beng - 2832, 105, // raj -> Deva - 2836, 105, // rav -> Deva - 2840, 345, // rbb -> Mymr - 2844, 10, // rdb -> Arab - 2848, 385, // rei -> Orya - 2852, 425, // rhg -> Rohg - 2856, 105, // rji -> Deva - 2860, 105, // rjs -> Deva - 2864, 235, // rka -> Khmr - 2868, 345, // rki -> Mymr - 2872, 45, // rkt -> Beng - 2876, 20, // rmi -> Armn - 2880, 10, // rmt -> Arab - 2884, 345, // rmz -> Mymr - 2888, 100, // rom_BG -> Cyrl - 2895, 100, // rsk -> Cyrl - 2899, 105, // rtw -> Deva - 2903, 100, // ru -> Cyrl - 2906, 100, // rue -> Cyrl - 2910, 100, // rut -> Cyrl - 2914, 105, // rwr -> Deva - 2918, 220, // ryu -> Kana - 2922, 105, // sa -> Deva - 2925, 100, // sah -> Cyrl - 2929, 435, // sam -> Samr - 2933, 375, // sat -> Olck - 2937, 445, // saz -> Saur - 2941, 10, // sbn -> Arab - 2945, 535, // sbu -> Tibt - 2949, 105, // sck -> Deva - 2953, 10, // scl -> Arab - 2957, 10, // scl_IN -> Arab - 2964, 105, // scp -> Deva - 2968, 260, // sct -> Laoo - 2972, 485, // scu -> Takr - 2976, 150, // scx -> Grek - 2980, 10, // sd -> Arab - 2983, 105, // sd_IN -> Deva - 2989, 10, // sdb -> Arab - 2993, 10, // sdf -> Arab - 2997, 10, // sdg -> Arab - 3001, 10, // sdh -> Arab - 3005, 10, // sds -> Arab - 3009, 100, // sel -> Cyrl - 3013, 410, // sfm -> Plrd - 3017, 370, // sga -> Ogam - 3021, 100, // sgh -> Cyrl - 3025, 105, // sgj -> Deva - 3029, 10, // sgr -> Arab - 3033, 535, // sgt -> Tibt - 3037, 120, // sgw -> Ethi - 3041, 10, // sgy -> Arab - 3045, 10, // shd -> Arab - 3049, 520, // shi -> Tfng - 3053, 10, // shm -> Arab - 3057, 345, // shn -> Mymr - 3061, 10, // shu -> Arab - 3065, 10, // shv -> Arab - 3069, 455, // si -> Sinh - 3072, 100, // sia -> Cyrl - 3076, 535, // sip -> Tibt - 3080, 10, // siy -> Arab - 3084, 10, // siz -> Arab - 3088, 100, // sjd -> Cyrl - 3092, 105, // sjp -> Deva - 3096, 100, // sjt -> Cyrl - 3100, 530, // skb -> Thai - 3104, 105, // skj -> Deva - 3108, 10, // skr -> Arab - 3112, 575, // smh -> Yiii - 3116, 435, // smp -> Samr - 3120, 235, // smu -> Khmr - 3124, 10, // smy -> Arab - 3128, 510, // soa -> Tavt - 3132, 460, // sog -> Sogd - 3136, 105, // soi -> Deva - 3140, 530, // sou -> Thai - 3144, 535, // spt -> Tibt - 3148, 385, // spv -> Orya - 3152, 10, // sqo -> Arab - 3156, 260, // sqq -> Laoo - 3160, 10, // sqt -> Arab - 3164, 100, // sr -> Cyrl - 3167, 465, // srb -> Sora - 3171, 10, // srh -> Arab - 3175, 105, // srx -> Deva - 3179, 10, // srz -> Arab - 3183, 10, // ssh -> Arab - 3187, 260, // sss -> Laoo - 3191, 10, // sts -> Arab - 3195, 120, // stv -> Ethi - 3199, 100, // sty -> Cyrl - 3203, 105, // suz -> Deva - 3207, 125, // sva -> Geor - 3211, 10, // swb -> Arab - 3215, 170, // swi -> Hani - 3219, 105, // swv -> Deva - 3223, 475, // syc -> Syrc - 3227, 45, // syl -> Beng - 3231, 475, // syn -> Syrc - 3235, 475, // syr -> Syrc - 3239, 105, // syw -> Deva - 3243, 500, // ta -> Taml - 3246, 100, // tab -> Cyrl - 3250, 105, // taj -> Deva - 3254, 480, // tbk -> Tagb - 3258, 535, // tcn -> Tibt - 3262, 345, // tco -> Mymr - 3266, 500, // tcx -> Taml - 3270, 245, // tcy -> Knda - 3274, 520, // tda -> Tfng - 3278, 105, // tdb -> Deva - 3282, 490, // tdd -> Tale - 3286, 105, // tdg -> Deva - 3290, 105, // tdh -> Deva - 3294, 515, // te -> Telu - 3297, 205, // tes -> Java - 3301, 100, // tg -> Cyrl - 3304, 10, // tg_PK -> Arab - 3310, 105, // tge -> Deva - 3314, 535, // tgf -> Tibt - 3318, 530, // th -> Thai - 3321, 105, // the -> Deva - 3325, 105, // thf -> Deva - 3329, 490, // thi -> Tale - 3333, 105, // thl -> Deva - 3337, 530, // thm -> Thai - 3341, 105, // thq -> Deva - 3345, 105, // thr -> Deva - 3349, 105, // ths -> Deva - 3353, 120, // ti -> Ethi - 3356, 120, // tig -> Ethi - 3360, 105, // tij -> Deva - 3364, 100, // tin -> Cyrl - 3368, 345, // tjl -> Mymr - 3372, 10, // tjo -> Arab - 3376, 105, // tkb -> Deva - 3380, 10, // tks -> Arab - 3384, 105, // tkt -> Deva - 3388, 475, // tmr -> Syrc - 3392, 60, // tnv -> Cakm - 3396, 10, // tov -> Arab - 3400, 235, // tpu -> Khmr - 3404, 10, // tra -> Arab - 3408, 185, // trg -> Hebr - 3412, 10, // trm -> Arab - 3416, 10, // trw -> Arab - 3420, 150, // tsd -> Grek - 3424, 535, // tsj -> Tibt - 3428, 100, // tt -> Cyrl - 3431, 260, // tth -> Laoo - 3435, 260, // tto -> Laoo - 3439, 530, // tts -> Thai - 3443, 345, // tvn -> Mymr - 3447, 105, // twm -> Deva - 3451, 505, // txg -> Tang - 3455, 545, // txo -> Toto - 3459, 510, // tyr -> Tavt - 3463, 100, // tyv -> Cyrl - 3467, 100, // ude -> Cyrl - 3471, 320, // udg -> Mlym - 3475, 0, // udi -> Aghb - 3479, 100, // udm -> Cyrl - 3483, 10, // ug -> Arab - 3486, 100, // ug_KZ -> Cyrl - 3492, 100, // ug_MN -> Cyrl - 3498, 550, // uga -> Ugar - 3502, 100, // ugh -> Cyrl - 3506, 530, // ugo -> Thai - 3510, 100, // uk -> Cyrl - 3513, 385, // uki -> Orya - 3517, 100, // ulc -> Cyrl - 3521, 45, // unr -> Beng - 3525, 105, // unr_NP -> Deva - 3532, 45, // unx -> Beng - 3536, 10, // ur -> Arab - 3539, 530, // urk -> Thai - 3543, 10, // ush -> Arab - 3547, 150, // uum -> Grek - 3551, 10, // uz_AF -> Arab - 3557, 100, // uz_CN -> Cyrl - 3563, 10, // uzs -> Arab - 3567, 500, // vaa -> Taml - 3571, 10, // vaf -> Arab - 3575, 105, // vah -> Deva - 3579, 555, // vai -> Vaii - 3583, 105, // vas -> Deva - 3587, 105, // vav -> Deva - 3591, 105, // vay -> Deva - 3595, 10, // vgr -> Arab - 3599, 245, // vmd -> Knda - 3603, 10, // vmh -> Arab - 3607, 120, // wal -> Ethi - 3611, 10, // wbk -> Arab - 3615, 515, // wbq -> Telu - 3619, 105, // wbr -> Deva - 3623, 10, // wlo -> Arab - 3627, 105, // wme -> Deva - 3631, 10, // wne -> Arab - 3635, 10, // wni -> Arab - 3639, 130, // wsg -> Gong - 3643, 10, // wsv -> Arab - 3647, 105, // wtm -> Deva - 3651, 175, // wuu -> Hans - 3655, 100, // xal -> Cyrl - 3659, 120, // xan -> Ethi - 3663, 100, // xas -> Cyrl - 3667, 85, // xco -> Chrs - 3671, 70, // xcr -> Cari - 3675, 100, // xdq -> Cyrl - 3679, 10, // xhe -> Arab - 3683, 235, // xhm -> Khmr - 3687, 385, // xis -> Orya - 3691, 10, // xka -> Arab - 3695, 10, // xkc -> Arab - 3699, 10, // xkj -> Arab - 3703, 10, // xkp -> Arab - 3707, 285, // xlc -> Lyci - 3711, 290, // xld -> Lydi - 3715, 115, // xly -> Elym - 3719, 125, // xmf -> Geor - 3723, 300, // xmn -> Mani - 3727, 315, // xmr -> Merc - 3731, 350, // xna -> Narb - 3735, 105, // xnr -> Deva - 3739, 150, // xpg -> Grek - 3743, 370, // xpi -> Ogam - 3747, 100, // xpm -> Cyrl - 3751, 415, // xpr -> Prti - 3755, 100, // xrm -> Cyrl - 3759, 100, // xrn -> Cyrl - 3763, 440, // xsa -> Sarb - 3767, 105, // xsr -> Deva - 3771, 500, // xub -> Taml - 3775, 500, // xuj -> Taml - 3779, 200, // xve -> Ital - 3783, 10, // xvi -> Arab - 3787, 100, // xwo -> Cyrl - 3791, 305, // xzh -> Marc - 3795, 100, // yai -> Cyrl - 3799, 105, // ybh -> Deva - 3803, 105, // ybi -> Deva - 3807, 10, // ydg -> Arab - 3811, 320, // yea -> Mlym - 3815, 150, // yej -> Grek - 3819, 515, // yeu -> Telu - 3823, 410, // ygp -> Plrd - 3827, 185, // yhd -> Hebr - 3831, 185, // yi -> Hebr - 3834, 575, // yig -> Yiii - 3838, 185, // yih -> Hebr - 3842, 575, // yiv -> Yiii - 3846, 100, // ykg -> Cyrl - 3850, 410, // yna -> Plrd - 3854, 100, // ynk -> Cyrl - 3858, 210, // yoi -> Jpan - 3862, 530, // yoy -> Thai - 3866, 100, // yrk -> Cyrl - 3870, 575, // ysd -> Yiii - 3874, 575, // ysn -> Yiii - 3878, 575, // ysp -> Yiii - 3882, 100, // ysr -> Cyrl - 3886, 410, // ysy -> Plrd - 3890, 185, // yud -> Hebr - 3894, 180, // yue -> Hant - 3898, 175, // yue_CN -> Hans - 3905, 100, // yug -> Cyrl - 3909, 100, // yux -> Cyrl - 3913, 410, // ywq -> Plrd - 3917, 410, // ywu -> Plrd - 3921, 535, // zau -> Tibt - 3925, 10, // zba -> Arab - 3929, 170, // zch -> Hani - 3933, 10, // zdj -> Arab - 3937, 170, // zeh -> Hani - 3941, 520, // zen -> Tfng - 3945, 170, // zgb -> Hani - 3949, 520, // zgh -> Tfng - 3953, 170, // zgm -> Hani - 3957, 170, // zgn -> Hani - 3961, 175, // zh -> Hans - 3964, 180, // zh_AU -> Hant - 3970, 180, // zh_BN -> Hant - 3976, 180, // zh_GB -> Hant - 3982, 180, // zh_GF -> Hant - 3988, 180, // zh_HK -> Hant - 3994, 180, // zh_ID -> Hant - 4000, 180, // zh_MO -> Hant - 4006, 180, // zh_PA -> Hant - 4012, 180, // zh_PF -> Hant - 4018, 180, // zh_PH -> Hant - 4024, 180, // zh_SR -> Hant - 4030, 180, // zh_TH -> Hant - 4036, 180, // zh_TW -> Hant - 4042, 180, // zh_US -> Hant - 4048, 180, // zh_VN -> Hant - 4054, 170, // zhd -> Hani - 4058, 365, // zhx -> Nshu - 4062, 100, // zko -> Cyrl - 4066, 240, // zkt -> Kits - 4070, 100, // zkz -> Cyrl - 4074, 170, // zlj -> Hani - 4078, 170, // zln -> Hani - 4082, 170, // zlq -> Hani - 4086, 170, // zqe -> Hani - 4090, 185, // zrp -> Hebr - 4094, 10, // zum -> Arab - 4098, 170, // zyg -> Hani - 4102, 170, // zyn -> Hani - 4106, 170, // zzj -> Hani + 106, 495, // aii -> Syrc + 110, 185, // aij -> Hebr + 114, 220, // ain -> Kana + 118, 355, // aio -> Mymr + 122, 10, // aiq -> Arab + 126, 590, // akk -> Xsux + 130, 100, // akv -> Cyrl + 134, 260, // alk -> Laoo + 138, 330, // all -> Mlym + 142, 100, // alr -> Cyrl + 146, 100, // alt -> Cyrl + 150, 120, // alw -> Ethi + 154, 120, // am -> Ethi + 157, 210, // ams -> Jpan + 161, 495, // amw -> Syrc + 165, 100, // ani -> Cyrl + 169, 105, // anp -> Deva + 173, 105, // anq -> Deva + 177, 105, // anr -> Deva + 181, 120, // anu -> Ethi + 185, 45, // aot -> Beng + 189, 10, // apc -> Arab + 193, 10, // apd -> Arab + 197, 105, // aph -> Deva + 201, 100, // aqc -> Cyrl + 205, 10, // ar -> Arab + 208, 15, // arc -> Armi + 212, 10, // arq -> Arab + 216, 10, // ars -> Arab + 220, 10, // ary -> Arab + 224, 10, // arz -> Arab + 228, 45, // as -> Beng + 231, 465, // ase -> Sgnw + 235, 10, // ask -> Arab + 239, 105, // asr -> Deva + 243, 10, // atn -> Arab + 247, 100, // atv -> Cyrl + 251, 10, // auj -> Arab + 255, 10, // auz -> Arab + 259, 100, // av -> Cyrl + 262, 10, // avd -> Arab + 266, 10, // avl -> Arab + 270, 105, // awa -> Deva + 274, 120, // awn -> Ethi + 278, 20, // axm -> Armn + 282, 10, // ayh -> Arab + 286, 10, // ayl -> Arab + 290, 10, // ayn -> Arab + 294, 10, // ayp -> Arab + 298, 10, // az_IQ -> Arab + 304, 10, // az_IR -> Arab + 310, 100, // az_RU -> Cyrl + 316, 10, // azb -> Arab + 320, 100, // ba -> Cyrl + 323, 10, // bal -> Arab + 327, 105, // bap -> Deva + 331, 30, // bax -> Bamu + 335, 125, // bbl -> Geor + 339, 120, // bcq -> Ethi + 343, 395, // bdv -> Orya + 347, 10, // bdz -> Arab + 351, 100, // be -> Cyrl + 354, 105, // bee -> Deva + 358, 10, // bej -> Arab + 362, 105, // bfb -> Deva + 366, 520, // bfq -> Taml + 370, 10, // bft -> Arab + 374, 555, // bfu -> Tibt + 378, 395, // bfw -> Orya + 382, 105, // bfy -> Deva + 386, 105, // bfz -> Deva + 390, 100, // bg -> Cyrl + 393, 105, // bgc -> Deva + 397, 105, // bgd -> Deva + 401, 10, // bgn -> Arab + 405, 10, // bgp -> Arab + 409, 105, // bgq -> Deva + 413, 105, // bgw -> Deva + 417, 150, // bgx -> Grek + 421, 105, // bha -> Deva + 425, 105, // bhb -> Deva + 429, 105, // bhd -> Deva + 433, 10, // bhe -> Arab + 437, 100, // bhh -> Cyrl + 441, 105, // bhi -> Deva + 445, 105, // bhj -> Deva + 449, 10, // bhm -> Arab + 453, 495, // bhn -> Syrc + 457, 105, // bho -> Deva + 461, 105, // bht -> Deva + 465, 105, // bhu -> Deva + 469, 105, // biy -> Deva + 473, 495, // bjf -> Syrc + 477, 105, // bjj -> Deva + 481, 10, // bjm -> Arab + 485, 555, // bkk -> Tibt + 489, 355, // blk -> Mymr + 493, 530, // blt -> Tavt + 497, 105, // bmj -> Deva + 501, 45, // bn -> Beng + 504, 105, // bns -> Deva + 508, 555, // bo -> Tibt + 511, 100, // bph -> Cyrl + 515, 105, // bpx -> Deva + 519, 45, // bpy -> Beng + 523, 10, // bqi -> Arab + 527, 105, // bra -> Deva + 531, 235, // brb -> Khmr + 535, 105, // brd -> Deva + 539, 10, // brh -> Arab + 543, 10, // brk -> Arab + 547, 555, // bro -> Tibt + 551, 260, // brv -> Laoo + 555, 245, // brw -> Knda + 559, 105, // brx -> Deva + 563, 10, // bsh -> Arab + 567, 10, // bsk -> Arab + 571, 35, // bsq -> Bass + 575, 120, // bst -> Ethi + 579, 40, // btd -> Batk + 583, 40, // btm -> Batk + 587, 105, // btv -> Deva + 591, 100, // bua -> Cyrl + 595, 355, // bwe -> Mymr + 599, 100, // bxm -> Cyrl + 603, 340, // bxu -> Mong + 607, 105, // byh -> Deva + 611, 120, // byn -> Ethi + 615, 105, // byw -> Deva + 619, 550, // bzi -> Thai + 623, 550, // cbn -> Thai + 627, 60, // ccp -> Cakm + 631, 535, // cde -> Telu + 635, 105, // cdh -> Deva + 639, 155, // cdi -> Gujr + 643, 105, // cdj -> Deva + 647, 105, // cdm -> Deva + 651, 175, // cdo -> Hans + 655, 45, // cdz -> Beng + 659, 100, // ce -> Cyrl + 662, 555, // cgk -> Tibt + 666, 10, // chg -> Arab + 670, 100, // chm -> Cyrl + 674, 80, // chr -> Cher + 678, 105, // chx -> Deva + 682, 105, // cih -> Deva + 686, 10, // cja -> Arab + 690, 100, // cji -> Cyrl + 694, 75, // cjm -> Cham + 698, 175, // cjy -> Hans + 702, 10, // ckb -> Arab + 706, 100, // ckt -> Cyrl + 710, 10, // clh -> Arab + 714, 100, // clw -> Cyrl + 718, 485, // cmg -> Soyo + 722, 555, // cna -> Tibt + 726, 175, // cnp -> Hans + 730, 550, // cog -> Thai + 734, 90, // cop -> Copt + 738, 150, // cpg -> Grek + 742, 65, // cr -> Cans + 745, 100, // crh -> Cyrl + 749, 65, // crj -> Cans + 753, 65, // crk -> Cans + 757, 65, // crl -> Cans + 761, 65, // crm -> Cans + 765, 355, // csh -> Mymr + 769, 175, // csp -> Hans + 773, 65, // csw -> Cans + 777, 410, // ctd -> Pauc + 781, 45, // ctg -> Beng + 785, 105, // ctn -> Deva + 789, 520, // ctt -> Taml + 793, 520, // cty -> Taml + 797, 100, // cu -> Cyrl + 800, 255, // cuu -> Lana + 804, 100, // cv -> Cyrl + 807, 175, // czh -> Hans + 811, 185, // czk -> Hebr + 815, 105, // daq -> Deva + 819, 100, // dar -> Cyrl + 823, 10, // dcc -> Arab + 827, 100, // ddo -> Cyrl + 831, 10, // def -> Arab + 835, 10, // deh -> Arab + 839, 45, // der -> Beng + 843, 10, // dgl -> Arab + 847, 105, // dhi -> Deva + 851, 155, // dhn -> Gujr + 855, 105, // dho -> Deva + 859, 105, // dhw -> Deva + 863, 555, // dka -> Tibt + 867, 100, // dlg -> Cyrl + 871, 320, // dmf -> Medf + 875, 10, // dmk -> Arab + 879, 10, // dml -> Arab + 883, 100, // dng -> Cyrl + 887, 355, // dnu -> Mymr + 891, 355, // dnv -> Mymr + 895, 105, // doi -> Deva + 899, 120, // dox -> Ethi + 903, 555, // dre -> Tibt + 907, 105, // drq -> Deva + 911, 120, // drs -> Ethi + 915, 105, // dry -> Deva + 919, 395, // dso -> Orya + 923, 105, // dty -> Deva + 927, 155, // dub -> Gujr + 931, 105, // duh -> Deva + 935, 105, // dus -> Deva + 939, 545, // dv -> Thaa + 942, 395, // dwk -> Orya + 946, 105, // dwz -> Deva + 950, 555, // dz -> Tibt + 953, 555, // dzl -> Tibt + 957, 150, // ecr -> Grek + 961, 95, // ecy -> Cprt + 965, 110, // egy -> Egyp + 969, 215, // eky -> Kali + 973, 150, // el -> Grek + 976, 105, // emg -> Deva + 980, 105, // emu -> Deva + 984, 100, // enf -> Cyrl + 988, 100, // enh -> Cyrl + 992, 520, // era -> Taml + 996, 135, // esg -> Gonm + 1000, 10, // esh -> Arab + 1004, 200, // ett -> Ital + 1008, 100, // eve -> Cyrl + 1012, 100, // evn -> Cyrl + 1016, 10, // fa -> Arab + 1019, 10, // fay -> Arab + 1023, 10, // faz -> Arab + 1027, 10, // fia -> Arab + 1031, 105, // fmu -> Deva + 1035, 10, // fub -> Arab + 1039, 175, // gan -> Hans + 1043, 395, // gaq -> Orya + 1047, 155, // gas -> Gujr + 1051, 535, // gau -> Telu + 1055, 395, // gbj -> Orya + 1059, 105, // gbk -> Deva + 1063, 155, // gbl -> Gujr + 1067, 105, // gbm -> Deva + 1071, 10, // gbz -> Arab + 1075, 395, // gdb -> Orya + 1079, 100, // gdo -> Cyrl + 1083, 105, // gdx -> Deva + 1087, 120, // gez -> Ethi + 1091, 10, // ggg -> Arab + 1095, 10, // gha -> Arab + 1099, 105, // ghe -> Deva + 1103, 540, // gho -> Tfng + 1107, 10, // ghr -> Arab + 1111, 555, // ght -> Tibt + 1115, 10, // gig -> Arab + 1119, 100, // gin -> Cyrl + 1123, 10, // gjk -> Arab + 1127, 10, // gju -> Arab + 1131, 100, // gld -> Cyrl + 1135, 10, // glh -> Arab + 1139, 10, // glk -> Arab + 1143, 265, // gml -> Latf + 1147, 120, // gmv -> Ethi + 1151, 285, // gmy -> Linb + 1155, 555, // goe -> Tibt + 1159, 120, // gof -> Ethi + 1163, 105, // goj -> Deva + 1167, 105, // gok -> Deva + 1171, 105, // gon -> Deva + 1175, 140, // got -> Goth + 1179, 105, // gra -> Deva + 1183, 95, // grc -> Cprt + 1187, 45, // grt -> Beng + 1191, 120, // gru -> Ethi + 1195, 155, // gu -> Gujr + 1198, 105, // gvr -> Deva + 1202, 10, // gwc -> Arab + 1206, 10, // gwf -> Arab + 1210, 10, // gwt -> Arab + 1214, 105, // gyo -> Deva + 1218, 10, // gzi -> Arab + 1222, 10, // ha_CM -> Arab + 1228, 10, // ha_SD -> Arab + 1234, 10, // hac -> Arab + 1238, 175, // hak -> Hans + 1242, 120, // har -> Ethi + 1246, 10, // haz -> Arab + 1250, 185, // hbo -> Hebr + 1254, 120, // hdy -> Ethi + 1258, 185, // he -> Hebr + 1261, 105, // hi -> Deva + 1264, 105, // hif -> Deva + 1268, 505, // hii -> Takr + 1272, 590, // hit -> Xsux + 1276, 10, // hkh -> Arab + 1280, 105, // hlb -> Deva + 1284, 190, // hlu -> Hluw + 1288, 425, // hmd -> Plrd + 1292, 50, // hmj -> Bopo + 1296, 50, // hmq -> Bopo + 1300, 10, // hnd -> Arab + 1304, 105, // hne -> Deva + 1308, 195, // hnj -> Hmnp + 1312, 10, // hno -> Arab + 1316, 105, // hoc -> Deva + 1320, 10, // hoh -> Arab + 1324, 105, // hoj -> Deva + 1328, 170, // how -> Hani + 1332, 105, // hoy -> Deva + 1336, 355, // hpo -> Mymr + 1340, 495, // hrt -> Syrc + 1344, 10, // hrz -> Arab + 1348, 175, // hsn -> Hans + 1352, 10, // hss -> Arab + 1356, 590, // htx -> Xsux + 1360, 105, // hut -> Deva + 1364, 185, // huy -> Hebr + 1368, 100, // huz -> Cyrl + 1372, 20, // hy -> Armn + 1375, 20, // hyw -> Armn + 1379, 595, // ii -> Yiii + 1382, 295, // imy -> Lyci + 1386, 100, // inh -> Cyrl + 1390, 355, // int -> Mymr + 1394, 120, // ior -> Ethi + 1398, 520, // iru -> Taml + 1402, 10, // isk -> Arab + 1406, 185, // itk -> Hebr + 1410, 100, // itl -> Cyrl + 1414, 65, // iu -> Cans + 1417, 185, // iw -> Hebr + 1420, 210, // ja -> Jpan + 1423, 10, // jad -> Arab + 1427, 10, // jat -> Arab + 1431, 185, // jbe -> Hebr + 1435, 10, // jbn -> Arab + 1439, 100, // jct -> Cyrl + 1443, 555, // jda -> Tibt + 1447, 10, // jdg -> Arab + 1451, 100, // jdt -> Cyrl + 1455, 105, // jee -> Deva + 1459, 125, // jge -> Geor + 1463, 185, // ji -> Hebr + 1466, 165, // jje -> Hang + 1470, 355, // jkm -> Mymr + 1474, 105, // jml -> Deva + 1478, 505, // jna -> Takr + 1482, 10, // jnd -> Arab + 1486, 105, // jnl -> Deva + 1490, 105, // jns -> Deva + 1494, 10, // jog -> Arab + 1498, 185, // jpa -> Hebr + 1502, 185, // jpr -> Hebr + 1506, 185, // jrb -> Hebr + 1510, 105, // jul -> Deva + 1514, 395, // jun -> Orya + 1518, 395, // juy -> Orya + 1522, 555, // jya -> Tibt + 1526, 185, // jye -> Hebr + 1530, 125, // ka -> Geor + 1533, 100, // kaa -> Cyrl + 1537, 100, // kap -> Cyrl + 1541, 225, // kaw -> Kawi + 1545, 100, // kbd -> Cyrl + 1549, 555, // kbg -> Tibt + 1553, 10, // kbu -> Arab + 1557, 10, // kby -> Arab + 1561, 100, // kca -> Cyrl + 1565, 10, // kcy -> Arab + 1569, 45, // kdq -> Beng + 1573, 550, // kdt -> Thai + 1577, 100, // ket -> Cyrl + 1581, 330, // kev -> Mlym + 1585, 105, // kex -> Deva + 1589, 535, // key -> Telu + 1593, 245, // kfa -> Knda + 1597, 105, // kfb -> Deva + 1601, 535, // kfc -> Telu + 1605, 245, // kfd -> Knda + 1609, 520, // kfe -> Taml + 1613, 245, // kfg -> Knda + 1617, 330, // kfh -> Mlym + 1621, 520, // kfi -> Taml + 1625, 105, // kfk -> Deva + 1629, 10, // kfm -> Arab + 1633, 105, // kfp -> Deva + 1637, 105, // kfq -> Deva + 1641, 105, // kfr -> Deva + 1645, 105, // kfs -> Deva + 1649, 105, // kfu -> Deva + 1653, 105, // kfx -> Deva + 1657, 105, // kfy -> Deva + 1661, 105, // kgj -> Deva + 1665, 105, // kgy -> Deva + 1669, 515, // khb -> Talu + 1673, 550, // khf -> Thai + 1677, 555, // khg -> Tibt + 1681, 105, // khn -> Deva + 1685, 55, // kho -> Brah + 1689, 355, // kht -> Mymr + 1693, 100, // khv -> Cyrl + 1697, 10, // khw -> Arab + 1701, 105, // kif -> Deva + 1705, 100, // kim -> Cyrl + 1709, 105, // kip -> Deva + 1713, 260, // kjg -> Laoo + 1717, 100, // kjh -> Cyrl + 1721, 105, // kjl -> Deva + 1725, 105, // kjo -> Deva + 1729, 355, // kjp -> Mymr + 1733, 550, // kjt -> Thai + 1737, 555, // kjz -> Tibt + 1741, 100, // kk -> Cyrl + 1744, 10, // kk_AF -> Arab + 1750, 10, // kk_CN -> Arab + 1756, 10, // kk_IR -> Arab + 1762, 10, // kk_MN -> Arab + 1768, 555, // kkf -> Tibt + 1772, 255, // kkh -> Lana + 1776, 105, // kkt -> Deva + 1780, 105, // kle -> Deva + 1784, 10, // klj -> Arab + 1788, 105, // klr -> Deva + 1792, 235, // km -> Khmr + 1795, 105, // kmj -> Deva + 1799, 10, // kmz -> Arab + 1803, 245, // kn -> Knda + 1806, 105, // knn -> Deva + 1810, 250, // ko -> Kore + 1813, 100, // koi -> Cyrl + 1817, 105, // kok -> Deva + 1821, 100, // kpt -> Cyrl + 1825, 100, // kpy -> Cyrl + 1829, 495, // kqd -> Syrc + 1833, 120, // kqy -> Ethi + 1837, 105, // kra -> Deva + 1841, 100, // krc -> Cyrl + 1845, 100, // krk -> Cyrl + 1849, 235, // krr -> Khmr + 1853, 105, // kru -> Deva + 1857, 235, // krv -> Khmr + 1861, 10, // ks -> Arab + 1864, 355, // ksu -> Mymr + 1868, 355, // ksw -> Mymr + 1872, 105, // ksz -> Deva + 1876, 120, // ktb -> Ethi + 1880, 105, // kte -> Deva + 1884, 10, // ktl -> Arab + 1888, 425, // ktp -> Plrd + 1892, 10, // ku_LB -> Arab + 1898, 260, // kuf -> Laoo + 1902, 100, // kum -> Cyrl + 1906, 100, // kv -> Cyrl + 1909, 100, // kva -> Cyrl + 1913, 355, // kvq -> Mymr + 1917, 355, // kvt -> Mymr + 1921, 10, // kvx -> Arab + 1925, 215, // kvy -> Kali + 1929, 355, // kxf -> Mymr + 1933, 355, // kxk -> Mymr + 1937, 550, // kxm -> Thai + 1941, 10, // kxp -> Arab + 1945, 100, // ky -> Cyrl + 1948, 10, // ky_CN -> Arab + 1954, 215, // kyu -> Kali + 1958, 105, // kyv -> Deva + 1962, 105, // kyw -> Deva + 1966, 280, // lab -> Lina + 1970, 185, // lad -> Hebr + 1974, 105, // lae -> Deva + 1978, 10, // lah -> Arab + 1982, 100, // lbe -> Cyrl + 1986, 105, // lbf -> Deva + 1990, 555, // lbj -> Tibt + 1994, 105, // lbm -> Deva + 1998, 260, // lbo -> Laoo + 2002, 105, // lbr -> Deva + 2006, 550, // lcp -> Thai + 2010, 275, // lep -> Lepc + 2014, 100, // lez -> Cyrl + 2018, 105, // lhm -> Deva + 2022, 495, // lhs -> Syrc + 2026, 105, // lif -> Deva + 2030, 290, // lis -> Lisu + 2034, 555, // lkh -> Tibt + 2038, 10, // lki -> Arab + 2042, 105, // lmh -> Deva + 2046, 535, // lmn -> Telu + 2050, 260, // lo -> Laoo + 2053, 105, // loy -> Deva + 2057, 425, // lpo -> Plrd + 2061, 10, // lrc -> Arab + 2065, 10, // lrk -> Arab + 2069, 10, // lrl -> Arab + 2073, 10, // lsa -> Arab + 2077, 185, // lsd -> Hebr + 2081, 10, // lss -> Arab + 2085, 180, // ltc -> Hant + 2089, 555, // luk -> Tibt + 2093, 105, // luu -> Deva + 2097, 10, // luv -> Arab + 2101, 10, // luz -> Arab + 2105, 550, // lwl -> Thai + 2109, 550, // lwm -> Thai + 2113, 555, // lya -> Tibt + 2117, 175, // lzh -> Hans + 2121, 105, // mag -> Deva + 2125, 105, // mai -> Deva + 2129, 370, // man_GN -> Nkoo + 2136, 10, // mby -> Arab + 2140, 10, // mde -> Arab + 2144, 100, // mdf -> Cyrl + 2148, 120, // mdx -> Ethi + 2152, 120, // mdy -> Ethi + 2156, 10, // mfa -> Arab + 2160, 10, // mfi -> Arab + 2164, 270, // mga -> Latg + 2168, 105, // mgp -> Deva + 2172, 10, // mhj -> Arab + 2176, 305, // mid -> Mand + 2180, 105, // mjl -> Deva + 2184, 330, // mjq -> Mlym + 2188, 330, // mjr -> Mlym + 2192, 105, // mjt -> Deva + 2196, 535, // mju -> Telu + 2200, 330, // mjv -> Mlym + 2204, 105, // mjz -> Deva + 2208, 100, // mk -> Cyrl + 2211, 105, // mkb -> Deva + 2215, 105, // mke -> Deva + 2219, 10, // mki -> Arab + 2223, 550, // mkm -> Thai + 2227, 330, // ml -> Mlym + 2230, 550, // mlf -> Thai + 2234, 100, // mn -> Cyrl + 2237, 340, // mn_CN -> Mong + 2243, 340, // mnc -> Mong + 2247, 45, // mni -> Beng + 2251, 10, // mnj -> Arab + 2255, 100, // mns -> Cyrl + 2259, 355, // mnw -> Mymr + 2263, 550, // mpz -> Thai + 2267, 105, // mr -> Deva + 2270, 550, // mra -> Thai + 2274, 105, // mrd -> Deva + 2278, 100, // mrj -> Cyrl + 2282, 345, // mro -> Mroo + 2286, 105, // mrr -> Deva + 2290, 10, // ms_CC -> Arab + 2296, 100, // mtm -> Cyrl + 2300, 105, // mtr -> Deva + 2304, 100, // mud -> Cyrl + 2308, 555, // muk -> Tibt + 2312, 105, // mut -> Deva + 2316, 520, // muv -> Taml + 2320, 120, // muz -> Ethi + 2324, 10, // mve -> Arab + 2328, 340, // mvf -> Mong + 2332, 10, // mvy -> Arab + 2336, 120, // mvz -> Ethi + 2340, 105, // mwr -> Deva + 2344, 355, // mwt -> Mymr + 2348, 195, // mww -> Hmnp + 2352, 355, // my -> Mymr + 2355, 120, // mym -> Ethi + 2359, 100, // myv -> Cyrl + 2363, 305, // myz -> Mand + 2367, 10, // mzn -> Arab + 2371, 175, // nan -> Hans + 2375, 105, // nao -> Deva + 2379, 105, // ncd -> Deva + 2383, 260, // ncq -> Laoo + 2387, 100, // ndf -> Cyrl + 2391, 105, // ne -> Deva + 2394, 100, // neg -> Cyrl + 2398, 555, // neh -> Tibt + 2402, 590, // nei -> Xsux + 2406, 105, // new -> Deva + 2410, 260, // ngt -> Laoo + 2414, 100, // nio -> Cyrl + 2418, 535, // nit -> Telu + 2422, 100, // niv -> Cyrl + 2426, 10, // nli -> Arab + 2430, 10, // nlm -> Arab + 2434, 105, // nlx -> Deva + 2438, 105, // nmm -> Deva + 2442, 580, // nnp -> Wcho + 2446, 255, // nod -> Lana + 2450, 105, // noe -> Deva + 2454, 100, // nog -> Cyrl + 2458, 105, // noi -> Deva + 2462, 445, // non -> Runr + 2466, 595, // nos -> Yiii + 2470, 555, // npb -> Tibt + 2474, 370, // nqo -> Nkoo + 2478, 445, // nrn -> Runr + 2482, 595, // nsd -> Yiii + 2486, 595, // nsf -> Yiii + 2490, 65, // nsk -> Cans + 2494, 560, // nst -> Tnsa + 2498, 595, // nsv -> Yiii + 2502, 595, // nty -> Yiii + 2506, 10, // ntz -> Arab + 2510, 365, // nwc -> Newa + 2514, 105, // nwx -> Deva + 2518, 550, // nyl -> Thai + 2522, 10, // nyq -> Arab + 2526, 550, // nyw -> Thai + 2530, 100, // oaa -> Cyrl + 2534, 100, // oac -> Cyrl + 2538, 495, // oar -> Syrc + 2542, 125, // oav -> Geor + 2546, 420, // obm -> Phnx + 2550, 355, // obr -> Mymr + 2554, 10, // odk -> Arab + 2558, 590, // oht -> Xsux + 2562, 65, // oj -> Cans + 2565, 65, // ojs -> Cans + 2569, 165, // okm -> Hang + 2573, 170, // oko -> Hani + 2577, 235, // okz -> Khmr + 2581, 105, // ola -> Deva + 2585, 555, // ole -> Tibt + 2589, 100, // omk -> Cyrl + 2593, 350, // omp -> Mtei + 2597, 335, // omr -> Modi + 2601, 355, // omx -> Mymr + 2605, 105, // oon -> Deva + 2609, 395, // or -> Orya + 2612, 535, // ort -> Telu + 2616, 10, // oru -> Arab + 2620, 100, // orv -> Cyrl + 2624, 100, // os -> Cyrl + 2627, 400, // osa -> Osge + 2631, 200, // osc -> Ital + 2635, 205, // osi -> Java + 2639, 10, // ota -> Arab + 2643, 555, // otb -> Tibt + 2647, 390, // otk -> Orkh + 2651, 145, // oty -> Gran + 2655, 405, // oui -> Ougr + 2659, 160, // pa -> Guru + 2662, 10, // pa_PK -> Arab + 2668, 415, // pal -> Phli + 2672, 100, // paq -> Cyrl + 2676, 10, // pbt -> Arab + 2680, 235, // pcb -> Khmr + 2684, 355, // pce -> Mymr + 2688, 330, // pcf -> Mlym + 2692, 330, // pcg -> Mlym + 2696, 105, // pch -> Deva + 2700, 105, // pci -> Deva + 2704, 535, // pcj -> Telu + 2708, 395, // peg -> Orya + 2712, 585, // peo -> Xpeo + 2716, 230, // pgd -> Khar + 2720, 105, // pgg -> Deva + 2724, 380, // pgl -> Ogam + 2728, 200, // pgn -> Ital + 2732, 105, // phd -> Deva + 2736, 355, // phk -> Mymr + 2740, 10, // phl -> Arab + 2744, 420, // phn -> Phnx + 2748, 260, // pho -> Laoo + 2752, 10, // phr -> Arab + 2756, 550, // pht -> Thai + 2760, 550, // phu -> Thai + 2764, 10, // phv -> Arab + 2768, 105, // phw -> Deva + 2772, 470, // pi -> Sinh + 2775, 55, // pka -> Brah + 2779, 330, // pkr -> Mlym + 2783, 10, // plk -> Arab + 2787, 355, // pll -> Mymr + 2791, 55, // pmh -> Brah + 2795, 150, // pnt -> Grek + 2799, 230, // pra -> Khar + 2803, 10, // prc -> Arab + 2807, 10, // prd -> Arab + 2811, 550, // prt -> Thai + 2815, 10, // prx -> Arab + 2819, 10, // ps -> Arab + 2822, 10, // psh -> Arab + 2826, 10, // psi -> Arab + 2830, 10, // pst -> Arab + 2834, 55, // psu -> Brah + 2838, 105, // pum -> Deva + 2842, 355, // pwo -> Mymr + 2846, 105, // pwr -> Deva + 2850, 550, // pww -> Thai + 2854, 355, // pyx -> Mymr + 2858, 10, // qxq -> Arab + 2862, 105, // raa -> Deva + 2866, 105, // rab -> Deva + 2870, 105, // raf -> Deva + 2874, 45, // rah -> Beng + 2878, 105, // raj -> Deva + 2882, 105, // rav -> Deva + 2886, 355, // rbb -> Mymr + 2890, 10, // rdb -> Arab + 2894, 395, // rei -> Orya + 2898, 440, // rhg -> Rohg + 2902, 105, // rji -> Deva + 2906, 105, // rjs -> Deva + 2910, 235, // rka -> Khmr + 2914, 355, // rki -> Mymr + 2918, 45, // rkt -> Beng + 2922, 20, // rmi -> Armn + 2926, 10, // rmt -> Arab + 2930, 355, // rmz -> Mymr + 2934, 100, // rsk -> Cyrl + 2938, 105, // rtw -> Deva + 2942, 100, // ru -> Cyrl + 2945, 100, // rue -> Cyrl + 2949, 100, // rut -> Cyrl + 2953, 105, // rwr -> Deva + 2957, 220, // ryu -> Kana + 2961, 105, // sa -> Deva + 2964, 100, // sah -> Cyrl + 2968, 450, // sam -> Samr + 2972, 385, // sat -> Olck + 2976, 460, // saz -> Saur + 2980, 10, // sbn -> Arab + 2984, 555, // sbu -> Tibt + 2988, 105, // sck -> Deva + 2992, 10, // scl -> Arab + 2996, 105, // scp -> Deva + 3000, 260, // sct -> Laoo + 3004, 505, // scu -> Takr + 3008, 150, // scx -> Grek + 3012, 10, // sd -> Arab + 3015, 105, // sd_IN -> Deva + 3021, 10, // sdb -> Arab + 3025, 10, // sdf -> Arab + 3029, 10, // sdg -> Arab + 3033, 10, // sdh -> Arab + 3037, 45, // sdr -> Beng + 3041, 10, // sds -> Arab + 3045, 100, // sel -> Cyrl + 3049, 425, // sfm -> Plrd + 3053, 380, // sga -> Ogam + 3057, 100, // sgh -> Cyrl + 3061, 105, // sgj -> Deva + 3065, 10, // sgr -> Arab + 3069, 555, // sgt -> Tibt + 3073, 120, // sgw -> Ethi + 3077, 10, // sgy -> Arab + 3081, 10, // shd -> Arab + 3085, 540, // shi -> Tfng + 3089, 10, // shm -> Arab + 3093, 355, // shn -> Mymr + 3097, 10, // shu -> Arab + 3101, 10, // shv -> Arab + 3105, 470, // si -> Sinh + 3108, 100, // sia -> Cyrl + 3112, 555, // sip -> Tibt + 3116, 10, // siy -> Arab + 3120, 10, // siz -> Arab + 3124, 100, // sjd -> Cyrl + 3128, 105, // sjp -> Deva + 3132, 100, // sjt -> Cyrl + 3136, 550, // skb -> Thai + 3140, 105, // skj -> Deva + 3144, 10, // skr -> Arab + 3148, 595, // smh -> Yiii + 3152, 450, // smp -> Samr + 3156, 235, // smu -> Khmr + 3160, 10, // smy -> Arab + 3164, 530, // soa -> Tavt + 3168, 475, // sog -> Sogd + 3172, 105, // soi -> Deva + 3176, 550, // sou -> Thai + 3180, 555, // spt -> Tibt + 3184, 395, // spv -> Orya + 3188, 10, // sqo -> Arab + 3192, 260, // sqq -> Laoo + 3196, 10, // sqt -> Arab + 3200, 100, // sr -> Cyrl + 3203, 480, // srb -> Sora + 3207, 10, // srh -> Arab + 3211, 105, // srx -> Deva + 3215, 10, // srz -> Arab + 3219, 10, // ssh -> Arab + 3223, 260, // sss -> Laoo + 3227, 10, // sts -> Arab + 3231, 120, // stv -> Ethi + 3235, 100, // sty -> Cyrl + 3239, 490, // suz -> Sunu + 3243, 125, // sva -> Geor + 3247, 10, // swb -> Arab + 3251, 170, // swi -> Hani + 3255, 105, // swv -> Deva + 3259, 445, // sxu -> Runr + 3263, 495, // syc -> Syrc + 3267, 45, // syl -> Beng + 3271, 495, // syn -> Syrc + 3275, 495, // syr -> Syrc + 3279, 105, // syw -> Deva + 3283, 520, // ta -> Taml + 3286, 100, // tab -> Cyrl + 3290, 105, // taj -> Deva + 3294, 500, // tbk -> Tagb + 3298, 555, // tcn -> Tibt + 3302, 355, // tco -> Mymr + 3306, 520, // tcx -> Taml + 3310, 245, // tcy -> Knda + 3314, 540, // tda -> Tfng + 3318, 105, // tdb -> Deva + 3322, 510, // tdd -> Tale + 3326, 105, // tdg -> Deva + 3330, 105, // tdh -> Deva + 3334, 535, // te -> Telu + 3337, 205, // tes -> Java + 3341, 100, // tg -> Cyrl + 3344, 10, // tg_PK -> Arab + 3350, 105, // tge -> Deva + 3354, 555, // tgf -> Tibt + 3358, 550, // th -> Thai + 3361, 105, // the -> Deva + 3365, 105, // thf -> Deva + 3369, 510, // thi -> Tale + 3373, 105, // thl -> Deva + 3377, 550, // thm -> Thai + 3381, 105, // thq -> Deva + 3385, 105, // thr -> Deva + 3389, 105, // ths -> Deva + 3393, 120, // ti -> Ethi + 3396, 120, // tig -> Ethi + 3400, 105, // tij -> Deva + 3404, 100, // tin -> Cyrl + 3408, 355, // tjl -> Mymr + 3412, 10, // tjo -> Arab + 3416, 105, // tkb -> Deva + 3420, 10, // tks -> Arab + 3424, 105, // tkt -> Deva + 3428, 495, // tmr -> Syrc + 3432, 60, // tnv -> Cakm + 3436, 10, // tov -> Arab + 3440, 235, // tpu -> Khmr + 3444, 10, // tra -> Arab + 3448, 185, // trg -> Hebr + 3452, 10, // trm -> Arab + 3456, 10, // trw -> Arab + 3460, 150, // tsd -> Grek + 3464, 555, // tsj -> Tibt + 3468, 100, // tt -> Cyrl + 3471, 260, // tth -> Laoo + 3475, 260, // tto -> Laoo + 3479, 550, // tts -> Thai + 3483, 105, // ttz -> Deva + 3487, 355, // tvn -> Mymr + 3491, 105, // twm -> Deva + 3495, 525, // txg -> Tang + 3499, 565, // txo -> Toto + 3503, 530, // tyr -> Tavt + 3507, 100, // tyv -> Cyrl + 3511, 100, // ude -> Cyrl + 3515, 330, // udg -> Mlym + 3519, 100, // udi -> Cyrl + 3523, 100, // udm -> Cyrl + 3527, 10, // ug -> Arab + 3530, 100, // ug_KZ -> Cyrl + 3536, 100, // ug_MN -> Cyrl + 3542, 570, // uga -> Ugar + 3546, 100, // ugh -> Cyrl + 3550, 550, // ugo -> Thai + 3554, 100, // uk -> Cyrl + 3557, 395, // uki -> Orya + 3561, 100, // ulc -> Cyrl + 3565, 45, // unr -> Beng + 3569, 105, // unr_NP -> Deva + 3576, 45, // unx -> Beng + 3580, 10, // ur -> Arab + 3583, 550, // urk -> Thai + 3587, 10, // ush -> Arab + 3591, 150, // uum -> Grek + 3595, 10, // uz_AF -> Arab + 3601, 100, // uz_CN -> Cyrl + 3607, 10, // uzs -> Arab + 3611, 520, // vaa -> Taml + 3615, 10, // vaf -> Arab + 3619, 105, // vah -> Deva + 3623, 575, // vai -> Vaii + 3627, 105, // vas -> Deva + 3631, 105, // vav -> Deva + 3635, 105, // vay -> Deva + 3639, 10, // vgr -> Arab + 3643, 105, // vjk -> Deva + 3647, 245, // vmd -> Knda + 3651, 10, // vmh -> Arab + 3655, 120, // wal -> Ethi + 3659, 10, // wbk -> Arab + 3663, 535, // wbq -> Telu + 3667, 105, // wbr -> Deva + 3671, 120, // wle -> Ethi + 3675, 10, // wlo -> Arab + 3679, 105, // wme -> Deva + 3683, 10, // wne -> Arab + 3687, 10, // wni -> Arab + 3691, 130, // wsg -> Gong + 3695, 10, // wsv -> Arab + 3699, 105, // wtm -> Deva + 3703, 175, // wuu -> Hans + 3707, 0, // xag -> Aghb + 3711, 100, // xal -> Cyrl + 3715, 120, // xan -> Ethi + 3719, 100, // xas -> Cyrl + 3723, 85, // xco -> Chrs + 3727, 70, // xcr -> Cari + 3731, 100, // xdq -> Cyrl + 3735, 10, // xhe -> Arab + 3739, 235, // xhm -> Khmr + 3743, 395, // xis -> Orya + 3747, 10, // xka -> Arab + 3751, 10, // xkc -> Arab + 3755, 555, // xkf -> Tibt + 3759, 10, // xkj -> Arab + 3763, 10, // xkp -> Arab + 3767, 295, // xlc -> Lyci + 3771, 300, // xld -> Lydi + 3775, 115, // xly -> Elym + 3779, 125, // xmf -> Geor + 3783, 310, // xmn -> Mani + 3787, 325, // xmr -> Merc + 3791, 360, // xna -> Narb + 3795, 105, // xnr -> Deva + 3799, 150, // xpg -> Grek + 3803, 380, // xpi -> Ogam + 3807, 100, // xpm -> Cyrl + 3811, 430, // xpr -> Prti + 3815, 100, // xrm -> Cyrl + 3819, 100, // xrn -> Cyrl + 3823, 455, // xsa -> Sarb + 3827, 105, // xsr -> Deva + 3831, 55, // xtq -> Brah + 3835, 520, // xub -> Taml + 3839, 520, // xuj -> Taml + 3843, 200, // xve -> Ital + 3847, 10, // xvi -> Arab + 3851, 100, // xwo -> Cyrl + 3855, 315, // xzh -> Marc + 3859, 100, // yai -> Cyrl + 3863, 105, // ybh -> Deva + 3867, 105, // ybi -> Deva + 3871, 10, // ydg -> Arab + 3875, 330, // yea -> Mlym + 3879, 150, // yej -> Grek + 3883, 535, // yeu -> Telu + 3887, 425, // ygp -> Plrd + 3891, 185, // yhd -> Hebr + 3895, 185, // yi -> Hebr + 3898, 595, // yig -> Yiii + 3902, 185, // yih -> Hebr + 3906, 595, // yiv -> Yiii + 3910, 100, // ykg -> Cyrl + 3914, 100, // ykh -> Cyrl + 3918, 425, // yna -> Plrd + 3922, 100, // ynk -> Cyrl + 3926, 210, // yoi -> Jpan + 3930, 550, // yoy -> Thai + 3934, 100, // yrk -> Cyrl + 3938, 595, // ysd -> Yiii + 3942, 595, // ysn -> Yiii + 3946, 595, // ysp -> Yiii + 3950, 100, // ysr -> Cyrl + 3954, 425, // ysy -> Plrd + 3958, 185, // yud -> Hebr + 3962, 180, // yue -> Hant + 3966, 175, // yue_CN -> Hans + 3973, 100, // yug -> Cyrl + 3977, 100, // yux -> Cyrl + 3981, 425, // ywq -> Plrd + 3985, 425, // ywu -> Plrd + 3989, 555, // zau -> Tibt + 3993, 10, // zba -> Arab + 3997, 170, // zch -> Hani + 4001, 10, // zdj -> Arab + 4005, 170, // zeh -> Hani + 4009, 540, // zen -> Tfng + 4013, 170, // zgb -> Hani + 4017, 540, // zgh -> Tfng + 4021, 170, // zgm -> Hani + 4025, 170, // zgn -> Hani + 4029, 175, // zh -> Hans + 4032, 180, // zh_AU -> Hant + 4038, 180, // zh_BN -> Hant + 4044, 180, // zh_GB -> Hant + 4050, 180, // zh_GF -> Hant + 4056, 180, // zh_HK -> Hant + 4062, 180, // zh_ID -> Hant + 4068, 180, // zh_MO -> Hant + 4074, 180, // zh_PA -> Hant + 4080, 180, // zh_PF -> Hant + 4086, 180, // zh_PH -> Hant + 4092, 180, // zh_SR -> Hant + 4098, 180, // zh_TH -> Hant + 4104, 180, // zh_TW -> Hant + 4110, 180, // zh_US -> Hant + 4116, 180, // zh_VN -> Hant + 4122, 170, // zhd -> Hani + 4126, 375, // zhx -> Nshu + 4130, 100, // zko -> Cyrl + 4134, 240, // zkt -> Kits + 4138, 100, // zkz -> Cyrl + 4142, 170, // zlj -> Hani + 4146, 170, // zln -> Hani + 4150, 170, // zlq -> Hani + 4154, 170, // zqe -> Hani + 4158, 395, // zrg -> Orya + 4162, 185, // zrp -> Hebr + 4166, 10, // zum -> Arab + 4170, 120, // zwa -> Ethi + 4174, 170, // zyg -> Hani + 4178, 170, // zyn -> Hani + 4182, 170, // zzj -> Hani }; //====================================================================== @@ -1142,26 +1171,26 @@ const char parentLocaleChars[] = "en_ZM\0en_ZW\0es_419\0es_AR\0es_BO\0es_BR\0es_BZ\0es_CL\0es_CO\0" "es_CR\0es_CU\0es_DO\0es_EC\0es_GT\0es_HN\0es_JP\0es_MX\0es_NI\0" "es_PA\0es_PE\0es_PR\0es_PY\0es_SV\0es_US\0es_UY\0es_VE\0ff_Adlm\0" - "ff_Arab\0fr_HT\0ha_Arab\0hi_Latn\0ht\0iu_Latn\0kk_Arab\0ks_Deva\0" - "ku_Arab\0kxv_Deva\0kxv_Orya\0kxv_Telu\0ky_Arab\0ky_Latn\0ml_Arab\0" - "mn_Mong\0mni_Mtei\0ms_Arab\0nb\0nn\0no\0no_NO\0pa_Arab\0pt_AO\0" - "pt_CH\0pt_CV\0pt_FR\0pt_GQ\0pt_GW\0pt_LU\0pt_MO\0pt_MZ\0pt_PT\0" - "pt_ST\0pt_TL\0root\0sat_Deva\0sd_Deva\0sd_Khoj\0sd_Sind\0shi_Latn\0" - "so_Arab\0sr_Latn\0sw_Arab\0tg_Arab\0ug_Cyrl\0uz_Arab\0uz_Cyrl\0" - "vai_Latn\0wo_Arab\0yo_Arab\0yue_Hans\0zh_Hant\0zh_Hant_HK\0zh_Hant_MO\0" - ""; + "ff_Arab\0fr_HT\0ha_Arab\0hi_Latn\0ht\0iu_Latn\0kaa_Latn\0kk_Arab\0" + "kok_Latn\0ks_Deva\0ku_Arab\0kxv_Deva\0kxv_Orya\0kxv_Telu\0ky_Arab\0" + "ky_Latn\0ml_Arab\0mn_Mong\0mni_Mtei\0ms_Arab\0nb\0nn\0no\0no_NO\0" + "pa_Arab\0pt_AO\0pt_CH\0pt_CV\0pt_FR\0pt_GQ\0pt_GW\0pt_LU\0pt_MO\0" + "pt_MZ\0pt_PT\0pt_ST\0pt_TL\0root\0sat_Deva\0sd_Deva\0sd_Khoj\0" + "sd_Sind\0shi_Latn\0so_Arab\0sr_Latn\0sw_Arab\0tg_Arab\0ug_Cyrl\0" + "uz_Arab\0uz_Cyrl\0vai_Latn\0wo_Arab\0yo_Arab\0yue_Hans\0zh_Hant\0" + "zh_Hant_HK\0zh_Hant_MO\0"; const int32_t parentLocaleTable[] = { - 0, 1062, // az_Arab -> root - 8, 1062, // az_Cyrl -> root - 16, 1062, // bal_Latn -> root - 25, 1062, // blt_Latn -> root - 34, 1062, // bm_Nkoo -> root - 42, 1062, // bs_Cyrl -> root - 50, 1062, // byn_Latn -> root - 59, 1062, // cu_Glag -> root - 67, 1062, // dje_Arab -> root - 76, 1062, // dyo_Arab -> root + 0, 1080, // az_Arab -> root + 8, 1080, // az_Cyrl -> root + 16, 1080, // bal_Latn -> root + 25, 1080, // blt_Latn -> root + 34, 1080, // bm_Nkoo -> root + 42, 1080, // bs_Cyrl -> root + 50, 1080, // byn_Latn -> root + 59, 1080, // cu_Glag -> root + 67, 1080, // dje_Arab -> root + 76, 1080, // dyo_Arab -> root 92, 85, // en_150 -> en_001 99, 85, // en_AG -> en_001 105, 85, // en_AI -> en_001 @@ -1183,7 +1212,7 @@ const int32_t parentLocaleTable[] = { 201, 85, // en_DG -> en_001 207, 92, // en_DK -> en_150 213, 85, // en_DM -> en_001 - 219, 1062, // en_Dsrt -> root + 219, 1080, // en_Dsrt -> root 227, 85, // en_ER -> en_001 233, 92, // en_FI -> en_150 239, 85, // en_FJ -> en_001 @@ -1243,7 +1272,7 @@ const int32_t parentLocaleTable[] = { 563, 85, // en_SS -> en_001 569, 85, // en_SX -> en_001 575, 85, // en_SZ -> en_001 - 581, 1062, // en_Shaw -> root + 581, 1080, // en_Shaw -> root 589, 85, // en_TC -> en_001 595, 85, // en_TK -> en_001 601, 85, // en_TO -> en_001 @@ -1281,57 +1310,59 @@ const int32_t parentLocaleTable[] = { 800, 673, // es_US -> es_419 806, 673, // es_UY -> es_419 812, 673, // es_VE -> es_419 - 818, 1062, // ff_Adlm -> root - 826, 1062, // ff_Arab -> root - 840, 1062, // ha_Arab -> root + 818, 1080, // ff_Adlm -> root + 826, 1080, // ff_Arab -> root + 840, 1080, // ha_Arab -> root 848, 329, // hi_Latn -> en_IN 856, 834, // ht -> fr_HT - 859, 1062, // iu_Latn -> root - 867, 1062, // kk_Arab -> root - 875, 1062, // ks_Deva -> root - 883, 1062, // ku_Arab -> root - 891, 1062, // kxv_Deva -> root - 900, 1062, // kxv_Orya -> root - 909, 1062, // kxv_Telu -> root - 918, 1062, // ky_Arab -> root - 926, 1062, // ky_Latn -> root - 934, 1062, // ml_Arab -> root - 942, 1062, // mn_Mong -> root - 950, 1062, // mni_Mtei -> root - 959, 1062, // ms_Arab -> root - 967, 973, // nb -> no - 970, 973, // nn -> no - 976, 973, // no_NO -> no - 982, 1062, // pa_Arab -> root - 990, 1044, // pt_AO -> pt_PT - 996, 1044, // pt_CH -> pt_PT - 1002, 1044, // pt_CV -> pt_PT - 1008, 1044, // pt_FR -> pt_PT - 1014, 1044, // pt_GQ -> pt_PT - 1020, 1044, // pt_GW -> pt_PT - 1026, 1044, // pt_LU -> pt_PT - 1032, 1044, // pt_MO -> pt_PT - 1038, 1044, // pt_MZ -> pt_PT - 1050, 1044, // pt_ST -> pt_PT - 1056, 1044, // pt_TL -> pt_PT - 1067, 1062, // sat_Deva -> root - 1076, 1062, // sd_Deva -> root - 1084, 1062, // sd_Khoj -> root - 1092, 1062, // sd_Sind -> root - 1100, 1062, // shi_Latn -> root - 1109, 1062, // so_Arab -> root - 1117, 1062, // sr_Latn -> root - 1125, 1062, // sw_Arab -> root - 1133, 1062, // tg_Arab -> root - 1141, 1062, // ug_Cyrl -> root - 1149, 1062, // uz_Arab -> root - 1157, 1062, // uz_Cyrl -> root - 1165, 1062, // vai_Latn -> root - 1174, 1062, // wo_Arab -> root - 1182, 1062, // yo_Arab -> root - 1190, 1062, // yue_Hans -> root - 1199, 1062, // zh_Hant -> root - 1218, 1207, // zh_Hant_MO -> zh_Hant_HK + 859, 1080, // iu_Latn -> root + 867, 1080, // kaa_Latn -> root + 876, 1080, // kk_Arab -> root + 884, 1080, // kok_Latn -> root + 893, 1080, // ks_Deva -> root + 901, 1080, // ku_Arab -> root + 909, 1080, // kxv_Deva -> root + 918, 1080, // kxv_Orya -> root + 927, 1080, // kxv_Telu -> root + 936, 1080, // ky_Arab -> root + 944, 1080, // ky_Latn -> root + 952, 1080, // ml_Arab -> root + 960, 1080, // mn_Mong -> root + 968, 1080, // mni_Mtei -> root + 977, 1080, // ms_Arab -> root + 985, 991, // nb -> no + 988, 991, // nn -> no + 994, 991, // no_NO -> no + 1000, 1080, // pa_Arab -> root + 1008, 1062, // pt_AO -> pt_PT + 1014, 1062, // pt_CH -> pt_PT + 1020, 1062, // pt_CV -> pt_PT + 1026, 1062, // pt_FR -> pt_PT + 1032, 1062, // pt_GQ -> pt_PT + 1038, 1062, // pt_GW -> pt_PT + 1044, 1062, // pt_LU -> pt_PT + 1050, 1062, // pt_MO -> pt_PT + 1056, 1062, // pt_MZ -> pt_PT + 1068, 1062, // pt_ST -> pt_PT + 1074, 1062, // pt_TL -> pt_PT + 1085, 1080, // sat_Deva -> root + 1094, 1080, // sd_Deva -> root + 1102, 1080, // sd_Khoj -> root + 1110, 1080, // sd_Sind -> root + 1118, 1080, // shi_Latn -> root + 1127, 1080, // so_Arab -> root + 1135, 1080, // sr_Latn -> root + 1143, 1080, // sw_Arab -> root + 1151, 1080, // tg_Arab -> root + 1159, 1080, // ug_Cyrl -> root + 1167, 1080, // uz_Arab -> root + 1175, 1080, // uz_Cyrl -> root + 1183, 1080, // vai_Latn -> root + 1192, 1080, // wo_Arab -> root + 1200, 1080, // yo_Arab -> root + 1208, 1080, // yue_Hans -> root + 1217, 1080, // zh_Hant -> root + 1236, 1225, // zh_Hant_MO -> zh_Hant_HK }; diff --git a/deps/icu-small/source/common/localematcher.cpp b/deps/icu-small/source/common/localematcher.cpp index 8aae596bc8d7c1..1e74dd1f1493b7 100644 --- a/deps/icu-small/source/common/localematcher.cpp +++ b/deps/icu-small/source/common/localematcher.cpp @@ -780,7 +780,7 @@ int32_t acceptLanguage(UEnumeration &supportedLocales, Locale::Iterator &desired ULOC_ACCEPT_VALID : ULOC_ACCEPT_FALLBACK; } const char *bestStr = result.getSupportedLocale()->getName(); - int32_t bestLength = (int32_t)uprv_strlen(bestStr); + int32_t bestLength = static_cast<int32_t>(uprv_strlen(bestStr)); if (bestLength <= capacity) { uprv_memcpy(dest, bestStr, bestLength); } diff --git a/deps/icu-small/source/common/locbased.h b/deps/icu-small/source/common/locbased.h index 45738863b5ec96..2d260b527873d3 100644 --- a/deps/icu-small/source/common/locbased.h +++ b/deps/icu-small/source/common/locbased.h @@ -99,7 +99,7 @@ inline LocaleBased::LocaleBased(char* validAlias, char* actualAlias) : inline LocaleBased::LocaleBased(const char* validAlias, const char* actualAlias) : // ugh: cast away const - valid((char*)validAlias), actual((char*)actualAlias) { + valid(const_cast<char*>(validAlias)), actual(const_cast<char*>(actualAlias)) { } U_NAMESPACE_END diff --git a/deps/icu-small/source/common/locdispnames.cpp b/deps/icu-small/source/common/locdispnames.cpp index 0be069357af710..ddf7687a2bf07b 100644 --- a/deps/icu-small/source/common/locdispnames.cpp +++ b/deps/icu-small/source/common/locdispnames.cpp @@ -245,7 +245,7 @@ Locale::getDisplayName(const Locale &displayLocale, return result; } -#if ! UCONFIG_NO_BREAK_ITERATION +#if !UCONFIG_NO_BREAK_ITERATION // ------------------------------------- // Gets the objectLocale display name in the default locale language. @@ -351,7 +351,7 @@ _getStringOrCopyKey(const char *path, const char *locale, } } else { /* no string from a resource bundle: convert the substitute */ - length=(int32_t)uprv_strlen(substitute); + length = static_cast<int32_t>(uprv_strlen(substitute)); u_charsToUChars(substitute, dest, uprv_min(length, destCapacity)); errorCode = U_USING_DEFAULT_WARNING; } @@ -835,7 +835,10 @@ uloc_getDisplayKeywordValue( const char* locale, } /* get the keyword value */ - CharString keywordValue = ulocimp_getKeywordValue(locale, keyword, *status); + CharString keywordValue; + if (keyword != nullptr && *keyword != '\0') { + keywordValue = ulocimp_getKeywordValue(locale, keyword, *status); + } /* * if the keyword is equal to currency .. then to get the display name diff --git a/deps/icu-small/source/common/locdspnm.cpp b/deps/icu-small/source/common/locdspnm.cpp index c65a349dbd380b..270684341c5ce4 100644 --- a/deps/icu-small/source/common/locdspnm.cpp +++ b/deps/icu-small/source/common/locdspnm.cpp @@ -336,10 +336,11 @@ LocaleDisplayNamesImpl::LocaleDisplayNamesImpl(const Locale& locale, { while (length-- > 0) { UDisplayContext value = *contexts++; - UDisplayContextType selector = (UDisplayContextType)((uint32_t)value >> 8); + UDisplayContextType selector = + static_cast<UDisplayContextType>(static_cast<uint32_t>(value) >> 8); switch (selector) { case UDISPCTX_TYPE_DIALECT_HANDLING: - dialectHandling = (UDialectHandling)value; + dialectHandling = static_cast<UDialectHandling>(value); break; case UDISPCTX_TYPE_CAPITALIZATION: capitalizationContext = value; @@ -407,7 +408,7 @@ LocaleDisplayNamesImpl::CapitalizationContextSink::~CapitalizationContextSink() void LocaleDisplayNamesImpl::initialize() { - LocaleDisplayNamesImpl *nonConstThis = (LocaleDisplayNamesImpl *)this; + LocaleDisplayNamesImpl* nonConstThis = this; nonConstThis->locale = langData.getLocale() == Locale::getRoot() ? regionData.getLocale() : langData.getLocale(); @@ -426,16 +427,16 @@ LocaleDisplayNamesImpl::initialize() { pattern = UnicodeString("{0} ({1})", -1, US_INV); } format.applyPatternMinMaxArguments(pattern, 2, 2, status); - if (pattern.indexOf((char16_t)0xFF08) >= 0) { - formatOpenParen.setTo((char16_t)0xFF08); // fullwidth ( - formatReplaceOpenParen.setTo((char16_t)0xFF3B); // fullwidth [ - formatCloseParen.setTo((char16_t)0xFF09); // fullwidth ) - formatReplaceCloseParen.setTo((char16_t)0xFF3D); // fullwidth ] + if (pattern.indexOf(static_cast<char16_t>(0xFF08)) >= 0) { + formatOpenParen.setTo(static_cast<char16_t>(0xFF08)); // fullwidth ( + formatReplaceOpenParen.setTo(static_cast<char16_t>(0xFF3B)); // fullwidth [ + formatCloseParen.setTo(static_cast<char16_t>(0xFF09)); // fullwidth ) + formatReplaceCloseParen.setTo(static_cast<char16_t>(0xFF3D)); // fullwidth ] } else { - formatOpenParen.setTo((char16_t)0x0028); // ( - formatReplaceOpenParen.setTo((char16_t)0x005B); // [ - formatCloseParen.setTo((char16_t)0x0029); // ) - formatReplaceCloseParen.setTo((char16_t)0x005D); // ] + formatOpenParen.setTo(static_cast<char16_t>(0x0028)); // ( + formatReplaceOpenParen.setTo(static_cast<char16_t>(0x005B)); // [ + formatCloseParen.setTo(static_cast<char16_t>(0x0029)); // ) + formatReplaceCloseParen.setTo(static_cast<char16_t>(0x005D)); // ] } UnicodeString ktPattern; @@ -495,7 +496,7 @@ UDisplayContext LocaleDisplayNamesImpl::getContext(UDisplayContextType type) const { switch (type) { case UDISPCTX_TYPE_DIALECT_HANDLING: - return (UDisplayContext)dialectHandling; + return static_cast<UDisplayContext>(dialectHandling); case UDISPCTX_TYPE_CAPITALIZATION: return capitalizationContext; case UDISPCTX_TYPE_DISPLAY_LENGTH: @@ -505,7 +506,7 @@ LocaleDisplayNamesImpl::getContext(UDisplayContextType type) const { default: break; } - return (UDisplayContext)0; + return static_cast<UDisplayContext>(0); } UnicodeString& @@ -652,7 +653,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, appendWithSep(resultRemainder, temp3); } else { appendWithSep(resultRemainder, temp) - .append((char16_t)0x3d /* = */) + .append(static_cast<char16_t>(0x3d) /* = */) .append(temp2); } } diff --git a/deps/icu-small/source/common/locid.cpp b/deps/icu-small/source/common/locid.cpp index 37bbe4ba949e52..4a73f559205232 100644 --- a/deps/icu-small/source/common/locid.cpp +++ b/deps/icu-small/source/common/locid.cpp @@ -31,6 +31,8 @@ ****************************************************************************** */ +#include <optional> +#include <string_view> #include <utility> #include "unicode/bytestream.h" @@ -109,7 +111,7 @@ namespace { // void U_CALLCONV deleteLocale(void *obj) { - delete (icu::Locale *) obj; + delete static_cast<icu::Locale*>(obj); } UBool U_CALLCONV locale_cleanup() @@ -132,7 +134,7 @@ void U_CALLCONV locale_init(UErrorCode &status) { U_NAMESPACE_USE U_ASSERT(gLocaleCache == nullptr); - gLocaleCache = new Locale[(int)eMAX_LOCALES]; + gLocaleCache = new Locale[static_cast<int>(eMAX_LOCALES)]; if (gLocaleCache == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; @@ -194,7 +196,7 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) { ucln_common_registerCleanup(UCLN_COMMON_LOCALE, locale_cleanup); } - Locale *newDefault = (Locale *)uhash_get(gDefaultLocalesHashT, localeNameBuf.data()); + Locale* newDefault = static_cast<Locale*>(uhash_get(gDefaultLocalesHashT, localeNameBuf.data())); if (newDefault == nullptr) { newDefault = new Locale(Locale::eBOGUS); if (newDefault == nullptr) { @@ -202,7 +204,7 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) { return gDefaultLocale; } newDefault->init(localeNameBuf.data(), false); - uhash_put(gDefaultLocalesHashT, (char*) newDefault->getName(), newDefault, &status); + uhash_put(gDefaultLocalesHashT, const_cast<char*>(newDefault->getName()), newDefault, &status); if (U_FAILURE(status)) { return gDefaultLocale; } @@ -296,7 +298,7 @@ Locale::Locale( const char * newLanguage, // Language if ( newLanguage != nullptr ) { - lsize = (int32_t)uprv_strlen(newLanguage); + lsize = static_cast<int32_t>(uprv_strlen(newLanguage)); if ( lsize < 0 || lsize > ULOC_STRING_LIMIT ) { // int32 wrap setToBogus(); return; @@ -308,7 +310,7 @@ Locale::Locale( const char * newLanguage, // _Country if ( newCountry != nullptr ) { - csize = (int32_t)uprv_strlen(newCountry); + csize = static_cast<int32_t>(uprv_strlen(newCountry)); if ( csize < 0 || csize > ULOC_STRING_LIMIT ) { // int32 wrap setToBogus(); return; @@ -325,7 +327,7 @@ Locale::Locale( const char * newLanguage, } // remove trailing _'s - vsize = (int32_t)uprv_strlen(newVariant); + vsize = static_cast<int32_t>(uprv_strlen(newVariant)); if ( vsize < 0 || vsize > ULOC_STRING_LIMIT ) { // int32 wrap setToBogus(); return; @@ -338,7 +340,7 @@ Locale::Locale( const char * newLanguage, if ( newKeywords != nullptr) { - ksize = (int32_t)uprv_strlen(newKeywords); + ksize = static_cast<int32_t>(uprv_strlen(newKeywords)); if ( ksize < 0 || ksize > ULOC_STRING_LIMIT ) { setToBogus(); return; @@ -1200,8 +1202,8 @@ AliasReplacer::parseLanguageReplacement( return; } // We have multiple field so we have to allocate and parse - CharString* str = new CharString( - replacement, (int32_t)uprv_strlen(replacement), status); + CharString* str = + new CharString(replacement, static_cast<int32_t>(uprv_strlen(replacement)), status); LocalPointer<CharString> lpStr(str, status); toBeFreed.adoptElement(lpStr.orphan(), status); if (U_FAILURE(status)) { @@ -1213,7 +1215,7 @@ AliasReplacer::parseLanguageReplacement( *endOfField = '\0'; // null terminiate it. endOfField++; const char* start = endOfField; - endOfField = (char*) uprv_strchr(start, '_'); + endOfField = const_cast<char*>(uprv_strchr(start, '_')); size_t len = 0; if (endOfField == nullptr) { len = uprv_strlen(start); @@ -1228,7 +1230,7 @@ AliasReplacer::parseLanguageReplacement( return; } start = endOfField++; - endOfField = (char*)uprv_strchr(start, '_'); + endOfField = const_cast<char*>(uprv_strchr(start, '_')); if (endOfField == nullptr) { len = uprv_strlen(start); } else { @@ -1243,7 +1245,7 @@ AliasReplacer::parseLanguageReplacement( return; } start = endOfField++; - endOfField = (char*)uprv_strchr(start, '_'); + endOfField = const_cast<char*>(uprv_strchr(start, '_')); if (endOfField == nullptr) { len = uprv_strlen(start); } else { @@ -1285,7 +1287,7 @@ AliasReplacer::replaceLanguage( variant_index++) { if (checkVariants) { U_ASSERT(variant_index < variant_size); - searchVariant = (const char*)(variants.elementAt(variant_index)); + searchVariant = static_cast<const char*>(variants.elementAt(variant_index)); } if (searchVariant != nullptr && uprv_strlen(searchVariant) < 4) { @@ -1406,13 +1408,13 @@ AliasReplacer::replaceTerritory(UVector& toBeFreed, UErrorCode& status) U_ASSERT(foundInReplacement[len] == ' ' || foundInReplacement[len] == '\0'); item.adoptInsteadAndCheckErrorCode( - new CharString(foundInReplacement, (int32_t)len, status), status); + new CharString(foundInReplacement, static_cast<int32_t>(len), status), status); } } if (item.isNull() && U_SUCCESS(status)) { item.adoptInsteadAndCheckErrorCode( new CharString(replacement, - (int32_t)(firstSpace - replacement), status), status); + static_cast<int32_t>(firstSpace - replacement), status), status); } if (U_FAILURE(status)) { return false; } replacedRegion = item->data(); @@ -1454,7 +1456,7 @@ AliasReplacer::replaceVariant(UErrorCode& status) } // Since we may have more than one variant, we need to loop through them. for (int32_t i = 0; i < variants.size(); i++) { - const char *variant = (const char*)(variants.elementAt(i)); + const char* variant = static_cast<const char*>(variants.elementAt(i)); const char *replacement = data->variantMap().get(variant); if (replacement == nullptr) { // Found no replacement data for this variant. @@ -1496,7 +1498,7 @@ AliasReplacer::replaceSubdivision( size_t len = (firstSpace != nullptr) ? (firstSpace - replacement) : uprv_strlen(replacement); if (2 <= len && len <= 8) { - output.append(replacement, (int32_t)len, status); + output.append(replacement, static_cast<int32_t>(len), status); if (2 == len) { // Add 'zzzz' based on changes to UTS #35 for CLDR-14312. output.append("zzzz", 4, status); @@ -1546,7 +1548,7 @@ AliasReplacer::replaceTransformedExtensions( } const char* nextTKey = ultag_getTKeyStart(tvalue); if (nextTKey != nullptr) { - *((char*)(nextTKey-1)) = '\0'; // NUL terminate tvalue + *const_cast<char*>(nextTKey - 1) = '\0'; // NUL terminate tvalue } tfields.insertElementAt((void*)tkey, tfields.size(), status); if (U_FAILURE(status)) { @@ -1561,17 +1563,17 @@ AliasReplacer::replaceTransformedExtensions( if (output.length() > 0) { output.append('-', status); } - const char* tfield = (const char*) tfields.elementAt(i); + const char* tfield = static_cast<const char*>(tfields.elementAt(i)); const char* tvalue = uprv_strchr(tfield, '-'); if (tvalue == nullptr) { status = U_ILLEGAL_ARGUMENT_ERROR; return false; } // Split the "tkey-tvalue" pair string so that we can canonicalize the tvalue. - *((char*)tvalue++) = '\0'; // NUL terminate tkey + *const_cast<char*>(tvalue++) = '\0'; // NUL terminate tkey output.append(tfield, status).append('-', status); - const char* bcpTValue = ulocimp_toBcpType(tfield, tvalue, nullptr, nullptr); - output.append((bcpTValue == nullptr) ? tvalue : bcpTValue, status); + std::optional<std::string_view> bcpTValue = ulocimp_toBcpType(tfield, tvalue); + output.append(bcpTValue.has_value() ? *bcpTValue : tvalue, status); } } if (U_FAILURE(status)) { @@ -1604,7 +1606,7 @@ AliasReplacer::outputToString( int32_t variantsStart = out.length(); for (int32_t i = 0; i < variants.size(); i++) { out.append(SEP_CHAR, status) - .append((const char*)(variants.elementAt(i)), + .append(static_cast<const char*>(variants.elementAt(i)), status); } T_CString_toUpperCase(out.data() + variantsStart); @@ -1673,7 +1675,7 @@ AliasReplacer::replace(const Locale& locale, CharString& out, UErrorCode& status int changed = 0; // A UVector to to hold CharString allocated by the replace* method // and freed when out of scope from his function. - UVector stringsToBeFreed([](void *obj){ delete ((CharString*) obj); }, + UVector stringsToBeFreed([](void *obj) { delete static_cast<CharString*>(obj); }, nullptr, 10, status); while (U_SUCCESS(status)) { // Something wrong with the data cause looping here more than 10 times @@ -1866,14 +1868,14 @@ Locale& Locale::init(const char* localeID, UBool canonicalize) uloc_canonicalize(localeID, fullName, sizeof(fullNameBuffer), &err) : uloc_getName(localeID, fullName, sizeof(fullNameBuffer), &err); - if(err == U_BUFFER_OVERFLOW_ERROR || length >= (int32_t)sizeof(fullNameBuffer)) { + if (err == U_BUFFER_OVERFLOW_ERROR || length >= static_cast<int32_t>(sizeof(fullNameBuffer))) { U_ASSERT(baseName == nullptr); /*Go to heap for the fullName if necessary*/ - fullName = (char *)uprv_malloc(sizeof(char)*(length + 1)); - if (fullName == nullptr) { - fullName = fullNameBuffer; + char* newFullName = static_cast<char*>(uprv_malloc(sizeof(char) * (length + 1))); + if (newFullName == nullptr) { break; // error: out of memory } + fullName = newFullName; err = U_ZERO_ERROR; length = canonicalize ? uloc_canonicalize(localeID, fullName, length+1, &err) : @@ -1895,7 +1897,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize) fieldIdx < UPRV_LENGTHOF(field)-1 && (at == nullptr || separator < at)) { field[fieldIdx] = separator + 1; - fieldLen[fieldIdx-1] = (int32_t)(separator - field[fieldIdx-1]); + fieldLen[fieldIdx - 1] = static_cast<int32_t>(separator - field[fieldIdx - 1]); fieldIdx++; } // variant may contain @foo or .foo POSIX cruft; remove it @@ -1905,12 +1907,12 @@ Locale& Locale::init(const char* localeID, UBool canonicalize) if (separator==nullptr || (sep2!=nullptr && separator > sep2)) { separator = sep2; } - fieldLen[fieldIdx-1] = (int32_t)(separator - field[fieldIdx-1]); + fieldLen[fieldIdx - 1] = static_cast<int32_t>(separator - field[fieldIdx - 1]); } else { - fieldLen[fieldIdx-1] = length - (int32_t)(field[fieldIdx-1] - fullName); + fieldLen[fieldIdx - 1] = length - static_cast<int32_t>(field[fieldIdx - 1] - fullName); } - if (fieldLen[0] >= (int32_t)(sizeof(language))) + if (fieldLen[0] >= static_cast<int32_t>(sizeof(language))) { break; // error: the language field is too long } @@ -1941,7 +1943,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize) if (fieldLen[variantField] > 0) { /* We have a variant */ - variantBegin = (int32_t)(field[variantField] - fullName); + variantBegin = static_cast<int32_t>(field[variantField] - fullName); } err = U_ZERO_ERROR; @@ -1991,12 +1993,13 @@ Locale::initBaseName(UErrorCode &status) { const char *eqPtr = uprv_strchr(fullName, '='); if (atPtr && eqPtr && atPtr < eqPtr) { // Key words exist. - int32_t baseNameLength = (int32_t)(atPtr - fullName); - baseName = (char *)uprv_malloc(baseNameLength + 1); - if (baseName == nullptr) { + int32_t baseNameLength = static_cast<int32_t>(atPtr - fullName); + char* newBaseName = static_cast<char*>(uprv_malloc(baseNameLength + 1)); + if (newBaseName == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } + baseName = newBaseName; uprv_strncpy(baseName, fullName, baseNameLength); baseName[baseNameLength] = 0; @@ -2434,7 +2437,7 @@ class KeywordEnumeration : public StringEnumeration { UErrorCode status = U_ZERO_ERROR; return new KeywordEnumeration( keywords.data(), keywords.length(), - (int32_t)(current - keywords.data()), status); + static_cast<int32_t>(current - keywords.data()), status); } virtual int32_t count(UErrorCode& status) const override { @@ -2453,7 +2456,7 @@ class KeywordEnumeration : public StringEnumeration { int32_t len; if(U_SUCCESS(status) && *current != 0) { result = current; - len = (int32_t)uprv_strlen(current); + len = static_cast<int32_t>(uprv_strlen(current)); current += len+1; if(resultLength != nullptr) { *resultLength = len; @@ -2596,13 +2599,7 @@ Locale::getKeywordValue(StringPiece keywordName, ByteSink& sink, UErrorCode& sta return; } - // TODO: Remove the need for a const char* to a NUL terminated buffer. - const CharString keywordName_nul(keywordName, status); - if (U_FAILURE(status)) { - return; - } - - ulocimp_getKeywordValue(fullName, keywordName_nul.data(), sink, status); + ulocimp_getKeywordValue(fullName, keywordName, sink, status); } void @@ -2613,88 +2610,89 @@ Locale::getUnicodeKeywordValue(StringPiece keywordName, return; } - // TODO: Remove the need for a const char* to a NUL terminated buffer. - const CharString keywordName_nul(keywordName, status); - if (U_FAILURE(status)) { - return; - } - - const char* legacy_key = uloc_toLegacyKey(keywordName_nul.data()); - if (legacy_key == nullptr) { + std::optional<std::string_view> legacy_key = ulocimp_toLegacyKeyWithFallback(keywordName); + if (!legacy_key.has_value()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - auto legacy_value = getKeywordValue<CharString>(legacy_key, status); + auto legacy_value = getKeywordValue<CharString>(*legacy_key, status); if (U_FAILURE(status)) { return; } - const char* unicode_value = uloc_toUnicodeLocaleType( - keywordName_nul.data(), legacy_value.data()); - - if (unicode_value == nullptr) { + std::optional<std::string_view> unicode_value = + ulocimp_toBcpTypeWithFallback(keywordName, legacy_value.toStringPiece()); + if (!unicode_value.has_value()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - sink.Append(unicode_value, static_cast<int32_t>(uprv_strlen(unicode_value))); + sink.Append(unicode_value->data(), static_cast<int32_t>(unicode_value->size())); } void -Locale::setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status) -{ - if (U_FAILURE(status)) { +Locale::setKeywordValue(StringPiece keywordName, + StringPiece keywordValue, + UErrorCode& status) { + if (U_FAILURE(status)) { return; } + if (keywordName.empty()) { + status = U_ILLEGAL_ARGUMENT_ERROR; return; } if (status == U_STRING_NOT_TERMINATED_WARNING) { status = U_ZERO_ERROR; } - int32_t bufferLength = uprv_max((int32_t)(uprv_strlen(fullName) + 1), ULOC_FULLNAME_CAPACITY); - int32_t newLength = uloc_setKeywordValue(keywordName, keywordValue, fullName, - bufferLength, &status) + 1; - U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING); - /* Handle the case the current buffer is not enough to hold the new id */ - if (status == U_BUFFER_OVERFLOW_ERROR) { - U_ASSERT(newLength > bufferLength); - char* newFullName = (char *)uprv_malloc(newLength); - if (newFullName == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; - return; - } - uprv_strcpy(newFullName, fullName); - if (fullName != fullNameBuffer) { - // if full Name is already on the heap, need to free it. - uprv_free(fullName); - if (baseName == fullName) { - baseName = newFullName; // baseName should not point to freed memory. + + int32_t length = static_cast<int32_t>(uprv_strlen(fullName)); + int32_t capacity = fullName == fullNameBuffer ? ULOC_FULLNAME_CAPACITY : length + 1; + + const char* start = locale_getKeywordsStart(fullName); + int32_t offset = start == nullptr ? length : start - fullName; + + for (;;) { + // Remove -1 from the capacity so that this function can guarantee NUL termination. + CheckedArrayByteSink sink(fullName + offset, capacity - offset - 1); + + int32_t reslen = ulocimp_setKeywordValue( + {fullName + offset, static_cast<std::string_view::size_type>(length - offset)}, + keywordName, + keywordValue, + sink, + status); + + if (status == U_BUFFER_OVERFLOW_ERROR) { + capacity = reslen + offset + 1; + char* newFullName = static_cast<char*>(uprv_malloc(capacity)); + if (newFullName == nullptr) { + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + uprv_memcpy(newFullName, fullName, length + 1); + if (fullName != fullNameBuffer) { + if (baseName == fullName) { + baseName = newFullName; // baseName should not point to freed memory. + } + // if fullName is already on the heap, need to free it. + uprv_free(fullName); } + fullName = newFullName; + status = U_ZERO_ERROR; + continue; } - fullName = newFullName; - status = U_ZERO_ERROR; - uloc_setKeywordValue(keywordName, keywordValue, fullName, newLength, &status); - U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING); - } else { - U_ASSERT(newLength <= bufferLength); + + if (U_FAILURE(status)) { return; } + u_terminateChars(fullName, capacity, reslen + offset, &status); + break; } - if (U_SUCCESS(status) && baseName == fullName) { + + if (baseName == fullName) { // May have added the first keyword, meaning that the fullName is no longer also the baseName. initBaseName(status); } } -void -Locale::setKeywordValue(StringPiece keywordName, - StringPiece keywordValue, - UErrorCode& status) { - if (U_FAILURE(status)) { return; } - // TODO: Remove the need for a const char* to a NUL terminated buffer. - const CharString keywordName_nul(keywordName, status); - const CharString keywordValue_nul(keywordValue, status); - setKeywordValue(keywordName_nul.data(), keywordValue_nul.data(), status); -} - void Locale::setUnicodeKeywordValue(StringPiece keywordName, StringPiece keywordValue, @@ -2703,32 +2701,25 @@ Locale::setUnicodeKeywordValue(StringPiece keywordName, return; } - // TODO: Remove the need for a const char* to a NUL terminated buffer. - const CharString keywordName_nul(keywordName, status); - const CharString keywordValue_nul(keywordValue, status); - if (U_FAILURE(status)) { - return; - } - - const char* legacy_key = uloc_toLegacyKey(keywordName_nul.data()); - if (legacy_key == nullptr) { + std::optional<std::string_view> legacy_key = ulocimp_toLegacyKeyWithFallback(keywordName); + if (!legacy_key.has_value()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - const char* legacy_value = nullptr; - - if (!keywordValue_nul.isEmpty()) { - legacy_value = - uloc_toLegacyType(keywordName_nul.data(), keywordValue_nul.data()); + std::string_view value; - if (legacy_value == nullptr) { + if (!keywordValue.empty()) { + std::optional<std::string_view> legacy_value = + ulocimp_toLegacyTypeWithFallback(keywordName, keywordValue); + if (!legacy_value.has_value()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } + value = *legacy_value; } - setKeywordValue(legacy_key, legacy_value, status); + setKeywordValue(*legacy_key, value, status); } const char * diff --git a/deps/icu-small/source/common/loclikely.cpp b/deps/icu-small/source/common/loclikely.cpp index 5aa929dc4b15e1..ccbcbfa7a5d7a1 100644 --- a/deps/icu-small/source/common/loclikely.cpp +++ b/deps/icu-small/source/common/loclikely.cpp @@ -19,6 +19,7 @@ * that then do not depend on resource bundle code and likely-subtags data. */ +#include <string_view> #include <utility> #include "unicode/bytestream.h" @@ -170,7 +171,7 @@ _uloc_addLikelySubtags(const char* localeID, return; } - int32_t trailingLength = (int32_t)uprv_strlen(trailing); + int32_t trailingLength = static_cast<int32_t>(uprv_strlen(trailing)); const icu::LikelySubtags* likelySubtags = icu::LikelySubtags::getSingleton(err); if (U_FAILURE(err)) { @@ -193,11 +194,11 @@ _uloc_addLikelySubtags(const char* localeID, } createTagStringWithAlternates( language, - (int32_t)uprv_strlen(language), + static_cast<int32_t>(uprv_strlen(language)), lsr.script, - (int32_t)uprv_strlen(lsr.script), + static_cast<int32_t>(uprv_strlen(lsr.script)), lsr.region, - (int32_t)uprv_strlen(lsr.region), + static_cast<int32_t>(uprv_strlen(lsr.region)), variant.data(), variant.length(), trailing, @@ -235,7 +236,7 @@ _uloc_minimizeSubtags(const char* localeID, return; } - int32_t trailingLength = (int32_t)uprv_strlen(trailing); + int32_t trailingLength = static_cast<int32_t>(uprv_strlen(trailing)); const icu::LikelySubtags* likelySubtags = icu::LikelySubtags::getSingleton(err); if (U_FAILURE(err)) { @@ -256,11 +257,11 @@ _uloc_minimizeSubtags(const char* localeID, } createTagStringWithAlternates( language, - (int32_t)uprv_strlen(language), + static_cast<int32_t>(uprv_strlen(language)), lsr.script, - (int32_t)uprv_strlen(lsr.script), + static_cast<int32_t>(uprv_strlen(lsr.script)), lsr.region, - (int32_t)uprv_strlen(lsr.region), + static_cast<int32_t>(uprv_strlen(lsr.region)), variant.data(), variant.length(), trailing, @@ -388,21 +389,32 @@ U_NAMESPACE_END namespace { icu::CharString -GetRegionFromKey(const char* localeID, const char* key, UErrorCode& status) { +GetRegionFromKey(const char* localeID, std::string_view key, UErrorCode& status) { icu::CharString result; - // First check for keyword value icu::CharString kw = ulocimp_getKeywordValue(localeID, key, status); int32_t len = kw.length(); - if (U_SUCCESS(status) && len >= 3 && len <= 7) { - // chop off the subdivision code (which will generally be "zzzz" anyway) - const char* const data = kw.data(); - if (uprv_isASCIILetter(data[0])) { - result.append(uprv_toupper(data[0]), status); - result.append(uprv_toupper(data[1]), status); - } else { - // assume three-digit region code - result.append(data, 3, status); + // In UTS35 + // type = alphanum{3,8} (sep alphanum{3,8})* ; + // so we know the subdivision must fit the type already. + // + // unicode_subdivision_id = unicode_region_subtag unicode_subdivision_suffix ; + // unicode_region_subtag = (alpha{2} | digit{3}) ; + // unicode_subdivision_suffix = alphanum{1,4} ; + // But we also know there are no id in start with digit{3} in + // https://github.com/unicode-org/cldr/blob/main/common/validity/subdivision.xml + // Therefore we can simplify as + // unicode_subdivision_id = alpha{2} alphanum{1,4} + // + // and only need to accept/reject the code based on the alpha{2} and the length. + if (U_SUCCESS(status) && len >= 3 && len <= 6 && + uprv_isASCIILetter(kw[0]) && uprv_isASCIILetter(kw[1])) { + // Additional Check + static icu::RegionValidateMap valid; + const char region[] = {kw[0], kw[1], '\0'}; + if (valid.isSet(region)) { + result.append(uprv_toupper(kw[0]), status); + result.append(uprv_toupper(kw[1]), status); } } return result; @@ -435,3 +447,55 @@ ulocimp_getRegionForSupplementalData(const char *localeID, bool inferRegion, return rgBuf; } + +namespace { + +// The following data is generated by unit test code inside +// test/intltest/regiontst.cpp from the resource data while +// the test failed. +const uint32_t gValidRegionMap[] = { + 0xeedf597c, 0xdeddbdef, 0x15943f3f, 0x0e00d580, + 0xb0095c00, 0x0015fb9f, 0x781c068d, 0x0340400f, + 0xf42b1d00, 0xfd4f8141, 0x25d7fffc, 0x0100084b, + 0x538f3c40, 0x40000001, 0xfdf15100, 0x9fbb7ae7, + 0x0410419a, 0x00408557, 0x00004002, 0x00100001, + 0x00400408, 0x00000001, +}; + +} // namespace + // +U_NAMESPACE_BEGIN +RegionValidateMap::RegionValidateMap() { + uprv_memcpy(map, gValidRegionMap, sizeof(map)); +} + +RegionValidateMap::~RegionValidateMap() { +} + +bool RegionValidateMap::isSet(const char* region) const { + int32_t index = value(region); + if (index < 0) { + return false; + } + return 0 != (map[index / 32] & (1L << (index % 32))); +} + +bool RegionValidateMap::equals(const RegionValidateMap& that) const { + return uprv_memcmp(map, that.map, sizeof(map)) == 0; +} + +// The code transform two letter a-z to a integer valued between -1, 26x26. +// -1 indicate the region is outside the range of two letter a-z +// the rest of value is between 0 and 676 (= 26x26) and used as an index +// the the bigmap in map. The map is an array of 22 int32_t. +// since 32x21 < 676/32 < 32x22 we store this 676 bits bitmap into 22 int32_t. +int32_t RegionValidateMap::value(const char* region) const { + if (uprv_isASCIILetter(region[0]) && uprv_isASCIILetter(region[1]) && + region[2] == '\0') { + return (uprv_toupper(region[0])-'A') * 26 + + (uprv_toupper(region[1])-'A'); + } + return -1; +} + +U_NAMESPACE_END diff --git a/deps/icu-small/source/common/loclikelysubtags.cpp b/deps/icu-small/source/common/loclikelysubtags.cpp index c182191057f4f2..7c6131197d894b 100644 --- a/deps/icu-small/source/common/loclikelysubtags.cpp +++ b/deps/icu-small/source/common/loclikelysubtags.cpp @@ -564,47 +564,40 @@ LSR LikelySubtags::makeMaximizedLsr(const char *language, const char *script, co // Handle pseudolocales like en-XA, ar-XB, fr-PSCRACK. // They should match only themselves, // not other locales with what looks like the same language and script subtags. - char c1; - if (region[0] == 'X' && (c1 = region[1]) != 0 && region[2] == 0) { - switch (c1) { - case 'A': - if (returnInputIfUnmatch) { - return LSR(language, script, region, LSR::EXPLICIT_LSR); - } - return LSR(PSEUDO_ACCENTS_PREFIX, language, script, region, - LSR::EXPLICIT_LSR, errorCode); - case 'B': - if (returnInputIfUnmatch) { - return LSR(language, script, region, LSR::EXPLICIT_LSR); - } - return LSR(PSEUDO_BIDI_PREFIX, language, script, region, - LSR::EXPLICIT_LSR, errorCode); - case 'C': - if (returnInputIfUnmatch) { - return LSR(language, script, region, LSR::EXPLICIT_LSR); + if (!returnInputIfUnmatch) { + char c1; + if (region[0] == 'X' && (c1 = region[1]) != 0 && region[2] == 0) { + switch (c1) { + case 'A': + return LSR(PSEUDO_ACCENTS_PREFIX, language, script, region, + LSR::EXPLICIT_LSR, errorCode); + case 'B': + return LSR(PSEUDO_BIDI_PREFIX, language, script, region, + LSR::EXPLICIT_LSR, errorCode); + case 'C': + return LSR(PSEUDO_CRACKED_PREFIX, language, script, region, + LSR::EXPLICIT_LSR, errorCode); + default: // normal locale + break; } - return LSR(PSEUDO_CRACKED_PREFIX, language, script, region, - LSR::EXPLICIT_LSR, errorCode); - default: // normal locale - break; } - } - if (variant[0] == 'P' && variant[1] == 'S') { - int32_t lsrFlags = *region == 0 ? - LSR::EXPLICIT_LANGUAGE | LSR::EXPLICIT_SCRIPT : LSR::EXPLICIT_LSR; - if (uprv_strcmp(variant, "PSACCENT") == 0) { - return LSR(PSEUDO_ACCENTS_PREFIX, language, script, - *region == 0 ? "XA" : region, lsrFlags, errorCode); - } else if (uprv_strcmp(variant, "PSBIDI") == 0) { - return LSR(PSEUDO_BIDI_PREFIX, language, script, - *region == 0 ? "XB" : region, lsrFlags, errorCode); - } else if (uprv_strcmp(variant, "PSCRACK") == 0) { - return LSR(PSEUDO_CRACKED_PREFIX, language, script, - *region == 0 ? "XC" : region, lsrFlags, errorCode); + if (variant[0] == 'P' && variant[1] == 'S') { + int32_t lsrFlags = *region == 0 ? + LSR::EXPLICIT_LANGUAGE | LSR::EXPLICIT_SCRIPT : LSR::EXPLICIT_LSR; + if (uprv_strcmp(variant, "PSACCENT") == 0) { + return LSR(PSEUDO_ACCENTS_PREFIX, language, script, + *region == 0 ? "XA" : region, lsrFlags, errorCode); + } else if (uprv_strcmp(variant, "PSBIDI") == 0) { + return LSR(PSEUDO_BIDI_PREFIX, language, script, + *region == 0 ? "XB" : region, lsrFlags, errorCode); + } else if (uprv_strcmp(variant, "PSCRACK") == 0) { + return LSR(PSEUDO_CRACKED_PREFIX, language, script, + *region == 0 ? "XC" : region, lsrFlags, errorCode); + } + // else normal locale } - // else normal locale - } + } // end of if (!returnInputIfUnmatch) language = getCanonical(languageAliases, language); // (We have no script mappings.) @@ -616,9 +609,9 @@ LSR LikelySubtags::maximize(const char *language, const char *script, const char bool returnInputIfUnmatch, UErrorCode &errorCode) const { if (U_FAILURE(errorCode)) { return {}; } - return maximize({language, (int32_t)uprv_strlen(language)}, - {script, (int32_t)uprv_strlen(script)}, - {region, (int32_t)uprv_strlen(region)}, + return maximize({language, static_cast<int32_t>(uprv_strlen(language))}, + {script, static_cast<int32_t>(uprv_strlen(script))}, + {region, static_cast<int32_t>(uprv_strlen(region))}, returnInputIfUnmatch, errorCode); } diff --git a/deps/icu-small/source/common/locmap.cpp b/deps/icu-small/source/common/locmap.cpp index b95eb04428b52d..da78c7716a7535 100644 --- a/deps/icu-small/source/common/locmap.cpp +++ b/deps/icu-small/source/common/locmap.cpp @@ -979,7 +979,7 @@ getHostID(const ILcidPosixMap *this_0, const char* posixID, UErrorCode& status) if (U_FAILURE(status)) { return locmap_root->hostID; } int32_t bestIdx = 0; int32_t bestIdxDiff = 0; - int32_t posixIDlen = (int32_t)uprv_strlen(posixID); + int32_t posixIDlen = static_cast<int32_t>(uprv_strlen(posixID)); uint32_t idx; for (idx = 0; idx < this_0->numRegions; idx++ ) { diff --git a/deps/icu-small/source/common/locutil.cpp b/deps/icu-small/source/common/locutil.cpp index 1abecef1c5b0a8..a257ec593a8003 100644 --- a/deps/icu-small/source/common/locutil.cpp +++ b/deps/icu-small/source/common/locutil.cpp @@ -171,7 +171,7 @@ LocaleUtility::initLocaleFromName(const UnicodeString& id, Locale& result) prev = 0; UErrorCode status = U_ZERO_ERROR; do { - i = id.indexOf((char16_t)0x40, prev); + i = id.indexOf(static_cast<char16_t>(0x40), prev); if(i < 0) { // no @ between prev and the rest of the string buffer.appendInvariantChars(id.tempSubString(prev), status); @@ -224,7 +224,7 @@ LocaleUtility::getAvailableLocaleNames(const UnicodeString& bundleID) Hashtable* htp; umtx_lock(nullptr); - htp = (Hashtable*) cache->get(bundleID); + htp = static_cast<Hashtable*>(cache->get(bundleID)); umtx_unlock(nullptr); if (htp == nullptr) { diff --git a/deps/icu-small/source/common/lstmbe.cpp b/deps/icu-small/source/common/lstmbe.cpp index fb8eb01761cd09..c1a142469c44d6 100644 --- a/deps/icu-small/source/common/lstmbe.cpp +++ b/deps/icu-small/source/common/lstmbe.cpp @@ -164,7 +164,7 @@ class Array1D : public ReadArray1D { Array1D() : memory_(nullptr), data_(nullptr), d1_(0) {} Array1D(int32_t d1, UErrorCode &status) : memory_(uprv_malloc(d1 * sizeof(float))), - data_((float*)memory_), d1_(d1) { + data_(static_cast<float*>(memory_)), d1_(d1) { if (U_SUCCESS(status)) { if (memory_ == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; @@ -301,7 +301,7 @@ class Array2D : public ReadArray2D { Array2D() : memory_(nullptr), data_(nullptr), d1_(0), d2_(0) {} Array2D(int32_t d1, int32_t d2, UErrorCode &status) : memory_(uprv_malloc(d1 * d2 * sizeof(float))), - data_((float*)memory_), d1_(d1), d2_(d2) { + data_(static_cast<float*>(memory_)), d1_(d1), d2_(d2) { if (U_SUCCESS(status)) { if (memory_ == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; @@ -526,11 +526,11 @@ void CodePointsVectorizer::vectorize( int32_t current; char16_t str[2] = {0, 0}; while (U_SUCCESS(status) && - (current = (int32_t)utext_getNativeIndex(text)) < endPos) { + (current = static_cast<int32_t>(utext_getNativeIndex(text))) < endPos) { // Since the LSTMBreakEngine is currently only accept chars in BMP, // we can ignore the possibility of hitting supplementary code // point. - str[0] = (char16_t) utext_next32(text); + str[0] = static_cast<char16_t>(utext_next32(text)); U_ASSERT(!U_IS_SURROGATE(str[0])); offsets.addElement(current, status); indices.addElement(stringToIndex(str), status); @@ -733,7 +733,7 @@ LSTMBreakEngine::divideUpDictionaryRange( UText *text, #endif // LSTM_DEBUG // current = argmax(logp) - LSTMClass current = (LSTMClass)logp.maxIndex(); + LSTMClass current = static_cast<LSTMClass>(logp.maxIndex()); // BIES logic. if (current == BEGIN || current == SINGLE) { if (i != 0) { diff --git a/deps/icu-small/source/common/messagepattern.cpp b/deps/icu-small/source/common/messagepattern.cpp index 9e318295f9a9d6..96555ce8ae3356 100644 --- a/deps/icu-small/source/common/messagepattern.cpp +++ b/deps/icu-small/source/common/messagepattern.cpp @@ -351,7 +351,7 @@ MessagePattern::autoQuoteApostropheDeep() const { for(int32_t i=count; i>0;) { const Part &part=getPart(--i); if(part.getType()==UMSGPAT_PART_TYPE_INSERT_CHAR) { - modified.insert(part.index, (char16_t)part.value); + modified.insert(part.index, static_cast<char16_t>(part.value)); } } return modified; @@ -437,7 +437,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength, if(U_FAILURE(errorCode)) { return 0; } - if(nestingLevel>Part::MAX_VALUE) { + if(nestingLevel>Part::MAX_NESTED_LEVELS) { errorCode=U_INDEX_OUTOFBOUNDS_ERROR; return 0; } @@ -628,7 +628,7 @@ MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingL } } // change the ARG_START type from NONE to argType - partsList->a[argStart].value=(int16_t)argType; + partsList->a[argStart].value = static_cast<int16_t>(argType); if(argType==UMSGPAT_ARG_TYPE_SIMPLE) { addPart(UMSGPAT_PART_TYPE_ARG_TYPE, typeIndex, length, 0, errorCode); } @@ -980,13 +980,13 @@ MessagePattern::parseDouble(int32_t start, int32_t limit, UBool allowInfinity, } // Let Double.parseDouble() throw a NumberFormatException. char numberChars[128]; - int32_t capacity=(int32_t)sizeof(numberChars); + int32_t capacity = static_cast<int32_t>(sizeof(numberChars)); int32_t length=limit-start; if(length>=capacity) { break; // number too long } msg.extract(start, length, numberChars, capacity, US_INV); - if((int32_t)uprv_strlen(numberChars)<length) { + if (static_cast<int32_t>(uprv_strlen(numberChars)) < length) { break; // contains non-invariant character that was turned into NUL } char *end; @@ -1006,7 +1006,7 @@ MessagePattern::skipWhiteSpace(int32_t index) { const char16_t *s=msg.getBuffer(); int32_t msgLength=msg.length(); const char16_t *t=PatternProps::skipWhiteSpace(s+index, msgLength-index); - return (int32_t)(t-s); + return static_cast<int32_t>(t - s); } int32_t @@ -1014,7 +1014,7 @@ MessagePattern::skipIdentifier(int32_t index) { const char16_t *s=msg.getBuffer(); int32_t msgLength=msg.length(); const char16_t *t=PatternProps::skipIdentifier(s+index, msgLength-index); - return (int32_t)(t-s); + return static_cast<int32_t>(t - s); } int32_t @@ -1105,8 +1105,8 @@ MessagePattern::addPart(UMessagePatternPartType type, int32_t index, int32_t len Part &part=partsList->a[partsLength++]; part.type=type; part.index=index; - part.length=(uint16_t)length; - part.value=(int16_t)value; + part.length = static_cast<uint16_t>(length); + part.value = static_cast<int16_t>(value); part.limitPartIndex=0; } } diff --git a/deps/icu-small/source/common/mlbe.cpp b/deps/icu-small/source/common/mlbe.cpp index 7e734f2c8adfbf..b5385428e0c57c 100644 --- a/deps/icu-small/source/common/mlbe.cpp +++ b/deps/icu-small/source/common/mlbe.cpp @@ -57,12 +57,12 @@ int32_t MlBreakEngine::divideUpRange(UText *inText, int32_t rangeStart, int32_t // moving forward, finally the last six values in the indexList are // [length-4, length-3, length-2, length-1, -1, -1]. The "+4" here means four extra "-1". int32_t indexSize = codePointLength + 4; - int32_t *indexList = (int32_t *)uprv_malloc(indexSize * sizeof(int32_t)); - if (indexList == nullptr) { + LocalMemory<int32_t> indexList(static_cast<int32_t*>(uprv_malloc(indexSize * sizeof(int32_t)))); + if (indexList.isNull()) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } - int32_t numCodeUnits = initIndexList(inString, indexList, status); + int32_t numCodeUnits = initIndexList(inString, indexList.getAlias(), status); // Add a break for the start. boundary.addElement(0, status); @@ -71,13 +71,12 @@ int32_t MlBreakEngine::divideUpRange(UText *inText, int32_t rangeStart, int32_t for (int32_t idx = 0; idx + 1 < codePointLength && U_SUCCESS(status); idx++) { numBreaks = - evaluateBreakpoint(inString, indexList, idx, numCodeUnits, numBreaks, boundary, status); + evaluateBreakpoint(inString, indexList.getAlias(), idx, numCodeUnits, numBreaks, boundary, status); if (idx + 4 < codePointLength) { indexList[idx + 6] = numCodeUnits; numCodeUnits += U16_LENGTH(inString.char32At(indexList[idx + 6])); } } - uprv_free(indexList); if (U_FAILURE(status)) return 0; diff --git a/deps/icu-small/source/common/norm2_nfc_data.h b/deps/icu-small/source/common/norm2_nfc_data.h index 3dada06c573214..89d0287c5429f0 100644 --- a/deps/icu-small/source/common/norm2_nfc_data.h +++ b/deps/icu-small/source/common/norm2_nfc_data.h @@ -9,28 +9,28 @@ #ifdef INCLUDED_FROM_NORMALIZER2_CPP -static const UVersionInfo norm2_nfc_data_formatVersion={4,0,0,0}; -static const UVersionInfo norm2_nfc_data_dataVersion={0xf,1,0,0}; +static const UVersionInfo norm2_nfc_data_formatVersion={5,0,0,0}; +static const UVersionInfo norm2_nfc_data_dataVersion={0x10,0,0,0}; static const int32_t norm2_nfc_data_indexes[Normalizer2Impl::IX_COUNT]={ -0x50,0x4cb8,0x8920,0x8a20,0x8a20,0x8a20,0x8a20,0x8a20,0xc0,0x300,0xae2,0x29e0,0x3c66,0xfc00,0x1288,0x3b9c, -0x3c34,0x3c66,0x300,0 +0x58,0x4e84,0x8c60,0x8d60,0x8d60,0x8d60,0x8d60,0x8d60,0xc0,0x300,0xb0c,0x2a6a,0x3cf0,0xfbc4,0x12c2,0x3c26, +0x3cbe,0x3cf0,0x300,0,0xfb10,0xfb9e }; -static const uint16_t norm2_nfc_data_trieIndex[1788]={ +static const uint16_t norm2_nfc_data_trieIndex[1869]={ 0,0x40,0x7b,0xbb,0xfb,0x13a,0x17a,0x1b2,0x1f2,0x226,0x254,0x226,0x294,0x2d4,0x313,0x353, 0x393,0x3d2,0x40f,0x44e,0x226,0x226,0x488,0x4c8,0x4f8,0x530,0x226,0x570,0x59f,0x5de,0x226,0x5f3, -0x631,0x65f,0x687,0x6bd,0x6fd,0x73a,0x75a,0x799,0x7d8,0x815,0x834,0x871,0x75a,0x8aa,0x8d8,0x917, -0x834,0x951,0x968,0x9a8,0x9bf,0x9fe,0x226,0xa34,0xa54,0xa8f,0xa9b,0xad6,0xafe,0xb3b,0xb7b,0xbb5, -0xbd0,0x226,0xc0b,0x226,0xc4b,0xc6a,0xca0,0xcdd,0x226,0x226,0x226,0x226,0x226,0xd00,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xd2c,0x226,0x226,0xd61, -0x226,0x226,0xd7f,0x226,0xda9,0x226,0x226,0x226,0xde5,0xe05,0xe45,0xe84,0xebf,0xeff,0xf33,0xf5f, -0x839,0x226,0x226,0xf93,0x226,0x226,0x226,0xfd3,0x1013,0x1053,0x1093,0x10d3,0x1113,0x1153,0x1193,0x11d3, -0x1213,0x226,0x226,0x1243,0x1274,0x226,0x12a4,0x12d7,0x1314,0x1353,0x1393,0x13c9,0x13f7,0x226,0x226,0x226, +0x631,0x65f,0x688,0x6be,0x6fe,0x73b,0x75b,0x79a,0x7d9,0x816,0x835,0x872,0x75b,0x8ab,0x8d9,0x918, +0x835,0x952,0x969,0x9a9,0x9c0,0x9ff,0x226,0xa35,0xa55,0xa90,0xa9c,0xad7,0xaff,0xb3c,0xb7c,0xbb6, +0xbd1,0x226,0xc0c,0x226,0xc4c,0xc6b,0xca1,0xcde,0x226,0x226,0x226,0x226,0x226,0xd01,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xd2d,0x226,0x226,0xd62, +0x226,0x226,0xd80,0x226,0xdaa,0x226,0x226,0x226,0xde6,0xe06,0xe46,0xe85,0xec0,0xf00,0xf34,0xf60, +0x83a,0x226,0x226,0xf94,0x226,0x226,0x226,0xfd4,0x1014,0x1054,0x1094,0x10d4,0x1114,0x1154,0x1194,0x11d4, +0x1214,0x226,0x226,0x1244,0x1275,0x226,0x12a5,0x12d8,0x1315,0x1354,0x1394,0x13ca,0x13f8,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1422,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0xcee,0x226,0x143f,0x226,0x147f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x14bf,0x14f9,0x1537,0x1577,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1423,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0xcef,0x226,0x1440,0x226,0x1480,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x14c0,0x14fa,0x1538,0x1578,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, @@ -59,20 +59,20 @@ static const uint16_t norm2_nfc_data_trieIndex[1788]={ 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x15b6,0x15f4,0x1614,0x226,0x226,0x226,0x226, -0x164e,0x226,0x226,0x1676,0x16a8,0x16d6,0x83d,0x16e9,0x226,0x226,0x16f9,0x1739,0x226,0x226,0x226,0x1451, -0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781, -0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791, -0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785, -0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779, -0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789, -0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d, -0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d, -0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781, -0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791, -0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785, -0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x178d,0x1779,0x1781,0x1789,0x1791,0x177d,0x1785,0x17c5,0x226, -0x1805,0x1840,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x15b7,0x15f5,0x1615,0x226,0x226,0x226,0x226, +0x164f,0x226,0x226,0x1677,0x16a9,0x16d7,0x83e,0x16ea,0x226,0x226,0x16fa,0x173a,0x226,0x226,0x226,0x1452, +0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782, +0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792, +0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786, +0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a, +0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a, +0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e, +0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e, +0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782, +0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792, +0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786, +0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x178e,0x177a,0x1782,0x178a,0x1792,0x177e,0x1786,0x17c6,0x226, +0x1806,0x1841,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, @@ -80,59 +80,64 @@ static const uint16_t norm2_nfc_data_trieIndex[1788]={ 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x1880,0x18c0,0x1900,0x1940,0x1980,0x19c0,0x1a00,0x1a40,0x1a63,0x1aa3,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ac3,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x67e,0x68e,0x6a6,0x6c5,0x6da,0x6da,0x6da,0x6de,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x1881,0x18c1,0x1901,0x1941,0x1981,0x19c1,0x1a01,0x1a41,0x1a64,0x1aa4,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ac4,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x6cf,0x6df,0x6f7,0x716,0x72b,0x72b,0x72b,0x72f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc0b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc0c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x54f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x40c, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1af6,0x226,0x226,0x1b06,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0xdf7,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1b16,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1607,0x226,0x226,0x226,0x226,0x66b,0x226,0x226,0x226, -0x226,0x1b20,0x54f,0x226,0x226,0x1b30,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x81c,0x226,0x226, -0x1b40,0x226,0x1b50,0x1b5d,0x1b69,0x226,0x226,0x226,0x226,0x414,0x226,0x1b74,0x1b84,0x226,0x226,0x226, -0x811,0x226,0x226,0x226,0x226,0x1b94,0x226,0x226,0x226,0x1b9f,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x1ba6,0x226,0x226,0x226,0x226,0x1bb1,0x1bc0,0x927,0x1bce,0x412,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x1bdc,0x7c9,0x226,0x226,0x226,0x226,0x226,0x1bec,0x1bfb,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x907,0x1c03,0x1c13,0x226, -0x226,0x226,0x9eb,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c1d,0x226,0x226,0x226,0x226,0x226, -0x226,0x817,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c1a, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c2d, -0x811,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x87e,0x226,0x226,0x226,0x81e,0x81b, -0x226,0x226,0x226,0x226,0x819,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x9eb,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc05,0x226,0x226,0x226, -0x226,0x81b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0xc08,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x1c3d,0x226,0x226,0x226,0xf2c,0x226,0x226,0x226,0x226,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c4d,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x1c4f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c5e,0x1c6e,0x1c7c,0x1c89,0x226, -0x1c95,0x1ca3,0x1cb3,0x226,0x226,0x226,0x226,0xd1b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1afb,0x1b09,0x1b15,0x226, +0x1b1a,0x226,0x226,0x1b2a,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xdf8,0x226, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x1cc3,0x1ccb,0x1cd9,0x226,0x226,0x226,0x226,0x226,0x4f9,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x7c9,0x226,0x226,0x226,0x4fc,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ce4,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cf4,0x226,0x226,0x226,0x226, -0x226,0x226,0x1d00,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d10,0x1d20, -0x1d30,0x1d40,0x1d50,0x1d60,0x1d70,0x1d80,0x1d90,0x1da0,0x1db0,0x1dc0,0x1dd0,0x1de0,0x1df0,0x1e00,0x1e10,0x1e20, -0x1e30,0x1e40,0x1e50,0x1e60,0x1e70,0x1e80,0x1e90,0x1ea0,0x1eb0,0x1ec0,0x1ed0,0x1ee0,0x1ef0,0x1f00,0x1f10,0x1f20, +0x226,0x1b3a,0x226,0x226,0x226,0x1b42,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x1608,0x226,0x226,0x226,0x226,0x66b,0x226,0x226,0x226,0x226,0x1b50,0x54f,0x226,0x226,0x1b60,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x81d,0x226,0x226,0x1b70,0x226,0x1b80,0x1b8d,0x1b99,0x226,0x226, +0x226,0x226,0x414,0x226,0x1ba4,0x1bb4,0x226,0x226,0x226,0x812,0x226,0x226,0x226,0x226,0x1bc4,0x226, +0x226,0x226,0x1bcf,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1bd6,0x226,0x226, +0x226,0x226,0x1be1,0x1bf0,0x928,0x1bfe,0x412,0x1c0c,0x1c1c,0x226,0x1c24,0x1c32,0x87f,0x226,0x226,0x226, +0x226,0x1c42,0x7ca,0x226,0x226,0x226,0x226,0x226,0x1c52,0x1c61,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x908,0x1c69,0x1c79,0x226,0x226,0x226,0x9ec,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x1c83,0x226,0x226,0x226,0x226,0x226,0x226,0x818,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c80,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c93,0x812,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x87f,0x226,0x226,0x226,0x81f,0x81c,0x226,0x226,0x226,0x226,0x81a, 0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, -0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x408,0x428, -0xc4,0xc4,0xc4,0x448,0x457,0x46d,0x489,0x4a6,0x4c2,0x4df,0x4fc,0x51b,0x538,0x552,0xc4,0xc4, -0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, -0xc4,0xc4,0xc4,0x567,0xc4,0x57b,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, +0x226,0x226,0x226,0x226,0x226,0x226,0x9ec,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc06,0x226,0x226,0x226,0x226,0x81c,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0xc09,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x1ca2,0x1cb1,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x1cc1,0x226,0x226,0x226,0xf2d,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cce, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cde, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ce0,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x1cef,0x1cff,0x1d0d,0x1d1a,0x226,0x1d26,0x1d34,0x1d44,0x226,0x226,0x226,0x226,0xd1c,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d54,0x1d5c,0x1d6a,0x226,0x226,0x226,0x226,0x226, +0x4f9,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xf2d,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x7ca,0x226,0x226,0x226,0x4fc,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d75,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x5c1,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d85,0x226,0x226,0x226, +0x226,0x226,0x226,0x1d91,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1da1, +0x1db1,0x1dc1,0x1dd1,0x1de1,0x1df1,0x1e01,0x1e11,0x1e21,0x1e31,0x1e41,0x1e51,0x1e61,0x1e71,0x1e81,0x1e91,0x1ea1, +0x1eb1,0x1ec1,0x1ed1,0x1ee1,0x1ef1,0x1f01,0x1f11,0x1f21,0x1f31,0x1f41,0x1f51,0x1f61,0x1f71,0x1f81,0x1f91,0x1fa1, +0x1fb1,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226, +0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x408, +0x428,0x440,0xc4,0xc4,0x460,0x46f,0x486,0x4a2,0x4bf,0x4dd,0x4fa,0x517,0x536,0x553,0x56d,0xc4, +0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x582, +0xc4,0xc4,0xc4,0xc4,0x595,0x5a9,0x5c0,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, 0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, -0xc4,0xc4,0xc4,0xc4,0x59b,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x5a6,0x5c3,0xc4, -0xc4,0xc4,0xc4,0xc4,0xc4,0x5e3,0x5f9,0x60b,0xc4,0x61e,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, +0xc4,0xc4,0xc4,0xc4,0xc4,0x5e0,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x5eb,0x608, +0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x628,0x63e,0x650,0xc4,0x66f,0xc4,0xc4,0xc4,0xc4,0xc4, 0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4, -0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x63e,0x65e +0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x68f,0x6af }; -static const uint16_t norm2_nfc_data_trieData[7984]={ +static const uint16_t norm2_nfc_data_trieData[8129]={ 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, @@ -144,30 +149,30 @@ static const uint16_t norm2_nfc_data_trieData[7984]={ 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,0x5e8,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,0x128a,0x1290,0xae4,0x1296,0xafa, -0xb04,0x5f4,0xb0e,0x129c,0x12a2,0xb18,0x12a8,0x12ae,0x12b4,0x12ba,0xb2e,1,0x12c0,0x12c6,0x12cc,0xb38, -0xb4e,0xb60,1,0x5fc,0x12d2,0x12d8,0x12de,0xb6a,0x12e4,1,1,0x12ea,0x12f0,0xb80,0x12f6,0xb96, -0xba0,0x600,0xbaa,0x12fc,0x1302,0xbb4,0x1308,0x130e,0x1314,0x131a,0xbca,1,0x1320,0x1326,0x132c,0xbd4, -0xbea,0xbfc,1,0x608,0x1332,0x1338,0x133e,0xc06,0x1344,1,0x134a,0x1350,0x1356,0xc1c,0xc32,0x135d, -0x1363,0x1368,0x136e,0x1374,0x137a,0x1380,0x1386,0x138c,0x1392,0x1398,0x139e,1,1,0xc48,0xc56,0x13a4, -0x13aa,0x13b0,0x13b6,0x13bd,0x13c3,0x13c8,0x13ce,0x13d4,0x13da,0x13e0,0x13e6,0x13ec,0x13f2,0x13f9,0x13ff,0x1404, -0x140a,1,1,0x1410,0x1416,0x141c,0x1422,0x1428,0x142e,0x1435,0x143b,0x1440,1,1,1,0x1447, -0x144d,0x1453,0x1459,1,0x145e,0x1464,0x146b,0x1471,0x1476,0x147c,1,1,1,0x1482,0x1488,0x148f, -0x1495,0x149a,0x14a0,1,1,1,0xc64,0xc72,0x14a6,0x14ac,0x14b2,0x14b8,1,1,0x14be,0x14c4, -0x14cb,0x14d1,0x14d6,0x14dc,0xc80,0xc8a,0x14e2,0x14e8,0x14ef,0x14f5,0xc94,0xc9e,0x14fb,0x1501,0x1506,0x150c, -1,1,0xca8,0xcb2,0xcbc,0xcc6,0x1512,0x1518,0x151e,0x1524,0x152a,0x1530,0x1537,0x153d,0x1542,0x1548, -0x154e,0x1554,0x155a,0x1560,0x1566,0x156c,0x1572,0x1578,0x157e,0x60c,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,0xcd0,0xcea,1,1,1,1, -1,1,1,1,1,1,1,1,1,0xd04,0xd1e,1,1,1,1,1, -1,0x610,1,1,1,1,1,1,1,1,1,1,1,1,1,0x1584, -0x158a,0x1590,0x1596,0x159c,0x15a2,0x15a8,0x15ae,0x15b6,0x15c0,0x15ca,0x15d4,0x15de,0x15e8,0x15f2,0x15fc,1, -0x1606,0x1610,0x161a,0x1624,0x162d,0x1633,1,1,0x1638,0x163e,0x1644,0x164a,0xd38,0xd42,0x1653,0x165d, -0x1665,0x166b,0x1671,1,1,1,0x1676,0x167c,1,1,0x1682,0x1688,0x1690,0x169a,0x16a3,0x16a9, -0x16af,0x16b5,0x16ba,0x16c0,0x16c6,0x16cc,0x16d2,0x16d8,0x16de,0x16e4,0x16ea,0x16f0,0x16f6,0x16fc,0x1702,0x1708, -0x170e,0x1714,0x171a,0x1720,0x1726,0x172c,0x1732,0x1738,0x173e,0x1744,0x174a,0x1750,0x1756,0x175c,1,1, -0x1762,0x1768,1,1,1,1,1,1,0xd4c,0xd56,0xd60,0xd6a,0x1770,0x177a,0x1784,0x178e, -0xd74,0xd7e,0x1798,0x17a2,0x17aa,0x17b0,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,0x12c4,0x12ca,0xb0e,0x12d0,0xb24, +0xb2e,0x5f4,0xb38,0x12d6,0x12dc,0xb42,0x12e2,0x12e8,0x12ee,0x12f4,0xb58,1,0x12fa,0x1300,0x1306,0xb62, +0xb78,0xb8a,1,0x5fc,0x130c,0x1312,0x1318,0xb94,0x131e,1,1,0x1324,0x132a,0xbaa,0x1330,0xbc0, +0xbca,0x600,0xbd4,0x1336,0x133c,0xbde,0x1342,0x1348,0x134e,0x1354,0xbf4,1,0x135a,0x1360,0x1366,0xbfe, +0xc14,0xc26,1,0x608,0x136c,0x1372,0x1378,0xc30,0x137e,1,0x1384,0x138a,0x1390,0xc46,0xc5c,0x1397, +0x139d,0x13a2,0x13a8,0x13ae,0x13b4,0x13ba,0x13c0,0x13c6,0x13cc,0x13d2,0x13d8,1,1,0xc72,0xc80,0x13de, +0x13e4,0x13ea,0x13f0,0x13f7,0x13fd,0x1402,0x1408,0x140e,0x1414,0x141a,0x1420,0x1426,0x142c,0x1433,0x1439,0x143e, +0x1444,1,1,0x144a,0x1450,0x1456,0x145c,0x1462,0x1468,0x146f,0x1475,0x147a,1,1,1,0x1481, +0x1487,0x148d,0x1493,1,0x1498,0x149e,0x14a5,0x14ab,0x14b0,0x14b6,1,1,1,0x14bc,0x14c2,0x14c9, +0x14cf,0x14d4,0x14da,1,1,1,0xc8e,0xc9c,0x14e0,0x14e6,0x14ec,0x14f2,1,1,0x14f8,0x14fe, +0x1505,0x150b,0x1510,0x1516,0xcaa,0xcb4,0x151c,0x1522,0x1529,0x152f,0xcbe,0xcc8,0x1535,0x153b,0x1540,0x1546, +1,1,0xcd2,0xcdc,0xce6,0xcf0,0x154c,0x1552,0x1558,0x155e,0x1564,0x156a,0x1571,0x1577,0x157c,0x1582, +0x1588,0x158e,0x1594,0x159a,0x15a0,0x15a6,0x15ac,0x15b2,0x15b8,0x60c,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,0xcfa,0xd14,1,1,1,1, +1,1,1,1,1,1,1,1,1,0xd2e,0xd48,1,1,1,1,1, +1,0x610,1,1,1,1,1,1,1,1,1,1,1,1,1,0x15be, +0x15c4,0x15ca,0x15d0,0x15d6,0x15dc,0x15e2,0x15e8,0x15f0,0x15fa,0x1604,0x160e,0x1618,0x1622,0x162c,0x1636,1, +0x1640,0x164a,0x1654,0x165e,0x1667,0x166d,1,1,0x1672,0x1678,0x167e,0x1684,0xd62,0xd6c,0x168d,0x1697, +0x169f,0x16a5,0x16ab,1,1,1,0x16b0,0x16b6,1,1,0x16bc,0x16c2,0x16ca,0x16d4,0x16dd,0x16e3, +0x16e9,0x16ef,0x16f4,0x16fa,0x1700,0x1706,0x170c,0x1712,0x1718,0x171e,0x1724,0x172a,0x1730,0x1736,0x173c,0x1742, +0x1748,0x174e,0x1754,0x175a,0x1760,0x1766,0x176c,0x1772,0x1778,0x177e,0x1784,0x178a,0x1790,0x1796,1,1, +0x179c,0x17a2,1,1,1,1,1,1,0xd76,0xd80,0xd8a,0xd94,0x17aa,0x17b4,0x17be,0x17c8, +0xd9e,0xda8,0x17d2,0x17dc,0x17e4,0x17ea,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, @@ -178,34 +183,34 @@ static const uint16_t norm2_nfc_data_trieData[7984]={ 0xfdcc,0xffcc,0xffcc,0xfdcc,0xffcc,0xfdcc,0xffcc,0xfdcc,0xfdcc,0xffd0,0xffb8,0xffb8,0xffb8,0xffb8,0xffd0,0xfdb0, 0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xff94,0xff94,0xfdb8,0xfdb8,0xfdb8,0xfdb8,0xfd94,0xfd94,0xffb8,0xffb8,0xffb8, 0xffb8,0xfdb8,0xfdb8,0xffb8,0xfdb8,0xfdb8,0xffb8,0xffb8,0xfe02,0xfe02,0xfe02,0xfe02,0xfc02,0xffb8,0xffb8,0xffb8, -0xffb8,0xffcc,0xffcc,0xffcc,0x3c36,0x3c3c,0xfdcc,0x3c42,0x3c48,0xfde0,0xffcc,0xffb8,0xffb8,0xffb8,0xffcc,0xffcc, +0xffb8,0xffcc,0xffcc,0xffcc,0x3cc0,0x3cc6,0xfdcc,0x3ccc,0x3cd2,0xfde0,0xffcc,0xffb8,0xffb8,0xffb8,0xffcc,0xffcc, 0xffcc,0xffb8,0xffb8,1,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffcc,0xffd0,0xffb8,0xffb8,0xffcc, 0xffd2,0xffd4,0xffd4,0xffd2,0xffd4,0xffd4,0xffd2,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,0x29e1,1,1,1,1,1,1,1, -1,1,0x29e5,1,1,1,1,1,0x17b7,0x17bd,0x29e9,0x17c3,0x17c9,0x17cf,1,0x17d5, -1,0x17db,0x17e1,0x17e9,0x618,1,1,1,0x634,1,0x644,1,0x658,1,1,1, -1,1,0x674,1,0x684,1,1,1,0x688,1,1,1,0x6a0,0x17f1,0x17f7,0xd88, -0x17fd,0xd92,0x1803,0x180b,0x6b4,1,1,1,0x6d4,1,0x6e4,1,0x6fc,1,1,1, -1,1,0x71c,1,0x72c,1,1,1,0x734,1,1,1,0x754,0xd9c,0xdae,0x1813, -0x1819,0xdc0,1,1,1,0x76c,0x181f,0x1825,1,1,1,1,1,1,1,1, +0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,0x2a6b,1,1,1,1,1,1,1, +1,1,0x2a6f,1,1,1,1,1,0x17f1,0x17f7,0x2a73,0x17fd,0x1803,0x1809,1,0x180f, +1,0x1815,0x181b,0x1823,0x618,1,1,1,0x634,1,0x644,1,0x658,1,1,1, +1,1,0x674,1,0x684,1,1,1,0x688,1,1,1,0x6a0,0x182b,0x1831,0xdb2, +0x1837,0xdbc,0x183d,0x1845,0x6b4,1,1,1,0x6d4,1,0x6e4,1,0x6fc,1,1,1, +1,1,0x71c,1,0x72c,1,1,1,0x734,1,1,1,0x754,0xdc6,0xdd8,0x184d, +0x1853,0xdea,1,1,1,0x76c,0x1859,0x185f,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,0x182b,0x1831,1,0x1837,1,1,0x774,0x183d,1,1,1,1,0x1843, -0x1849,0x184f,1,0x778,1,1,0x780,1,0x784,0x790,0x798,0x79c,0x1855,0x7ac,1,1, +1,1,1,0x1865,0x186b,1,0x1871,1,1,0x774,0x1877,1,1,1,1,0x187d, +0x1883,0x1889,1,0x778,1,1,0x780,1,0x784,0x790,0x798,0x79c,0x188f,0x7ac,1,1, 1,0x7b0,1,1,1,1,0x7b4,1,1,1,0x7c4,1,1,1,0x7c8,1, -0x7cc,1,1,0x7d0,1,1,0x7d8,1,0x7dc,0x7e8,0x7f0,0x7f4,0x185b,0x804,1,1, +0x7cc,1,1,0x7d0,1,1,0x7d8,1,0x7dc,0x7e8,0x7f0,0x7f4,0x1895,0x804,1,1, 1,0x808,1,1,1,0x80c,1,1,1,0x81c,1,1,1,0x820,1,0x824, -1,1,0x1861,0x1867,1,0x186d,1,1,0x828,0x1873,1,1,1,1,0x1879,0x187f, -0x1885,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,0x82c,0x830,0x188b,0x1891,1,1,1,1,1,1, +1,1,0x189b,0x18a1,1,0x18a7,1,1,0x828,0x18ad,1,1,1,1,0x18b3,0x18b9, +0x18bf,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,0x82c,0x830,0x18c5,0x18cb,1,1,1,1,1,1, 1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,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,0x1897, -0x189d,1,1,1,1,1,1,1,1,1,1,1,1,1,0x18a3,0x18a9, -0x18af,0x18b5,1,1,0x18bb,0x18c1,0x834,0x838,0x18c7,0x18cd,0x18d3,0x18d9,0x18df,0x18e5,1,1, -0x18eb,0x18f1,0x18f7,0x18fd,0x1903,0x1909,0x83c,0x840,0x190f,0x1915,0x191b,0x1921,0x1927,0x192d,0x1933,0x1939, -0x193f,0x1945,0x194b,0x1951,1,1,0x1957,0x195d,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x18d1, +0x18d7,1,1,1,1,1,1,1,1,1,1,1,1,1,0x18dd,0x18e3, +0x18e9,0x18ef,1,1,0x18f5,0x18fb,0x834,0x838,0x1901,0x1907,0x190d,0x1913,0x1919,0x191f,1,1, +0x1925,0x192b,0x1931,0x1937,0x193d,0x1943,0x83c,0x840,0x1949,0x194f,0x1955,0x195b,0x1961,0x1967,0x196d,0x1973, +0x1979,0x197f,0x1985,0x198b,1,1,0x1991,0x1997,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc, 0xffcc,0xffcc,0xffbc,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8, 0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffbc,0xffc8,0xffcc,0xfe14,0xfe16,0xfe18,0xfe1a,0xfe1c,0xfe1e,0xfe20,0xfe22, @@ -214,14 +219,14 @@ static const uint16_t norm2_nfc_data_trieData[7984]={ 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,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xfe3c,0xfe3e,0xfe40,1,1,1,1,1,1,1,0x1962,0x1968,0x196f,0x1975,0x197b,0x844, +0xfe3c,0xfe3e,0xfe40,1,1,1,1,1,1,1,0x199c,0x19a2,0x19a9,0x19af,0x19b5,0x844, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,0x850,1,0x854,0xfe36,0xfe38,0xfe3a,0xfe3c,0xfe3e, 0xfe40,0xfe42,0xfe44,0xfdcc,0xfdcc,0xfdb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffb8, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0xfe46,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -0x1981,0x858,0x1987,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,0x85c,0x198d,1,0x860,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,0xffcc, +0x19bb,0x858,0x19c1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,0x85c,0x19c7,1,0x860,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,0xffcc, 0xffcc,0xffcc,0xffcc,0xffb8,0xffcc,1,1,0xffcc,0xffcc,1,0xffb8,0xffcc,0xffcc,0xffb8,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0xfe48,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -239,405 +244,415 @@ static const uint16_t norm2_nfc_data_trieData[7984]={ 1,1,1,1,1,1,1,1,0xffb8,0xffb8,0xffb8,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,0xffcc, -0xffb8,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1, +0xffcc,0xffb8,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,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,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8, -0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1, -0xffb8,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xfe36,0xfe38,0xfe3a, -0xffcc,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,1, +1,1,1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8, +0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, +1,0xffb8,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xfe36,0xfe38, +0xfe3a,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,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,0x864,0x1993,1,1,1,1,1,1,0x868,0x1999,1, -0x86c,0x199f,1,1,1,1,1,1,1,0xfc0e,1,1,1,1,1,1, -1,1,1,1,1,1,1,0xfe12,1,1,1,0xffcc,0xffb8,0xffcc,0xffcc,1, -1,1,0x29ec,0x29f2,0x29f8,0x29fe,0x2a04,0x2a0a,0x2a10,0x2a16,1,1,1,1,1,1, +1,1,1,1,1,1,0x864,0x19cd,1,1,1,1,1,1,0x868,0x19d3, +1,0x86c,0x19d9,1,1,1,1,1,1,1,0xfc0e,1,1,1,1,1, +1,1,1,1,1,1,1,1,0xfe12,1,1,1,0xffcc,0xffb8,0xffcc,0xffcc, +1,1,1,0x2a76,0x2a7c,0x2a82,0x2a88,0x2a8e,0x2a94,0x2a9a,0x2aa0,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,0xfe0e,1,0xfc00,1,1,1,1,1,1,1, -0x870,1,1,1,0x19a5,0x19ab,0xfe12,1,1,1,1,1,1,1,1,1, -0xfc00,1,1,1,1,0x2a1c,0x2a22,1,0x2a28,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,0xfe0e,1,0xfc00,1,1,1,1,1,1, +1,0x870,1,1,1,0x19df,0x19e5,0xfe12,1,1,1,1,1,1,1,1, +1,0xfc00,1,1,1,1,0x2aa6,0x2aac,1,0x2ab2,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,0xffcc,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0xffcc,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,0x2a2e,1,1,0x2a34,1, -1,1,1,1,0xfe0e,1,1,1,1,1,1,1,1,1,1,1, -1,1,0xfe12,1,1,1,1,1,1,1,1,1,1,1,0x2a3a,0x2a40, -0x2a46,1,1,0x2a4c,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,0x2ab8,1,1,0x2abe, +1,1,1,1,1,0xfe0e,1,1,1,1,1,1,1,1,1,1, +1,1,1,0xfe12,1,1,1,1,1,1,1,1,1,1,1,0x2ac4, +0x2aca,0x2ad0,1,1,0x2ad6,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, -0xfe0e,1,1,1,1,1,1,1,1,1,1,1,1,1,0xfe12,1, +1,0xfe0e,1,1,1,1,1,1,1,1,1,1,1,1,1,0xfe12, 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,0x878,0x19b1,1,1,0x19b7,0x19bd,0xfe12,1,1,1,1,1,1,1,1, -0xfc00,0xfc00,1,1,1,1,0x2a52,0x2a58,1,1,1,1,1,1,1,1, +1,1,0x878,0x19eb,1,1,0x19f1,0x19f7,0xfe12,1,1,1,1,1,1,1, +1,0xfc00,0xfc00,1,1,1,1,0x2adc,0x2ae2,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,0x884,1,0x19c3,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,0x884,1,0x19fd,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,0xfc00,1,1,1,1,1,1,0x888,0x890,1, -1,0x19c9,0x19cf,0x19d5,0xfe12,1,1,1,1,1,1,1,1,1,0xfc00,1, +1,1,1,1,1,1,1,0xfc00,1,1,1,1,1,1,0x888,0x890, +1,1,0x1a03,0x1a09,0x1a0f,0xfe12,1,1,1,1,1,1,1,1,1,0xfc00, 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,0x894,1,0x19db,1,1,1,1,0xfe12,1, -1,1,1,1,1,1,0xfea8,0xfcb6,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0x894,1,0x1a15,1,1,1,1,0xfe12, +1,1,1,1,1,1,1,0xfea8,0xfcb6,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,0xfe0e,1,1,0x898,0x19e1,1,0xfc00,1,1,1,0x89c,0x19e7, -0x19ed,1,0xdca,0x19f5,1,0xfe12,1,1,1,1,1,1,1,0xfc00,0xfc00,1, +1,1,1,1,1,0xfe0e,1,1,0x898,0x1a1b,1,0xfc00,1,1,1,0x89c, +0x1a21,0x1a27,1,0xdf4,0x1a2f,1,0xfe12,1,1,1,1,1,1,1,0xfc00,0xfc00, 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,0xfe12,0xfe12,1,0xfc00,1,1, -1,1,1,1,0x8a8,0x8b0,1,1,0x19fd,0x1a03,0x1a09,0xfe12,1,1,1,1, -1,1,1,1,1,0xfc00,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,0xfe12,0xfe12,1,0xfc00,1, +1,1,1,1,1,0x8a8,0x8b0,1,1,0x1a37,0x1a3d,0x1a43,0xfe12,1,1,1, +1,1,1,1,1,1,0xfc00,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,0xfc12,1, -1,1,1,0xfc00,1,1,1,1,1,1,1,1,1,0x8b4,0x1a0f,1, -0xdd4,0x1a17,0x1a1f,0xfc00,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,0xfc12, +1,1,1,1,0xfc00,1,1,1,1,1,1,1,1,1,0x8b4,0x1a49, +1,0xdfe,0x1a51,0x1a59,0xfc00,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,0xfece,0xfece,0xfe12,1, -1,1,1,1,1,1,1,0xfed6,0xfed6,0xfed6,0xfed6,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,0xfece,0xfece,0xfe12, +1,1,1,1,1,1,1,1,0xfed6,0xfed6,0xfed6,0xfed6,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,0xfeec,0xfeec,0xfe12,1,1,1,1,1,1,1,1,0xfef4,0xfef4, -0xfef4,0xfef4,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0xfeec,0xfeec,0xfe12,1,1,1,1,1,1,1,1,0xfef4, +0xfef4,0xfef4,0xfef4,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,0xffb8,0xffb8,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,0xffb8,0xffb8,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,0xffb8,1,0xffb8,1,0xffb0,1,1,1,1,1,1,0x2a5f,1, -1,1,1,1,1,1,1,1,0x2a65,1,1,1,1,0x2a6b,1,1, -1,1,0x2a71,1,1,1,1,0x2a77,1,1,1,1,1,1,1,1, -1,1,1,1,0x2a7d,1,1,1,1,1,1,1,0xff02,0xff04,0x3c50,0xff08, -0x3c58,0x2a82,1,0x2a88,1,0xff04,0xff04,0xff04,0xff04,1,1,0xff04,0x3c60,0xffcc,0xffcc,0xfe12, -1,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,0x2a8f,1, -1,1,1,1,1,1,1,1,0x2a95,1,1,1,1,0x2a9b,1,1, -1,1,0x2aa1,1,1,1,1,0x2aa7,1,1,1,1,1,1,1,1, -1,1,1,1,0x2aad,1,1,1,1,1,1,0xffb8,1,1,1,1, +1,1,1,1,0xffb8,1,0xffb8,1,0xffb0,1,1,1,1,1,1,0x2ae9, +1,1,1,1,1,1,1,1,1,0x2aef,1,1,1,1,0x2af5,1, +1,1,1,0x2afb,1,1,1,1,0x2b01,1,1,1,1,1,1,1, +1,1,1,1,1,0x2b07,1,1,1,1,1,1,1,0xff02,0xff04,0x3cda, +0xff08,0x3ce2,0x2b0c,1,0x2b12,1,0xff04,0xff04,0xff04,0xff04,1,1,0xff04,0x3cea,0xffcc,0xffcc, +0xfe12,1,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,0x2b19, +1,1,1,1,1,1,1,1,1,0x2b1f,1,1,1,1,0x2b25,1, +1,1,1,0x2b2b,1,1,1,1,0x2b31,1,1,1,1,1,1,1, +1,1,1,1,1,0x2b37,1,1,1,1,1,1,0xffb8,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,0x8c0,0x1a25,1,1,1,1,1,1,1,0xfc00,1, -1,1,1,1,1,1,1,0xfe0e,1,0xfe12,0xfe12,1,1,1,1,1, -1,1,1,1,1,1,1,1,0xffb8,1,1,1,1,1,1,1, +1,1,1,1,1,1,0x8c0,0x1a5f,1,1,1,1,1,1,1,0xfc00, +1,1,1,1,1,1,1,1,0xfe0e,1,0xfe12,0xfe12,1,1,1,1, +1,1,1,1,1,1,1,1,1,0xffb8,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,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,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,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00, +1,1,1,1,1,1,1,1,1,1,1,1,0xfe00,0xfe00,0xfe00,0xfe00, 0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00, +0xfe00,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,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00, +1,1,1,1,1,1,1,1,1,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00, 0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00,0xfe00, +0xfe00,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,0xffcc,0xffcc, +0xffcc,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,0xffcc,0xffcc,0xffcc, +1,0xfe12,0xfe12,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,0xfe12,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0xfe12,1,1,1,1,1,1,1,1,1,1,0xffcc, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -0xfe12,0xfe12,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, -0xfe12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,0xfe12,1,1,1,1,1,1,1,1,1,1,0xffcc,1, +1,1,1,1,1,1,1,1,1,0xffc8,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,0xffc8,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,0xffbc,0xffcc,0xffb8,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,0xffcc,0xffb8,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,0xffbc,0xffcc,0xffb8,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,0xffcc,0xffb8,1,1, +1,1,1,1,1,1,0xfe12,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, +0xffcc,0xffcc,0xffcc,1,1,0xffb8,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,0xfe12,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,1,1,0xffb8,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8, +0xffb8,0xffcc,0xffcc,0xffb8,1,0xffb8,0xffcc,0xffcc,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8, +0xffcc,0xffcc,0xffcc,0xffcc,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,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8, -0xffcc,0xffcc,0xffb8,1,0xffb8,0xffcc,0xffcc,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc, -0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,0x8c4,0x1a65,0x8c8,0x1a6b,0x8cc,0x1a71,0x8d0,0x1a77,0x8d4,0x1a7d,1, +1,0x8d8,0x1a83,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,0xfe0e,0xfc00,1,1,1,1,0x8dc,0x1a89,0x8e0,0x1a8f,0x8e4,0x8e8, +0x1a95,0x1a9b,0x8ec,0x1aa1,0xfe12,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,0x8c4,0x1a2b,0x8c8,0x1a31,0x8cc,0x1a37,0x8d0,0x1a3d,0x8d4,0x1a43,1,1, -0x8d8,0x1a49,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,0xffcc,0xffb8,0xffcc,0xffcc,0xffcc, +0xffcc,0xffcc,0xffcc,0xffcc,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,0xfe0e,0xfc00,1,1,1,1,0x8dc,0x1a4f,0x8e0,0x1a55,0x8e4,0x8e8,0x1a5b, -0x1a61,0x8ec,0x1a67,0xfe12,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,0xfe12,0xfe12, 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,0xffcc,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,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,0xfe12,0xfe12,1, +1,1,1,1,1,1,0xfe0e,1,1,1,1,1,1,1,1,1, +1,1,0xfe12,0xfe12,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0xffcc,0xffcc,0xffcc,1,0xfe02,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffcc,0xffcc, +0xffb8,0xffb8,0xffb8,0xffb8,0xffcc,1,0xfe02,0xfe02,0xfe02,0xfe02,0xfe02,0xfe02,0xfe02,1,1,1, +1,0xffb8,1,1,1,1,1,1,0xffcc,1,1,1,0xffcc,0xffcc,1,1, +1,1,1,1,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc, +0xffcc,0xffd4,0xffac,0xffb8,0xff94,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, +0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, +0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffd0,0xffc8,0xffc8,0xffb8,0xffb4,0xffcc, +0xffd2,0xffb8,0xffcc,0xffb8,0x1aa6,0x1aac,0x1ab2,0x1ab8,0x1abf,0x1ac5,0x1acb,0x1ad1,0x1ad9,0x1ae3,0x1aea,0x1af0, +0x1af6,0x1afc,0x1b02,0x1b08,0x1b0f,0x1b15,0x1b1a,0x1b20,0x1b28,0x1b32,0x1b3c,0x1b46,0x1b4e,0x1b54,0x1b5a,0x1b60, +0x1b69,0x1b73,0x1b7b,0x1b81,0x1b86,0x1b8c,0x1b92,0x1b98,0x1b9e,0x1ba4,0x1baa,0x1bb0,0x1bb7,0x1bbd,0x1bc2,0x1bc8, +0x1bce,0x1bd4,0x1bdc,0x1be6,0x1bee,0x1bf4,0x1bfa,0x1c00,0x1c06,0x1c0c,0xe08,0xe12,0x1c14,0x1c1e,0x1c26,0x1c2c, +0x1c32,0x1c38,0x1c3e,0x1c44,0x1c4a,0x1c50,0x1c57,0x1c5d,0x1c62,0x1c68,0x1c6e,0x1c74,0x1c7a,0x1c80,0x1c86,0x1c8c, +0x1c94,0x1c9e,0x1ca8,0x1cb2,0x1cbc,0x1cc6,0x1cd0,0x1cda,0x1ce3,0x1ce9,0x1cef,0x1cf5,0x1cfa,0x1d00,0xe1c,0xe26, +0x1d08,0x1d12,0x1d1a,0x1d20,0x1d26,0x1d2c,0xe30,0xe3a,0x1d34,0x1d3e,0x1d48,0x1d52,0x1d5c,0x1d66,0x1d6e,0x1d74, +0x1d7a,0x1d80,0x1d86,0x1d8c,0x1d92,0x1d98,0x1d9e,0x1da4,0x1daa,0x1db0,0x1db6,0x1dbc,0x1dc4,0x1dce,0x1dd8,0x1de2, +0x1dea,0x1df0,0x1df7,0x1dfd,0x1e02,0x1e08,0x1e0e,0x1e14,0x1e1a,0x1e20,0x1e26,0x1e2c,0x1e33,0x1e39,0x1e3f,0x1e45, +0x1e4b,0x1e51,0x1e56,0x1e5c,0x1e62,0x1e68,0x1e6f,0x1e75,0x1e7b,0x1e81,0x1e86,0x1e8c,0x1e92,0x1e98,1,0x1e9f, +1,1,1,1,0xe44,0xe52,0x1ea4,0x1eaa,0x1eb2,0x1ebc,0x1ec6,0x1ed0,0x1eda,0x1ee4,0x1eee,0x1ef8, +0x1f02,0x1f0c,0x1f16,0x1f20,0x1f2a,0x1f34,0x1f3e,0x1f48,0x1f52,0x1f5c,0x1f66,0x1f70,0xe60,0xe6a,0x1f78,0x1f7e, +0x1f84,0x1f8a,0x1f92,0x1f9c,0x1fa6,0x1fb0,0x1fba,0x1fc4,0x1fce,0x1fd8,0x1fe2,0x1fec,0x1ff4,0x1ffa,0x2000,0x2006, +0xe74,0xe7e,0x200c,0x2012,0x201a,0x2024,0x202e,0x2038,0x2042,0x204c,0x2056,0x2060,0x206a,0x2074,0x207e,0x2088, +0x2092,0x209c,0x20a6,0x20b0,0x20ba,0x20c4,0x20ce,0x20d8,0x20e0,0x20e6,0x20ec,0x20f2,0x20fa,0x2104,0x210e,0x2118, +0x2122,0x212c,0x2136,0x2140,0x214a,0x2154,0x215c,0x2162,0x2169,0x216f,0x2174,0x217a,0x2180,0x2186,1,1, +1,1,1,1,0xe88,0xe9e,0xeb6,0xec4,0xed2,0xee0,0xeee,0xefc,0xf08,0xf1e,0xf36,0xf44, +0xf52,0xf60,0xf6e,0xf7c,0xf88,0xf96,0x218f,0x2199,0x21a3,0x21ad,1,1,0xfa4,0xfb2,0x21b7,0x21c1, +0x21cb,0x21d5,1,1,0xfc0,0xfd6,0xfee,0xffc,0x100a,0x1018,0x1026,0x1034,0x1040,0x1056,0x106e,0x107c, +0x108a,0x1098,0x10a6,0x10b4,0x10c0,0x10d2,0x21df,0x21e9,0x21f3,0x21fd,0x2207,0x2211,0x10e4,0x10f6,0x221b,0x2225, +0x222f,0x2239,0x2243,0x224d,0x1108,0x1116,0x2257,0x2261,0x226b,0x2275,1,1,0x1124,0x1132,0x227f,0x2289, +0x2293,0x229d,1,1,0x1140,0x1152,0x22a7,0x22b1,0x22bb,0x22c5,0x22cf,0x22d9,1,0x1164,1,0x22e3, +1,0x22ed,1,0x22f7,0x1176,0x118c,0x11a4,0x11b2,0x11c0,0x11ce,0x11dc,0x11ea,0x11f6,0x120c,0x1224,0x1232, +0x1240,0x124e,0x125c,0x126a,0x1276,0x3c28,0x22ff,0x3c30,0x1280,0x3c38,0x2305,0x3c40,0x230b,0x3c48,0x2311,0x3c50, +0x128a,0x3c58,1,1,0x2318,0x2322,0x2331,0x2341,0x2351,0x2361,0x2371,0x2381,0x238c,0x2396,0x23a5,0x23b5, +0x23c5,0x23d5,0x23e5,0x23f5,0x2400,0x240a,0x2419,0x2429,0x2439,0x2449,0x2459,0x2469,0x2474,0x247e,0x248d,0x249d, +0x24ad,0x24bd,0x24cd,0x24dd,0x24e8,0x24f2,0x2501,0x2511,0x2521,0x2531,0x2541,0x2551,0x255c,0x2566,0x2575,0x2585, +0x2595,0x25a5,0x25b5,0x25c5,0x25cf,0x25d5,0x25dd,0x25e4,0x25ed,1,0x1294,0x25f7,0x25ff,0x2605,0x260b,0x3c60, +0x2610,1,0x2b3c,0x8f0,1,0x2617,0x261f,0x2626,0x262f,1,0x129e,0x2639,0x2641,0x3c68,0x2647,0x3c70, +0x264c,0x2653,0x2659,0x265f,0x2665,0x266b,0x2673,0x3c7a,1,1,0x267b,0x2683,0x268b,0x2691,0x2697,0x3c84, +1,0x269d,0x26a3,0x26a9,0x26af,0x26b5,0x26bd,0x3c8e,0x26c5,0x26cb,0x26d1,0x26d9,0x26e1,0x26e7,0x26ed,0x3c98, +0x26f3,0x26f9,0x3ca0,0x2b41,1,1,0x2701,0x2708,0x2711,1,0x12a8,0x271b,0x2723,0x3ca8,0x2729,0x3cb0, +0x272e,0x2b45,0x8fc,1,0xf919,0xf919,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,0xffcc,0xffcc,0xfe02,0xfe02,0xffcc,0xffcc,0xffcc,0xffcc,0xfe02,0xfe02,0xfe02,0xffcc, +0xffcc,1,1,1,1,0xffcc,1,1,1,0xfe02,0xfe02,0xffcc,0xffb8,0xffcc,0xfe02,0xfe02, +0xffb8,0xffb8,0xffb8,0xffb8,0xffcc,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,0x2b48,1,1,1,0x2b4c, +0x3cb8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,0x908,1,0x90c,1,0x910,1,1,1,1,1,0x2735, +0x273b,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,0x2741,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,0x2747,0x274d,0x2753,0x914,1,0x918,1,0x91c,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,0x920,0x2759,1,1,1,0x924,0x275f,1, +0x928,0x2765,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0x92c,0x276b,0x930,0x2771,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,0x934,1,1,1,0x2777,1,0x938,0x277d,0x93c,1,0x2783,0x940,0x2789,1,1, +1,0x944,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0x278f,0x948,0x2795,1,0x94c,0x950,1,1,1,1,1,1, +1,0x279b,0x27a1,0x27a7,0x27ad,0x27b3,0x954,0x958,0x27b9,0x27bf,0x95c,0x960,0x27c5,0x27cb,0x964,0x968, +0x96c,0x970,1,1,0x27d1,0x27d7,0x974,0x978,0x27dd,0x27e3,0x97c,0x980,0x27e9,0x27ef,1,1, +1,1,1,1,1,0x984,0x988,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,0x98c,1,1,1,1,1,0x990,0x994,1,0x998, +0x27f5,0x27fb,0x2801,0x2807,1,1,0x99c,0x9a0,0x9a4,0x9a8,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,0x280d,0x2813,0x2819,0x281f,1,1, +1,1,1,1,0x2825,0x282b,0x2831,0x2837,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,0x2b51,0x2b55,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,0x2b59, 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,0xfe0e,1,1,1,1,1,1,1,1,1,1, -1,0xfe12,0xfe12,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,0xffcc,0xffcc,0xffcc,1,0xfe02,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffcc,0xffcc,0xffb8, -0xffb8,0xffb8,0xffb8,0xffcc,1,0xfe02,0xfe02,0xfe02,0xfe02,0xfe02,0xfe02,0xfe02,1,1,1,1, -0xffb8,1,1,1,1,1,1,0xffcc,1,1,1,0xffcc,0xffcc,1,1,1, -1,1,1,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc,0xffcc, -0xffd4,0xffac,0xffb8,0xff94,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffd0,0xffc8,0xffc8,0xffb8,0xffb4,0xffcc,0xffd2, -0xffb8,0xffcc,0xffb8,0x1a6c,0x1a72,0x1a78,0x1a7e,0x1a85,0x1a8b,0x1a91,0x1a97,0x1a9f,0x1aa9,0x1ab0,0x1ab6,0x1abc, -0x1ac2,0x1ac8,0x1ace,0x1ad5,0x1adb,0x1ae0,0x1ae6,0x1aee,0x1af8,0x1b02,0x1b0c,0x1b14,0x1b1a,0x1b20,0x1b26,0x1b2f, -0x1b39,0x1b41,0x1b47,0x1b4c,0x1b52,0x1b58,0x1b5e,0x1b64,0x1b6a,0x1b70,0x1b76,0x1b7d,0x1b83,0x1b88,0x1b8e,0x1b94, -0x1b9a,0x1ba2,0x1bac,0x1bb4,0x1bba,0x1bc0,0x1bc6,0x1bcc,0x1bd2,0xdde,0xde8,0x1bda,0x1be4,0x1bec,0x1bf2,0x1bf8, -0x1bfe,0x1c04,0x1c0a,0x1c10,0x1c16,0x1c1d,0x1c23,0x1c28,0x1c2e,0x1c34,0x1c3a,0x1c40,0x1c46,0x1c4c,0x1c52,0x1c5a, -0x1c64,0x1c6e,0x1c78,0x1c82,0x1c8c,0x1c96,0x1ca0,0x1ca9,0x1caf,0x1cb5,0x1cbb,0x1cc0,0x1cc6,0xdf2,0xdfc,0x1cce, -0x1cd8,0x1ce0,0x1ce6,0x1cec,0x1cf2,0xe06,0xe10,0x1cfa,0x1d04,0x1d0e,0x1d18,0x1d22,0x1d2c,0x1d34,0x1d3a,0x1d40, -0x1d46,0x1d4c,0x1d52,0x1d58,0x1d5e,0x1d64,0x1d6a,0x1d70,0x1d76,0x1d7c,0x1d82,0x1d8a,0x1d94,0x1d9e,0x1da8,0x1db0, -0x1db6,0x1dbd,0x1dc3,0x1dc8,0x1dce,0x1dd4,0x1dda,0x1de0,0x1de6,0x1dec,0x1df2,0x1df9,0x1dff,0x1e05,0x1e0b,0x1e11, -0x1e17,0x1e1c,0x1e22,0x1e28,0x1e2e,0x1e35,0x1e3b,0x1e41,0x1e47,0x1e4c,0x1e52,0x1e58,0x1e5e,1,0x1e65,1, -1,1,1,0xe1a,0xe28,0x1e6a,0x1e70,0x1e78,0x1e82,0x1e8c,0x1e96,0x1ea0,0x1eaa,0x1eb4,0x1ebe,0x1ec8, -0x1ed2,0x1edc,0x1ee6,0x1ef0,0x1efa,0x1f04,0x1f0e,0x1f18,0x1f22,0x1f2c,0x1f36,0xe36,0xe40,0x1f3e,0x1f44,0x1f4a, -0x1f50,0x1f58,0x1f62,0x1f6c,0x1f76,0x1f80,0x1f8a,0x1f94,0x1f9e,0x1fa8,0x1fb2,0x1fba,0x1fc0,0x1fc6,0x1fcc,0xe4a, -0xe54,0x1fd2,0x1fd8,0x1fe0,0x1fea,0x1ff4,0x1ffe,0x2008,0x2012,0x201c,0x2026,0x2030,0x203a,0x2044,0x204e,0x2058, -0x2062,0x206c,0x2076,0x2080,0x208a,0x2094,0x209e,0x20a6,0x20ac,0x20b2,0x20b8,0x20c0,0x20ca,0x20d4,0x20de,0x20e8, -0x20f2,0x20fc,0x2106,0x2110,0x211a,0x2122,0x2128,0x212f,0x2135,0x213a,0x2140,0x2146,0x214c,1,1,1, -1,1,1,0xe5e,0xe74,0xe8c,0xe9a,0xea8,0xeb6,0xec4,0xed2,0xede,0xef4,0xf0c,0xf1a,0xf28, -0xf36,0xf44,0xf52,0xf5e,0xf6c,0x2155,0x215f,0x2169,0x2173,1,1,0xf7a,0xf88,0x217d,0x2187,0x2191, -0x219b,1,1,0xf96,0xfac,0xfc4,0xfd2,0xfe0,0xfee,0xffc,0x100a,0x1016,0x102c,0x1044,0x1052,0x1060, -0x106e,0x107c,0x108a,0x1096,0x10a8,0x21a5,0x21af,0x21b9,0x21c3,0x21cd,0x21d7,0x10ba,0x10cc,0x21e1,0x21eb,0x21f5, -0x21ff,0x2209,0x2213,0x10de,0x10ec,0x221d,0x2227,0x2231,0x223b,1,1,0x10fa,0x1108,0x2245,0x224f,0x2259, -0x2263,1,1,0x1116,0x1128,0x226d,0x2277,0x2281,0x228b,0x2295,0x229f,1,0x113a,1,0x22a9,1, -0x22b3,1,0x22bd,0x114c,0x1162,0x117a,0x1188,0x1196,0x11a4,0x11b2,0x11c0,0x11cc,0x11e2,0x11fa,0x1208,0x1216, -0x1224,0x1232,0x1240,0x124c,0x3b9e,0x22c5,0x3ba6,0x1256,0x3bae,0x22cb,0x3bb6,0x22d1,0x3bbe,0x22d7,0x3bc6,0x1260, -0x3bce,1,1,0x22de,0x22e8,0x22f7,0x2307,0x2317,0x2327,0x2337,0x2347,0x2352,0x235c,0x236b,0x237b,0x238b, -0x239b,0x23ab,0x23bb,0x23c6,0x23d0,0x23df,0x23ef,0x23ff,0x240f,0x241f,0x242f,0x243a,0x2444,0x2453,0x2463,0x2473, -0x2483,0x2493,0x24a3,0x24ae,0x24b8,0x24c7,0x24d7,0x24e7,0x24f7,0x2507,0x2517,0x2522,0x252c,0x253b,0x254b,0x255b, -0x256b,0x257b,0x258b,0x2595,0x259b,0x25a3,0x25aa,0x25b3,1,0x126a,0x25bd,0x25c5,0x25cb,0x25d1,0x3bd6,0x25d6, -1,0x2ab2,0x8f0,1,0x25dd,0x25e5,0x25ec,0x25f5,1,0x1274,0x25ff,0x2607,0x3bde,0x260d,0x3be6,0x2612, -0x2619,0x261f,0x2625,0x262b,0x2631,0x2639,0x3bf0,1,1,0x2641,0x2649,0x2651,0x2657,0x265d,0x3bfa,1, -0x2663,0x2669,0x266f,0x2675,0x267b,0x2683,0x3c04,0x268b,0x2691,0x2697,0x269f,0x26a7,0x26ad,0x26b3,0x3c0e,0x26b9, -0x26bf,0x3c16,0x2ab7,1,1,0x26c7,0x26ce,0x26d7,1,0x127e,0x26e1,0x26e9,0x3c1e,0x26ef,0x3c26,0x26f4, -0x2abb,0x8fc,1,0xfa09,0xfa09,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,0xffcc,0xffcc,0xfe02,0xfe02,0xffcc,0xffcc,0xffcc,0xffcc,0xfe02,0xfe02,0xfe02,0xffcc,0xffcc, -1,1,1,1,0xffcc,1,1,1,0xfe02,0xfe02,0xffcc,0xffb8,0xffcc,0xfe02,0xfe02,0xffb8, -0xffb8,0xffb8,0xffb8,0xffcc,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,0x2abe,1,1,1,0x2ac2,0x3c2e, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,0x908,1,0x90c,1,0x910,1,1,1,1,1,0x26fb,0x2701, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,0x2707,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,0x270d,0x2713,0x2719,0x914,1,0x918,1,0x91c,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,0x920,0x271f,1,1,1,0x924,0x2725,1,0x928, -0x272b,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,0x92c,0x2731,0x930,0x2737,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -0x934,1,1,1,0x273d,1,0x938,0x2743,0x93c,1,0x2749,0x940,0x274f,1,1,1, -0x944,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,0x2755,0x948,0x275b,1,0x94c,0x950,1,1,1,1,1,1,1, -0x2761,0x2767,0x276d,0x2773,0x2779,0x954,0x958,0x277f,0x2785,0x95c,0x960,0x278b,0x2791,0x964,0x968,0x96c, -0x970,1,1,0x2797,0x279d,0x974,0x978,0x27a3,0x27a9,0x97c,0x980,0x27af,0x27b5,1,1,1, -1,1,1,1,0x984,0x988,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,0x98c,1,1,1,1,1,0x990,0x994,1,0x998,0x27bb, -0x27c1,0x27c7,0x27cd,1,1,0x99c,0x9a0,0x9a4,0x9a8,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,0x27d3,0x27d9,0x27df,0x27e5,1,1,1, -1,1,1,0x27eb,0x27f1,0x27f7,0x27fd,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, -0x2ac7,0x2acb,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,0x2acf,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,0xfe12,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,0xffcc, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0xfe12, +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, +0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, 0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,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,0xffb4,0xffc8,0xffd0,0xffbc,0xffc0,0xffc0,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x9ac, -1,1,1,1,0x9b0,0x2803,0x9b4,0x2809,0x9b8,0x280f,0x9bc,0x2815,0x9c0,0x281b,0x9c4,0x2821, -0x9c8,0x2827,0x9cc,0x282d,0x9d0,0x2833,0x9d4,0x2839,0x9d8,0x283f,0x9dc,0x2845,1,0x9e0,0x284b,0x9e4, -0x2851,0x9e8,0x2857,1,1,1,1,1,0x9ec,0x285d,0x2863,0x9f4,0x2869,0x286f,0x9fc,0x2875, -0x287b,0xa04,0x2881,0x2887,0xa0c,0x288d,0x2893,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,0x2899,1,1,1,1, -0xfc10,0xfc10,1,1,0xa14,0x289f,1,1,1,1,1,1,1,0xa18,1,1, -1,1,0xa1c,0x28a5,0xa20,0x28ab,0xa24,0x28b1,0xa28,0x28b7,0xa2c,0x28bd,0xa30,0x28c3,0xa34,0x28c9, -0xa38,0x28cf,0xa3c,0x28d5,0xa40,0x28db,0xa44,0x28e1,0xa48,0x28e7,1,0xa4c,0x28ed,0xa50,0x28f3,0xa54, -0x28f9,1,1,1,1,1,0xa58,0x28ff,0x2905,0xa60,0x290b,0x2911,0xa68,0x2917,0x291d,0xa70, -0x2923,0x2929,0xa78,0x292f,0x2935,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,0xa80,0xa84,0xa88,0xa8c,1,0x293b,1,1,0x2941,0x2947, -0x294d,0x2953,1,1,0xa90,0x2959,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,0xffcc,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,0xffcc,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,0xffcc,0xffcc,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,0xffb4,0xffc8,0xffd0,0xffbc,0xffc0,0xffc0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,0xfe12,1,1,1,1,1,1,1,1,1,1,1, +0x9ac,1,1,1,1,0x9b0,0x283d,0x9b4,0x2843,0x9b8,0x2849,0x9bc,0x284f,0x9c0,0x2855,0x9c4, +0x285b,0x9c8,0x2861,0x9cc,0x2867,0x9d0,0x286d,0x9d4,0x2873,0x9d8,0x2879,0x9dc,0x287f,1,0x9e0,0x2885, +0x9e4,0x288b,0x9e8,0x2891,1,1,1,1,1,0x9ec,0x2897,0x289d,0x9f4,0x28a3,0x28a9,0x9fc, +0x28af,0x28b5,0xa04,0x28bb,0x28c1,0xa0c,0x28c7,0x28cd,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,0x28d3,1,1,1, +1,0xfc10,0xfc10,1,1,0xa14,0x28d9,1,1,1,1,1,1,1,0xa18,1, +1,1,1,0xa1c,0x28df,0xa20,0x28e5,0xa24,0x28eb,0xa28,0x28f1,0xa2c,0x28f7,0xa30,0x28fd,0xa34, +0x2903,0xa38,0x2909,0xa3c,0x290f,0xa40,0x2915,0xa44,0x291b,0xa48,0x2921,1,0xa4c,0x2927,0xa50,0x292d, +0xa54,0x2933,1,1,1,1,1,0xa58,0x2939,0x293f,0xa60,0x2945,0x294b,0xa68,0x2951,0x2957, +0xa70,0x295d,0x2963,0xa78,0x2969,0x296f,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,0xa80,0xa84,0xa88,0xa8c,1,0x2975,1,1,0x297b, +0x2981,0x2987,0x298d,1,1,0xa90,0x2993,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,0xfe12,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,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,0xffcc,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, +0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,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,0xffcc,0xffcc,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,0xffb8,0xffb8,0xffb8,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,0xfe12,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,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,0xfe12,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,0xfe12,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,0xffcc,1,0xffcc,0xffcc,0xffb8,1,1, -0xffcc,0xffcc,1,1,1,1,1,0xffcc,0xffcc,1,0xffcc,1,1,1,1,1, +1,1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, +0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,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,0xfe12, -1,1,1,1,1,1,1,1,1,0xae2,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289, -0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289, -0x1289,0x1289,0x1289,0x1289,0x1289,0xae2,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289, -0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289, -0x1289,0xae2,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289, -0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0xae2,0x1289,0x1289, -0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289, -0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,0x1289,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,0x3c66,1,0x3c66,0x3c66,0x3c66,0x3c66,0x3c66,0x3c66,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x3c66, -0x3c66,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,0x3c66,1,1,1,1,0x3c66,1,1,1,0x3c66,0x3c66,0x3c66, -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,0x3b97,1, -0x2ad5,0x2ad9,0x2add,0x2ae1,0x2ae5,0x2ae9,0x2aed,0x2af1,0x2af1,0x2af5,0x2af9,0x2afd,0x2b01,0x2b05,0x2b09,0x2b0d, -0x2b11,0x2b15,0x2b19,0x2b1d,0x2b21,0x2b25,0x2b29,0x2b2d,0x2b31,0x2b35,0x2b39,0x2b3d,0x2b41,0x2b45,0x2b49,0x2b4d, -0x2b51,0x2b55,0x2b59,0x2b5d,0x2b61,0x2b65,0x2b69,0x2b6d,0x2b71,0x2b75,0x2b79,0x2b7d,0x2b81,0x2b85,0x2b89,0x2b8d, -0x2b91,0x2b95,0x2b99,0x2b9d,0x2ba1,0x2ba5,0x2ba9,0x2bad,0x2bb1,0x2bb5,0x2bb9,0x2bbd,0x2bc1,0x2bc5,0x2bc9,0x2bcd, -0x2bd1,0x2bd5,0x2bd9,0x2bdd,0x2be1,0x2be5,0x2be9,0x2bed,0x2bf1,0x2bf5,0x2bf9,0x2bfd,0x2c01,0x2c05,0x2c09,0x2c0d, -0x2c11,0x2c15,0x2c19,0x2c1d,0x2c21,0x2c25,0x2c29,0x2c2d,0x2c31,0x2c35,0x2c39,0x2c3d,0x2b21,0x2c41,0x2c45,0x2c49, -0x2c4d,0x2c51,0x2c55,0x2c59,0x2c5d,0x2c61,0x2c65,0x2c69,0x2c6d,0x2c71,0x2c75,0x2c79,0x2c7d,0x2c81,0x2c85,0x2c89, -0x2c8d,0x2c91,0x2c95,0x2c99,0x2c9d,0x2ca1,0x2ca5,0x2ca9,0x2cad,0x2cb1,0x2cb5,0x2cb9,0x2cbd,0x2cc1,0x2cc5,0x2cc9, -0x2ccd,0x2cd1,0x2cd5,0x2cd9,0x2cdd,0x2ce1,0x2ce5,0x2ce9,0x2ced,0x2cf1,0x2cf5,0x2cf9,0x2cfd,0x2d01,0x2d05,0x2d09, -0x2d0d,0x2d11,0x2d15,0x2d19,0x2d1d,0x2d21,0x2d25,0x2d29,0x2d2d,0x2d31,0x2d35,0x2d39,0x2d3d,0x2d41,0x2d45,0x2d49, -0x2d4d,0x2c89,0x2d51,0x2d55,0x2d59,0x2d5d,0x2d61,0x2d65,0x2d69,0x2d6d,0x2c49,0x2d71,0x2d75,0x2d79,0x2d7d,0x2d81, -0x2d85,0x2d89,0x2d8d,0x2d91,0x2d95,0x2d99,0x2d9d,0x2da1,0x2da5,0x2da9,0x2dad,0x2db1,0x2db5,0x2db9,0x2dbd,0x2b21, -0x2dc1,0x2dc5,0x2dc9,0x2dcd,0x2dd1,0x2dd5,0x2dd9,0x2ddd,0x2de1,0x2de5,0x2de9,0x2ded,0x2df1,0x2df5,0x2df9,0x2dfd, -0x2e01,0x2e05,0x2e09,0x2e0d,0x2e11,0x2e15,0x2e19,0x2e1d,0x2e21,0x2e25,0x2e29,0x2c51,0x2e2d,0x2e31,0x2e35,0x2e39, -0x2e3d,0x2e41,0x2e45,0x2e49,0x2e4d,0x2e51,0x2e55,0x2e59,0x2e5d,0x2e61,0x2e65,0x2e69,0x2e6d,0x2e71,0x2e75,0x2e79, -0x2e7d,0x2e81,0x2e85,0x2e89,0x2e8d,0x2e91,0x2e95,0x2e99,0x2e9d,0x2ea1,0x2ea5,0x2ea9,0x2ead,0x2eb1,0x2eb5,0x2eb9, -0x2ebd,0x2ec1,0x2ec5,0x2ec9,0x2ecd,0x2ed1,0x2ed5,0x2ed9,0x2edd,0x2ee1,0x2ee5,0x2ee9,0x2eed,0x2ef1,1,1, -0x2ef5,1,0x2ef9,1,1,0x2efd,0x2f01,0x2f05,0x2f09,0x2f0d,0x2f11,0x2f15,0x2f19,0x2f1d,0x2f21,1, -0x2f25,1,0x2f29,1,1,0x2f2d,0x2f31,1,1,1,0x2f35,0x2f39,0x2f3d,0x2f41,0x2f45,0x2f49, -0x2f4d,0x2f51,0x2f55,0x2f59,0x2f5d,0x2f61,0x2f65,0x2f69,0x2f6d,0x2f71,0x2f75,0x2f79,0x2f7d,0x2f81,0x2f85,0x2f89, -0x2f8d,0x2f91,0x2f95,0x2f99,0x2f9d,0x2fa1,0x2fa5,0x2fa9,0x2fad,0x2fb1,0x2fb5,0x2fb9,0x2fbd,0x2fc1,0x2fc5,0x2fc9, -0x2fcd,0x2fd1,0x2fd5,0x2fd9,0x2fdd,0x2fe1,0x2fe5,0x2d25,0x2fe9,0x2fed,0x2ff1,0x2ff5,0x2ff9,0x2ffd,0x2ffd,0x3001, -0x3005,0x3009,0x300d,0x3011,0x3015,0x3019,0x301d,0x2f2d,0x3021,0x3025,0x3029,0x302d,0x3031,0x3037,1,1, -0x303b,0x303f,0x3043,0x3047,0x304b,0x304f,0x3053,0x3057,0x2f65,0x305b,0x305f,0x3063,0x2ef5,0x3067,0x306b,0x306f, -0x3073,0x3077,0x307b,0x307f,0x3083,0x3087,0x308b,0x308f,0x3093,0x2f89,0x3097,0x2f8d,0x309b,0x309f,0x30a3,0x30a7, -0x30ab,0x2ef9,0x2b75,0x30af,0x30b3,0x30b7,0x2c8d,0x2de9,0x30bb,0x30bf,0x2fa9,0x30c3,0x2fad,0x30c7,0x30cb,0x30cf, -0x2f01,0x30d3,0x30d7,0x30db,0x30df,0x30e3,0x2f05,0x30e7,0x30eb,0x30ef,0x30f3,0x30f7,0x30fb,0x2fe5,0x30ff,0x3103, -0x2d25,0x3107,0x2ff5,0x310b,0x310f,0x3113,0x3117,0x311b,0x3009,0x311f,0x2f29,0x3123,0x300d,0x2c41,0x3127,0x3011, -0x312b,0x3019,0x312f,0x3133,0x3137,0x313b,0x313f,0x3021,0x2f19,0x3143,0x3025,0x3147,0x3029,0x314b,0x2af1,0x314f, -0x3155,0x315b,0x3161,0x3165,0x3169,0x316d,0x3173,0x3179,0x317f,0x3183,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, -0x3186,0xfe34,0x318c,1,1,1,1,1,1,1,1,1,1,0x3192,0x3198,0x31a0, -0x31aa,0x31b2,0x31b8,0x31be,0x31c4,0x31ca,0x31d0,0x31d6,0x31dc,0x31e2,1,0x31e8,0x31ee,0x31f4,0x31fa,0x3200, -1,0x3206,1,0x320c,0x3212,1,0x3218,0x321e,1,0x3224,0x322a,0x3230,0x3236,0x323c,0x3242,0x3248, -0x324e,0x3254,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,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8, -0xffb8,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,0xffb8,1,0xffcc,1,1,1,1,1,1,1,1,0xffcc,0xfe02, -0xffb8,1,1,1,1,0xfe12,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,1,1, +1,1,1,1,0xffb8,0xffb8,0xffb8,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,0xfe12,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,0xffcc,1,0xffcc,0xffcc,0xffb8,1, +1,0xffcc,0xffcc,1,1,1,1,1,0xffcc,0xffcc,1,0xffcc,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, +0xfe12,1,1,1,1,1,1,1,1,1,0xb0c,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3, +0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3, +0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0xb0c,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3, +0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3, +0x12c3,0x12c3,0xb0c,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3, +0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0xb0c,0x12c3, +0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3, +0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,0x12c3,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,0x3cf0,0x29a0,0x3cf0,0x3cf0,0x3cf0,0x3cf0,0x3cf0,0x3cf0,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x3cf0,1, +0x3cf0,0x3cf0,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,0x3cf0,1,1,1,1,0x3cf0,1,1,1,0x3cf0,0x3cf0, +0x3cf0,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,0x3c21, +1,0x2b5f,0x2b63,0x2b67,0x2b6b,0x2b6f,0x2b73,0x2b77,0x2b7b,0x2b7b,0x2b7f,0x2b83,0x2b87,0x2b8b,0x2b8f,0x2b93, +0x2b97,0x2b9b,0x2b9f,0x2ba3,0x2ba7,0x2bab,0x2baf,0x2bb3,0x2bb7,0x2bbb,0x2bbf,0x2bc3,0x2bc7,0x2bcb,0x2bcf,0x2bd3, +0x2bd7,0x2bdb,0x2bdf,0x2be3,0x2be7,0x2beb,0x2bef,0x2bf3,0x2bf7,0x2bfb,0x2bff,0x2c03,0x2c07,0x2c0b,0x2c0f,0x2c13, +0x2c17,0x2c1b,0x2c1f,0x2c23,0x2c27,0x2c2b,0x2c2f,0x2c33,0x2c37,0x2c3b,0x2c3f,0x2c43,0x2c47,0x2c4b,0x2c4f,0x2c53, +0x2c57,0x2c5b,0x2c5f,0x2c63,0x2c67,0x2c6b,0x2c6f,0x2c73,0x2c77,0x2c7b,0x2c7f,0x2c83,0x2c87,0x2c8b,0x2c8f,0x2c93, +0x2c97,0x2c9b,0x2c9f,0x2ca3,0x2ca7,0x2cab,0x2caf,0x2cb3,0x2cb7,0x2cbb,0x2cbf,0x2cc3,0x2cc7,0x2bab,0x2ccb,0x2ccf, +0x2cd3,0x2cd7,0x2cdb,0x2cdf,0x2ce3,0x2ce7,0x2ceb,0x2cef,0x2cf3,0x2cf7,0x2cfb,0x2cff,0x2d03,0x2d07,0x2d0b,0x2d0f, +0x2d13,0x2d17,0x2d1b,0x2d1f,0x2d23,0x2d27,0x2d2b,0x2d2f,0x2d33,0x2d37,0x2d3b,0x2d3f,0x2d43,0x2d47,0x2d4b,0x2d4f, +0x2d53,0x2d57,0x2d5b,0x2d5f,0x2d63,0x2d67,0x2d6b,0x2d6f,0x2d73,0x2d77,0x2d7b,0x2d7f,0x2d83,0x2d87,0x2d8b,0x2d8f, +0x2d93,0x2d97,0x2d9b,0x2d9f,0x2da3,0x2da7,0x2dab,0x2daf,0x2db3,0x2db7,0x2dbb,0x2dbf,0x2dc3,0x2dc7,0x2dcb,0x2dcf, +0x2dd3,0x2dd7,0x2d13,0x2ddb,0x2ddf,0x2de3,0x2de7,0x2deb,0x2def,0x2df3,0x2df7,0x2cd3,0x2dfb,0x2dff,0x2e03,0x2e07, +0x2e0b,0x2e0f,0x2e13,0x2e17,0x2e1b,0x2e1f,0x2e23,0x2e27,0x2e2b,0x2e2f,0x2e33,0x2e37,0x2e3b,0x2e3f,0x2e43,0x2e47, +0x2bab,0x2e4b,0x2e4f,0x2e53,0x2e57,0x2e5b,0x2e5f,0x2e63,0x2e67,0x2e6b,0x2e6f,0x2e73,0x2e77,0x2e7b,0x2e7f,0x2e83, +0x2e87,0x2e8b,0x2e8f,0x2e93,0x2e97,0x2e9b,0x2e9f,0x2ea3,0x2ea7,0x2eab,0x2eaf,0x2eb3,0x2cdb,0x2eb7,0x2ebb,0x2ebf, +0x2ec3,0x2ec7,0x2ecb,0x2ecf,0x2ed3,0x2ed7,0x2edb,0x2edf,0x2ee3,0x2ee7,0x2eeb,0x2eef,0x2ef3,0x2ef7,0x2efb,0x2eff, +0x2f03,0x2f07,0x2f0b,0x2f0f,0x2f13,0x2f17,0x2f1b,0x2f1f,0x2f23,0x2f27,0x2f2b,0x2f2f,0x2f33,0x2f37,0x2f3b,0x2f3f, +0x2f43,0x2f47,0x2f4b,0x2f4f,0x2f53,0x2f57,0x2f5b,0x2f5f,0x2f63,0x2f67,0x2f6b,0x2f6f,0x2f73,0x2f77,0x2f7b,1, +1,0x2f7f,1,0x2f83,1,1,0x2f87,0x2f8b,0x2f8f,0x2f93,0x2f97,0x2f9b,0x2f9f,0x2fa3,0x2fa7,0x2fab, +1,0x2faf,1,0x2fb3,1,1,0x2fb7,0x2fbb,1,1,1,0x2fbf,0x2fc3,0x2fc7,0x2fcb,0x2fcf, +0x2fd3,0x2fd7,0x2fdb,0x2fdf,0x2fe3,0x2fe7,0x2feb,0x2fef,0x2ff3,0x2ff7,0x2ffb,0x2fff,0x3003,0x3007,0x300b,0x300f, +0x3013,0x3017,0x301b,0x301f,0x3023,0x3027,0x302b,0x302f,0x3033,0x3037,0x303b,0x303f,0x3043,0x3047,0x304b,0x304f, +0x3053,0x3057,0x305b,0x305f,0x3063,0x3067,0x306b,0x306f,0x2daf,0x3073,0x3077,0x307b,0x307f,0x3083,0x3087,0x3087, +0x308b,0x308f,0x3093,0x3097,0x309b,0x309f,0x30a3,0x30a7,0x2fb7,0x30ab,0x30af,0x30b3,0x30b7,0x30bb,0x30c1,1, +1,0x30c5,0x30c9,0x30cd,0x30d1,0x30d5,0x30d9,0x30dd,0x30e1,0x2fef,0x30e5,0x30e9,0x30ed,0x2f7f,0x30f1,0x30f5, +0x30f9,0x30fd,0x3101,0x3105,0x3109,0x310d,0x3111,0x3115,0x3119,0x311d,0x3013,0x3121,0x3017,0x3125,0x3129,0x312d, +0x3131,0x3135,0x2f83,0x2bff,0x3139,0x313d,0x3141,0x2d17,0x2e73,0x3145,0x3149,0x3033,0x314d,0x3037,0x3151,0x3155, +0x3159,0x2f8b,0x315d,0x3161,0x3165,0x3169,0x316d,0x2f8f,0x3171,0x3175,0x3179,0x317d,0x3181,0x3185,0x306f,0x3189, +0x318d,0x2daf,0x3191,0x307f,0x3195,0x3199,0x319d,0x31a1,0x31a5,0x3093,0x31a9,0x2fb3,0x31ad,0x3097,0x2ccb,0x31b1, +0x309b,0x31b5,0x30a3,0x31b9,0x31bd,0x31c1,0x31c5,0x31c9,0x30ab,0x2fa3,0x31cd,0x30af,0x31d1,0x30b3,0x31d5,0x2b7b, +0x31d9,0x31df,0x31e5,0x31eb,0x31ef,0x31f3,0x31f7,0x31fd,0x3203,0x3209,0x320d,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,0x3210,0xfe34,0x3216,1,1,1,1,1,1,1,1,1,1,0x321c,0x3222, +0x322a,0x3234,0x323c,0x3242,0x3248,0x324e,0x3254,0x325a,0x3260,0x3266,0x326c,1,0x3272,0x3278,0x327e,0x3284, +0x328a,1,0x3290,1,0x3296,0x329c,1,0x32a2,0x32a8,1,0x32ae,0x32b4,0x32ba,0x32c0,0x32c6,0x32cc, +0x32d2,0x32d8,0x32de,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,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8, +0xffb8,0xffb8,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0x2999,1,1,1,1,1,1,0xa94,1,1,1,1, +1,1,1,0xa9a,1,1,1,1,1,0x29a1,1,1,1,1,1,1, +1,1,1,1,1,1,1,0xffb8,1,0xffcc,1,1,1,1,1,1, +1,1,0xffcc,0xfe02,0xffb8,1,1,1,1,0xfe12,1,1,1,1,0xffcc,0xffcc, +0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, 1,1,1,1,1,1,0xffb8,0xffb8,0xffcc,0xffcc,0xffcc,0xffb8,0xffcc,0xffb8,0xffb8,0xffb8, 1,1,0xffcc,0xffb8,0xffcc,0xffb8,1,1,1,1,1,1,1,1,1,1, 0xfe12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0xfe12, -1,1,1,1,1,1,1,1,1,0xa94,0x295f,0xa9a,0x2969,1,1,1, -1,1,0xaa0,1,1,1,1,1,0x2973,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,0xaa0,0x29a9,0xaa6,0x29b3,1,1,1, +1,1,0xaac,1,1,1,1,1,0x29bd,1,1,1,1,1,1,1, 1,1,0xfe12,0xfc0e,1,1,1,1,1,1,1,0xfc00,1,1,1,1, -1,1,0x297d,0x2987,1,0xaa6,0xaac,0xfe12,0xfe12,1,1,1,1,1,1,1, +1,1,0x29c7,0x29d1,1,0xab2,0xab8,0xfe12,0xfe12,1,1,1,1,1,1,1, 1,1,1,1,0xfe12,1,1,1,1,1,1,1,1,1,0xfe0e,1, 1,1,1,1,0xfe12,0xfe0e,1,1,1,1,1,1,1,1,1,0xfe0e, 0xfe12,1,1,1,1,1,1,1,1,1,1,1,0xfe0e,0xfe0e,1,0xfc00, -1,1,1,1,1,1,1,0xab2,1,1,1,0x2991,0x299b,0xfe12,1,1, -1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,0xfe12,1, -1,1,0xfe0e,1,1,1,1,1,1,1,1,1,0xfc00,1,1,1, -1,1,1,1,1,0xabe,0xfc00,0x29a5,0x29af,0xfc00,0x29b9,1,1,0xfe12,0xfe0e,1, -1,1,1,1,1,1,1,1,1,1,1,0xad0,0xad6,0x29c3,0x29cd,1, -1,1,0xfe12,0xfe0e,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,0xfe12,0xfe0e,1,1,1,1,1,1,1,1,0xfc00,1,1, -1,1,0xadc,1,1,0x29d7,1,1,1,1,0xfe12,0xfe12,1,0xfe02,0xfe02,0xfe02, -0xfe02,0xfe02,1,1,1,1,1,1,1,1,1,1,1,0xfe0c,0xfe0c,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,0xfe02,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,0x325a,0x3264,0x3278,0x3290, -0x32a8,0x32c0,0x32d8,0xffb0,0xffb0,0xfe02,0xfe02,0xfe02,1,1,1,0xffc4,0xffb0,0xffb0,0xffb0,1, -1,1,1,1,1,1,1,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,1,1,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,1,1,1,1,1,1,1,1,1,1,0xffcc, -0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,0x32e6,0x32f0, -0x3304,0x331c,0x3334,0x334c,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc, -0xffcc,0xffcc,0xffcc,0xffcc,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,1,0xffcc, -0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,1, -0xffd0,0xffd0,0xffb8,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,1,1,1,1,1, -1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xfe0e,1,1,1,1,1, -0x335b,0x335f,0x3363,0x3367,0x336d,0x2f4d,0x3371,0x3375,0x3379,0x337d,0x2f51,0x3381,0x3385,0x3389,0x2f55,0x338f, -0x3393,0x3397,0x339b,0x33a1,0x33a5,0x33a9,0x33ad,0x33b3,0x33b7,0x33bb,0x33bf,0x303f,0x33c3,0x33c9,0x33cd,0x33d1, -0x33d5,0x33d9,0x33dd,0x33e1,0x33e5,0x3053,0x2f59,0x2f5d,0x3057,0x33e9,0x33ed,0x2c59,0x33f1,0x2f61,0x33f5,0x33f9, -0x33fd,0x3401,0x3401,0x3401,0x3405,0x340b,0x340f,0x3413,0x3417,0x341d,0x3421,0x3425,0x3429,0x342d,0x3431,0x3435, -0x3439,0x343d,0x3441,0x3445,0x3449,0x344d,0x344d,0x305f,0x3451,0x3455,0x3459,0x345d,0x2f69,0x3461,0x3465,0x3469, -0x2ebd,0x346d,0x3471,0x3475,0x3479,0x347d,0x3481,0x3485,0x3489,0x348d,0x3493,0x3497,0x349b,0x349f,0x34a3,0x34a7, -0x34ab,0x34b1,0x34b7,0x34bb,0x34bf,0x34c3,0x34c7,0x34cb,0x34cf,0x34d3,0x34d7,0x34d7,0x34db,0x34e1,0x34e5,0x2c49, -0x34e9,0x34ed,0x34f3,0x34f7,0x34fb,0x34ff,0x3503,0x3507,0x2f7d,0x350b,0x350f,0x3513,0x3519,0x351d,0x3523,0x3527, -0x352b,0x352f,0x3533,0x3537,0x353b,0x353f,0x3543,0x3547,0x354b,0x354f,0x3555,0x3559,0x355d,0x3561,0x2b71,0x3565, -0x356b,0x356f,0x356f,0x3575,0x3579,0x3579,0x357d,0x3581,0x3587,0x358d,0x3591,0x3595,0x3599,0x359d,0x35a1,0x35a5, -0x35a9,0x35ad,0x35b1,0x2f81,0x35b5,0x35bb,0x35bf,0x35c3,0x308f,0x35c3,0x35c7,0x2f89,0x35cb,0x35cf,0x35d3,0x35d7, -0x2f8d,0x2b05,0x35db,0x35df,0x35e3,0x35e7,0x35eb,0x35ef,0x35f3,0x35f9,0x35fd,0x3601,0x3605,0x3609,0x360d,0x3613, -0x3617,0x361b,0x361f,0x3623,0x3627,0x362b,0x362f,0x3633,0x2f91,0x3637,0x363b,0x3641,0x3645,0x3649,0x364d,0x2f99, -0x3651,0x3655,0x3659,0x365d,0x3661,0x3665,0x3669,0x366d,0x2b75,0x30af,0x3671,0x3675,0x3679,0x367d,0x3683,0x3687, -0x368b,0x368f,0x2f9d,0x3693,0x3699,0x369d,0x36a1,0x3161,0x36a5,0x36a9,0x36ad,0x36b1,0x36b5,0x36bb,0x36bf,0x36c3, -0x36c7,0x36cd,0x36d1,0x36d5,0x36d9,0x2c8d,0x36dd,0x36e1,0x36e7,0x36ed,0x36f3,0x36f7,0x36fd,0x3701,0x3705,0x3709, -0x370d,0x2fa1,0x2de9,0x3711,0x3715,0x3719,0x371d,0x3723,0x3727,0x372b,0x372f,0x30bf,0x3733,0x3737,0x373d,0x3741, -0x3745,0x374b,0x3751,0x3755,0x30c3,0x3759,0x375d,0x3761,0x3765,0x3769,0x376d,0x3771,0x3777,0x377b,0x3781,0x3785, -0x378b,0x30cb,0x378f,0x3793,0x3799,0x379d,0x37a1,0x37a7,0x37ad,0x37b1,0x37b5,0x37b9,0x37bd,0x37bd,0x37c1,0x37c5, -0x30d3,0x37c9,0x37cd,0x37d1,0x37d5,0x37d9,0x37df,0x37e3,0x2c55,0x37e9,0x37ef,0x37f3,0x37f9,0x37ff,0x3805,0x3809, -0x30eb,0x380d,0x3813,0x3819,0x381f,0x3825,0x3829,0x3829,0x30ef,0x3169,0x382d,0x3831,0x3835,0x3839,0x383f,0x2bbd, -0x30f7,0x3843,0x3847,0x2fcd,0x384d,0x3853,0x2f15,0x3859,0x385d,0x2fdd,0x3861,0x3865,0x3869,0x386f,0x386f,0x3875, -0x3879,0x387d,0x3883,0x3887,0x388b,0x388f,0x3895,0x3899,0x389d,0x38a1,0x38a5,0x38a9,0x38af,0x38b3,0x38b7,0x38bb, -0x38bf,0x38c3,0x38c7,0x38cd,0x38d3,0x38d7,0x38dd,0x38e1,0x38e7,0x38eb,0x2ff5,0x38ef,0x38f5,0x38fb,0x38ff,0x3905, -0x3909,0x390f,0x3913,0x3917,0x391b,0x391f,0x3923,0x3927,0x392d,0x3933,0x3939,0x3575,0x393f,0x3943,0x3947,0x394b, -0x394f,0x3953,0x3957,0x395b,0x395f,0x3963,0x3967,0x396b,0x2c9d,0x3971,0x3975,0x3979,0x397d,0x3981,0x3985,0x3001, -0x3989,0x398d,0x3991,0x3995,0x3999,0x399f,0x39a5,0x39ab,0x39af,0x39b3,0x39b7,0x39bb,0x39c1,0x39c5,0x39cb,0x39cf, -0x39d3,0x39d9,0x39df,0x39e3,0x2ba9,0x39e7,0x39eb,0x39ef,0x39f3,0x39f7,0x39fb,0x3113,0x39ff,0x3a03,0x3a07,0x3a0b, -0x3a0f,0x3a13,0x3a17,0x3a1b,0x3a1f,0x3a23,0x3a29,0x3a2d,0x3a31,0x3a35,0x3a39,0x3a3d,0x3a43,0x3a49,0x3a4d,0x3a51, -0x3127,0x312b,0x3a55,0x3a59,0x3a5f,0x3a63,0x3a67,0x3a6b,0x3a6f,0x3a75,0x3a7b,0x3a7f,0x3a83,0x3a87,0x3a8d,0x312f, -0x3a91,0x3a97,0x3a9d,0x3aa1,0x3aa5,0x3aa9,0x3aaf,0x3ab3,0x3ab7,0x3abb,0x3abf,0x3ac3,0x3ac7,0x3acb,0x3ad1,0x3ad5, -0x3ad9,0x3add,0x3ae3,0x3ae7,0x3aeb,0x3aef,0x3af3,0x3af9,0x3aff,0x3b03,0x3b07,0x3b0b,0x3b11,0x3b15,0x3147,0x3147, -0x3b1b,0x3b1f,0x3b25,0x3b29,0x3b2d,0x3b31,0x3b35,0x3b39,0x3b3d,0x3b41,0x314b,0x3b47,0x3b4b,0x3b4f,0x3b53,0x3b57, -0x3b5b,0x3b61,0x3b65,0x3b6b,0x3b71,0x3b77,0x3b7b,0x3b7f,0x3b83,0x3b87,0x3b8b,0x3b8f,0x3b93,0x3b97,1,1 +1,1,1,1,1,1,1,0xabe,1,1,1,0x29db,0x29e5,0xfe12,1,1, +1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,0xaca,0x29ef, +0xad0,0x29f9,1,1,1,1,1,0xad6,1,1,0x2a03,1,0xadc,0x2a0d,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,0xfc00,1,1,0xfc00, +1,1,1,1,0xfbc4,1,1,0xfb10,1,0xfb1a,0xfb24,0xfc00,1,1,1,1, +0xfe12,0xfe12,1,1,0xfe12,1,1,1,0xfe0e,1,1,1,1,1,1,1, +1,1,0xfc00,1,1,1,1,1,1,1,1,0xae2,0xfc00,0x2a17,0x2a21,0xfc00, +0x2a2b,1,1,0xfe12,0xfe0e,1,1,1,1,1,1,1,1,1,1,1, +1,0xaf4,0xafa,0x2a35,0x2a3f,1,1,1,0xfe12,0xfe0e,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,0xfe12,0xfe0e,1,1,1,1,1, +1,1,1,0xfc00,1,1,1,1,0xb00,1,1,0x2a49,1,1,1,1, +0xfe12,0xfe12,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +0xfbd6,0xfc00,0xfb9e,0xfbb4,0xfb2e,0xfb38,0xfb42,0xfb56,0xfb6e,0xfb86,0xfbee,1,1,1,1,1, +0xfe12,0xfe02,0xfe02,0xfe02,0xfe02,0xfe02,1,1,1,1,1,1,1,1,1,1, +1,0xb06,1,1,1,0xfbf4,0xfb94,0x12b2,0x2a5d,1,1,1,1,1,0xfe0c,0xfe0c, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,0xfe02,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,0x32e4,0x32ee,0x3302, +0x331a,0x3332,0x334a,0x3362,0xffb0,0xffb0,0xfe02,0xfe02,0xfe02,1,1,1,0xffc4,0xffb0,0xffb0,0xffb0, +1,1,1,1,1,1,1,1,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,1,1,0xffcc, +0xffcc,0xffcc,0xffcc,0xffcc,0xffb8,0xffb8,1,1,1,1,1,1,1,1,1,1, +0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,0x3370, +0x337a,0x338e,0x33a6,0x33be,0x33d6,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,0xffcc,0xffcc, +0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,1, +0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1, +1,0xffd0,0xffd0,0xffb8,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,1,1,1,1, +1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xfe0e,1,1,1,1, +1,0x33e5,0x33e9,0x33ed,0x33f1,0x33f7,0x2fd7,0x33fb,0x33ff,0x3403,0x3407,0x2fdb,0x340b,0x340f,0x3413,0x2fdf, +0x3419,0x341d,0x3421,0x3425,0x342b,0x342f,0x3433,0x3437,0x343d,0x3441,0x3445,0x3449,0x30c9,0x344d,0x3453,0x3457, +0x345b,0x345f,0x3463,0x3467,0x346b,0x346f,0x30dd,0x2fe3,0x2fe7,0x30e1,0x3473,0x3477,0x2ce3,0x347b,0x2feb,0x347f, +0x3483,0x3487,0x348b,0x348b,0x348b,0x348f,0x3495,0x3499,0x349d,0x34a1,0x34a7,0x34ab,0x34af,0x34b3,0x34b7,0x34bb, +0x34bf,0x34c3,0x34c7,0x34cb,0x34cf,0x34d3,0x34d7,0x34d7,0x30e9,0x34db,0x34df,0x34e3,0x34e7,0x2ff3,0x34eb,0x34ef, +0x34f3,0x2f47,0x34f7,0x34fb,0x34ff,0x3503,0x3507,0x350b,0x350f,0x3513,0x3517,0x351d,0x3521,0x3525,0x3529,0x352d, +0x3531,0x3535,0x353b,0x3541,0x3545,0x3549,0x354d,0x3551,0x3555,0x3559,0x355d,0x3561,0x3561,0x3565,0x356b,0x356f, +0x2cd3,0x3573,0x3577,0x357d,0x3581,0x3585,0x3589,0x358d,0x3591,0x3007,0x3595,0x3599,0x359d,0x35a3,0x35a7,0x35ad, +0x35b1,0x35b5,0x35b9,0x35bd,0x35c1,0x35c5,0x35c9,0x35cd,0x35d1,0x35d5,0x35d9,0x35df,0x35e3,0x35e7,0x35eb,0x2bfb, +0x35ef,0x35f5,0x35f9,0x35f9,0x35ff,0x3603,0x3603,0x3607,0x360b,0x3611,0x3617,0x361b,0x361f,0x3623,0x3627,0x362b, +0x362f,0x3633,0x3637,0x363b,0x300b,0x363f,0x3645,0x3649,0x364d,0x3119,0x364d,0x3651,0x3013,0x3655,0x3659,0x365d, +0x3661,0x3017,0x2b8f,0x3665,0x3669,0x366d,0x3671,0x3675,0x3679,0x367d,0x3683,0x3687,0x368b,0x368f,0x3693,0x3697, +0x369d,0x36a1,0x36a5,0x36a9,0x36ad,0x36b1,0x36b5,0x36b9,0x36bd,0x301b,0x36c1,0x36c5,0x36cb,0x36cf,0x36d3,0x36d7, +0x3023,0x36db,0x36df,0x36e3,0x36e7,0x36eb,0x36ef,0x36f3,0x36f7,0x2bff,0x3139,0x36fb,0x36ff,0x3703,0x3707,0x370d, +0x3711,0x3715,0x3719,0x3027,0x371d,0x3723,0x3727,0x372b,0x31eb,0x372f,0x3733,0x3737,0x373b,0x373f,0x3745,0x3749, +0x374d,0x3751,0x3757,0x375b,0x375f,0x3763,0x2d17,0x3767,0x376b,0x3771,0x3777,0x377d,0x3781,0x3787,0x378b,0x378f, +0x3793,0x3797,0x302b,0x2e73,0x379b,0x379f,0x37a3,0x37a7,0x37ad,0x37b1,0x37b5,0x37b9,0x3149,0x37bd,0x37c1,0x37c7, +0x37cb,0x37cf,0x37d5,0x37db,0x37df,0x314d,0x37e3,0x37e7,0x37eb,0x37ef,0x37f3,0x37f7,0x37fb,0x3801,0x3805,0x380b, +0x380f,0x3815,0x3155,0x3819,0x381d,0x3823,0x3827,0x382b,0x3831,0x3837,0x383b,0x383f,0x3843,0x3847,0x3847,0x384b, +0x384f,0x315d,0x3853,0x3857,0x385b,0x385f,0x3863,0x3869,0x386d,0x2cdf,0x3873,0x3879,0x387d,0x3883,0x3889,0x388f, +0x3893,0x3175,0x3897,0x389d,0x38a3,0x38a9,0x38af,0x38b3,0x38b3,0x3179,0x31f3,0x38b7,0x38bb,0x38bf,0x38c3,0x38c9, +0x2c47,0x3181,0x38cd,0x38d1,0x3057,0x38d7,0x38dd,0x2f9f,0x38e3,0x38e7,0x3067,0x38eb,0x38ef,0x38f3,0x38f9,0x38f9, +0x38ff,0x3903,0x3907,0x390d,0x3911,0x3915,0x3919,0x391f,0x3923,0x3927,0x392b,0x392f,0x3933,0x3939,0x393d,0x3941, +0x3945,0x3949,0x394d,0x3951,0x3957,0x395d,0x3961,0x3967,0x396b,0x3971,0x3975,0x307f,0x3979,0x397f,0x3985,0x3989, +0x398f,0x3993,0x3999,0x399d,0x39a1,0x39a5,0x39a9,0x39ad,0x39b1,0x39b7,0x39bd,0x39c3,0x35ff,0x39c9,0x39cd,0x39d1, +0x39d5,0x39d9,0x39dd,0x39e1,0x39e5,0x39e9,0x39ed,0x39f1,0x39f5,0x2d27,0x39fb,0x39ff,0x3a03,0x3a07,0x3a0b,0x3a0f, +0x308b,0x3a13,0x3a17,0x3a1b,0x3a1f,0x3a23,0x3a29,0x3a2f,0x3a35,0x3a39,0x3a3d,0x3a41,0x3a45,0x3a4b,0x3a4f,0x3a55, +0x3a59,0x3a5d,0x3a63,0x3a69,0x3a6d,0x2c33,0x3a71,0x3a75,0x3a79,0x3a7d,0x3a81,0x3a85,0x319d,0x3a89,0x3a8d,0x3a91, +0x3a95,0x3a99,0x3a9d,0x3aa1,0x3aa5,0x3aa9,0x3aad,0x3ab3,0x3ab7,0x3abb,0x3abf,0x3ac3,0x3ac7,0x3acd,0x3ad3,0x3ad7, +0x3adb,0x31b1,0x31b5,0x3adf,0x3ae3,0x3ae9,0x3aed,0x3af1,0x3af5,0x3af9,0x3aff,0x3b05,0x3b09,0x3b0d,0x3b11,0x3b17, +0x31b9,0x3b1b,0x3b21,0x3b27,0x3b2b,0x3b2f,0x3b33,0x3b39,0x3b3d,0x3b41,0x3b45,0x3b49,0x3b4d,0x3b51,0x3b55,0x3b5b, +0x3b5f,0x3b63,0x3b67,0x3b6d,0x3b71,0x3b75,0x3b79,0x3b7d,0x3b83,0x3b89,0x3b8d,0x3b91,0x3b95,0x3b9b,0x3b9f,0x31d1, +0x31d1,0x3ba5,0x3ba9,0x3baf,0x3bb3,0x3bb7,0x3bbb,0x3bbf,0x3bc3,0x3bc7,0x3bcb,0x31d5,0x3bd1,0x3bd5,0x3bd9,0x3bdd, +0x3be1,0x3be5,0x3beb,0x3bef,0x3bf5,0x3bfb,0x3c01,0x3c05,0x3c09,0x3c0d,0x3c11,0x3c15,0x3c19,0x3c1d,0x3c21,1, +1 }; static const UCPTrie norm2_nfc_data_trie={ norm2_nfc_data_trieIndex, { norm2_nfc_data_trieData }, - 1788, 7984, + 1869, 8129, 0x2fc00, 0x30, 0, 0, 0, 0, @@ -645,7 +660,7 @@ static const UCPTrie norm2_nfc_data_trie={ 0x1, }; -static const uint16_t norm2_nfc_data_extraData[7732]={ +static const uint16_t norm2_nfc_data_extraData[7918]={ 0xffff,0xffff,0x8670,0x44dc,0x8670,0x44c0,0x8670,0x44de,0x600,0x180,0x602,0x182,0x604,0x185,0x606,0x186, 0x608,0x200,0x60c,0x205,0x60e,0x44d,0x610,0x189,0x612,0x3d44,0x614,0x18b,0x618,0x39a,0x61e,0x400, 0x622,0x404,0x646,0x3d41,0x64a,0x3c00,0x8650,0x208,0x60e,0x3c04,0x646,0x3c08,0x8662,0x3c0c,0x602,0x20c, @@ -730,406 +745,417 @@ static const uint16_t norm2_nfc_data_extraData[7732]={ 0xe132,0x615c,0xe132,0x6160,0xe132,0x6164,0xe132,0x6168,0xe132,0x616c,0xe132,0x6170,0xe132,0x6174,0xe132,0x6178, 0xe132,0x617c,0xe132,0x6180,0xe132,0x6184,0xe132,0x618a,0xe132,0x618e,0xe132,0x6192,0x6132,0x61a0,0xe134,0x61a2, 0x6132,0x61a6,0xe134,0x61a8,0x6132,0x61ac,0xe134,0x61ae,0x6132,0x61b2,0xe134,0x61b4,0x6132,0x61b8,0xe134,0x61ba, -0xe132,0x61ee,0xe132,0x61f0,0xe132,0x61f2,0xe132,0x61f4,0xe132,0x61fc,0xb489,0x2e82,0x2134,0xb489,0x2e82,0x2138, -0xb489,0x2e82,0x2156,0xb489,0x49c2,0x225c,0xb489,0x49c2,0x225e,0x3489,0xcf82,0x2696,0xb489,0xd5c2,0x2698,0x348b, -0x2c02,0x2978,0x348b,0x2e82,0x2976,0xb48b,0x2f42,0x297c,0xb48b,0x6bc2,0x2b74,0xb48b,0x6bc2,0x2b76,0xb48d,0x4c02, -0x3270,2,0xe602,0x41,0x302,0x600,0x3d4c,0x602,0x3d48,0x606,0x3d54,0x8612,0x3d50,0xe602,0x41,0x308, -0x8608,0x3bc,0xe602,0x41,0x30a,0x8602,0x3f4,0xca02,0x43,0x327,0x8602,0x3c10,0xe602,0x45,0x302,0x600, -0x3d80,0x602,0x3d7c,0x606,0x3d88,0x8612,0x3d84,0xe602,0x49,0x308,0x8602,0x3c5c,0xe602,0x4f,0x302,0x600, -0x3da4,0x602,0x3da0,0x606,0x3dac,0x8612,0x3da8,0xe602,0x4f,0x303,0x602,0x3c98,0x608,0x458,0x8610,0x3c9c, -0xe602,0x4f,0x308,0x8608,0x454,0xe602,0x55,0x308,0x600,0x3b6,0x602,0x3ae,0x608,0x3aa,0x8618,0x3b2, -0xe602,0x61,0x302,0x600,0x3d4e,0x602,0x3d4a,0x606,0x3d56,0x8612,0x3d52,0xe602,0x61,0x308,0x8608,0x3be, -0xe602,0x61,0x30a,0x8602,0x3f6,0xca02,0x63,0x327,0x8602,0x3c12,0xe602,0x65,0x302,0x600,0x3d82,0x602, -0x3d7e,0x606,0x3d8a,0x8612,0x3d86,0xe602,0x69,0x308,0x8602,0x3c5e,0xe602,0x6f,0x302,0x600,0x3da6,0x602, -0x3da2,0x606,0x3dae,0x8612,0x3daa,0xe602,0x6f,0x303,0x602,0x3c9a,0x608,0x45a,0x8610,0x3c9e,0xe602,0x6f, -0x308,0x8608,0x456,0xe602,0x75,0x308,0x600,0x3b8,0x602,0x3b0,0x608,0x3ac,0x8618,0x3b4,0xe602,0x41, -0x306,0x600,0x3d60,0x602,0x3d5c,0x606,0x3d68,0x8612,0x3d64,0xe602,0x61,0x306,0x600,0x3d62,0x602,0x3d5e, -0x606,0x3d6a,0x8612,0x3d66,0xe602,0x45,0x304,0x600,0x3c28,0x8602,0x3c2c,0xe602,0x65,0x304,0x600,0x3c2a, -0x8602,0x3c2e,0xe602,0x4f,0x304,0x600,0x3ca0,0x8602,0x3ca4,0xe602,0x6f,0x304,0x600,0x3ca2,0x8602,0x3ca6, -0xe602,0x53,0x301,0x860e,0x3cc8,0xe602,0x73,0x301,0x860e,0x3cca,0xe602,0x53,0x30c,0x860e,0x3ccc,0xe602, -0x73,0x30c,0x860e,0x3cce,0xe602,0x55,0x303,0x8602,0x3cf0,0xe602,0x75,0x303,0x8602,0x3cf2,0xe602,0x55, -0x304,0x8610,0x3cf4,0xe602,0x75,0x304,0x8610,0x3cf6,0xd802,0x4f,0x31b,0x600,0x3db8,0x602,0x3db4,0x606, -0x3dc0,0x612,0x3dbc,0x8646,0x3dc4,0xd802,0x6f,0x31b,0x600,0x3dba,0x602,0x3db6,0x606,0x3dc2,0x612,0x3dbe, -0x8646,0x3dc6,0xd802,0x55,0x31b,0x600,0x3dd4,0x602,0x3dd0,0x606,0x3ddc,0x612,0x3dd8,0x8646,0x3de0,0xd802, -0x75,0x31b,0x600,0x3dd6,0x602,0x3dd2,0x606,0x3dde,0x612,0x3dda,0x8646,0x3de2,0xca02,0x4f,0x328,0x8608, -0x3d8,0xca02,0x6f,0x328,0x8608,0x3da,0xe602,0x41,0x307,0x8608,0x3c0,0xe602,0x61,0x307,0x8608,0x3c2, -0xca02,0x45,0x327,0x860c,0x3c38,0xca02,0x65,0x327,0x860c,0x3c3a,0xe602,0x4f,0x307,0x8608,0x460,0xe602, -0x6f,0x307,0x8608,0x462,0xe602,0x3b1,0x301,0x868a,0x3f68,0xe602,0x3b7,0x301,0x868a,0x3f88,0xe602,0x3b9, -0x308,0x600,0x3fa4,0x602,0x720,0x8684,0x3fae,0xe602,0x3c5,0x308,0x600,0x3fc4,0x602,0x760,0x8684,0x3fce, -0xe602,0x3c9,0x301,0x868a,0x3fe8,2,0xcc6,0xcc2,0x99aa,0x1996,2,0xdd9,0xdcf,0x9b94,0x1bba,0xdc02, -0x4c,0x323,0x8608,0x3c70,0xdc02,0x6c,0x323,0x8608,0x3c72,0xdc02,0x52,0x323,0x8608,0x3cb8,0xdc02,0x72, -0x323,0x8608,0x3cba,0xdc02,0x53,0x323,0x860e,0x3cd0,0xdc02,0x73,0x323,0x860e,0x3cd2,0xdc02,0x41,0x323, -0x604,0x3d58,0x860c,0x3d6c,0xdc02,0x61,0x323,0x604,0x3d5a,0x860c,0x3d6e,0xdc02,0x45,0x323,0x8604,0x3d8c, -0xdc02,0x65,0x323,0x8604,0x3d8e,0xdc02,0x4f,0x323,0x8604,0x3db0,0xdc02,0x6f,0x323,0x8604,0x3db2,0xe602, -0x3b1,0x313,0x600,0x3e05,0x602,0x3e09,0x684,0x3e0d,0x868a,0x3f00,0xe602,0x3b1,0x314,0x600,0x3e07,0x602, -0x3e0b,0x684,0x3e0f,0x868a,0x3f02,0x1f00,0xe643,0x3b1,0x313,0x300,0x868a,0x3f04,0x1f01,0xe643,0x3b1,0x314, -0x300,0x868a,0x3f06,0x1f00,0xe643,0x3b1,0x313,0x301,0x868a,0x3f08,0x1f01,0xe643,0x3b1,0x314,0x301,0x868a, -0x3f0a,0x1f00,0xe643,0x3b1,0x313,0x342,0x868a,0x3f0c,0x1f01,0xe643,0x3b1,0x314,0x342,0x868a,0x3f0e,0xe602, -0x391,0x313,0x600,0x3e15,0x602,0x3e19,0x684,0x3e1d,0x868a,0x3f10,0xe602,0x391,0x314,0x600,0x3e17,0x602, -0x3e1b,0x684,0x3e1f,0x868a,0x3f12,0x1f08,0xe643,0x391,0x313,0x300,0x868a,0x3f14,0x1f09,0xe643,0x391,0x314, -0x300,0x868a,0x3f16,0x1f08,0xe643,0x391,0x313,0x301,0x868a,0x3f18,0x1f09,0xe643,0x391,0x314,0x301,0x868a, -0x3f1a,0x1f08,0xe643,0x391,0x313,0x342,0x868a,0x3f1c,0x1f09,0xe643,0x391,0x314,0x342,0x868a,0x3f1e,0xe602, -0x3b5,0x313,0x600,0x3e24,0x8602,0x3e28,0xe602,0x3b5,0x314,0x600,0x3e26,0x8602,0x3e2a,0xe602,0x395,0x313, -0x600,0x3e34,0x8602,0x3e38,0xe602,0x395,0x314,0x600,0x3e36,0x8602,0x3e3a,0xe602,0x3b7,0x313,0x600,0x3e45, -0x602,0x3e49,0x684,0x3e4d,0x868a,0x3f20,0xe602,0x3b7,0x314,0x600,0x3e47,0x602,0x3e4b,0x684,0x3e4f,0x868a, -0x3f22,0x1f20,0xe643,0x3b7,0x313,0x300,0x868a,0x3f24,0x1f21,0xe643,0x3b7,0x314,0x300,0x868a,0x3f26,0x1f20, -0xe643,0x3b7,0x313,0x301,0x868a,0x3f28,0x1f21,0xe643,0x3b7,0x314,0x301,0x868a,0x3f2a,0x1f20,0xe643,0x3b7, -0x313,0x342,0x868a,0x3f2c,0x1f21,0xe643,0x3b7,0x314,0x342,0x868a,0x3f2e,0xe602,0x397,0x313,0x600,0x3e55, -0x602,0x3e59,0x684,0x3e5d,0x868a,0x3f30,0xe602,0x397,0x314,0x600,0x3e57,0x602,0x3e5b,0x684,0x3e5f,0x868a, -0x3f32,0x1f28,0xe643,0x397,0x313,0x300,0x868a,0x3f34,0x1f29,0xe643,0x397,0x314,0x300,0x868a,0x3f36,0x1f28, -0xe643,0x397,0x313,0x301,0x868a,0x3f38,0x1f29,0xe643,0x397,0x314,0x301,0x868a,0x3f3a,0x1f28,0xe643,0x397, -0x313,0x342,0x868a,0x3f3c,0x1f29,0xe643,0x397,0x314,0x342,0x868a,0x3f3e,0xe602,0x3b9,0x313,0x600,0x3e64, -0x602,0x3e68,0x8684,0x3e6c,0xe602,0x3b9,0x314,0x600,0x3e66,0x602,0x3e6a,0x8684,0x3e6e,0xe602,0x399,0x313, -0x600,0x3e74,0x602,0x3e78,0x8684,0x3e7c,0xe602,0x399,0x314,0x600,0x3e76,0x602,0x3e7a,0x8684,0x3e7e,0xe602, -0x3bf,0x313,0x600,0x3e84,0x8602,0x3e88,0xe602,0x3bf,0x314,0x600,0x3e86,0x8602,0x3e8a,0xe602,0x39f,0x313, -0x600,0x3e94,0x8602,0x3e98,0xe602,0x39f,0x314,0x600,0x3e96,0x8602,0x3e9a,0xe602,0x3c5,0x313,0x600,0x3ea4, -0x602,0x3ea8,0x8684,0x3eac,0xe602,0x3c5,0x314,0x600,0x3ea6,0x602,0x3eaa,0x8684,0x3eae,0xe602,0x3a5,0x314, -0x600,0x3eb6,0x602,0x3eba,0x8684,0x3ebe,0xe602,0x3c9,0x313,0x600,0x3ec5,0x602,0x3ec9,0x684,0x3ecd,0x868a, -0x3f40,0xe602,0x3c9,0x314,0x600,0x3ec7,0x602,0x3ecb,0x684,0x3ecf,0x868a,0x3f42,0x1f60,0xe643,0x3c9,0x313, -0x300,0x868a,0x3f44,0x1f61,0xe643,0x3c9,0x314,0x300,0x868a,0x3f46,0x1f60,0xe643,0x3c9,0x313,0x301,0x868a, -0x3f48,0x1f61,0xe643,0x3c9,0x314,0x301,0x868a,0x3f4a,0x1f60,0xe643,0x3c9,0x313,0x342,0x868a,0x3f4c,0x1f61, -0xe643,0x3c9,0x314,0x342,0x868a,0x3f4e,0xe602,0x3a9,0x313,0x600,0x3ed5,0x602,0x3ed9,0x684,0x3edd,0x868a, -0x3f50,0xe602,0x3a9,0x314,0x600,0x3ed7,0x602,0x3edb,0x684,0x3edf,0x868a,0x3f52,0x1f68,0xe643,0x3a9,0x313, -0x300,0x868a,0x3f54,0x1f69,0xe643,0x3a9,0x314,0x300,0x868a,0x3f56,0x1f68,0xe643,0x3a9,0x313,0x301,0x868a, -0x3f58,0x1f69,0xe643,0x3a9,0x314,0x301,0x868a,0x3f5a,0x1f68,0xe643,0x3a9,0x313,0x342,0x868a,0x3f5c,0x1f69, -0xe643,0x3a9,0x314,0x342,0x868a,0x3f5e,0xe602,0x3b1,0x300,0x868a,0x3f64,0xe602,0x3b7,0x300,0x868a,0x3f84, -0xe602,0x3c9,0x300,0x868a,0x3fe4,0xe602,0x3b1,0x342,0x868a,0x3f6e,0xe602,0x3b7,0x342,0x868a,0x3f8e,0xe602, -0x3c9,0x342,0x868a,0x3fee,3,0xe602,0x41,0x300,0xe602,0x41,0x301,0xe602,0x41,0x303,0xe602,0x45, -0x300,0xe602,0x45,0x301,0xe602,0x45,0x308,0xe602,0x49,0x300,0xe602,0x49,0x301,0xe602,0x49,0x302, -0xe602,0x4e,0x303,0xe602,0x4f,0x300,0xe602,0x4f,0x301,0xe602,0x55,0x300,0xe602,0x55,0x301,0xe602, -0x55,0x302,0xe602,0x59,0x301,0xe602,0x61,0x300,0xe602,0x61,0x301,0xe602,0x61,0x303,0xe602,0x65, -0x300,0xe602,0x65,0x301,0xe602,0x65,0x308,0xe602,0x69,0x300,0xe602,0x69,0x301,0xe602,0x69,0x302, -0xe602,0x6e,0x303,0xe602,0x6f,0x300,0xe602,0x6f,0x301,0xe602,0x75,0x300,0xe602,0x75,0x301,0xe602, -0x75,0x302,0xe602,0x79,0x301,0xe602,0x79,0x308,0xe602,0x41,0x304,0xe602,0x61,0x304,0xca02,0x41, -0x328,0xca02,0x61,0x328,0xe602,0x43,0x301,0xe602,0x63,0x301,0xe602,0x43,0x302,0xe602,0x63,0x302, -0xe602,0x43,0x307,0xe602,0x63,0x307,0xe602,0x43,0x30c,0xe602,0x63,0x30c,0xe602,0x44,0x30c,0xe602, -0x64,0x30c,0xe602,0x45,0x306,0xe602,0x65,0x306,0xe602,0x45,0x307,0xe602,0x65,0x307,0xca02,0x45, -0x328,0xca02,0x65,0x328,0xe602,0x45,0x30c,0xe602,0x65,0x30c,0xe602,0x47,0x302,0xe602,0x67,0x302, -0xe602,0x47,0x306,0xe602,0x67,0x306,0xe602,0x47,0x307,0xe602,0x67,0x307,0xca02,0x47,0x327,0xca02, -0x67,0x327,0xe602,0x48,0x302,0xe602,0x68,0x302,0xe602,0x49,0x303,0xe602,0x69,0x303,0xe602,0x49, -0x304,0xe602,0x69,0x304,0xe602,0x49,0x306,0xe602,0x69,0x306,0xca02,0x49,0x328,0xca02,0x69,0x328, -0xe602,0x49,0x307,0xe602,0x4a,0x302,0xe602,0x6a,0x302,0xca02,0x4b,0x327,0xca02,0x6b,0x327,0xe602, -0x4c,0x301,0xe602,0x6c,0x301,0xca02,0x4c,0x327,0xca02,0x6c,0x327,0xe602,0x4c,0x30c,0xe602,0x6c, -0x30c,0xe602,0x4e,0x301,0xe602,0x6e,0x301,0xca02,0x4e,0x327,0xca02,0x6e,0x327,0xe602,0x4e,0x30c, -0xe602,0x6e,0x30c,0xe602,0x4f,0x306,0xe602,0x6f,0x306,0xe602,0x4f,0x30b,0xe602,0x6f,0x30b,0xe602, -0x52,0x301,0xe602,0x72,0x301,0xca02,0x52,0x327,0xca02,0x72,0x327,0xe602,0x52,0x30c,0xe602,0x72, -0x30c,0xe602,0x53,0x302,0xe602,0x73,0x302,0xca02,0x53,0x327,0xca02,0x73,0x327,0xca02,0x54,0x327, -0xca02,0x74,0x327,0xe602,0x54,0x30c,0xe602,0x74,0x30c,0xe602,0x55,0x306,0xe602,0x75,0x306,0xe602, -0x55,0x30a,0xe602,0x75,0x30a,0xe602,0x55,0x30b,0xe602,0x75,0x30b,0xca02,0x55,0x328,0xca02,0x75, -0x328,0xe602,0x57,0x302,0xe602,0x77,0x302,0xe602,0x59,0x302,0xe602,0x79,0x302,0xe602,0x59,0x308, -0xe602,0x5a,0x301,0xe602,0x7a,0x301,0xe602,0x5a,0x307,0xe602,0x7a,0x307,0xe602,0x5a,0x30c,0xe602, -0x7a,0x30c,0xe602,0x41,0x30c,0xe602,0x61,0x30c,0xe602,0x49,0x30c,0xe602,0x69,0x30c,0xe602,0x4f, -0x30c,0xe602,0x6f,0x30c,0xe602,0x55,0x30c,0xe602,0x75,0x30c,0xdc,0xe643,0x55,0x308,0x304,0xfc, -0xe643,0x75,0x308,0x304,0xdc,0xe643,0x55,0x308,0x301,0xfc,0xe643,0x75,0x308,0x301,0xdc,0xe643, -0x55,0x308,0x30c,0xfc,0xe643,0x75,0x308,0x30c,0xdc,0xe643,0x55,0x308,0x300,0xfc,0xe643,0x75, -0x308,0x300,0xc4,0xe643,0x41,0x308,0x304,0xe4,0xe643,0x61,0x308,0x304,0x226,0xe643,0x41,0x307, -0x304,0x227,0xe643,0x61,0x307,0x304,0xe602,0xc6,0x304,0xe602,0xe6,0x304,0xe602,0x47,0x30c,0xe602, -0x67,0x30c,0xe602,0x4b,0x30c,0xe602,0x6b,0x30c,0x1ea,0xe643,0x4f,0x328,0x304,0x1eb,0xe643,0x6f, -0x328,0x304,0xe602,0x1b7,0x30c,0xe602,0x292,0x30c,0xe602,0x6a,0x30c,0xe602,0x47,0x301,0xe602,0x67, -0x301,0xe602,0x4e,0x300,0xe602,0x6e,0x300,0xc5,0xe643,0x41,0x30a,0x301,0xe5,0xe643,0x61,0x30a, -0x301,0xe602,0xc6,0x301,0xe602,0xe6,0x301,0xe602,0xd8,0x301,0xe602,0xf8,0x301,0xe602,0x41,0x30f, -0xe602,0x61,0x30f,0xe602,0x41,0x311,0xe602,0x61,0x311,0xe602,0x45,0x30f,0xe602,0x65,0x30f,0xe602, -0x45,0x311,0xe602,0x65,0x311,0xe602,0x49,0x30f,0xe602,0x69,0x30f,0xe602,0x49,0x311,0xe602,0x69, -0x311,0xe602,0x4f,0x30f,0xe602,0x6f,0x30f,0xe602,0x4f,0x311,0xe602,0x6f,0x311,0xe602,0x52,0x30f, -0xe602,0x72,0x30f,0xe602,0x52,0x311,0xe602,0x72,0x311,0xe602,0x55,0x30f,0xe602,0x75,0x30f,0xe602, -0x55,0x311,0xe602,0x75,0x311,0xdc02,0x53,0x326,0xdc02,0x73,0x326,0xdc02,0x54,0x326,0xdc02,0x74, -0x326,0xe602,0x48,0x30c,0xe602,0x68,0x30c,0xd6,0xe643,0x4f,0x308,0x304,0xf6,0xe643,0x6f,0x308, -0x304,0xd5,0xe643,0x4f,0x303,0x304,0xf5,0xe643,0x6f,0x303,0x304,0x22e,0xe643,0x4f,0x307,0x304, -0x22f,0xe643,0x6f,0x307,0x304,0xe602,0x59,0x304,0xe602,0x79,0x304,0xe602,0xa8,0x301,0xe602,0x391, -0x301,0xe602,0x395,0x301,0xe602,0x397,0x301,0xe602,0x399,0x301,0xe602,0x39f,0x301,0xe602,0x3a5,0x301, -0xe602,0x3a9,0x301,0x3ca,0xe643,0x3b9,0x308,0x301,0xe602,0x399,0x308,0xe602,0x3a5,0x308,0xe602,0x3b5, -0x301,0xe602,0x3b9,0x301,0x3cb,0xe643,0x3c5,0x308,0x301,0xe602,0x3bf,0x301,0xe602,0x3c5,0x301,0xe602, -0x3d2,0x301,0xe602,0x3d2,0x308,0xe602,0x415,0x300,0xe602,0x415,0x308,0xe602,0x413,0x301,0xe602,0x406, -0x308,0xe602,0x41a,0x301,0xe602,0x418,0x300,0xe602,0x423,0x306,0xe602,0x418,0x306,0xe602,0x438,0x306, -0xe602,0x435,0x300,0xe602,0x435,0x308,0xe602,0x433,0x301,0xe602,0x456,0x308,0xe602,0x43a,0x301,0xe602, -0x438,0x300,0xe602,0x443,0x306,0xe602,0x474,0x30f,0xe602,0x475,0x30f,0xe602,0x416,0x306,0xe602,0x436, -0x306,0xe602,0x410,0x306,0xe602,0x430,0x306,0xe602,0x410,0x308,0xe602,0x430,0x308,0xe602,0x415,0x306, -0xe602,0x435,0x306,0xe602,0x4d8,0x308,0xe602,0x4d9,0x308,0xe602,0x416,0x308,0xe602,0x436,0x308,0xe602, -0x417,0x308,0xe602,0x437,0x308,0xe602,0x418,0x304,0xe602,0x438,0x304,0xe602,0x418,0x308,0xe602,0x438, -0x308,0xe602,0x41e,0x308,0xe602,0x43e,0x308,0xe602,0x4e8,0x308,0xe602,0x4e9,0x308,0xe602,0x42d,0x308, -0xe602,0x44d,0x308,0xe602,0x423,0x304,0xe602,0x443,0x304,0xe602,0x423,0x308,0xe602,0x443,0x308,0xe602, -0x423,0x30b,0xe602,0x443,0x30b,0xe602,0x427,0x308,0xe602,0x447,0x308,0xe602,0x42b,0x308,0xe602,0x44b, -0x308,0xe602,0x627,0x653,0xe602,0x627,0x654,0xe602,0x648,0x654,0xdc02,0x627,0x655,0xe602,0x64a,0x654, -0xe602,0x6d5,0x654,0xe602,0x6c1,0x654,0xe602,0x6d2,0x654,0x702,0x928,0x93c,0x702,0x930,0x93c,0x702, -0x933,0x93c,2,0x9c7,0x9be,2,0x9c7,0x9d7,2,0xb47,0xb56,2,0xb47,0xb3e,2,0xb47, -0xb57,2,0xb92,0xbd7,2,0xbc6,0xbbe,2,0xbc7,0xbbe,2,0xbc6,0xbd7,0x5b02,0xc46,0xc56, -2,0xcbf,0xcd5,2,0xcc6,0xcd5,2,0xcc6,0xcd6,0xcca,0x43,0xcc6,0xcc2,0xcd5,2,0xd46, -0xd3e,2,0xd47,0xd3e,2,0xd46,0xd57,0x902,0xdd9,0xdca,0xddc,0x943,0xdd9,0xdcf,0xdca,2, -0xdd9,0xddf,2,0x1025,0x102e,2,0x1b05,0x1b35,2,0x1b07,0x1b35,2,0x1b09,0x1b35,2,0x1b0b, -0x1b35,2,0x1b0d,0x1b35,2,0x1b11,0x1b35,2,0x1b3a,0x1b35,2,0x1b3c,0x1b35,2,0x1b3e,0x1b35, -2,0x1b3f,0x1b35,2,0x1b42,0x1b35,0xdc02,0x41,0x325,0xdc02,0x61,0x325,0xe602,0x42,0x307,0xe602, -0x62,0x307,0xdc02,0x42,0x323,0xdc02,0x62,0x323,0xdc02,0x42,0x331,0xdc02,0x62,0x331,0xc7,0xe643, -0x43,0x327,0x301,0xe7,0xe643,0x63,0x327,0x301,0xe602,0x44,0x307,0xe602,0x64,0x307,0xdc02,0x44, -0x323,0xdc02,0x64,0x323,0xdc02,0x44,0x331,0xdc02,0x64,0x331,0xca02,0x44,0x327,0xca02,0x64,0x327, -0xdc02,0x44,0x32d,0xdc02,0x64,0x32d,0x112,0xe643,0x45,0x304,0x300,0x113,0xe643,0x65,0x304,0x300, -0x112,0xe643,0x45,0x304,0x301,0x113,0xe643,0x65,0x304,0x301,0xdc02,0x45,0x32d,0xdc02,0x65,0x32d, -0xdc02,0x45,0x330,0xdc02,0x65,0x330,0x228,0xe643,0x45,0x327,0x306,0x229,0xe643,0x65,0x327,0x306, -0xe602,0x46,0x307,0xe602,0x66,0x307,0xe602,0x47,0x304,0xe602,0x67,0x304,0xe602,0x48,0x307,0xe602, -0x68,0x307,0xdc02,0x48,0x323,0xdc02,0x68,0x323,0xe602,0x48,0x308,0xe602,0x68,0x308,0xca02,0x48, -0x327,0xca02,0x68,0x327,0xdc02,0x48,0x32e,0xdc02,0x68,0x32e,0xdc02,0x49,0x330,0xdc02,0x69,0x330, -0xcf,0xe643,0x49,0x308,0x301,0xef,0xe643,0x69,0x308,0x301,0xe602,0x4b,0x301,0xe602,0x6b,0x301, -0xdc02,0x4b,0x323,0xdc02,0x6b,0x323,0xdc02,0x4b,0x331,0xdc02,0x6b,0x331,0x1e36,0xe643,0x4c,0x323, -0x304,0x1e37,0xe643,0x6c,0x323,0x304,0xdc02,0x4c,0x331,0xdc02,0x6c,0x331,0xdc02,0x4c,0x32d,0xdc02, -0x6c,0x32d,0xe602,0x4d,0x301,0xe602,0x6d,0x301,0xe602,0x4d,0x307,0xe602,0x6d,0x307,0xdc02,0x4d, -0x323,0xdc02,0x6d,0x323,0xe602,0x4e,0x307,0xe602,0x6e,0x307,0xdc02,0x4e,0x323,0xdc02,0x6e,0x323, -0xdc02,0x4e,0x331,0xdc02,0x6e,0x331,0xdc02,0x4e,0x32d,0xdc02,0x6e,0x32d,0xd5,0xe643,0x4f,0x303, -0x301,0xf5,0xe643,0x6f,0x303,0x301,0xd5,0xe643,0x4f,0x303,0x308,0xf5,0xe643,0x6f,0x303,0x308, -0x14c,0xe643,0x4f,0x304,0x300,0x14d,0xe643,0x6f,0x304,0x300,0x14c,0xe643,0x4f,0x304,0x301,0x14d, -0xe643,0x6f,0x304,0x301,0xe602,0x50,0x301,0xe602,0x70,0x301,0xe602,0x50,0x307,0xe602,0x70,0x307, -0xe602,0x52,0x307,0xe602,0x72,0x307,0x1e5a,0xe643,0x52,0x323,0x304,0x1e5b,0xe643,0x72,0x323,0x304, -0xdc02,0x52,0x331,0xdc02,0x72,0x331,0xe602,0x53,0x307,0xe602,0x73,0x307,0x15a,0xe643,0x53,0x301, -0x307,0x15b,0xe643,0x73,0x301,0x307,0x160,0xe643,0x53,0x30c,0x307,0x161,0xe643,0x73,0x30c,0x307, -0x1e62,0xe643,0x53,0x323,0x307,0x1e63,0xe643,0x73,0x323,0x307,0xe602,0x54,0x307,0xe602,0x74,0x307, -0xdc02,0x54,0x323,0xdc02,0x74,0x323,0xdc02,0x54,0x331,0xdc02,0x74,0x331,0xdc02,0x54,0x32d,0xdc02, -0x74,0x32d,0xdc02,0x55,0x324,0xdc02,0x75,0x324,0xdc02,0x55,0x330,0xdc02,0x75,0x330,0xdc02,0x55, -0x32d,0xdc02,0x75,0x32d,0x168,0xe643,0x55,0x303,0x301,0x169,0xe643,0x75,0x303,0x301,0x16a,0xe643, -0x55,0x304,0x308,0x16b,0xe643,0x75,0x304,0x308,0xe602,0x56,0x303,0xe602,0x76,0x303,0xdc02,0x56, -0x323,0xdc02,0x76,0x323,0xe602,0x57,0x300,0xe602,0x77,0x300,0xe602,0x57,0x301,0xe602,0x77,0x301, -0xe602,0x57,0x308,0xe602,0x77,0x308,0xe602,0x57,0x307,0xe602,0x77,0x307,0xdc02,0x57,0x323,0xdc02, -0x77,0x323,0xe602,0x58,0x307,0xe602,0x78,0x307,0xe602,0x58,0x308,0xe602,0x78,0x308,0xe602,0x59, -0x307,0xe602,0x79,0x307,0xe602,0x5a,0x302,0xe602,0x7a,0x302,0xdc02,0x5a,0x323,0xdc02,0x7a,0x323, -0xdc02,0x5a,0x331,0xdc02,0x7a,0x331,0xdc02,0x68,0x331,0xe602,0x74,0x308,0xe602,0x77,0x30a,0xe602, -0x79,0x30a,0xe602,0x17f,0x307,0xe602,0x41,0x309,0xe602,0x61,0x309,0xc2,0xe643,0x41,0x302,0x301, -0xe2,0xe643,0x61,0x302,0x301,0xc2,0xe643,0x41,0x302,0x300,0xe2,0xe643,0x61,0x302,0x300,0xc2, -0xe643,0x41,0x302,0x309,0xe2,0xe643,0x61,0x302,0x309,0xc2,0xe643,0x41,0x302,0x303,0xe2,0xe643, -0x61,0x302,0x303,0x1ea0,0xe643,0x41,0x323,0x302,0x1ea1,0xe643,0x61,0x323,0x302,0x102,0xe643,0x41, -0x306,0x301,0x103,0xe643,0x61,0x306,0x301,0x102,0xe643,0x41,0x306,0x300,0x103,0xe643,0x61,0x306, -0x300,0x102,0xe643,0x41,0x306,0x309,0x103,0xe643,0x61,0x306,0x309,0x102,0xe643,0x41,0x306,0x303, -0x103,0xe643,0x61,0x306,0x303,0x1ea0,0xe643,0x41,0x323,0x306,0x1ea1,0xe643,0x61,0x323,0x306,0xe602, -0x45,0x309,0xe602,0x65,0x309,0xe602,0x45,0x303,0xe602,0x65,0x303,0xca,0xe643,0x45,0x302,0x301, -0xea,0xe643,0x65,0x302,0x301,0xca,0xe643,0x45,0x302,0x300,0xea,0xe643,0x65,0x302,0x300,0xca, -0xe643,0x45,0x302,0x309,0xea,0xe643,0x65,0x302,0x309,0xca,0xe643,0x45,0x302,0x303,0xea,0xe643, -0x65,0x302,0x303,0x1eb8,0xe643,0x45,0x323,0x302,0x1eb9,0xe643,0x65,0x323,0x302,0xe602,0x49,0x309, -0xe602,0x69,0x309,0xdc02,0x49,0x323,0xdc02,0x69,0x323,0xe602,0x4f,0x309,0xe602,0x6f,0x309,0xd4, -0xe643,0x4f,0x302,0x301,0xf4,0xe643,0x6f,0x302,0x301,0xd4,0xe643,0x4f,0x302,0x300,0xf4,0xe643, -0x6f,0x302,0x300,0xd4,0xe643,0x4f,0x302,0x309,0xf4,0xe643,0x6f,0x302,0x309,0xd4,0xe643,0x4f, -0x302,0x303,0xf4,0xe643,0x6f,0x302,0x303,0x1ecc,0xe643,0x4f,0x323,0x302,0x1ecd,0xe643,0x6f,0x323, -0x302,0x1a0,0xe643,0x4f,0x31b,0x301,0x1a1,0xe643,0x6f,0x31b,0x301,0x1a0,0xe643,0x4f,0x31b,0x300, -0x1a1,0xe643,0x6f,0x31b,0x300,0x1a0,0xe643,0x4f,0x31b,0x309,0x1a1,0xe643,0x6f,0x31b,0x309,0x1a0, -0xe643,0x4f,0x31b,0x303,0x1a1,0xe643,0x6f,0x31b,0x303,0x1a0,0xdc43,0x4f,0x31b,0x323,0x1a1,0xdc43, -0x6f,0x31b,0x323,0xdc02,0x55,0x323,0xdc02,0x75,0x323,0xe602,0x55,0x309,0xe602,0x75,0x309,0x1af, -0xe643,0x55,0x31b,0x301,0x1b0,0xe643,0x75,0x31b,0x301,0x1af,0xe643,0x55,0x31b,0x300,0x1b0,0xe643, -0x75,0x31b,0x300,0x1af,0xe643,0x55,0x31b,0x309,0x1b0,0xe643,0x75,0x31b,0x309,0x1af,0xe643,0x55, -0x31b,0x303,0x1b0,0xe643,0x75,0x31b,0x303,0x1af,0xdc43,0x55,0x31b,0x323,0x1b0,0xdc43,0x75,0x31b, -0x323,0xe602,0x59,0x300,0xe602,0x79,0x300,0xdc02,0x59,0x323,0xdc02,0x79,0x323,0xe602,0x59,0x309, -0xe602,0x79,0x309,0xe602,0x59,0x303,0xe602,0x79,0x303,0x1f10,0xe643,0x3b5,0x313,0x300,0x1f11,0xe643, -0x3b5,0x314,0x300,0x1f10,0xe643,0x3b5,0x313,0x301,0x1f11,0xe643,0x3b5,0x314,0x301,0x1f18,0xe643,0x395, -0x313,0x300,0x1f19,0xe643,0x395,0x314,0x300,0x1f18,0xe643,0x395,0x313,0x301,0x1f19,0xe643,0x395,0x314, -0x301,0x1f30,0xe643,0x3b9,0x313,0x300,0x1f31,0xe643,0x3b9,0x314,0x300,0x1f30,0xe643,0x3b9,0x313,0x301, -0x1f31,0xe643,0x3b9,0x314,0x301,0x1f30,0xe643,0x3b9,0x313,0x342,0x1f31,0xe643,0x3b9,0x314,0x342,0x1f38, -0xe643,0x399,0x313,0x300,0x1f39,0xe643,0x399,0x314,0x300,0x1f38,0xe643,0x399,0x313,0x301,0x1f39,0xe643, -0x399,0x314,0x301,0x1f38,0xe643,0x399,0x313,0x342,0x1f39,0xe643,0x399,0x314,0x342,0x1f40,0xe643,0x3bf, -0x313,0x300,0x1f41,0xe643,0x3bf,0x314,0x300,0x1f40,0xe643,0x3bf,0x313,0x301,0x1f41,0xe643,0x3bf,0x314, -0x301,0x1f48,0xe643,0x39f,0x313,0x300,0x1f49,0xe643,0x39f,0x314,0x300,0x1f48,0xe643,0x39f,0x313,0x301, -0x1f49,0xe643,0x39f,0x314,0x301,0x1f50,0xe643,0x3c5,0x313,0x300,0x1f51,0xe643,0x3c5,0x314,0x300,0x1f50, -0xe643,0x3c5,0x313,0x301,0x1f51,0xe643,0x3c5,0x314,0x301,0x1f50,0xe643,0x3c5,0x313,0x342,0x1f51,0xe643, -0x3c5,0x314,0x342,0x1f59,0xe643,0x3a5,0x314,0x300,0x1f59,0xe643,0x3a5,0x314,0x301,0x1f59,0xe643,0x3a5, -0x314,0x342,0xe602,0x3b5,0x300,0xe602,0x3b9,0x300,0xe602,0x3bf,0x300,0xe602,0x3c5,0x300,0x1f00,0xf043, -0x3b1,0x313,0x345,0x1f01,0xf043,0x3b1,0x314,0x345,0x1f02,0x345,2,0xf044,0x3b1,0x313,0x300,0x345, -0x1f03,0x345,2,0xf044,0x3b1,0x314,0x300,0x345,0x1f04,0x345,2,0xf044,0x3b1,0x313,0x301,0x345, -0x1f05,0x345,2,0xf044,0x3b1,0x314,0x301,0x345,0x1f06,0x345,2,0xf044,0x3b1,0x313,0x342,0x345, -0x1f07,0x345,2,0xf044,0x3b1,0x314,0x342,0x345,0x1f08,0xf043,0x391,0x313,0x345,0x1f09,0xf043,0x391, -0x314,0x345,0x1f0a,0x345,2,0xf044,0x391,0x313,0x300,0x345,0x1f0b,0x345,2,0xf044,0x391,0x314, -0x300,0x345,0x1f0c,0x345,2,0xf044,0x391,0x313,0x301,0x345,0x1f0d,0x345,2,0xf044,0x391,0x314, -0x301,0x345,0x1f0e,0x345,2,0xf044,0x391,0x313,0x342,0x345,0x1f0f,0x345,2,0xf044,0x391,0x314, -0x342,0x345,0x1f20,0xf043,0x3b7,0x313,0x345,0x1f21,0xf043,0x3b7,0x314,0x345,0x1f22,0x345,2,0xf044, -0x3b7,0x313,0x300,0x345,0x1f23,0x345,2,0xf044,0x3b7,0x314,0x300,0x345,0x1f24,0x345,2,0xf044, -0x3b7,0x313,0x301,0x345,0x1f25,0x345,2,0xf044,0x3b7,0x314,0x301,0x345,0x1f26,0x345,2,0xf044, -0x3b7,0x313,0x342,0x345,0x1f27,0x345,2,0xf044,0x3b7,0x314,0x342,0x345,0x1f28,0xf043,0x397,0x313, -0x345,0x1f29,0xf043,0x397,0x314,0x345,0x1f2a,0x345,2,0xf044,0x397,0x313,0x300,0x345,0x1f2b,0x345, -2,0xf044,0x397,0x314,0x300,0x345,0x1f2c,0x345,2,0xf044,0x397,0x313,0x301,0x345,0x1f2d,0x345, -2,0xf044,0x397,0x314,0x301,0x345,0x1f2e,0x345,2,0xf044,0x397,0x313,0x342,0x345,0x1f2f,0x345, -2,0xf044,0x397,0x314,0x342,0x345,0x1f60,0xf043,0x3c9,0x313,0x345,0x1f61,0xf043,0x3c9,0x314,0x345, -0x1f62,0x345,2,0xf044,0x3c9,0x313,0x300,0x345,0x1f63,0x345,2,0xf044,0x3c9,0x314,0x300,0x345, -0x1f64,0x345,2,0xf044,0x3c9,0x313,0x301,0x345,0x1f65,0x345,2,0xf044,0x3c9,0x314,0x301,0x345, -0x1f66,0x345,2,0xf044,0x3c9,0x313,0x342,0x345,0x1f67,0x345,2,0xf044,0x3c9,0x314,0x342,0x345, -0x1f68,0xf043,0x3a9,0x313,0x345,0x1f69,0xf043,0x3a9,0x314,0x345,0x1f6a,0x345,2,0xf044,0x3a9,0x313, -0x300,0x345,0x1f6b,0x345,2,0xf044,0x3a9,0x314,0x300,0x345,0x1f6c,0x345,2,0xf044,0x3a9,0x313, -0x301,0x345,0x1f6d,0x345,2,0xf044,0x3a9,0x314,0x301,0x345,0x1f6e,0x345,2,0xf044,0x3a9,0x313, -0x342,0x345,0x1f6f,0x345,2,0xf044,0x3a9,0x314,0x342,0x345,0xe602,0x3b1,0x306,0xe602,0x3b1,0x304, -0x1f70,0xf043,0x3b1,0x300,0x345,0xf002,0x3b1,0x345,0x3ac,0xf043,0x3b1,0x301,0x345,0x1fb6,0xf043,0x3b1, -0x342,0x345,0xe602,0x391,0x306,0xe602,0x391,0x304,0xe602,0x391,0x300,0xf002,0x391,0x345,0xe602,0xa8, -0x342,0x1f74,0xf043,0x3b7,0x300,0x345,0xf002,0x3b7,0x345,0x3ae,0xf043,0x3b7,0x301,0x345,0x1fc6,0xf043, -0x3b7,0x342,0x345,0xe602,0x395,0x300,0xe602,0x397,0x300,0xf002,0x397,0x345,0xe602,0x1fbf,0x300,0xe602, -0x1fbf,0x301,0xe602,0x1fbf,0x342,0xe602,0x3b9,0x306,0xe602,0x3b9,0x304,0x3ca,0xe643,0x3b9,0x308,0x300, -0xe602,0x3b9,0x342,0x3ca,0xe643,0x3b9,0x308,0x342,0xe602,0x399,0x306,0xe602,0x399,0x304,0xe602,0x399, -0x300,0xe602,0x1ffe,0x300,0xe602,0x1ffe,0x301,0xe602,0x1ffe,0x342,0xe602,0x3c5,0x306,0xe602,0x3c5,0x304, -0x3cb,0xe643,0x3c5,0x308,0x300,0xe602,0x3c1,0x313,0xe602,0x3c1,0x314,0xe602,0x3c5,0x342,0x3cb,0xe643, -0x3c5,0x308,0x342,0xe602,0x3a5,0x306,0xe602,0x3a5,0x304,0xe602,0x3a5,0x300,0xe602,0x3a1,0x314,0xe602, -0xa8,0x300,0x1f7c,0xf043,0x3c9,0x300,0x345,0xf002,0x3c9,0x345,0x3ce,0xf043,0x3c9,0x301,0x345,0x1ff6, -0xf043,0x3c9,0x342,0x345,0xe602,0x39f,0x300,0xe602,0x3a9,0x300,0xf002,0x3a9,0x345,0x102,0x2190,0x338, -0x102,0x2192,0x338,0x102,0x2194,0x338,0x102,0x21d0,0x338,0x102,0x21d4,0x338,0x102,0x21d2,0x338,0x102, -0x2203,0x338,0x102,0x2208,0x338,0x102,0x220b,0x338,0x102,0x2223,0x338,0x102,0x2225,0x338,0x102,0x223c, -0x338,0x102,0x2243,0x338,0x102,0x2245,0x338,0x102,0x2248,0x338,0x102,0x3d,0x338,0x102,0x2261,0x338, -0x102,0x224d,0x338,0x102,0x3c,0x338,0x102,0x3e,0x338,0x102,0x2264,0x338,0x102,0x2265,0x338,0x102, -0x2272,0x338,0x102,0x2273,0x338,0x102,0x2276,0x338,0x102,0x2277,0x338,0x102,0x227a,0x338,0x102,0x227b, -0x338,0x102,0x2282,0x338,0x102,0x2283,0x338,0x102,0x2286,0x338,0x102,0x2287,0x338,0x102,0x22a2,0x338, -0x102,0x22a8,0x338,0x102,0x22a9,0x338,0x102,0x22ab,0x338,0x102,0x227c,0x338,0x102,0x227d,0x338,0x102, -0x2291,0x338,0x102,0x2292,0x338,0x102,0x22b2,0x338,0x102,0x22b3,0x338,0x102,0x22b4,0x338,0x102,0x22b5, -0x338,0x802,0x304b,0x3099,0x802,0x304d,0x3099,0x802,0x304f,0x3099,0x802,0x3051,0x3099,0x802,0x3053,0x3099, -0x802,0x3055,0x3099,0x802,0x3057,0x3099,0x802,0x3059,0x3099,0x802,0x305b,0x3099,0x802,0x305d,0x3099,0x802, -0x305f,0x3099,0x802,0x3061,0x3099,0x802,0x3064,0x3099,0x802,0x3066,0x3099,0x802,0x3068,0x3099,0x802,0x306f, -0x3099,0x802,0x306f,0x309a,0x802,0x3072,0x3099,0x802,0x3072,0x309a,0x802,0x3075,0x3099,0x802,0x3075,0x309a, -0x802,0x3078,0x3099,0x802,0x3078,0x309a,0x802,0x307b,0x3099,0x802,0x307b,0x309a,0x802,0x3046,0x3099,0x802, -0x309d,0x3099,0x802,0x30ab,0x3099,0x802,0x30ad,0x3099,0x802,0x30af,0x3099,0x802,0x30b1,0x3099,0x802,0x30b3, -0x3099,0x802,0x30b5,0x3099,0x802,0x30b7,0x3099,0x802,0x30b9,0x3099,0x802,0x30bb,0x3099,0x802,0x30bd,0x3099, -0x802,0x30bf,0x3099,0x802,0x30c1,0x3099,0x802,0x30c4,0x3099,0x802,0x30c6,0x3099,0x802,0x30c8,0x3099,0x802, -0x30cf,0x3099,0x802,0x30cf,0x309a,0x802,0x30d2,0x3099,0x802,0x30d2,0x309a,0x802,0x30d5,0x3099,0x802,0x30d5, -0x309a,0x802,0x30d8,0x3099,0x802,0x30d8,0x309a,0x802,0x30db,0x3099,0x802,0x30db,0x309a,0x802,0x30a6,0x3099, -0x802,0x30ef,0x3099,0x802,0x30f0,0x3099,0x802,0x30f1,0x3099,0x802,0x30f2,0x3099,0x802,0x30fd,0x3099,0x704, -0xd804,0xdc99,0xd804,0xdcba,0x704,0xd804,0xdc9b,0xd804,0xdcba,0x704,0xd804,0xdca5,0xd804,0xdcba,4,0xd804, -0xdd31,0xd804,0xdd27,4,0xd804,0xdd32,0xd804,0xdd27,4,0xd804,0xdf47,0xd804,0xdf3e,4,0xd804,0xdf47, -0xd804,0xdf57,4,0xd805,0xdcb9,0xd805,0xdcba,4,0xd805,0xdcb9,0xd805,0xdcb0,4,0xd805,0xdcb9,0xd805, -0xdcbd,4,0xd805,0xddb8,0xd805,0xddaf,4,0xd805,0xddb9,0xd805,0xddaf,4,0xd806,0xdd35,0xd806,0xdd30, -1,0x2b9,1,0x3b,1,0xb7,0x702,0x915,0x93c,0x702,0x916,0x93c,0x702,0x917,0x93c,0x702, -0x91c,0x93c,0x702,0x921,0x93c,0x702,0x922,0x93c,0x702,0x92b,0x93c,0x702,0x92f,0x93c,0x702,0x9a1, -0x9bc,0x702,0x9a2,0x9bc,0x702,0x9af,0x9bc,0x702,0xa32,0xa3c,0x702,0xa38,0xa3c,0x702,0xa16,0xa3c, -0x702,0xa17,0xa3c,0x702,0xa1c,0xa3c,0x702,0xa2b,0xa3c,0x702,0xb21,0xb3c,0x702,0xb22,0xb3c,2, -0xf42,0xfb7,2,0xf4c,0xfb7,2,0xf51,0xfb7,2,0xf56,0xfb7,2,0xf5b,0xfb7,2,0xf40, -0xfb5,0x8202,0xfb2,0xf80,0x8202,0xfb3,0xf80,2,0xf92,0xfb7,2,0xf9c,0xfb7,2,0xfa1,0xfb7, -2,0xfa6,0xfb7,2,0xfab,0xfb7,2,0xf90,0xfb5,1,0x3b9,1,0x60,1,0xb4,1, -0x3a9,1,0x4b,1,0x3008,1,0x3009,0x102,0x2add,0x338,1,0x8c48,1,0x66f4,1,0x8eca, -1,0x8cc8,1,0x6ed1,1,0x4e32,1,0x53e5,1,0x9f9c,1,0x5951,1,0x91d1,1,0x5587, -1,0x5948,1,0x61f6,1,0x7669,1,0x7f85,1,0x863f,1,0x87ba,1,0x88f8,1,0x908f, -1,0x6a02,1,0x6d1b,1,0x70d9,1,0x73de,1,0x843d,1,0x916a,1,0x99f1,1,0x4e82, -1,0x5375,1,0x6b04,1,0x721b,1,0x862d,1,0x9e1e,1,0x5d50,1,0x6feb,1,0x85cd, -1,0x8964,1,0x62c9,1,0x81d8,1,0x881f,1,0x5eca,1,0x6717,1,0x6d6a,1,0x72fc, -1,0x90ce,1,0x4f86,1,0x51b7,1,0x52de,1,0x64c4,1,0x6ad3,1,0x7210,1,0x76e7, -1,0x8001,1,0x8606,1,0x865c,1,0x8def,1,0x9732,1,0x9b6f,1,0x9dfa,1,0x788c, -1,0x797f,1,0x7da0,1,0x83c9,1,0x9304,1,0x9e7f,1,0x8ad6,1,0x58df,1,0x5f04, -1,0x7c60,1,0x807e,1,0x7262,1,0x78ca,1,0x8cc2,1,0x96f7,1,0x58d8,1,0x5c62, -1,0x6a13,1,0x6dda,1,0x6f0f,1,0x7d2f,1,0x7e37,1,0x964b,1,0x52d2,1,0x808b, -1,0x51dc,1,0x51cc,1,0x7a1c,1,0x7dbe,1,0x83f1,1,0x9675,1,0x8b80,1,0x62cf, -1,0x8afe,1,0x4e39,1,0x5be7,1,0x6012,1,0x7387,1,0x7570,1,0x5317,1,0x78fb, -1,0x4fbf,1,0x5fa9,1,0x4e0d,1,0x6ccc,1,0x6578,1,0x7d22,1,0x53c3,1,0x585e, -1,0x7701,1,0x8449,1,0x8aaa,1,0x6bba,1,0x8fb0,1,0x6c88,1,0x62fe,1,0x82e5, -1,0x63a0,1,0x7565,1,0x4eae,1,0x5169,1,0x51c9,1,0x6881,1,0x7ce7,1,0x826f, -1,0x8ad2,1,0x91cf,1,0x52f5,1,0x5442,1,0x5973,1,0x5eec,1,0x65c5,1,0x6ffe, -1,0x792a,1,0x95ad,1,0x9a6a,1,0x9e97,1,0x9ece,1,0x529b,1,0x66c6,1,0x6b77, -1,0x8f62,1,0x5e74,1,0x6190,1,0x6200,1,0x649a,1,0x6f23,1,0x7149,1,0x7489, -1,0x79ca,1,0x7df4,1,0x806f,1,0x8f26,1,0x84ee,1,0x9023,1,0x934a,1,0x5217, -1,0x52a3,1,0x54bd,1,0x70c8,1,0x88c2,1,0x5ec9,1,0x5ff5,1,0x637b,1,0x6bae, -1,0x7c3e,1,0x7375,1,0x4ee4,1,0x56f9,1,0x5dba,1,0x601c,1,0x73b2,1,0x7469, -1,0x7f9a,1,0x8046,1,0x9234,1,0x96f6,1,0x9748,1,0x9818,1,0x4f8b,1,0x79ae, -1,0x91b4,1,0x96b8,1,0x60e1,1,0x4e86,1,0x50da,1,0x5bee,1,0x5c3f,1,0x6599, -1,0x71ce,1,0x7642,1,0x84fc,1,0x907c,1,0x9f8d,1,0x6688,1,0x962e,1,0x5289, -1,0x677b,1,0x67f3,1,0x6d41,1,0x6e9c,1,0x7409,1,0x7559,1,0x786b,1,0x7d10, -1,0x985e,1,0x516d,1,0x622e,1,0x9678,1,0x502b,1,0x5d19,1,0x6dea,1,0x8f2a, -1,0x5f8b,1,0x6144,1,0x6817,1,0x9686,1,0x5229,1,0x540f,1,0x5c65,1,0x6613, -1,0x674e,1,0x68a8,1,0x6ce5,1,0x7406,1,0x75e2,1,0x7f79,1,0x88cf,1,0x88e1, -1,0x91cc,1,0x96e2,1,0x533f,1,0x6eba,1,0x541d,1,0x71d0,1,0x7498,1,0x85fa, -1,0x96a3,1,0x9c57,1,0x9e9f,1,0x6797,1,0x6dcb,1,0x81e8,1,0x7acb,1,0x7b20, -1,0x7c92,1,0x72c0,1,0x7099,1,0x8b58,1,0x4ec0,1,0x8336,1,0x523a,1,0x5207, -1,0x5ea6,1,0x62d3,1,0x7cd6,1,0x5b85,1,0x6d1e,1,0x66b4,1,0x8f3b,1,0x884c, -1,0x964d,1,0x898b,1,0x5ed3,1,0x5140,1,0x55c0,1,0x585a,1,0x6674,1,0x51de, -1,0x732a,1,0x76ca,1,0x793c,1,0x795e,1,0x7965,1,0x798f,1,0x9756,1,0x7cbe, -1,0x7fbd,1,0x8612,1,0x8af8,1,0x9038,1,0x90fd,1,0x98ef,1,0x98fc,1,0x9928, -1,0x9db4,1,0x90de,1,0x96b7,1,0x4fae,1,0x50e7,1,0x514d,1,0x52c9,1,0x52e4, -1,0x5351,1,0x559d,1,0x5606,1,0x5668,1,0x5840,1,0x58a8,1,0x5c64,1,0x5c6e, -1,0x6094,1,0x6168,1,0x618e,1,0x61f2,1,0x654f,1,0x65e2,1,0x6691,1,0x6885, -1,0x6d77,1,0x6e1a,1,0x6f22,1,0x716e,1,0x722b,1,0x7422,1,0x7891,1,0x793e, -1,0x7949,1,0x7948,1,0x7950,1,0x7956,1,0x795d,1,0x798d,1,0x798e,1,0x7a40, -1,0x7a81,1,0x7bc0,1,0x7e09,1,0x7e41,1,0x7f72,1,0x8005,1,0x81ed,1,0x8279, -1,0x8457,1,0x8910,1,0x8996,1,0x8b01,1,0x8b39,1,0x8cd3,1,0x8d08,1,0x8fb6, -1,0x96e3,1,0x97ff,1,0x983b,1,0x6075,2,0xd850,0xdeee,1,0x8218,1,0x4e26,1, -0x51b5,1,0x5168,1,0x4f80,1,0x5145,1,0x5180,1,0x52c7,1,0x52fa,1,0x5555,1, -0x5599,1,0x55e2,1,0x58b3,1,0x5944,1,0x5954,1,0x5a62,1,0x5b28,1,0x5ed2,1, -0x5ed9,1,0x5f69,1,0x5fad,1,0x60d8,1,0x614e,1,0x6108,1,0x6160,1,0x6234,1, -0x63c4,1,0x641c,1,0x6452,1,0x6556,1,0x671b,1,0x6756,1,0x6b79,1,0x6edb,1, -0x6ecb,1,0x701e,1,0x77a7,1,0x7235,1,0x72af,1,0x7471,1,0x7506,1,0x753b,1, -0x761d,1,0x761f,1,0x76db,1,0x76f4,1,0x774a,1,0x7740,1,0x78cc,1,0x7ab1,1, -0x7c7b,1,0x7d5b,1,0x7f3e,1,0x8352,1,0x83ef,1,0x8779,1,0x8941,1,0x8986,1, -0x8abf,1,0x8acb,1,0x8aed,1,0x8b8a,1,0x8f38,1,0x9072,1,0x9199,1,0x9276,1, -0x967c,1,0x97db,1,0x980b,1,0x9b12,2,0xd84a,0xdc4a,2,0xd84a,0xdc44,2,0xd84c,0xdfd5, -1,0x3b9d,1,0x4018,1,0x4039,2,0xd854,0xde49,2,0xd857,0xdcd0,2,0xd85f,0xded3,1, -0x9f43,1,0x9f8e,0xe02,0x5d9,0x5b4,0x1102,0x5f2,0x5b7,0x1802,0x5e9,0x5c1,0x1902,0x5e9,0x5c2,0xfb49, -0x1843,0x5e9,0x5bc,0x5c1,0xfb49,0x1943,0x5e9,0x5bc,0x5c2,0x1102,0x5d0,0x5b7,0x1202,0x5d0,0x5b8,0x1502, -0x5d0,0x5bc,0x1502,0x5d1,0x5bc,0x1502,0x5d2,0x5bc,0x1502,0x5d3,0x5bc,0x1502,0x5d4,0x5bc,0x1502,0x5d5, -0x5bc,0x1502,0x5d6,0x5bc,0x1502,0x5d8,0x5bc,0x1502,0x5d9,0x5bc,0x1502,0x5da,0x5bc,0x1502,0x5db,0x5bc, -0x1502,0x5dc,0x5bc,0x1502,0x5de,0x5bc,0x1502,0x5e0,0x5bc,0x1502,0x5e1,0x5bc,0x1502,0x5e3,0x5bc,0x1502, -0x5e4,0x5bc,0x1502,0x5e6,0x5bc,0x1502,0x5e7,0x5bc,0x1502,0x5e8,0x5bc,0x1502,0x5e9,0x5bc,0x1502,0x5ea, -0x5bc,0x1302,0x5d5,0x5b9,0x1702,0x5d1,0x5bf,0x1702,0x5db,0x5bf,0x1702,0x5e4,0x5bf,0xd804,0xd834,0xdd57, -0xd834,0xdd65,0xd804,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd5f,0xd834,0xdd6e,4,0xd846,0xd834,0xdd58,0xd834, -0xdd65,0xd834,0xdd6e,0xd834,0xdd5f,0xd834,0xdd6f,4,0xd846,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd6f,0xd834, -0xdd5f,0xd834,0xdd70,4,0xd846,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd70,0xd834,0xdd5f,0xd834,0xdd71,4, -0xd846,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd71,0xd834,0xdd5f,0xd834,0xdd72,4,0xd846,0xd834,0xdd58,0xd834, -0xdd65,0xd834,0xdd72,0xd804,0xd834,0xddb9,0xd834,0xdd65,0xd804,0xd834,0xddba,0xd834,0xdd65,0xd834,0xddbb,0xd834, -0xdd6e,4,0xd846,0xd834,0xddb9,0xd834,0xdd65,0xd834,0xdd6e,0xd834,0xddbc,0xd834,0xdd6e,4,0xd846,0xd834, -0xddba,0xd834,0xdd65,0xd834,0xdd6e,0xd834,0xddbb,0xd834,0xdd6f,4,0xd846,0xd834,0xddb9,0xd834,0xdd65,0xd834, -0xdd6f,0xd834,0xddbc,0xd834,0xdd6f,4,0xd846,0xd834,0xddba,0xd834,0xdd65,0xd834,0xdd6f,1,0x4e3d,1, -0x4e38,1,0x4e41,2,0xd840,0xdd22,1,0x4f60,1,0x4fbb,1,0x5002,1,0x507a,1,0x5099, -1,0x50cf,1,0x349e,2,0xd841,0xde3a,1,0x5154,1,0x5164,1,0x5177,2,0xd841,0xdd1c, -1,0x34b9,1,0x5167,1,0x518d,2,0xd841,0xdd4b,1,0x5197,1,0x51a4,1,0x4ecc,1, -0x51ac,2,0xd864,0xdddf,1,0x51f5,1,0x5203,1,0x34df,1,0x523b,1,0x5246,1,0x5272, -1,0x5277,1,0x3515,1,0x5305,1,0x5306,1,0x5349,1,0x535a,1,0x5373,1,0x537d, -1,0x537f,2,0xd842,0xde2c,1,0x7070,1,0x53ca,1,0x53df,2,0xd842,0xdf63,1,0x53eb, -1,0x53f1,1,0x5406,1,0x549e,1,0x5438,1,0x5448,1,0x5468,1,0x54a2,1,0x54f6, -1,0x5510,1,0x5553,1,0x5563,1,0x5584,1,0x55ab,1,0x55b3,1,0x55c2,1,0x5716, -1,0x5717,1,0x5651,1,0x5674,1,0x58ee,1,0x57ce,1,0x57f4,1,0x580d,1,0x578b, -1,0x5832,1,0x5831,1,0x58ac,2,0xd845,0xdce4,1,0x58f2,1,0x58f7,1,0x5906,1, -0x591a,1,0x5922,1,0x5962,2,0xd845,0xdea8,2,0xd845,0xdeea,1,0x59ec,1,0x5a1b,1, -0x5a27,1,0x59d8,1,0x5a66,1,0x36ee,1,0x36fc,1,0x5b08,1,0x5b3e,2,0xd846,0xddc8, -1,0x5bc3,1,0x5bd8,1,0x5bf3,2,0xd846,0xdf18,1,0x5bff,1,0x5c06,1,0x5f53,1, -0x5c22,1,0x3781,1,0x5c60,1,0x5cc0,1,0x5c8d,2,0xd847,0xdde4,1,0x5d43,2,0xd847, -0xdde6,1,0x5d6e,1,0x5d6b,1,0x5d7c,1,0x5de1,1,0x5de2,1,0x382f,1,0x5dfd,1, -0x5e28,1,0x5e3d,1,0x5e69,1,0x3862,2,0xd848,0xdd83,1,0x387c,1,0x5eb0,1,0x5eb3, -1,0x5eb6,2,0xd868,0xdf92,1,0x5efe,2,0xd848,0xdf31,1,0x8201,1,0x5f22,1,0x38c7, -2,0xd84c,0xdeb8,2,0xd858,0xddda,1,0x5f62,1,0x5f6b,1,0x38e3,1,0x5f9a,1,0x5fcd, -1,0x5fd7,1,0x5ff9,1,0x6081,1,0x393a,1,0x391c,2,0xd849,0xded4,1,0x60c7,1, -0x6148,1,0x614c,1,0x617a,1,0x61b2,1,0x61a4,1,0x61af,1,0x61de,1,0x6210,1, -0x621b,1,0x625d,1,0x62b1,1,0x62d4,1,0x6350,2,0xd84a,0xdf0c,1,0x633d,1,0x62fc, -1,0x6368,1,0x6383,1,0x63e4,2,0xd84a,0xdff1,1,0x6422,1,0x63c5,1,0x63a9,1, -0x3a2e,1,0x6469,1,0x647e,1,0x649d,1,0x6477,1,0x3a6c,1,0x656c,2,0xd84c,0xdc0a, -1,0x65e3,1,0x66f8,1,0x6649,1,0x3b19,1,0x3b08,1,0x3ae4,1,0x5192,1,0x5195, -1,0x6700,1,0x669c,1,0x80ad,1,0x43d9,1,0x6721,1,0x675e,1,0x6753,2,0xd84c, -0xdfc3,1,0x3b49,1,0x67fa,1,0x6785,1,0x6852,2,0xd84d,0xdc6d,1,0x688e,1,0x681f, -1,0x6914,1,0x6942,1,0x69a3,1,0x69ea,1,0x6aa8,2,0xd84d,0xdea3,1,0x6adb,1, -0x3c18,1,0x6b21,2,0xd84e,0xdca7,1,0x6b54,1,0x3c4e,1,0x6b72,1,0x6b9f,1,0x6bbb, -2,0xd84e,0xde8d,2,0xd847,0xdd0b,2,0xd84e,0xdefa,1,0x6c4e,2,0xd84f,0xdcbc,1,0x6cbf, -1,0x6ccd,1,0x6c67,1,0x6d16,1,0x6d3e,1,0x6d69,1,0x6d78,1,0x6d85,2,0xd84f, -0xdd1e,1,0x6d34,1,0x6e2f,1,0x6e6e,1,0x3d33,1,0x6ec7,2,0xd84f,0xded1,1,0x6df9, -1,0x6f6e,2,0xd84f,0xdf5e,2,0xd84f,0xdf8e,1,0x6fc6,1,0x7039,1,0x701b,1,0x3d96, -1,0x704a,1,0x707d,1,0x7077,1,0x70ad,2,0xd841,0xdd25,1,0x7145,2,0xd850,0xde63, -1,0x719c,2,0xd850,0xdfab,1,0x7228,1,0x7250,2,0xd851,0xde08,1,0x7280,1,0x7295, -2,0xd851,0xdf35,2,0xd852,0xdc14,1,0x737a,1,0x738b,1,0x3eac,1,0x73a5,1,0x3eb8, -1,0x7447,1,0x745c,1,0x7485,1,0x74ca,1,0x3f1b,1,0x7524,2,0xd853,0xdc36,1, -0x753e,2,0xd853,0xdc92,2,0xd848,0xdd9f,1,0x7610,2,0xd853,0xdfa1,2,0xd853,0xdfb8,2, -0xd854,0xdc44,1,0x3ffc,1,0x4008,2,0xd854,0xdcf3,2,0xd854,0xdcf2,2,0xd854,0xdd19,2, -0xd854,0xdd33,1,0x771e,1,0x771f,1,0x778b,1,0x4046,1,0x4096,2,0xd855,0xdc1d,1, -0x784e,1,0x40e3,2,0xd855,0xde26,2,0xd855,0xde9a,2,0xd855,0xdec5,1,0x79eb,1,0x412f, -1,0x7a4a,1,0x7a4f,2,0xd856,0xdd7c,2,0xd856,0xdea7,1,0x7aee,1,0x4202,2,0xd856, -0xdfab,1,0x7bc6,1,0x7bc9,1,0x4227,2,0xd857,0xdc80,1,0x7cd2,1,0x42a0,1,0x7ce8, -1,0x7ce3,1,0x7d00,2,0xd857,0xdf86,1,0x7d63,1,0x4301,1,0x7dc7,1,0x7e02,1, -0x7e45,1,0x4334,2,0xd858,0xde28,2,0xd858,0xde47,1,0x4359,2,0xd858,0xded9,1,0x7f7a, -2,0xd858,0xdf3e,1,0x7f95,1,0x7ffa,2,0xd859,0xdcda,2,0xd859,0xdd23,1,0x8060,2, -0xd859,0xdda8,1,0x8070,2,0xd84c,0xdf5f,1,0x43d5,1,0x80b2,1,0x8103,1,0x440b,1, -0x813e,1,0x5ab5,2,0xd859,0xdfa7,2,0xd859,0xdfb5,2,0xd84c,0xdf93,2,0xd84c,0xdf9c,1, -0x8204,1,0x8f9e,1,0x446b,1,0x8291,1,0x828b,1,0x829d,1,0x52b3,1,0x82b1,1, -0x82b3,1,0x82bd,1,0x82e6,2,0xd85a,0xdf3c,1,0x831d,1,0x8363,1,0x83ad,1,0x8323, -1,0x83bd,1,0x83e7,1,0x8353,1,0x83ca,1,0x83cc,1,0x83dc,2,0xd85b,0xdc36,2, -0xd85b,0xdd6b,2,0xd85b,0xdcd5,1,0x452b,1,0x84f1,1,0x84f3,1,0x8516,2,0xd85c,0xdfca, -1,0x8564,2,0xd85b,0xdf2c,1,0x455d,1,0x4561,2,0xd85b,0xdfb1,2,0xd85c,0xdcd2,1, -0x456b,1,0x8650,1,0x8667,1,0x8669,1,0x86a9,1,0x8688,1,0x870e,1,0x86e2,1, -0x8728,1,0x876b,1,0x8786,1,0x45d7,1,0x87e1,1,0x8801,1,0x45f9,1,0x8860,1, -0x8863,2,0xd85d,0xde67,1,0x88d7,1,0x88de,1,0x4635,1,0x88fa,1,0x34bb,2,0xd85e, -0xdcae,2,0xd85e,0xdd66,1,0x46be,1,0x46c7,1,0x8aa0,1,0x8c55,2,0xd85f,0xdca8,1, -0x8cab,1,0x8cc1,1,0x8d1b,1,0x8d77,2,0xd85f,0xdf2f,2,0xd842,0xdc04,1,0x8dcb,1, -0x8dbc,1,0x8df0,2,0xd842,0xdcde,1,0x8ed4,2,0xd861,0xddd2,2,0xd861,0xdded,1,0x9094, -1,0x90f1,1,0x9111,2,0xd861,0xdf2e,1,0x911b,1,0x9238,1,0x92d7,1,0x92d8,1, -0x927c,1,0x93f9,1,0x9415,2,0xd862,0xdffa,1,0x958b,1,0x4995,1,0x95b7,2,0xd863, -0xdd77,1,0x49e6,1,0x96c3,1,0x5db2,1,0x9723,2,0xd864,0xdd45,2,0xd864,0xde1a,1, -0x4a6e,1,0x4a76,1,0x97e0,2,0xd865,0xdc0a,1,0x4ab2,2,0xd865,0xdc96,1,0x9829,2, -0xd865,0xddb6,1,0x98e2,1,0x4b33,1,0x9929,1,0x99a7,1,0x99c2,1,0x99fe,1,0x4bce, -2,0xd866,0xdf30,1,0x9c40,1,0x9cfd,1,0x4cce,1,0x4ced,1,0x9d67,2,0xd868,0xdcce, -1,0x4cf8,2,0xd868,0xdd05,2,0xd868,0xde0e,2,0xd868,0xde91,1,0x9ebb,1,0x4d56,1, -0x9ef9,1,0x9efe,1,0x9f05,1,0x9f0f,1,0x9f16,1,0x9f3b,2,0xd869,0xde00,0x3ac,0xe642, -0x3b1,0x301,0x3ad,0xe642,0x3b5,0x301,0x3ae,0xe642,0x3b7,0x301,0x3af,0xe642,0x3b9,0x301,0x3cc,0xe642, -0x3bf,0x301,0x3cd,0xe642,0x3c5,0x301,0x3ce,0xe642,0x3c9,0x301,0x386,0xe642,0x391,0x301,0x388,0xe642, -0x395,0x301,0x389,0xe642,0x397,0x301,0x390,1,0xe643,0x3b9,0x308,0x301,0x38a,0xe642,0x399,0x301, -0x3b0,1,0xe643,0x3c5,0x308,0x301,0x38e,0xe642,0x3a5,0x301,0x385,0xe642,0xa8,0x301,0x38c,0xe642, -0x39f,0x301,0x38f,0xe642,0x3a9,0x301,0xc5,0xe642,0x41,0x30a,0xe6e6,0xe681,0x300,0xe6e6,0xe681,0x301, -0xe6e6,0xe681,0x313,0xe6e6,0xe682,0x308,0x301,0x8100,0x8282,0xf71,0xf72,0x8100,0x8482,0xf71,0xf74,0x8100, -0x8282,0xf71,0xf80,0 +0xe132,0x61ee,0xe132,0x61f0,0xe132,0x61f2,0xe132,0x61f4,0xe132,0x61fc,0x860f,2,0xb92,0x860f,2,0xbc8, +0xb489,0x2e82,0x2134,0xb489,0x2e82,0x2138,0xb489,0x2e82,0x2156,0xb489,0x49c2,0x225c,0xb489,0x49c2,0x225e,0x3489, +0xcf82,0x2696,0xb489,0xd5c2,0x2698,0xb489,0xf242,0x2706,0xb489,0xeec2,0x270a,0xb489,0xf082,0x271c,0xb489,0xf242, +0x2722,0x348b,0x2c02,0x2978,0x348b,0x2e82,0x2976,0xb48b,0x2f42,0x297c,0xb48b,0x6bc2,0x2b74,0xb48b,0x6bc2,0x2b76, +0xb48d,0x4c02,0x3270,0xb4b7,0x59c2,0xdad3,2,0xe602,0x41,0x302,0x600,0x3d4c,0x602,0x3d48,0x606,0x3d54, +0x8612,0x3d50,0xe602,0x41,0x308,0x8608,0x3bc,0xe602,0x41,0x30a,0x8602,0x3f4,0xca02,0x43,0x327,0x8602, +0x3c10,0xe602,0x45,0x302,0x600,0x3d80,0x602,0x3d7c,0x606,0x3d88,0x8612,0x3d84,0xe602,0x49,0x308,0x8602, +0x3c5c,0xe602,0x4f,0x302,0x600,0x3da4,0x602,0x3da0,0x606,0x3dac,0x8612,0x3da8,0xe602,0x4f,0x303,0x602, +0x3c98,0x608,0x458,0x8610,0x3c9c,0xe602,0x4f,0x308,0x8608,0x454,0xe602,0x55,0x308,0x600,0x3b6,0x602, +0x3ae,0x608,0x3aa,0x8618,0x3b2,0xe602,0x61,0x302,0x600,0x3d4e,0x602,0x3d4a,0x606,0x3d56,0x8612,0x3d52, +0xe602,0x61,0x308,0x8608,0x3be,0xe602,0x61,0x30a,0x8602,0x3f6,0xca02,0x63,0x327,0x8602,0x3c12,0xe602, +0x65,0x302,0x600,0x3d82,0x602,0x3d7e,0x606,0x3d8a,0x8612,0x3d86,0xe602,0x69,0x308,0x8602,0x3c5e,0xe602, +0x6f,0x302,0x600,0x3da6,0x602,0x3da2,0x606,0x3dae,0x8612,0x3daa,0xe602,0x6f,0x303,0x602,0x3c9a,0x608, +0x45a,0x8610,0x3c9e,0xe602,0x6f,0x308,0x8608,0x456,0xe602,0x75,0x308,0x600,0x3b8,0x602,0x3b0,0x608, +0x3ac,0x8618,0x3b4,0xe602,0x41,0x306,0x600,0x3d60,0x602,0x3d5c,0x606,0x3d68,0x8612,0x3d64,0xe602,0x61, +0x306,0x600,0x3d62,0x602,0x3d5e,0x606,0x3d6a,0x8612,0x3d66,0xe602,0x45,0x304,0x600,0x3c28,0x8602,0x3c2c, +0xe602,0x65,0x304,0x600,0x3c2a,0x8602,0x3c2e,0xe602,0x4f,0x304,0x600,0x3ca0,0x8602,0x3ca4,0xe602,0x6f, +0x304,0x600,0x3ca2,0x8602,0x3ca6,0xe602,0x53,0x301,0x860e,0x3cc8,0xe602,0x73,0x301,0x860e,0x3cca,0xe602, +0x53,0x30c,0x860e,0x3ccc,0xe602,0x73,0x30c,0x860e,0x3cce,0xe602,0x55,0x303,0x8602,0x3cf0,0xe602,0x75, +0x303,0x8602,0x3cf2,0xe602,0x55,0x304,0x8610,0x3cf4,0xe602,0x75,0x304,0x8610,0x3cf6,0xd802,0x4f,0x31b, +0x600,0x3db8,0x602,0x3db4,0x606,0x3dc0,0x612,0x3dbc,0x8646,0x3dc4,0xd802,0x6f,0x31b,0x600,0x3dba,0x602, +0x3db6,0x606,0x3dc2,0x612,0x3dbe,0x8646,0x3dc6,0xd802,0x55,0x31b,0x600,0x3dd4,0x602,0x3dd0,0x606,0x3ddc, +0x612,0x3dd8,0x8646,0x3de0,0xd802,0x75,0x31b,0x600,0x3dd6,0x602,0x3dd2,0x606,0x3dde,0x612,0x3dda,0x8646, +0x3de2,0xca02,0x4f,0x328,0x8608,0x3d8,0xca02,0x6f,0x328,0x8608,0x3da,0xe602,0x41,0x307,0x8608,0x3c0, +0xe602,0x61,0x307,0x8608,0x3c2,0xca02,0x45,0x327,0x860c,0x3c38,0xca02,0x65,0x327,0x860c,0x3c3a,0xe602, +0x4f,0x307,0x8608,0x460,0xe602,0x6f,0x307,0x8608,0x462,0xe602,0x3b1,0x301,0x868a,0x3f68,0xe602,0x3b7, +0x301,0x868a,0x3f88,0xe602,0x3b9,0x308,0x600,0x3fa4,0x602,0x720,0x8684,0x3fae,0xe602,0x3c5,0x308,0x600, +0x3fc4,0x602,0x760,0x8684,0x3fce,0xe602,0x3c9,0x301,0x868a,0x3fe8,2,0xcc6,0xcc2,0x99aa,0x1996,2, +0xdd9,0xdcf,0x9b94,0x1bba,0xdc02,0x4c,0x323,0x8608,0x3c70,0xdc02,0x6c,0x323,0x8608,0x3c72,0xdc02,0x52, +0x323,0x8608,0x3cb8,0xdc02,0x72,0x323,0x8608,0x3cba,0xdc02,0x53,0x323,0x860e,0x3cd0,0xdc02,0x73,0x323, +0x860e,0x3cd2,0xdc02,0x41,0x323,0x604,0x3d58,0x860c,0x3d6c,0xdc02,0x61,0x323,0x604,0x3d5a,0x860c,0x3d6e, +0xdc02,0x45,0x323,0x8604,0x3d8c,0xdc02,0x65,0x323,0x8604,0x3d8e,0xdc02,0x4f,0x323,0x8604,0x3db0,0xdc02, +0x6f,0x323,0x8604,0x3db2,0xe602,0x3b1,0x313,0x600,0x3e05,0x602,0x3e09,0x684,0x3e0d,0x868a,0x3f00,0xe602, +0x3b1,0x314,0x600,0x3e07,0x602,0x3e0b,0x684,0x3e0f,0x868a,0x3f02,0x1f00,0xe643,0x3b1,0x313,0x300,0x868a, +0x3f04,0x1f01,0xe643,0x3b1,0x314,0x300,0x868a,0x3f06,0x1f00,0xe643,0x3b1,0x313,0x301,0x868a,0x3f08,0x1f01, +0xe643,0x3b1,0x314,0x301,0x868a,0x3f0a,0x1f00,0xe643,0x3b1,0x313,0x342,0x868a,0x3f0c,0x1f01,0xe643,0x3b1, +0x314,0x342,0x868a,0x3f0e,0xe602,0x391,0x313,0x600,0x3e15,0x602,0x3e19,0x684,0x3e1d,0x868a,0x3f10,0xe602, +0x391,0x314,0x600,0x3e17,0x602,0x3e1b,0x684,0x3e1f,0x868a,0x3f12,0x1f08,0xe643,0x391,0x313,0x300,0x868a, +0x3f14,0x1f09,0xe643,0x391,0x314,0x300,0x868a,0x3f16,0x1f08,0xe643,0x391,0x313,0x301,0x868a,0x3f18,0x1f09, +0xe643,0x391,0x314,0x301,0x868a,0x3f1a,0x1f08,0xe643,0x391,0x313,0x342,0x868a,0x3f1c,0x1f09,0xe643,0x391, +0x314,0x342,0x868a,0x3f1e,0xe602,0x3b5,0x313,0x600,0x3e24,0x8602,0x3e28,0xe602,0x3b5,0x314,0x600,0x3e26, +0x8602,0x3e2a,0xe602,0x395,0x313,0x600,0x3e34,0x8602,0x3e38,0xe602,0x395,0x314,0x600,0x3e36,0x8602,0x3e3a, +0xe602,0x3b7,0x313,0x600,0x3e45,0x602,0x3e49,0x684,0x3e4d,0x868a,0x3f20,0xe602,0x3b7,0x314,0x600,0x3e47, +0x602,0x3e4b,0x684,0x3e4f,0x868a,0x3f22,0x1f20,0xe643,0x3b7,0x313,0x300,0x868a,0x3f24,0x1f21,0xe643,0x3b7, +0x314,0x300,0x868a,0x3f26,0x1f20,0xe643,0x3b7,0x313,0x301,0x868a,0x3f28,0x1f21,0xe643,0x3b7,0x314,0x301, +0x868a,0x3f2a,0x1f20,0xe643,0x3b7,0x313,0x342,0x868a,0x3f2c,0x1f21,0xe643,0x3b7,0x314,0x342,0x868a,0x3f2e, +0xe602,0x397,0x313,0x600,0x3e55,0x602,0x3e59,0x684,0x3e5d,0x868a,0x3f30,0xe602,0x397,0x314,0x600,0x3e57, +0x602,0x3e5b,0x684,0x3e5f,0x868a,0x3f32,0x1f28,0xe643,0x397,0x313,0x300,0x868a,0x3f34,0x1f29,0xe643,0x397, +0x314,0x300,0x868a,0x3f36,0x1f28,0xe643,0x397,0x313,0x301,0x868a,0x3f38,0x1f29,0xe643,0x397,0x314,0x301, +0x868a,0x3f3a,0x1f28,0xe643,0x397,0x313,0x342,0x868a,0x3f3c,0x1f29,0xe643,0x397,0x314,0x342,0x868a,0x3f3e, +0xe602,0x3b9,0x313,0x600,0x3e64,0x602,0x3e68,0x8684,0x3e6c,0xe602,0x3b9,0x314,0x600,0x3e66,0x602,0x3e6a, +0x8684,0x3e6e,0xe602,0x399,0x313,0x600,0x3e74,0x602,0x3e78,0x8684,0x3e7c,0xe602,0x399,0x314,0x600,0x3e76, +0x602,0x3e7a,0x8684,0x3e7e,0xe602,0x3bf,0x313,0x600,0x3e84,0x8602,0x3e88,0xe602,0x3bf,0x314,0x600,0x3e86, +0x8602,0x3e8a,0xe602,0x39f,0x313,0x600,0x3e94,0x8602,0x3e98,0xe602,0x39f,0x314,0x600,0x3e96,0x8602,0x3e9a, +0xe602,0x3c5,0x313,0x600,0x3ea4,0x602,0x3ea8,0x8684,0x3eac,0xe602,0x3c5,0x314,0x600,0x3ea6,0x602,0x3eaa, +0x8684,0x3eae,0xe602,0x3a5,0x314,0x600,0x3eb6,0x602,0x3eba,0x8684,0x3ebe,0xe602,0x3c9,0x313,0x600,0x3ec5, +0x602,0x3ec9,0x684,0x3ecd,0x868a,0x3f40,0xe602,0x3c9,0x314,0x600,0x3ec7,0x602,0x3ecb,0x684,0x3ecf,0x868a, +0x3f42,0x1f60,0xe643,0x3c9,0x313,0x300,0x868a,0x3f44,0x1f61,0xe643,0x3c9,0x314,0x300,0x868a,0x3f46,0x1f60, +0xe643,0x3c9,0x313,0x301,0x868a,0x3f48,0x1f61,0xe643,0x3c9,0x314,0x301,0x868a,0x3f4a,0x1f60,0xe643,0x3c9, +0x313,0x342,0x868a,0x3f4c,0x1f61,0xe643,0x3c9,0x314,0x342,0x868a,0x3f4e,0xe602,0x3a9,0x313,0x600,0x3ed5, +0x602,0x3ed9,0x684,0x3edd,0x868a,0x3f50,0xe602,0x3a9,0x314,0x600,0x3ed7,0x602,0x3edb,0x684,0x3edf,0x868a, +0x3f52,0x1f68,0xe643,0x3a9,0x313,0x300,0x868a,0x3f54,0x1f69,0xe643,0x3a9,0x314,0x300,0x868a,0x3f56,0x1f68, +0xe643,0x3a9,0x313,0x301,0x868a,0x3f58,0x1f69,0xe643,0x3a9,0x314,0x301,0x868a,0x3f5a,0x1f68,0xe643,0x3a9, +0x313,0x342,0x868a,0x3f5c,0x1f69,0xe643,0x3a9,0x314,0x342,0x868a,0x3f5e,0xe602,0x3b1,0x300,0x868a,0x3f64, +0xe602,0x3b7,0x300,0x868a,0x3f84,0xe602,0x3c9,0x300,0x868a,0x3fe4,0xe602,0x3b1,0x342,0x868a,0x3f6e,0xe602, +0x3b7,0x342,0x868a,0x3f8e,0xe602,0x3c9,0x342,0x868a,0x3fee,4,0xd81b,0xdd63,0xd81b,0xdd67,0xb4b7,0x59c2, +0xdad4,3,0xe602,0x41,0x300,0xe602,0x41,0x301,0xe602,0x41,0x303,0xe602,0x45,0x300,0xe602,0x45, +0x301,0xe602,0x45,0x308,0xe602,0x49,0x300,0xe602,0x49,0x301,0xe602,0x49,0x302,0xe602,0x4e,0x303, +0xe602,0x4f,0x300,0xe602,0x4f,0x301,0xe602,0x55,0x300,0xe602,0x55,0x301,0xe602,0x55,0x302,0xe602, +0x59,0x301,0xe602,0x61,0x300,0xe602,0x61,0x301,0xe602,0x61,0x303,0xe602,0x65,0x300,0xe602,0x65, +0x301,0xe602,0x65,0x308,0xe602,0x69,0x300,0xe602,0x69,0x301,0xe602,0x69,0x302,0xe602,0x6e,0x303, +0xe602,0x6f,0x300,0xe602,0x6f,0x301,0xe602,0x75,0x300,0xe602,0x75,0x301,0xe602,0x75,0x302,0xe602, +0x79,0x301,0xe602,0x79,0x308,0xe602,0x41,0x304,0xe602,0x61,0x304,0xca02,0x41,0x328,0xca02,0x61, +0x328,0xe602,0x43,0x301,0xe602,0x63,0x301,0xe602,0x43,0x302,0xe602,0x63,0x302,0xe602,0x43,0x307, +0xe602,0x63,0x307,0xe602,0x43,0x30c,0xe602,0x63,0x30c,0xe602,0x44,0x30c,0xe602,0x64,0x30c,0xe602, +0x45,0x306,0xe602,0x65,0x306,0xe602,0x45,0x307,0xe602,0x65,0x307,0xca02,0x45,0x328,0xca02,0x65, +0x328,0xe602,0x45,0x30c,0xe602,0x65,0x30c,0xe602,0x47,0x302,0xe602,0x67,0x302,0xe602,0x47,0x306, +0xe602,0x67,0x306,0xe602,0x47,0x307,0xe602,0x67,0x307,0xca02,0x47,0x327,0xca02,0x67,0x327,0xe602, +0x48,0x302,0xe602,0x68,0x302,0xe602,0x49,0x303,0xe602,0x69,0x303,0xe602,0x49,0x304,0xe602,0x69, +0x304,0xe602,0x49,0x306,0xe602,0x69,0x306,0xca02,0x49,0x328,0xca02,0x69,0x328,0xe602,0x49,0x307, +0xe602,0x4a,0x302,0xe602,0x6a,0x302,0xca02,0x4b,0x327,0xca02,0x6b,0x327,0xe602,0x4c,0x301,0xe602, +0x6c,0x301,0xca02,0x4c,0x327,0xca02,0x6c,0x327,0xe602,0x4c,0x30c,0xe602,0x6c,0x30c,0xe602,0x4e, +0x301,0xe602,0x6e,0x301,0xca02,0x4e,0x327,0xca02,0x6e,0x327,0xe602,0x4e,0x30c,0xe602,0x6e,0x30c, +0xe602,0x4f,0x306,0xe602,0x6f,0x306,0xe602,0x4f,0x30b,0xe602,0x6f,0x30b,0xe602,0x52,0x301,0xe602, +0x72,0x301,0xca02,0x52,0x327,0xca02,0x72,0x327,0xe602,0x52,0x30c,0xe602,0x72,0x30c,0xe602,0x53, +0x302,0xe602,0x73,0x302,0xca02,0x53,0x327,0xca02,0x73,0x327,0xca02,0x54,0x327,0xca02,0x74,0x327, +0xe602,0x54,0x30c,0xe602,0x74,0x30c,0xe602,0x55,0x306,0xe602,0x75,0x306,0xe602,0x55,0x30a,0xe602, +0x75,0x30a,0xe602,0x55,0x30b,0xe602,0x75,0x30b,0xca02,0x55,0x328,0xca02,0x75,0x328,0xe602,0x57, +0x302,0xe602,0x77,0x302,0xe602,0x59,0x302,0xe602,0x79,0x302,0xe602,0x59,0x308,0xe602,0x5a,0x301, +0xe602,0x7a,0x301,0xe602,0x5a,0x307,0xe602,0x7a,0x307,0xe602,0x5a,0x30c,0xe602,0x7a,0x30c,0xe602, +0x41,0x30c,0xe602,0x61,0x30c,0xe602,0x49,0x30c,0xe602,0x69,0x30c,0xe602,0x4f,0x30c,0xe602,0x6f, +0x30c,0xe602,0x55,0x30c,0xe602,0x75,0x30c,0xdc,0xe643,0x55,0x308,0x304,0xfc,0xe643,0x75,0x308, +0x304,0xdc,0xe643,0x55,0x308,0x301,0xfc,0xe643,0x75,0x308,0x301,0xdc,0xe643,0x55,0x308,0x30c, +0xfc,0xe643,0x75,0x308,0x30c,0xdc,0xe643,0x55,0x308,0x300,0xfc,0xe643,0x75,0x308,0x300,0xc4, +0xe643,0x41,0x308,0x304,0xe4,0xe643,0x61,0x308,0x304,0x226,0xe643,0x41,0x307,0x304,0x227,0xe643, +0x61,0x307,0x304,0xe602,0xc6,0x304,0xe602,0xe6,0x304,0xe602,0x47,0x30c,0xe602,0x67,0x30c,0xe602, +0x4b,0x30c,0xe602,0x6b,0x30c,0x1ea,0xe643,0x4f,0x328,0x304,0x1eb,0xe643,0x6f,0x328,0x304,0xe602, +0x1b7,0x30c,0xe602,0x292,0x30c,0xe602,0x6a,0x30c,0xe602,0x47,0x301,0xe602,0x67,0x301,0xe602,0x4e, +0x300,0xe602,0x6e,0x300,0xc5,0xe643,0x41,0x30a,0x301,0xe5,0xe643,0x61,0x30a,0x301,0xe602,0xc6, +0x301,0xe602,0xe6,0x301,0xe602,0xd8,0x301,0xe602,0xf8,0x301,0xe602,0x41,0x30f,0xe602,0x61,0x30f, +0xe602,0x41,0x311,0xe602,0x61,0x311,0xe602,0x45,0x30f,0xe602,0x65,0x30f,0xe602,0x45,0x311,0xe602, +0x65,0x311,0xe602,0x49,0x30f,0xe602,0x69,0x30f,0xe602,0x49,0x311,0xe602,0x69,0x311,0xe602,0x4f, +0x30f,0xe602,0x6f,0x30f,0xe602,0x4f,0x311,0xe602,0x6f,0x311,0xe602,0x52,0x30f,0xe602,0x72,0x30f, +0xe602,0x52,0x311,0xe602,0x72,0x311,0xe602,0x55,0x30f,0xe602,0x75,0x30f,0xe602,0x55,0x311,0xe602, +0x75,0x311,0xdc02,0x53,0x326,0xdc02,0x73,0x326,0xdc02,0x54,0x326,0xdc02,0x74,0x326,0xe602,0x48, +0x30c,0xe602,0x68,0x30c,0xd6,0xe643,0x4f,0x308,0x304,0xf6,0xe643,0x6f,0x308,0x304,0xd5,0xe643, +0x4f,0x303,0x304,0xf5,0xe643,0x6f,0x303,0x304,0x22e,0xe643,0x4f,0x307,0x304,0x22f,0xe643,0x6f, +0x307,0x304,0xe602,0x59,0x304,0xe602,0x79,0x304,0xe602,0xa8,0x301,0xe602,0x391,0x301,0xe602,0x395, +0x301,0xe602,0x397,0x301,0xe602,0x399,0x301,0xe602,0x39f,0x301,0xe602,0x3a5,0x301,0xe602,0x3a9,0x301, +0x3ca,0xe643,0x3b9,0x308,0x301,0xe602,0x399,0x308,0xe602,0x3a5,0x308,0xe602,0x3b5,0x301,0xe602,0x3b9, +0x301,0x3cb,0xe643,0x3c5,0x308,0x301,0xe602,0x3bf,0x301,0xe602,0x3c5,0x301,0xe602,0x3d2,0x301,0xe602, +0x3d2,0x308,0xe602,0x415,0x300,0xe602,0x415,0x308,0xe602,0x413,0x301,0xe602,0x406,0x308,0xe602,0x41a, +0x301,0xe602,0x418,0x300,0xe602,0x423,0x306,0xe602,0x418,0x306,0xe602,0x438,0x306,0xe602,0x435,0x300, +0xe602,0x435,0x308,0xe602,0x433,0x301,0xe602,0x456,0x308,0xe602,0x43a,0x301,0xe602,0x438,0x300,0xe602, +0x443,0x306,0xe602,0x474,0x30f,0xe602,0x475,0x30f,0xe602,0x416,0x306,0xe602,0x436,0x306,0xe602,0x410, +0x306,0xe602,0x430,0x306,0xe602,0x410,0x308,0xe602,0x430,0x308,0xe602,0x415,0x306,0xe602,0x435,0x306, +0xe602,0x4d8,0x308,0xe602,0x4d9,0x308,0xe602,0x416,0x308,0xe602,0x436,0x308,0xe602,0x417,0x308,0xe602, +0x437,0x308,0xe602,0x418,0x304,0xe602,0x438,0x304,0xe602,0x418,0x308,0xe602,0x438,0x308,0xe602,0x41e, +0x308,0xe602,0x43e,0x308,0xe602,0x4e8,0x308,0xe602,0x4e9,0x308,0xe602,0x42d,0x308,0xe602,0x44d,0x308, +0xe602,0x423,0x304,0xe602,0x443,0x304,0xe602,0x423,0x308,0xe602,0x443,0x308,0xe602,0x423,0x30b,0xe602, +0x443,0x30b,0xe602,0x427,0x308,0xe602,0x447,0x308,0xe602,0x42b,0x308,0xe602,0x44b,0x308,0xe602,0x627, +0x653,0xe602,0x627,0x654,0xe602,0x648,0x654,0xdc02,0x627,0x655,0xe602,0x64a,0x654,0xe602,0x6d5,0x654, +0xe602,0x6c1,0x654,0xe602,0x6d2,0x654,0x702,0x928,0x93c,0x702,0x930,0x93c,0x702,0x933,0x93c,2, +0x9c7,0x9be,2,0x9c7,0x9d7,2,0xb47,0xb56,2,0xb47,0xb3e,2,0xb47,0xb57,2,0xb92, +0xbd7,2,0xbc6,0xbbe,2,0xbc7,0xbbe,2,0xbc6,0xbd7,0x5b02,0xc46,0xc56,2,0xcbf,0xcd5, +2,0xcc6,0xcd5,2,0xcc6,0xcd6,0xcca,0x43,0xcc6,0xcc2,0xcd5,2,0xd46,0xd3e,2,0xd47, +0xd3e,2,0xd46,0xd57,0x902,0xdd9,0xdca,0xddc,0x943,0xdd9,0xdcf,0xdca,2,0xdd9,0xddf,2, +0x1025,0x102e,2,0x1b05,0x1b35,2,0x1b07,0x1b35,2,0x1b09,0x1b35,2,0x1b0b,0x1b35,2,0x1b0d, +0x1b35,2,0x1b11,0x1b35,2,0x1b3a,0x1b35,2,0x1b3c,0x1b35,2,0x1b3e,0x1b35,2,0x1b3f,0x1b35, +2,0x1b42,0x1b35,0xdc02,0x41,0x325,0xdc02,0x61,0x325,0xe602,0x42,0x307,0xe602,0x62,0x307,0xdc02, +0x42,0x323,0xdc02,0x62,0x323,0xdc02,0x42,0x331,0xdc02,0x62,0x331,0xc7,0xe643,0x43,0x327,0x301, +0xe7,0xe643,0x63,0x327,0x301,0xe602,0x44,0x307,0xe602,0x64,0x307,0xdc02,0x44,0x323,0xdc02,0x64, +0x323,0xdc02,0x44,0x331,0xdc02,0x64,0x331,0xca02,0x44,0x327,0xca02,0x64,0x327,0xdc02,0x44,0x32d, +0xdc02,0x64,0x32d,0x112,0xe643,0x45,0x304,0x300,0x113,0xe643,0x65,0x304,0x300,0x112,0xe643,0x45, +0x304,0x301,0x113,0xe643,0x65,0x304,0x301,0xdc02,0x45,0x32d,0xdc02,0x65,0x32d,0xdc02,0x45,0x330, +0xdc02,0x65,0x330,0x228,0xe643,0x45,0x327,0x306,0x229,0xe643,0x65,0x327,0x306,0xe602,0x46,0x307, +0xe602,0x66,0x307,0xe602,0x47,0x304,0xe602,0x67,0x304,0xe602,0x48,0x307,0xe602,0x68,0x307,0xdc02, +0x48,0x323,0xdc02,0x68,0x323,0xe602,0x48,0x308,0xe602,0x68,0x308,0xca02,0x48,0x327,0xca02,0x68, +0x327,0xdc02,0x48,0x32e,0xdc02,0x68,0x32e,0xdc02,0x49,0x330,0xdc02,0x69,0x330,0xcf,0xe643,0x49, +0x308,0x301,0xef,0xe643,0x69,0x308,0x301,0xe602,0x4b,0x301,0xe602,0x6b,0x301,0xdc02,0x4b,0x323, +0xdc02,0x6b,0x323,0xdc02,0x4b,0x331,0xdc02,0x6b,0x331,0x1e36,0xe643,0x4c,0x323,0x304,0x1e37,0xe643, +0x6c,0x323,0x304,0xdc02,0x4c,0x331,0xdc02,0x6c,0x331,0xdc02,0x4c,0x32d,0xdc02,0x6c,0x32d,0xe602, +0x4d,0x301,0xe602,0x6d,0x301,0xe602,0x4d,0x307,0xe602,0x6d,0x307,0xdc02,0x4d,0x323,0xdc02,0x6d, +0x323,0xe602,0x4e,0x307,0xe602,0x6e,0x307,0xdc02,0x4e,0x323,0xdc02,0x6e,0x323,0xdc02,0x4e,0x331, +0xdc02,0x6e,0x331,0xdc02,0x4e,0x32d,0xdc02,0x6e,0x32d,0xd5,0xe643,0x4f,0x303,0x301,0xf5,0xe643, +0x6f,0x303,0x301,0xd5,0xe643,0x4f,0x303,0x308,0xf5,0xe643,0x6f,0x303,0x308,0x14c,0xe643,0x4f, +0x304,0x300,0x14d,0xe643,0x6f,0x304,0x300,0x14c,0xe643,0x4f,0x304,0x301,0x14d,0xe643,0x6f,0x304, +0x301,0xe602,0x50,0x301,0xe602,0x70,0x301,0xe602,0x50,0x307,0xe602,0x70,0x307,0xe602,0x52,0x307, +0xe602,0x72,0x307,0x1e5a,0xe643,0x52,0x323,0x304,0x1e5b,0xe643,0x72,0x323,0x304,0xdc02,0x52,0x331, +0xdc02,0x72,0x331,0xe602,0x53,0x307,0xe602,0x73,0x307,0x15a,0xe643,0x53,0x301,0x307,0x15b,0xe643, +0x73,0x301,0x307,0x160,0xe643,0x53,0x30c,0x307,0x161,0xe643,0x73,0x30c,0x307,0x1e62,0xe643,0x53, +0x323,0x307,0x1e63,0xe643,0x73,0x323,0x307,0xe602,0x54,0x307,0xe602,0x74,0x307,0xdc02,0x54,0x323, +0xdc02,0x74,0x323,0xdc02,0x54,0x331,0xdc02,0x74,0x331,0xdc02,0x54,0x32d,0xdc02,0x74,0x32d,0xdc02, +0x55,0x324,0xdc02,0x75,0x324,0xdc02,0x55,0x330,0xdc02,0x75,0x330,0xdc02,0x55,0x32d,0xdc02,0x75, +0x32d,0x168,0xe643,0x55,0x303,0x301,0x169,0xe643,0x75,0x303,0x301,0x16a,0xe643,0x55,0x304,0x308, +0x16b,0xe643,0x75,0x304,0x308,0xe602,0x56,0x303,0xe602,0x76,0x303,0xdc02,0x56,0x323,0xdc02,0x76, +0x323,0xe602,0x57,0x300,0xe602,0x77,0x300,0xe602,0x57,0x301,0xe602,0x77,0x301,0xe602,0x57,0x308, +0xe602,0x77,0x308,0xe602,0x57,0x307,0xe602,0x77,0x307,0xdc02,0x57,0x323,0xdc02,0x77,0x323,0xe602, +0x58,0x307,0xe602,0x78,0x307,0xe602,0x58,0x308,0xe602,0x78,0x308,0xe602,0x59,0x307,0xe602,0x79, +0x307,0xe602,0x5a,0x302,0xe602,0x7a,0x302,0xdc02,0x5a,0x323,0xdc02,0x7a,0x323,0xdc02,0x5a,0x331, +0xdc02,0x7a,0x331,0xdc02,0x68,0x331,0xe602,0x74,0x308,0xe602,0x77,0x30a,0xe602,0x79,0x30a,0xe602, +0x17f,0x307,0xe602,0x41,0x309,0xe602,0x61,0x309,0xc2,0xe643,0x41,0x302,0x301,0xe2,0xe643,0x61, +0x302,0x301,0xc2,0xe643,0x41,0x302,0x300,0xe2,0xe643,0x61,0x302,0x300,0xc2,0xe643,0x41,0x302, +0x309,0xe2,0xe643,0x61,0x302,0x309,0xc2,0xe643,0x41,0x302,0x303,0xe2,0xe643,0x61,0x302,0x303, +0x1ea0,0xe643,0x41,0x323,0x302,0x1ea1,0xe643,0x61,0x323,0x302,0x102,0xe643,0x41,0x306,0x301,0x103, +0xe643,0x61,0x306,0x301,0x102,0xe643,0x41,0x306,0x300,0x103,0xe643,0x61,0x306,0x300,0x102,0xe643, +0x41,0x306,0x309,0x103,0xe643,0x61,0x306,0x309,0x102,0xe643,0x41,0x306,0x303,0x103,0xe643,0x61, +0x306,0x303,0x1ea0,0xe643,0x41,0x323,0x306,0x1ea1,0xe643,0x61,0x323,0x306,0xe602,0x45,0x309,0xe602, +0x65,0x309,0xe602,0x45,0x303,0xe602,0x65,0x303,0xca,0xe643,0x45,0x302,0x301,0xea,0xe643,0x65, +0x302,0x301,0xca,0xe643,0x45,0x302,0x300,0xea,0xe643,0x65,0x302,0x300,0xca,0xe643,0x45,0x302, +0x309,0xea,0xe643,0x65,0x302,0x309,0xca,0xe643,0x45,0x302,0x303,0xea,0xe643,0x65,0x302,0x303, +0x1eb8,0xe643,0x45,0x323,0x302,0x1eb9,0xe643,0x65,0x323,0x302,0xe602,0x49,0x309,0xe602,0x69,0x309, +0xdc02,0x49,0x323,0xdc02,0x69,0x323,0xe602,0x4f,0x309,0xe602,0x6f,0x309,0xd4,0xe643,0x4f,0x302, +0x301,0xf4,0xe643,0x6f,0x302,0x301,0xd4,0xe643,0x4f,0x302,0x300,0xf4,0xe643,0x6f,0x302,0x300, +0xd4,0xe643,0x4f,0x302,0x309,0xf4,0xe643,0x6f,0x302,0x309,0xd4,0xe643,0x4f,0x302,0x303,0xf4, +0xe643,0x6f,0x302,0x303,0x1ecc,0xe643,0x4f,0x323,0x302,0x1ecd,0xe643,0x6f,0x323,0x302,0x1a0,0xe643, +0x4f,0x31b,0x301,0x1a1,0xe643,0x6f,0x31b,0x301,0x1a0,0xe643,0x4f,0x31b,0x300,0x1a1,0xe643,0x6f, +0x31b,0x300,0x1a0,0xe643,0x4f,0x31b,0x309,0x1a1,0xe643,0x6f,0x31b,0x309,0x1a0,0xe643,0x4f,0x31b, +0x303,0x1a1,0xe643,0x6f,0x31b,0x303,0x1a0,0xdc43,0x4f,0x31b,0x323,0x1a1,0xdc43,0x6f,0x31b,0x323, +0xdc02,0x55,0x323,0xdc02,0x75,0x323,0xe602,0x55,0x309,0xe602,0x75,0x309,0x1af,0xe643,0x55,0x31b, +0x301,0x1b0,0xe643,0x75,0x31b,0x301,0x1af,0xe643,0x55,0x31b,0x300,0x1b0,0xe643,0x75,0x31b,0x300, +0x1af,0xe643,0x55,0x31b,0x309,0x1b0,0xe643,0x75,0x31b,0x309,0x1af,0xe643,0x55,0x31b,0x303,0x1b0, +0xe643,0x75,0x31b,0x303,0x1af,0xdc43,0x55,0x31b,0x323,0x1b0,0xdc43,0x75,0x31b,0x323,0xe602,0x59, +0x300,0xe602,0x79,0x300,0xdc02,0x59,0x323,0xdc02,0x79,0x323,0xe602,0x59,0x309,0xe602,0x79,0x309, +0xe602,0x59,0x303,0xe602,0x79,0x303,0x1f10,0xe643,0x3b5,0x313,0x300,0x1f11,0xe643,0x3b5,0x314,0x300, +0x1f10,0xe643,0x3b5,0x313,0x301,0x1f11,0xe643,0x3b5,0x314,0x301,0x1f18,0xe643,0x395,0x313,0x300,0x1f19, +0xe643,0x395,0x314,0x300,0x1f18,0xe643,0x395,0x313,0x301,0x1f19,0xe643,0x395,0x314,0x301,0x1f30,0xe643, +0x3b9,0x313,0x300,0x1f31,0xe643,0x3b9,0x314,0x300,0x1f30,0xe643,0x3b9,0x313,0x301,0x1f31,0xe643,0x3b9, +0x314,0x301,0x1f30,0xe643,0x3b9,0x313,0x342,0x1f31,0xe643,0x3b9,0x314,0x342,0x1f38,0xe643,0x399,0x313, +0x300,0x1f39,0xe643,0x399,0x314,0x300,0x1f38,0xe643,0x399,0x313,0x301,0x1f39,0xe643,0x399,0x314,0x301, +0x1f38,0xe643,0x399,0x313,0x342,0x1f39,0xe643,0x399,0x314,0x342,0x1f40,0xe643,0x3bf,0x313,0x300,0x1f41, +0xe643,0x3bf,0x314,0x300,0x1f40,0xe643,0x3bf,0x313,0x301,0x1f41,0xe643,0x3bf,0x314,0x301,0x1f48,0xe643, +0x39f,0x313,0x300,0x1f49,0xe643,0x39f,0x314,0x300,0x1f48,0xe643,0x39f,0x313,0x301,0x1f49,0xe643,0x39f, +0x314,0x301,0x1f50,0xe643,0x3c5,0x313,0x300,0x1f51,0xe643,0x3c5,0x314,0x300,0x1f50,0xe643,0x3c5,0x313, +0x301,0x1f51,0xe643,0x3c5,0x314,0x301,0x1f50,0xe643,0x3c5,0x313,0x342,0x1f51,0xe643,0x3c5,0x314,0x342, +0x1f59,0xe643,0x3a5,0x314,0x300,0x1f59,0xe643,0x3a5,0x314,0x301,0x1f59,0xe643,0x3a5,0x314,0x342,0xe602, +0x3b5,0x300,0xe602,0x3b9,0x300,0xe602,0x3bf,0x300,0xe602,0x3c5,0x300,0x1f00,0xf043,0x3b1,0x313,0x345, +0x1f01,0xf043,0x3b1,0x314,0x345,0x1f02,0x345,2,0xf044,0x3b1,0x313,0x300,0x345,0x1f03,0x345,2, +0xf044,0x3b1,0x314,0x300,0x345,0x1f04,0x345,2,0xf044,0x3b1,0x313,0x301,0x345,0x1f05,0x345,2, +0xf044,0x3b1,0x314,0x301,0x345,0x1f06,0x345,2,0xf044,0x3b1,0x313,0x342,0x345,0x1f07,0x345,2, +0xf044,0x3b1,0x314,0x342,0x345,0x1f08,0xf043,0x391,0x313,0x345,0x1f09,0xf043,0x391,0x314,0x345,0x1f0a, +0x345,2,0xf044,0x391,0x313,0x300,0x345,0x1f0b,0x345,2,0xf044,0x391,0x314,0x300,0x345,0x1f0c, +0x345,2,0xf044,0x391,0x313,0x301,0x345,0x1f0d,0x345,2,0xf044,0x391,0x314,0x301,0x345,0x1f0e, +0x345,2,0xf044,0x391,0x313,0x342,0x345,0x1f0f,0x345,2,0xf044,0x391,0x314,0x342,0x345,0x1f20, +0xf043,0x3b7,0x313,0x345,0x1f21,0xf043,0x3b7,0x314,0x345,0x1f22,0x345,2,0xf044,0x3b7,0x313,0x300, +0x345,0x1f23,0x345,2,0xf044,0x3b7,0x314,0x300,0x345,0x1f24,0x345,2,0xf044,0x3b7,0x313,0x301, +0x345,0x1f25,0x345,2,0xf044,0x3b7,0x314,0x301,0x345,0x1f26,0x345,2,0xf044,0x3b7,0x313,0x342, +0x345,0x1f27,0x345,2,0xf044,0x3b7,0x314,0x342,0x345,0x1f28,0xf043,0x397,0x313,0x345,0x1f29,0xf043, +0x397,0x314,0x345,0x1f2a,0x345,2,0xf044,0x397,0x313,0x300,0x345,0x1f2b,0x345,2,0xf044,0x397, +0x314,0x300,0x345,0x1f2c,0x345,2,0xf044,0x397,0x313,0x301,0x345,0x1f2d,0x345,2,0xf044,0x397, +0x314,0x301,0x345,0x1f2e,0x345,2,0xf044,0x397,0x313,0x342,0x345,0x1f2f,0x345,2,0xf044,0x397, +0x314,0x342,0x345,0x1f60,0xf043,0x3c9,0x313,0x345,0x1f61,0xf043,0x3c9,0x314,0x345,0x1f62,0x345,2, +0xf044,0x3c9,0x313,0x300,0x345,0x1f63,0x345,2,0xf044,0x3c9,0x314,0x300,0x345,0x1f64,0x345,2, +0xf044,0x3c9,0x313,0x301,0x345,0x1f65,0x345,2,0xf044,0x3c9,0x314,0x301,0x345,0x1f66,0x345,2, +0xf044,0x3c9,0x313,0x342,0x345,0x1f67,0x345,2,0xf044,0x3c9,0x314,0x342,0x345,0x1f68,0xf043,0x3a9, +0x313,0x345,0x1f69,0xf043,0x3a9,0x314,0x345,0x1f6a,0x345,2,0xf044,0x3a9,0x313,0x300,0x345,0x1f6b, +0x345,2,0xf044,0x3a9,0x314,0x300,0x345,0x1f6c,0x345,2,0xf044,0x3a9,0x313,0x301,0x345,0x1f6d, +0x345,2,0xf044,0x3a9,0x314,0x301,0x345,0x1f6e,0x345,2,0xf044,0x3a9,0x313,0x342,0x345,0x1f6f, +0x345,2,0xf044,0x3a9,0x314,0x342,0x345,0xe602,0x3b1,0x306,0xe602,0x3b1,0x304,0x1f70,0xf043,0x3b1, +0x300,0x345,0xf002,0x3b1,0x345,0x3ac,0xf043,0x3b1,0x301,0x345,0x1fb6,0xf043,0x3b1,0x342,0x345,0xe602, +0x391,0x306,0xe602,0x391,0x304,0xe602,0x391,0x300,0xf002,0x391,0x345,0xe602,0xa8,0x342,0x1f74,0xf043, +0x3b7,0x300,0x345,0xf002,0x3b7,0x345,0x3ae,0xf043,0x3b7,0x301,0x345,0x1fc6,0xf043,0x3b7,0x342,0x345, +0xe602,0x395,0x300,0xe602,0x397,0x300,0xf002,0x397,0x345,0xe602,0x1fbf,0x300,0xe602,0x1fbf,0x301,0xe602, +0x1fbf,0x342,0xe602,0x3b9,0x306,0xe602,0x3b9,0x304,0x3ca,0xe643,0x3b9,0x308,0x300,0xe602,0x3b9,0x342, +0x3ca,0xe643,0x3b9,0x308,0x342,0xe602,0x399,0x306,0xe602,0x399,0x304,0xe602,0x399,0x300,0xe602,0x1ffe, +0x300,0xe602,0x1ffe,0x301,0xe602,0x1ffe,0x342,0xe602,0x3c5,0x306,0xe602,0x3c5,0x304,0x3cb,0xe643,0x3c5, +0x308,0x300,0xe602,0x3c1,0x313,0xe602,0x3c1,0x314,0xe602,0x3c5,0x342,0x3cb,0xe643,0x3c5,0x308,0x342, +0xe602,0x3a5,0x306,0xe602,0x3a5,0x304,0xe602,0x3a5,0x300,0xe602,0x3a1,0x314,0xe602,0xa8,0x300,0x1f7c, +0xf043,0x3c9,0x300,0x345,0xf002,0x3c9,0x345,0x3ce,0xf043,0x3c9,0x301,0x345,0x1ff6,0xf043,0x3c9,0x342, +0x345,0xe602,0x39f,0x300,0xe602,0x3a9,0x300,0xf002,0x3a9,0x345,0x102,0x2190,0x338,0x102,0x2192,0x338, +0x102,0x2194,0x338,0x102,0x21d0,0x338,0x102,0x21d4,0x338,0x102,0x21d2,0x338,0x102,0x2203,0x338,0x102, +0x2208,0x338,0x102,0x220b,0x338,0x102,0x2223,0x338,0x102,0x2225,0x338,0x102,0x223c,0x338,0x102,0x2243, +0x338,0x102,0x2245,0x338,0x102,0x2248,0x338,0x102,0x3d,0x338,0x102,0x2261,0x338,0x102,0x224d,0x338, +0x102,0x3c,0x338,0x102,0x3e,0x338,0x102,0x2264,0x338,0x102,0x2265,0x338,0x102,0x2272,0x338,0x102, +0x2273,0x338,0x102,0x2276,0x338,0x102,0x2277,0x338,0x102,0x227a,0x338,0x102,0x227b,0x338,0x102,0x2282, +0x338,0x102,0x2283,0x338,0x102,0x2286,0x338,0x102,0x2287,0x338,0x102,0x22a2,0x338,0x102,0x22a8,0x338, +0x102,0x22a9,0x338,0x102,0x22ab,0x338,0x102,0x227c,0x338,0x102,0x227d,0x338,0x102,0x2291,0x338,0x102, +0x2292,0x338,0x102,0x22b2,0x338,0x102,0x22b3,0x338,0x102,0x22b4,0x338,0x102,0x22b5,0x338,0x802,0x304b, +0x3099,0x802,0x304d,0x3099,0x802,0x304f,0x3099,0x802,0x3051,0x3099,0x802,0x3053,0x3099,0x802,0x3055,0x3099, +0x802,0x3057,0x3099,0x802,0x3059,0x3099,0x802,0x305b,0x3099,0x802,0x305d,0x3099,0x802,0x305f,0x3099,0x802, +0x3061,0x3099,0x802,0x3064,0x3099,0x802,0x3066,0x3099,0x802,0x3068,0x3099,0x802,0x306f,0x3099,0x802,0x306f, +0x309a,0x802,0x3072,0x3099,0x802,0x3072,0x309a,0x802,0x3075,0x3099,0x802,0x3075,0x309a,0x802,0x3078,0x3099, +0x802,0x3078,0x309a,0x802,0x307b,0x3099,0x802,0x307b,0x309a,0x802,0x3046,0x3099,0x802,0x309d,0x3099,0x802, +0x30ab,0x3099,0x802,0x30ad,0x3099,0x802,0x30af,0x3099,0x802,0x30b1,0x3099,0x802,0x30b3,0x3099,0x802,0x30b5, +0x3099,0x802,0x30b7,0x3099,0x802,0x30b9,0x3099,0x802,0x30bb,0x3099,0x802,0x30bd,0x3099,0x802,0x30bf,0x3099, +0x802,0x30c1,0x3099,0x802,0x30c4,0x3099,0x802,0x30c6,0x3099,0x802,0x30c8,0x3099,0x802,0x30cf,0x3099,0x802, +0x30cf,0x309a,0x802,0x30d2,0x3099,0x802,0x30d2,0x309a,0x802,0x30d5,0x3099,0x802,0x30d5,0x309a,0x802,0x30d8, +0x3099,0x802,0x30d8,0x309a,0x802,0x30db,0x3099,0x802,0x30db,0x309a,0x802,0x30a6,0x3099,0x802,0x30ef,0x3099, +0x802,0x30f0,0x3099,0x802,0x30f1,0x3099,0x802,0x30f2,0x3099,0x802,0x30fd,0x3099,0xe603,0xd801,0xddd2,0x307, +0xe603,0xd801,0xddda,0x307,0x704,0xd804,0xdc99,0xd804,0xdcba,0x704,0xd804,0xdc9b,0xd804,0xdcba,0x704,0xd804, +0xdca5,0xd804,0xdcba,4,0xd804,0xdd31,0xd804,0xdd27,4,0xd804,0xdd32,0xd804,0xdd27,4,0xd804,0xdf47, +0xd804,0xdf3e,4,0xd804,0xdf47,0xd804,0xdf57,4,0xd804,0xdf82,0xd804,0xdfc9,4,0xd804,0xdf84,0xd804, +0xdfbb,4,0xd804,0xdf8b,0xd804,0xdfc2,4,0xd804,0xdf90,0xd804,0xdfc9,4,0xd805,0xdcb9,0xd805,0xdcba, +4,0xd805,0xdcb9,0xd805,0xdcb0,4,0xd805,0xdcb9,0xd805,0xdcbd,4,0xd805,0xddb8,0xd805,0xddaf,4, +0xd805,0xddb9,0xd805,0xddaf,4,0xd806,0xdd35,0xd806,0xdd30,0xd81b,0xdd69,0xd81b,0xdd67,4,0x46,0xd81b, +0xdd63,0xd81b,0xdd67,0xd81b,0xdd67,1,0x2b9,1,0x3b,1,0xb7,0x702,0x915,0x93c,0x702,0x916, +0x93c,0x702,0x917,0x93c,0x702,0x91c,0x93c,0x702,0x921,0x93c,0x702,0x922,0x93c,0x702,0x92b,0x93c, +0x702,0x92f,0x93c,0x702,0x9a1,0x9bc,0x702,0x9a2,0x9bc,0x702,0x9af,0x9bc,0x702,0xa32,0xa3c,0x702, +0xa38,0xa3c,0x702,0xa16,0xa3c,0x702,0xa17,0xa3c,0x702,0xa1c,0xa3c,0x702,0xa2b,0xa3c,0x702,0xb21, +0xb3c,0x702,0xb22,0xb3c,2,0xf42,0xfb7,2,0xf4c,0xfb7,2,0xf51,0xfb7,2,0xf56,0xfb7, +2,0xf5b,0xfb7,2,0xf40,0xfb5,0x8202,0xfb2,0xf80,0x8202,0xfb3,0xf80,2,0xf92,0xfb7,2, +0xf9c,0xfb7,2,0xfa1,0xfb7,2,0xfa6,0xfb7,2,0xfab,0xfb7,2,0xf90,0xfb5,1,0x3b9, +1,0x60,1,0xb4,1,0x3a9,1,0x4b,1,0x3008,1,0x3009,0x102,0x2add,0x338,1, +0x8c48,1,0x66f4,1,0x8eca,1,0x8cc8,1,0x6ed1,1,0x4e32,1,0x53e5,1,0x9f9c,1, +0x5951,1,0x91d1,1,0x5587,1,0x5948,1,0x61f6,1,0x7669,1,0x7f85,1,0x863f,1, +0x87ba,1,0x88f8,1,0x908f,1,0x6a02,1,0x6d1b,1,0x70d9,1,0x73de,1,0x843d,1, +0x916a,1,0x99f1,1,0x4e82,1,0x5375,1,0x6b04,1,0x721b,1,0x862d,1,0x9e1e,1, +0x5d50,1,0x6feb,1,0x85cd,1,0x8964,1,0x62c9,1,0x81d8,1,0x881f,1,0x5eca,1, +0x6717,1,0x6d6a,1,0x72fc,1,0x90ce,1,0x4f86,1,0x51b7,1,0x52de,1,0x64c4,1, +0x6ad3,1,0x7210,1,0x76e7,1,0x8001,1,0x8606,1,0x865c,1,0x8def,1,0x9732,1, +0x9b6f,1,0x9dfa,1,0x788c,1,0x797f,1,0x7da0,1,0x83c9,1,0x9304,1,0x9e7f,1, +0x8ad6,1,0x58df,1,0x5f04,1,0x7c60,1,0x807e,1,0x7262,1,0x78ca,1,0x8cc2,1, +0x96f7,1,0x58d8,1,0x5c62,1,0x6a13,1,0x6dda,1,0x6f0f,1,0x7d2f,1,0x7e37,1, +0x964b,1,0x52d2,1,0x808b,1,0x51dc,1,0x51cc,1,0x7a1c,1,0x7dbe,1,0x83f1,1, +0x9675,1,0x8b80,1,0x62cf,1,0x8afe,1,0x4e39,1,0x5be7,1,0x6012,1,0x7387,1, +0x7570,1,0x5317,1,0x78fb,1,0x4fbf,1,0x5fa9,1,0x4e0d,1,0x6ccc,1,0x6578,1, +0x7d22,1,0x53c3,1,0x585e,1,0x7701,1,0x8449,1,0x8aaa,1,0x6bba,1,0x8fb0,1, +0x6c88,1,0x62fe,1,0x82e5,1,0x63a0,1,0x7565,1,0x4eae,1,0x5169,1,0x51c9,1, +0x6881,1,0x7ce7,1,0x826f,1,0x8ad2,1,0x91cf,1,0x52f5,1,0x5442,1,0x5973,1, +0x5eec,1,0x65c5,1,0x6ffe,1,0x792a,1,0x95ad,1,0x9a6a,1,0x9e97,1,0x9ece,1, +0x529b,1,0x66c6,1,0x6b77,1,0x8f62,1,0x5e74,1,0x6190,1,0x6200,1,0x649a,1, +0x6f23,1,0x7149,1,0x7489,1,0x79ca,1,0x7df4,1,0x806f,1,0x8f26,1,0x84ee,1, +0x9023,1,0x934a,1,0x5217,1,0x52a3,1,0x54bd,1,0x70c8,1,0x88c2,1,0x5ec9,1, +0x5ff5,1,0x637b,1,0x6bae,1,0x7c3e,1,0x7375,1,0x4ee4,1,0x56f9,1,0x5dba,1, +0x601c,1,0x73b2,1,0x7469,1,0x7f9a,1,0x8046,1,0x9234,1,0x96f6,1,0x9748,1, +0x9818,1,0x4f8b,1,0x79ae,1,0x91b4,1,0x96b8,1,0x60e1,1,0x4e86,1,0x50da,1, +0x5bee,1,0x5c3f,1,0x6599,1,0x71ce,1,0x7642,1,0x84fc,1,0x907c,1,0x9f8d,1, +0x6688,1,0x962e,1,0x5289,1,0x677b,1,0x67f3,1,0x6d41,1,0x6e9c,1,0x7409,1, +0x7559,1,0x786b,1,0x7d10,1,0x985e,1,0x516d,1,0x622e,1,0x9678,1,0x502b,1, +0x5d19,1,0x6dea,1,0x8f2a,1,0x5f8b,1,0x6144,1,0x6817,1,0x9686,1,0x5229,1, +0x540f,1,0x5c65,1,0x6613,1,0x674e,1,0x68a8,1,0x6ce5,1,0x7406,1,0x75e2,1, +0x7f79,1,0x88cf,1,0x88e1,1,0x91cc,1,0x96e2,1,0x533f,1,0x6eba,1,0x541d,1, +0x71d0,1,0x7498,1,0x85fa,1,0x96a3,1,0x9c57,1,0x9e9f,1,0x6797,1,0x6dcb,1, +0x81e8,1,0x7acb,1,0x7b20,1,0x7c92,1,0x72c0,1,0x7099,1,0x8b58,1,0x4ec0,1, +0x8336,1,0x523a,1,0x5207,1,0x5ea6,1,0x62d3,1,0x7cd6,1,0x5b85,1,0x6d1e,1, +0x66b4,1,0x8f3b,1,0x884c,1,0x964d,1,0x898b,1,0x5ed3,1,0x5140,1,0x55c0,1, +0x585a,1,0x6674,1,0x51de,1,0x732a,1,0x76ca,1,0x793c,1,0x795e,1,0x7965,1, +0x798f,1,0x9756,1,0x7cbe,1,0x7fbd,1,0x8612,1,0x8af8,1,0x9038,1,0x90fd,1, +0x98ef,1,0x98fc,1,0x9928,1,0x9db4,1,0x90de,1,0x96b7,1,0x4fae,1,0x50e7,1, +0x514d,1,0x52c9,1,0x52e4,1,0x5351,1,0x559d,1,0x5606,1,0x5668,1,0x5840,1, +0x58a8,1,0x5c64,1,0x5c6e,1,0x6094,1,0x6168,1,0x618e,1,0x61f2,1,0x654f,1, +0x65e2,1,0x6691,1,0x6885,1,0x6d77,1,0x6e1a,1,0x6f22,1,0x716e,1,0x722b,1, +0x7422,1,0x7891,1,0x793e,1,0x7949,1,0x7948,1,0x7950,1,0x7956,1,0x795d,1, +0x798d,1,0x798e,1,0x7a40,1,0x7a81,1,0x7bc0,1,0x7e09,1,0x7e41,1,0x7f72,1, +0x8005,1,0x81ed,1,0x8279,1,0x8457,1,0x8910,1,0x8996,1,0x8b01,1,0x8b39,1, +0x8cd3,1,0x8d08,1,0x8fb6,1,0x96e3,1,0x97ff,1,0x983b,1,0x6075,2,0xd850,0xdeee, +1,0x8218,1,0x4e26,1,0x51b5,1,0x5168,1,0x4f80,1,0x5145,1,0x5180,1,0x52c7, +1,0x52fa,1,0x5555,1,0x5599,1,0x55e2,1,0x58b3,1,0x5944,1,0x5954,1,0x5a62, +1,0x5b28,1,0x5ed2,1,0x5ed9,1,0x5f69,1,0x5fad,1,0x60d8,1,0x614e,1,0x6108, +1,0x6160,1,0x6234,1,0x63c4,1,0x641c,1,0x6452,1,0x6556,1,0x671b,1,0x6756, +1,0x6b79,1,0x6edb,1,0x6ecb,1,0x701e,1,0x77a7,1,0x7235,1,0x72af,1,0x7471, +1,0x7506,1,0x753b,1,0x761d,1,0x761f,1,0x76db,1,0x76f4,1,0x774a,1,0x7740, +1,0x78cc,1,0x7ab1,1,0x7c7b,1,0x7d5b,1,0x7f3e,1,0x8352,1,0x83ef,1,0x8779, +1,0x8941,1,0x8986,1,0x8abf,1,0x8acb,1,0x8aed,1,0x8b8a,1,0x8f38,1,0x9072, +1,0x9199,1,0x9276,1,0x967c,1,0x97db,1,0x980b,1,0x9b12,2,0xd84a,0xdc4a,2, +0xd84a,0xdc44,2,0xd84c,0xdfd5,1,0x3b9d,1,0x4018,1,0x4039,2,0xd854,0xde49,2,0xd857, +0xdcd0,2,0xd85f,0xded3,1,0x9f43,1,0x9f8e,0xe02,0x5d9,0x5b4,0x1102,0x5f2,0x5b7,0x1802,0x5e9, +0x5c1,0x1902,0x5e9,0x5c2,0xfb49,0x1843,0x5e9,0x5bc,0x5c1,0xfb49,0x1943,0x5e9,0x5bc,0x5c2,0x1102,0x5d0, +0x5b7,0x1202,0x5d0,0x5b8,0x1502,0x5d0,0x5bc,0x1502,0x5d1,0x5bc,0x1502,0x5d2,0x5bc,0x1502,0x5d3,0x5bc, +0x1502,0x5d4,0x5bc,0x1502,0x5d5,0x5bc,0x1502,0x5d6,0x5bc,0x1502,0x5d8,0x5bc,0x1502,0x5d9,0x5bc,0x1502, +0x5da,0x5bc,0x1502,0x5db,0x5bc,0x1502,0x5dc,0x5bc,0x1502,0x5de,0x5bc,0x1502,0x5e0,0x5bc,0x1502,0x5e1, +0x5bc,0x1502,0x5e3,0x5bc,0x1502,0x5e4,0x5bc,0x1502,0x5e6,0x5bc,0x1502,0x5e7,0x5bc,0x1502,0x5e8,0x5bc, +0x1502,0x5e9,0x5bc,0x1502,0x5ea,0x5bc,0x1302,0x5d5,0x5b9,0x1702,0x5d1,0x5bf,0x1702,0x5db,0x5bf,0x1702, +0x5e4,0x5bf,0xd804,0xd834,0xdd57,0xd834,0xdd65,0xd804,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd5f,0xd834,0xdd6e, +4,0xd846,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd6e,0xd834,0xdd5f,0xd834,0xdd6f,4,0xd846,0xd834,0xdd58, +0xd834,0xdd65,0xd834,0xdd6f,0xd834,0xdd5f,0xd834,0xdd70,4,0xd846,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd70, +0xd834,0xdd5f,0xd834,0xdd71,4,0xd846,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd71,0xd834,0xdd5f,0xd834,0xdd72, +4,0xd846,0xd834,0xdd58,0xd834,0xdd65,0xd834,0xdd72,0xd804,0xd834,0xddb9,0xd834,0xdd65,0xd804,0xd834,0xddba, +0xd834,0xdd65,0xd834,0xddbb,0xd834,0xdd6e,4,0xd846,0xd834,0xddb9,0xd834,0xdd65,0xd834,0xdd6e,0xd834,0xddbc, +0xd834,0xdd6e,4,0xd846,0xd834,0xddba,0xd834,0xdd65,0xd834,0xdd6e,0xd834,0xddbb,0xd834,0xdd6f,4,0xd846, +0xd834,0xddb9,0xd834,0xdd65,0xd834,0xdd6f,0xd834,0xddbc,0xd834,0xdd6f,4,0xd846,0xd834,0xddba,0xd834,0xdd65, +0xd834,0xdd6f,1,0x4e3d,1,0x4e38,1,0x4e41,2,0xd840,0xdd22,1,0x4f60,1,0x4fbb,1, +0x5002,1,0x507a,1,0x5099,1,0x50cf,1,0x349e,2,0xd841,0xde3a,1,0x5154,1,0x5164, +1,0x5177,2,0xd841,0xdd1c,1,0x34b9,1,0x5167,1,0x518d,2,0xd841,0xdd4b,1,0x5197, +1,0x51a4,1,0x4ecc,1,0x51ac,2,0xd864,0xdddf,1,0x51f5,1,0x5203,1,0x34df,1, +0x523b,1,0x5246,1,0x5272,1,0x5277,1,0x3515,1,0x5305,1,0x5306,1,0x5349,1, +0x535a,1,0x5373,1,0x537d,1,0x537f,2,0xd842,0xde2c,1,0x7070,1,0x53ca,1,0x53df, +2,0xd842,0xdf63,1,0x53eb,1,0x53f1,1,0x5406,1,0x549e,1,0x5438,1,0x5448,1, +0x5468,1,0x54a2,1,0x54f6,1,0x5510,1,0x5553,1,0x5563,1,0x5584,1,0x55ab,1, +0x55b3,1,0x55c2,1,0x5716,1,0x5717,1,0x5651,1,0x5674,1,0x58ee,1,0x57ce,1, +0x57f4,1,0x580d,1,0x578b,1,0x5832,1,0x5831,1,0x58ac,2,0xd845,0xdce4,1,0x58f2, +1,0x58f7,1,0x5906,1,0x591a,1,0x5922,1,0x5962,2,0xd845,0xdea8,2,0xd845,0xdeea, +1,0x59ec,1,0x5a1b,1,0x5a27,1,0x59d8,1,0x5a66,1,0x36ee,1,0x36fc,1,0x5b08, +1,0x5b3e,2,0xd846,0xddc8,1,0x5bc3,1,0x5bd8,1,0x5bf3,2,0xd846,0xdf18,1,0x5bff, +1,0x5c06,1,0x5f53,1,0x5c22,1,0x3781,1,0x5c60,1,0x5cc0,1,0x5c8d,2,0xd847, +0xdde4,1,0x5d43,2,0xd847,0xdde6,1,0x5d6e,1,0x5d6b,1,0x5d7c,1,0x5de1,1,0x5de2, +1,0x382f,1,0x5dfd,1,0x5e28,1,0x5e3d,1,0x5e69,1,0x3862,2,0xd848,0xdd83,1, +0x387c,1,0x5eb0,1,0x5eb3,1,0x5eb6,2,0xd868,0xdf92,1,0x5efe,2,0xd848,0xdf31,1, +0x8201,1,0x5f22,1,0x38c7,2,0xd84c,0xdeb8,2,0xd858,0xddda,1,0x5f62,1,0x5f6b,1, +0x38e3,1,0x5f9a,1,0x5fcd,1,0x5fd7,1,0x5ff9,1,0x6081,1,0x393a,1,0x391c,2, +0xd849,0xded4,1,0x60c7,1,0x6148,1,0x614c,1,0x617a,1,0x61b2,1,0x61a4,1,0x61af, +1,0x61de,1,0x6210,1,0x621b,1,0x625d,1,0x62b1,1,0x62d4,1,0x6350,2,0xd84a, +0xdf0c,1,0x633d,1,0x62fc,1,0x6368,1,0x6383,1,0x63e4,2,0xd84a,0xdff1,1,0x6422, +1,0x63c5,1,0x63a9,1,0x3a2e,1,0x6469,1,0x647e,1,0x649d,1,0x6477,1,0x3a6c, +1,0x656c,2,0xd84c,0xdc0a,1,0x65e3,1,0x66f8,1,0x6649,1,0x3b19,1,0x3b08,1, +0x3ae4,1,0x5192,1,0x5195,1,0x6700,1,0x669c,1,0x80ad,1,0x43d9,1,0x6721,1, +0x675e,1,0x6753,2,0xd84c,0xdfc3,1,0x3b49,1,0x67fa,1,0x6785,1,0x6852,2,0xd84d, +0xdc6d,1,0x688e,1,0x681f,1,0x6914,1,0x6942,1,0x69a3,1,0x69ea,1,0x6aa8,2, +0xd84d,0xdea3,1,0x6adb,1,0x3c18,1,0x6b21,2,0xd84e,0xdca7,1,0x6b54,1,0x3c4e,1, +0x6b72,1,0x6b9f,1,0x6bbb,2,0xd84e,0xde8d,2,0xd847,0xdd0b,2,0xd84e,0xdefa,1,0x6c4e, +2,0xd84f,0xdcbc,1,0x6cbf,1,0x6ccd,1,0x6c67,1,0x6d16,1,0x6d3e,1,0x6d69,1, +0x6d78,1,0x6d85,2,0xd84f,0xdd1e,1,0x6d34,1,0x6e2f,1,0x6e6e,1,0x3d33,1,0x6ec7, +2,0xd84f,0xded1,1,0x6df9,1,0x6f6e,2,0xd84f,0xdf5e,2,0xd84f,0xdf8e,1,0x6fc6,1, +0x7039,1,0x701b,1,0x3d96,1,0x704a,1,0x707d,1,0x7077,1,0x70ad,2,0xd841,0xdd25, +1,0x7145,2,0xd850,0xde63,1,0x719c,2,0xd850,0xdfab,1,0x7228,1,0x7250,2,0xd851, +0xde08,1,0x7280,1,0x7295,2,0xd851,0xdf35,2,0xd852,0xdc14,1,0x737a,1,0x738b,1, +0x3eac,1,0x73a5,1,0x3eb8,1,0x7447,1,0x745c,1,0x7485,1,0x74ca,1,0x3f1b,1, +0x7524,2,0xd853,0xdc36,1,0x753e,2,0xd853,0xdc92,2,0xd848,0xdd9f,1,0x7610,2,0xd853, +0xdfa1,2,0xd853,0xdfb8,2,0xd854,0xdc44,1,0x3ffc,1,0x4008,2,0xd854,0xdcf3,2,0xd854, +0xdcf2,2,0xd854,0xdd19,2,0xd854,0xdd33,1,0x771e,1,0x771f,1,0x778b,1,0x4046,1, +0x4096,2,0xd855,0xdc1d,1,0x784e,1,0x40e3,2,0xd855,0xde26,2,0xd855,0xde9a,2,0xd855, +0xdec5,1,0x79eb,1,0x412f,1,0x7a4a,1,0x7a4f,2,0xd856,0xdd7c,2,0xd856,0xdea7,1, +0x7aee,1,0x4202,2,0xd856,0xdfab,1,0x7bc6,1,0x7bc9,1,0x4227,2,0xd857,0xdc80,1, +0x7cd2,1,0x42a0,1,0x7ce8,1,0x7ce3,1,0x7d00,2,0xd857,0xdf86,1,0x7d63,1,0x4301, +1,0x7dc7,1,0x7e02,1,0x7e45,1,0x4334,2,0xd858,0xde28,2,0xd858,0xde47,1,0x4359, +2,0xd858,0xded9,1,0x7f7a,2,0xd858,0xdf3e,1,0x7f95,1,0x7ffa,2,0xd859,0xdcda,2, +0xd859,0xdd23,1,0x8060,2,0xd859,0xdda8,1,0x8070,2,0xd84c,0xdf5f,1,0x43d5,1,0x80b2, +1,0x8103,1,0x440b,1,0x813e,1,0x5ab5,2,0xd859,0xdfa7,2,0xd859,0xdfb5,2,0xd84c, +0xdf93,2,0xd84c,0xdf9c,1,0x8204,1,0x8f9e,1,0x446b,1,0x8291,1,0x828b,1,0x829d, +1,0x52b3,1,0x82b1,1,0x82b3,1,0x82bd,1,0x82e6,2,0xd85a,0xdf3c,1,0x831d,1, +0x8363,1,0x83ad,1,0x8323,1,0x83bd,1,0x83e7,1,0x8353,1,0x83ca,1,0x83cc,1, +0x83dc,2,0xd85b,0xdc36,2,0xd85b,0xdd6b,2,0xd85b,0xdcd5,1,0x452b,1,0x84f1,1,0x84f3, +1,0x8516,2,0xd85c,0xdfca,1,0x8564,2,0xd85b,0xdf2c,1,0x455d,1,0x4561,2,0xd85b, +0xdfb1,2,0xd85c,0xdcd2,1,0x456b,1,0x8650,1,0x8667,1,0x8669,1,0x86a9,1,0x8688, +1,0x870e,1,0x86e2,1,0x8728,1,0x876b,1,0x8786,1,0x45d7,1,0x87e1,1,0x8801, +1,0x45f9,1,0x8860,1,0x8863,2,0xd85d,0xde67,1,0x88d7,1,0x88de,1,0x4635,1, +0x88fa,1,0x34bb,2,0xd85e,0xdcae,2,0xd85e,0xdd66,1,0x46be,1,0x46c7,1,0x8aa0,1, +0x8c55,2,0xd85f,0xdca8,1,0x8cab,1,0x8cc1,1,0x8d1b,1,0x8d77,2,0xd85f,0xdf2f,2, +0xd842,0xdc04,1,0x8dcb,1,0x8dbc,1,0x8df0,2,0xd842,0xdcde,1,0x8ed4,2,0xd861,0xddd2, +2,0xd861,0xdded,1,0x9094,1,0x90f1,1,0x9111,2,0xd861,0xdf2e,1,0x911b,1,0x9238, +1,0x92d7,1,0x92d8,1,0x927c,1,0x93f9,1,0x9415,2,0xd862,0xdffa,1,0x958b,1, +0x4995,1,0x95b7,2,0xd863,0xdd77,1,0x49e6,1,0x96c3,1,0x5db2,1,0x9723,2,0xd864, +0xdd45,2,0xd864,0xde1a,1,0x4a6e,1,0x4a76,1,0x97e0,2,0xd865,0xdc0a,1,0x4ab2,2, +0xd865,0xdc96,1,0x9829,2,0xd865,0xddb6,1,0x98e2,1,0x4b33,1,0x9929,1,0x99a7,1, +0x99c2,1,0x99fe,1,0x4bce,2,0xd866,0xdf30,1,0x9c40,1,0x9cfd,1,0x4cce,1,0x4ced, +1,0x9d67,2,0xd868,0xdcce,1,0x4cf8,2,0xd868,0xdd05,2,0xd868,0xde0e,2,0xd868,0xde91, +1,0x9ebb,1,0x4d56,1,0x9ef9,1,0x9efe,1,0x9f05,1,0x9f0f,1,0x9f16,1,0x9f3b, +2,0xd869,0xde00,0x3ac,0xe642,0x3b1,0x301,0x3ad,0xe642,0x3b5,0x301,0x3ae,0xe642,0x3b7,0x301,0x3af, +0xe642,0x3b9,0x301,0x3cc,0xe642,0x3bf,0x301,0x3cd,0xe642,0x3c5,0x301,0x3ce,0xe642,0x3c9,0x301,0x386, +0xe642,0x391,0x301,0x388,0xe642,0x395,0x301,0x389,0xe642,0x397,0x301,0x390,1,0xe643,0x3b9,0x308, +0x301,0x38a,0xe642,0x399,0x301,0x3b0,1,0xe643,0x3c5,0x308,0x301,0x38e,0xe642,0x3a5,0x301,0x385, +0xe642,0xa8,0x301,0x38c,0xe642,0x39f,0x301,0x38f,0xe642,0x3a9,0x301,0xc5,0xe642,0x41,0x30a,0xe6e6, +0xe681,0x300,0xe6e6,0xe681,0x301,0xe6e6,0xe681,0x313,0xe6e6,0xe682,0x308,0x301,0x8100,0x8282,0xf71,0xf72, +0x8100,0x8482,0xf71,0xf74,0x8100,0x8282,0xf71,0xf80,4,0xd804,0xdfc2,0xd804,0xdfc2,4,0xd804,0xdfc2, +0xd804,0xdfb8,4,0xd804,0xdfc2,0xd804,0xdfc9,4,0xd818,0xdd1e,0xd818,0xdd1f,4,0xd818,0xdd29,0xd818, +0xdd1f,4,0xd818,0xdd1e,0xd818,0xdd20,0xd818,0xdd21,0xd818,0xdd1f,4,0x46,0xd818,0xdd1e,0xd818,0xdd1e, +0xd818,0xdd1f,0xd818,0xdd22,0xd818,0xdd1f,4,0x46,0xd818,0xdd1e,0xd818,0xdd29,0xd818,0xdd1f,0xd818,0xdd21, +0xd818,0xdd20,4,0x46,0xd818,0xdd1e,0xd818,0xdd1e,0xd818,0xdd20,4,0xd81b,0xdd67,0xd81b,0xdd67,4, +0xd818,0xdd1e,0xd818,0xdd1e,0x34b1,0x47c2,0xc24c,0xb4b1,0x4802,0xc250,4,0xd818,0xdd1e,0xd818,0xdd29,0xb4b1, +0x47c2,0xc24e,0x3489,0xee02,0x278e,0x3489,0xf082,0x278a,0xb489,0xf242,0x2790,0x34b1,0x4782,0xc243,0x34b1,0x47c2, +0xc246,0x34b1,0x4802,0xc24a,0xb4b1,0x4a42,0xc245,0xb4b1,0x47c2,0xc248,0xb4b7,0x59c2,0xdad0,0 }; static const uint8_t norm2_nfc_data_smallFCD[256]={ diff --git a/deps/icu-small/source/common/norm2allmodes.h b/deps/icu-small/source/common/norm2allmodes.h index a2cfc89c1a8150..4b30d787e87c59 100644 --- a/deps/icu-small/source/common/norm2allmodes.h +++ b/deps/icu-small/source/common/norm2allmodes.h @@ -174,7 +174,7 @@ class Normalizer2WithImpl : public Normalizer2 { errorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } - return (int32_t)(spanQuickCheckYes(sArray, sArray+s.length(), errorCode)-sArray); + return static_cast<int32_t>(spanQuickCheckYes(sArray, sArray + s.length(), errorCode) - sArray); } virtual const char16_t * spanQuickCheckYes(const char16_t *src, const char16_t *limit, UErrorCode &errorCode) const = 0; diff --git a/deps/icu-small/source/common/normalizer2.cpp b/deps/icu-small/source/common/normalizer2.cpp index 6856736b888ace..dad3df4edee2df 100644 --- a/deps/icu-small/source/common/normalizer2.cpp +++ b/deps/icu-small/source/common/normalizer2.cpp @@ -380,8 +380,8 @@ normalizeSecondAndAppend(const UNormalizer2 *norm2, firstLength=firstString.length(); // In case it was -1. // secondLength==0: Nothing to do, and n2wi->normalizeAndAppend(nullptr, nullptr, buffer, ...) would crash. if(secondLength!=0) { - const Normalizer2 *n2=(const Normalizer2 *)norm2; - const Normalizer2WithImpl *n2wi=dynamic_cast<const Normalizer2WithImpl *>(n2); + const Normalizer2* n2 = reinterpret_cast<const Normalizer2*>(norm2); + const Normalizer2WithImpl* n2wi = dynamic_cast<const Normalizer2WithImpl*>(n2); if(n2wi!=nullptr) { // Avoid duplicate argument checking and support NUL-terminated src. UnicodeString safeMiddle; diff --git a/deps/icu-small/source/common/normalizer2impl.cpp b/deps/icu-small/source/common/normalizer2impl.cpp index 9c715ac3efaafc..758a84c110697d 100644 --- a/deps/icu-small/source/common/normalizer2impl.cpp +++ b/deps/icu-small/source/common/normalizer2impl.cpp @@ -53,9 +53,9 @@ namespace { */ inline uint8_t leadByteForCP(UChar32 c) { if (c <= 0x7f) { - return (uint8_t)c; + return static_cast<uint8_t>(c); } else if (c <= 0x7ff) { - return (uint8_t)(0xc0+(c>>6)); + return static_cast<uint8_t>(0xc0 + (c >> 6)); } else { // Should not occur because ccc(U+0300)!=0. return 0xe0; @@ -82,7 +82,7 @@ UChar32 codePointFromValidUTF8(const uint8_t *cpStart, const uint8_t *cpLimit) { return ((c&0x1f)<<6) | (cpStart[1]&0x3f); case 3: // no need for (c&0xf) because the upper bits are truncated after <<12 in the cast to (char16_t) - return (char16_t)((c<<12) | ((cpStart[1]&0x3f)<<6) | (cpStart[2]&0x3f)); + return static_cast<char16_t>((c << 12) | ((cpStart[1] & 0x3f) << 6) | (cpStart[2] & 0x3f)); case 4: return ((c&7)<<18) | ((cpStart[1]&0x3f)<<12) | ((cpStart[2]&0x3f)<<6) | (cpStart[3]&0x3f); default: @@ -100,8 +100,8 @@ UChar32 previousHangulOrJamo(const uint8_t *start, const uint8_t *p) { uint8_t l = *p; uint8_t t1, t2; if (0xe1 <= l && l <= 0xed && - (t1 = (uint8_t)(p[1] - 0x80)) <= 0x3f && - (t2 = (uint8_t)(p[2] - 0x80)) <= 0x3f && + (t1 = static_cast<uint8_t>(p[1] - 0x80)) <= 0x3f && + (t2 = static_cast<uint8_t>(p[2] - 0x80)) <= 0x3f && (l < 0xed || t1 <= 0x1f)) { return ((l & 0xf) << 12) | (t1 << 6) | t2; } @@ -125,7 +125,7 @@ int32_t getJamoTMinusBase(const uint8_t *src, const uint8_t *limit) { } } else if (src[1] == 0x87) { uint8_t t = src[2]; - if ((int8_t)t <= (int8_t)0x82u) { + if (static_cast<int8_t>(t) <= static_cast<int8_t>(0x82u)) { return t - (0xa7 - 0x40); } } @@ -138,10 +138,10 @@ appendCodePointDelta(const uint8_t *cpStart, const uint8_t *cpLimit, int32_t del ByteSink &sink, Edits *edits) { char buffer[U8_MAX_LENGTH]; int32_t length; - int32_t cpLength = (int32_t)(cpLimit - cpStart); + int32_t cpLength = static_cast<int32_t>(cpLimit - cpStart); if (cpLength == 1) { // The builder makes ASCII map to ASCII. - buffer[0] = (uint8_t)(*cpStart + delta); + buffer[0] = static_cast<uint8_t>(*cpStart + delta); length = 1; } else { int32_t trail = *(cpLimit-1) + delta; @@ -150,7 +150,7 @@ appendCodePointDelta(const uint8_t *cpStart, const uint8_t *cpLimit, int32_t del --cpLimit; length = 0; do { buffer[length++] = *cpStart++; } while (cpStart < cpLimit); - buffer[length++] = (uint8_t)trail; + buffer[length++] = static_cast<uint8_t>(trail); } else { // Decode the code point, add the delta, re-encode. UChar32 c = codePointFromValidUTF8(cpStart, cpLimit) + delta; @@ -205,16 +205,16 @@ UBool ReorderingBuffer::init(int32_t destCapacity, UErrorCode &errorCode) { } UBool ReorderingBuffer::equals(const char16_t *otherStart, const char16_t *otherLimit) const { - int32_t length=(int32_t)(limit-start); + int32_t length = static_cast<int32_t>(limit - start); return - length==(int32_t)(otherLimit-otherStart) && + length == static_cast<int32_t>(otherLimit - otherStart) && 0==u_memcmp(start, otherStart, length); } UBool ReorderingBuffer::equals(const uint8_t *otherStart, const uint8_t *otherLimit) const { U_ASSERT((otherLimit - otherStart) <= INT32_MAX); // ensured by caller - int32_t length = (int32_t)(limit - start); - int32_t otherLength = (int32_t)(otherLimit - otherStart); + int32_t length = static_cast<int32_t>(limit - start); + int32_t otherLength = static_cast<int32_t>(otherLimit - otherStart); // For equal strings, UTF-8 is at least as long as UTF-16, and at most three times as long. if (otherLength < length || (otherLength / 3) > length) { return false; @@ -284,7 +284,7 @@ UBool ReorderingBuffer::append(const char16_t *s, int32_t length, UBool isNFD, U16_NEXT(s, i, length, c); if(i<length) { if (isNFD) { - leadCC = Normalizer2Impl::getCCFromYesOrMaybe(impl.getRawNorm16(c)); + leadCC = Normalizer2Impl::getCCFromYesOrMaybeYes(impl.getRawNorm16(c)); } else { leadCC = impl.getCC(impl.getNorm16(c)); } @@ -304,7 +304,7 @@ UBool ReorderingBuffer::appendZeroCC(UChar32 c, UErrorCode &errorCode) { } remainingCapacity-=cpLength; if(cpLength==1) { - *limit++=(char16_t)c; + *limit++ = static_cast<char16_t>(c); } else { limit[0]=U16_LEAD(c); limit[1]=U16_TRAIL(c); @@ -319,7 +319,7 @@ UBool ReorderingBuffer::appendZeroCC(const char16_t *s, const char16_t *sLimit, if(s==sLimit) { return true; } - int32_t length=(int32_t)(sLimit-s); + int32_t length = static_cast<int32_t>(sLimit - s); if(remainingCapacity<length && !resize(length, errorCode)) { return false; } @@ -350,8 +350,8 @@ void ReorderingBuffer::removeSuffix(int32_t suffixLength) { } UBool ReorderingBuffer::resize(int32_t appendLength, UErrorCode &errorCode) { - int32_t reorderStartIndex=(int32_t)(reorderStart-start); - int32_t length=(int32_t)(limit-start); + int32_t reorderStartIndex = static_cast<int32_t>(reorderStart - start); + int32_t length = static_cast<int32_t>(limit - start); str.releaseBuffer(length); int32_t newCapacity=length+appendLength; int32_t doubleCapacity=2*str.getCapacity(); @@ -392,7 +392,7 @@ uint8_t ReorderingBuffer::previousCC() { --codePointStart; c=U16_GET_SUPPLEMENTARY(c2, c); } - return impl.getCCFromYesOrMaybeCP(c); + return impl.getCCFromYesOrMaybeYesCP(c); } // Inserts c somewhere before the last character. @@ -440,15 +440,14 @@ Normalizer2Impl::init(const int32_t *inIndexes, const UCPTrie *inTrie, minNoNoCompNoMaybeCC = static_cast<uint16_t>(inIndexes[IX_MIN_NO_NO_COMP_NO_MAYBE_CC]); minNoNoEmpty = static_cast<uint16_t>(inIndexes[IX_MIN_NO_NO_EMPTY]); limitNoNo = static_cast<uint16_t>(inIndexes[IX_LIMIT_NO_NO]); + minMaybeNo = static_cast<uint16_t>(inIndexes[IX_MIN_MAYBE_NO]); + minMaybeNoCombinesFwd = static_cast<uint16_t>(inIndexes[IX_MIN_MAYBE_NO_COMBINES_FWD]); minMaybeYes = static_cast<uint16_t>(inIndexes[IX_MIN_MAYBE_YES]); - U_ASSERT((minMaybeYes & 7) == 0); // 8-aligned for noNoDelta bit fields - centerNoNoDelta = (minMaybeYes >> DELTA_SHIFT) - MAX_DELTA - 1; + U_ASSERT((minMaybeNo & 7) == 0); // 8-aligned for noNoDelta bit fields + centerNoNoDelta = (minMaybeNo >> DELTA_SHIFT) - MAX_DELTA - 1; normTrie=inTrie; - - maybeYesCompositions=inExtraData; - extraData=maybeYesCompositions+((MIN_NORMAL_MAYBE_YES-minMaybeYes)>>OFFSET_SHIFT); - + extraData=inExtraData; smallFCD=inSmallFCD; } @@ -486,7 +485,7 @@ Normalizer2Impl::addPropertyStarts(const USetAdder *sa, UErrorCode & /*errorCode while ((end = ucptrie_getRange(normTrie, start, UCPMAP_RANGE_FIXED_LEAD_SURROGATES, INERT, nullptr, nullptr, &value)) >= 0) { sa->add(sa->set, start); - if (start != end && isAlgorithmicNoNo((uint16_t)value) && + if (start != end && isAlgorithmicNoNo(static_cast<uint16_t>(value)) && (value & Normalizer2Impl::DELTA_TCCC_MASK) > Normalizer2Impl::DELTA_TCCC_1) { // Range of code points with same-norm16-value algorithmic decompositions. // They might have different non-zero FCD16 values. @@ -570,7 +569,7 @@ Normalizer2Impl::decompose(const char16_t *src, const char16_t *limit, int32_t destLengthEstimate, UErrorCode &errorCode) const { if(destLengthEstimate<0 && limit!=nullptr) { - destLengthEstimate=(int32_t)(limit-src); + destLengthEstimate = static_cast<int32_t>(limit - src); } dest.remove(); ReorderingBuffer buffer(*this, dest); @@ -650,7 +649,7 @@ Normalizer2Impl::decompose(const char16_t *src, const char16_t *limit, } } else { if(isDecompYes(norm16)) { - uint8_t cc=getCCFromYesOrMaybe(norm16); + uint8_t cc=getCCFromYesOrMaybeYes(norm16); if(prevCC<=cc || cc==0) { prevCC=cc; if(cc<=1) { @@ -702,12 +701,13 @@ UBool Normalizer2Impl::decompose(UChar32 c, uint16_t norm16, UErrorCode &errorCode) const { // get the decomposition and the lead and trail cc's if (norm16 >= limitNoNo) { - if (isMaybeOrNonZeroCC(norm16)) { - return buffer.append(c, getCCFromYesOrMaybe(norm16), errorCode); + if (isMaybeYesOrNonZeroCC(norm16)) { + return buffer.append(c, getCCFromYesOrMaybeYes(norm16), errorCode); + } else if (norm16 < minMaybeNo) { + // Maps to an isCompYesAndZeroCC. + c=mapAlgorithmic(c, norm16); + norm16=getRawNorm16(c); } - // Maps to an isCompYesAndZeroCC. - c=mapAlgorithmic(c, norm16); - norm16=getRawNorm16(c); } if (norm16 < minYesNo) { // c does not decompose @@ -718,17 +718,17 @@ UBool Normalizer2Impl::decompose(UChar32 c, uint16_t norm16, return buffer.appendZeroCC(jamos, jamos+Hangul::decompose(c, jamos), errorCode); } // c decomposes, get everything from the variable-length extra data - const uint16_t *mapping=getMapping(norm16); + const uint16_t *mapping=getData(norm16); uint16_t firstUnit=*mapping; int32_t length=firstUnit&MAPPING_LENGTH_MASK; uint8_t leadCC, trailCC; - trailCC=(uint8_t)(firstUnit>>8); + trailCC = static_cast<uint8_t>(firstUnit >> 8); if(firstUnit&MAPPING_HAS_CCC_LCCC_WORD) { - leadCC=(uint8_t)(*(mapping-1)>>8); + leadCC = static_cast<uint8_t>(*(mapping - 1) >> 8); } else { leadCC=0; } - return buffer.append((const char16_t *)mapping+1, length, true, leadCC, trailCC, errorCode); + return buffer.append(reinterpret_cast<const char16_t*>(mapping) + 1, length, true, leadCC, trailCC, errorCode); } // Dual functionality: @@ -787,9 +787,9 @@ Normalizer2Impl::decomposeUTF8(uint32_t options, } // Medium-fast path: Quick check. - if (isMaybeOrNonZeroCC(norm16)) { + if (isMaybeYesOrNonZeroCC(norm16)) { // Does not decompose. - uint8_t cc = getCCFromYesOrMaybe(norm16); + uint8_t cc = getCCFromYesOrMaybeYes(norm16); if (prevCC <= cc || cc == 0) { prevCC = cc; if (cc <= 1) { @@ -836,7 +836,7 @@ Normalizer2Impl::decomposeUTF8(uint32_t options, } // We already know there was a change if the original character decomposed; // otherwise compare. - if (isMaybeOrNonZeroCC(norm16) && buffer.equals(prevBoundary, src)) { + if (isMaybeYesOrNonZeroCC(norm16) && buffer.equals(prevBoundary, src)) { if (!ByteSinkUtil::appendUnchanged(prevBoundary, src, *sink, options, edits, errorCode)) { break; @@ -867,9 +867,9 @@ Normalizer2Impl::decomposeShort(const uint8_t *src, const uint8_t *limit, // Get the decomposition and the lead and trail cc's. UChar32 c = U_SENTINEL; if (norm16 >= limitNoNo) { - if (isMaybeOrNonZeroCC(norm16)) { + if (isMaybeYesOrNonZeroCC(norm16)) { // No comp boundaries around this character. - uint8_t cc = getCCFromYesOrMaybe(norm16); + uint8_t cc = getCCFromYesOrMaybeYes(norm16); if (cc == 0 && stopAt == STOP_AT_DECOMP_BOUNDARY) { return prevSrc; } @@ -881,14 +881,15 @@ Normalizer2Impl::decomposeShort(const uint8_t *src, const uint8_t *limit, return src; } continue; + } else if (norm16 < minMaybeNo) { + // Maps to an isCompYesAndZeroCC. + if (stopAt != STOP_AT_LIMIT) { + return prevSrc; + } + c = codePointFromValidUTF8(prevSrc, src); + c = mapAlgorithmic(c, norm16); + norm16 = getRawNorm16(c); } - // Maps to an isCompYesAndZeroCC. - if (stopAt != STOP_AT_LIMIT) { - return prevSrc; - } - c = codePointFromValidUTF8(prevSrc, src); - c = mapAlgorithmic(c, norm16); - norm16 = getRawNorm16(c); } else if (stopAt != STOP_AT_LIMIT && norm16 < minNoNoCompNoMaybeCC) { return prevSrc; } @@ -918,20 +919,20 @@ Normalizer2Impl::decomposeShort(const uint8_t *src, const uint8_t *limit, } } else { // The character decomposes, get everything from the variable-length extra data. - const uint16_t *mapping = getMapping(norm16); + const uint16_t *mapping = getData(norm16); uint16_t firstUnit = *mapping; int32_t length = firstUnit & MAPPING_LENGTH_MASK; - uint8_t trailCC = (uint8_t)(firstUnit >> 8); + uint8_t trailCC = static_cast<uint8_t>(firstUnit >> 8); uint8_t leadCC; if (firstUnit & MAPPING_HAS_CCC_LCCC_WORD) { - leadCC = (uint8_t)(*(mapping-1) >> 8); + leadCC = static_cast<uint8_t>(*(mapping - 1) >> 8); } else { leadCC = 0; } if (leadCC == 0 && stopAt == STOP_AT_DECOMP_BOUNDARY) { return prevSrc; } - if (!buffer.append((const char16_t *)mapping+1, length, true, leadCC, trailCC, errorCode)) { + if (!buffer.append(reinterpret_cast<const char16_t*>(mapping) + 1, length, true, leadCC, trailCC, errorCode)) { return nullptr; } } @@ -946,7 +947,7 @@ Normalizer2Impl::decomposeShort(const uint8_t *src, const uint8_t *limit, const char16_t * Normalizer2Impl::getDecomposition(UChar32 c, char16_t buffer[4], int32_t &length) const { uint16_t norm16; - if(c<minDecompNoCP || isMaybeOrNonZeroCC(norm16=getNorm16(c))) { + if(c<minDecompNoCP || isMaybeYesOrNonZeroCC(norm16=getNorm16(c))) { // c does not decompose return nullptr; } @@ -968,9 +969,9 @@ Normalizer2Impl::getDecomposition(UChar32 c, char16_t buffer[4], int32_t &length return buffer; } // c decomposes, get everything from the variable-length extra data - const uint16_t *mapping=getMapping(norm16); + const uint16_t *mapping=getData(norm16); length=*mapping&MAPPING_LENGTH_MASK; - return (const char16_t *)mapping+1; + return reinterpret_cast<const char16_t*>(mapping) + 1; } // The capacity of the buffer must be 30=MAPPING_LENGTH_MASK-1 @@ -995,7 +996,7 @@ Normalizer2Impl::getRawDecomposition(UChar32 c, char16_t buffer[30], int32_t &le return buffer; } // c decomposes, get everything from the variable-length extra data - const uint16_t *mapping=getMapping(norm16); + const uint16_t *mapping=getData(norm16); uint16_t firstUnit=*mapping; int32_t mLength=firstUnit&MAPPING_LENGTH_MASK; // length of normal mapping if(firstUnit&MAPPING_HAS_RAW_MAPPING) { @@ -1005,17 +1006,17 @@ Normalizer2Impl::getRawDecomposition(UChar32 c, char16_t buffer[30], int32_t &le uint16_t rm0=*rawMapping; if(rm0<=MAPPING_LENGTH_MASK) { length=rm0; - return (const char16_t *)rawMapping-rm0; + return reinterpret_cast<const char16_t*>(rawMapping) - rm0; } else { // Copy the normal mapping and replace its first two code units with rm0. - buffer[0]=(char16_t)rm0; - u_memcpy(buffer+1, (const char16_t *)mapping+1+2, mLength-2); + buffer[0] = static_cast<char16_t>(rm0); + u_memcpy(buffer + 1, reinterpret_cast<const char16_t*>(mapping) + 1 + 2, mLength - 2); length=mLength-1; return buffer; } } else { length=mLength; - return (const char16_t *)mapping+1; + return reinterpret_cast<const char16_t*>(mapping) + 1; } } @@ -1052,7 +1053,7 @@ void Normalizer2Impl::decomposeAndAppend(const char16_t *src, const char16_t *li limit=u_strchr(p, 0); } - if (buffer.append(src, (int32_t)(p - src), false, firstCC, prevCC, errorCode)) { + if (buffer.append(src, static_cast<int32_t>(p - src), false, firstCC, prevCC, errorCode)) { buffer.appendZeroCC(p, limit, errorCode); } } @@ -1070,7 +1071,7 @@ UBool Normalizer2Impl::norm16HasDecompBoundaryBefore(uint16_t norm16) const { return norm16 <= MIN_NORMAL_MAYBE_YES || norm16 == JAMO_VT; } // c decomposes, get everything from the variable-length extra data - const uint16_t *mapping=getMapping(norm16); + const uint16_t *mapping=getDataForYesOrNo(norm16); uint16_t firstUnit=*mapping; // true if leadCC==0 (hasFCDBoundaryBefore()) return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (*(mapping-1)&0xff00)==0; @@ -1091,14 +1092,15 @@ UBool Normalizer2Impl::norm16HasDecompBoundaryAfter(uint16_t norm16) const { return true; } if (norm16 >= limitNoNo) { - if (isMaybeOrNonZeroCC(norm16)) { + if (isMaybeYesOrNonZeroCC(norm16)) { return norm16 <= MIN_NORMAL_MAYBE_YES || norm16 == JAMO_VT; + } else if (norm16 < minMaybeNo) { + // Maps to an isCompYesAndZeroCC. + return (norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1; } - // Maps to an isCompYesAndZeroCC. - return (norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1; } // c decomposes, get everything from the variable-length extra data - const uint16_t *mapping=getMapping(norm16); + const uint16_t *mapping=getData(norm16); uint16_t firstUnit=*mapping; // decomp after-boundary: same as hasFCDBoundaryAfter(), // fcd16<=1 || trailCC==0 @@ -1140,13 +1142,13 @@ int32_t Normalizer2Impl::combine(const uint16_t *list, UChar32 trail) { if(trail<COMP_1_TRAIL_LIMIT) { // trail character is 0..33FF // result entry may have 2 or 3 units - key1=(uint16_t)(trail<<1); + key1 = static_cast<uint16_t>(trail << 1); while(key1>(firstUnit=*list)) { list+=2+(firstUnit&COMP_1_TRIPLE); } if(key1==(firstUnit&COMP_1_TRAIL_MASK)) { if(firstUnit&COMP_1_TRIPLE) { - return ((int32_t)list[1]<<16)|list[2]; + return (static_cast<int32_t>(list[1]) << 16) | list[2]; } else { return list[1]; } @@ -1154,10 +1156,10 @@ int32_t Normalizer2Impl::combine(const uint16_t *list, UChar32 trail) { } else { // trail character is 3400..10FFFF // result entry has 3 units - key1=(uint16_t)(COMP_1_TRAIL_LIMIT+ + key1 = static_cast<uint16_t>(COMP_1_TRAIL_LIMIT + (((trail>>COMP_1_TRAIL_SHIFT))& ~COMP_1_TRIPLE)); - uint16_t key2=(uint16_t)(trail<<COMP_2_TRAIL_SHIFT); + uint16_t key2 = static_cast<uint16_t>(trail << COMP_2_TRAIL_SHIFT); uint16_t secondUnit; for(;;) { if(key1>(firstUnit=*list)) { @@ -1170,7 +1172,7 @@ int32_t Normalizer2Impl::combine(const uint16_t *list, UChar32 trail) { list+=3; } } else if(key2==(secondUnit&COMP_2_TRAIL_MASK)) { - return ((int32_t)(secondUnit&~COMP_2_TRAIL_MASK)<<16)|list[2]; + return (static_cast<int32_t>(secondUnit & ~COMP_2_TRAIL_MASK) << 16) | list[2]; } else { break; } @@ -1195,7 +1197,7 @@ void Normalizer2Impl::addComposites(const uint16_t *list, UnicodeSet &set) const compositeAndFwd=list[1]; list+=2; } else { - compositeAndFwd=(((int32_t)list[1]&~COMP_2_TRAIL_MASK)<<16)|list[2]; + compositeAndFwd = ((static_cast<int32_t>(list[1]) & ~COMP_2_TRAIL_MASK) << 16) | list[2]; list+=3; } UChar32 composite=compositeAndFwd>>1; @@ -1240,7 +1242,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart for(;;) { UCPTRIE_FAST_U16_NEXT(normTrie, UCPTRIE_16, p, limit, c, norm16); - cc=getCCFromYesOrMaybe(norm16); + cc=getCCFromYesOrMaybeYes(norm16); if( // this character combines backward and isMaybe(norm16) && // we have seen a starter that combines forward and @@ -1252,15 +1254,15 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart // c is a Jamo V/T, see if we can compose it with the previous character. if(c<Hangul::JAMO_T_BASE) { // c is a Jamo Vowel, compose with previous Jamo L and following Jamo T. - char16_t prev=(char16_t)(*starter-Hangul::JAMO_L_BASE); + char16_t prev = static_cast<char16_t>(*starter - Hangul::JAMO_L_BASE); if(prev<Hangul::JAMO_L_COUNT) { pRemove=p-1; - char16_t syllable=(char16_t) - (Hangul::HANGUL_BASE+ + char16_t syllable = static_cast<char16_t>( + Hangul::HANGUL_BASE + (prev*Hangul::JAMO_V_COUNT+(c-Hangul::JAMO_V_BASE))* Hangul::JAMO_T_COUNT); char16_t t; - if(p!=limit && (t=(char16_t)(*p-Hangul::JAMO_T_BASE))<Hangul::JAMO_T_COUNT) { + if (p != limit && (t = static_cast<char16_t>(*p - Hangul::JAMO_T_BASE)) < Hangul::JAMO_T_COUNT) { ++p; syllable+=t; // The next character was a Jamo T. } @@ -1298,7 +1300,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart starter[0]=U16_LEAD(composite); starter[1]=U16_TRAIL(composite); } else { - *starter=(char16_t)composite; + *starter = static_cast<char16_t>(composite); // The composite is shorter than the starter, // move the intermediate characters forward one. starterIsSupplementary=false; @@ -1323,7 +1325,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart *--starter=U16_LEAD(composite); // undo the temporary increment } else { // both are on the BMP - *starter=(char16_t)composite; + *starter = static_cast<char16_t>(composite); } /* remove the combining mark by moving the following text over it */ @@ -1414,17 +1416,22 @@ Normalizer2Impl::composePair(UChar32 a, UChar32 b) const { } } else { // 'a' has a compositions list in extraData - list=getMapping(norm16); + list=getDataForYesOrNo(norm16); if(norm16>minYesNo) { // composite 'a' has both mapping & compositions list list+= // mapping pointer 1+ // +1 to skip the first unit with the mapping length (*list&MAPPING_LENGTH_MASK); // + mapping length } } - } else if(norm16<minMaybeYes || MIN_NORMAL_MAYBE_YES<=norm16) { + } else if(norm16<minMaybeNoCombinesFwd || MIN_NORMAL_MAYBE_YES<=norm16) { return U_SENTINEL; } else { - list=getCompositionsListForMaybe(norm16); + list=getDataForMaybe(norm16); + if(norm16<minMaybeYes) { // composite 'a' has both mapping & compositions list + list+= // mapping pointer + 1+ // +1 to skip the first unit with the mapping length + (*list&MAPPING_LENGTH_MASK); // + mapping length + } } if(b<0 || 0x10ffff<b) { // combine(list, b) requires a valid code point b return U_SENTINEL; @@ -1502,12 +1509,12 @@ Normalizer2Impl::compose(const char16_t *src, const char16_t *limit, } // isCompYesAndZeroCC(norm16) is false, that is, norm16>=minNoNo. // The current character is either a "noNo" (has a mapping) - // or a "maybeYes" (combines backward) + // or a "maybeYes" / "maybeNo" (combines backward) // or a "yesYes" with ccc!=0. // It is not a Hangul syllable or Jamo L because those have "yes" properties. // Medium-fast path: Handle cases that do not require full decomposition and recomposition. - if (!isMaybeOrNonZeroCC(norm16)) { // minNoNo <= norm16 < minMaybeYes + if (norm16 < minMaybeNo) { // minNoNo <= norm16 < minMaybeNo if (!doCompose) { return false; } @@ -1534,7 +1541,7 @@ Normalizer2Impl::compose(const char16_t *src, const char16_t *limit, if (prevBoundary != prevSrc && !buffer.appendZeroCC(prevBoundary, prevSrc, errorCode)) { break; } - const char16_t *mapping = reinterpret_cast<const char16_t *>(getMapping(norm16)); + const char16_t *mapping = reinterpret_cast<const char16_t *>(getDataForYesOrNo(norm16)); int32_t length = *mapping++ & MAPPING_LENGTH_MASK; if(!buffer.appendZeroCC(mapping, mapping + length, errorCode)) { break; @@ -1562,14 +1569,14 @@ Normalizer2Impl::compose(const char16_t *src, const char16_t *limit, if(c<Hangul::JAMO_T_BASE) { // The current character is a Jamo Vowel, // compose with previous Jamo L and following Jamo T. - char16_t l = (char16_t)(prev-Hangul::JAMO_L_BASE); + char16_t l = static_cast<char16_t>(prev - Hangul::JAMO_L_BASE); if(l<Hangul::JAMO_L_COUNT) { if (!doCompose) { return false; } int32_t t; if (src != limit && - 0 < (t = ((int32_t)*src - Hangul::JAMO_T_BASE)) && + 0 < (t = (static_cast<int32_t>(*src) - Hangul::JAMO_T_BASE)) && t < Hangul::JAMO_T_COUNT) { // The next character is a Jamo T. ++src; @@ -1587,7 +1594,7 @@ Normalizer2Impl::compose(const char16_t *src, const char16_t *limit, if (prevBoundary != prevSrc && !buffer.appendZeroCC(prevBoundary, prevSrc, errorCode)) { break; } - if(!buffer.appendBMP((char16_t)syllable, 0, errorCode)) { + if (!buffer.appendBMP(static_cast<char16_t>(syllable), 0, errorCode)) { break; } prevBoundary = src; @@ -1612,7 +1619,7 @@ Normalizer2Impl::compose(const char16_t *src, const char16_t *limit, if (prevBoundary != prevSrc && !buffer.appendZeroCC(prevBoundary, prevSrc, errorCode)) { break; } - if(!buffer.appendBMP((char16_t)syllable, 0, errorCode)) { + if (!buffer.appendBMP(static_cast<char16_t>(syllable), 0, errorCode)) { break; } prevBoundary = src; @@ -1763,7 +1770,7 @@ Normalizer2Impl::composeQuickCheck(const char16_t *src, const char16_t *limit, } // isCompYesAndZeroCC(norm16) is false, that is, norm16>=minNoNo. // The current character is either a "noNo" (has a mapping) - // or a "maybeYes" (combines backward) + // or a "maybeYes" / "maybeNo" (combines backward) // or a "yesYes" with ccc!=0. // It is not a Hangul syllable or Jamo L because those have "yes" properties. @@ -1784,8 +1791,9 @@ Normalizer2Impl::composeQuickCheck(const char16_t *src, const char16_t *limit, } } - if(isMaybeOrNonZeroCC(norm16)) { - uint8_t cc=getCCFromYesOrMaybe(norm16); + if (norm16 >= minMaybeNo) { + uint16_t fcd16 = getFCD16FromMaybeOrNonZeroCC(norm16); + uint8_t cc = fcd16 >> 8; if (onlyContiguous /* FCC */ && cc != 0 && getTrailCCFromCompYesAndZeroCC(prevNorm16) > cc) { // The [prevBoundary..prevSrc[ character @@ -1806,11 +1814,12 @@ Normalizer2Impl::composeQuickCheck(const char16_t *src, const char16_t *limit, if (src == limit) { return src; } - uint8_t prevCC = cc; + uint8_t prevCC = fcd16; nextSrc = src; UCPTRIE_FAST_U16_NEXT(normTrie, UCPTRIE_16, nextSrc, limit, c, norm16); - if (isMaybeOrNonZeroCC(norm16)) { - cc = getCCFromYesOrMaybe(norm16); + if (norm16 >= minMaybeNo) { + fcd16 = getFCD16FromMaybeOrNonZeroCC(norm16); + cc = fcd16 >> 8; if (!(prevCC <= cc || cc == 0)) { break; } @@ -1845,11 +1854,11 @@ void Normalizer2Impl::composeAndAppend(const char16_t *src, const char16_t *limi if(src!=firstStarterInSrc) { const char16_t *lastStarterInDest=findPreviousCompBoundary(buffer.getStart(), buffer.getLimit(), onlyContiguous); - int32_t destSuffixLength=(int32_t)(buffer.getLimit()-lastStarterInDest); + int32_t destSuffixLength = static_cast<int32_t>(buffer.getLimit() - lastStarterInDest); UnicodeString middle(lastStarterInDest, destSuffixLength); buffer.removeSuffix(destSuffixLength); safeMiddle=middle; - middle.append(src, (int32_t)(firstStarterInSrc-src)); + middle.append(src, static_cast<int32_t>(firstStarterInSrc - src)); const char16_t *middleStart=middle.getBuffer(); compose(middleStart, middleStart+middle.length(), onlyContiguous, true, buffer, errorCode); @@ -1903,12 +1912,12 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, } // isCompYesAndZeroCC(norm16) is false, that is, norm16>=minNoNo. // The current character is either a "noNo" (has a mapping) - // or a "maybeYes" (combines backward) + // or a "maybeYes" / "maybeNo" (combines backward) // or a "yesYes" with ccc!=0. // It is not a Hangul syllable or Jamo L because those have "yes" properties. // Medium-fast path: Handle cases that do not require full decomposition and recomposition. - if (!isMaybeOrNonZeroCC(norm16)) { // minNoNo <= norm16 < minMaybeYes + if (norm16 < minMaybeNo) { // minNoNo <= norm16 < minMaybeNo if (sink == nullptr) { return false; } @@ -1937,9 +1946,9 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, *sink, options, edits, errorCode)) { break; } - const uint16_t *mapping = getMapping(norm16); + const uint16_t *mapping = getDataForYesOrNo(norm16); int32_t length = *mapping++ & MAPPING_LENGTH_MASK; - if (!ByteSinkUtil::appendChange(prevSrc, src, (const char16_t *)mapping, length, + if (!ByteSinkUtil::appendChange(prevSrc, src, reinterpret_cast<const char16_t*>(mapping), length, *sink, edits, errorCode)) { break; } @@ -1958,7 +1967,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, break; } if (edits != nullptr) { - edits->addReplace((int32_t)(src - prevSrc), 0); + edits->addReplace(static_cast<int32_t>(src - prevSrc), 0); } prevBoundary = src; continue; @@ -1976,7 +1985,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, // The current character is a Jamo Vowel, // compose with previous Jamo L and following Jamo T. UChar32 l = prev - Hangul::JAMO_L_BASE; - if ((uint32_t)l < Hangul::JAMO_L_COUNT) { + if (static_cast<uint32_t>(l) < Hangul::JAMO_L_COUNT) { if (sink == nullptr) { return false; } @@ -2204,20 +2213,20 @@ uint8_t Normalizer2Impl::getPreviousTrailCC(const char16_t *start, const char16_ if (start == p) { return 0; } - int32_t i = (int32_t)(p - start); + int32_t i = static_cast<int32_t>(p - start); UChar32 c; U16_PREV(start, 0, i, c); - return (uint8_t)getFCD16(c); + return static_cast<uint8_t>(getFCD16(c)); } uint8_t Normalizer2Impl::getPreviousTrailCC(const uint8_t *start, const uint8_t *p) const { if (start == p) { return 0; } - int32_t i = (int32_t)(p - start); + int32_t i = static_cast<int32_t>(p - start); UChar32 c; U8_PREV(start, 0, i, c); - return (uint8_t)getFCD16(c); + return static_cast<uint8_t>(getFCD16(c)); } // Note: normalizer2impl.cpp r30982 (2011-nov-27) @@ -2245,7 +2254,7 @@ uint16_t Normalizer2Impl::getFCD16FromNormData(UChar32 c) const { return norm16|(norm16<<8); } else if(norm16>=minMaybeYes) { return 0; - } else { // isDecompNoAlgorithmic(norm16) + } else if(norm16<minMaybeNo) { // isDecompNoAlgorithmic(norm16) uint16_t deltaTrailCC = norm16 & DELTA_TCCC_MASK; if (deltaTrailCC <= DELTA_TCCC_1) { return deltaTrailCC >> OFFSET_SHIFT; @@ -2260,7 +2269,7 @@ uint16_t Normalizer2Impl::getFCD16FromNormData(UChar32 c) const { return 0; } // c decomposes, get everything from the variable-length extra data - const uint16_t *mapping=getMapping(norm16); + const uint16_t *mapping=getData(norm16); uint16_t firstUnit=*mapping; norm16=firstUnit>>8; // tccc if(firstUnit&MAPPING_HAS_CCC_LCCC_WORD) { @@ -2272,6 +2281,23 @@ uint16_t Normalizer2Impl::getFCD16FromNormData(UChar32 c) const { #pragma optimize( "", on ) #endif +uint16_t Normalizer2Impl::getFCD16FromMaybeOrNonZeroCC(uint16_t norm16) const { + U_ASSERT(norm16 >= minMaybeNo); + if (norm16 >= MIN_NORMAL_MAYBE_YES) { + // combining mark + norm16 = getCCFromNormalYesOrMaybe(norm16); + return norm16 | (norm16<<8); + } else if (norm16 >= minMaybeYes) { + return 0; + } + // c decomposes, get everything from the variable-length extra data + const uint16_t *mapping = getDataForMaybe(norm16); + uint16_t firstUnit = *mapping; + // maybeNo has lccc = 0 + U_ASSERT((firstUnit & MAPPING_HAS_CCC_LCCC_WORD) == 0 || (*(mapping - 1) & 0xff00) == 0); + return firstUnit >> 8; // tccc +} + // Dual functionality: // buffer!=nullptr: normalize // buffer==nullptr: isNormalized/quickCheck/spanQuickCheckYes @@ -2395,7 +2421,7 @@ Normalizer2Impl::makeFCD(const char16_t *src, const char16_t *limit, * already but is now going to be decomposed. * prevSrc is set to after what was copied/appended. */ - buffer->removeSuffix((int32_t)(prevSrc-prevBoundary)); + buffer->removeSuffix(static_cast<int32_t>(prevSrc - prevBoundary)); /* * Find the part of the source that needs to be decomposed, * up to the next safe boundary. @@ -2426,11 +2452,11 @@ void Normalizer2Impl::makeFCDAndAppend(const char16_t *src, const char16_t *limi if(src!=firstBoundaryInSrc) { const char16_t *lastBoundaryInDest=findPreviousFCDBoundary(buffer.getStart(), buffer.getLimit()); - int32_t destSuffixLength=(int32_t)(buffer.getLimit()-lastBoundaryInDest); + int32_t destSuffixLength = static_cast<int32_t>(buffer.getLimit() - lastBoundaryInDest); UnicodeString middle(lastBoundaryInDest, destSuffixLength); buffer.removeSuffix(destSuffixLength); safeMiddle=middle; - middle.append(src, (int32_t)(firstBoundaryInSrc-src)); + middle.append(src, static_cast<int32_t>(firstBoundaryInSrc - src)); const char16_t *middleStart=middle.getBuffer(); makeFCD(middleStart, middleStart+middle.length(), &buffer, errorCode); if(U_FAILURE(errorCode)) { @@ -2507,8 +2533,8 @@ void CanonIterData::addToStartSet(UChar32 origin, UChar32 decompLead, UErrorCode if(U_FAILURE(errorCode)) { return; } - UChar32 firstOrigin=(UChar32)(canonValue&CANON_VALUE_MASK); - canonValue=(canonValue&~CANON_VALUE_MASK)|CANON_HAS_SET|(uint32_t)canonStartSets.size(); + UChar32 firstOrigin = static_cast<UChar32>(canonValue & CANON_VALUE_MASK); + canonValue = (canonValue & ~CANON_VALUE_MASK) | CANON_HAS_SET | static_cast<uint32_t>(canonStartSets.size()); umutablecptrie_set(mutableTrie, decompLead, canonValue, &errorCode); canonStartSets.adoptElement(lpSet.orphan(), errorCode); if (U_FAILURE(errorCode)) { @@ -2518,7 +2544,7 @@ void CanonIterData::addToStartSet(UChar32 origin, UChar32 decompLead, UErrorCode set->add(firstOrigin); } } else { - set=(UnicodeSet *)canonStartSets[(int32_t)(canonValue&CANON_VALUE_MASK)]; + set = static_cast<UnicodeSet*>(canonStartSets[static_cast<int32_t>(canonValue & CANON_VALUE_MASK)]); } set->add(origin); } @@ -2575,9 +2601,11 @@ void InitCanonIterData::doInit(Normalizer2Impl *impl, UErrorCode &errorCode) { void Normalizer2Impl::makeCanonIterDataFromNorm16(UChar32 start, UChar32 end, const uint16_t norm16, CanonIterData &newData, UErrorCode &errorCode) const { - if(isInert(norm16) || (minYesNo<=norm16 && norm16<minNoNo)) { + if(isInert(norm16) || + (minYesNo<=norm16 && norm16<minNoNo) || + (minMaybeNo<=norm16 && norm16<minMaybeYes)) { // Inert, or 2-way mapping (including Hangul syllable). - // We do not write a canonStartSet for any yesNo character. + // We do not write a canonStartSet for any yesNo/maybeNo character. // Composites from 2-way mappings are added at runtime from the // starter's compositions list, and the other characters in // 2-way mappings get CANON_NOT_SEGMENT_STARTER set because they are @@ -2587,7 +2615,7 @@ void Normalizer2Impl::makeCanonIterDataFromNorm16(UChar32 start, UChar32 end, co for(UChar32 c=start; c<=end; ++c) { uint32_t oldValue = umutablecptrie_get(newData.mutableTrie, c); uint32_t newValue=oldValue; - if(isMaybeOrNonZeroCC(norm16)) { + if(isMaybeYesOrNonZeroCC(norm16)) { // not a segment starter if it occurs in a decomposition or has cc!=0 newValue|=CANON_NOT_SEGMENT_STARTER; if(norm16<MIN_NORMAL_MAYBE_YES) { @@ -2609,7 +2637,7 @@ void Normalizer2Impl::makeCanonIterDataFromNorm16(UChar32 start, UChar32 end, co } if (norm16_2 > minYesNo) { // c decomposes, get everything from the variable-length extra data - const uint16_t *mapping=getMapping(norm16_2); + const uint16_t *mapping=getDataForYesOrNo(norm16_2); uint16_t firstUnit=*mapping; int32_t length=firstUnit&MAPPING_LENGTH_MASK; if((firstUnit&MAPPING_HAS_CCC_LCCC_WORD)!=0) { @@ -2657,11 +2685,11 @@ UBool Normalizer2Impl::ensureCanonIterData(UErrorCode &errorCode) const { } int32_t Normalizer2Impl::getCanonValue(UChar32 c) const { - return (int32_t)ucptrie_get(fCanonIterData->trie, c); + return static_cast<int32_t>(ucptrie_get(fCanonIterData->trie, c)); } const UnicodeSet &Normalizer2Impl::getCanonStartSet(int32_t n) const { - return *(const UnicodeSet *)fCanonIterData->canonStartSets[n]; + return *static_cast<const UnicodeSet*>(fCanonIterData->canonStartSets[n]); } UBool Normalizer2Impl::isCanonSegmentStarter(UChar32 c) const { @@ -2684,7 +2712,7 @@ UBool Normalizer2Impl::getCanonStartSet(UChar32 c, UnicodeSet &set) const { uint16_t norm16=getRawNorm16(c); if(norm16==JAMO_L) { UChar32 syllable= - (UChar32)(Hangul::HANGUL_BASE+(c-Hangul::JAMO_L_BASE)*Hangul::JAMO_VT_COUNT); + static_cast<UChar32>(Hangul::HANGUL_BASE + (c - Hangul::JAMO_L_BASE) * Hangul::JAMO_VT_COUNT); set.add(syllable, syllable+Hangul::JAMO_VT_COUNT-1); } else { addComposites(getCompositionsList(norm16), set); @@ -2728,7 +2756,7 @@ unorm2_swap(const UDataSwapper *ds, pInfo->dataFormat[1]==0x72 && pInfo->dataFormat[2]==0x6d && pInfo->dataFormat[3]==0x32 && - (1<=formatVersion0 && formatVersion0<=4) + (1<=formatVersion0 && formatVersion0<=5) )) { udata_printError(ds, "unorm2_swap(): data format %02x.%02x.%02x.%02x (format version %02x) is not recognized as Normalizer2 data\n", pInfo->dataFormat[0], pInfo->dataFormat[1], @@ -2747,8 +2775,10 @@ unorm2_swap(const UDataSwapper *ds, minIndexesLength=Normalizer2Impl::IX_MIN_MAYBE_YES+1; } else if(formatVersion0==2) { minIndexesLength=Normalizer2Impl::IX_MIN_YES_NO_MAPPINGS_ONLY+1; - } else { + } else if(formatVersion0<=4) { minIndexesLength=Normalizer2Impl::IX_MIN_LCCC_CP+1; + } else { + minIndexesLength=Normalizer2Impl::IX_MIN_MAYBE_NO_COMBINES_FWD+1; } if(length>=0) { diff --git a/deps/icu-small/source/common/normalizer2impl.h b/deps/icu-small/source/common/normalizer2impl.h index b74c2a1125b560..5999190bae9bc8 100644 --- a/deps/icu-small/source/common/normalizer2impl.h +++ b/deps/icu-small/source/common/normalizer2impl.h @@ -81,10 +81,10 @@ class U_COMMON_API Hangul { return 0<=c && c<HANGUL_COUNT && c%JAMO_T_COUNT==0; } static inline UBool isJamoL(UChar32 c) { - return (uint32_t)(c-JAMO_L_BASE)<JAMO_L_COUNT; + return static_cast<uint32_t>(c - JAMO_L_BASE) < JAMO_L_COUNT; } static inline UBool isJamoV(UChar32 c) { - return (uint32_t)(c-JAMO_V_BASE)<JAMO_V_COUNT; + return static_cast<uint32_t>(c - JAMO_V_BASE) < JAMO_V_COUNT; } static inline UBool isJamoT(UChar32 c) { int32_t t=c-JAMO_T_BASE; @@ -103,12 +103,12 @@ class U_COMMON_API Hangul { c-=HANGUL_BASE; UChar32 c2=c%JAMO_T_COUNT; c/=JAMO_T_COUNT; - buffer[0]=(char16_t)(JAMO_L_BASE+c/JAMO_V_COUNT); - buffer[1]=(char16_t)(JAMO_V_BASE+c%JAMO_V_COUNT); + buffer[0] = static_cast<char16_t>(JAMO_L_BASE + c / JAMO_V_COUNT); + buffer[1] = static_cast<char16_t>(JAMO_V_BASE + c % JAMO_V_COUNT); if(c2==0) { return 2; } else { - buffer[2]=(char16_t)(JAMO_T_BASE+c2); + buffer[2] = static_cast<char16_t>(JAMO_T_BASE + c2); return 3; } } @@ -123,11 +123,11 @@ class U_COMMON_API Hangul { UChar32 c2=c%JAMO_T_COUNT; if(c2==0) { c/=JAMO_T_COUNT; - buffer[0]=(char16_t)(JAMO_L_BASE+c/JAMO_V_COUNT); - buffer[1]=(char16_t)(JAMO_V_BASE+c%JAMO_V_COUNT); + buffer[0] = static_cast<char16_t>(JAMO_L_BASE + c / JAMO_V_COUNT); + buffer[1] = static_cast<char16_t>(JAMO_V_BASE + c % JAMO_V_COUNT); } else { - buffer[0]=(char16_t)(orig-c2); // LV syllable - buffer[1]=(char16_t)(JAMO_T_BASE+c2); + buffer[0] = static_cast<char16_t>(orig - c2); // LV syllable + buffer[1] = static_cast<char16_t>(JAMO_T_BASE + c2); } } private: @@ -147,13 +147,13 @@ class U_COMMON_API ReorderingBuffer : public UMemory { ReorderingBuffer(const Normalizer2Impl &ni, UnicodeString &dest, UErrorCode &errorCode); ~ReorderingBuffer() { if (start != nullptr) { - str.releaseBuffer((int32_t)(limit-start)); + str.releaseBuffer(static_cast<int32_t>(limit - start)); } } UBool init(int32_t destCapacity, UErrorCode &errorCode); UBool isEmpty() const { return start==limit; } - int32_t length() const { return (int32_t)(limit-start); } + int32_t length() const { return static_cast<int32_t>(limit - start); } char16_t *getStart() { return start; } char16_t *getLimit() { return limit; } uint8_t getLastCC() const { return lastCC; } @@ -163,7 +163,7 @@ class U_COMMON_API ReorderingBuffer : public UMemory { UBool append(UChar32 c, uint8_t cc, UErrorCode &errorCode) { return (c<=0xffff) ? - appendBMP((char16_t)c, cc, errorCode) : + appendBMP(static_cast<char16_t>(c), cc, errorCode) : appendSupplementary(c, cc, errorCode); } UBool append(const char16_t *s, int32_t length, UBool isNFD, @@ -190,12 +190,12 @@ class U_COMMON_API ReorderingBuffer : public UMemory { void remove(); void removeSuffix(int32_t suffixLength); void setReorderingLimit(char16_t *newLimit) { - remainingCapacity+=(int32_t)(limit-newLimit); + remainingCapacity += static_cast<int32_t>(limit - newLimit); reorderStart=limit=newLimit; lastCC=0; } void copyReorderableSuffixTo(UnicodeString &s) const { - s.setTo(ConstChar16Ptr(reorderStart), (int32_t)(limit-reorderStart)); + s.setTo(ConstChar16Ptr(reorderStart), static_cast<int32_t>(limit - reorderStart)); } private: /* @@ -215,7 +215,7 @@ class U_COMMON_API ReorderingBuffer : public UMemory { void insert(UChar32 c, uint8_t cc); static void writeCodePoint(char16_t *p, UChar32 c) { if(c<=0xffff) { - *p=(char16_t)c; + *p = static_cast<char16_t>(c); } else { p[0]=U16_LEAD(c); p[1]=U16_TRAIL(c); @@ -241,7 +241,7 @@ class U_COMMON_API ReorderingBuffer : public UMemory { * Low-level implementation of the Unicode Normalization Algorithm. * For the data structure and details see the documentation at the end of * this normalizer2impl.h and in the design doc at - * https://icu.unicode.org/design/normalization/custom + * https://unicode-org.github.io/icu/design/normalization/custom.html */ class U_COMMON_API Normalizer2Impl : public UObject { public: @@ -271,14 +271,14 @@ class U_COMMON_API Normalizer2Impl : public UObject { UNormalizationCheckResult getCompQuickCheck(uint16_t norm16) const { if(norm16<minNoNo || MIN_YES_YES_WITH_CC<=norm16) { return UNORM_YES; - } else if(minMaybeYes<=norm16) { + } else if(minMaybeNo<=norm16) { return UNORM_MAYBE; } else { return UNORM_NO; } } - UBool isAlgorithmicNoNo(uint16_t norm16) const { return limitNoNo<=norm16 && norm16<minMaybeYes; } - UBool isCompNo(uint16_t norm16) const { return minNoNo<=norm16 && norm16<minMaybeYes; } + UBool isAlgorithmicNoNo(uint16_t norm16) const { return limitNoNo<=norm16 && norm16<minMaybeNo; } + UBool isCompNo(uint16_t norm16) const { return minNoNo<=norm16 && norm16<minMaybeNo; } UBool isDecompYes(uint16_t norm16) const { return norm16<minYesNo || minMaybeYes<=norm16; } uint8_t getCC(uint16_t norm16) const { @@ -291,14 +291,14 @@ class U_COMMON_API Normalizer2Impl : public UObject { return getCCFromNoNo(norm16); } static uint8_t getCCFromNormalYesOrMaybe(uint16_t norm16) { - return (uint8_t)(norm16 >> OFFSET_SHIFT); + return static_cast<uint8_t>(norm16 >> OFFSET_SHIFT); } - static uint8_t getCCFromYesOrMaybe(uint16_t norm16) { + static uint8_t getCCFromYesOrMaybeYes(uint16_t norm16) { return norm16>=MIN_NORMAL_MAYBE_YES ? getCCFromNormalYesOrMaybe(norm16) : 0; } - uint8_t getCCFromYesOrMaybeCP(UChar32 c) const { + uint8_t getCCFromYesOrMaybeYesCP(UChar32 c) const { if (c < minCompNoMaybeCP) { return 0; } - return getCCFromYesOrMaybe(getNorm16(c)); + return getCCFromYesOrMaybeYes(getNorm16(c)); } /** @@ -364,11 +364,13 @@ class U_COMMON_API Normalizer2Impl : public UObject { // 0<=lead<=0xffff uint8_t bits=smallFCD[lead>>8]; if(bits==0) { return false; } - return (UBool)((bits>>((lead>>5)&7))&1); + return (bits >> ((lead >> 5) & 7)) & 1; } /** Returns the FCD value from the regular normalization data. */ uint16_t getFCD16FromNormData(UChar32 c) const; + uint16_t getFCD16FromMaybeOrNonZeroCC(uint16_t norm16) const; + /** * Gets the decomposition for one code point. * @param c code point @@ -450,7 +452,13 @@ class U_COMMON_API Normalizer2Impl : public UObject { IX_MIN_LCCC_CP, IX_RESERVED19, - IX_COUNT + + /** Two-way mappings; each starts with a character that combines backward. */ + IX_MIN_MAYBE_NO, // 20 + /** Two-way mappings & compositions. */ + IX_MIN_MAYBE_NO_COMBINES_FWD, + + IX_COUNT // 22 }; enum { @@ -541,7 +549,8 @@ class U_COMMON_API Normalizer2Impl : public UObject { uint16_t norm16=getNorm16(c); return isCompYesAndZeroCC(norm16) && (norm16 & HAS_COMP_BOUNDARY_AFTER) != 0 && - (!onlyContiguous || isInert(norm16) || *getMapping(norm16) <= 0x1ff); + (!onlyContiguous || isInert(norm16) || *getDataForYesOrNo(norm16) <= 0x1ff); + // The last check fetches the mapping's first unit and checks tccc<=1. } UBool hasFCDBoundaryBefore(UChar32 c) const { return hasDecompBoundaryBefore(c); } @@ -551,8 +560,8 @@ class U_COMMON_API Normalizer2Impl : public UObject { friend class InitCanonIterData; friend class LcccContext; - UBool isMaybe(uint16_t norm16) const { return minMaybeYes<=norm16 && norm16<=JAMO_VT; } - UBool isMaybeOrNonZeroCC(uint16_t norm16) const { return norm16>=minMaybeYes; } + UBool isMaybe(uint16_t norm16) const { return minMaybeNo<=norm16 && norm16<=JAMO_VT; } + UBool isMaybeYesOrNonZeroCC(uint16_t norm16) const { return norm16>=minMaybeYes; } static UBool isInert(uint16_t norm16) { return norm16==INERT; } static UBool isJamoL(uint16_t norm16) { return norm16==JAMO_L; } static UBool isJamoVT(uint16_t norm16) { return norm16==JAMO_VT; } @@ -566,7 +575,7 @@ class U_COMMON_API Normalizer2Impl : public UObject { // return norm16>=MIN_YES_YES_WITH_CC || norm16<minNoNo; // } // UBool isCompYesOrMaybe(uint16_t norm16) const { - // return norm16<minNoNo || minMaybeYes<=norm16; + // return norm16<minNoNo || minMaybeNo<=norm16; // } // UBool hasZeroCCFromDecompYes(uint16_t norm16) const { // return norm16<=MIN_NORMAL_MAYBE_YES || norm16==JAMO_VT; @@ -579,12 +588,12 @@ class U_COMMON_API Normalizer2Impl : public UObject { /** * A little faster and simpler than isDecompYesAndZeroCC() but does not include * the MaybeYes which combine-forward and have ccc=0. - * (Standard Unicode 10 normalization does not have such characters.) */ UBool isMostDecompYesAndZeroCC(uint16_t norm16) const { return norm16<minYesNo || norm16==MIN_NORMAL_MAYBE_YES || norm16==JAMO_VT; } - UBool isDecompNoAlgorithmic(uint16_t norm16) const { return norm16>=limitNoNo; } + /** Since formatVersion 5: same as isAlgorithmicNoNo() */ + UBool isDecompNoAlgorithmic(uint16_t norm16) const { return limitNoNo<=norm16 && norm16<minMaybeNo; } // For use with isCompYes(). // Perhaps the compiler can combine the two tests for MIN_YES_YES_WITH_CC. @@ -592,9 +601,9 @@ class U_COMMON_API Normalizer2Impl : public UObject { // return norm16>=MIN_YES_YES_WITH_CC ? getCCFromNormalYesOrMaybe(norm16) : 0; // } uint8_t getCCFromNoNo(uint16_t norm16) const { - const uint16_t *mapping=getMapping(norm16); + const uint16_t *mapping=getDataForYesOrNo(norm16); if(*mapping&MAPPING_HAS_CCC_LCCC_WORD) { - return (uint8_t)*(mapping-1); + return static_cast<uint8_t>(*(mapping - 1)); } else { return 0; } @@ -605,7 +614,7 @@ class U_COMMON_API Normalizer2Impl : public UObject { return 0; // yesYes and Hangul LV have ccc=tccc=0 } else { // For Hangul LVT we harmlessly fetch a firstUnit with tccc=0 here. - return (uint8_t)(*getMapping(norm16)>>8); // tccc from yesNo + return static_cast<uint8_t>(*getDataForYesOrNo(norm16) >> 8); // tccc from yesNo } } uint8_t getPreviousTrailCC(const char16_t *start, const char16_t *p) const; @@ -619,28 +628,33 @@ class U_COMMON_API Normalizer2Impl : public UObject { return (norm16>>DELTA_SHIFT)-centerNoNoDelta; } - // Requires minYesNo<norm16<limitNoNo. - const uint16_t *getMapping(uint16_t norm16) const { return extraData+(norm16>>OFFSET_SHIFT); } + const uint16_t *getDataForYesOrNo(uint16_t norm16) const { + return extraData+(norm16>>OFFSET_SHIFT); + } + const uint16_t *getDataForMaybe(uint16_t norm16) const { + return extraData+((norm16-minMaybeNo+limitNoNo)>>OFFSET_SHIFT); + } + const uint16_t *getData(uint16_t norm16) const { + if(norm16>=minMaybeNo) { + norm16=norm16-minMaybeNo+limitNoNo; + } + return extraData+(norm16>>OFFSET_SHIFT); + } const uint16_t *getCompositionsListForDecompYes(uint16_t norm16) const { if(norm16<JAMO_L || MIN_NORMAL_MAYBE_YES<=norm16) { return nullptr; - } else if(norm16<minMaybeYes) { - return getMapping(norm16); // for yesYes; if Jamo L: harmless empty list } else { - return maybeYesCompositions+norm16-minMaybeYes; + // if yesYes: if Jamo L: harmless empty list + return getData(norm16); } } const uint16_t *getCompositionsListForComposite(uint16_t norm16) const { // A composite has both mapping & compositions list. - const uint16_t *list=getMapping(norm16); + const uint16_t *list=getData(norm16); return list+ // mapping pointer 1+ // +1 to skip the first unit with the mapping length (*list&MAPPING_LENGTH_MASK); // + mapping length } - const uint16_t *getCompositionsListForMaybe(uint16_t norm16) const { - // minMaybeYes<=norm16<MIN_NORMAL_MAYBE_YES - return maybeYesCompositions+((norm16-minMaybeYes)>>OFFSET_SHIFT); - } /** * @param c code point must have compositions * @return compositions list pointer @@ -692,11 +706,13 @@ class U_COMMON_API Normalizer2Impl : public UObject { /** For FCC: Given norm16 HAS_COMP_BOUNDARY_AFTER, does it have tccc<=1? */ UBool isTrailCC01ForCompBoundaryAfter(uint16_t norm16) const { return isInert(norm16) || (isDecompNoAlgorithmic(norm16) ? - (norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1 : *getMapping(norm16) <= 0x1ff); + (norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1 : *getDataForYesOrNo(norm16) <= 0x1ff); } - const char16_t *findPreviousCompBoundary(const char16_t *start, const char16_t *p, UBool onlyContiguous) const; - const char16_t *findNextCompBoundary(const char16_t *p, const char16_t *limit, UBool onlyContiguous) const; + const char16_t *findPreviousCompBoundary(const char16_t *start, const char16_t *p, + UBool onlyContiguous) const; + const char16_t *findNextCompBoundary(const char16_t *p, const char16_t *limit, + UBool onlyContiguous) const; const char16_t *findPreviousFCDBoundary(const char16_t *start, const char16_t *p) const; const char16_t *findNextFCDBoundary(const char16_t *p, const char16_t *limit) const; @@ -723,11 +739,12 @@ class U_COMMON_API Normalizer2Impl : public UObject { uint16_t minNoNoEmpty; uint16_t limitNoNo; uint16_t centerNoNoDelta; + uint16_t minMaybeNo; + uint16_t minMaybeNoCombinesFwd; uint16_t minMaybeYes; const UCPTrie *normTrie; - const uint16_t *maybeYesCompositions; - const uint16_t *extraData; // mappings and/or compositions for yesYes, yesNo & noNo characters + const uint16_t *extraData; // mappings and/or compositions const uint8_t *smallFCD; // [0x100] one bit per 32 BMP code points, set if any FCD!=0 UInitOnce fCanonIterDataInitOnce {}; @@ -785,7 +802,7 @@ unorm_getFCD16(UChar32 c); /** * Format of Normalizer2 .nrm data files. - * Format version 4.0. + * Format version 5.0. * * Normalizer2 .nrm data files provide data for the Unicode Normalization algorithms. * ICU ships with data files for standard Unicode Normalization Forms @@ -807,7 +824,7 @@ unorm_getFCD16(UChar32 c); * Constants are defined as enum values of the Normalizer2Impl class. * * Many details of the data structures are described in the design doc - * which is at https://icu.unicode.org/design/normalization/custom + * which is at https://unicode-org.github.io/icu/design/normalization/custom.html * * int32_t indexes[indexesLength]; -- indexesLength=indexes[IX_NORM_TRIE_OFFSET]/4; * @@ -829,7 +846,9 @@ unorm_getFCD16(UChar32 c); * * The next eight indexes are thresholds of 16-bit trie values for ranges of * values indicating multiple normalization properties. - * They are listed here in threshold order, not in the order they are stored in the indexes. + * Format version 5 adds the two minMaybeNo* threshold indexes. + * The thresholds are listed here in threshold order, + * not in the order they are stored in the indexes. * minYesNo=indexes[IX_MIN_YES_NO]; * minYesNoMappingsOnly=indexes[IX_MIN_YES_NO_MAPPINGS_ONLY]; * minNoNo=indexes[IX_MIN_NO_NO]; @@ -837,6 +856,8 @@ unorm_getFCD16(UChar32 c); * minNoNoCompNoMaybeCC=indexes[IX_MIN_NO_NO_COMP_NO_MAYBE_CC]; * minNoNoEmpty=indexes[IX_MIN_NO_NO_EMPTY]; * limitNoNo=indexes[IX_LIMIT_NO_NO]; + * minMaybeNo=indexes[IX_MIN_MAYBE_NO]; + * minMaybeNoCombinesFwd=indexes[IX_MIN_MAYBE_NO_COMBINES_FWD]; * minMaybeYes=indexes[IX_MIN_MAYBE_YES]; * See the normTrie description below and the design doc for details. * @@ -845,13 +866,14 @@ unorm_getFCD16(UChar32 c); * The trie holds the main normalization data. Each code point is mapped to a 16-bit value. * Rather than using independent bits in the value (which would require more than 16 bits), * information is extracted primarily via range checks. - * Except, format version 3 uses bit 0 for hasCompBoundaryAfter(). + * Except, format version 3+ uses bit 0 for hasCompBoundaryAfter(). * For example, a 16-bit value norm16 in the range minYesNo<=norm16<minNoNo * means that the character has NF*C_QC=Yes and NF*D_QC=No properties, * which means it has a two-way (round-trip) decomposition mapping. - * Values in the range 2<=norm16<limitNoNo are also directly indexes into the extraData + * Values in the ranges 2<=norm16<limitNoNo and minMaybeNo<=norm16<minMaybeYes + * are also directly indexes into the extraData * pointing to mappings, compositions lists, or both. - * Value norm16==INERT (0 in versions 1 & 2, 1 in version 3) + * Value norm16==INERT (0 in versions 1 & 2, 1 in version 3+) * means that the character is normalization-inert, that is, * it does not have a mapping, does not participate in composition, has a zero * canonical combining class, and forms a boundary where text before it and after it @@ -870,33 +892,38 @@ unorm_getFCD16(UChar32 c); * When the lead surrogate unit's value exceeds the quick check minimum during processing, * the properties for the full supplementary code point need to be looked up. * - * uint16_t maybeYesCompositions[MIN_NORMAL_MAYBE_YES-minMaybeYes]; * uint16_t extraData[]; * - * There is only one byte offset for the end of these two arrays. - * The split between them is given by the constant and variable mentioned above. - * In version 3, the difference must be shifted right by OFFSET_SHIFT. - * - * The maybeYesCompositions array contains compositions lists for characters that - * combine both forward (as starters in composition pairs) - * and backward (as trailing characters in composition pairs). - * Such characters do not occur in Unicode 5.2 but are allowed by - * the Unicode Normalization algorithms. - * If there are no such characters, then minMaybeYes==MIN_NORMAL_MAYBE_YES - * and the maybeYesCompositions array is empty. - * If there are such characters, then minMaybeYes is subtracted from their norm16 values - * to get the index into this array. - * - * The extraData array contains compositions lists for "YesYes" characters, - * followed by mappings and optional compositions lists for "YesNo" characters, - * followed by only mappings for "NoNo" characters. - * (Referring to pairs of NFC/NFD quick check values.) - * The norm16 values of those characters are directly indexes into the extraData array. - * In version 3, the norm16 values must be shifted right by OFFSET_SHIFT + * The extraData array contains many per-character data sections. + * Each section contains mappings and/or composition lists. + * The norm16 value of each character that has such data is directly an index to + * a section of the extraData array. + * + * In version 3+, the norm16 values must be shifted right by OFFSET_SHIFT * for accessing extraData. * * The data structures for compositions lists and mappings are described in the design doc. * + * In version 4 and below, the composition lists for MaybeYes characters were stored before + * the data for other characters. + * This sub-array had a length of MIN_NORMAL_MAYBE_YES-minMaybeYes. + * In version 3 & 4, the difference must be shifted right by OFFSET_SHIFT. + * + * In version 5, the data for MaybeNo and MaybeYes characters is stored after + * the data for other characters. + * + * If there are no MaybeNo and no MaybeYes characters, + * then minMaybeYes==minMaybeNo==MIN_NORMAL_MAYBE_YES. + * If there are such characters, then minMaybeNo is subtracted from their norm16 values + * to get the index into the extraData. + * In version 4 and below, the data index for Yes* and No* characters needs to be + * offset by the length of the MaybeYes data. + * In version 5, the data index for Maybe* characters needs to be offset by limitNoNo. + * + * Version 5 is the first to support MaybeNo characters, and + * adds the minMaybeNo and minMaybeNoCombinesFwd thresholds and + * the corresponding sections of the extraData. + * * uint8_t smallFCD[0x100]; -- new in format version 2 * * This is a bit set to help speed up FCD value lookups in the absence of a full @@ -936,7 +963,7 @@ unorm_getFCD16(UChar32 c); * to make room for two bits (three values) indicating whether the tccc is 0, 1, or greater. * See DELTA_TCCC_MASK etc. * This helps with fetching tccc/FCD values and FCC hasCompBoundaryAfter(). - * minMaybeYes is 8-aligned so that the DELTA_TCCC_MASK bits can be tested directly. + * minMaybeNo is 8-aligned so that the DELTA_TCCC_MASK bits can be tested directly. * * - Algorithmic mappings are only used for mapping to "comp yes and ccc=0" characters, * and ASCII characters are mapped algorithmically only to other ASCII characters. @@ -982,6 +1009,23 @@ unorm_getFCD16(UChar32 c); * gennorm2 now has to reject mappings for surrogate code points. * UTS #46 maps unpaired surrogates to U+FFFD in code rather than via its * custom normalization data file. + * + * Changes from format version 4 to format version 5 (ICU 76) ------------------ + * + * Unicode 16 adds the first MaybeYes characters which combine both backward and forward, + * taking this formerly theoretical data structure into reality. + * + * Unicode 16 also adds the first characters that have two-way mappings whose first characters + * combine backward. In order for normalization and the quick check to work properly, + * these composite characters also must be marked as NFC_QC=Maybe, + * corresponding to "combines back", although the composites themselves do not combine backward. + * Format version 5 adds two new ranges between "algorithmic NoNo" and MaybeYes, + * with thresholds minMaybeNo and minMaybeNoCombinesFwd, + * and indexes[IX_MIN_MAYBE_NO] and indexes[IX_MIN_MAYBE_NO_COMBINES_FWD], + * and corresponding mappings and composition lists in the extraData. + * + * Format version 5 moves the data for Maybe* characters from the start of the extraData array + * to its end. */ #endif /* !UCONFIG_NO_NORMALIZATION */ diff --git a/deps/icu-small/source/common/patternprops.cpp b/deps/icu-small/source/common/patternprops.cpp index 9922683cda57a6..782d3366f93d61 100644 --- a/deps/icu-small/source/common/patternprops.cpp +++ b/deps/icu-small/source/common/patternprops.cpp @@ -120,12 +120,12 @@ PatternProps::isSyntax(UChar32 c) { if(c<0) { return false; } else if(c<=0xff) { - return (UBool)(latin1[c]>>1)&1; + return (latin1[c] >> 1) & 1; } else if(c<0x2010) { return false; } else if(c<=0x3030) { uint32_t bits=syntax2000[index2000[(c-0x2000)>>5]]; - return (UBool)((bits>>(c&0x1f))&1); + return (bits >> (c & 0x1f)) & 1; } else if(0xfd3e<=c && c<=0xfe46) { return c<=0xfd3f || 0xfe45<=c; } else { @@ -138,12 +138,12 @@ PatternProps::isSyntaxOrWhiteSpace(UChar32 c) { if(c<0) { return false; } else if(c<=0xff) { - return (UBool)(latin1[c]&1); + return latin1[c] & 1; } else if(c<0x200e) { return false; } else if(c<=0x3030) { uint32_t bits=syntaxOrWhiteSpace2000[index2000[(c-0x2000)>>5]]; - return (UBool)((bits>>(c&0x1f))&1); + return (bits >> (c & 0x1f)) & 1; } else if(0xfd3e<=c && c<=0xfe46) { return c<=0xfd3f || 0xfe45<=c; } else { @@ -156,7 +156,7 @@ PatternProps::isWhiteSpace(UChar32 c) { if(c<0) { return false; } else if(c<=0xff) { - return (UBool)(latin1[c]>>2)&1; + return (latin1[c] >> 2) & 1; } else if(0x200e<=c && c<=0x2029) { return c<=0x200f || 0x2028<=c; } else { diff --git a/deps/icu-small/source/common/propname.cpp b/deps/icu-small/source/common/propname.cpp index 45062bfbd9310d..640578c5ee3717 100644 --- a/deps/icu-small/source/common/propname.cpp +++ b/deps/icu-small/source/common/propname.cpp @@ -43,7 +43,7 @@ getASCIIPropertyNameChar(const char *name) { ) {} if(c!=0) { - return (i<<8)|(uint8_t)uprv_asciitolower((char)c); + return (i << 8) | static_cast<uint8_t>(uprv_asciitolower(c)); } else { return i<<8; } @@ -66,7 +66,7 @@ getEBCDICPropertyNameChar(const char *name) { ) {} if(c!=0) { - return (i<<8)|(uint8_t)uprv_ebcdictolower((char)c); + return (i << 8) | static_cast<uint8_t>(uprv_ebcdictolower(c)); } else { return i<<8; } @@ -231,7 +231,7 @@ UBool PropNameData::containsName(BytesTrie &trie, const char *name) { if(!USTRINGTRIE_HAS_NEXT(result)) { return false; } - result=trie.next((uint8_t)c); + result = trie.next(static_cast<uint8_t>(c)); } return USTRINGTRIE_HAS_VALUE(result); } diff --git a/deps/icu-small/source/common/propname_data.h b/deps/icu-small/source/common/propname_data.h index 579547e41601ef..99233a0bd6013e 100644 --- a/deps/icu-small/source/common/propname_data.h +++ b/deps/icu-small/source/common/propname_data.h @@ -11,105 +11,107 @@ U_NAMESPACE_BEGIN -const int32_t PropNameData::indexes[8]={0x20,0x16fc,0x5471,0xb130,0xb130,0xb130,0x31,0}; +const int32_t PropNameData::indexes[8]={0x20,0x1778,0x5653,0xb539,0xb539,0xb539,0x31,0}; -const int32_t PropNameData::valueMaps[1463]={ -6,0,0x4b,0,0xfb,0x368,0xfb,0x37e,0xfb,0x393,0xfb,0x3a9,0xfb,0x3b4,0xfb,0x3d5, -0xfb,0x3e5,0xfb,0x3f4,0xfb,0x402,0xfb,0x426,0xfb,0x43d,0xfb,0x455,0xfb,0x46c,0xfb,0x47b, -0xfb,0x48a,0xfb,0x49b,0xfb,0x4a9,0xfb,0x4bb,0xfb,0x4d5,0xfb,0x4f0,0xfb,0x505,0xfb,0x522, -0xfb,0x533,0xfb,0x53e,0xfb,0x55d,0xfb,0x573,0xfb,0x584,0xfb,0x594,0xfb,0x5af,0xfb,0x5c8, -0xfb,0x5d9,0xfb,0x5f3,0xfb,0x606,0xfb,0x616,0xfb,0x630,0xfb,0x649,0xfb,0x660,0xfb,0x674, -0xfb,0x68a,0xfb,0x69e,0xfb,0x6b4,0xfb,0x6ce,0xfb,0x6e6,0xfb,0x702,0xfb,0x70a,0xfb,0x712, -0xfb,0x71a,0xfb,0x722,0xfb,0x72b,0xfb,0x738,0xfb,0x74b,0xfb,0x768,0xfb,0x785,0xfb,0x7a2, -0xfb,0x7c0,0xfb,0x7de,0xfb,0x802,0xfb,0x80f,0xfb,0x829,0xfb,0x83e,0xfb,0x859,0xfb,0x870, -0xfb,0x887,0xfb,0x8a9,0xfb,0x8c8,0xfb,0x8e1,0xfb,0x90e,0xfb,0x947,0xfb,0x978,0xfb,0x9a7, -0xfb,0x9d6,0xfb,0x9eb,0xfb,0xa04,0xfb,0xa2f,0xfb,0x1000,0x101a,0xa60,0x177,0xc80,0x192,0x331c, -0x101,0x333b,0x2df,0x3479,0x2f5,0x34d3,0x2ff,0x3730,0x321,0x405b,0x38d,0x40cb,0x397,0x43b0,0x3cb,0x43ee, -0x3d3,0x4f3e,0x4a0,0x4fbc,0x4aa,0x4fe1,0x4b0,0x4ffb,0x4b6,0x501c,0x4bd,0x5036,0x101,0x505b,0x101,0x5081, -0x4c4,0x512b,0x4da,0x51a4,0x4ed,0x5256,0x508,0x528d,0x50f,0x546d,0x523,0x58ed,0x54b,0x594c,0x553,0x2000, -0x2001,0x5999,0x559,0x3000,0x3001,0x5a25,0,0x4000,0x400e,0x5a37,0,0x5a40,0,0x5a5a,0,0x5a6b, -0,0x5a7c,0,0x5a92,0,0x5a9b,0,0x5ab8,0,0x5ad6,0,0x5af4,0,0x5b12,0,0x5b28, -0,0x5b3c,0,0x5b52,0,0x7000,0x7002,0x5b6b,0,0x5b82,0x5a7,0x896,0x12,0,1,0x12, -0x20,0x8b4,0x4a,0,1,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10, -0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20, -0x21,0x22,0x23,0x24,0x54,0x5b,0x67,0x6b,0x76,0x7a,0x81,0x82,0x84,0x85,0xc8,0xca, -0xd6,0xd8,0xda,0xdc,0xde,0xe0,0xe2,0xe4,0xe6,0xe8,0xe9,0xea,0xf0,0x2e,0x40,0x4c, -0x5e,0x68,0x79,0x84,0x91,0x9e,0xab,0xb8,0xc5,0xd2,0xdf,0xec,0xf9,0x106,0x113,0x120, -0x12d,0x13a,0x147,0x154,0x161,0x16e,0x17b,0x188,0x195,0x1a2,0x1af,0x1bc,0x1c9,0x1d6,0x1e3,0x1f0, -0x1fd,0x20c,0x21b,0x22a,0x239,0x248,0x257,0x266,0x275,0x28f,0x2a3,0x2b7,0x2d2,0x2e1,0x2ea,0x2fa, -0x302,0x30b,0x31a,0x323,0x333,0x344,0x355,0xa55,1,0,0x17,0xa6f,0xa80,0xa91,0xaa5,0xabc, -0xad4,0xae6,0xafb,0xb12,0xb27,0xb37,0xb49,0xb66,0xb82,0xb94,0xbb1,0xbcd,0xbe9,0xbfe,0xc13,0xc2d, -0xc48,0xc63,0xbf7,1,0,0x149,0xc8b,0xc98,0xcab,0xcd3,0xcf1,0xd0f,0xd27,0xd52,0xd7c,0xd94, -0xda7,0xdba,0xdc9,0xdd8,0xde7,0xdf6,0xe0d,0xe1e,0xe31,0xe44,0xe51,0xe5e,0xe6d,0xe7e,0xe93,0xea4, -0xeaf,0xeb8,0xec9,0xeda,0xeed,0xeff,0xf12,0xf25,0xf64,0xf71,0xf7e,0xf8b,0xfa0,0xfd0,0xfea,0x100b, -0x1036,0x1059,0x10b7,0x10de,0x10f9,0x1108,0x112f,0x1157,0x117a,0x119d,0x11c7,0x11e0,0x11ff,0x1222,0x1246,0x1259, -0x1273,0x129d,0x12b5,0x12dd,0x1306,0x1319,0x132c,0x133f,0x1366,0x1375,0x1395,0x13c3,0x13e1,0x140f,0x142b,0x1446, -0x145f,0x1478,0x1499,0x14c9,0x14e8,0x150a,0x153e,0x156b,0x15b0,0x15d1,0x15fb,0x161c,0x1645,0x1658,0x168b,0x16a2, -0x16b1,0x16c2,0x16ed,0x1704,0x1735,0x1763,0x17a6,0x17b1,0x17ea,0x17fb,0x180c,0x1819,0x182c,0x1866,0x188a,0x18ae, -0x18e8,0x1920,0x194b,0x1963,0x198f,0x19bb,0x19c8,0x19d7,0x19f4,0x1a16,0x1a44,0x1a64,0x1a8b,0x1ab2,0x1ad1,0x1ae4, -0x1af5,0x1b06,0x1b2b,0x1b50,0x1b77,0x1bab,0x1bd8,0x1bf6,0x1c09,0x1c22,0x1c5b,0x1c6a,0x1c8a,0x1cac,0x1cce,0x1ce5, -0x1cfc,0x1d29,0x1d42,0x1d5b,0x1d8c,0x1db6,0x1dd1,0x1de4,0x1e03,0x1e0c,0x1e1f,0x1e3d,0x1e5b,0x1e6e,0x1e85,0x1e9a, -0x1ecf,0x1ef3,0x1f08,0x1f17,0x1f2a,0x1f4e,0x1f57,0x1f7b,0x1f92,0x1fa5,0x1fb4,0x1fbf,0x1fe0,0x1ff8,0x2007,0x2016, -0x2025,0x203c,0x2051,0x2066,0x209f,0x20b2,0x20ce,0x20d9,0x20e6,0x2114,0x2138,0x215b,0x216e,0x2190,0x21a3,0x21be, -0x21e1,0x2204,0x2229,0x223a,0x2269,0x2296,0x22ad,0x22c8,0x22d7,0x2302,0x233a,0x2374,0x23a2,0x23b3,0x23c0,0x23e4, -0x23f3,0x240f,0x2429,0x2446,0x247e,0x2493,0x24c0,0x24df,0x250d,0x252d,0x2561,0x2570,0x259a,0x25bd,0x25e8,0x25f3, -0x2604,0x261f,0x2643,0x2650,0x2665,0x268c,0x26b7,0x26ee,0x2701,0x2712,0x2742,0x2753,0x2762,0x2777,0x2795,0x27a8, -0x27bb,0x27d2,0x27ef,0x27fa,0x2803,0x2825,0x283a,0x285f,0x2876,0x289f,0x28ba,0x28cf,0x28e8,0x2909,0x293e,0x294f, -0x2980,0x29a4,0x29b5,0x29ce,0x29d9,0x2a06,0x2a28,0x2a56,0x2a89,0x2a98,0x2aa9,0x2ac6,0x2b08,0x2b2f,0x2b3c,0x2b51, -0x2b75,0x2b9b,0x2bd4,0x2be5,0x2c09,0x2c14,0x2c21,0x2c30,0x2c55,0x2c83,0x2c9f,0x2cbc,0x2cc9,0x2cda,0x2cf8,0x2d1b, -0x2d38,0x2d45,0x2d65,0x2d82,0x2da3,0x2dcc,0x2ddd,0x2dfc,0x2e15,0x2e2e,0x2e3f,0x2e88,0x2e99,0x2eb2,0x2ee1,0x2f0e, -0x2f33,0x2f75,0x2f91,0x2fa0,0x2fb7,0x2fe5,0x2ffe,0x3027,0x3041,0x307c,0x309a,0x30a9,0x30c9,0x30e4,0x3108,0x3124, -0x3142,0x3160,0x3177,0x3186,0x3191,0x31ce,0x31e1,0x320b,0x322b,0x3259,0x327d,0x32a5,0x32ca,0x32d5,0x32ee,0x2001, -1,0,0x12,0x3352,0x3362,0x3375,0x3385,0x3395,0x33a4,0x33b4,0x33c6,0x33d9,0x33eb,0x33fb,0x340b,0x341a, -0x3429,0x3439,0x3446,0x3455,0x3469,0x20bf,1,0,6,0x348e,0x3499,0x34a6,0x34b3,0x34c0,0x34cb,0x2103, -1,0,0x1e,0x34e8,0x34f7,0x350c,0x3521,0x3536,0x354a,0x355b,0x356f,0x3582,0x3593,0x35ac,0x35be,0x35cf, -0x35e3,0x35f6,0x360e,0x3620,0x362b,0x363b,0x3649,0x365e,0x3673,0x3689,0x36a3,0x36b9,0x36c9,0x36dd,0x36f1,0x3702, -0x371a,0x232e,1,0,0x68,0x3742,0x3765,0x376e,0x377b,0x3786,0x378f,0x379a,0x37a3,0x37bc,0x37c1,0x37ca, -0x37e7,0x37f0,0x37fd,0x3806,0x382a,0x3831,0x383a,0x384d,0x3858,0x3861,0x386c,0x3885,0x388e,0x389d,0x38a8,0x38b1, -0x38bc,0x38c5,0x38cc,0x38d5,0x38e0,0x38e9,0x3902,0x390b,0x3918,0x3923,0x3934,0x393f,0x3954,0x396b,0x3974,0x397d, -0x3996,0x39a1,0x39aa,0x39b3,0x39ca,0x39e7,0x39f2,0x3a03,0x3a0e,0x3a15,0x3a22,0x3a2f,0x3a5c,0x3a71,0x3a7a,0x3a95, -0x3ab8,0x3ad9,0x3afa,0x3b1f,0x3b46,0x3b67,0x3b8a,0x3bab,0x3bd2,0x3bf3,0x3c18,0x3c37,0x3c56,0x3c75,0x3c92,0x3cb3, -0x3cd4,0x3cf7,0x3d1c,0x3d3b,0x3d5a,0x3d7b,0x3da2,0x3dc7,0x3de6,0x3e07,0x3e2a,0x3e45,0x3e5e,0x3e79,0x3e92,0x3eaf, -0x3eca,0x3ee7,0x3f06,0x3f23,0x3f40,0x3f5f,0x3f7c,0x3f97,0x3fb4,0x3fd1,0x4004,0x402b,0x403e,0x2691,1,0, -6,0x406c,0x407b,0x408b,0x409b,0x40ab,0x40bc,0x26ef,1,0,0x30,0x40da,0x40e6,0x40f4,0x4103,0x4112, -0x4122,0x4133,0x4147,0x415c,0x4172,0x4185,0x4199,0x41a9,0x41b2,0x41bd,0x41cd,0x41e9,0x41fb,0x4209,0x4218,0x4224, -0x4239,0x424d,0x4260,0x426e,0x4282,0x4290,0x429a,0x42ac,0x42b8,0x42c6,0x42d6,0x42dd,0x42e4,0x42eb,0x42f2,0x42f9, -0x430f,0x4330,0x870,0x4342,0x434d,0x435c,0x4365,0x4370,0x4383,0x4394,0x43a5,0x297f,1,0,4,0x43c1, -0x43cc,0x43d8,0x43e2,0x29a5,1,0,0xc9,0x43f9,0x4406,0x441b,0x4428,0x4437,0x4445,0x4454,0x4463,0x4475, -0x4484,0x4492,0x44a3,0x44b2,0x44c1,0x44ce,0x44da,0x44e9,0x44f8,0x4502,0x450f,0x451c,0x452b,0x4539,0x4548,0x4554, -0x455e,0x456a,0x457a,0x458a,0x4598,0x45a4,0x45b5,0x45c1,0x45cd,0x45db,0x45e8,0x45f4,0x4601,0xea4,0x460e,0x461c, -0x4636,0x463f,0x464d,0x465b,0x4667,0x4676,0x4684,0x4692,0x469e,0x46ad,0x46bb,0x46c9,0x46d6,0x46e5,0x4700,0x470f, -0x4720,0x4731,0x4744,0x4756,0x4765,0x4777,0x4786,0x4792,0x479d,0x1fb4,0x47aa,0x47b5,0x47c0,0x47cb,0x47d6,0x47f1, -0x47fc,0x4807,0x4812,0x4825,0x4839,0x4844,0x4853,0x4862,0x486d,0x4878,0x4885,0x4894,0x48a2,0x48ad,0x48c8,0x48d2, -0x48e3,0x48f4,0x4903,0x4914,0x491f,0x492a,0x4935,0x4940,0x494b,0x4956,0x4961,0x496b,0x4976,0x4986,0x4991,0x499f, -0x49ac,0x49b7,0x49c6,0x49d3,0x49e0,0x49ef,0x49fc,0x4a0d,0x4a1f,0x4a2f,0x4a3a,0x4a4d,0x4a64,0x4a72,0x4a7f,0x4a8a, -0x4a97,0x4aa8,0x4ac4,0x4ada,0x4ae5,0x4b02,0x4b12,0x4b21,0x4b2c,0x4b37,0x20ce,0x4b43,0x4b4e,0x4b66,0x4b76,0x4b85, -0x4b93,0x4ba1,0x4bac,0x4bb7,0x4bcb,0x4be2,0x4bfa,0x4c0a,0x4c1a,0x4c2a,0x4c3c,0x4c47,0x4c52,0x4c5c,0x4c68,0x4c76, -0x4c89,0x4c95,0x4ca2,0x4cad,0x4cc9,0x4cd6,0x4ce4,0x4cfd,0x29ce,0x4d0c,0x27ef,0x4d19,0x4d27,0x4d39,0x4d47,0x4d53, -0x4d63,0x2c09,0x4d71,0x4d7d,0x4d88,0x4d93,0x4d9e,0x4db2,0x4dc0,0x4dd7,0x4de3,0x4df7,0x4e05,0x4e17,0x4e2d,0x4e3b, -0x4e4d,0x4e5b,0x4e78,0x4e8a,0x4e97,0x4ea8,0x4eba,0x4ed4,0x4ee1,0x4ef4,0x4f05,0x3186,0x4f12,0x32ca,0x4f21,0x4f33, -0x3403,1,0,6,0x4f58,0x4f6b,0x4f7b,0x4f89,0x4f9a,0x4faa,0x345f,0x12,0,1,0x4fd4,0x4fda, -0x346c,0x12,0,1,0x4fd4,0x4fda,0x3479,1,0,3,0x4fd4,0x4fda,0x5013,0x348f,1,0, -3,0x4fd4,0x4fda,0x5013,0x34a5,1,0,0x12,0x509d,0x50a7,0x50b3,0x50ba,0x50c5,0x50ca,0x50d1,0x50d8, -0x50e1,0x50e6,0x50eb,0x50fb,0x870,0x4342,0x5107,0x434d,0x5117,0x435c,0x354e,1,0,0xf,0x509d,0x513e, -0x5148,0x5152,0x515d,0x4218,0x5167,0x5173,0x517b,0x5182,0x518c,0x50b3,0x50ba,0x50ca,0x5196,0x35d5,1,0, -0x17,0x509d,0x51b3,0x5152,0x51bf,0x51cc,0x51da,0x4218,0x51e5,0x50b3,0x51f6,0x50ca,0x5205,0x5213,0x870,0x4330, -0x521f,0x5230,0x4342,0x5107,0x434d,0x5117,0x435c,0x5241,0x36f2,1,0,3,0x5274,0x527c,0x5284,0x370b, -1,0,0x10,0x52ad,0x52b4,0x52c3,0x52e4,0x5307,0x5312,0x5331,0x5348,0x5355,0x535e,0x537d,0x53b0,0x53cb, -0x53fa,0x5417,0x543c,0x37a4,1,0,0x24,0x548b,0x5498,0x54ab,0x54b8,0x54e5,0x550a,0x551f,0x553e,0x555f, -0x558c,0x55c5,0x55e8,0x560b,0x5638,0x566d,0x5694,0x56bd,0x56f4,0x5723,0x5744,0x5769,0x5778,0x579b,0x57b2,0x57bf, -0x57ce,0x57eb,0x5804,0x5827,0x584c,0x5865,0x587a,0x5889,0x589a,0x58a7,0x58c8,0x3974,1,0,4,0x5906, -0x5911,0x5929,0x5941,0x39b0,0x12,0,1,0x5971,0x5988,0x39c7,0x36,1,2,4,8,0xe, -0x10,0x20,0x3e,0x40,0x80,0x100,0x1c0,0x200,0x400,0x800,0xe00,0x1000,0x2000,0x4000,0x7000,0x8000, -0x10000,0x20000,0x40000,0x78001,0x80000,0x100000,0x200000,0x400000,0x800000,0x1000000,0x2000000,0x4000000,0x8000000,0xf000000,0x10000000,0x20000000, -0x30f80000,0x34e8,0x34f7,0x350c,0x3521,0x59c7,0x3536,0x354a,0x59bd,0x355b,0x356f,0x3582,0x59d8,0x3593,0x35ac,0x35be, -0x59ef,0x35cf,0x35e3,0x35f6,0x5a18,0x360e,0x3620,0x362b,0x363b,0x59b4,0x3649,0x365e,0x3673,0x3689,0x36a3,0x36b9, -0x36c9,0x36dd,0x36f1,0x5a0e,0x3702,0x371a,0x59f9,0x3cde,1,0,0xc,0x5ba3,0x5bc0,0x5bd7,0x5bfc,0x5c0f, -0x5c20,0x5c35,0x5c48,0x5c5d,0x5c78,0x5c91,0x5ca6 +const int32_t PropNameData::valueMaps[1494]={ +6,0,0x4c,0,0xff,0x368,0xff,0x37e,0xff,0x393,0xff,0x3a9,0xff,0x3b4,0xff,0x3d5, +0xff,0x3e5,0xff,0x3f4,0xff,0x402,0xff,0x426,0xff,0x43d,0xff,0x455,0xff,0x46c,0xff,0x47b, +0xff,0x48a,0xff,0x49b,0xff,0x4a9,0xff,0x4bb,0xff,0x4d5,0xff,0x4f0,0xff,0x505,0xff,0x522, +0xff,0x533,0xff,0x53e,0xff,0x55d,0xff,0x573,0xff,0x584,0xff,0x594,0xff,0x5af,0xff,0x5c8, +0xff,0x5d9,0xff,0x5f3,0xff,0x606,0xff,0x616,0xff,0x630,0xff,0x649,0xff,0x660,0xff,0x674, +0xff,0x68a,0xff,0x69e,0xff,0x6b4,0xff,0x6ce,0xff,0x6e6,0xff,0x702,0xff,0x70a,0xff,0x712, +0xff,0x71a,0xff,0x722,0xff,0x72b,0xff,0x738,0xff,0x74b,0xff,0x768,0xff,0x785,0xff,0x7a2, +0xff,0x7c0,0xff,0x7de,0xff,0x802,0xff,0x80f,0xff,0x829,0xff,0x83e,0xff,0x859,0xff,0x870, +0xff,0x887,0xff,0x8a9,0xff,0x8c8,0xff,0x8e1,0xff,0x90e,0xff,0x947,0xff,0x978,0xff,0x9a7, +0xff,0x9d6,0xff,0x9eb,0xff,0xa04,0xff,0xa2f,0xff,0xa60,0xff,0x1000,0x101b,0xa7d,0x17b,0xc9d, +0x196,0x346c,0x105,0x348b,0x2ed,0x35c9,0x303,0x3623,0x30d,0x3880,0x32f,0x41d7,0x39c,0x4247,0x3a6,0x452c, +0x3da,0x456a,0x3e2,0x5126,0x4b6,0x51a4,0x4c0,0x51c9,0x4c6,0x51e3,0x4cc,0x5204,0x4d3,0x521e,0x105,0x5243, +0x105,0x5269,0x4da,0x5313,0x4f0,0x538c,0x503,0x543e,0x51e,0x5475,0x525,0x5655,0x539,0x5afa,0x562,0x5b59, +0x56a,0x5b9e,0x570,0x2000,0x2001,0x5bc8,0x578,0x3000,0x3001,0x5c54,0,0x4000,0x400e,0x5c66,0,0x5c6f, +0,0x5c89,0,0x5c9a,0,0x5cab,0,0x5cc1,0,0x5cca,0,0x5ce7,0,0x5d05,0,0x5d23, +0,0x5d41,0,0x5d57,0,0x5d6b,0,0x5d81,0,0x7000,0x7002,0x5d9a,0,0x5db1,0x5c6,0x8de, +0x12,0,1,0x12,0x20,0x8fc,0x4a,0,1,6,7,8,9,0xa,0xb,0xc, +0xd,0xe,0xf,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c, +0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x54,0x5b,0x67,0x6b,0x76,0x7a,0x81,0x82, +0x84,0x85,0xc8,0xca,0xd6,0xd8,0xda,0xdc,0xde,0xe0,0xe2,0xe4,0xe6,0xe8,0xe9,0xea, +0xf0,0x2e,0x40,0x4c,0x5e,0x68,0x79,0x84,0x91,0x9e,0xab,0xb8,0xc5,0xd2,0xdf,0xec, +0xf9,0x106,0x113,0x120,0x12d,0x13a,0x147,0x154,0x161,0x16e,0x17b,0x188,0x195,0x1a2,0x1af,0x1bc, +0x1c9,0x1d6,0x1e3,0x1f0,0x1fd,0x20c,0x21b,0x22a,0x239,0x248,0x257,0x266,0x275,0x28f,0x2a3,0x2b7, +0x2d2,0x2e1,0x2ea,0x2fa,0x302,0x30b,0x31a,0x323,0x333,0x344,0x355,0xa9d,1,0,0x17,0xa8c, +0xa9d,0xaae,0xac2,0xad9,0xaf1,0xb03,0xb18,0xb2f,0xb44,0xb54,0xb66,0xb83,0xb9f,0xbb1,0xbce,0xbea, +0xc06,0xc1b,0xc30,0xc4a,0xc65,0xc80,0xc3f,1,0,0x153,0xca8,0xcb5,0xcc8,0xcf0,0xd0e,0xd2c, +0xd44,0xd6f,0xd99,0xdb1,0xdc4,0xdd7,0xde6,0xdf5,0xe04,0xe13,0xe2a,0xe3b,0xe4e,0xe61,0xe6e,0xe7b, +0xe8a,0xe9b,0xeb0,0xec1,0xecc,0xed5,0xee6,0xef7,0xf0a,0xf1c,0xf2f,0xf42,0xf81,0xf8e,0xf9b,0xfa8, +0xfbd,0xfed,0x1007,0x1028,0x1053,0x1076,0x10d4,0x10fb,0x1116,0x1125,0x114c,0x1174,0x1197,0x11ba,0x11e4,0x11fd, +0x121c,0x123f,0x1263,0x1276,0x1290,0x12ba,0x12d2,0x12fa,0x1323,0x1336,0x1349,0x135c,0x1383,0x1392,0x13b2,0x13e0, +0x13fe,0x142c,0x1448,0x1463,0x147c,0x1495,0x14b6,0x14e6,0x1505,0x1527,0x155b,0x1588,0x15cd,0x15ee,0x1618,0x1639, +0x1662,0x1675,0x16a8,0x16bf,0x16ce,0x16df,0x170a,0x1721,0x1752,0x1780,0x17c3,0x17ce,0x1807,0x1818,0x1829,0x1836, +0x1849,0x1883,0x18a7,0x18cb,0x1905,0x193d,0x1968,0x1980,0x19ac,0x19d8,0x19e5,0x19f4,0x1a11,0x1a33,0x1a61,0x1a81, +0x1aa8,0x1acf,0x1aee,0x1b01,0x1b12,0x1b23,0x1b48,0x1b6d,0x1b94,0x1bc8,0x1bf5,0x1c13,0x1c26,0x1c3f,0x1c78,0x1c87, +0x1ca7,0x1cc9,0x1ceb,0x1d02,0x1d19,0x1d46,0x1d5f,0x1d78,0x1da9,0x1dd3,0x1dee,0x1e01,0x1e20,0x1e29,0x1e3c,0x1e5a, +0x1e78,0x1e8b,0x1ea2,0x1eb7,0x1eec,0x1f10,0x1f25,0x1f34,0x1f47,0x1f6b,0x1f74,0x1f98,0x1faf,0x1fc2,0x1fd1,0x1fdc, +0x1ffd,0x2015,0x2024,0x2033,0x2042,0x2059,0x206e,0x2083,0x20bc,0x20cf,0x20eb,0x20f6,0x2103,0x2131,0x2155,0x2178, +0x218b,0x21ad,0x21c0,0x21db,0x21fe,0x2221,0x2246,0x2257,0x2286,0x22b3,0x22ca,0x22e5,0x22f4,0x231f,0x2357,0x2391, +0x23bf,0x23d0,0x23dd,0x2401,0x2410,0x242c,0x2446,0x2463,0x249b,0x24b0,0x24dd,0x24fc,0x252a,0x254a,0x257e,0x258d, +0x25b7,0x25da,0x2605,0x2610,0x2621,0x263c,0x2660,0x266d,0x2682,0x26a9,0x26d4,0x270b,0x271e,0x272f,0x275f,0x2770, +0x277f,0x2794,0x27b2,0x27c5,0x27d8,0x27ef,0x280c,0x2817,0x2820,0x2842,0x2857,0x287c,0x2893,0x28bc,0x28d7,0x28ec, +0x2905,0x2926,0x295b,0x296c,0x299d,0x29c1,0x29d2,0x29eb,0x29f6,0x2a23,0x2a45,0x2a73,0x2aa6,0x2ab5,0x2ac6,0x2ae3, +0x2b25,0x2b4c,0x2b59,0x2b6e,0x2b92,0x2bb8,0x2bf1,0x2c02,0x2c26,0x2c31,0x2c3e,0x2c4d,0x2c72,0x2ca0,0x2cbc,0x2cd9, +0x2ce6,0x2cf7,0x2d15,0x2d38,0x2d55,0x2d62,0x2d82,0x2d9f,0x2dc0,0x2de9,0x2dfa,0x2e19,0x2e32,0x2e4b,0x2e5c,0x2ea5, +0x2eb6,0x2ecf,0x2efe,0x2f2b,0x2f50,0x2f92,0x2fae,0x2fbd,0x2fd4,0x3002,0x301b,0x3044,0x305e,0x3099,0x30b7,0x30c6, +0x30e6,0x3101,0x3125,0x3141,0x315f,0x317d,0x3194,0x31a3,0x31ae,0x31eb,0x31fe,0x3228,0x3248,0x3276,0x329a,0x32c2, +0x32e7,0x32f2,0x330b,0x3339,0x3375,0x3382,0x339d,0x33b2,0x33d4,0x33e5,0x33f6,0x3440,0x344f,0x20b6,1,0, +0x12,0x34a2,0x34b2,0x34c5,0x34d5,0x34e5,0x34f4,0x3504,0x3516,0x3529,0x353b,0x354b,0x355b,0x356a,0x3579,0x3589, +0x3596,0x35a5,0x35b9,0x2174,1,0,6,0x35de,0x35e9,0x35f6,0x3603,0x3610,0x361b,0x21b8,1,0, +0x1e,0x3638,0x3647,0x365c,0x3671,0x3686,0x369a,0x36ab,0x36bf,0x36d2,0x36e3,0x36fc,0x370e,0x371f,0x3733,0x3746, +0x375e,0x3770,0x377b,0x378b,0x3799,0x37ae,0x37c3,0x37d9,0x37f3,0x3809,0x3819,0x382d,0x3841,0x3852,0x386a,0x23e3, +1,0,0x69,0x3892,0x38b5,0x38be,0x38cb,0x38d6,0x38df,0x38ea,0x38f3,0x390c,0x3911,0x391a,0x3937,0x3940, +0x394d,0x3956,0x398b,0x3992,0x399b,0x39ae,0x39b9,0x39c2,0x39cd,0x39e6,0x39ef,0x39fe,0x3a09,0x3a12,0x3a1d,0x3a26, +0x3a2d,0x3a36,0x3a41,0x3a4a,0x3a63,0x3a6c,0x3a79,0x3a84,0x3a95,0x3aa0,0x3ab5,0x3acc,0x3ad5,0x3ade,0x3af7,0x3b02, +0x3b0b,0x3b14,0x3b2b,0x3b48,0x3b53,0x3b64,0x3b6f,0x3b76,0x3b83,0x3b90,0x3bbd,0x3bd2,0x3bdb,0x3bf6,0x3c19,0x3c3a, +0x3c5b,0x3c80,0x3ca7,0x3cc8,0x3ceb,0x3d0c,0x3d33,0x3d54,0x3d79,0x3d98,0x3db7,0x3dd6,0x3df3,0x3e14,0x3e35,0x3e58, +0x3e7d,0x3e9c,0x3ebb,0x3edc,0x3f03,0x3f28,0x3f47,0x3f68,0x3f8b,0x3fa6,0x3fbf,0x3fda,0x3ff3,0x4010,0x402b,0x4048, +0x4067,0x4084,0x40a1,0x40c0,0x40dd,0x40f8,0x4115,0x4132,0x4165,0x418c,0x419f,0x41bc,0x2753,1,0,6, +0x41e8,0x41f7,0x4207,0x4217,0x4227,0x4238,0x27b1,1,0,0x30,0x4256,0x4262,0x4270,0x427f,0x428e,0x429e, +0x42af,0x42c3,0x42d8,0x42ee,0x4301,0x4315,0x4325,0x432e,0x4339,0x4349,0x4365,0x4377,0x4385,0x4394,0x43a0,0x43b5, +0x43c9,0x43dc,0x43ea,0x43fe,0x440c,0x4416,0x4428,0x4434,0x4442,0x4452,0x4459,0x4460,0x4467,0x446e,0x4475,0x448b, +0x44ac,0x870,0x44be,0x44c9,0x44d8,0x44e1,0x44ec,0x44ff,0x4510,0x4521,0x2a41,1,0,4,0x453d,0x4548, +0x4554,0x455e,0x2a67,1,0,0xd0,0x4575,0x4582,0x4597,0x45a4,0x45b3,0x45c1,0x45d0,0x45df,0x45f1,0x4600, +0x460e,0x461f,0x462e,0x463d,0x464a,0x4656,0x4665,0x4674,0x467e,0x468b,0x4698,0x46a7,0x46b5,0x46c4,0x46d0,0x46da, +0x46e6,0x46f6,0x4706,0x4714,0x4720,0x4731,0x473d,0x4749,0x4757,0x4764,0x4770,0x477d,0xec1,0x478a,0x4798,0x47b2, +0x47bb,0x47c9,0x47d7,0x47e3,0x47f2,0x4800,0x480e,0x481a,0x4829,0x4837,0x4845,0x4852,0x4861,0x487c,0x488b,0x489c, +0x48ad,0x48c0,0x48d2,0x48e1,0x48f3,0x4902,0x490e,0x4919,0x1fd1,0x4926,0x4931,0x493c,0x4947,0x4952,0x496d,0x4978, +0x4983,0x498e,0x49a1,0x49b5,0x49c0,0x49cf,0x49de,0x49e9,0x49f4,0x4a01,0x4a10,0x4a1e,0x4a29,0x4a44,0x4a4e,0x4a5f, +0x4a70,0x4a7f,0x4a90,0x4a9b,0x4aa6,0x4ab1,0x4abc,0x4ac7,0x4ad2,0x4add,0x4ae7,0x4af2,0x4b02,0x4b0d,0x4b1b,0x4b28, +0x4b33,0x4b42,0x4b4f,0x4b5c,0x4b6b,0x4b78,0x4b89,0x4b9b,0x4bab,0x4bb6,0x4bc9,0x4be0,0x4bee,0x4bfb,0x4c06,0x4c13, +0x4c24,0x4c40,0x4c56,0x4c61,0x4c7e,0x4c8e,0x4c9d,0x4ca8,0x4cb3,0x20eb,0x4cbf,0x4cca,0x4ce2,0x4cf2,0x4d01,0x4d0f, +0x4d1d,0x4d28,0x4d33,0x4d47,0x4d5e,0x4d76,0x4d86,0x4d96,0x4da6,0x4db8,0x4dc3,0x4dce,0x4dd8,0x4de4,0x4df2,0x4e05, +0x4e11,0x4e1e,0x4e29,0x4e45,0x4e52,0x4e60,0x4e79,0x29eb,0x4e88,0x280c,0x4e95,0x4ea3,0x4eb5,0x4ec3,0x4ecf,0x4edf, +0x2c26,0x4eed,0x4ef9,0x4f04,0x4f0f,0x4f1a,0x4f2e,0x4f3c,0x4f53,0x4f5f,0x4f73,0x4f81,0x4f93,0x4fa9,0x4fb7,0x4fc9, +0x4fd7,0x4ff4,0x5006,0x5013,0x5024,0x5036,0x5050,0x505d,0x5070,0x5081,0x31a3,0x508e,0x32e7,0x509d,0x50af,0x50ba, +0x50c6,0x50d9,0x50e9,0x50f7,0x5105,0x5112,0x3531,1,0,6,0x5140,0x5153,0x5163,0x5171,0x5182,0x5192, +0x358d,0x12,0,1,0x51bc,0x51c2,0x359a,0x12,0,1,0x51bc,0x51c2,0x35a7,1,0,3, +0x51bc,0x51c2,0x51fb,0x35bd,1,0,3,0x51bc,0x51c2,0x51fb,0x35d3,1,0,0x12,0x5285,0x528f, +0x529b,0x52a2,0x52ad,0x52b2,0x52b9,0x52c0,0x52c9,0x52ce,0x52d3,0x52e3,0x870,0x44be,0x52ef,0x44c9,0x52ff,0x44d8, +0x367c,1,0,0xf,0x5285,0x5326,0x5330,0x533a,0x5345,0x4394,0x534f,0x535b,0x5363,0x536a,0x5374,0x529b, +0x52a2,0x52b2,0x537e,0x3703,1,0,0x17,0x5285,0x539b,0x533a,0x53a7,0x53b4,0x53c2,0x4394,0x53cd,0x529b, +0x53de,0x52b2,0x53ed,0x53fb,0x870,0x44ac,0x5407,0x5418,0x44be,0x52ef,0x44c9,0x52ff,0x44d8,0x5429,0x3820,1, +0,3,0x545c,0x5464,0x546c,0x3839,1,0,0x10,0x5495,0x549c,0x54ab,0x54cc,0x54ef,0x54fa,0x5519, +0x5530,0x553d,0x5546,0x5565,0x5598,0x55b3,0x55e2,0x55ff,0x5624,0x38d2,1,0,0x25,0x5673,0x5680,0x5693, +0x56a0,0x56cd,0x56f2,0x5707,0x5726,0x5747,0x5774,0x57ad,0x57d0,0x57f3,0x5820,0x5855,0x587c,0x58a5,0x58dc,0x590b, +0x592c,0x5951,0x5960,0x5983,0x599a,0x59a7,0x59b6,0x59d3,0x59ec,0x5a0f,0x5a34,0x5a4d,0x5a62,0x5a71,0x5a82,0x5a8f, +0x5ab0,0x5ad5,0x3ab5,1,0,4,0x5b13,0x5b1e,0x5b36,0x5b4e,0x3af1,0x12,0,1,0x5b76,0x5b8d, +0x3b08,1,0,4,0x453d,0x56f2,0x53de,0x5bb9,0x3b2d,0x36,1,2,4,8,0xe,0x10, +0x20,0x3e,0x40,0x80,0x100,0x1c0,0x200,0x400,0x800,0xe00,0x1000,0x2000,0x4000,0x7000,0x8000,0x10000, +0x20000,0x40000,0x78001,0x80000,0x100000,0x200000,0x400000,0x800000,0x1000000,0x2000000,0x4000000,0x8000000,0xf000000,0x10000000,0x20000000,0x30f80000, +0x3638,0x3647,0x365c,0x3671,0x5bf6,0x3686,0x369a,0x5bec,0x36ab,0x36bf,0x36d2,0x5c07,0x36e3,0x36fc,0x370e,0x5c1e, +0x371f,0x3733,0x3746,0x5c47,0x375e,0x3770,0x377b,0x378b,0x5be3,0x3799,0x37ae,0x37c3,0x37d9,0x37f3,0x3809,0x3819, +0x382d,0x3841,0x5c3d,0x3852,0x386a,0x5c28,0x3e44,1,0,0xc,0x5dca,0x5de7,0x5dfe,0x5e23,0x5e36,0x5e47, +0x5e5c,0x5e6f,0x5e84,0x5e9f,0x5eb8,0x5ecd }; -const uint8_t PropNameData::bytesTries[15733]={ -0,0x15,0x6d,0xc3,0xc7,0x73,0xc2,0x12,0x76,0x7a,0x76,0x6a,0x77,0xa2,0x52,0x78, +const uint8_t PropNameData::bytesTries[16091]={ +0,0x15,0x6d,0xc3,0xe7,0x73,0xc2,0x12,0x76,0x7a,0x76,0x6a,0x77,0xa2,0x52,0x78, 1,0x64,0x50,0x69,0x10,0x64,1,0x63,0x30,0x73,0x62,0x13,0x74,0x61,0x72,0x74, 0x63,0x60,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x61,0x13,0x69,0x67,0x69,0x74, 0x81,3,0x61,0x2e,0x65,0x4c,0x6f,0xc3,0x18,0x73,0x69,0x1e,0x72,0x69,0x61,0x74, @@ -142,15 +144,17 @@ const uint8_t PropNameData::bytesTries[15733]={ 0x6e,0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3,0x11,0xd8,0x40,0xa,0x11,0x63, 0x63,0xc3,0x11,0x11,0x72,0x6d,0x58,0x1e,0x69,0x6e,0x61,0x6c,0x70,0x75,0x6e,0x63, 0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x59,0x1d,0x74,0x6c,0x65,0x63,0x61,0x73,0x65, -0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0xd9,0x40,0xa,0x6d,0xa2,0x76,0x6e,0xa2,0x78, -0x70,0xa4,0x3e,0x71,0xa4,0x90,0x72,3,0x61,0x2c,0x65,0x36,0x67,0x54,0x69,0x9d, +0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0xd9,0x40,0xa,0x6d,0xa2,0x76,0x6e,0xa2,0x98, +0x70,0xa4,0x5e,0x71,0xa4,0xb0,0x72,3,0x61,0x2c,0x65,0x36,0x67,0x54,0x69,0x9d, 0x14,0x64,0x69,0x63,0x61,0x6c,0x55,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e, 0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x9d,0x15,0x69,0x65,0x6d,0x6f,0x6a,0x69,0xa2, 0x47,3,0x66,0x44,0x6d,0x5c,0x74,0x7c,0x7a,0x19,0x77,0x6a,0x73,0x65,0x71,0x75, 0x65,0x6e,0x63,0x65,0xa3,0x46,0x1a,0x6c,0x61,0x67,0x73,0x65,0x71,0x75,0x65,0x6e, 0x63,0x65,0xa3,0x44,0x1e,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x73,0x65,0x71,0x75, 0x65,0x6e,0x63,0x65,0xa3,0x43,0x19,0x61,0x67,0x73,0x65,0x71,0x75,0x65,0x6e,0x63, -0x65,0xa3,0x45,0x12,0x61,0x74,0x68,0x4f,6,0x6f,0x39,0x6f,0x32,0x74,0xc3,9, +0x65,0xa3,0x45,2,0x61,0x54,0x63,0x58,0x6f,0x12,0x64,0x69,0x66,0x1f,0x69,0x65, +0x72,0x63,0x6f,0x6d,0x62,0x69,0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa3,0x4b, +0x11,0x74,0x68,0x4f,0x10,0x6d,0xa3,0x4b,6,0x6f,0x39,0x6f,0x32,0x74,0xc3,9, 0x75,0x54,0x76,0xd9,0x30,0,0x12,0x6e,0x63,0x68,0x1f,0x61,0x72,0x61,0x63,0x74, 0x65,0x72,0x63,0x6f,0x64,0x65,0x70,0x6f,0x69,0x6e,0x74,0x51,0x14,0x6d,0x65,0x72, 0x69,0x63,1,0x74,0x32,0x76,0x13,0x61,0x6c,0x75,0x65,0xd9,0x30,0,0x12,0x79, @@ -169,158 +173,162 @@ const uint8_t PropNameData::bytesTries[15733]={ 0x30,0x77,0x10,0x73,0x77,0x11,0x79,0x6e,0x75,0x12,0x65,0x72,0x6e,1,0x73,0x38, 0x77,0x18,0x68,0x69,0x74,0x65,0x73,0x70,0x61,0x63,0x65,0x77,0x14,0x79,0x6e,0x74, 0x61,0x78,0x75,0x10,0x6d,0x9f,1,0x6d,0x3c,0x75,0x1a,0x6f,0x74,0x61,0x74,0x69, -0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x53,0x12,0x61,0x72,0x6b,0x53,0x66,0xc2,0x4a,0x69, -0xc1,0x8e,0x69,0xa2,0x6f,0x6a,0xa4,0x5b,0x6c,4,0x62,0xc3,8,0x63,0x8c,0x65, +0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x53,0x12,0x61,0x72,0x6b,0x53,0x66,0xc2,0x72,0x69, +0xc1,0xb6,0x69,0xa2,0x6f,0x6a,0xa4,0x83,0x6c,4,0x62,0xc3,8,0x63,0x8c,0x65, 0x98,0x69,0xa2,0x56,0x6f,2,0x65,0x4b,0x67,0x4c,0x77,0x11,0x65,0x72,0x4c,0x13, 0x63,0x61,0x73,0x65,0x4c,0x16,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0xd9,0x40,4, 0x11,0x69,0x63,0x1f,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72,0x65,0x78,0x63,0x65,0x70, 0x74,0x69,0x6f,0x6e,0x4b,0xd8,0x40,4,0x11,0x63,0x63,0xc3,0x10,0x18,0x61,0x64, 0x63,0x61,0x6e,0x6f,0x6e,0x69,0x63,0x1f,0x61,0x6c,0x63,0x6f,0x6d,0x62,0x69,0x6e, 0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3,0x10,0x16,0x6e,0x65,0x62,0x72,0x65, -0x61,0x6b,0xc3,8,2,0x64,0x4a,0x6e,0xa2,0xad,0x73,1,0x63,0xd9,0x40,3, -0x6f,0x16,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0xd9,0x40,3,2,0x63,0xa2,0x44, -0x65,0xa2,0x6c,0x73,0x40,2,0x62,0x48,0x74,0x64,0x75,0xa2,0x48,0x1b,0x6e,0x61, -0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0xa3,0x48,0x44,0x1c,0x69,0x6e, -0x61,0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x45,0x46,1,0x61,0x40, -0x72,0x1c,0x69,0x6e,0x61,0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x47, -0x11,0x72,0x74,0x41,0x3e,0x10,0x6f,1,0x6d,0x30,0x6e,0x14,0x74,0x69,0x6e,0x75, -0x65,0x3f,0x16,0x70,0x61,0x74,0x6d,0x61,0x74,0x68,1,0x63,0x30,0x73,0x13,0x74, -0x61,0x72,0x74,0xa3,0x49,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0xa3,0x4a,1, -0x6e,0x36,0x6f,0x42,0x16,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x43,0x15,0x74,0x69, -0x66,0x69,0x65,0x72,1,0x73,0x30,0x74,0x12,0x79,0x70,0x65,0xd9,0x70,1,0x14, -0x74,0x61,0x74,0x75,0x73,0xc3,0x19,2,0x64,0x2e,0x70,0x86,0x73,0x10,0x63,0xc3, -0x17,0x11,0x69,0x63,1,0x70,0x46,0x73,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63, -0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x17,0x10,0x6f,0x1f,0x73,0x69,0x74, -0x69,0x6f,0x6e,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x16,0x10, -0x63,0xc3,0x16,2,0x67,0xc3,6,0x6f,0x26,0x74,0xc3,7,0x11,0x69,0x6e,1, -0x63,0x4a,0x69,0x11,0x6e,0x67,1,0x67,0x2e,0x74,0x12,0x79,0x70,0x65,0xc3,7, -0x13,0x72,0x6f,0x75,0x70,0xc3,6,0x48,0x15,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x49, -0x66,0x86,0x67,0xa2,0x4a,0x68,3,0x61,0x36,0x65,0x58,0x73,0x68,0x79,0x13,0x70, -0x68,0x65,0x6e,0x3d,0x1f,0x6e,0x67,0x75,0x6c,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c, -0x65,0x74,0x79,0x70,0x65,0xc3,0xb,0x10,0x78,0x3a,0x14,0x64,0x69,0x67,0x69,0x74, -0x3b,0x10,0x74,0xc3,0xb,0x16,0x75,0x6c,0x6c,0x63,0x6f,0x6d,0x70,0x1f,0x6f,0x73, -0x69,0x74,0x69,0x6f,0x6e,0x65,0x78,0x63,0x6c,0x75,0x73,0x69,0x6f,0x6e,0x33,2, -0x63,0xa2,0x44,0x65,0xa2,0x4b,0x72,3,0x61,0x34,0x62,0x84,0x65,0x8a,0x6c,0x12, -0x69,0x6e,0x6b,0x39,0x11,0x70,0x68,0x7c,0x12,0x65,0x6d,0x65,3,0x62,0x5e,0x63, -0x30,0x65,0x48,0x6c,0x12,0x69,0x6e,0x6b,0x39,0x1a,0x6c,0x75,0x73,0x74,0x65,0x72, -0x62,0x72,0x65,0x61,0x6b,0xc3,0x12,0x14,0x78,0x74,0x65,0x6e,0x64,0x37,0x12,0x61, -0x73,0x65,0x35,0x11,0x78,0x74,0x37,0xc2,5,1,0x62,0xc3,0x12,0x6d,0xd9,0x20, -0,0x1c,0x6e,0x65,0x72,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc2, -5,0x13,0x6d,0x61,0x73,0x6b,0xd9,0x20,0,0x61,0xa2,0xa2,0x62,0xa2,0xd0,0x63, -0xa4,0x4f,0x64,0xa6,0x1c,0x65,5,0x6d,0x75,0x6d,0x6e,0x70,0xa2,0x6b,0x78,0x10, -0x74,0x30,1,0x65,0x2c,0x70,0x12,0x69,0x63,0x74,0xa1,0x12,0x6e,0x64,0x65,1, -0x64,0x24,0x72,0x31,0x1b,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x69, -0x63,0xa1,0x10,0x6f,1,0x64,0x97,0x6a,0x10,0x69,0x92,3,0x63,0x44,0x6b,0x54, -0x6d,0x70,0x70,0x1a,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x95, -0x17,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x9b,0x1c,0x65,0x79,0x63,0x61,0x70, -0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0xa3,0x42,0x16,0x6f,0x64,0x69,0x66,0x69, -0x65,0x72,0x96,0x13,0x62,0x61,0x73,0x65,0x99,0x12,0x72,0x65,0x73,0x95,0x61,0x30, -0x62,0x4e,0x63,0x12,0x6f,0x6d,0x70,0x9b,0xc2,4,0x1b,0x73,0x74,0x61,0x73,0x69, -0x61,0x6e,0x77,0x69,0x64,0x74,0x68,0xc3,4,0x12,0x61,0x73,0x65,0x99,3,0x67, -0x44,0x68,0x4a,0x6c,0x4e,0x73,0x1a,0x63,0x69,0x69,0x68,0x65,0x78,0x64,0x69,0x67, -0x69,0x74,0x23,0x10,0x65,0xd9,0x40,0,0x11,0x65,0x78,0x23,1,0x6e,0x38,0x70, -0x11,0x68,0x61,0x20,0x14,0x62,0x65,0x74,0x69,0x63,0x21,0x11,0x75,0x6d,0x79,5, -0x6c,0x22,0x6c,0x36,0x6d,0x52,0x70,1,0x62,0xd9,0x40,0xd,0x74,0xc3,0x15,2, -0x61,0x32,0x6b,0xc3,1,0x6f,0x11,0x63,0x6b,0xc3,1,0x11,0x6e,0x6b,0x7b,0x10, -0x67,0xd9,0x40,1,0x61,0xa2,0x4f,0x63,0xc3,0,0x69,0x11,0x64,0x69,2,0x63, -0x54,0x6d,0x74,0x70,0x1b,0x61,0x69,0x72,0x65,0x64,0x62,0x72,0x61,0x63,0x6b,0x65, -0x74,0xd8,0x40,0xd,0x13,0x74,0x79,0x70,0x65,0xc3,0x15,0x24,1,0x6c,0x30,0x6f, -0x14,0x6e,0x74,0x72,0x6f,0x6c,0x25,0x12,0x61,0x73,0x73,0xc3,0,0x26,0x14,0x69, -0x72,0x72,0x6f,0x72,1,0x65,0x38,0x69,0x16,0x6e,0x67,0x67,0x6c,0x79,0x70,0x68, -0xd9,0x40,1,0x10,0x64,0x27,0x17,0x73,0x69,0x63,0x65,0x6d,0x6f,0x6a,0x69,0xa3, -0x41,6,0x68,0x7c,0x68,0x54,0x69,0x85,0x6f,0xa2,0x6f,0x77,4,0x63,0x30,0x6b, -0x36,0x6c,0x87,0x74,0x8b,0x75,0x89,1,0x66,0x8d,0x6d,0x8f,0x11,0x63,0x66,0x91, -0x18,0x61,0x6e,0x67,0x65,0x73,0x77,0x68,0x65,0x6e,4,0x63,0x44,0x6c,0x6c,0x6e, -0x7e,0x74,0x98,0x75,0x18,0x70,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x89,0x12, -0x61,0x73,0x65,1,0x66,0x30,0x6d,0x14,0x61,0x70,0x70,0x65,0x64,0x8f,0x14,0x6f, -0x6c,0x64,0x65,0x64,0x8d,0x18,0x6f,0x77,0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x87, -0x1c,0x66,0x6b,0x63,0x63,0x61,0x73,0x65,0x66,0x6f,0x6c,0x64,0x65,0x64,0x91,0x18, -0x69,0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x64,0x8b,0x13,0x6d,0x70,0x65,0x78,0x33, -0x61,0x2e,0x63,0xa2,0x48,0x66,0xd9,0x40,2,1,0x6e,0x72,0x73,0x10,0x65,3, -0x64,0x83,0x66,0x3a,0x69,0x4a,0x73,0x17,0x65,0x6e,0x73,0x69,0x74,0x69,0x76,0x65, -0x65,0x15,0x6f,0x6c,0x64,0x69,0x6e,0x67,0xd9,0x40,2,0x17,0x67,0x6e,0x6f,0x72, -0x61,0x62,0x6c,0x65,0x85,0x13,0x6f,0x6e,0x69,0x63,0x1f,0x61,0x6c,0x63,0x6f,0x6d, -0x62,0x69,0x6e,0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3,2,0x10,0x63,0xc3, -2,3,0x61,0x30,0x65,0x34,0x69,0xa2,0x41,0x74,0xc3,3,0x11,0x73,0x68,0x29, -2,0x63,0x3a,0x66,0x58,0x70,0x2c,0x16,0x72,0x65,0x63,0x61,0x74,0x65,0x64,0x2d, -0x1d,0x6f,0x6d,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x74,0x79,0x70,0x65,0xc3, -3,0x15,0x61,0x75,0x6c,0x74,0x69,0x67,0x1f,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65, -0x63,0x6f,0x64,0x65,0x70,0x6f,0x69,0x6e,0x74,0x2b,0x2a,0x10,0x61,0x2e,0x15,0x63, -0x72,0x69,0x74,0x69,0x63,0x2f,3,0x66,0x34,0x6e,0x3e,0x74,0x42,0x79,0x22,0x11, -0x65,0x73,0x23,0x20,0x13,0x61,0x6c,0x73,0x65,0x21,0x20,0x10,0x6f,0x21,0x22,0x12, -0x72,0x75,0x65,0x23,0xb,0x6b,0x5b,0x6f,0x23,0x6f,0x3c,0x72,0x4c,0x76,1,0x69, -0x24,0x72,0x33,0x13,0x72,0x61,0x6d,0x61,0x33,0x10,0x76,0x22,0x14,0x65,0x72,0x6c, -0x61,0x79,0x23,0xa2,0xe2,0x13,0x69,0x67,0x68,0x74,0xa3,0xe2,0x6b,0x58,0x6c,0x74, -0x6e,3,0x6b,0x2f,0x6f,0x30,0x72,0x21,0x75,0x12,0x6b,0x74,0x61,0x2f,0x19,0x74, -0x72,0x65,0x6f,0x72,0x64,0x65,0x72,0x65,0x64,0x21,1,0x61,0x24,0x76,0x31,0x18, -0x6e,0x61,0x76,0x6f,0x69,0x63,0x69,0x6e,0x67,0x31,0xa2,0xe0,0x12,0x65,0x66,0x74, -0xa3,0xe0,0x64,0x45,0x64,0x4e,0x68,0x88,0x69,1,0x6f,0x26,0x73,0xa3,0xf0,0x1a, -0x74,0x61,0x73,0x75,0x62,0x73,0x63,0x72,0x69,0x70,0x74,0xa3,0xf0,2,0x61,0xa3, -0xea,0x62,0xa3,0xe9,0x6f,0x13,0x75,0x62,0x6c,0x65,1,0x61,0x30,0x62,0x13,0x65, -0x6c,0x6f,0x77,0xa3,0xe9,0x13,0x62,0x6f,0x76,0x65,0xa3,0xea,0x12,0x61,0x6e,0x72, -0x2c,0x15,0x65,0x61,0x64,0x69,0x6e,0x67,0x2d,0x61,0xa2,0x7b,0x62,0xa2,0xd4,0x63, -0x11,0x63,0x63,4,0x31,0x3c,0x32,0xa2,0x42,0x33,0xa2,0x56,0x38,0xa2,0x64,0x39, -0x10,0x31,0xa3,0x5b,9,0x35,0xa,0x35,0x3f,0x36,0x41,0x37,0x43,0x38,0x45,0x39, -0x47,0x30,0x30,0x31,0x3c,0x32,0x42,0x33,0x4e,0x34,0x3d,0x34,1,0x33,0xa3,0x67, -0x37,0xa3,0x6b,0x36,0x10,0x38,0xa3,0x76,0x38,1,0x32,0xa3,0x7a,0x39,0xa3,0x81, -0x3a,2,0x30,0xa3,0x82,0x32,0xa3,0x84,0x33,0xa3,0x85,9,0x35,0xa,0x35,0x53, -0x36,0x55,0x37,0x57,0x38,0x59,0x39,0x5b,0x30,0x49,0x31,0x4b,0x32,0x4d,0x33,0x4f, -0x34,0x51,6,0x33,8,0x33,0x63,0x34,0x65,0x35,0x67,0x36,0x69,0x30,0x5d,0x31, -0x5f,0x32,0x61,0x10,0x34,0xa3,0x54,0xa2,0xe6,3,0x62,0xa0,0x6c,0xa3,0xe4,0x72, -0xa3,0xe8,0x74,2,0x61,0x74,0x62,0x7c,0x74,0x14,0x61,0x63,0x68,0x65,0x64,1, -0x61,0x3e,0x62,0x13,0x65,0x6c,0x6f,0x77,0xa2,0xca,0x13,0x6c,0x65,0x66,0x74,0xa3, -0xc8,0x13,0x62,0x6f,0x76,0x65,0xa2,0xd6,0x14,0x72,0x69,0x67,0x68,0x74,0xa3,0xd8, -0xa2,0xd6,0x10,0x72,0xa3,0xd8,0xa2,0xca,0x10,0x6c,0xa3,0xc8,0x12,0x6f,0x76,0x65, -0xa2,0xe6,1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3,0xe8,0x12,0x65,0x66, -0x74,0xa3,0xe4,0xa2,0xdc,2,0x65,0x2c,0x6c,0xa3,0xda,0x72,0xa3,0xde,0x12,0x6c, -0x6f,0x77,0xa2,0xdc,1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3,0xde,0x12, -0x65,0x66,0x74,0xa3,0xda,0xb,0x6e,0xc0,0xca,0x72,0x5f,0x72,0x46,0x73,0xa2,0x48, -0x77,1,0x68,0x24,0x73,0x33,0x17,0x69,0x74,0x65,0x73,0x70,0x61,0x63,0x65,0x33, -0x22,1,0x69,0x30,0x6c,2,0x65,0x3d,0x69,0x4b,0x6f,0x3f,0x18,0x67,0x68,0x74, -0x74,0x6f,0x6c,0x65,0x66,0x74,0x22,2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65, -0x72,0x72,0x69,0x64,0x65,0x3f,0x17,0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x3d, -0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4b,0x30,0x1e,0x65,0x67,0x6d,0x65,0x6e,0x74, -0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x31,0x6e,0xa2,0x41,0x6f,0xa2,0x53, -0x70,2,0x61,0x66,0x64,0x86,0x6f,0x1b,0x70,0x64,0x69,0x72,0x65,0x63,0x74,0x69, -0x6f,0x6e,0x61,0x6c,1,0x66,0x32,0x69,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4d, -0x14,0x6f,0x72,0x6d,0x61,0x74,0x41,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73, -0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x2f,1,0x66,0x41,0x69,0x4d,1,0x6f, -0x28,0x73,0x10,0x6d,0x43,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61, -0x72,0x6b,0x43,1,0x6e,0x35,0x74,0x19,0x68,0x65,0x72,0x6e,0x65,0x75,0x74,0x72, -0x61,0x6c,0x35,0x65,0x88,0x65,0x98,0x66,0xa2,0x6a,0x6c,0x20,1,0x65,0x30,0x72, -2,0x65,0x37,0x69,0x49,0x6f,0x39,0x18,0x66,0x74,0x74,0x6f,0x72,0x69,0x67,0x68, -0x74,0x20,2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65,0x72,0x72,0x69,0x64,0x65, -0x39,0x17,0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x37,0x15,0x73,0x6f,0x6c,0x61, -0x74,0x65,0x49,3,0x6e,0x25,0x73,0x27,0x74,0x29,0x75,0x15,0x72,0x6f,0x70,0x65, -0x61,0x6e,2,0x6e,0x3c,0x73,0x46,0x74,0x18,0x65,0x72,0x6d,0x69,0x6e,0x61,0x74, -0x6f,0x72,0x29,0x14,0x75,0x6d,0x62,0x65,0x72,0x25,0x17,0x65,0x70,0x61,0x72,0x61, -0x74,0x6f,0x72,0x27,1,0x69,0x28,0x73,0x10,0x69,0x47,0x1f,0x72,0x73,0x74,0x73, -0x74,0x72,0x6f,0x6e,0x67,0x69,0x73,0x6f,0x6c,0x61,0x74,0x65,0x47,0x61,0x4e,0x62, -0x84,0x63,1,0x6f,0x24,0x73,0x2d,0x1c,0x6d,0x6d,0x6f,0x6e,0x73,0x65,0x70,0x61, -0x72,0x61,0x74,0x6f,0x72,0x2d,2,0x6c,0x3b,0x6e,0x2b,0x72,0x13,0x61,0x62,0x69, -0x63,1,0x6c,0x30,0x6e,0x14,0x75,0x6d,0x62,0x65,0x72,0x2b,0x14,0x65,0x74,0x74, -0x65,0x72,0x3b,0x2e,1,0x6e,0x45,0x6f,0x1c,0x75,0x6e,0x64,0x61,0x72,0x79,0x6e, -0x65,0x75,0x74,0x72,0x61,0x6c,0x45,0,0x16,0x6d,0xc9,0x20,0x74,0xc2,0x30,0x77, -0x89,0x77,0x86,0x79,0xa2,0x46,0x7a,1,0x61,0x58,0x6e,0x1a,0x61,0x6d,0x65,0x6e, -0x6e,0x79,0x6d,0x75,0x73,0x69,0x63,0xa4,0x40,0x19,0x61,0x6c,0x6e,0x6f,0x74,0x61, -0x74,0x69,0x6f,0x6e,0xa5,0x40,0x1c,0x6e,0x61,0x62,0x61,0x7a,0x61,0x72,0x73,0x71, -0x75,0x61,0x72,0x65,0xa5,0x18,0x10,0x61,1,0x6e,0x36,0x72,0x16,0x61,0x6e,0x67, -0x63,0x69,0x74,0x69,0xa3,0xfc,0x12,0x63,0x68,0x6f,0xa5,0x2c,1,0x65,0x88,0x69, -2,0x6a,0x3c,0x72,0x68,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3, -0x48,0x12,0x69,0x6e,0x67,0xa2,0x74,0x1e,0x68,0x65,0x78,0x61,0x67,0x72,0x61,0x6d, -0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x74,0x16,0x61,0x64,0x69,0x63,0x61,0x6c, -0x73,0xa3,0x49,0x13,0x7a,0x69,0x64,0x69,0xa5,0x34,0x74,0xa2,0x65,0x75,0xa4,0x4f, -0x76,3,0x61,0x3c,0x65,0x80,0x69,0xa2,0x50,0x73,0xa2,0x6c,0x12,0x73,0x75,0x70, -0xa3,0x7d,1,0x69,0xa3,0x9f,0x72,0x1e,0x69,0x61,0x74,0x69,0x6f,0x6e,0x73,0x65, -0x6c,0x65,0x63,0x74,0x6f,0x72,0x73,0xa2,0x6c,0x19,0x73,0x75,0x70,0x70,0x6c,0x65, -0x6d,0x65,0x6e,0x74,0xa3,0x7d,1,0x64,0x3c,0x72,0x19,0x74,0x69,0x63,0x61,0x6c, -0x66,0x6f,0x72,0x6d,0x73,0xa3,0x91,0x14,0x69,0x63,0x65,0x78,0x74,0xa2,0xaf,0x16, -0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xaf,0x15,0x74,0x68,0x6b,0x75,0x71,0x69, -0xa5,0x3f,5,0x69,0x3f,0x69,0x5a,0x6f,0x8c,0x72,0x1c,0x61,0x6e,0x73,0x70,0x6f, +0x61,0x6b,0xc3,8,2,0x64,0x4a,0x6e,0xa2,0xbd,0x73,1,0x63,0xd9,0x40,3, +0x6f,0x16,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0xd9,0x40,3,3,0x63,0x3a,0x65, +0x8c,0x73,0xa2,0x5b,0x74,0x12,0x79,0x70,0x65,0xd9,0x70,1,0x3e,0x10,0x6f,1, +0x6d,0x30,0x6e,0x14,0x74,0x69,0x6e,0x75,0x65,0x3f,0x16,0x70,0x61,0x74,0x6d,0x61, +0x74,0x68,1,0x63,0x30,0x73,0x13,0x74,0x61,0x72,0x74,0xa3,0x49,0x16,0x6f,0x6e, +0x74,0x69,0x6e,0x75,0x65,0xa3,0x4a,1,0x6e,0x36,0x6f,0x42,0x16,0x67,0x72,0x61, +0x70,0x68,0x69,0x63,0x43,0x15,0x74,0x69,0x66,0x69,0x65,0x72,1,0x73,0x30,0x74, +0x12,0x79,0x70,0x65,0xd9,0x70,1,0x14,0x74,0x61,0x74,0x75,0x73,0xc3,0x19,0x40, +2,0x62,0x48,0x74,0x64,0x75,0xa2,0x48,0x1b,0x6e,0x61,0x72,0x79,0x6f,0x70,0x65, +0x72,0x61,0x74,0x6f,0x72,0xa3,0x48,0x44,0x1c,0x69,0x6e,0x61,0x72,0x79,0x6f,0x70, +0x65,0x72,0x61,0x74,0x6f,0x72,0x45,0x46,1,0x61,0x40,0x72,0x1c,0x69,0x6e,0x61, +0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x47,1,0x72,0x2c,0x74,0x11, +0x75,0x73,0xc3,0x19,0x10,0x74,0x41,3,0x63,0x34,0x64,0x38,0x70,0xa2,0x48,0x73, +0x10,0x63,0xc3,0x17,0x10,0x62,0xc3,0x1a,0x11,0x69,0x63,2,0x63,0x4a,0x70,0x64, +0x73,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x63,0x61,0x74,0x65,0x67,0x6f,0x72, +0x79,0xc3,0x17,0x1b,0x6f,0x6e,0x6a,0x75,0x6e,0x63,0x74,0x62,0x72,0x65,0x61,0x6b, +0xc3,0x1a,0x10,0x6f,0x1f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x63,0x61,0x74, +0x65,0x67,0x6f,0x72,0x79,0xc3,0x16,0x10,0x63,0xc3,0x16,2,0x67,0xc3,6,0x6f, +0x26,0x74,0xc3,7,0x11,0x69,0x6e,1,0x63,0x4a,0x69,0x11,0x6e,0x67,1,0x67, +0x2e,0x74,0x12,0x79,0x70,0x65,0xc3,7,0x13,0x72,0x6f,0x75,0x70,0xc3,6,0x48, +0x15,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x49,0x66,0x86,0x67,0xa2,0x4a,0x68,3,0x61, +0x36,0x65,0x58,0x73,0x68,0x79,0x13,0x70,0x68,0x65,0x6e,0x3d,0x1f,0x6e,0x67,0x75, +0x6c,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x74,0x79,0x70,0x65,0xc3,0xb,0x10, +0x78,0x3a,0x14,0x64,0x69,0x67,0x69,0x74,0x3b,0x10,0x74,0xc3,0xb,0x16,0x75,0x6c, +0x6c,0x63,0x6f,0x6d,0x70,0x1f,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x65,0x78,0x63, +0x6c,0x75,0x73,0x69,0x6f,0x6e,0x33,2,0x63,0xa2,0x44,0x65,0xa2,0x4b,0x72,3, +0x61,0x34,0x62,0x84,0x65,0x8a,0x6c,0x12,0x69,0x6e,0x6b,0x39,0x11,0x70,0x68,0x7c, +0x12,0x65,0x6d,0x65,3,0x62,0x5e,0x63,0x30,0x65,0x48,0x6c,0x12,0x69,0x6e,0x6b, +0x39,0x1a,0x6c,0x75,0x73,0x74,0x65,0x72,0x62,0x72,0x65,0x61,0x6b,0xc3,0x12,0x14, +0x78,0x74,0x65,0x6e,0x64,0x37,0x12,0x61,0x73,0x65,0x35,0x11,0x78,0x74,0x37,0xc2, +5,1,0x62,0xc3,0x12,0x6d,0xd9,0x20,0,0x1c,0x6e,0x65,0x72,0x61,0x6c,0x63, +0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc2,5,0x13,0x6d,0x61,0x73,0x6b,0xd9,0x20, +0,0x61,0xa2,0xa2,0x62,0xa2,0xd0,0x63,0xa4,0x4f,0x64,0xa6,0x1c,0x65,5,0x6d, +0x75,0x6d,0x6e,0x70,0xa2,0x6b,0x78,0x10,0x74,0x30,1,0x65,0x2c,0x70,0x12,0x69, +0x63,0x74,0xa1,0x12,0x6e,0x64,0x65,1,0x64,0x24,0x72,0x31,0x1b,0x70,0x69,0x63, +0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0xa1,0x10,0x6f,1,0x64,0x97,0x6a, +0x10,0x69,0x92,3,0x63,0x44,0x6b,0x54,0x6d,0x70,0x70,0x1a,0x72,0x65,0x73,0x65, +0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x95,0x17,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e, +0x74,0x9b,0x1c,0x65,0x79,0x63,0x61,0x70,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65, +0xa3,0x42,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x96,0x13,0x62,0x61,0x73,0x65, +0x99,0x12,0x72,0x65,0x73,0x95,0x61,0x30,0x62,0x4e,0x63,0x12,0x6f,0x6d,0x70,0x9b, +0xc2,4,0x1b,0x73,0x74,0x61,0x73,0x69,0x61,0x6e,0x77,0x69,0x64,0x74,0x68,0xc3, +4,0x12,0x61,0x73,0x65,0x99,3,0x67,0x44,0x68,0x4a,0x6c,0x4e,0x73,0x1a,0x63, +0x69,0x69,0x68,0x65,0x78,0x64,0x69,0x67,0x69,0x74,0x23,0x10,0x65,0xd9,0x40,0, +0x11,0x65,0x78,0x23,1,0x6e,0x38,0x70,0x11,0x68,0x61,0x20,0x14,0x62,0x65,0x74, +0x69,0x63,0x21,0x11,0x75,0x6d,0x79,5,0x6c,0x22,0x6c,0x36,0x6d,0x52,0x70,1, +0x62,0xd9,0x40,0xd,0x74,0xc3,0x15,2,0x61,0x32,0x6b,0xc3,1,0x6f,0x11,0x63, +0x6b,0xc3,1,0x11,0x6e,0x6b,0x7b,0x10,0x67,0xd9,0x40,1,0x61,0xa2,0x4f,0x63, +0xc3,0,0x69,0x11,0x64,0x69,2,0x63,0x54,0x6d,0x74,0x70,0x1b,0x61,0x69,0x72, +0x65,0x64,0x62,0x72,0x61,0x63,0x6b,0x65,0x74,0xd8,0x40,0xd,0x13,0x74,0x79,0x70, +0x65,0xc3,0x15,0x24,1,0x6c,0x30,0x6f,0x14,0x6e,0x74,0x72,0x6f,0x6c,0x25,0x12, +0x61,0x73,0x73,0xc3,0,0x26,0x14,0x69,0x72,0x72,0x6f,0x72,1,0x65,0x38,0x69, +0x16,0x6e,0x67,0x67,0x6c,0x79,0x70,0x68,0xd9,0x40,1,0x10,0x64,0x27,0x17,0x73, +0x69,0x63,0x65,0x6d,0x6f,0x6a,0x69,0xa3,0x41,6,0x68,0x7c,0x68,0x54,0x69,0x85, +0x6f,0xa2,0x6f,0x77,4,0x63,0x30,0x6b,0x36,0x6c,0x87,0x74,0x8b,0x75,0x89,1, +0x66,0x8d,0x6d,0x8f,0x11,0x63,0x66,0x91,0x18,0x61,0x6e,0x67,0x65,0x73,0x77,0x68, +0x65,0x6e,4,0x63,0x44,0x6c,0x6c,0x6e,0x7e,0x74,0x98,0x75,0x18,0x70,0x70,0x65, +0x72,0x63,0x61,0x73,0x65,0x64,0x89,0x12,0x61,0x73,0x65,1,0x66,0x30,0x6d,0x14, +0x61,0x70,0x70,0x65,0x64,0x8f,0x14,0x6f,0x6c,0x64,0x65,0x64,0x8d,0x18,0x6f,0x77, +0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x87,0x1c,0x66,0x6b,0x63,0x63,0x61,0x73,0x65, +0x66,0x6f,0x6c,0x64,0x65,0x64,0x91,0x18,0x69,0x74,0x6c,0x65,0x63,0x61,0x73,0x65, +0x64,0x8b,0x13,0x6d,0x70,0x65,0x78,0x33,0x61,0x2e,0x63,0xa2,0x48,0x66,0xd9,0x40, +2,1,0x6e,0x72,0x73,0x10,0x65,3,0x64,0x83,0x66,0x3a,0x69,0x4a,0x73,0x17, +0x65,0x6e,0x73,0x69,0x74,0x69,0x76,0x65,0x65,0x15,0x6f,0x6c,0x64,0x69,0x6e,0x67, +0xd9,0x40,2,0x17,0x67,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65,0x85,0x13,0x6f,0x6e, +0x69,0x63,0x1f,0x61,0x6c,0x63,0x6f,0x6d,0x62,0x69,0x6e,0x69,0x6e,0x67,0x63,0x6c, +0x61,0x73,0x73,0xc3,2,0x10,0x63,0xc3,2,3,0x61,0x30,0x65,0x34,0x69,0xa2, +0x41,0x74,0xc3,3,0x11,0x73,0x68,0x29,2,0x63,0x3a,0x66,0x58,0x70,0x2c,0x16, +0x72,0x65,0x63,0x61,0x74,0x65,0x64,0x2d,0x1d,0x6f,0x6d,0x70,0x6f,0x73,0x69,0x74, +0x69,0x6f,0x6e,0x74,0x79,0x70,0x65,0xc3,3,0x15,0x61,0x75,0x6c,0x74,0x69,0x67, +0x1f,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65,0x63,0x6f,0x64,0x65,0x70,0x6f,0x69,0x6e, +0x74,0x2b,0x2a,0x10,0x61,0x2e,0x15,0x63,0x72,0x69,0x74,0x69,0x63,0x2f,3,0x66, +0x34,0x6e,0x3e,0x74,0x42,0x79,0x22,0x11,0x65,0x73,0x23,0x20,0x13,0x61,0x6c,0x73, +0x65,0x21,0x20,0x10,0x6f,0x21,0x22,0x12,0x72,0x75,0x65,0x23,0xb,0x6b,0x5b,0x6f, +0x23,0x6f,0x3c,0x72,0x4c,0x76,1,0x69,0x24,0x72,0x33,0x13,0x72,0x61,0x6d,0x61, +0x33,0x10,0x76,0x22,0x14,0x65,0x72,0x6c,0x61,0x79,0x23,0xa2,0xe2,0x13,0x69,0x67, +0x68,0x74,0xa3,0xe2,0x6b,0x58,0x6c,0x74,0x6e,3,0x6b,0x2f,0x6f,0x30,0x72,0x21, +0x75,0x12,0x6b,0x74,0x61,0x2f,0x19,0x74,0x72,0x65,0x6f,0x72,0x64,0x65,0x72,0x65, +0x64,0x21,1,0x61,0x24,0x76,0x31,0x18,0x6e,0x61,0x76,0x6f,0x69,0x63,0x69,0x6e, +0x67,0x31,0xa2,0xe0,0x12,0x65,0x66,0x74,0xa3,0xe0,0x64,0x45,0x64,0x4e,0x68,0x88, +0x69,1,0x6f,0x26,0x73,0xa3,0xf0,0x1a,0x74,0x61,0x73,0x75,0x62,0x73,0x63,0x72, +0x69,0x70,0x74,0xa3,0xf0,2,0x61,0xa3,0xea,0x62,0xa3,0xe9,0x6f,0x13,0x75,0x62, +0x6c,0x65,1,0x61,0x30,0x62,0x13,0x65,0x6c,0x6f,0x77,0xa3,0xe9,0x13,0x62,0x6f, +0x76,0x65,0xa3,0xea,0x12,0x61,0x6e,0x72,0x2c,0x15,0x65,0x61,0x64,0x69,0x6e,0x67, +0x2d,0x61,0xa2,0x7b,0x62,0xa2,0xd4,0x63,0x11,0x63,0x63,4,0x31,0x3c,0x32,0xa2, +0x42,0x33,0xa2,0x56,0x38,0xa2,0x64,0x39,0x10,0x31,0xa3,0x5b,9,0x35,0xa,0x35, +0x3f,0x36,0x41,0x37,0x43,0x38,0x45,0x39,0x47,0x30,0x30,0x31,0x3c,0x32,0x42,0x33, +0x4e,0x34,0x3d,0x34,1,0x33,0xa3,0x67,0x37,0xa3,0x6b,0x36,0x10,0x38,0xa3,0x76, +0x38,1,0x32,0xa3,0x7a,0x39,0xa3,0x81,0x3a,2,0x30,0xa3,0x82,0x32,0xa3,0x84, +0x33,0xa3,0x85,9,0x35,0xa,0x35,0x53,0x36,0x55,0x37,0x57,0x38,0x59,0x39,0x5b, +0x30,0x49,0x31,0x4b,0x32,0x4d,0x33,0x4f,0x34,0x51,6,0x33,8,0x33,0x63,0x34, +0x65,0x35,0x67,0x36,0x69,0x30,0x5d,0x31,0x5f,0x32,0x61,0x10,0x34,0xa3,0x54,0xa2, +0xe6,3,0x62,0xa0,0x6c,0xa3,0xe4,0x72,0xa3,0xe8,0x74,2,0x61,0x74,0x62,0x7c, +0x74,0x14,0x61,0x63,0x68,0x65,0x64,1,0x61,0x3e,0x62,0x13,0x65,0x6c,0x6f,0x77, +0xa2,0xca,0x13,0x6c,0x65,0x66,0x74,0xa3,0xc8,0x13,0x62,0x6f,0x76,0x65,0xa2,0xd6, +0x14,0x72,0x69,0x67,0x68,0x74,0xa3,0xd8,0xa2,0xd6,0x10,0x72,0xa3,0xd8,0xa2,0xca, +0x10,0x6c,0xa3,0xc8,0x12,0x6f,0x76,0x65,0xa2,0xe6,1,0x6c,0x30,0x72,0x13,0x69, +0x67,0x68,0x74,0xa3,0xe8,0x12,0x65,0x66,0x74,0xa3,0xe4,0xa2,0xdc,2,0x65,0x2c, +0x6c,0xa3,0xda,0x72,0xa3,0xde,0x12,0x6c,0x6f,0x77,0xa2,0xdc,1,0x6c,0x30,0x72, +0x13,0x69,0x67,0x68,0x74,0xa3,0xde,0x12,0x65,0x66,0x74,0xa3,0xda,0xb,0x6e,0xc0, +0xca,0x72,0x5f,0x72,0x46,0x73,0xa2,0x48,0x77,1,0x68,0x24,0x73,0x33,0x17,0x69, +0x74,0x65,0x73,0x70,0x61,0x63,0x65,0x33,0x22,1,0x69,0x30,0x6c,2,0x65,0x3d, +0x69,0x4b,0x6f,0x3f,0x18,0x67,0x68,0x74,0x74,0x6f,0x6c,0x65,0x66,0x74,0x22,2, +0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x3f,0x17,0x6d, +0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x3d,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4b, +0x30,0x1e,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f, +0x72,0x31,0x6e,0xa2,0x41,0x6f,0xa2,0x53,0x70,2,0x61,0x66,0x64,0x86,0x6f,0x1b, +0x70,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x61,0x6c,1,0x66,0x32,0x69, +0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4d,0x14,0x6f,0x72,0x6d,0x61,0x74,0x41,0x1f, +0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72, +0x2f,1,0x66,0x41,0x69,0x4d,1,0x6f,0x28,0x73,0x10,0x6d,0x43,0x1b,0x6e,0x73, +0x70,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x43,1,0x6e,0x35,0x74,0x19, +0x68,0x65,0x72,0x6e,0x65,0x75,0x74,0x72,0x61,0x6c,0x35,0x65,0x88,0x65,0x98,0x66, +0xa2,0x6a,0x6c,0x20,1,0x65,0x30,0x72,2,0x65,0x37,0x69,0x49,0x6f,0x39,0x18, +0x66,0x74,0x74,0x6f,0x72,0x69,0x67,0x68,0x74,0x20,2,0x65,0x38,0x69,0x48,0x6f, +0x16,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x39,0x17,0x6d,0x62,0x65,0x64,0x64,0x69, +0x6e,0x67,0x37,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x49,3,0x6e,0x25,0x73,0x27, +0x74,0x29,0x75,0x15,0x72,0x6f,0x70,0x65,0x61,0x6e,2,0x6e,0x3c,0x73,0x46,0x74, +0x18,0x65,0x72,0x6d,0x69,0x6e,0x61,0x74,0x6f,0x72,0x29,0x14,0x75,0x6d,0x62,0x65, +0x72,0x25,0x17,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x27,1,0x69,0x28,0x73, +0x10,0x69,0x47,0x1f,0x72,0x73,0x74,0x73,0x74,0x72,0x6f,0x6e,0x67,0x69,0x73,0x6f, +0x6c,0x61,0x74,0x65,0x47,0x61,0x4e,0x62,0x84,0x63,1,0x6f,0x24,0x73,0x2d,0x1c, +0x6d,0x6d,0x6f,0x6e,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x2d,2,0x6c, +0x3b,0x6e,0x2b,0x72,0x13,0x61,0x62,0x69,0x63,1,0x6c,0x30,0x6e,0x14,0x75,0x6d, +0x62,0x65,0x72,0x2b,0x14,0x65,0x74,0x74,0x65,0x72,0x3b,0x2e,1,0x6e,0x45,0x6f, +0x1c,0x75,0x6e,0x64,0x61,0x72,0x79,0x6e,0x65,0x75,0x74,0x72,0x61,0x6c,0x45,0, +0x16,0x6d,0xc9,0x5e,0x74,0xc2,0x48,0x77,0x89,0x77,0x86,0x79,0xa2,0x46,0x7a,1, +0x61,0x58,0x6e,0x1a,0x61,0x6d,0x65,0x6e,0x6e,0x79,0x6d,0x75,0x73,0x69,0x63,0xa4, +0x40,0x19,0x61,0x6c,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0xa5,0x40,0x1c,0x6e, +0x61,0x62,0x61,0x7a,0x61,0x72,0x73,0x71,0x75,0x61,0x72,0x65,0xa5,0x18,0x10,0x61, +1,0x6e,0x36,0x72,0x16,0x61,0x6e,0x67,0x63,0x69,0x74,0x69,0xa3,0xfc,0x12,0x63, +0x68,0x6f,0xa5,0x2c,1,0x65,0x88,0x69,2,0x6a,0x3c,0x72,0x68,0x73,0x17,0x79, +0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3,0x48,0x12,0x69,0x6e,0x67,0xa2,0x74,0x1e, +0x68,0x65,0x78,0x61,0x67,0x72,0x61,0x6d,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3, +0x74,0x16,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0xa3,0x49,0x13,0x7a,0x69,0x64,0x69, +0xa5,0x34,0x74,0xa2,0x65,0x75,0xa4,0x67,0x76,3,0x61,0x3c,0x65,0x80,0x69,0xa2, +0x50,0x73,0xa2,0x6c,0x12,0x73,0x75,0x70,0xa3,0x7d,1,0x69,0xa3,0x9f,0x72,0x1e, +0x69,0x61,0x74,0x69,0x6f,0x6e,0x73,0x65,0x6c,0x65,0x63,0x74,0x6f,0x72,0x73,0xa2, +0x6c,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x7d,1,0x64, +0x3c,0x72,0x19,0x74,0x69,0x63,0x61,0x6c,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x91,0x14, +0x69,0x63,0x65,0x78,0x74,0xa2,0xaf,0x16,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3, +0xaf,0x15,0x74,0x68,0x6b,0x75,0x71,0x69,0xa5,0x3f,6,0x69,0x57,0x69,0x44,0x6f, +0x76,0x72,0x8e,0x75,0x19,0x6c,0x75,0x74,0x69,0x67,0x61,0x6c,0x61,0x72,0x69,0xa5, +0x52,2,0x62,0x34,0x66,0x3c,0x72,0x13,0x68,0x75,0x74,0x61,0xa3,0xfb,0x13,0x65, +0x74,0x61,0x6e,0x57,0x14,0x69,0x6e,0x61,0x67,0x68,0xa3,0x90,1,0x64,0x2a,0x74, +0x10,0x6f,0xa5,0x3d,0x12,0x68,0x72,0x69,0xa5,0x51,0x1c,0x61,0x6e,0x73,0x70,0x6f, 0x72,0x74,0x61,0x6e,0x64,0x6d,0x61,0x70,0xa2,0xcf,0x16,0x73,0x79,0x6d,0x62,0x6f, -0x6c,0x73,0xa3,0xcf,2,0x62,0x34,0x66,0x3c,0x72,0x13,0x68,0x75,0x74,0x61,0xa3, -0xfb,0x13,0x65,0x74,0x61,0x6e,0x57,0x14,0x69,0x6e,0x61,0x67,0x68,0xa3,0x90,0x11, -0x74,0x6f,0xa5,0x3d,0x61,0x3e,0x65,0xa2,0xa0,0x68,0x10,0x61,1,0x61,0x24,0x69, +0x6c,0x73,0xa3,0xcf,0x61,0x3e,0x65,0xa2,0xa0,0x68,0x10,0x61,1,0x61,0x24,0x69, 0x53,0x11,0x6e,0x61,0x3d,4,0x67,0x8e,0x69,0xa2,0x49,0x6b,0xa2,0x72,0x6d,0xa2, 0x74,0x6e,0x10,0x67,1,0x73,0x68,0x75,0x10,0x74,0xa4,0x10,1,0x63,0x40,0x73, 0x11,0x75,0x70,0xa4,0x33,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x33,0x18, @@ -336,518 +344,528 @@ const uint8_t PropNameData::bytesTries[15733]={ 0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x73,0x62,0x17,0x65,0x78,0x74,0x65,0x6e,0x64, 0x65,0x64,0xa2,0xad,0x10,0x61,0xa5,0x3e,0x11,0x61,0x73,0x62,0x12,0x65,0x78,0x74, 0xa2,0xad,0x10,0x61,0xa5,0x3e,0x15,0x61,0x72,0x69,0x74,0x69,0x63,0xa3,0x78,0x70, -0xc3,0x4b,0x70,0xa6,0x61,0x72,0xa8,0x1d,0x73,7,0x6f,0xc1,0xbe,0x6f,0xa2,0x69, -0x70,0xa2,0x85,0x75,0xa2,0xa4,0x79,2,0x6c,0x50,0x6d,0x62,0x72,0x12,0x69,0x61, +0xc3,0x64,0x70,0xa6,0x7a,0x72,0xa8,0x36,0x73,7,0x6f,0xc1,0xd7,0x6f,0xa2,0x79, +0x70,0xa2,0x95,0x75,0xa2,0xb4,0x79,2,0x6c,0x50,0x6d,0x62,0x72,0x12,0x69,0x61, 0x63,0x3a,0x12,0x73,0x75,0x70,0xa4,0x17,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, 0xa5,0x17,0x17,0x6f,0x74,0x69,0x6e,0x61,0x67,0x72,0x69,0xa3,0x8f,0x13,0x62,0x6f, -0x6c,0x73,1,0x61,0x4c,0x66,0x10,0x6f,0x1f,0x72,0x6c,0x65,0x67,0x61,0x63,0x79, -0x63,0x6f,0x6d,0x70,0x75,0x74,0x69,0x6e,0x67,0xa5,0x32,0x1f,0x6e,0x64,0x70,0x69, +0x6c,0x73,1,0x61,0x6c,0x66,0x10,0x6f,0x1f,0x72,0x6c,0x65,0x67,0x61,0x63,0x79, +0x63,0x6f,0x6d,0x70,0x75,0x74,0x69,0x6e,0x67,0xa4,0x32,0x12,0x73,0x75,0x70,0xa4, +0x50,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x50,0x1f,0x6e,0x64,0x70,0x69, 0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x78,0x74,1,0x61,0xa5,0x2a, 0x65,0x14,0x6e,0x64,0x65,0x64,0x61,0xa5,0x2a,2,0x67,0x34,0x72,0x3e,0x79,0x13, 0x6f,0x6d,0x62,0x6f,0xa5,0x16,0x13,0x64,0x69,0x61,0x6e,0xa5,0x23,0x17,0x61,0x73, 0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0xda,1,0x61,0x32,0x65,0x14,0x63,0x69,0x61, 0x6c,0x73,0xa3,0x56,0x12,0x63,0x69,0x6e,0x1f,0x67,0x6d,0x6f,0x64,0x69,0x66,0x69, -0x65,0x72,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,2,0x6e,0x48,0x70,0x76,0x74, +0x65,0x72,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,2,0x6e,0x48,0x70,0x88,0x74, 0x1d,0x74,0x6f,0x6e,0x73,0x69,0x67,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa5, -6,0x15,0x64,0x61,0x6e,0x65,0x73,0x65,0xa2,0x9b,0x12,0x73,0x75,0x70,0xa2,0xdb, -0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xdb,4,0x61,0xa2,0xa8,0x65,0x5c, -0x6d,0x9e,0x70,0xa2,0x4b,0x73,0x13,0x79,0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61,0x6e, -0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa5,5,0x10,0x72, -1,0x61,0x4e,0x73,0x12,0x63,0x72,0x69,0x1f,0x70,0x74,0x73,0x61,0x6e,0x64,0x73, -0x75,0x62,0x73,0x63,0x72,0x69,0x70,0x74,0x73,0x73,0x14,0x6e,0x64,0x73,0x75,0x62, -0x73,0x1b,0x61,0x74,0x68,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a, -1,0x6c,0x40,0x75,1,0x61,0x6e,0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f, -0x6e,0xa3,0x8e,0x15,0x65,0x6d,0x65,0x6e,0x74,0x61,1,0x6c,0x50,0x72,0x1e,0x79, -0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0x61,0x72,0x65,0x61,1,0x61, -0xa3,0x6d,0x62,0xa3,0x6e,3,0x61,0x5c,0x6d,0x78,0x70,0xa2,0x41,0x73,0x13,0x79, -0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61,0x6e,0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72, -0x61,0x70,0x68,0x73,0xa5,5,0x14,0x72,0x72,0x6f,0x77,0x73,2,0x61,0xa3,0x67, -0x62,0xa3,0x68,0x63,0xa3,0xfa,0x13,0x61,0x74,0x68,0x65,0x1f,0x6d,0x61,0x74,0x69, -0x63,0x61,0x6c,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a,0x19,0x75, -0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x8e,0x61,0x88,0x68,0xa2,0x48, -0x69,0xa2,0x71,0x6d,0x12,0x61,0x6c,0x6c,1,0x66,0x46,0x6b,0x15,0x61,0x6e,0x61, -0x65,0x78,0x74,0xa4,0x29,0x15,0x65,0x6e,0x73,0x69,0x6f,0x6e,0xa5,0x29,0x12,0x6f, -0x72,0x6d,1,0x73,0xa3,0x54,0x76,0x16,0x61,0x72,0x69,0x61,0x6e,0x74,0x73,0xa3, -0x54,1,0x6d,0x36,0x75,0x16,0x72,0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0xa1,0x15, -0x61,0x72,0x69,0x74,0x61,0x6e,0xa3,0xac,1,0x61,0x52,0x6f,0x13,0x72,0x74,0x68, -0x61,0x1f,0x6e,0x64,0x66,0x6f,0x72,0x6d,0x61,0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f, -0x6c,0x73,0xa3,0xf7,1,0x72,0x2e,0x76,0x12,0x69,0x61,0x6e,0xa3,0x79,0x12,0x61, -0x64,0x61,0xa3,0xd9,1,0x64,0x50,0x6e,0x13,0x68,0x61,0x6c,0x61,0x50,0x1d,0x61, -0x72,0x63,0x68,0x61,0x69,0x63,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0xf9,0x13, -0x64,0x68,0x61,0x6d,0xa3,0xf8,5,0x72,0x35,0x72,0x44,0x73,0x64,0x75,1,0x61, -0xa3,0x4e,0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x71,0x17,0x69,0x76, -0x61,0x74,0x65,0x75,0x73,0x65,0xa2,0x4e,0x13,0x61,0x72,0x65,0x61,0xa3,0x4e,0x1b, -0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76,0x69,0xa3,0xf6,0x61,0x40, -0x68,0x82,0x6c,0x19,0x61,0x79,0x69,0x6e,0x67,0x63,0x61,0x72,0x64,0x73,0xa3,0xcc, -2,0x68,0x38,0x6c,0x4a,0x75,0x15,0x63,0x69,0x6e,0x68,0x61,0x75,0xa3,0xf5,0x17, -0x61,0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xf3,0x15,0x6d,0x79,0x72,0x65,0x6e, -0x65,0xa3,0xf4,1,0x61,0x8e,0x6f,1,0x65,0x74,0x6e,0x16,0x65,0x74,0x69,0x63, -0x65,0x78,0x74,0xa2,0x72,1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0x8d,0x15,0x6e, -0x73,0x69,0x6f,0x6e,0x73,0xa2,0x72,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65, -0x6e,0x74,0xa3,0x8d,0x15,0x6e,0x69,0x63,0x69,0x61,0x6e,0xa3,0x97,1,0x67,0x3e, -0x69,0x13,0x73,0x74,0x6f,0x73,0xa2,0xa6,0x13,0x64,0x69,0x73,0x63,0xa3,0xa6,0x12, -0x73,0x70,0x61,0xa3,0x96,1,0x65,0x5c,0x75,1,0x6d,0x2a,0x6e,0x11,0x69,0x63, -0x67,0x10,0x69,0xa2,0xc0,0x1d,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0x79,0x6d, -0x62,0x6f,0x6c,0x73,0xa3,0xc0,0x13,0x6a,0x61,0x6e,0x67,0xa3,0xa3,0x6d,0xa2,0xf0, -0x6e,0xa8,0x23,0x6f,6,0x70,0x63,0x70,0x56,0x72,0x8a,0x73,0xa2,0x4c,0x74,0x10, -0x74,0x1f,0x6f,0x6d,0x61,0x6e,0x73,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65, -0x72,0x73,0xa5,0x28,0x18,0x74,0x69,0x63,0x61,0x6c,0x63,0x68,0x61,0x72,0x1f,0x61, -0x63,0x74,0x65,0x72,0x72,0x65,0x63,0x6f,0x67,0x6e,0x69,0x74,0x69,0x6f,0x6e,0x85, -1,0x69,0x46,0x6e,0x1e,0x61,0x6d,0x65,0x6e,0x74,0x61,0x6c,0x64,0x69,0x6e,0x67, -0x62,0x61,0x74,0x73,0xa3,0xf2,0x11,0x79,0x61,0x47,1,0x61,0x30,0x6d,0x13,0x61, -0x6e,0x79,0x61,0xa3,0x7a,0x11,0x67,0x65,0xa5,0xf,0x63,0xa2,0x7b,0x67,0xa2,0x7b, -0x6c,1,0x63,0xa2,0x6c,0x64,6,0x70,0x42,0x70,0x3a,0x73,0x5a,0x74,0x88,0x75, -0x14,0x79,0x67,0x68,0x75,0x72,0xa5,0x3b,0x11,0x65,0x72,1,0x6d,0x2e,0x73,0x12, -0x69,0x61,0x6e,0xa3,0x8c,0x11,0x69,0x63,0xa3,0xf1,0x10,0x6f,1,0x67,0x3a,0x75, -0x18,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xbb,0x13,0x64,0x69,0x61, -0x6e,0xa5,0x22,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3,0xbf,0x68,0x42,0x69,0x54,0x6e, -0x1a,0x6f,0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xf0,0x17,0x75, -0x6e,0x67,0x61,0x72,0x69,0x61,0x6e,0xa5,4,0x14,0x74,0x61,0x6c,0x69,0x63,0xa3, -0x58,0x13,0x68,0x69,0x6b,0x69,0xa3,0x9d,0x10,0x72,0x85,0x12,0x68,0x61,0x6d,0x65, -6,0x6f,0x86,0x6f,0x6c,0x72,0xa2,0x61,0x75,0xa2,0x62,0x79,0x14,0x61,0x6e,0x6d, -0x61,0x72,0x58,0x12,0x65,0x78,0x74,2,0x61,0xa3,0xb6,0x62,0xa3,0xee,0x65,0x13, -0x6e,0x64,0x65,0x64,1,0x61,0xa3,0xb6,0x62,0xa3,0xee,1,0x64,0x52,0x6e,0x15, -0x67,0x6f,0x6c,0x69,0x61,0x6e,0x6a,0x12,0x73,0x75,0x70,0xa4,0xd,0x16,0x70,0x6c, -0x65,0x6d,0x65,0x6e,0x74,0xa5,0xd,0x10,0x69,0xa2,0xec,0x13,0x66,0x69,0x65,0x72, -1,0x6c,0x3c,0x74,0x19,0x6f,0x6e,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0xa3, -0x8a,0x15,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,0x10,0x6f,0xa3,0xed,1,0x6c,0x44, -0x73,0x11,0x69,0x63,0xa2,0x5c,0x18,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0xa3,0x5c,0x13,0x74,0x61,0x6e,0x69,0xa5,3,0x61,0xa2,0x9b,0x65,0xa4,0x4c,0x69, -1,0x61,0xa2,0x8f,0x73,0x10,0x63,5,0x70,0x18,0x70,0xa2,0x71,0x73,0x36,0x74, -0x17,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x81,0x15,0x79,0x6d,0x62,0x6f,0x6c, -0x73,0x8f,0x61,0xa2,0x66,0x65,0x46,0x6d,0x19,0x61,0x74,0x68,0x73,0x79,0x6d,0x62, -0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x17,0x6c,0x6c,0x61,0x6e,0x65, -0x6f,0x75,0x73,2,0x6d,0x3a,0x73,0x6c,0x74,0x17,0x65,0x63,0x68,0x6e,0x69,0x63, -0x61,0x6c,0x81,0x11,0x61,0x74,0x1f,0x68,0x65,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c, -0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x15,0x79, -0x6d,0x62,0x6f,0x6c,0x73,0x8e,0x12,0x61,0x6e,0x64,1,0x61,0x3c,0x70,0x19,0x69, -0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa3,0xcd,0x14,0x72,0x72,0x6f,0x77, -0x73,0xa3,0x73,0x10,0x6f,0xa3,0xd8,7,0x72,0x6f,0x72,0x44,0x73,0x4e,0x74,0x62, -0x79,0x19,0x61,0x6e,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0xa5,0x20,0x13,0x63, -0x68,0x65,0x6e,0xa5,0xc,0x18,0x61,0x72,0x61,0x6d,0x67,0x6f,0x6e,0x64,0x69,0xa5, -0x14,0x10,0x68,2,0x61,0x3a,0x65,0x4a,0x6f,0x17,0x70,0x65,0x72,0x61,0x74,0x6f, -0x72,0x73,0x7f,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0xa3,0x5d,0x16,0x6d,0x61, -0x74,0x69,0x63,0x61,0x6c,1,0x61,0x36,0x6f,0x17,0x70,0x65,0x72,0x61,0x74,0x6f, -0x72,0x73,0x7f,0x11,0x6c,0x70,0x1f,0x68,0x61,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63, -0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5d,0x68,0x50,0x6b,0x7e,0x6c,0x88,0x6e, -1,0x64,0x34,0x69,0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3,0xea,0x12,0x61,0x69, -0x63,0xa3,0xc6,1,0x61,0x3e,0x6a,0x12,0x6f,0x6e,0x67,0xa2,0xaa,0x14,0x74,0x69, -0x6c,0x65,0x73,0xa3,0xaa,0x13,0x6a,0x61,0x6e,0x69,0xa3,0xe9,0x13,0x61,0x73,0x61, -0x72,0xa5,0x1f,0x15,0x61,0x79,0x61,0x6c,0x61,0x6d,0x4f,3,0x64,0x6c,0x65,0x7e, -0x6e,0xa2,0x47,0x72,0x14,0x6f,0x69,0x74,0x69,0x63,1,0x63,0x3c,0x68,0x19,0x69, -0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0xd7,0x15,0x75,0x72,0x73,0x69, -0x76,0x65,0xa3,0xd6,0x17,0x65,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa5,0x21,0x17, -0x74,0x65,0x69,0x6d,0x61,0x79,0x65,0x6b,0xa2,0xb8,0x12,0x65,0x78,0x74,0xa2,0xd5, -0x16,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xd5,0x18,0x64,0x65,0x6b,0x69,0x6b, -0x61,0x6b,0x75,0x69,0xa3,0xeb,6,0x6b,0x3b,0x6b,0x56,0x6f,0x5a,0x75,0x64,0x79, -0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61,0x63,0x68,0x75,0x65,0x68, -0x6d,0x6f,0x6e,0x67,0xa5,0x27,0x10,0x6f,0xa3,0x92,0x14,0x62,0x6c,0x6f,0x63,0x6b, -0x21,1,0x6d,0x2c,0x73,0x11,0x68,0x75,0xa5,0x15,0x17,0x62,0x65,0x72,0x66,0x6f, -0x72,0x6d,0x73,0x7b,0x61,0x44,0x62,0x21,0x65,0x10,0x77,1,0x61,0xa5,0xe,0x74, -0x14,0x61,0x69,0x6c,0x75,0x65,0xa3,0x8b,2,0x62,0x3c,0x67,0x4a,0x6e,0x17,0x64, -0x69,0x6e,0x61,0x67,0x61,0x72,0x69,0xa5,0x26,0x15,0x61,0x74,0x61,0x65,0x61,0x6e, -0xa3,0xef,0x16,0x6d,0x75,0x6e,0x64,0x61,0x72,0x69,0xa5,0x47,0x67,0xc4,0x5d,0x6a, -0xc1,0xe4,0x6a,0xa2,0xdf,0x6b,0xa2,0xf8,0x6c,4,0x61,0x54,0x65,0xa2,0x6b,0x69, -0xa2,0x82,0x6f,0xa2,0xc1,0x79,1,0x63,0x2e,0x64,0x12,0x69,0x61,0x6e,0xa3,0xa9, -0x12,0x69,0x61,0x6e,0xa3,0xa7,1,0x6f,0x55,0x74,0x11,0x69,0x6e,1,0x31,0x96, -0x65,0x11,0x78,0x74,6,0x64,0x21,0x64,0xa3,0x95,0x65,0x2c,0x66,0xa5,0x39,0x67, -0xa5,0x3a,0xa2,0xe7,0x13,0x6e,0x64,0x65,0x64,6,0x64,0xc,0x64,0xa3,0x95,0x65, -0xa3,0xe7,0x66,0xa5,0x39,0x67,0xa5,0x3a,0x61,0x2a,0x62,0x29,0x63,0xa3,0x94,0x26, -0x18,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x6d,0x24,0x12,0x73,0x75,0x70, -0x24,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x25,1,0x70,0x42,0x74,0x1d,0x74, -0x65,0x72,0x6c,0x69,0x6b,0x65,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x79,0x12,0x63, -0x68,0x61,0xa3,0x9c,2,0x6d,0x4e,0x6e,0x54,0x73,0x10,0x75,0xa2,0xb0,0x12,0x73, -0x75,0x70,0xa4,0x31,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x31,0x11,0x62, -0x75,0xa3,0x6f,0x12,0x65,0x61,0x72,1,0x61,0xa3,0xe8,0x62,1,0x69,0x38,0x73, -0x17,0x79,0x6c,0x6c,0x61,0x62,0x61,0x72,0x79,0xa3,0x75,0x17,0x64,0x65,0x6f,0x67, -0x72,0x61,0x6d,0x73,0xa3,0x76,0x1a,0x77,0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74, -0x65,0x73,0xa3,0x4d,0x10,0x61,1,0x6d,0x32,0x76,0x14,0x61,0x6e,0x65,0x73,0x65, -0xa3,0xb5,0x10,0x6f,0x5c,0x12,0x65,0x78,0x74,1,0x61,0xa3,0xb4,0x62,0xa3,0xb9, -1,0x61,0xa2,0x43,0x68,4,0x61,0x40,0x69,0x50,0x6d,0x6e,0x6f,0x86,0x75,0x15, +6,1,0x64,0x2e,0x75,0x12,0x77,0x61,0x72,0xa5,0x4f,0x14,0x61,0x6e,0x65,0x73, +0x65,0xa2,0x9b,0x12,0x73,0x75,0x70,0xa2,0xdb,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e, +0x74,0xa3,0xdb,4,0x61,0xa2,0xa8,0x65,0x5c,0x6d,0x9e,0x70,0xa2,0x4b,0x73,0x13, +0x79,0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61,0x6e,0x64,0x70,0x69,0x63,0x74,0x6f,0x67, +0x72,0x61,0x70,0x68,0x73,0xa5,5,0x10,0x72,1,0x61,0x4e,0x73,0x12,0x63,0x72, +0x69,0x1f,0x70,0x74,0x73,0x61,0x6e,0x64,0x73,0x75,0x62,0x73,0x63,0x72,0x69,0x70, +0x74,0x73,0x73,0x14,0x6e,0x64,0x73,0x75,0x62,0x73,0x1b,0x61,0x74,0x68,0x6f,0x70, +0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a,1,0x6c,0x40,0x75,1,0x61,0x6e, +0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x8e,0x15,0x65,0x6d,0x65, +0x6e,0x74,0x61,1,0x6c,0x50,0x72,0x1e,0x79,0x70,0x72,0x69,0x76,0x61,0x74,0x65, +0x75,0x73,0x65,0x61,0x72,0x65,0x61,1,0x61,0xa3,0x6d,0x62,0xa3,0x6e,3,0x61, +0x5c,0x6d,0x78,0x70,0xa2,0x41,0x73,0x13,0x79,0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61, +0x6e,0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa5,5,0x14, +0x72,0x72,0x6f,0x77,0x73,2,0x61,0xa3,0x67,0x62,0xa3,0x68,0x63,0xa3,0xfa,0x13, +0x61,0x74,0x68,0x65,0x1f,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x6f,0x70,0x65,0x72, +0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69, +0x6f,0x6e,0xa3,0x8e,0x61,0x88,0x68,0xa2,0x48,0x69,0xa2,0x71,0x6d,0x12,0x61,0x6c, +0x6c,1,0x66,0x46,0x6b,0x15,0x61,0x6e,0x61,0x65,0x78,0x74,0xa4,0x29,0x15,0x65, +0x6e,0x73,0x69,0x6f,0x6e,0xa5,0x29,0x12,0x6f,0x72,0x6d,1,0x73,0xa3,0x54,0x76, +0x16,0x61,0x72,0x69,0x61,0x6e,0x74,0x73,0xa3,0x54,1,0x6d,0x36,0x75,0x16,0x72, +0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0xa1,0x15,0x61,0x72,0x69,0x74,0x61,0x6e,0xa3, +0xac,1,0x61,0x52,0x6f,0x13,0x72,0x74,0x68,0x61,0x1f,0x6e,0x64,0x66,0x6f,0x72, +0x6d,0x61,0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0xa3,0xf7,1,0x72,0x2e, +0x76,0x12,0x69,0x61,0x6e,0xa3,0x79,0x12,0x61,0x64,0x61,0xa3,0xd9,1,0x64,0x50, +0x6e,0x13,0x68,0x61,0x6c,0x61,0x50,0x1d,0x61,0x72,0x63,0x68,0x61,0x69,0x63,0x6e, +0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0xf9,0x13,0x64,0x68,0x61,0x6d,0xa3,0xf8,5, +0x72,0x35,0x72,0x44,0x73,0x64,0x75,1,0x61,0xa3,0x4e,0x6e,0x17,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0x71,0x17,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0xa2, +0x4e,0x13,0x61,0x72,0x65,0x61,0xa3,0x4e,0x1b,0x61,0x6c,0x74,0x65,0x72,0x70,0x61, +0x68,0x6c,0x61,0x76,0x69,0xa3,0xf6,0x61,0x40,0x68,0x82,0x6c,0x19,0x61,0x79,0x69, +0x6e,0x67,0x63,0x61,0x72,0x64,0x73,0xa3,0xcc,2,0x68,0x38,0x6c,0x4a,0x75,0x15, +0x63,0x69,0x6e,0x68,0x61,0x75,0xa3,0xf5,0x17,0x61,0x77,0x68,0x68,0x6d,0x6f,0x6e, +0x67,0xa3,0xf3,0x15,0x6d,0x79,0x72,0x65,0x6e,0x65,0xa3,0xf4,1,0x61,0x8e,0x6f, +1,0x65,0x74,0x6e,0x16,0x65,0x74,0x69,0x63,0x65,0x78,0x74,0xa2,0x72,1,0x65, +0x2c,0x73,0x11,0x75,0x70,0xa3,0x8d,0x15,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa2,0x72, +0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x8d,0x15,0x6e,0x69, +0x63,0x69,0x61,0x6e,0xa3,0x97,1,0x67,0x3e,0x69,0x13,0x73,0x74,0x6f,0x73,0xa2, +0xa6,0x13,0x64,0x69,0x73,0x63,0xa3,0xa6,0x12,0x73,0x70,0x61,0xa3,0x96,1,0x65, +0x5c,0x75,1,0x6d,0x2a,0x6e,0x11,0x69,0x63,0x67,0x10,0x69,0xa2,0xc0,0x1d,0x6e, +0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xc0,0x13, +0x6a,0x61,0x6e,0x67,0xa3,0xa3,0x6d,0xa2,0xf7,0x6e,0xa8,0x30,0x6f,6,0x70,0x63, +0x70,0x56,0x72,0x8a,0x73,0xa2,0x4c,0x74,0x10,0x74,0x1f,0x6f,0x6d,0x61,0x6e,0x73, +0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa5,0x28,0x18,0x74,0x69, +0x63,0x61,0x6c,0x63,0x68,0x61,0x72,0x1f,0x61,0x63,0x74,0x65,0x72,0x72,0x65,0x63, +0x6f,0x67,0x6e,0x69,0x74,0x69,0x6f,0x6e,0x85,1,0x69,0x46,0x6e,0x1e,0x61,0x6d, +0x65,0x6e,0x74,0x61,0x6c,0x64,0x69,0x6e,0x67,0x62,0x61,0x74,0x73,0xa3,0xf2,0x11, +0x79,0x61,0x47,1,0x61,0x30,0x6d,0x13,0x61,0x6e,0x79,0x61,0xa3,0x7a,0x11,0x67, +0x65,0xa5,0xf,0x63,0xa2,0x82,0x67,0xa2,0x82,0x6c,2,0x63,0x32,0x64,0x3c,0x6f, +0x12,0x6e,0x61,0x6c,0xa5,0x4e,0x13,0x68,0x69,0x6b,0x69,0xa3,0x9d,6,0x70,0x42, +0x70,0x3a,0x73,0x5a,0x74,0x88,0x75,0x14,0x79,0x67,0x68,0x75,0x72,0xa5,0x3b,0x11, +0x65,0x72,1,0x6d,0x2e,0x73,0x12,0x69,0x61,0x6e,0xa3,0x8c,0x11,0x69,0x63,0xa3, +0xf1,0x10,0x6f,1,0x67,0x3a,0x75,0x18,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61, +0x6e,0xa3,0xbb,0x13,0x64,0x69,0x61,0x6e,0xa5,0x22,0x14,0x75,0x72,0x6b,0x69,0x63, +0xa3,0xbf,0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f,0x72,0x74,0x68,0x61,0x72,0x61,0x62, +0x69,0x61,0x6e,0xa3,0xf0,0x17,0x75,0x6e,0x67,0x61,0x72,0x69,0x61,0x6e,0xa5,4, +0x14,0x74,0x61,0x6c,0x69,0x63,0xa3,0x58,0x10,0x72,0x85,0x12,0x68,0x61,0x6d,0x65, +6,0x6f,0x8c,0x6f,0x78,0x72,0xa2,0x67,0x75,0xa2,0x68,0x79,0x14,0x61,0x6e,0x6d, +0x61,0x72,0x58,0x12,0x65,0x78,0x74,3,0x61,0xa3,0xb6,0x62,0xa3,0xee,0x63,0xa5, +0x4d,0x65,0x13,0x6e,0x64,0x65,0x64,2,0x61,0xa3,0xb6,0x62,0xa3,0xee,0x63,0xa5, +0x4d,1,0x64,0x52,0x6e,0x15,0x67,0x6f,0x6c,0x69,0x61,0x6e,0x6a,0x12,0x73,0x75, +0x70,0xa4,0xd,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0xd,0x10,0x69,0xa2, +0xec,0x13,0x66,0x69,0x65,0x72,1,0x6c,0x3c,0x74,0x19,0x6f,0x6e,0x65,0x6c,0x65, +0x74,0x74,0x65,0x72,0x73,0xa3,0x8a,0x15,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,0x10, +0x6f,0xa3,0xed,1,0x6c,0x44,0x73,0x11,0x69,0x63,0xa2,0x5c,0x18,0x61,0x6c,0x73, +0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5c,0x13,0x74,0x61,0x6e,0x69,0xa5,3,0x61, +0xa2,0x9b,0x65,0xa4,0x4c,0x69,1,0x61,0xa2,0x8f,0x73,0x10,0x63,5,0x70,0x18, +0x70,0xa2,0x71,0x73,0x36,0x74,0x17,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x81, +0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x8f,0x61,0xa2,0x66,0x65,0x46,0x6d,0x19,0x61, +0x74,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69, +0x17,0x6c,0x6c,0x61,0x6e,0x65,0x6f,0x75,0x73,2,0x6d,0x3a,0x73,0x6c,0x74,0x17, +0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x81,0x11,0x61,0x74,0x1f,0x68,0x65,0x6d, +0x61,0x74,0x69,0x63,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,1,0x61,0xa3, +0x66,0x62,0xa3,0x69,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x8e,0x12,0x61,0x6e,0x64, +1,0x61,0x3c,0x70,0x19,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa3, +0xcd,0x14,0x72,0x72,0x6f,0x77,0x73,0xa3,0x73,0x10,0x6f,0xa3,0xd8,7,0x72,0x6f, +0x72,0x44,0x73,0x4e,0x74,0x62,0x79,0x19,0x61,0x6e,0x6e,0x75,0x6d,0x65,0x72,0x61, +0x6c,0x73,0xa5,0x20,0x13,0x63,0x68,0x65,0x6e,0xa5,0xc,0x18,0x61,0x72,0x61,0x6d, +0x67,0x6f,0x6e,0x64,0x69,0xa5,0x14,0x10,0x68,2,0x61,0x3a,0x65,0x4a,0x6f,0x17, +0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0x7f,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75, +0x6d,0xa3,0x5d,0x16,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,1,0x61,0x36,0x6f,0x17, +0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0x7f,0x11,0x6c,0x70,0x1f,0x68,0x61,0x6e, +0x75,0x6d,0x65,0x72,0x69,0x63,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5d,0x68, +0x50,0x6b,0x7e,0x6c,0x88,0x6e,1,0x64,0x34,0x69,0x15,0x63,0x68,0x61,0x65,0x61, +0x6e,0xa3,0xea,0x12,0x61,0x69,0x63,0xa3,0xc6,1,0x61,0x3e,0x6a,0x12,0x6f,0x6e, +0x67,0xa2,0xaa,0x14,0x74,0x69,0x6c,0x65,0x73,0xa3,0xaa,0x13,0x6a,0x61,0x6e,0x69, +0xa3,0xe9,0x13,0x61,0x73,0x61,0x72,0xa5,0x1f,0x15,0x61,0x79,0x61,0x6c,0x61,0x6d, +0x4f,3,0x64,0x6c,0x65,0x7e,0x6e,0xa2,0x47,0x72,0x14,0x6f,0x69,0x74,0x69,0x63, +1,0x63,0x3c,0x68,0x19,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3, +0xd7,0x15,0x75,0x72,0x73,0x69,0x76,0x65,0xa3,0xd6,0x17,0x65,0x66,0x61,0x69,0x64, +0x72,0x69,0x6e,0xa5,0x21,0x17,0x74,0x65,0x69,0x6d,0x61,0x79,0x65,0x6b,0xa2,0xb8, +0x12,0x65,0x78,0x74,0xa2,0xd5,0x16,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xd5, +0x18,0x64,0x65,0x6b,0x69,0x6b,0x61,0x6b,0x75,0x69,0xa3,0xeb,6,0x6b,0x3b,0x6b, +0x56,0x6f,0x5a,0x75,0x64,0x79,0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75, +0x61,0x63,0x68,0x75,0x65,0x68,0x6d,0x6f,0x6e,0x67,0xa5,0x27,0x10,0x6f,0xa3,0x92, +0x14,0x62,0x6c,0x6f,0x63,0x6b,0x21,1,0x6d,0x2c,0x73,0x11,0x68,0x75,0xa5,0x15, +0x17,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0x7b,0x61,0x44,0x62,0x21,0x65,0x10, +0x77,1,0x61,0xa5,0xe,0x74,0x14,0x61,0x69,0x6c,0x75,0x65,0xa3,0x8b,2,0x62, +0x3c,0x67,0x4a,0x6e,0x17,0x64,0x69,0x6e,0x61,0x67,0x61,0x72,0x69,0xa5,0x26,0x15, +0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0xef,0x16,0x6d,0x75,0x6e,0x64,0x61,0x72,0x69, +0xa5,0x47,0x67,0xc4,0x7b,0x6a,0xc1,0xef,0x6a,0xa2,0xdf,0x6b,0xa2,0xf8,0x6c,4, +0x61,0x54,0x65,0xa2,0x6b,0x69,0xa2,0x82,0x6f,0xa2,0xc1,0x79,1,0x63,0x2e,0x64, +0x12,0x69,0x61,0x6e,0xa3,0xa9,0x12,0x69,0x61,0x6e,0xa3,0xa7,1,0x6f,0x55,0x74, +0x11,0x69,0x6e,1,0x31,0x96,0x65,0x11,0x78,0x74,6,0x64,0x21,0x64,0xa3,0x95, +0x65,0x2c,0x66,0xa5,0x39,0x67,0xa5,0x3a,0xa2,0xe7,0x13,0x6e,0x64,0x65,0x64,6, +0x64,0xc,0x64,0xa3,0x95,0x65,0xa3,0xe7,0x66,0xa5,0x39,0x67,0xa5,0x3a,0x61,0x2a, +0x62,0x29,0x63,0xa3,0x94,0x26,0x18,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c, +0x6d,0x24,0x12,0x73,0x75,0x70,0x24,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x25, +1,0x70,0x42,0x74,0x1d,0x74,0x65,0x72,0x6c,0x69,0x6b,0x65,0x73,0x79,0x6d,0x62, +0x6f,0x6c,0x73,0x79,0x12,0x63,0x68,0x61,0xa3,0x9c,2,0x6d,0x4e,0x6e,0x54,0x73, +0x10,0x75,0xa2,0xb0,0x12,0x73,0x75,0x70,0xa4,0x31,0x16,0x70,0x6c,0x65,0x6d,0x65, +0x6e,0x74,0xa5,0x31,0x11,0x62,0x75,0xa3,0x6f,0x12,0x65,0x61,0x72,1,0x61,0xa3, +0xe8,0x62,1,0x69,0x38,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x61,0x72,0x79,0xa3, +0x75,0x17,0x64,0x65,0x6f,0x67,0x72,0x61,0x6d,0x73,0xa3,0x76,0x1a,0x77,0x73,0x75, +0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4d,0x10,0x61,1,0x6d,0x32,0x76, +0x14,0x61,0x6e,0x65,0x73,0x65,0xa3,0xb5,0x10,0x6f,0x5c,0x12,0x65,0x78,0x74,1, +0x61,0xa3,0xb4,0x62,0xa3,0xb9,2,0x61,0x3a,0x68,0xa2,0xa9,0x69,0x15,0x72,0x61, +0x74,0x72,0x61,0x69,0xa5,0x4c,5,0x74,0x35,0x74,0x34,0x77,0x7a,0x79,0x13,0x61, +0x68,0x6c,0x69,0xa3,0xa2,0x14,0x61,0x6b,0x61,0x6e,0x61,0x9e,1,0x65,0x4c,0x70, +0x10,0x68,0x1f,0x6f,0x6e,0x65,0x74,0x69,0x63,0x65,0x78,0x74,0x65,0x6e,0x73,0x69, +0x6f,0x6e,0x73,0xa3,0x6b,0x11,0x78,0x74,0xa3,0x6b,0x10,0x69,0xa5,0x46,0x69,0xa2, +0x4e,0x6b,0xa2,0x51,0x6e,3,0x61,0x34,0x62,0x84,0x67,0x8a,0x6e,0x12,0x61,0x64, +0x61,0x4d,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2,0xcb,0x16,0x70,0x6c,0x65,0x6d, +0x65,0x6e,0x74,0xa3,0xcb,0x11,0x78,0x74,2,0x61,0xa5,0x13,0x62,0xa5,0x38,0x65, +0x13,0x6e,0x64,0x65,0x64,1,0x61,0xa5,0x13,0x62,0xa5,0x38,0x11,0x75,0x6e,0xa3, +0x42,0x11,0x78,0x69,0x96,0x17,0x72,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x97,0x12, +0x74,0x68,0x69,0xa3,0xc1,0x1c,0x74,0x6f,0x76,0x69,0x6b,0x6e,0x75,0x6d,0x65,0x72, +0x61,0x6c,0x73,0xa5,0x45,4,0x61,0x40,0x69,0x50,0x6d,0x6e,0x6f,0x86,0x75,0x15, 0x64,0x61,0x77,0x61,0x64,0x69,0xa3,0xe6,0x16,0x72,0x6f,0x73,0x68,0x74,0x68,0x69, 0xa3,0x89,0x1d,0x74,0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70, 0x74,0xa5,0x30,0x11,0x65,0x72,0x68,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3, -0x71,0x12,0x6a,0x6b,0x69,0xa3,0xe5,5,0x74,0x35,0x74,0x34,0x77,0x7a,0x79,0x13, -0x61,0x68,0x6c,0x69,0xa3,0xa2,0x14,0x61,0x6b,0x61,0x6e,0x61,0x9e,1,0x65,0x4c, -0x70,0x10,0x68,0x1f,0x6f,0x6e,0x65,0x74,0x69,0x63,0x65,0x78,0x74,0x65,0x6e,0x73, -0x69,0x6f,0x6e,0x73,0xa3,0x6b,0x11,0x78,0x74,0xa3,0x6b,0x10,0x69,0xa5,0x46,0x69, -0xa2,0x4e,0x6b,0xa2,0x51,0x6e,3,0x61,0x34,0x62,0x84,0x67,0x8a,0x6e,0x12,0x61, -0x64,0x61,0x4d,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2,0xcb,0x16,0x70,0x6c,0x65, -0x6d,0x65,0x6e,0x74,0xa3,0xcb,0x11,0x78,0x74,2,0x61,0xa5,0x13,0x62,0xa5,0x38, -0x65,0x13,0x6e,0x64,0x65,0x64,1,0x61,0xa5,0x13,0x62,0xa5,0x38,0x11,0x75,0x6e, -0xa3,0x42,0x11,0x78,0x69,0x96,0x17,0x72,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x97, -0x12,0x74,0x68,0x69,0xa3,0xc1,0x1c,0x74,0x6f,0x76,0x69,0x6b,0x6e,0x75,0x6d,0x65, -0x72,0x61,0x6c,0x73,0xa5,0x45,0x67,0xa2,0xb5,0x68,0xa4,0x84,0x69,3,0x64,0x4c, -0x6d,0xa2,0x55,0x6e,0xa2,0x62,0x70,0x13,0x61,0x65,0x78,0x74,0x2a,0x16,0x65,0x6e, -0x73,0x69,0x6f,0x6e,0x73,0x2b,1,0x63,0x99,0x65,0x17,0x6f,0x67,0x72,0x61,0x70, -0x68,0x69,0x63,1,0x64,0x56,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa4,0xb, -0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa5, -0xb,0x13,0x65,0x73,0x63,0x72,0x1f,0x69,0x70,0x74,0x69,0x6f,0x6e,0x63,0x68,0x61, -0x72,0x61,0x63,0x74,0x65,0x72,0x73,0x99,0x1c,0x70,0x65,0x72,0x69,0x61,0x6c,0x61, -0x72,0x61,0x6d,0x61,0x69,0x63,0xa3,0xba,1,0x64,0x62,0x73,0x1b,0x63,0x72,0x69, -0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68, -0x69,0x61,0x6e,0xa3,0xbd,0x13,0x6c,0x61,0x76,0x69,0xa3,0xbe,0x11,0x69,0x63,1, -0x6e,0x3e,0x73,0x1a,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa5, -0x1e,0x19,0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,4,0x65, -0x74,0x6c,0xa2,0x82,0x6f,0xa2,0x9a,0x72,0xa2,0x9e,0x75,2,0x6a,0x34,0x6e,0x3e, -0x72,0x14,0x6d,0x75,0x6b,0x68,0x69,0x43,0x14,0x61,0x72,0x61,0x74,0x69,0x45,0x18, -0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa5,0x1c,1,0x6e,0xa2,0x46,0x6f, -1,0x6d,0x6e,0x72,0x13,0x67,0x69,0x61,0x6e,0x5a,1,0x65,0x40,0x73,0x11,0x75, -0x70,0xa2,0x87,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x87,0x11,0x78,0x74, -0xa4,0x1b,0x14,0x65,0x6e,0x64,0x65,0x64,0xa5,0x1b,0x1a,0x65,0x74,0x72,0x69,0x63, -0x73,0x68,0x61,0x70,0x65,0x73,0x8c,0x12,0x65,0x78,0x74,0xa2,0xe3,0x14,0x65,0x6e, -0x64,0x65,0x64,0xa3,0xe3,0x1e,0x65,0x72,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75, -0x61,0x74,0x69,0x6f,0x6e,0x71,0x17,0x61,0x67,0x6f,0x6c,0x69,0x74,0x69,0x63,0xa2, -0x88,0x12,0x73,0x75,0x70,0xa4,0xa,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5, -0xa,0x13,0x74,0x68,0x69,0x63,0xa3,0x59,1,0x61,0x5c,0x65,0x11,0x65,0x6b,0x30, -1,0x61,0x38,0x65,0x11,0x78,0x74,0x6e,0x14,0x65,0x6e,0x64,0x65,0x64,0x6f,0x17, -0x6e,0x64,0x63,0x6f,0x70,0x74,0x69,0x63,0x31,0x13,0x6e,0x74,0x68,0x61,0xa3,0xe4, -2,0x61,0xa2,0x48,0x65,0xa2,0xdf,0x69,1,0x67,0x30,0x72,0x14,0x61,0x67,0x61, -0x6e,0x61,0x9d,0x10,0x68,1,0x70,0x3a,0x73,0x18,0x75,0x72,0x72,0x6f,0x67,0x61, -0x74,0x65,0x73,0xa3,0x4b,1,0x72,0x3c,0x75,0x19,0x73,0x75,0x72,0x72,0x6f,0x67, -0x61,0x74,0x65,0x73,0xa3,0x4c,0x11,0x69,0x76,0x1f,0x61,0x74,0x65,0x75,0x73,0x65, -0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4c,2,0x6c,0x32,0x6e, -0x9a,0x74,0x12,0x72,0x61,0x6e,0xa5,2,0x10,0x66,2,0x61,0x58,0x6d,0x70,0x77, -0x14,0x69,0x64,0x74,0x68,0x61,0x1f,0x6e,0x64,0x66,0x75,0x6c,0x6c,0x77,0x69,0x64, -0x74,0x68,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x1a,0x6e,0x64,0x66,0x75,0x6c,0x6c, -0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x13,0x61,0x72,0x6b,0x73,0xa3,0x52,2,0x67, -0x34,0x69,0xa2,0x45,0x75,0x12,0x6e,0x6f,0x6f,0xa3,0x63,0x11,0x75,0x6c,0xa2,0x4a, -2,0x63,0x3c,0x6a,0x5e,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3, -0x4a,0x1f,0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x69,0x6c,0x69,0x74,0x79,0x6a,0x61, -0x6d,0x6f,0xa3,0x41,0x12,0x61,0x6d,0x6f,0x5c,0x17,0x65,0x78,0x74,0x65,0x6e,0x64, -0x65,0x64,1,0x61,0xa3,0xb4,0x62,0xa3,0xb9,0x19,0x66,0x69,0x72,0x6f,0x68,0x69, -0x6e,0x67,0x79,0x61,0xa5,0x1d,0x13,0x62,0x72,0x65,0x77,0x37,0x61,0xa4,0xc,0x62, -0xa6,0x59,0x63,0xa8,0x2e,0x64,0xac,0xe9,0x65,5,0x6d,0xa9,0x6d,0x94,0x6e,0xa2, -0x41,0x74,0x15,0x68,0x69,0x6f,0x70,0x69,0x63,0x5e,1,0x65,0x40,0x73,0x11,0x75, -0x70,0xa2,0x86,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x86,0x11,0x78,0x74, -0xa2,0x85,2,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x65,0x13,0x6e,0x64,0x65,0x64,0xa2, -0x85,1,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x16,0x6f,0x74,0x69,0x63,0x6f,0x6e,0x73, -0xa3,0xce,0x15,0x63,0x6c,0x6f,0x73,0x65,0x64,2,0x61,0x5a,0x63,0x9e,0x69,0x1c, -0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x75,0x70,0xa2,0xc4,0x16, -0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc4,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75, -0x6d,0x86,1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0xc3,0x13,0x72,0x69,0x63,0x73, -0x86,0x18,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc3,0x11,0x6a,0x6b, -0xa2,0x44,0x1f,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x61,0x6e,0x64,0x6d,0x6f,0x6e, -0x74,0x68,0x73,0xa3,0x44,0x61,0x4a,0x67,0x76,0x6c,1,0x62,0x30,0x79,0x13,0x6d, -0x61,0x69,0x63,0xa5,0x25,0x13,0x61,0x73,0x61,0x6e,0xa3,0xe2,0x13,0x72,0x6c,0x79, -0x64,0x1f,0x79,0x6e,0x61,0x73,0x74,0x69,0x63,0x63,0x75,0x6e,0x65,0x69,0x66,0x6f, -0x72,0x6d,0xa5,1,0x1f,0x79,0x70,0x74,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f, -0x67,0x6c,0x79,0x70,0x68,1,0x66,0x26,0x73,0xa3,0xc2,0x1c,0x6f,0x72,0x6d,0x61, -0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0xa5,0x24,7,0x6e,0xc0,0xf2,0x6e, -0x3e,0x72,0xa2,0x5d,0x73,0xa2,0xe5,0x76,0x14,0x65,0x73,0x74,0x61,0x6e,0xa3,0xbc, -1,0x61,0x92,0x63,0x13,0x69,0x65,0x6e,0x74,1,0x67,0x34,0x73,0x15,0x79,0x6d, -0x62,0x6f,0x6c,0x73,0xa3,0xa5,0x13,0x72,0x65,0x65,0x6b,1,0x6d,0x34,0x6e,0x15, -0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0x7f,0x13,0x75,0x73,0x69,0x63,0xa2,0x7e,0x19, -0x61,0x6c,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x7e,0x10,0x74,0x1f,0x6f, -0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3, -0xfe,2,0x61,0x32,0x6d,0xa2,0x7e,0x72,0x12,0x6f,0x77,0x73,0x7d,0x12,0x62,0x69, -0x63,0x38,3,0x65,0x4a,0x6d,0x80,0x70,0xa2,0x50,0x73,0x11,0x75,0x70,0xa2,0x80, -0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x80,0x11,0x78,0x74,3,0x61,0xa3, -0xd2,0x62,0xa5,0x35,0x63,0xa5,0x41,0x65,0x13,0x6e,0x64,0x65,0x64,2,0x61,0xa3, -0xd2,0x62,0xa5,0x35,0x63,0xa5,0x41,0x12,0x61,0x74,0x68,0xa2,0xd3,0x18,0x65,0x6d, -0x61,0x74,0x69,0x63,0x61,0x6c,0x61,0x1f,0x6c,0x70,0x68,0x61,0x62,0x65,0x74,0x69, -0x63,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd3,1,0x66,0x42,0x72,0x1e,0x65, -0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73,1,0x61, -0xa3,0x51,0x62,0xa3,0x55,0x14,0x65,0x6e,0x69,0x61,0x6e,0x35,0x12,0x63,0x69,0x69, -0x23,0x64,0x9e,0x65,0xa2,0x42,0x68,0xa2,0x4d,0x6c,1,0x63,0x62,0x70,0x17,0x68, -0x61,0x62,0x65,0x74,0x69,0x63,0x70,1,0x66,0xa3,0x50,0x72,0x1e,0x65,0x73,0x65, -0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x50,0x16,0x68, -0x65,0x6d,0x69,0x63,0x61,0x6c,0xa2,0xd0,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0xa3,0xd0,0x12,0x6c,0x61,0x6d,0xa5,7,0x1a,0x67,0x65,0x61,0x6e,0x6e,0x75,0x6d, -0x62,0x65,0x72,0x73,0xa3,0x77,0x11,0x6f,0x6d,0xa3,0xfd,7,0x6f,0x71,0x6f,0x64, -0x72,0xa2,0x41,0x75,0xa2,0x58,0x79,0x1b,0x7a,0x61,0x6e,0x74,0x69,0x6e,0x65,0x6d, -0x75,0x73,0x69,0x63,0xa2,0x5b,0x18,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0xa3,0x5b,1,0x70,0x34,0x78,0x16,0x64,0x72,0x61,0x77,0x69,0x6e,0x67,0x89,0x14, -0x6f,0x6d,0x6f,0x66,0x6f,0xa0,0x12,0x65,0x78,0x74,0xa2,0x43,0x14,0x65,0x6e,0x64, -0x65,0x64,0xa3,0x43,0x10,0x61,1,0x68,0x40,0x69,0x12,0x6c,0x6c,0x65,0x92,0x17, -0x70,0x61,0x74,0x74,0x65,0x72,0x6e,0x73,0x93,0x11,0x6d,0x69,0xa3,0xc9,1,0x67, -0x2c,0x68,0x11,0x69,0x64,0xa3,0x64,0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x81,0x61, -0x48,0x65,0xa2,0x4e,0x68,0xa2,0x52,0x6c,0x1a,0x6f,0x63,0x6b,0x65,0x6c,0x65,0x6d, -0x65,0x6e,0x74,0x73,0x8b,3,0x6c,0x34,0x6d,0x40,0x73,0x66,0x74,0x11,0x61,0x6b, -0xa3,0xc7,0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x93,0x11,0x75,0x6d,0xa2,0xb1,0x12, -0x73,0x75,0x70,0xa2,0xca,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xca,1, -0x69,0x30,0x73,0x13,0x61,0x76,0x61,0x68,0xa3,0xdd,0x15,0x63,0x6c,0x61,0x74,0x69, -0x6e,0x23,0x14,0x6e,0x67,0x61,0x6c,0x69,0x41,0x16,0x61,0x69,0x6b,0x73,0x75,0x6b, -0x69,0xa5,8,5,0x6f,0xc1,0x60,0x6f,0xa2,0x69,0x75,0xa4,0x24,0x79,1,0x70, -0xa2,0x44,0x72,0x14,0x69,0x6c,0x6c,0x69,0x63,0x32,1,0x65,0x4c,0x73,0x11,0x75, -0x70,0xa2,0x61,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa2,0x61,0x12,0x61,0x72, -0x79,0xa3,0x61,0x11,0x78,0x74,4,0x61,0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5,9, -0x64,0xa5,0x43,0x65,0x13,0x6e,0x64,0x65,0x64,3,0x61,0xa3,0x9e,0x62,0xa3,0xa0, -0x63,0xa5,9,0x64,0xa5,0x43,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e, -0x6f,0x61,0x6e,0xa5,0x36,0x1a,0x6f,0x74,0x73,0x79,0x6c,0x6c,0x61,0x62,0x61,0x72, -0x79,0xa3,0x7b,3,0x6d,0x5a,0x6e,0xa2,0x95,0x70,0xa2,0xa0,0x75,0x17,0x6e,0x74, -0x69,0x6e,0x67,0x72,0x6f,0x64,0xa2,0x9a,0x17,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c, -0x73,0xa3,0x9a,2,0x62,0x3a,0x6d,0xa2,0x5f,0x70,0x15,0x61,0x74,0x6a,0x61,0x6d, -0x6f,0xa3,0x41,0x14,0x69,0x6e,0x69,0x6e,0x67,2,0x64,0x46,0x68,0x9e,0x6d,0x1d, -0x61,0x72,0x6b,0x73,0x66,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x77,0x1e, -0x69,0x61,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x6d,0x61,0x72,0x6b,0x73,0x2e, -2,0x65,0x40,0x66,0xa6,0x52,0x73,0x18,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e, -0x74,0xa3,0x83,0x16,0x78,0x74,0x65,0x6e,0x64,0x65,0x64,0xa3,0xe0,0x17,0x61,0x6c, -0x66,0x6d,0x61,0x72,0x6b,0x73,0xa3,0x52,0x11,0x6f,0x6e,0x1f,0x69,0x6e,0x64,0x69, -0x63,0x6e,0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,0x1b,0x74, -0x72,0x6f,0x6c,0x70,0x69,0x63,0x74,0x75,0x72,0x65,0x73,0x83,0x12,0x74,0x69,0x63, -0xa2,0x84,0x1b,0x65,0x70,0x61,0x63,0x74,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3, -0xdf,1,0x6e,0x3e,0x72,0x1b,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f, -0x6c,0x73,0x75,0x15,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa2,0x98,0x16,0x6e,0x75,0x6d, -0x62,0x65,0x72,0x73,0xa2,0x99,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75, -0x61,0x74,0x69,0x6f,0x6e,0xa3,0x99,0x61,0xa2,0xea,0x68,0xa4,0x14,0x6a,0x10,0x6b, -0xa2,0x47,4,0x63,0x92,0x65,0xa2,0x83,0x72,0xa2,0xa1,0x73,0xa2,0xb3,0x75,0x1f, -0x6e,0x69,0x66,0x69,0x65,0x64,0x69,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73, -0xa2,0x47,0x18,0x65,0x78,0x74,0x65,0x6e,0x73,0x69,0x6f,0x6e,8,0x65,0x71,0x65, -0xa5,0,0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x69,0xa5,0x48,0x14,0x6f, -0x6d,0x70,0x61,0x74,0xa2,0x45,1,0x66,0x96,0x69,1,0x62,0x44,0x64,0x17,0x65, -0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa2,0x4f,0x12,0x73,0x75,0x70,0xa3,0x5f,0x14, -0x69,0x6c,0x69,0x74,0x79,0xa2,0x45,1,0x66,0x54,0x69,0x18,0x64,0x65,0x6f,0x67, -0x72,0x61,0x70,0x68,0x73,0xa2,0x4f,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65, -0x6e,0x74,0xa3,0x5f,0x13,0x6f,0x72,0x6d,0x73,0xa3,0x53,0x11,0x78,0x74,8,0x65, -0xf,0x65,0xa5,0,0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x69,0xa5,0x48, -0x61,0xa3,0x46,0x62,0xa3,0x5e,0x63,0xa3,0xc5,0x64,0xa3,0xd1,0x19,0x61,0x64,0x69, -0x63,0x61,0x6c,0x73,0x73,0x75,0x70,0x94,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, -0x95,1,0x74,0x50,0x79,0x14,0x6d,0x62,0x6f,0x6c,0x73,0x9a,0x1d,0x61,0x6e,0x64, -0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x9b,0x14,0x72,0x6f,0x6b, -0x65,0x73,0xa3,0x82,2,0x6e,0x48,0x72,0x64,0x75,0x1d,0x63,0x61,0x73,0x69,0x61, -0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e,0xa3,0xde,0x1d,0x61,0x64,0x69,0x61, -0x6e,0x73,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x73,0x63,0x12,0x69,0x61,0x6e,0xa3, -0xa8,2,0x61,0x3a,0x65,0x4c,0x6f,0x16,0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa5, -0x2d,1,0x6b,0x26,0x6d,0xa3,0xa4,0x11,0x6d,0x61,0xa3,0xd4,1,0x72,0x38,0x73, -0x17,0x73,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa5,0x19,0x13,0x6f,0x6b,0x65,0x65, -0x60,0x12,0x73,0x75,0x70,0xa2,0xff,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, -0xff,3,0x65,0x3e,0x69,0x8e,0x6f,0xa2,0x71,0x75,0x15,0x70,0x6c,0x6f,0x79,0x61, -0x6e,0xa3,0xe1,1,0x73,0x60,0x76,0x16,0x61,0x6e,0x61,0x67,0x61,0x72,0x69,0x3e, -0x12,0x65,0x78,0x74,0xa2,0xb3,1,0x61,0xa5,0x44,0x65,0x13,0x6e,0x64,0x65,0x64, -0xa2,0xb3,0x10,0x61,0xa5,0x44,0x13,0x65,0x72,0x65,0x74,0xa3,0x5a,2,0x61,0x3a, -0x6e,0x82,0x76,0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75,0xa5,0x2f,0x18,0x63,0x72, -0x69,0x74,0x69,0x63,0x61,0x6c,0x73,0x2e,2,0x65,0x30,0x66,0x36,0x73,0x11,0x75, -0x70,0xa3,0x83,0x11,0x78,0x74,0xa3,0xe0,0x18,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f, -0x6c,0x73,0x77,0x14,0x67,0x62,0x61,0x74,0x73,0x91,1,0x67,0x3e,0x6d,0x12,0x69, -0x6e,0x6f,0xa2,0xab,0x14,0x74,0x69,0x6c,0x65,0x73,0xa3,0xab,0x11,0x72,0x61,0xa5, -0x1a,8,0x6d,0x5f,0x6d,0x3a,0x6e,0x48,0x73,0x7a,0x76,0xa2,0x4b,0x77,0x12,0x69, -0x64,0x65,0x43,0x11,0x65,0x64,0x32,0x12,0x69,0x61,0x6c,0x33,2,0x61,0x40,0x62, -0x37,0x6f,1,0x62,0x28,0x6e,0x10,0x65,0x21,0x13,0x72,0x65,0x61,0x6b,0x37,0x10, -0x72,0x34,0x12,0x72,0x6f,0x77,0x35,2,0x6d,0x38,0x71,0x46,0x75,1,0x62,0x3d, -0x70,0x3e,0x11,0x65,0x72,0x3f,1,0x61,0x24,0x6c,0x39,0x11,0x6c,0x6c,0x39,1, -0x72,0x3b,0x75,0x12,0x61,0x72,0x65,0x3b,0x12,0x65,0x72,0x74,0x40,0x13,0x69,0x63, -0x61,0x6c,0x41,0x63,0x58,0x65,0x92,0x66,0x96,0x69,1,0x6e,0x36,0x73,0x10,0x6f, -0x30,0x14,0x6c,0x61,0x74,0x65,0x64,0x31,0x11,0x69,0x74,0x2e,0x12,0x69,0x61,0x6c, -0x2f,2,0x61,0x36,0x69,0x48,0x6f,0x10,0x6d,0x24,0x12,0x70,0x61,0x74,0x25,0x10, -0x6e,0x22,0x15,0x6f,0x6e,0x69,0x63,0x61,0x6c,0x23,0x13,0x72,0x63,0x6c,0x65,0x27, -0x11,0x6e,0x63,0x27,2,0x69,0x3a,0x6f,0x44,0x72,0x10,0x61,0x2c,0x14,0x63,0x74, -0x69,0x6f,0x6e,0x2d,0x10,0x6e,0x28,0x11,0x61,0x6c,0x29,0x11,0x6e,0x74,0x2b,4, -0x61,0x3a,0x66,0x4c,0x68,0x5e,0x6e,0x70,0x77,0x2a,0x12,0x69,0x64,0x65,0x2b,0x22, -0x17,0x6d,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x26,0x17,0x75,0x6c,0x6c,0x77, -0x69,0x64,0x74,0x68,0x27,0x24,0x17,0x61,0x6c,0x66,0x77,0x69,0x64,0x74,0x68,0x25, -0x20,1,0x61,0x30,0x65,0x14,0x75,0x74,0x72,0x61,0x6c,0x21,0x28,0x13,0x72,0x72, -0x6f,0x77,0x29,0xd,0x6e,0xc0,0xfb,0x73,0x6d,0x73,0x3a,0x74,0x98,0x75,0xa2,0x49, -0x7a,2,0x6c,0x3b,0x70,0x3d,0x73,0x39,5,0x6f,0x28,0x6f,0x57,0x70,0x34,0x75, -0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x45,0x11,0x61,0x63,1,0x65,0x32,0x69, -0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x31,0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74, -0x6f,0x72,0x39,0x63,0x53,0x6b,0x55,0x6d,0x51,0x1d,0x69,0x74,0x6c,0x65,0x63,0x61, -0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x27,1,0x6e,0x40,0x70,0x1c,0x70,0x65, -0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x23,0x17,0x61,0x73,0x73, -0x69,0x67,0x6e,0x65,0x64,0x21,0x6e,0x8a,0x6f,0xa2,0x47,0x70,8,0x66,0x14,0x66, -0x5b,0x69,0x59,0x6f,0x4f,0x72,0x24,0x73,0x49,0x17,0x69,0x76,0x61,0x74,0x65,0x75, -0x73,0x65,0x43,0x61,0x2c,0x63,0x4d,0x64,0x47,0x65,0x4b,0x1f,0x72,0x61,0x67,0x72, -0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x3d,2,0x64,0x33, -0x6c,0x35,0x6f,0x36,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72, -0x6b,0x2d,1,0x70,0x7c,0x74,0x12,0x68,0x65,0x72,3,0x6c,0x38,0x6e,0x42,0x70, -0x4c,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0x57,0x14,0x65,0x74,0x74,0x65,0x72,0x2b, -0x14,0x75,0x6d,0x62,0x65,0x72,0x37,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69, -0x6f,0x6e,0x4f,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f, -0x6e,0x49,0x66,0x9e,0x66,0x88,0x69,0xa2,0x4b,0x6c,0xa2,0x5c,0x6d,4,0x61,0x60, -0x63,0x31,0x65,0x2f,0x6e,0x2d,0x6f,0x15,0x64,0x69,0x66,0x69,0x65,0x72,1,0x6c, -0x30,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0x55,0x14,0x65,0x74,0x74,0x65,0x72,0x29, -0x17,0x74,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x51,1,0x69,0x2e,0x6f,0x13,0x72, -0x6d,0x61,0x74,0x41,0x1d,0x6e,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0x5b,0x10,0x6e,0x1f,0x69,0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63, -0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x59,6,0x6d,0x18,0x6d,0x29,0x6f,0x28,0x74, -0x27,0x75,0x23,0x2a,0x1c,0x77,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74, -0x65,0x72,0x25,0x65,0x28,0x69,0x3c,0x6c,0x25,0x19,0x74,0x74,0x65,0x72,0x6e,0x75, -0x6d,0x62,0x65,0x72,0x35,0x1a,0x6e,0x65,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f, -0x72,0x3b,0x63,0x44,0x64,0xa2,0x60,0x65,0x1b,0x6e,0x63,0x6c,0x6f,0x73,0x69,0x6e, -0x67,0x6d,0x61,0x72,0x6b,0x2f,6,0x6e,0x39,0x6e,0x46,0x6f,0x4e,0x73,0x45,0x75, -0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x53,0x20,0x12, -0x74,0x72,0x6c,0x3f,0x42,0x10,0x6e,1,0x6e,0x2c,0x74,0x12,0x72,0x6f,0x6c,0x3f, -0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f, -0x6e,0x4d,0x63,0x3f,0x66,0x41,0x6c,0x1d,0x6f,0x73,0x65,0x70,0x75,0x6e,0x63,0x74, -0x75,0x61,0x74,0x69,0x6f,0x6e,0x4b,2,0x61,0x30,0x65,0x4a,0x69,0x12,0x67,0x69, -0x74,0x33,0x1c,0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e, -0x47,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62,0x65,0x72,0x33,0,0x13, -0x6e,0xc1,0xf,0x74,0x76,0x74,0x4c,0x76,0x9a,0x77,0xa2,0x48,0x79,0xa2,0x49,0x7a, -1,0x61,0x2c,0x68,0x12,0x61,0x69,0x6e,0x8b,0x11,0x69,0x6e,0x85,2,0x61,0x36, -0x65,0x3c,0x68,0x14,0x69,0x6e,0x79,0x65,0x68,0xa3,0x66,1,0x68,0x71,0x77,0x73, -1,0x68,0x28,0x74,0x10,0x68,0x77,0x16,0x6d,0x61,0x72,0x62,0x75,0x74,0x61,0x74, -0x13,0x67,0x6f,0x61,0x6c,0x3d,0x1a,0x65,0x72,0x74,0x69,0x63,0x61,0x6c,0x74,0x61, -0x69,0x6c,0xa3,0x67,0x11,0x61,0x77,0x79,1,0x65,0x32,0x75,0x11,0x64,0x68,0x80, -0x11,0x68,0x65,0x83,0x10,0x68,0x7a,1,0x62,0x34,0x77,0x16,0x69,0x74,0x68,0x74, -0x61,0x69,0x6c,0x7f,0x14,0x61,0x72,0x72,0x65,0x65,0x7d,0x6e,0xa2,0x4c,0x70,0xa2, -0x69,0x71,0xa2,0x69,0x72,0xa2,0x6f,0x73,5,0x74,0x22,0x74,0x38,0x77,0x4c,0x79, -0x16,0x72,0x69,0x61,0x63,0x77,0x61,0x77,0x6f,0x18,0x72,0x61,0x69,0x67,0x68,0x74, -0x77,0x61,0x77,0xa3,0x55,0x15,0x61,0x73,0x68,0x6b,0x61,0x66,0x6d,0x61,0x2e,0x65, -0x38,0x68,0x11,0x69,0x6e,0x6b,0x10,0x64,0x62,0x11,0x68,0x65,0x65,1,0x65,0x2e, -0x6d,0x13,0x6b,0x61,0x74,0x68,0x69,0x10,0x6e,0x67,2,0x6f,0x2c,0x75,0x50,0x79, -0x10,0x61,0x91,1,0x6a,0x28,0x6f,0x10,0x6e,0x55,0x1a,0x6f,0x69,0x6e,0x69,0x6e, -0x67,0x67,0x72,0x6f,0x75,0x70,0x21,0x10,0x6e,0x57,0x10,0x65,0x59,0x10,0x61,1, -0x66,0x5b,0x70,0x10,0x68,0x5d,1,0x65,0x38,0x6f,0x18,0x68,0x69,0x6e,0x67,0x79, -0x61,0x79,0x65,0x68,0x93,1,0x68,0x5f,0x76,0x16,0x65,0x72,0x73,0x65,0x64,0x70, -0x65,0x61,0x67,0xc1,0xc7,0x67,0xa4,0x52,0x68,0xa4,0x59,0x6b,0xa4,0x99,0x6c,0xa4, -0xb2,0x6d,2,0x61,0x2e,0x65,0xa4,0x3e,0x69,0x10,0x6d,0x53,1,0x6c,0xa2,0xe7, -0x6e,0x16,0x69,0x63,0x68,0x61,0x65,0x61,0x6e,0,0x12,0x6e,0x76,0x73,0x51,0x73, -0x3e,0x74,0x5c,0x77,0xa0,0x79,0xa2,0x42,0x7a,0x13,0x61,0x79,0x69,0x6e,0xa3,0x54, -0x10,0x61,1,0x64,0x2e,0x6d,0x12,0x65,0x6b,0x68,0xa3,0x4c,0x11,0x68,0x65,0xa3, -0x4b,3,0x61,0x38,0x65,0x3c,0x68,0x4a,0x77,0x13,0x65,0x6e,0x74,0x79,0xa3,0x51, -0x10,0x77,0xa3,0x4d,1,0x6e,0xa3,0x4e,0x74,0x10,0x68,0xa3,0x4f,0x14,0x61,0x6d, -0x65,0x64,0x68,0xa3,0x50,0x11,0x61,0x77,0xa3,0x52,0x12,0x6f,0x64,0x68,0xa3,0x53, -0x6e,0x3a,0x6f,0x40,0x70,0x46,0x71,0x4a,0x72,0x12,0x65,0x73,0x68,0xa3,0x4a,0x11, -0x75,0x6e,0xa3,0x46,0x11,0x6e,0x65,0xa3,0x47,0x10,0x65,0xa3,0x48,0x12,0x6f,0x70, -0x68,0xa3,0x49,0x67,0x33,0x67,0x38,0x68,0x40,0x6b,0x5e,0x6c,0x66,0x6d,0x11,0x65, -0x6d,0xa3,0x45,0x13,0x69,0x6d,0x65,0x6c,0xa1,1,0x65,0x32,0x75,0x14,0x6e,0x64, -0x72,0x65,0x64,0xa3,0x42,0x11,0x74,0x68,0xa3,0x41,0x12,0x61,0x70,0x68,0xa3,0x43, -0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x44,0x61,0x34,0x62,0x4a,0x64,0x50,0x66,0x12, -0x69,0x76,0x65,0x9f,1,0x6c,0x2a,0x79,0x11,0x69,0x6e,0x97,0x12,0x65,0x70,0x68, -0x95,0x12,0x65,0x74,0x68,0x99,1,0x61,0x30,0x68,0x14,0x61,0x6d,0x65,0x64,0x68, -0x9d,0x13,0x6c,0x65,0x74,0x68,0x9b,0x15,0x61,0x79,0x61,0x6c,0x61,0x6d,6,0x6e, -0x2c,0x6e,0x34,0x72,0x5e,0x73,0x62,0x74,0x11,0x74,0x61,0xa3,0x63,2,0x67,0x2e, -0x6e,0x32,0x79,0x10,0x61,0xa3,0x60,0x10,0x61,0xa3,0x5d,1,0x61,0xa3,0x5e,0x6e, -0x10,0x61,0xa3,0x5f,0x10,0x61,0xa3,0x61,0x11,0x73,0x61,0xa3,0x62,0x62,0x3c,0x6a, -0x42,0x6c,0x10,0x6c,1,0x61,0xa3,0x5b,0x6c,0x10,0x61,0xa3,0x5c,0x11,0x68,0x61, -0xa3,0x59,0x10,0x61,0xa3,0x5a,0x11,0x65,0x6d,0x51,0x10,0x61,1,0x66,0x37,0x6d, -0x11,0x61,0x6c,0x39,1,0x61,0x40,0x65,0x3e,1,0x68,0x28,0x74,0x10,0x68,0x45, -0x40,0x13,0x67,0x6f,0x61,0x6c,0x43,2,0x68,0x3b,0x6d,0x5c,0x6e,0x1a,0x69,0x66, -0x69,0x72,0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,1,0x6b,0x2a,0x70,0x10,0x61,0xa3, -0x65,0x15,0x69,0x6e,0x6e,0x61,0x79,0x61,0xa3,0x64,0x1a,0x7a,0x61,0x6f,0x6e,0x68, -0x65,0x68,0x67,0x6f,0x61,0x6c,0x3d,2,0x61,0x3a,0x68,0x44,0x6e,0x17,0x6f,0x74, -0x74,0x65,0x64,0x68,0x65,0x68,0x4b,1,0x66,0x47,0x70,0x10,0x68,0x49,0x12,0x61, -0x70,0x68,0x89,0x11,0x61,0x6d,0x4c,0x12,0x61,0x64,0x68,0x4f,0x61,0x6e,0x62,0xa2, -0x54,0x64,0xa2,0x70,0x65,0x31,0x66,2,0x61,0x3e,0x65,0x4a,0x69,0x19,0x6e,0x61, -0x6c,0x73,0x65,0x6d,0x6b,0x61,0x74,0x68,0x35,0x15,0x72,0x73,0x69,0x79,0x65,0x68, -0x8f,0x86,0x10,0x68,0x33,2,0x66,0x3c,0x69,0x70,0x6c,1,0x61,0x28,0x65,0x10, -0x66,0x27,0x11,0x70,0x68,0x25,0x14,0x72,0x69,0x63,0x61,0x6e,2,0x66,0x30,0x6e, -0x36,0x71,0x11,0x61,0x66,0xa3,0x58,0x11,0x65,0x68,0xa3,0x56,0x12,0x6f,0x6f,0x6e, -0xa3,0x57,0x10,0x6e,0x23,1,0x65,0x4a,0x75,0x10,0x72,0x1f,0x75,0x73,0x68,0x61, -0x73,0x6b,0x69,0x79,0x65,0x68,0x62,0x61,0x72,0x72,0x65,0x65,0x8d,1,0x68,0x29, -0x74,0x10,0x68,0x2b,0x11,0x61,0x6c,0x2c,0x16,0x61,0x74,0x68,0x72,0x69,0x73,0x68, -0x2f,7,0x6e,0x2e,0x6e,0x2c,0x72,0x3e,0x74,0x56,0x75,0x21,0x18,0x6f,0x6e,0x6a, -0x6f,0x69,0x6e,0x69,0x6e,0x67,0x21,0x28,0x1a,0x69,0x67,0x68,0x74,0x6a,0x6f,0x69, -0x6e,0x69,0x6e,0x67,0x29,0x2a,0x19,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e, -0x74,0x2b,0x63,0x23,0x64,0x40,0x6a,0x56,0x6c,0x26,0x19,0x65,0x66,0x74,0x6a,0x6f, -0x69,0x6e,0x69,0x6e,0x67,0x27,0x24,0x19,0x75,0x61,0x6c,0x6a,0x6f,0x69,0x6e,0x69, -0x6e,0x67,0x25,0x19,0x6f,0x69,0x6e,0x63,0x61,0x75,0x73,0x69,0x6e,0x67,0x23,0, -0x14,0x6e,0xc0,0xe5,0x73,0x5e,0x77,0x23,0x77,0x40,0x78,0x58,0x7a,0x10,0x77,0x58, -1,0x6a,0x75,0x73,0x13,0x70,0x61,0x63,0x65,0x59,1,0x6a,0x5d,0x6f,0x17,0x72, -0x64,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x5d,0x10,0x78,0x21,0x73,0x4a,0x75,0x7a,0x76, -1,0x66,0x7d,0x69,0x7e,0x13,0x72,0x61,0x6d,0x61,0x7e,0x14,0x66,0x69,0x6e,0x61, -0x6c,0x7d,4,0x61,0x51,0x67,0x53,0x70,0x28,0x75,0x30,0x79,0x57,0x54,0x12,0x61, -0x63,0x65,0x55,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x53,0x15,0x6e,0x6b,0x6e, -0x6f,0x77,0x6e,0x21,0x6e,0x60,0x6f,0xa2,0x41,0x70,0xa2,0x50,0x71,0xa2,0x6e,0x72, -1,0x65,0x24,0x69,0x6f,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69, -0x63,0x61,0x74,0x6f,0x72,0x6f,4,0x65,0x3e,0x6c,0x5b,0x6f,0x46,0x73,0x45,0x75, -0x46,0x14,0x6d,0x65,0x72,0x69,0x63,0x47,0x15,0x78,0x74,0x6c,0x69,0x6e,0x65,0x5b, -0x17,0x6e,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x45,0x10,0x70,0x48,0x1c,0x65,0x6e, -0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x49,1,0x6f,0x3e,0x72, -0x4c,0x1a,0x65,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x4d,0x4a,0x1b, -0x73,0x74,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x4b,0x10,0x75,0x4e, -0x16,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x68,0x7b,0x68,0x50,0x69,0x86,0x6a, -0xa2,0x61,0x6c,0xa2,0x65,0x6d,0x1c,0x61,0x6e,0x64,0x61,0x74,0x6f,0x72,0x79,0x62, -0x72,0x65,0x61,0x6b,0x2d,4,0x32,0x5f,0x33,0x61,0x65,0x34,0x6c,0x6d,0x79,0x3a, -0x13,0x70,0x68,0x65,0x6e,0x3b,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74,0x74,0x65, -0x72,0x6d,2,0x64,0x28,0x6e,0x3c,0x73,0x41,0x3c,0x18,0x65,0x6f,0x67,0x72,0x61, -0x70,0x68,0x69,0x63,0x3d,0x3e,1,0x66,0x3e,0x73,0x11,0x65,0x70,1,0x61,0x22, -0x65,0x14,0x72,0x61,0x62,0x6c,0x65,0x3f,0x18,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72, -0x69,0x63,0x41,2,0x6c,0x63,0x74,0x65,0x76,0x67,1,0x66,0x43,0x69,0x15,0x6e, -0x65,0x66,0x65,0x65,0x64,0x43,0x61,0x42,0x62,0xa2,0x49,0x63,0xa2,0x76,0x65,0xa2, -0xfc,0x67,0x10,0x6c,0x38,0x11,0x75,0x65,0x39,5,0x6d,0xf,0x6d,0x28,0x70,0x79, -0x73,0x7b,0x16,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x69,0x23,0x6b,0x38,0x6c, -0x24,0x17,0x70,0x68,0x61,0x62,0x65,0x74,0x69,0x63,0x25,0x76,0x13,0x73,0x61,0x72, -0x61,0x76,1,0x70,0x2e,0x73,0x13,0x74,0x61,0x72,0x74,0x7b,0x15,0x72,0x65,0x62, -0x61,0x73,0x65,0x79,4,0x32,0x27,0x61,0x29,0x62,0x2b,0x6b,0x2d,0x72,0x12,0x65, -0x61,0x6b,2,0x61,0x36,0x62,0x3e,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x57, -0x13,0x66,0x74,0x65,0x72,0x29,1,0x65,0x2a,0x6f,0x11,0x74,0x68,0x27,0x13,0x66, -0x6f,0x72,0x65,0x2b,7,0x6d,0x51,0x6d,0x33,0x6f,0x28,0x70,0x69,0x72,0x35,1, -0x6d,0x76,0x6e,1,0x64,0x3c,0x74,0x1a,0x69,0x6e,0x67,0x65,0x6e,0x74,0x62,0x72, -0x65,0x61,0x6b,0x2f,0x15,0x69,0x74,0x69,0x6f,0x6e,0x61,0x1f,0x6c,0x6a,0x61,0x70, -0x61,0x6e,0x65,0x73,0x65,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x6b,1,0x62,0x3a, -0x70,0x19,0x6c,0x65,0x78,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x51,0x18,0x69,0x6e, -0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x33,0x61,0x6a,0x62,0x2f,0x6a,0x6b,0x6c,0x30, -0x13,0x6f,0x73,0x65,0x70,1,0x61,0x38,0x75,0x18,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0x31,0x18,0x72,0x65,0x6e,0x74,0x68,0x65,0x73,0x69,0x73,0x69,0x1b, -0x72,0x72,0x69,0x61,0x67,0x65,0x72,0x65,0x74,0x75,0x72,0x6e,0x35,2,0x62,0x3e, -0x6d,0x46,0x78,0x36,0x18,0x63,0x6c,0x61,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x37,0x70, -0x12,0x61,0x73,0x65,0x71,0x72,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x73,1, -0x64,0x42,0x6e,1,0x6f,0x32,0x75,0x26,0x14,0x6d,0x65,0x72,0x69,0x63,0x27,0x11, -0x6e,0x65,0x21,1,0x65,0x2e,0x69,0x24,0x12,0x67,0x69,0x74,0x25,0x22,0x14,0x63, -0x69,0x6d,0x61,0x6c,0x23,0,0x18,0x6e,0xc4,0x6f,0x74,0xc1,0x91,0x77,0x96,0x77, -0xa2,0x4c,0x78,0xa2,0x70,0x79,0xa2,0x7a,0x7a,6,0x73,0x1e,0x73,0x34,0x78,0x42, -0x79,0x48,0x7a,0x11,0x7a,0x7a,0xa3,0x67,0x10,0x79,1,0x65,0xa3,0xae,0x6d,0xa3, -0x81,0x11,0x78,0x78,0xa3,0x66,0x11,0x79,0x79,0x21,0x61,0x30,0x69,0x58,0x6d,0x11, -0x74,0x68,0xa3,0x80,0x10,0x6e,1,0x61,0x26,0x62,0xa3,0xb1,0x1a,0x62,0x61,0x7a, -0x61,0x72,0x73,0x71,0x75,0x61,0x72,0x65,0xa3,0xb1,0x11,0x6e,0x68,0x23,2,0x61, -0x30,0x63,0x5a,0x6f,0x11,0x6c,0x65,0xa3,0x9b,1,0x6e,0x3c,0x72,0x10,0x61,0xa2, -0x92,0x15,0x6e,0x67,0x63,0x69,0x74,0x69,0xa3,0x92,0x12,0x63,0x68,0x6f,0xa3,0xbc, -0x11,0x68,0x6f,0xa3,0xbc,1,0x70,0x2c,0x73,0x11,0x75,0x78,0xa3,0x65,0x11,0x65, -0x6f,0x9b,1,0x65,0x2c,0x69,0x72,0x11,0x69,0x69,0x73,0x11,0x7a,0x69,0xa2,0xc0, -0x11,0x64,0x69,0xa3,0xc0,0x74,0x66,0x75,0xa2,0xde,0x76,1,0x61,0x48,0x69,1, -0x73,0x38,0x74,0x10,0x68,0xa2,0xc5,0x13,0x6b,0x75,0x71,0x69,0xa3,0xc5,0x10,0x70, -0xa3,0x64,0x10,0x69,0xa2,0x63,0x10,0x69,0xa3,0x63,7,0x68,0x3e,0x68,0x34,0x69, -0x48,0x6e,0x86,0x6f,0x11,0x74,0x6f,0xa3,0xc4,0x10,0x61,1,0x61,0x24,0x69,0x6d, -0x6a,0x11,0x6e,0x61,0x6b,2,0x62,0x3a,0x66,0x4a,0x72,0x10,0x68,0xa2,0x9e,0x12, -0x75,0x74,0x61,0xa3,0x9e,1,0x65,0x24,0x74,0x6f,0x12,0x74,0x61,0x6e,0x6f,0x14, -0x69,0x6e,0x61,0x67,0x68,0x99,0x11,0x73,0x61,0xa3,0xc3,0x61,0x36,0x65,0xa2,0x65, -0x66,0xa2,0x71,0x67,0x11,0x6c,0x67,0x75,6,0x6c,0x28,0x6c,0x32,0x6d,0x38,0x6e, -0x44,0x76,0x10,0x74,0xa3,0x7f,1,0x65,0x89,0x75,0x97,1,0x69,0x24,0x6c,0x67, -0x10,0x6c,0x67,0x10,0x67,0xa2,0x9a,1,0x73,0x2a,0x75,0x10,0x74,0xa3,0x9a,0x10, -0x61,0xa3,0xc3,0x67,0x36,0x69,0x52,0x6b,0x10,0x72,0xa2,0x99,0x10,0x69,0xa3,0x99, -1,0x61,0x30,0x62,0x7a,0x13,0x61,0x6e,0x77,0x61,0x7b,0x12,0x6c,0x6f,0x67,0x75, -2,0x6c,0x32,0x74,0x34,0x76,0x12,0x69,0x65,0x74,0xa3,0x7f,0x10,0x65,0x89,0x12, -0x68,0x61,0x6d,0xa3,0x6a,1,0x6c,0x2a,0x6e,0x10,0x67,0xa3,0x62,0x10,0x75,0x68, -0x11,0x67,0x75,0x69,0x11,0x6e,0x67,0x99,1,0x67,0x32,0x6e,0x14,0x6b,0x6e,0x6f, -0x77,0x6e,0xa3,0x67,0x11,0x61,0x72,0x8a,0x13,0x69,0x74,0x69,0x63,0x8b,0x71,0xc1, -0x13,0x71,0xa2,0xde,0x72,0xa2,0xe3,0x73,6,0x69,0x8a,0x69,0x72,0x6f,0xa2,0x4c, -0x75,0xa2,0x75,0x79,1,0x6c,0x46,0x72,4,0x63,0x65,0x65,0xa3,0x5f,0x69,0x2c, -0x6a,0xa3,0x60,0x6e,0xa3,0x61,0x11,0x61,0x63,0x65,0x10,0x6f,0x94,0x16,0x74,0x69, -0x6e,0x61,0x67,0x72,0x69,0x95,2,0x64,0x3c,0x67,0x4c,0x6e,1,0x64,0xa3,0x91, -0x68,0x62,0x12,0x61,0x6c,0x61,0x63,0x10,0x64,0xa2,0xa6,0x12,0x68,0x61,0x6d,0xa3, -0xa6,0x17,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa3,0x70,2,0x67,0x3a,0x72, -0x52,0x79,0x10,0x6f,0xa2,0xb0,0x12,0x6d,0x62,0x6f,0xa3,0xb0,1,0x64,0x26,0x6f, -0xa3,0xb8,0xa2,0xb7,0x12,0x69,0x61,0x6e,0xa3,0xb7,0x10,0x61,0xa2,0x98,0x16,0x73, -0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0x98,0x11,0x6e,0x64,0xa2,0x71,0x14,0x61,0x6e, -0x65,0x73,0x65,0xa3,0x71,0x61,0x5c,0x67,0xa2,0x43,0x68,1,0x61,0x2a,0x72,0x10, -0x64,0xa3,0x97,2,0x72,0x28,0x76,0x30,0x77,0x87,0x12,0x61,0x64,0x61,0xa3,0x97, -0x12,0x69,0x61,0x6e,0x87,2,0x6d,0x40,0x72,0x58,0x75,0x10,0x72,0xa2,0x6f,0x15, -0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0x6f,1,0x61,0x26,0x72,0xa3,0x7e,0x14,0x72, -0x69,0x74,0x61,0x6e,0xa3,0x7e,1,0x61,0xa3,0x5e,0x62,0xa3,0x85,0x11,0x6e,0x77, -0xa3,0x70,0x11,0x61,0x61,1,0x63,0x2f,0x69,0x23,3,0x65,0x3e,0x6a,0x48,0x6f, -0x4e,0x75,0x10,0x6e,1,0x69,0x24,0x72,0x61,0x10,0x63,0x61,0x13,0x6a,0x61,0x6e, -0x67,0xa3,0x6e,0x11,0x6e,0x67,0xa3,0x6e,1,0x68,0x2a,0x72,0x10,0x6f,0xa3,0x5d, -0x10,0x67,0xa3,0xb6,0x6e,0xa2,0x83,0x6f,0xa4,1,0x70,5,0x6c,0x1e,0x6c,0x44, -0x72,0x4a,0x73,0x1b,0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76,0x69, -0xa3,0x7b,0x11,0x72,0x64,0xa3,0x5c,0x11,0x74,0x69,0xa3,0x7d,0x61,0x7c,0x65,0xa2, -0x54,0x68,3,0x61,0x3e,0x6c,0x4e,0x6e,0x5e,0x6f,0x16,0x65,0x6e,0x69,0x63,0x69, -0x61,0x6e,0xa3,0x5b,0x10,0x67,0xa2,0x5a,0x12,0x73,0x70,0x61,0xa3,0x5a,2,0x69, -0xa3,0x7a,0x70,0xa3,0x7b,0x76,0xa3,0x7c,0x10,0x78,0xa3,0x5b,2,0x68,0x3e,0x6c, -0x50,0x75,0x10,0x63,0xa2,0xa5,0x14,0x69,0x6e,0x68,0x61,0x75,0xa3,0xa5,0x17,0x61, -0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0x4b,0x10,0x6d,0xa2,0x90,0x14,0x79,0x72, -0x65,0x6e,0x65,0xa3,0x90,0x11,0x72,0x6d,0xa3,0x59,6,0x6b,0x36,0x6b,0x56,0x73, -0x6e,0x75,0x74,0x79,0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61,0x63, -0x68,0x75,0x65,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xba,1,0x67,0x2e,0x6f,0xa2,0x57, -0x10,0x6f,0xa3,0x57,0x10,0x62,0xa3,0x84,0x11,0x68,0x75,0xa3,0x96,0x12,0x73,0x68, -0x75,0xa3,0x96,0x61,0x42,0x62,0x9e,0x65,0x10,0x77,1,0x61,0xa3,0xaa,0x74,0x14, -0x61,0x69,0x6c,0x75,0x65,0x97,3,0x62,0x32,0x67,0x40,0x6e,0x56,0x72,0x10,0x62, -0xa3,0x8e,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0x8f,0x10,0x6d,0xa2,0xc7,0x15, -0x75,0x6e,0x64,0x61,0x72,0x69,0xa3,0xc7,0x10,0x64,0xa2,0xbb,0x16,0x69,0x6e,0x61, -0x67,0x61,0x72,0x69,0xa3,0xbb,0x11,0x61,0x74,0xa3,0x8f,4,0x67,0x3c,0x6c,0x4e, -0x72,0xa2,0x8e,0x73,0xa2,0x9c,0x75,0x11,0x67,0x72,0xa3,0xc2,1,0x61,0x2a,0x68, -0x11,0x61,0x6d,0x5b,0x10,0x6d,0x5b,1,0x63,0xa2,0x6a,0x64,6,0x70,0x41,0x70, -0x3a,0x73,0x58,0x74,0x86,0x75,0x14,0x79,0x67,0x68,0x75,0x72,0xa3,0xc2,0x11,0x65, -0x72,1,0x6d,0x2c,0x73,0x12,0x69,0x61,0x6e,0x9b,0x11,0x69,0x63,0xa3,0x59,0x10, -0x6f,1,0x67,0x3a,0x75,0x18,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3, -0x85,0x13,0x64,0x69,0x61,0x6e,0xa3,0xb8,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3,0x58, -0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f,0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61, -0x6e,0xa3,0x8e,0x17,0x75,0x6e,0x67,0x61,0x72,0x69,0x61,0x6e,0xa3,0x4c,0x14,0x74, -0x61,0x6c,0x69,0x63,0x5d,1,0x68,0x26,0x6b,0xa3,0x6d,0x12,0x69,0x6b,0x69,0xa3, -0x6d,2,0x69,0x2c,0x6b,0x30,0x79,0x10,0x61,0x5f,0x11,0x79,0x61,0x5f,0x10,0x68, -0xa3,0x58,2,0x61,0x36,0x67,0x3c,0x6d,0x10,0x61,0x84,0x12,0x6e,0x79,0x61,0x85, -0x11,0x67,0x65,0xa3,0xab,0x10,0x65,0xa3,0xab,0x68,0xc3,0x15,0x6b,0xc2,0x2c,0x6b, -0xa4,0x17,0x6c,0xa4,0xba,0x6d,8,0x6f,0x46,0x6f,0x48,0x72,0x74,0x74,0x80,0x75, +0x71,0x12,0x6a,0x6b,0x69,0xa3,0xe5,0x67,0xa2,0xb5,0x68,0xa4,0x97,0x69,3,0x64, +0x4c,0x6d,0xa2,0x55,0x6e,0xa2,0x62,0x70,0x13,0x61,0x65,0x78,0x74,0x2a,0x16,0x65, +0x6e,0x73,0x69,0x6f,0x6e,0x73,0x2b,1,0x63,0x99,0x65,0x17,0x6f,0x67,0x72,0x61, +0x70,0x68,0x69,0x63,1,0x64,0x56,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa4, +0xb,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e, +0xa5,0xb,0x13,0x65,0x73,0x63,0x72,0x1f,0x69,0x70,0x74,0x69,0x6f,0x6e,0x63,0x68, +0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x73,0x99,0x1c,0x70,0x65,0x72,0x69,0x61,0x6c, +0x61,0x72,0x61,0x6d,0x61,0x69,0x63,0xa3,0xba,1,0x64,0x62,0x73,0x1b,0x63,0x72, +0x69,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74, +0x68,0x69,0x61,0x6e,0xa3,0xbd,0x13,0x6c,0x61,0x76,0x69,0xa3,0xbe,0x11,0x69,0x63, +1,0x6e,0x3e,0x73,0x1a,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73, +0xa5,0x1e,0x19,0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,5, +0x6f,0x61,0x6f,0x80,0x72,0x8a,0x75,2,0x6a,0x4e,0x6e,0x58,0x72,1,0x6d,0x36, +0x75,0x16,0x6e,0x67,0x6b,0x68,0x65,0x6d,0x61,0xa5,0x4b,0x13,0x75,0x6b,0x68,0x69, +0x43,0x14,0x61,0x72,0x61,0x74,0x69,0x45,0x18,0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e, +0x64,0x69,0xa5,0x1c,0x13,0x74,0x68,0x69,0x63,0xa3,0x59,1,0x61,0x5c,0x65,0x11, +0x65,0x6b,0x30,1,0x61,0x38,0x65,0x11,0x78,0x74,0x6e,0x14,0x65,0x6e,0x64,0x65, +0x64,0x6f,0x17,0x6e,0x64,0x63,0x6f,0x70,0x74,0x69,0x63,0x31,0x13,0x6e,0x74,0x68, +0x61,0xa3,0xe4,0x61,0x5c,0x65,0x64,0x6c,0x17,0x61,0x67,0x6f,0x6c,0x69,0x74,0x69, +0x63,0xa2,0x88,0x12,0x73,0x75,0x70,0xa4,0xa,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e, +0x74,0xa5,0xa,0x12,0x72,0x61,0x79,0xa5,0x4a,1,0x6e,0xa2,0x46,0x6f,1,0x6d, +0x6e,0x72,0x13,0x67,0x69,0x61,0x6e,0x5a,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2, +0x87,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x87,0x11,0x78,0x74,0xa4,0x1b, +0x14,0x65,0x6e,0x64,0x65,0x64,0xa5,0x1b,0x1a,0x65,0x74,0x72,0x69,0x63,0x73,0x68, +0x61,0x70,0x65,0x73,0x8c,0x12,0x65,0x78,0x74,0xa2,0xe3,0x14,0x65,0x6e,0x64,0x65, +0x64,0xa3,0xe3,0x1e,0x65,0x72,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, +0x69,0x6f,0x6e,0x71,2,0x61,0xa2,0x48,0x65,0xa2,0xdf,0x69,1,0x67,0x30,0x72, +0x14,0x61,0x67,0x61,0x6e,0x61,0x9d,0x10,0x68,1,0x70,0x3a,0x73,0x18,0x75,0x72, +0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4b,1,0x72,0x3c,0x75,0x19,0x73,0x75, +0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4c,0x11,0x69,0x76,0x1f,0x61,0x74, +0x65,0x75,0x73,0x65,0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4c, +2,0x6c,0x32,0x6e,0x9a,0x74,0x12,0x72,0x61,0x6e,0xa5,2,0x10,0x66,2,0x61, +0x58,0x6d,0x70,0x77,0x14,0x69,0x64,0x74,0x68,0x61,0x1f,0x6e,0x64,0x66,0x75,0x6c, +0x6c,0x77,0x69,0x64,0x74,0x68,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x1a,0x6e,0x64, +0x66,0x75,0x6c,0x6c,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x13,0x61,0x72,0x6b,0x73, +0xa3,0x52,2,0x67,0x34,0x69,0xa2,0x45,0x75,0x12,0x6e,0x6f,0x6f,0xa3,0x63,0x11, +0x75,0x6c,0xa2,0x4a,2,0x63,0x3c,0x6a,0x5e,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62, +0x6c,0x65,0x73,0xa3,0x4a,0x1f,0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x69,0x6c,0x69, +0x74,0x79,0x6a,0x61,0x6d,0x6f,0xa3,0x41,0x12,0x61,0x6d,0x6f,0x5c,0x17,0x65,0x78, +0x74,0x65,0x6e,0x64,0x65,0x64,1,0x61,0xa3,0xb4,0x62,0xa3,0xb9,0x19,0x66,0x69, +0x72,0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,0xa5,0x1d,0x13,0x62,0x72,0x65,0x77,0x37, +0x61,0xa4,0x1d,0x62,0xa6,0x6a,0x63,0xa8,0x3f,0x64,0xac,0xfa,0x65,5,0x6d,0xa9, +0x6d,0x94,0x6e,0xa2,0x41,0x74,0x15,0x68,0x69,0x6f,0x70,0x69,0x63,0x5e,1,0x65, +0x40,0x73,0x11,0x75,0x70,0xa2,0x86,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, +0x86,0x11,0x78,0x74,0xa2,0x85,2,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x65,0x13,0x6e, +0x64,0x65,0x64,0xa2,0x85,1,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x16,0x6f,0x74,0x69, +0x63,0x6f,0x6e,0x73,0xa3,0xce,0x15,0x63,0x6c,0x6f,0x73,0x65,0x64,2,0x61,0x5a, +0x63,0x9e,0x69,0x1c,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x75, +0x70,0xa2,0xc4,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc4,0x16,0x6c,0x70, +0x68,0x61,0x6e,0x75,0x6d,0x86,1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0xc3,0x13, +0x72,0x69,0x63,0x73,0x86,0x18,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, +0xc3,0x11,0x6a,0x6b,0xa2,0x44,0x1f,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x61,0x6e, +0x64,0x6d,0x6f,0x6e,0x74,0x68,0x73,0xa3,0x44,0x61,0x4a,0x67,0x76,0x6c,1,0x62, +0x30,0x79,0x13,0x6d,0x61,0x69,0x63,0xa5,0x25,0x13,0x61,0x73,0x61,0x6e,0xa3,0xe2, +0x13,0x72,0x6c,0x79,0x64,0x1f,0x79,0x6e,0x61,0x73,0x74,0x69,0x63,0x63,0x75,0x6e, +0x65,0x69,0x66,0x6f,0x72,0x6d,0xa5,1,0x1f,0x79,0x70,0x74,0x69,0x61,0x6e,0x68, +0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,1,0x66,0x48,0x73,0xa2,0xc2,0x12, +0x65,0x78,0x74,1,0x61,0xa5,0x49,0x65,0x14,0x6e,0x64,0x65,0x64,0x61,0xa5,0x49, +0x1c,0x6f,0x72,0x6d,0x61,0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0xa5,0x24, +7,0x6e,0xc0,0xf2,0x6e,0x3e,0x72,0xa2,0x5d,0x73,0xa2,0xe5,0x76,0x14,0x65,0x73, +0x74,0x61,0x6e,0xa3,0xbc,1,0x61,0x92,0x63,0x13,0x69,0x65,0x6e,0x74,1,0x67, +0x34,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xa5,0x13,0x72,0x65,0x65,0x6b, +1,0x6d,0x34,0x6e,0x15,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0x7f,0x13,0x75,0x73, +0x69,0x63,0xa2,0x7e,0x19,0x61,0x6c,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0xa3, +0x7e,0x10,0x74,0x1f,0x6f,0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c, +0x79,0x70,0x68,0x73,0xa3,0xfe,2,0x61,0x32,0x6d,0xa2,0x7e,0x72,0x12,0x6f,0x77, +0x73,0x7d,0x12,0x62,0x69,0x63,0x38,3,0x65,0x4a,0x6d,0x80,0x70,0xa2,0x50,0x73, +0x11,0x75,0x70,0xa2,0x80,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x80,0x11, +0x78,0x74,3,0x61,0xa3,0xd2,0x62,0xa5,0x35,0x63,0xa5,0x41,0x65,0x13,0x6e,0x64, +0x65,0x64,2,0x61,0xa3,0xd2,0x62,0xa5,0x35,0x63,0xa5,0x41,0x12,0x61,0x74,0x68, +0xa2,0xd3,0x18,0x65,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x61,0x1f,0x6c,0x70,0x68, +0x61,0x62,0x65,0x74,0x69,0x63,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd3,1, +0x66,0x42,0x72,0x1e,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f, +0x72,0x6d,0x73,1,0x61,0xa3,0x51,0x62,0xa3,0x55,0x14,0x65,0x6e,0x69,0x61,0x6e, +0x35,0x12,0x63,0x69,0x69,0x23,0x64,0x9e,0x65,0xa2,0x42,0x68,0xa2,0x4d,0x6c,1, +0x63,0x62,0x70,0x17,0x68,0x61,0x62,0x65,0x74,0x69,0x63,0x70,1,0x66,0xa3,0x50, +0x72,0x1e,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d, +0x73,0xa3,0x50,0x16,0x68,0x65,0x6d,0x69,0x63,0x61,0x6c,0xa2,0xd0,0x16,0x73,0x79, +0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd0,0x12,0x6c,0x61,0x6d,0xa5,7,0x1a,0x67,0x65, +0x61,0x6e,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0x77,0x11,0x6f,0x6d,0xa3,0xfd, +7,0x6f,0x71,0x6f,0x64,0x72,0xa2,0x41,0x75,0xa2,0x58,0x79,0x1b,0x7a,0x61,0x6e, +0x74,0x69,0x6e,0x65,0x6d,0x75,0x73,0x69,0x63,0xa2,0x5b,0x18,0x61,0x6c,0x73,0x79, +0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5b,1,0x70,0x34,0x78,0x16,0x64,0x72,0x61,0x77, +0x69,0x6e,0x67,0x89,0x14,0x6f,0x6d,0x6f,0x66,0x6f,0xa0,0x12,0x65,0x78,0x74,0xa2, +0x43,0x14,0x65,0x6e,0x64,0x65,0x64,0xa3,0x43,0x10,0x61,1,0x68,0x40,0x69,0x12, +0x6c,0x6c,0x65,0x92,0x17,0x70,0x61,0x74,0x74,0x65,0x72,0x6e,0x73,0x93,0x11,0x6d, +0x69,0xa3,0xc9,1,0x67,0x2c,0x68,0x11,0x69,0x64,0xa3,0x64,0x14,0x69,0x6e,0x65, +0x73,0x65,0xa3,0x81,0x61,0x48,0x65,0xa2,0x4e,0x68,0xa2,0x52,0x6c,0x1a,0x6f,0x63, +0x6b,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x8b,3,0x6c,0x34,0x6d,0x40,0x73, +0x66,0x74,0x11,0x61,0x6b,0xa3,0xc7,0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x93,0x11, +0x75,0x6d,0xa2,0xb1,0x12,0x73,0x75,0x70,0xa2,0xca,0x16,0x70,0x6c,0x65,0x6d,0x65, +0x6e,0x74,0xa3,0xca,1,0x69,0x30,0x73,0x13,0x61,0x76,0x61,0x68,0xa3,0xdd,0x15, +0x63,0x6c,0x61,0x74,0x69,0x6e,0x23,0x14,0x6e,0x67,0x61,0x6c,0x69,0x41,0x16,0x61, +0x69,0x6b,0x73,0x75,0x6b,0x69,0xa5,8,5,0x6f,0xc1,0x60,0x6f,0xa2,0x69,0x75, +0xa4,0x24,0x79,1,0x70,0xa2,0x44,0x72,0x14,0x69,0x6c,0x6c,0x69,0x63,0x32,1, +0x65,0x4c,0x73,0x11,0x75,0x70,0xa2,0x61,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0xa2,0x61,0x12,0x61,0x72,0x79,0xa3,0x61,0x11,0x78,0x74,4,0x61,0xa3,0x9e,0x62, +0xa3,0xa0,0x63,0xa5,9,0x64,0xa5,0x43,0x65,0x13,0x6e,0x64,0x65,0x64,3,0x61, +0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5,9,0x64,0xa5,0x43,0x10,0x72,1,0x69,0x34, +0x6f,0x15,0x6d,0x69,0x6e,0x6f,0x61,0x6e,0xa5,0x36,0x1a,0x6f,0x74,0x73,0x79,0x6c, +0x6c,0x61,0x62,0x61,0x72,0x79,0xa3,0x7b,3,0x6d,0x5a,0x6e,0xa2,0x95,0x70,0xa2, +0xa0,0x75,0x17,0x6e,0x74,0x69,0x6e,0x67,0x72,0x6f,0x64,0xa2,0x9a,0x17,0x6e,0x75, +0x6d,0x65,0x72,0x61,0x6c,0x73,0xa3,0x9a,2,0x62,0x3a,0x6d,0xa2,0x5f,0x70,0x15, +0x61,0x74,0x6a,0x61,0x6d,0x6f,0xa3,0x41,0x14,0x69,0x6e,0x69,0x6e,0x67,2,0x64, +0x46,0x68,0x9e,0x6d,0x1d,0x61,0x72,0x6b,0x73,0x66,0x6f,0x72,0x73,0x79,0x6d,0x62, +0x6f,0x6c,0x73,0x77,0x1e,0x69,0x61,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x6d, +0x61,0x72,0x6b,0x73,0x2e,2,0x65,0x40,0x66,0xa6,0x52,0x73,0x18,0x75,0x70,0x70, +0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x83,0x16,0x78,0x74,0x65,0x6e,0x64,0x65,0x64, +0xa3,0xe0,0x17,0x61,0x6c,0x66,0x6d,0x61,0x72,0x6b,0x73,0xa3,0x52,0x11,0x6f,0x6e, +0x1f,0x69,0x6e,0x64,0x69,0x63,0x6e,0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d, +0x73,0xa3,0xb2,0x1b,0x74,0x72,0x6f,0x6c,0x70,0x69,0x63,0x74,0x75,0x72,0x65,0x73, +0x83,0x12,0x74,0x69,0x63,0xa2,0x84,0x1b,0x65,0x70,0x61,0x63,0x74,0x6e,0x75,0x6d, +0x62,0x65,0x72,0x73,0xa3,0xdf,1,0x6e,0x3e,0x72,0x1b,0x72,0x65,0x6e,0x63,0x79, +0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x75,0x15,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa2, +0x98,0x16,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa2,0x99,0x1d,0x61,0x6e,0x64,0x70, +0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x99,0x61,0xa2,0xea,0x68, +0xa4,0x14,0x6a,0x10,0x6b,0xa2,0x47,4,0x63,0x92,0x65,0xa2,0x83,0x72,0xa2,0xa1, +0x73,0xa2,0xb3,0x75,0x1f,0x6e,0x69,0x66,0x69,0x65,0x64,0x69,0x64,0x65,0x6f,0x67, +0x72,0x61,0x70,0x68,0x73,0xa2,0x47,0x18,0x65,0x78,0x74,0x65,0x6e,0x73,0x69,0x6f, +0x6e,8,0x65,0x71,0x65,0xa5,0,0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42, +0x69,0xa5,0x48,0x14,0x6f,0x6d,0x70,0x61,0x74,0xa2,0x45,1,0x66,0x96,0x69,1, +0x62,0x44,0x64,0x17,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa2,0x4f,0x12,0x73, +0x75,0x70,0xa3,0x5f,0x14,0x69,0x6c,0x69,0x74,0x79,0xa2,0x45,1,0x66,0x54,0x69, +0x18,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa2,0x4f,0x19,0x73,0x75,0x70, +0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x5f,0x13,0x6f,0x72,0x6d,0x73,0xa3,0x53, +0x11,0x78,0x74,8,0x65,0xf,0x65,0xa5,0,0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68, +0xa5,0x42,0x69,0xa5,0x48,0x61,0xa3,0x46,0x62,0xa3,0x5e,0x63,0xa3,0xc5,0x64,0xa3, +0xd1,0x19,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x73,0x75,0x70,0x94,0x16,0x70,0x6c, +0x65,0x6d,0x65,0x6e,0x74,0x95,1,0x74,0x50,0x79,0x14,0x6d,0x62,0x6f,0x6c,0x73, +0x9a,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e, +0x9b,0x14,0x72,0x6f,0x6b,0x65,0x73,0xa3,0x82,2,0x6e,0x48,0x72,0x64,0x75,0x1d, +0x63,0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e,0xa3,0xde, +0x1d,0x61,0x64,0x69,0x61,0x6e,0x73,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x73,0x63, +0x12,0x69,0x61,0x6e,0xa3,0xa8,2,0x61,0x3a,0x65,0x4c,0x6f,0x16,0x72,0x61,0x73, +0x6d,0x69,0x61,0x6e,0xa5,0x2d,1,0x6b,0x26,0x6d,0xa3,0xa4,0x11,0x6d,0x61,0xa3, +0xd4,1,0x72,0x38,0x73,0x17,0x73,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa5,0x19, +0x13,0x6f,0x6b,0x65,0x65,0x60,0x12,0x73,0x75,0x70,0xa2,0xff,0x16,0x70,0x6c,0x65, +0x6d,0x65,0x6e,0x74,0xa3,0xff,3,0x65,0x3e,0x69,0x8e,0x6f,0xa2,0x71,0x75,0x15, +0x70,0x6c,0x6f,0x79,0x61,0x6e,0xa3,0xe1,1,0x73,0x60,0x76,0x16,0x61,0x6e,0x61, +0x67,0x61,0x72,0x69,0x3e,0x12,0x65,0x78,0x74,0xa2,0xb3,1,0x61,0xa5,0x44,0x65, +0x13,0x6e,0x64,0x65,0x64,0xa2,0xb3,0x10,0x61,0xa5,0x44,0x13,0x65,0x72,0x65,0x74, +0xa3,0x5a,2,0x61,0x3a,0x6e,0x82,0x76,0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75, +0xa5,0x2f,0x18,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x73,0x2e,2,0x65,0x30, +0x66,0x36,0x73,0x11,0x75,0x70,0xa3,0x83,0x11,0x78,0x74,0xa3,0xe0,0x18,0x6f,0x72, +0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x77,0x14,0x67,0x62,0x61,0x74,0x73,0x91,1, +0x67,0x3e,0x6d,0x12,0x69,0x6e,0x6f,0xa2,0xab,0x14,0x74,0x69,0x6c,0x65,0x73,0xa3, +0xab,0x11,0x72,0x61,0xa5,0x1a,8,0x6d,0x5f,0x6d,0x3a,0x6e,0x48,0x73,0x7a,0x76, +0xa2,0x4b,0x77,0x12,0x69,0x64,0x65,0x43,0x11,0x65,0x64,0x32,0x12,0x69,0x61,0x6c, +0x33,2,0x61,0x40,0x62,0x37,0x6f,1,0x62,0x28,0x6e,0x10,0x65,0x21,0x13,0x72, +0x65,0x61,0x6b,0x37,0x10,0x72,0x34,0x12,0x72,0x6f,0x77,0x35,2,0x6d,0x38,0x71, +0x46,0x75,1,0x62,0x3d,0x70,0x3e,0x11,0x65,0x72,0x3f,1,0x61,0x24,0x6c,0x39, +0x11,0x6c,0x6c,0x39,1,0x72,0x3b,0x75,0x12,0x61,0x72,0x65,0x3b,0x12,0x65,0x72, +0x74,0x40,0x13,0x69,0x63,0x61,0x6c,0x41,0x63,0x58,0x65,0x92,0x66,0x96,0x69,1, +0x6e,0x36,0x73,0x10,0x6f,0x30,0x14,0x6c,0x61,0x74,0x65,0x64,0x31,0x11,0x69,0x74, +0x2e,0x12,0x69,0x61,0x6c,0x2f,2,0x61,0x36,0x69,0x48,0x6f,0x10,0x6d,0x24,0x12, +0x70,0x61,0x74,0x25,0x10,0x6e,0x22,0x15,0x6f,0x6e,0x69,0x63,0x61,0x6c,0x23,0x13, +0x72,0x63,0x6c,0x65,0x27,0x11,0x6e,0x63,0x27,2,0x69,0x3a,0x6f,0x44,0x72,0x10, +0x61,0x2c,0x14,0x63,0x74,0x69,0x6f,0x6e,0x2d,0x10,0x6e,0x28,0x11,0x61,0x6c,0x29, +0x11,0x6e,0x74,0x2b,4,0x61,0x3a,0x66,0x4c,0x68,0x5e,0x6e,0x70,0x77,0x2a,0x12, +0x69,0x64,0x65,0x2b,0x22,0x17,0x6d,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x26, +0x17,0x75,0x6c,0x6c,0x77,0x69,0x64,0x74,0x68,0x27,0x24,0x17,0x61,0x6c,0x66,0x77, +0x69,0x64,0x74,0x68,0x25,0x20,1,0x61,0x30,0x65,0x14,0x75,0x74,0x72,0x61,0x6c, +0x21,0x28,0x13,0x72,0x72,0x6f,0x77,0x29,0xd,0x6e,0xc0,0xfb,0x73,0x6d,0x73,0x3a, +0x74,0x98,0x75,0xa2,0x49,0x7a,2,0x6c,0x3b,0x70,0x3d,0x73,0x39,5,0x6f,0x28, +0x6f,0x57,0x70,0x34,0x75,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x45,0x11,0x61, +0x63,1,0x65,0x32,0x69,0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x31,0x18,0x73,0x65, +0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x39,0x63,0x53,0x6b,0x55,0x6d,0x51,0x1d,0x69, +0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x27,1,0x6e, +0x40,0x70,0x1c,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72, +0x23,0x17,0x61,0x73,0x73,0x69,0x67,0x6e,0x65,0x64,0x21,0x6e,0x8a,0x6f,0xa2,0x47, +0x70,8,0x66,0x14,0x66,0x5b,0x69,0x59,0x6f,0x4f,0x72,0x24,0x73,0x49,0x17,0x69, +0x76,0x61,0x74,0x65,0x75,0x73,0x65,0x43,0x61,0x2c,0x63,0x4d,0x64,0x47,0x65,0x4b, +0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f, +0x72,0x3d,2,0x64,0x33,0x6c,0x35,0x6f,0x36,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69, +0x6e,0x67,0x6d,0x61,0x72,0x6b,0x2d,1,0x70,0x7c,0x74,0x12,0x68,0x65,0x72,3, +0x6c,0x38,0x6e,0x42,0x70,0x4c,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0x57,0x14,0x65, +0x74,0x74,0x65,0x72,0x2b,0x14,0x75,0x6d,0x62,0x65,0x72,0x37,0x19,0x75,0x6e,0x63, +0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74, +0x75,0x61,0x74,0x69,0x6f,0x6e,0x49,0x66,0x9e,0x66,0x88,0x69,0xa2,0x4b,0x6c,0xa2, +0x5c,0x6d,4,0x61,0x60,0x63,0x31,0x65,0x2f,0x6e,0x2d,0x6f,0x15,0x64,0x69,0x66, +0x69,0x65,0x72,1,0x6c,0x30,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0x55,0x14,0x65, +0x74,0x74,0x65,0x72,0x29,0x17,0x74,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x51,1, +0x69,0x2e,0x6f,0x13,0x72,0x6d,0x61,0x74,0x41,0x1d,0x6e,0x61,0x6c,0x70,0x75,0x6e, +0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x5b,0x10,0x6e,0x1f,0x69,0x74,0x69,0x61, +0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x59,6,0x6d,0x18, +0x6d,0x29,0x6f,0x28,0x74,0x27,0x75,0x23,0x2a,0x1c,0x77,0x65,0x72,0x63,0x61,0x73, +0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x25,0x65,0x28,0x69,0x3c,0x6c,0x25,0x19,0x74, +0x74,0x65,0x72,0x6e,0x75,0x6d,0x62,0x65,0x72,0x35,0x1a,0x6e,0x65,0x73,0x65,0x70, +0x61,0x72,0x61,0x74,0x6f,0x72,0x3b,0x63,0x44,0x64,0xa2,0x60,0x65,0x1b,0x6e,0x63, +0x6c,0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x2f,6,0x6e,0x39,0x6e,0x46, +0x6f,0x4e,0x73,0x45,0x75,0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62, +0x6f,0x6c,0x53,0x20,0x12,0x74,0x72,0x6c,0x3f,0x42,0x10,0x6e,1,0x6e,0x2c,0x74, +0x12,0x72,0x6f,0x6c,0x3f,0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75,0x6e,0x63,0x74, +0x75,0x61,0x74,0x69,0x6f,0x6e,0x4d,0x63,0x3f,0x66,0x41,0x6c,0x1d,0x6f,0x73,0x65, +0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4b,2,0x61,0x30,0x65, +0x4a,0x69,0x12,0x67,0x69,0x74,0x33,0x1c,0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0x47,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62, +0x65,0x72,0x33,0,0x13,0x6e,0xc1,0xf,0x74,0x76,0x74,0x4c,0x76,0x9a,0x77,0xa2, +0x48,0x79,0xa2,0x49,0x7a,1,0x61,0x2c,0x68,0x12,0x61,0x69,0x6e,0x8b,0x11,0x69, +0x6e,0x85,2,0x61,0x36,0x65,0x3c,0x68,0x14,0x69,0x6e,0x79,0x65,0x68,0xa3,0x66, +1,0x68,0x71,0x77,0x73,1,0x68,0x28,0x74,0x10,0x68,0x77,0x16,0x6d,0x61,0x72, +0x62,0x75,0x74,0x61,0x74,0x13,0x67,0x6f,0x61,0x6c,0x3d,0x1a,0x65,0x72,0x74,0x69, +0x63,0x61,0x6c,0x74,0x61,0x69,0x6c,0xa3,0x67,0x11,0x61,0x77,0x79,1,0x65,0x32, +0x75,0x11,0x64,0x68,0x80,0x11,0x68,0x65,0x83,0x10,0x68,0x7a,1,0x62,0x34,0x77, +0x16,0x69,0x74,0x68,0x74,0x61,0x69,0x6c,0x7f,0x14,0x61,0x72,0x72,0x65,0x65,0x7d, +0x6e,0xa2,0x4c,0x70,0xa2,0x69,0x71,0xa2,0x69,0x72,0xa2,0x6f,0x73,5,0x74,0x22, +0x74,0x38,0x77,0x4c,0x79,0x16,0x72,0x69,0x61,0x63,0x77,0x61,0x77,0x6f,0x18,0x72, +0x61,0x69,0x67,0x68,0x74,0x77,0x61,0x77,0xa3,0x55,0x15,0x61,0x73,0x68,0x6b,0x61, +0x66,0x6d,0x61,0x2e,0x65,0x38,0x68,0x11,0x69,0x6e,0x6b,0x10,0x64,0x62,0x11,0x68, +0x65,0x65,1,0x65,0x2e,0x6d,0x13,0x6b,0x61,0x74,0x68,0x69,0x10,0x6e,0x67,2, +0x6f,0x2c,0x75,0x50,0x79,0x10,0x61,0x91,1,0x6a,0x28,0x6f,0x10,0x6e,0x55,0x1a, +0x6f,0x69,0x6e,0x69,0x6e,0x67,0x67,0x72,0x6f,0x75,0x70,0x21,0x10,0x6e,0x57,0x10, +0x65,0x59,0x10,0x61,1,0x66,0x5b,0x70,0x10,0x68,0x5d,1,0x65,0x38,0x6f,0x18, +0x68,0x69,0x6e,0x67,0x79,0x61,0x79,0x65,0x68,0x93,1,0x68,0x5f,0x76,0x16,0x65, +0x72,0x73,0x65,0x64,0x70,0x65,0x61,0x67,0xc1,0xd4,0x67,0xa4,0x52,0x68,0xa4,0x59, +0x6b,0xa4,0x99,0x6c,0xa4,0xbf,0x6d,2,0x61,0x2e,0x65,0xa4,0x3e,0x69,0x10,0x6d, +0x53,1,0x6c,0xa2,0xe7,0x6e,0x16,0x69,0x63,0x68,0x61,0x65,0x61,0x6e,0,0x12, +0x6e,0x76,0x73,0x51,0x73,0x3e,0x74,0x5c,0x77,0xa0,0x79,0xa2,0x42,0x7a,0x13,0x61, +0x79,0x69,0x6e,0xa3,0x54,0x10,0x61,1,0x64,0x2e,0x6d,0x12,0x65,0x6b,0x68,0xa3, +0x4c,0x11,0x68,0x65,0xa3,0x4b,3,0x61,0x38,0x65,0x3c,0x68,0x4a,0x77,0x13,0x65, +0x6e,0x74,0x79,0xa3,0x51,0x10,0x77,0xa3,0x4d,1,0x6e,0xa3,0x4e,0x74,0x10,0x68, +0xa3,0x4f,0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x50,0x11,0x61,0x77,0xa3,0x52,0x12, +0x6f,0x64,0x68,0xa3,0x53,0x6e,0x3a,0x6f,0x40,0x70,0x46,0x71,0x4a,0x72,0x12,0x65, +0x73,0x68,0xa3,0x4a,0x11,0x75,0x6e,0xa3,0x46,0x11,0x6e,0x65,0xa3,0x47,0x10,0x65, +0xa3,0x48,0x12,0x6f,0x70,0x68,0xa3,0x49,0x67,0x33,0x67,0x38,0x68,0x40,0x6b,0x5e, +0x6c,0x66,0x6d,0x11,0x65,0x6d,0xa3,0x45,0x13,0x69,0x6d,0x65,0x6c,0xa1,1,0x65, +0x32,0x75,0x14,0x6e,0x64,0x72,0x65,0x64,0xa3,0x42,0x11,0x74,0x68,0xa3,0x41,0x12, +0x61,0x70,0x68,0xa3,0x43,0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x44,0x61,0x34,0x62, +0x4a,0x64,0x50,0x66,0x12,0x69,0x76,0x65,0x9f,1,0x6c,0x2a,0x79,0x11,0x69,0x6e, +0x97,0x12,0x65,0x70,0x68,0x95,0x12,0x65,0x74,0x68,0x99,1,0x61,0x30,0x68,0x14, +0x61,0x6d,0x65,0x64,0x68,0x9d,0x13,0x6c,0x65,0x74,0x68,0x9b,0x15,0x61,0x79,0x61, +0x6c,0x61,0x6d,6,0x6e,0x2c,0x6e,0x34,0x72,0x5e,0x73,0x62,0x74,0x11,0x74,0x61, +0xa3,0x63,2,0x67,0x2e,0x6e,0x32,0x79,0x10,0x61,0xa3,0x60,0x10,0x61,0xa3,0x5d, +1,0x61,0xa3,0x5e,0x6e,0x10,0x61,0xa3,0x5f,0x10,0x61,0xa3,0x61,0x11,0x73,0x61, +0xa3,0x62,0x62,0x3c,0x6a,0x42,0x6c,0x10,0x6c,1,0x61,0xa3,0x5b,0x6c,0x10,0x61, +0xa3,0x5c,0x11,0x68,0x61,0xa3,0x59,0x10,0x61,0xa3,0x5a,0x11,0x65,0x6d,0x51,0x10, +0x61,1,0x66,0x37,0x6d,0x11,0x61,0x6c,0x39,1,0x61,0x40,0x65,0x3e,1,0x68, +0x28,0x74,0x10,0x68,0x45,0x40,0x13,0x67,0x6f,0x61,0x6c,0x43,2,0x68,0x3b,0x6d, +0x5c,0x6e,0x1a,0x69,0x66,0x69,0x72,0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,1,0x6b, +0x2a,0x70,0x10,0x61,0xa3,0x65,0x15,0x69,0x6e,0x6e,0x61,0x79,0x61,0xa3,0x64,0x1a, +0x7a,0x61,0x6f,0x6e,0x68,0x65,0x68,0x67,0x6f,0x61,0x6c,0x3d,2,0x61,0x3a,0x68, +0x5e,0x6e,0x17,0x6f,0x74,0x74,0x65,0x64,0x68,0x65,0x68,0x4b,2,0x66,0x47,0x70, +0x38,0x73,0x17,0x68,0x6d,0x69,0x72,0x69,0x79,0x65,0x68,0xa3,0x68,0x10,0x68,0x49, +0x12,0x61,0x70,0x68,0x89,0x11,0x61,0x6d,0x4c,0x12,0x61,0x64,0x68,0x4f,0x61,0x6e, +0x62,0xa2,0x54,0x64,0xa2,0x70,0x65,0x31,0x66,2,0x61,0x3e,0x65,0x4a,0x69,0x19, +0x6e,0x61,0x6c,0x73,0x65,0x6d,0x6b,0x61,0x74,0x68,0x35,0x15,0x72,0x73,0x69,0x79, +0x65,0x68,0x8f,0x86,0x10,0x68,0x33,2,0x66,0x3c,0x69,0x70,0x6c,1,0x61,0x28, +0x65,0x10,0x66,0x27,0x11,0x70,0x68,0x25,0x14,0x72,0x69,0x63,0x61,0x6e,2,0x66, +0x30,0x6e,0x36,0x71,0x11,0x61,0x66,0xa3,0x58,0x11,0x65,0x68,0xa3,0x56,0x12,0x6f, +0x6f,0x6e,0xa3,0x57,0x10,0x6e,0x23,1,0x65,0x4a,0x75,0x10,0x72,0x1f,0x75,0x73, +0x68,0x61,0x73,0x6b,0x69,0x79,0x65,0x68,0x62,0x61,0x72,0x72,0x65,0x65,0x8d,1, +0x68,0x29,0x74,0x10,0x68,0x2b,0x11,0x61,0x6c,0x2c,0x16,0x61,0x74,0x68,0x72,0x69, +0x73,0x68,0x2f,7,0x6e,0x2e,0x6e,0x2c,0x72,0x3e,0x74,0x56,0x75,0x21,0x18,0x6f, +0x6e,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x21,0x28,0x1a,0x69,0x67,0x68,0x74,0x6a, +0x6f,0x69,0x6e,0x69,0x6e,0x67,0x29,0x2a,0x19,0x72,0x61,0x6e,0x73,0x70,0x61,0x72, +0x65,0x6e,0x74,0x2b,0x63,0x23,0x64,0x40,0x6a,0x56,0x6c,0x26,0x19,0x65,0x66,0x74, +0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x27,0x24,0x19,0x75,0x61,0x6c,0x6a,0x6f,0x69, +0x6e,0x69,0x6e,0x67,0x25,0x19,0x6f,0x69,0x6e,0x63,0x61,0x75,0x73,0x69,0x6e,0x67, +0x23,0,0x14,0x6e,0xc0,0xe5,0x73,0x5e,0x77,0x23,0x77,0x40,0x78,0x58,0x7a,0x10, +0x77,0x58,1,0x6a,0x75,0x73,0x13,0x70,0x61,0x63,0x65,0x59,1,0x6a,0x5d,0x6f, +0x17,0x72,0x64,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x5d,0x10,0x78,0x21,0x73,0x4a,0x75, +0x7a,0x76,1,0x66,0x7d,0x69,0x7e,0x13,0x72,0x61,0x6d,0x61,0x7e,0x14,0x66,0x69, +0x6e,0x61,0x6c,0x7d,4,0x61,0x51,0x67,0x53,0x70,0x28,0x75,0x30,0x79,0x57,0x54, +0x12,0x61,0x63,0x65,0x55,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x53,0x15,0x6e, +0x6b,0x6e,0x6f,0x77,0x6e,0x21,0x6e,0x60,0x6f,0xa2,0x41,0x70,0xa2,0x50,0x71,0xa2, +0x6e,0x72,1,0x65,0x24,0x69,0x6f,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e, +0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x6f,4,0x65,0x3e,0x6c,0x5b,0x6f,0x46,0x73, +0x45,0x75,0x46,0x14,0x6d,0x65,0x72,0x69,0x63,0x47,0x15,0x78,0x74,0x6c,0x69,0x6e, +0x65,0x5b,0x17,0x6e,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x45,0x10,0x70,0x48,0x1c, +0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x49,1,0x6f, +0x3e,0x72,0x4c,0x1a,0x65,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x4d, +0x4a,0x1b,0x73,0x74,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x4b,0x10, +0x75,0x4e,0x16,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x68,0x7b,0x68,0x50,0x69, +0x86,0x6a,0xa2,0x61,0x6c,0xa2,0x65,0x6d,0x1c,0x61,0x6e,0x64,0x61,0x74,0x6f,0x72, +0x79,0x62,0x72,0x65,0x61,0x6b,0x2d,4,0x32,0x5f,0x33,0x61,0x65,0x34,0x6c,0x6d, +0x79,0x3a,0x13,0x70,0x68,0x65,0x6e,0x3b,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74, +0x74,0x65,0x72,0x6d,2,0x64,0x28,0x6e,0x3c,0x73,0x41,0x3c,0x18,0x65,0x6f,0x67, +0x72,0x61,0x70,0x68,0x69,0x63,0x3d,0x3e,1,0x66,0x3e,0x73,0x11,0x65,0x70,1, +0x61,0x22,0x65,0x14,0x72,0x61,0x62,0x6c,0x65,0x3f,0x18,0x69,0x78,0x6e,0x75,0x6d, +0x65,0x72,0x69,0x63,0x41,2,0x6c,0x63,0x74,0x65,0x76,0x67,1,0x66,0x43,0x69, +0x15,0x6e,0x65,0x66,0x65,0x65,0x64,0x43,0x61,0x42,0x62,0xa2,0x49,0x63,0xa2,0x76, +0x65,0xa2,0xfc,0x67,0x10,0x6c,0x38,0x11,0x75,0x65,0x39,5,0x6d,0xf,0x6d,0x28, +0x70,0x79,0x73,0x7b,0x16,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x69,0x23,0x6b, +0x38,0x6c,0x24,0x17,0x70,0x68,0x61,0x62,0x65,0x74,0x69,0x63,0x25,0x76,0x13,0x73, +0x61,0x72,0x61,0x76,1,0x70,0x2e,0x73,0x13,0x74,0x61,0x72,0x74,0x7b,0x15,0x72, +0x65,0x62,0x61,0x73,0x65,0x79,4,0x32,0x27,0x61,0x29,0x62,0x2b,0x6b,0x2d,0x72, +0x12,0x65,0x61,0x6b,2,0x61,0x36,0x62,0x3e,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c, +0x73,0x57,0x13,0x66,0x74,0x65,0x72,0x29,1,0x65,0x2a,0x6f,0x11,0x74,0x68,0x27, +0x13,0x66,0x6f,0x72,0x65,0x2b,7,0x6d,0x51,0x6d,0x33,0x6f,0x28,0x70,0x69,0x72, +0x35,1,0x6d,0x76,0x6e,1,0x64,0x3c,0x74,0x1a,0x69,0x6e,0x67,0x65,0x6e,0x74, +0x62,0x72,0x65,0x61,0x6b,0x2f,0x15,0x69,0x74,0x69,0x6f,0x6e,0x61,0x1f,0x6c,0x6a, +0x61,0x70,0x61,0x6e,0x65,0x73,0x65,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x6b,1, +0x62,0x3a,0x70,0x19,0x6c,0x65,0x78,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x51,0x18, +0x69,0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x33,0x61,0x6a,0x62,0x2f,0x6a,0x6b, +0x6c,0x30,0x13,0x6f,0x73,0x65,0x70,1,0x61,0x38,0x75,0x18,0x6e,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0x31,0x18,0x72,0x65,0x6e,0x74,0x68,0x65,0x73,0x69,0x73, +0x69,0x1b,0x72,0x72,0x69,0x61,0x67,0x65,0x72,0x65,0x74,0x75,0x72,0x6e,0x35,2, +0x62,0x3e,0x6d,0x46,0x78,0x36,0x18,0x63,0x6c,0x61,0x6d,0x61,0x74,0x69,0x6f,0x6e, +0x37,0x70,0x12,0x61,0x73,0x65,0x71,0x72,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72, +0x73,1,0x64,0x42,0x6e,1,0x6f,0x32,0x75,0x26,0x14,0x6d,0x65,0x72,0x69,0x63, +0x27,0x11,0x6e,0x65,0x21,1,0x65,0x2e,0x69,0x24,0x12,0x67,0x69,0x74,0x25,0x22, +0x14,0x63,0x69,0x6d,0x61,0x6c,0x23,0,0x18,0x6e,0xc4,0xad,0x74,0xc1,0xb7,0x77, +0x96,0x77,0xa2,0x4c,0x78,0xa2,0x70,0x79,0xa2,0x7a,0x7a,6,0x73,0x1e,0x73,0x34, +0x78,0x42,0x79,0x48,0x7a,0x11,0x7a,0x7a,0xa3,0x67,0x10,0x79,1,0x65,0xa3,0xae, +0x6d,0xa3,0x81,0x11,0x78,0x78,0xa3,0x66,0x11,0x79,0x79,0x21,0x61,0x30,0x69,0x58, +0x6d,0x11,0x74,0x68,0xa3,0x80,0x10,0x6e,1,0x61,0x26,0x62,0xa3,0xb1,0x1a,0x62, +0x61,0x7a,0x61,0x72,0x73,0x71,0x75,0x61,0x72,0x65,0xa3,0xb1,0x11,0x6e,0x68,0x23, +2,0x61,0x30,0x63,0x5a,0x6f,0x11,0x6c,0x65,0xa3,0x9b,1,0x6e,0x3c,0x72,0x10, +0x61,0xa2,0x92,0x15,0x6e,0x67,0x63,0x69,0x74,0x69,0xa3,0x92,0x12,0x63,0x68,0x6f, +0xa3,0xbc,0x11,0x68,0x6f,0xa3,0xbc,1,0x70,0x2c,0x73,0x11,0x75,0x78,0xa3,0x65, +0x11,0x65,0x6f,0x9b,1,0x65,0x2c,0x69,0x72,0x11,0x69,0x69,0x73,0x11,0x7a,0x69, +0xa2,0xc0,0x11,0x64,0x69,0xa3,0xc0,0x74,0x66,0x75,0xa4,4,0x76,1,0x61,0x48, +0x69,1,0x73,0x38,0x74,0x10,0x68,0xa2,0xc5,0x13,0x6b,0x75,0x71,0x69,0xa3,0xc5, +0x10,0x70,0xa3,0x64,0x10,0x69,0xa2,0x63,0x10,0x69,0xa3,0x63,8,0x68,0x64,0x68, +0x5a,0x69,0x6e,0x6e,0xa2,0x45,0x6f,0xa2,0x47,0x75,1,0x6c,0x2a,0x74,0x10,0x67, +0xa3,0xcf,0x18,0x75,0x74,0x69,0x67,0x61,0x6c,0x61,0x72,0x69,0xa3,0xcf,0x10,0x61, +1,0x61,0x24,0x69,0x6d,0x6a,0x11,0x6e,0x61,0x6b,2,0x62,0x3a,0x66,0x4a,0x72, +0x10,0x68,0xa2,0x9e,0x12,0x75,0x74,0x61,0xa3,0x9e,1,0x65,0x24,0x74,0x6f,0x12, +0x74,0x61,0x6e,0x6f,0x14,0x69,0x6e,0x61,0x67,0x68,0x99,0x11,0x73,0x61,0xa3,0xc3, +1,0x64,0x2a,0x74,0x10,0x6f,0xa3,0xc4,1,0x68,0x26,0x72,0xa3,0xce,0x11,0x72, +0x69,0xa3,0xce,0x61,0x36,0x65,0xa2,0x65,0x66,0xa2,0x71,0x67,0x11,0x6c,0x67,0x75, +6,0x6c,0x28,0x6c,0x32,0x6d,0x38,0x6e,0x44,0x76,0x10,0x74,0xa3,0x7f,1,0x65, +0x89,0x75,0x97,1,0x69,0x24,0x6c,0x67,0x10,0x6c,0x67,0x10,0x67,0xa2,0x9a,1, +0x73,0x2a,0x75,0x10,0x74,0xa3,0x9a,0x10,0x61,0xa3,0xc3,0x67,0x36,0x69,0x52,0x6b, +0x10,0x72,0xa2,0x99,0x10,0x69,0xa3,0x99,1,0x61,0x30,0x62,0x7a,0x13,0x61,0x6e, +0x77,0x61,0x7b,0x12,0x6c,0x6f,0x67,0x75,2,0x6c,0x32,0x74,0x34,0x76,0x12,0x69, +0x65,0x74,0xa3,0x7f,0x10,0x65,0x89,0x12,0x68,0x61,0x6d,0xa3,0x6a,1,0x6c,0x2a, +0x6e,0x10,0x67,0xa3,0x62,0x10,0x75,0x68,0x11,0x67,0x75,0x69,0x11,0x6e,0x67,0x99, +1,0x67,0x32,0x6e,0x14,0x6b,0x6e,0x6f,0x77,0x6e,0xa3,0x67,0x11,0x61,0x72,0x8a, +0x13,0x69,0x74,0x69,0x63,0x8b,0x71,0xc1,0x1e,0x71,0xa2,0xe9,0x72,0xa2,0xee,0x73, +6,0x69,0x95,0x69,0x72,0x6f,0xa2,0x4c,0x75,0xa2,0x75,0x79,1,0x6c,0x46,0x72, +4,0x63,0x65,0x65,0xa3,0x5f,0x69,0x2c,0x6a,0xa3,0x60,0x6e,0xa3,0x61,0x11,0x61, +0x63,0x65,0x10,0x6f,0x94,0x16,0x74,0x69,0x6e,0x61,0x67,0x72,0x69,0x95,2,0x64, +0x3c,0x67,0x4c,0x6e,1,0x64,0xa3,0x91,0x68,0x62,0x12,0x61,0x6c,0x61,0x63,0x10, +0x64,0xa2,0xa6,0x12,0x68,0x61,0x6d,0xa3,0xa6,0x17,0x6e,0x77,0x72,0x69,0x74,0x69, +0x6e,0x67,0xa3,0x70,2,0x67,0x3a,0x72,0x52,0x79,0x10,0x6f,0xa2,0xb0,0x12,0x6d, +0x62,0x6f,0xa3,0xb0,1,0x64,0x26,0x6f,0xa3,0xb8,0xa2,0xb7,0x12,0x69,0x61,0x6e, +0xa3,0xb7,0x10,0x61,0xa2,0x98,0x16,0x73,0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0x98, +0x10,0x6e,1,0x64,0x32,0x75,0xa2,0xcd,0x12,0x77,0x61,0x72,0xa3,0xcd,0xa2,0x71, +0x14,0x61,0x6e,0x65,0x73,0x65,0xa3,0x71,0x61,0x5c,0x67,0xa2,0x43,0x68,1,0x61, +0x2a,0x72,0x10,0x64,0xa3,0x97,2,0x72,0x28,0x76,0x30,0x77,0x87,0x12,0x61,0x64, +0x61,0xa3,0x97,0x12,0x69,0x61,0x6e,0x87,2,0x6d,0x40,0x72,0x58,0x75,0x10,0x72, +0xa2,0x6f,0x15,0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0x6f,1,0x61,0x26,0x72,0xa3, +0x7e,0x14,0x72,0x69,0x74,0x61,0x6e,0xa3,0x7e,1,0x61,0xa3,0x5e,0x62,0xa3,0x85, +0x11,0x6e,0x77,0xa3,0x70,0x11,0x61,0x61,1,0x63,0x2f,0x69,0x23,3,0x65,0x3e, +0x6a,0x48,0x6f,0x4e,0x75,0x10,0x6e,1,0x69,0x24,0x72,0x61,0x10,0x63,0x61,0x13, +0x6a,0x61,0x6e,0x67,0xa3,0x6e,0x11,0x6e,0x67,0xa3,0x6e,1,0x68,0x2a,0x72,0x10, +0x6f,0xa3,0x5d,0x10,0x67,0xa3,0xb6,0x6e,0xa2,0x83,0x6f,0xa4,1,0x70,5,0x6c, +0x1e,0x6c,0x44,0x72,0x4a,0x73,0x1b,0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68,0x6c, +0x61,0x76,0x69,0xa3,0x7b,0x11,0x72,0x64,0xa3,0x5c,0x11,0x74,0x69,0xa3,0x7d,0x61, +0x7c,0x65,0xa2,0x54,0x68,3,0x61,0x3e,0x6c,0x4e,0x6e,0x5e,0x6f,0x16,0x65,0x6e, +0x69,0x63,0x69,0x61,0x6e,0xa3,0x5b,0x10,0x67,0xa2,0x5a,0x12,0x73,0x70,0x61,0xa3, +0x5a,2,0x69,0xa3,0x7a,0x70,0xa3,0x7b,0x76,0xa3,0x7c,0x10,0x78,0xa3,0x5b,2, +0x68,0x3e,0x6c,0x50,0x75,0x10,0x63,0xa2,0xa5,0x14,0x69,0x6e,0x68,0x61,0x75,0xa3, +0xa5,0x17,0x61,0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0x4b,0x10,0x6d,0xa2,0x90, +0x14,0x79,0x72,0x65,0x6e,0x65,0xa3,0x90,0x11,0x72,0x6d,0xa3,0x59,6,0x6b,0x36, +0x6b,0x56,0x73,0x6e,0x75,0x74,0x79,0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70, +0x75,0x61,0x63,0x68,0x75,0x65,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xba,1,0x67,0x2e, +0x6f,0xa2,0x57,0x10,0x6f,0xa3,0x57,0x10,0x62,0xa3,0x84,0x11,0x68,0x75,0xa3,0x96, +0x12,0x73,0x68,0x75,0xa3,0x96,0x61,0x42,0x62,0x9e,0x65,0x10,0x77,1,0x61,0xa3, +0xaa,0x74,0x14,0x61,0x69,0x6c,0x75,0x65,0x97,3,0x62,0x32,0x67,0x40,0x6e,0x56, +0x72,0x10,0x62,0xa3,0x8e,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0x8f,0x10,0x6d, +0xa2,0xc7,0x15,0x75,0x6e,0x64,0x61,0x72,0x69,0xa3,0xc7,0x10,0x64,0xa2,0xbb,0x16, +0x69,0x6e,0x61,0x67,0x61,0x72,0x69,0xa3,0xbb,0x11,0x61,0x74,0xa3,0x8f,5,0x72, +0x32,0x72,0x30,0x73,0x4e,0x75,0x11,0x67,0x72,0xa3,0xc2,2,0x69,0x2c,0x6b,0x30, +0x79,0x10,0x61,0x5f,0x11,0x79,0x61,0x5f,0x10,0x68,0xa3,0x58,2,0x61,0x36,0x67, +0x3c,0x6d,0x10,0x61,0x84,0x12,0x6e,0x79,0x61,0x85,0x11,0x67,0x65,0xa3,0xab,0x10, +0x65,0xa3,0xab,0x67,0x30,0x6c,0x42,0x6e,0x11,0x61,0x6f,0xa3,0xcc,1,0x61,0x2a, +0x68,0x11,0x61,0x6d,0x5b,0x10,0x6d,0x5b,2,0x63,0x32,0x64,0x46,0x6f,0x12,0x6e, +0x61,0x6c,0xa3,0xcc,1,0x68,0x26,0x6b,0xa3,0x6d,0x12,0x69,0x6b,0x69,0xa3,0x6d, +6,0x70,0x41,0x70,0x3a,0x73,0x58,0x74,0x86,0x75,0x14,0x79,0x67,0x68,0x75,0x72, +0xa3,0xc2,0x11,0x65,0x72,1,0x6d,0x2c,0x73,0x12,0x69,0x61,0x6e,0x9b,0x11,0x69, +0x63,0xa3,0x59,0x10,0x6f,1,0x67,0x3a,0x75,0x18,0x74,0x68,0x61,0x72,0x61,0x62, +0x69,0x61,0x6e,0xa3,0x85,0x13,0x64,0x69,0x61,0x6e,0xa3,0xb8,0x14,0x75,0x72,0x6b, +0x69,0x63,0xa3,0x58,0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f,0x72,0x74,0x68,0x61,0x72, +0x61,0x62,0x69,0x61,0x6e,0xa3,0x8e,0x17,0x75,0x6e,0x67,0x61,0x72,0x69,0x61,0x6e, +0xa3,0x4c,0x14,0x74,0x61,0x6c,0x69,0x63,0x5d,0x68,0xc3,0x28,0x6b,0xc2,0x3f,0x6b, +0xa4,0x17,0x6c,0xa4,0xcd,0x6d,8,0x6f,0x46,0x6f,0x48,0x72,0x74,0x74,0x80,0x75, 0x86,0x79,1,0x61,0x28,0x6d,0x10,0x72,0x59,0x13,0x6e,0x6d,0x61,0x72,0x59,2, 0x64,0x2e,0x6e,0x32,0x6f,0x10,0x6e,0xa3,0x72,0x10,0x69,0xa3,0xa3,0x10,0x67,0x56, 0x14,0x6f,0x6c,0x69,0x61,0x6e,0x57,0x10,0x6f,0xa2,0x95,0x10,0x6f,0xa3,0x95,0x11, @@ -864,238 +882,244 @@ const uint8_t PropNameData::bytesTries[15733]={ 0x56,0x15,0x75,0x72,0x73,0x69,0x76,0x65,0xa3,0x8d,1,0x65,0x26,0x66,0xa3,0xb5, 0x16,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa3,0xb5,0x17,0x74,0x65,0x69,0x6d,0x61, 0x79,0x65,0x6b,0xa3,0x73,0x10,0x64,0xa2,0x8c,0x17,0x65,0x6b,0x69,0x6b,0x61,0x6b, -0x75,0x69,0xa3,0x8c,0x11,0x61,0x6f,0xa3,0x5c,6,0x6e,0x1a,0x6e,0x34,0x6f,0x38, -0x70,0x3e,0x74,0x11,0x68,0x69,0xa3,0x78,0x11,0x64,0x61,0x4b,0x11,0x72,0x65,0xa3, -0x77,0x11,0x65,0x6c,0xa3,0x8a,0x61,0x32,0x68,0xa2,0x44,0x69,0x11,0x74,0x73,0xa3, -0xbf,5,0x74,0x23,0x74,0x34,0x77,0x56,0x79,0x13,0x61,0x68,0x6c,0x69,0xa3,0x4f, -0x14,0x61,0x6b,0x61,0x6e,0x61,0x4c,0x19,0x6f,0x72,0x68,0x69,0x72,0x61,0x67,0x61, -0x6e,0x61,0x8d,0x10,0x69,0xa3,0xc6,0x69,0x38,0x6c,0x40,0x6e,1,0x61,0x4d,0x6e, -0x12,0x61,0x64,0x61,0x4b,0x12,0x74,0x68,0x69,0xa3,0x78,0x10,0x69,0xa3,0x4f,4, -0x61,0x40,0x69,0x52,0x6d,0x70,0x6f,0x7c,0x75,0x15,0x64,0x61,0x77,0x61,0x64,0x69, -0xa3,0x91,0x10,0x72,0x92,0x15,0x6f,0x73,0x68,0x74,0x68,0x69,0x93,0x1d,0x74,0x61, -0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70,0x74,0xa3,0xbf,1,0x65, -0x24,0x72,0x4f,0x10,0x72,0x4f,0x10,0x6a,0xa2,0x9d,0x11,0x6b,0x69,0xa3,0x9d,4, -0x61,0x5c,0x65,0x90,0x69,0xa0,0x6f,0xa2,0x5d,0x79,1,0x63,0x34,0x64,0x10,0x69, -0xa2,0x6c,0x11,0x61,0x6e,0xa3,0x6c,0x10,0x69,0xa2,0x6b,0x11,0x61,0x6e,0xa3,0x6b, -2,0x6e,0x42,0x6f,0x46,0x74,3,0x66,0xa3,0x50,0x67,0xa3,0x51,0x69,0x24,0x6e, -0x53,0x10,0x6e,0x53,0x10,0x61,0xa3,0x6a,0x50,0x10,0x6f,0x51,0x11,0x70,0x63,0xa2, -0x52,0x11,0x68,0x61,0xa3,0x52,2,0x6d,0x2e,0x6e,0x36,0x73,0x10,0x75,0xa3,0x83, -0x10,0x62,0x80,0x10,0x75,0x81,2,0x61,0xa3,0x53,0x62,0x83,0x65,0x11,0x61,0x72, -1,0x61,0xa3,0x53,0x62,0x83,0x11,0x6d,0x61,0xa3,0x8b,0x68,0x6e,0x69,0xa2,0x95, -0x6a,2,0x61,0x30,0x70,0x52,0x75,0x11,0x72,0x63,0xa3,0x94,1,0x6d,0x38,0x76, -0x10,0x61,0xa2,0x4e,0x13,0x6e,0x65,0x73,0x65,0xa3,0x4e,0x10,0x6f,0xa3,0xad,0x11, -0x61,0x6e,0xa3,0x69,6,0x6c,0x1e,0x6c,0x34,0x6d,0x3a,0x72,0x48,0x75,0x11,0x6e, -0x67,0xa3,0x4c,0x11,0x75,0x77,0xa3,0x9c,0x10,0x6e,1,0x67,0xa3,0x4b,0x70,0xa3, -0xba,0x11,0x6b,0x74,0x8d,0x61,0x3c,0x65,0xa2,0x43,0x69,0x11,0x72,0x61,0x48,0x13, -0x67,0x61,0x6e,0x61,0x49,1,0x6e,0x34,0x74,0x10,0x72,0xa2,0xa2,0x11,0x61,0x6e, -0xa3,0xa2,0x42,6,0x6f,0xe,0x6f,0x77,0x73,0xa3,0x49,0x74,0xa3,0x4a,0x75,0x12, -0x6e,0x6f,0x6f,0x77,0x62,0xa3,0xac,0x67,0x3e,0x69,0x42,0x19,0x66,0x69,0x72,0x6f, -0x68,0x69,0x6e,0x67,0x79,0x61,0xa3,0xb6,0x44,0x11,0x75,0x6c,0x45,0x11,0x62,0x72, -0x46,0x11,0x65,0x77,0x47,2,0x6d,0x2e,0x6e,0x4a,0x74,0x11,0x61,0x6c,0x5d,0x1c, -0x70,0x65,0x72,0x69,0x61,0x6c,0x61,0x72,0x61,0x6d,0x61,0x69,0x63,0xa3,0x74,2, -0x64,0x66,0x68,0x6a,0x73,0x1b,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c, -0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68,0x69,0x61,0x6e,0xa3,0x7d,0x13,0x6c, -0x61,0x76,0x69,0xa3,0x7a,0x10,0x73,0xa3,0x4d,0x15,0x65,0x72,0x69,0x74,0x65,0x64, -0x23,0x64,0xc1,0xd,0x64,0xa2,0x7a,0x65,0xa2,0xc1,0x67,4,0x65,0x82,0x6c,0x9a, -0x6f,0xa2,0x46,0x72,0xa2,0x55,0x75,2,0x6a,0x3c,0x6e,0x4e,0x72,1,0x6d,0x24, -0x75,0x41,0x13,0x75,0x6b,0x68,0x69,0x41,1,0x61,0x24,0x72,0x3f,0x13,0x72,0x61, -0x74,0x69,0x3f,0x18,0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa3,0xb3,0x10, -0x6f,1,0x6b,0xa3,0x48,0x72,0x38,0x13,0x67,0x69,0x61,0x6e,0x39,0x11,0x61,0x67, -0x90,0x15,0x6f,0x6c,0x69,0x74,0x69,0x63,0x91,1,0x6e,0x30,0x74,0x10,0x68,0x3a, -0x11,0x69,0x63,0x3b,1,0x67,0xa3,0xb3,0x6d,0xa3,0xaf,1,0x61,0x32,0x65,1, -0x65,0x24,0x6b,0x3d,0x10,0x6b,0x3d,0x10,0x6e,0xa2,0x89,0x12,0x74,0x68,0x61,0xa3, -0x89,4,0x65,0x46,0x69,0x6c,0x6f,0x8c,0x73,0x9a,0x75,0x11,0x70,0x6c,0xa2,0x87, -0x13,0x6f,0x79,0x61,0x6e,0xa3,0x87,1,0x73,0x38,0x76,0x10,0x61,0x34,0x15,0x6e, -0x61,0x67,0x61,0x72,0x69,0x35,0x13,0x65,0x72,0x65,0x74,0x33,1,0x61,0x36,0x76, -0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75,0xa3,0xbe,0x10,0x6b,0xa3,0xbe,0x11,0x67, -0x72,0xa2,0xb2,0x10,0x61,0xa3,0xb2,0x11,0x72,0x74,0x33,2,0x67,0x3a,0x6c,0x72, -0x74,0x11,0x68,0x69,0x36,0x13,0x6f,0x70,0x69,0x63,0x37,0x10,0x79,2,0x64,0xa3, -0x45,0x68,0xa3,0x46,0x70,0xa2,0x47,0x1e,0x74,0x69,0x61,0x6e,0x68,0x69,0x65,0x72, -0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0x47,1,0x62,0x36,0x79,0x10,0x6d,0xa2, -0xb9,0x12,0x61,0x69,0x63,0xa3,0xb9,0x10,0x61,0xa2,0x88,0x12,0x73,0x61,0x6e,0xa3, -0x88,0x61,0xa2,0xc9,0x62,0xa4,0x32,0x63,6,0x6f,0x52,0x6f,0x76,0x70,0x92,0x75, -0xa2,0x41,0x79,1,0x70,0x3e,0x72,2,0x69,0x2a,0x6c,0x31,0x73,0xa3,0x44,0x13, -0x6c,0x6c,0x69,0x63,0x31,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e,0x6f, -0x61,0x6e,0xa3,0xc1,0x11,0x6f,0x74,0x7f,1,0x6d,0x30,0x70,0x10,0x74,0x2e,0x11, -0x69,0x63,0x2f,0x12,0x6d,0x6f,0x6e,0x21,1,0x6d,0x28,0x72,0x10,0x74,0x7f,0x10, -0x6e,0xa3,0xc1,0x16,0x6e,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa3,0x65,0x61,0x32,0x68, -0xa2,0x41,0x69,0x11,0x72,0x74,0xa3,0x43,3,0x6b,0x4c,0x6e,0x50,0x72,0x76,0x75, -0x1d,0x63,0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e,0xa3, -0x9f,0x10,0x6d,0xa3,0x76,1,0x61,0x24,0x73,0x71,0x1d,0x64,0x69,0x61,0x6e,0x61, -0x62,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x71,0x10,0x69,0xa2,0x68,0x11,0x61, -0x6e,0xa3,0x68,3,0x61,0x32,0x65,0x44,0x6f,0x52,0x72,0x10,0x73,0xa3,0xbd,1, -0x6b,0x26,0x6d,0xa3,0x42,0x11,0x6d,0x61,0xa3,0x76,0x10,0x72,0x2c,0x13,0x6f,0x6b, -0x65,0x65,0x2d,0x16,0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa3,0xbd,6,0x68,0x4e, -0x68,0x48,0x6e,0x4e,0x72,0x76,0x76,1,0x65,0x2a,0x73,0x10,0x74,0xa3,0x75,0x13, -0x73,0x74,0x61,0x6e,0xa3,0x75,0x11,0x6f,0x6d,0xa3,0xa1,0x11,0x61,0x74,0x1f,0x6f, -0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3, -0x9c,1,0x61,0x3e,0x6d,2,0x65,0x2a,0x69,0xa3,0x74,0x6e,0x27,0x13,0x6e,0x69, -0x61,0x6e,0x27,1,0x62,0x26,0x6e,0xa3,0xc8,0x24,0x11,0x69,0x63,0x25,0x64,0x30, -0x66,0x44,0x67,0x11,0x68,0x62,0xa3,0x9f,0x10,0x6c,1,0x61,0x26,0x6d,0xa3,0xa7, -0x10,0x6d,0xa3,0xa7,0x11,0x61,0x6b,0xa3,0x93,6,0x6c,0x3c,0x6c,0x52,0x6f,0x56, -0x72,0x66,0x75,1,0x67,0x30,0x68,1,0x64,0x79,0x69,0x10,0x64,0x79,0x10,0x69, -0x8e,0x13,0x6e,0x65,0x73,0x65,0x8f,0x11,0x69,0x73,0xa1,0x11,0x70,0x6f,0x2a,0x13, -0x6d,0x6f,0x66,0x6f,0x2b,0x10,0x61,1,0x68,0x2e,0x69,0x7c,0x12,0x6c,0x6c,0x65, -0x7d,0xa2,0x41,0x11,0x6d,0x69,0xa3,0x41,0x61,0x48,0x65,0x9c,0x68,1,0x61,0x2a, -0x6b,0x10,0x73,0xa3,0xa8,0x15,0x69,0x6b,0x73,0x75,0x6b,0x69,0xa3,0xa8,3,0x6c, -0x3a,0x6d,0x48,0x73,0x54,0x74,1,0x61,0x24,0x6b,0x9f,0x10,0x6b,0x9f,0x10,0x69, -0x9c,0x13,0x6e,0x65,0x73,0x65,0x9d,0x10,0x75,0xa2,0x82,0x10,0x6d,0xa3,0x82,0x10, -0x73,0xa2,0x86,0x13,0x61,0x76,0x61,0x68,0xa3,0x86,0x11,0x6e,0x67,0x28,0x12,0x61, -0x6c,0x69,0x29,3,0x6c,0x42,0x6e,0x90,0x74,0xa2,0x46,0x76,0x24,0x17,0x6f,0x77, -0x65,0x6c,0x6a,0x61,0x6d,0x6f,0x25,0x22,1,0x65,0x54,0x76,0x28,1,0x73,0x38, -0x74,0x2a,0x17,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x2b,0x16,0x79,0x6c,0x6c, -0x61,0x62,0x6c,0x65,0x29,0x18,0x61,0x64,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x23, -1,0x61,0x21,0x6f,0x1a,0x74,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x62,0x6c,0x65, -0x21,0x26,0x1a,0x72,0x61,0x69,0x6c,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x27,1, -0x6e,0x2c,0x79,0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,1,0x6e,0x2c,0x79, -0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,2,0x6d,0x30,0x6e,0x3a,0x79,0x22, -0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20,0x10,0x6f,0x21,2, -0x6d,0x30,0x6e,0x3a,0x79,0x22,0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65, -0x25,0x20,0x10,0x6f,0x21,0xb,0x72,0x39,0x76,0xc,0x76,0x33,0x78,0x2a,0x7a,0x11, -0x77,0x6a,0x43,0x10,0x78,0x21,0x72,0x28,0x73,0x50,0x74,0x31,1,0x65,0x24,0x69, -0x39,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f, -0x72,0x39,1,0x6d,0x35,0x70,0x18,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b, -0x35,0x6c,0x1f,0x6c,0x3c,0x6f,0x4a,0x70,1,0x70,0x37,0x72,0x14,0x65,0x70,0x65, -0x6e,0x64,0x37,0x28,1,0x66,0x2b,0x76,0x2c,0x10,0x74,0x2f,0x13,0x74,0x68,0x65, -0x72,0x21,0x63,0x4c,0x65,0x64,0x67,1,0x61,0x3a,0x6c,0x19,0x75,0x65,0x61,0x66, -0x74,0x65,0x72,0x7a,0x77,0x6a,0x41,0x10,0x7a,0x41,2,0x6e,0x23,0x6f,0x24,0x72, -0x25,0x14,0x6e,0x74,0x72,0x6f,0x6c,0x23,2,0x62,0x34,0x6d,0x4e,0x78,0x26,0x13, -0x74,0x65,0x6e,0x64,0x27,0x3a,1,0x61,0x24,0x67,0x3d,0x11,0x73,0x65,0x3a,0x12, -0x67,0x61,0x7a,0x3d,0x3e,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x3f,9,0x6e, -0x4a,0x6e,0x34,0x6f,0x44,0x73,0x60,0x75,0x94,0x78,0x10,0x78,0x21,0x10,0x75,0x2a, -0x14,0x6d,0x65,0x72,0x69,0x63,0x2b,1,0x6c,0x2c,0x74,0x12,0x68,0x65,0x72,0x21, -0x14,0x65,0x74,0x74,0x65,0x72,0x2d,3,0x63,0x36,0x65,0x46,0x70,0x31,0x74,0x32, -0x12,0x65,0x72,0x6d,0x33,0x3c,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3d,0x2e, -0x10,0x70,0x2f,0x10,0x70,0x34,0x12,0x70,0x65,0x72,0x35,0x61,0x46,0x63,0x52,0x65, -0x64,0x66,0x72,0x6c,2,0x65,0x2d,0x66,0x3b,0x6f,0x28,0x12,0x77,0x65,0x72,0x29, -0x10,0x74,0x22,0x12,0x65,0x72,0x6d,0x23,1,0x6c,0x24,0x72,0x37,0x24,0x12,0x6f, -0x73,0x65,0x25,0x10,0x78,0x38,0x13,0x74,0x65,0x6e,0x64,0x39,0x10,0x6f,0x26,0x13, -0x72,0x6d,0x61,0x74,0x27,0,0x10,0x6c,0x88,0x72,0x40,0x72,0x36,0x73,0x5e,0x77, -0x7a,0x78,0x8a,0x7a,0x11,0x77,0x6a,0x4b,1,0x65,0x24,0x69,0x3b,0x1e,0x67,0x69, -0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x3b,1,0x69, -0x24,0x71,0x3f,0x18,0x6e,0x67,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x3f,0x17,0x73, -0x65,0x67,0x73,0x70,0x61,0x63,0x65,0x4d,0x10,0x78,0x21,0x6c,0x36,0x6d,0x3c,0x6e, -0x76,0x6f,0x13,0x74,0x68,0x65,0x72,0x21,1,0x65,0x23,0x66,0x35,3,0x62,0x37, -0x69,0x28,0x6c,0x29,0x6e,0x2b,0x10,0x64,1,0x6c,0x34,0x6e,0x11,0x75,0x6d,0x2a, -0x12,0x6c,0x65,0x74,0x37,0x14,0x65,0x74,0x74,0x65,0x72,0x29,2,0x65,0x36,0x6c, -0x39,0x75,0x2c,0x14,0x6d,0x65,0x72,0x69,0x63,0x2d,0x14,0x77,0x6c,0x69,0x6e,0x65, -0x39,0x66,0x3f,0x66,0x40,0x67,0x4e,0x68,0x70,0x6b,0x10,0x61,0x26,0x15,0x74,0x61, -0x6b,0x61,0x6e,0x61,0x27,0x10,0x6f,0x24,0x13,0x72,0x6d,0x61,0x74,0x25,1,0x61, -0x3a,0x6c,0x19,0x75,0x65,0x61,0x66,0x74,0x65,0x72,0x7a,0x77,0x6a,0x49,0x10,0x7a, -0x49,1,0x65,0x24,0x6c,0x3d,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74,0x74,0x65, -0x72,0x3d,0x61,0x86,0x63,0x92,0x64,0x94,0x65,2,0x62,0x44,0x6d,0x5e,0x78,0x2e, -0x13,0x74,0x65,0x6e,0x64,0x32,0x15,0x6e,0x75,0x6d,0x6c,0x65,0x74,0x2f,0x42,1, -0x61,0x24,0x67,0x45,0x11,0x73,0x65,0x42,0x12,0x67,0x61,0x7a,0x45,0x46,0x16,0x6f, -0x64,0x69,0x66,0x69,0x65,0x72,0x47,0x15,0x6c,0x65,0x74,0x74,0x65,0x72,0x23,0x10, -0x72,0x31,1,0x6f,0x24,0x71,0x41,0x18,0x75,0x62,0x6c,0x65,0x71,0x75,0x6f,0x74, -0x65,0x41,2,0x63,0x32,0x6e,0x3c,0x6f,0x22,0x12,0x70,0x65,0x6e,0x23,0x24,0x13, -0x6c,0x6f,0x73,0x65,0x25,0x20,0x12,0x6f,0x6e,0x65,0x21,6,0x6f,0x65,0x6f,0x4a, -0x72,0x5c,0x74,0x64,0x76,0x1d,0x69,0x73,0x75,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72, -0x6c,0x65,0x66,0x74,0x3d,0x18,0x76,0x65,0x72,0x73,0x74,0x72,0x75,0x63,0x6b,0x2d, -0x13,0x69,0x67,0x68,0x74,0x2f,0x11,0x6f,0x70,0x30,0x12,0x61,0x6e,0x64,2,0x62, -0x32,0x6c,0x62,0x72,0x13,0x69,0x67,0x68,0x74,0x3b,0x14,0x6f,0x74,0x74,0x6f,0x6d, -0x32,0x12,0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x35,0x12, -0x65,0x66,0x74,0x3f,0x12,0x65,0x66,0x74,0x36,0x17,0x61,0x6e,0x64,0x72,0x69,0x67, -0x68,0x74,0x39,0x62,0x2c,0x6c,0x5c,0x6e,0x10,0x61,0x21,0x14,0x6f,0x74,0x74,0x6f, -0x6d,0x22,0x12,0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x27, -0x12,0x65,0x66,0x74,0x25,0x12,0x65,0x66,0x74,0x28,0x17,0x61,0x6e,0x64,0x72,0x69, -0x67,0x68,0x74,0x2b,0xd,0x6e,0xaa,0x72,0x70,0x72,0x92,0x73,0xa2,0x46,0x74,0xa2, -0x54,0x76,1,0x69,0x60,0x6f,0x12,0x77,0x65,0x6c,0x62,1,0x64,0x3a,0x69,0x19, -0x6e,0x64,0x65,0x70,0x65,0x6e,0x64,0x65,0x6e,0x74,0x67,0x17,0x65,0x70,0x65,0x6e, -0x64,0x65,0x6e,0x74,0x65,1,0x72,0x2e,0x73,0x13,0x61,0x72,0x67,0x61,0x61,0x12, -0x61,0x6d,0x61,0x5f,0x1d,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x73,0x68,0x69,0x66, -0x74,0x65,0x72,0x57,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x6d,0x6f,0x64,0x69, -0x66,0x69,0x65,0x72,0x59,0x12,0x6f,0x6e,0x65,1,0x6c,0x2c,0x6d,0x12,0x61,0x72, -0x6b,0x5d,0x14,0x65,0x74,0x74,0x65,0x72,0x5b,0x6e,0x3c,0x6f,0x7c,0x70,0x18,0x75, -0x72,0x65,0x6b,0x69,0x6c,0x6c,0x65,0x72,0x55,1,0x6f,0x4c,0x75,1,0x6b,0x3c, -0x6d,0x12,0x62,0x65,0x72,0x50,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x53,0x11,0x74, -0x61,0x4f,0x16,0x6e,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x4d,0x13,0x74,0x68,0x65,0x72, -0x21,0x67,0x3e,0x67,0x4a,0x69,0x64,0x6a,0x82,0x6d,0x1d,0x6f,0x64,0x69,0x66,0x79, -0x69,0x6e,0x67,0x6c,0x65,0x74,0x74,0x65,0x72,0x4b,0x1c,0x65,0x6d,0x69,0x6e,0x61, -0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x45,0x1e,0x6e,0x76,0x69,0x73,0x69,0x62, -0x6c,0x65,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x47,0x14,0x6f,0x69,0x6e,0x65,0x72, -0x49,0x61,0xa2,0xba,0x62,0xa2,0xc0,0x63,1,0x61,0xa2,0xa2,0x6f,0x16,0x6e,0x73, -0x6f,0x6e,0x61,0x6e,0x74,0x2a,8,0x6b,0x67,0x6b,0x48,0x6d,0x52,0x70,0x5c,0x73, -0xa2,0x42,0x77,0x19,0x69,0x74,0x68,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x43,0x14, -0x69,0x6c,0x6c,0x65,0x72,0x35,0x14,0x65,0x64,0x69,0x61,0x6c,0x37,1,0x6c,0x52, -0x72,0x10,0x65,1,0x63,0x2e,0x66,0x13,0x69,0x78,0x65,0x64,0x3d,0x19,0x65,0x64, -0x69,0x6e,0x67,0x72,0x65,0x70,0x68,0x61,0x3b,0x18,0x61,0x63,0x65,0x68,0x6f,0x6c, -0x64,0x65,0x72,0x39,0x10,0x75,1,0x62,0x3e,0x63,0x1b,0x63,0x65,0x65,0x64,0x69, -0x6e,0x67,0x72,0x65,0x70,0x68,0x61,0x41,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x64,0x3f, -0x64,0x4c,0x66,0x52,0x68,0x5a,0x69,0x1e,0x6e,0x69,0x74,0x69,0x61,0x6c,0x70,0x6f, -0x73,0x74,0x66,0x69,0x78,0x65,0x64,0x33,0x12,0x65,0x61,0x64,0x2d,0x13,0x69,0x6e, -0x61,0x6c,0x2f,0x18,0x65,0x61,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,0x1d,0x6e, -0x74,0x69,0x6c,0x6c,0x61,0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x29,0x16,0x76, -0x61,0x67,0x72,0x61,0x68,0x61,0x23,1,0x69,0x4a,0x72,0x10,0x61,0x1f,0x68,0x6d, -0x69,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x6e,0x75,0x6d,0x62,0x65,0x72,0x27,0x12, -0x6e,0x64,0x75,0x25,2,0x72,0x38,0x74,0x46,0x75,0x26,0x15,0x70,0x72,0x69,0x67, -0x68,0x74,0x27,0x20,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x21,1,0x72,0x24,0x75, -0x25,0x22,0x18,0x61,0x6e,0x73,0x66,0x6f,0x72,0x6d,0x65,0x64,1,0x72,0x32,0x75, -0x15,0x70,0x72,0x69,0x67,0x68,0x74,0x25,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x23, -1,0x61,0x38,0x72,0x18,0x65,0x73,0x74,0x72,0x69,0x63,0x74,0x65,0x64,0x21,0x15, -0x6c,0x6c,0x6f,0x77,0x65,0x64,0x23,0xd,0x6e,0xc1,0x86,0x73,0xa8,0x73,0x4c,0x74, -0xa2,0x76,0x75,0xa2,0x83,0x7a,0xd8,0x70,0,2,0x6c,0xd9,0x20,0,0x70,0xd9, -0x40,0,0x73,0xc3,0,0xfe,0xf,0,0,0,7,0x6f,0x3c,0x6f,0xff,8, -0,0,0,0x70,0x3a,0x75,0x6e,0x79,0x13,0x6d,0x62,0x6f,0x6c,0xff,0xf,0, -0,0,0x11,0x61,0x63,1,0x65,0x34,0x69,0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b, -0xa5,0,0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xc3,0,0x16,0x72, -0x72,0x6f,0x67,0x61,0x74,0x65,0xe1,0,0,0x63,0xff,2,0,0,0,0x65, -0x38,0x6b,0xff,4,0,0,0,0x6d,0xff,1,0,0,0,0x16,0x70,0x61, -0x72,0x61,0x74,0x6f,0x72,0xd9,0x70,0,0x1d,0x69,0x74,0x6c,0x65,0x63,0x61,0x73, -0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,1,0x6e,0x40,0x70,0x1c,0x70,0x65,0x72, -0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x25,0x17,0x61,0x73,0x73,0x69, -0x67,0x6e,0x65,0x64,0x23,0x6e,0xa2,0x69,0x6f,0xa2,0x89,0x70,0xfe,0x30,0xf8,0, -0,9,0x69,0x33,0x69,0xff,0x10,0,0,0,0x6f,0xfd,0x80,0,0,0x72, -0x54,0x73,0xf9,0,0,0x75,0x12,0x6e,0x63,0x74,0xfe,0x30,0xf8,0,0,0x15, -0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x30,0xf8,0,0,0x17,0x69,0x76,0x61,0x74, -0x65,0x75,0x73,0x65,0xdd,0,0,0x61,0x48,0x63,0xfd,0x40,0,0,0x64,0xe9, -0,0,0x65,0xfd,0x20,0,0,0x66,0xff,0x20,0,0,0,0x1f,0x72,0x61, -0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x40, -0,0xbe,0,3,0x64,0xa7,0,0x6c,0xab,0,0x6f,0x30,0x75,0x13,0x6d,0x62, -0x65,0x72,0xbf,0,0xb2,0,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d, -0x61,0x72,0x6b,0xa1,1,0x70,0x92,0x74,0x12,0x68,0x65,0x72,0xe6,0x80,1,3, -0x6c,0x40,0x6e,0x4a,0x70,0x56,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0xff,8,0, -0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x61,0x14,0x75,0x6d,0x62,0x65,0x72,0xb3, -0,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd,0x80,0,0, -0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xf9,0, -0,0x66,0xc0,0xc4,0x66,0xa2,0x47,0x69,0xa2,0x64,0x6c,0xa2,0x79,0x6d,0xa4,0xc0, -4,0x61,0x6c,0x63,0xa5,0,0x65,0xa3,0x80,0x6e,0xa1,0x6f,0x15,0x64,0x69,0x66, -0x69,0x65,0x72,1,0x6c,0x38,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0xff,4,0, -0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x41,1,0x72,0x3c,0x74,0x16,0x68,0x73, -0x79,0x6d,0x62,0x6f,0x6c,0xff,1,0,0,0,0x10,0x6b,0xa5,0xc0,1,0x69, -0x32,0x6f,0x13,0x72,0x6d,0x61,0x74,0xdb,0,0,0x1d,0x6e,0x61,0x6c,0x70,0x75, -0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x20,0,0,0,0x10,0x6e, -0x1f,0x69,0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f, -0x6e,0xff,0x10,0,0,0,0x9c,7,0x6d,0x18,0x6d,0x41,0x6f,0x28,0x74,0x31, -0x75,0x25,0x60,0x1c,0x77,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65, -0x72,0x29,0x63,0x3d,0x65,0x28,0x69,0x42,0x6c,0x29,0x13,0x74,0x74,0x65,0x72,0x9c, -0x15,0x6e,0x75,0x6d,0x62,0x65,0x72,0xab,0,0x1a,0x6e,0x65,0x73,0x65,0x70,0x61, -0x72,0x61,0x74,0x6f,0x72,0xd9,0x20,0,0x63,0x46,0x64,0xa2,0x96,0x65,0x1b,0x6e, -0x63,0x6c,0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa3,0x80,0xe6,0x80,1, -7,0x6e,0x57,0x6e,0x52,0x6f,0x5e,0x73,0xe1,0,0,0x75,0x1b,0x72,0x72,0x65, -0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff,2,0,0,0,0x22,0x12, -0x74,0x72,0x6c,0xd9,0x80,0,0xdc,0,0,1,0x6d,0x62,0x6e,1,0x6e,0x30, -0x74,0x12,0x72,0x6f,0x6c,0xd9,0x80,0,0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75, -0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd,0x40,0,0,0x19,0x62,0x69, -0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0xc0,0x61,0x58,0x63,0xd9,0x80,0, -0x66,0xdb,0,0,0x6c,0x1d,0x6f,0x73,0x65,0x70,0x75,0x6e,0x63,0x74,0x75,0x61, -0x74,0x69,0x6f,0x6e,0xfd,0x20,0,0,0x18,0x73,0x65,0x64,0x6c,0x65,0x74,0x74, -0x65,0x72,0x3d,2,0x61,0x32,0x65,0x50,0x69,0x12,0x67,0x69,0x74,0xa7,0,0x1c, -0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xe9,0,0, -0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62,0x65,0x72,0xa7,0,8,0x6e, -0x50,0x6e,0x46,0x6f,0x7a,0x72,0x88,0x74,0x9c,0x75,0x19,0x6e,0x63,0x6f,0x6d,0x6d, -0x6f,0x6e,0x75,0x73,0x65,0x31,0x11,0x6f,0x74,2,0x63,0x2e,0x6e,0x3e,0x78,0x11, -0x69,0x64,0x29,0x17,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x21,0x12,0x66,0x6b, -0x63,0x27,0x16,0x62,0x73,0x6f,0x6c,0x65,0x74,0x65,0x2d,0x19,0x65,0x63,0x6f,0x6d, -0x6d,0x65,0x6e,0x64,0x65,0x64,0x37,0x17,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c, -0x2f,0x64,0x40,0x65,0x78,0x69,0x88,0x6c,0x18,0x69,0x6d,0x69,0x74,0x65,0x64,0x75, -0x73,0x65,0x33,0x10,0x65,1,0x66,0x34,0x70,0x16,0x72,0x65,0x63,0x61,0x74,0x65, -0x64,0x23,0x1c,0x61,0x75,0x6c,0x74,0x69,0x67,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65, -0x25,0x17,0x78,0x63,0x6c,0x75,0x73,0x69,0x6f,0x6e,0x2b,0x17,0x6e,0x63,0x6c,0x75, -0x73,0x69,0x6f,0x6e,0x35 +0x75,0x69,0xa3,0x8c,0x11,0x61,0x6f,0xa3,0x5c,7,0x6f,0x1b,0x6f,0x34,0x70,0x3a, +0x72,0x40,0x74,0x11,0x68,0x69,0xa3,0x78,0x11,0x72,0x65,0xa3,0x77,0x11,0x65,0x6c, +0xa3,0x8a,0x11,0x61,0x69,0xa3,0xcb,0x61,0x36,0x68,0xa2,0x46,0x69,0xa2,0x83,0x6e, +0x11,0x64,0x61,0x4b,5,0x74,0x23,0x74,0x34,0x77,0x56,0x79,0x13,0x61,0x68,0x6c, +0x69,0xa3,0x4f,0x14,0x61,0x6b,0x61,0x6e,0x61,0x4c,0x19,0x6f,0x72,0x68,0x69,0x72, +0x61,0x67,0x61,0x6e,0x61,0x8d,0x10,0x69,0xa3,0xc6,0x69,0x38,0x6c,0x40,0x6e,1, +0x61,0x4d,0x6e,0x12,0x61,0x64,0x61,0x4b,0x12,0x74,0x68,0x69,0xa3,0x78,0x10,0x69, +0xa3,0x4f,4,0x61,0x40,0x69,0x52,0x6d,0x70,0x6f,0x7c,0x75,0x15,0x64,0x61,0x77, +0x61,0x64,0x69,0xa3,0x91,0x10,0x72,0x92,0x15,0x6f,0x73,0x68,0x74,0x68,0x69,0x93, +0x1d,0x74,0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70,0x74,0xa3, +0xbf,1,0x65,0x24,0x72,0x4f,0x10,0x72,0x4f,0x10,0x6a,0xa2,0x9d,0x11,0x6b,0x69, +0xa3,0x9d,1,0x72,0x2a,0x74,0x10,0x73,0xa3,0xbf,0x14,0x61,0x74,0x72,0x61,0x69, +0xa3,0xcb,4,0x61,0x5c,0x65,0x90,0x69,0xa0,0x6f,0xa2,0x5d,0x79,1,0x63,0x34, +0x64,0x10,0x69,0xa2,0x6c,0x11,0x61,0x6e,0xa3,0x6c,0x10,0x69,0xa2,0x6b,0x11,0x61, +0x6e,0xa3,0x6b,2,0x6e,0x42,0x6f,0x46,0x74,3,0x66,0xa3,0x50,0x67,0xa3,0x51, +0x69,0x24,0x6e,0x53,0x10,0x6e,0x53,0x10,0x61,0xa3,0x6a,0x50,0x10,0x6f,0x51,0x11, +0x70,0x63,0xa2,0x52,0x11,0x68,0x61,0xa3,0x52,2,0x6d,0x2e,0x6e,0x36,0x73,0x10, +0x75,0xa3,0x83,0x10,0x62,0x80,0x10,0x75,0x81,2,0x61,0xa3,0x53,0x62,0x83,0x65, +0x11,0x61,0x72,1,0x61,0xa3,0x53,0x62,0x83,0x11,0x6d,0x61,0xa3,0x8b,0x68,0x6e, +0x69,0xa2,0x95,0x6a,2,0x61,0x30,0x70,0x52,0x75,0x11,0x72,0x63,0xa3,0x94,1, +0x6d,0x38,0x76,0x10,0x61,0xa2,0x4e,0x13,0x6e,0x65,0x73,0x65,0xa3,0x4e,0x10,0x6f, +0xa3,0xad,0x11,0x61,0x6e,0xa3,0x69,6,0x6c,0x1e,0x6c,0x34,0x6d,0x3a,0x72,0x48, +0x75,0x11,0x6e,0x67,0xa3,0x4c,0x11,0x75,0x77,0xa3,0x9c,0x10,0x6e,1,0x67,0xa3, +0x4b,0x70,0xa3,0xba,0x11,0x6b,0x74,0x8d,0x61,0x3c,0x65,0xa2,0x43,0x69,0x11,0x72, +0x61,0x48,0x13,0x67,0x61,0x6e,0x61,0x49,1,0x6e,0x34,0x74,0x10,0x72,0xa2,0xa2, +0x11,0x61,0x6e,0xa3,0xa2,0x42,6,0x6f,0xe,0x6f,0x77,0x73,0xa3,0x49,0x74,0xa3, +0x4a,0x75,0x12,0x6e,0x6f,0x6f,0x77,0x62,0xa3,0xac,0x67,0x3e,0x69,0x42,0x19,0x66, +0x69,0x72,0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,0xa3,0xb6,0x44,0x11,0x75,0x6c,0x45, +0x11,0x62,0x72,0x46,0x11,0x65,0x77,0x47,2,0x6d,0x2e,0x6e,0x4a,0x74,0x11,0x61, +0x6c,0x5d,0x1c,0x70,0x65,0x72,0x69,0x61,0x6c,0x61,0x72,0x61,0x6d,0x61,0x69,0x63, +0xa3,0x74,2,0x64,0x66,0x68,0x6a,0x73,0x1b,0x63,0x72,0x69,0x70,0x74,0x69,0x6f, +0x6e,0x61,0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68,0x69,0x61,0x6e,0xa3, +0x7d,0x13,0x6c,0x61,0x76,0x69,0xa3,0x7a,0x10,0x73,0xa3,0x4d,0x15,0x65,0x72,0x69, +0x74,0x65,0x64,0x23,0x64,0xc1,0x28,0x64,0xa2,0x95,0x65,0xa2,0xdc,0x67,5,0x6f, +0x66,0x6f,0x98,0x72,0xa2,0x4b,0x75,3,0x6a,0x54,0x6b,0x66,0x6e,0x6a,0x72,1, +0x6d,0x38,0x75,0x40,0x16,0x6e,0x67,0x6b,0x68,0x65,0x6d,0x61,0xa3,0xca,0x13,0x75, +0x6b,0x68,0x69,0x41,1,0x61,0x24,0x72,0x3f,0x13,0x72,0x61,0x74,0x69,0x3f,0x10, +0x68,0xa3,0xca,0x18,0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa3,0xb3,1, +0x6e,0x30,0x74,0x10,0x68,0x3a,0x11,0x69,0x63,0x3b,1,0x67,0xa3,0xb3,0x6d,0xa3, +0xaf,1,0x61,0x32,0x65,1,0x65,0x24,0x6b,0x3d,0x10,0x6b,0x3d,0x10,0x6e,0xa2, +0x89,0x12,0x74,0x68,0x61,0xa3,0x89,0x61,0x3e,0x65,0x4c,0x6c,0x11,0x61,0x67,0x90, +0x15,0x6f,0x6c,0x69,0x74,0x69,0x63,0x91,0x11,0x72,0x61,0xa2,0xc9,0x10,0x79,0xa3, +0xc9,0x10,0x6f,1,0x6b,0xa3,0x48,0x72,0x38,0x13,0x67,0x69,0x61,0x6e,0x39,4, +0x65,0x46,0x69,0x6c,0x6f,0x8c,0x73,0x9a,0x75,0x11,0x70,0x6c,0xa2,0x87,0x13,0x6f, +0x79,0x61,0x6e,0xa3,0x87,1,0x73,0x38,0x76,0x10,0x61,0x34,0x15,0x6e,0x61,0x67, +0x61,0x72,0x69,0x35,0x13,0x65,0x72,0x65,0x74,0x33,1,0x61,0x36,0x76,0x16,0x65, +0x73,0x61,0x6b,0x75,0x72,0x75,0xa3,0xbe,0x10,0x6b,0xa3,0xbe,0x11,0x67,0x72,0xa2, +0xb2,0x10,0x61,0xa3,0xb2,0x11,0x72,0x74,0x33,2,0x67,0x3a,0x6c,0x72,0x74,0x11, +0x68,0x69,0x36,0x13,0x6f,0x70,0x69,0x63,0x37,0x10,0x79,2,0x64,0xa3,0x45,0x68, +0xa3,0x46,0x70,0xa2,0x47,0x1e,0x74,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67, +0x6c,0x79,0x70,0x68,0x73,0xa3,0x47,1,0x62,0x36,0x79,0x10,0x6d,0xa2,0xb9,0x12, +0x61,0x69,0x63,0xa3,0xb9,0x10,0x61,0xa2,0x88,0x12,0x73,0x61,0x6e,0xa3,0x88,0x61, +0xa2,0xc9,0x62,0xa4,0x32,0x63,6,0x6f,0x52,0x6f,0x76,0x70,0x92,0x75,0xa2,0x41, +0x79,1,0x70,0x3e,0x72,2,0x69,0x2a,0x6c,0x31,0x73,0xa3,0x44,0x13,0x6c,0x6c, +0x69,0x63,0x31,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e,0x6f,0x61,0x6e, +0xa3,0xc1,0x11,0x6f,0x74,0x7f,1,0x6d,0x30,0x70,0x10,0x74,0x2e,0x11,0x69,0x63, +0x2f,0x12,0x6d,0x6f,0x6e,0x21,1,0x6d,0x28,0x72,0x10,0x74,0x7f,0x10,0x6e,0xa3, +0xc1,0x16,0x6e,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa3,0x65,0x61,0x32,0x68,0xa2,0x41, +0x69,0x11,0x72,0x74,0xa3,0x43,3,0x6b,0x4c,0x6e,0x50,0x72,0x76,0x75,0x1d,0x63, +0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e,0xa3,0x9f,0x10, +0x6d,0xa3,0x76,1,0x61,0x24,0x73,0x71,0x1d,0x64,0x69,0x61,0x6e,0x61,0x62,0x6f, +0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x71,0x10,0x69,0xa2,0x68,0x11,0x61,0x6e,0xa3, +0x68,3,0x61,0x32,0x65,0x44,0x6f,0x52,0x72,0x10,0x73,0xa3,0xbd,1,0x6b,0x26, +0x6d,0xa3,0x42,0x11,0x6d,0x61,0xa3,0x76,0x10,0x72,0x2c,0x13,0x6f,0x6b,0x65,0x65, +0x2d,0x16,0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa3,0xbd,6,0x68,0x4e,0x68,0x48, +0x6e,0x4e,0x72,0x76,0x76,1,0x65,0x2a,0x73,0x10,0x74,0xa3,0x75,0x13,0x73,0x74, +0x61,0x6e,0xa3,0x75,0x11,0x6f,0x6d,0xa3,0xa1,0x11,0x61,0x74,0x1f,0x6f,0x6c,0x69, +0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0x9c,1, +0x61,0x3e,0x6d,2,0x65,0x2a,0x69,0xa3,0x74,0x6e,0x27,0x13,0x6e,0x69,0x61,0x6e, +0x27,1,0x62,0x26,0x6e,0xa3,0xc8,0x24,0x11,0x69,0x63,0x25,0x64,0x30,0x66,0x44, +0x67,0x11,0x68,0x62,0xa3,0x9f,0x10,0x6c,1,0x61,0x26,0x6d,0xa3,0xa7,0x10,0x6d, +0xa3,0xa7,0x11,0x61,0x6b,0xa3,0x93,6,0x6c,0x3c,0x6c,0x52,0x6f,0x56,0x72,0x66, +0x75,1,0x67,0x30,0x68,1,0x64,0x79,0x69,0x10,0x64,0x79,0x10,0x69,0x8e,0x13, +0x6e,0x65,0x73,0x65,0x8f,0x11,0x69,0x73,0xa1,0x11,0x70,0x6f,0x2a,0x13,0x6d,0x6f, +0x66,0x6f,0x2b,0x10,0x61,1,0x68,0x2e,0x69,0x7c,0x12,0x6c,0x6c,0x65,0x7d,0xa2, +0x41,0x11,0x6d,0x69,0xa3,0x41,0x61,0x48,0x65,0x9c,0x68,1,0x61,0x2a,0x6b,0x10, +0x73,0xa3,0xa8,0x15,0x69,0x6b,0x73,0x75,0x6b,0x69,0xa3,0xa8,3,0x6c,0x3a,0x6d, +0x48,0x73,0x54,0x74,1,0x61,0x24,0x6b,0x9f,0x10,0x6b,0x9f,0x10,0x69,0x9c,0x13, +0x6e,0x65,0x73,0x65,0x9d,0x10,0x75,0xa2,0x82,0x10,0x6d,0xa3,0x82,0x10,0x73,0xa2, +0x86,0x13,0x61,0x76,0x61,0x68,0xa3,0x86,0x11,0x6e,0x67,0x28,0x12,0x61,0x6c,0x69, +0x29,3,0x6c,0x42,0x6e,0x90,0x74,0xa2,0x46,0x76,0x24,0x17,0x6f,0x77,0x65,0x6c, +0x6a,0x61,0x6d,0x6f,0x25,0x22,1,0x65,0x54,0x76,0x28,1,0x73,0x38,0x74,0x2a, +0x17,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x2b,0x16,0x79,0x6c,0x6c,0x61,0x62, +0x6c,0x65,0x29,0x18,0x61,0x64,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x23,1,0x61, +0x21,0x6f,0x1a,0x74,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x62,0x6c,0x65,0x21,0x26, +0x1a,0x72,0x61,0x69,0x6c,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x27,1,0x6e,0x2c, +0x79,0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,1,0x6e,0x2c,0x79,0x22,0x11, +0x65,0x73,0x23,0x20,0x10,0x6f,0x21,2,0x6d,0x30,0x6e,0x3a,0x79,0x22,0x11,0x65, +0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20,0x10,0x6f,0x21,2,0x6d,0x30, +0x6e,0x3a,0x79,0x22,0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20, +0x10,0x6f,0x21,0xb,0x72,0x39,0x76,0xc,0x76,0x33,0x78,0x2a,0x7a,0x11,0x77,0x6a, +0x43,0x10,0x78,0x21,0x72,0x28,0x73,0x50,0x74,0x31,1,0x65,0x24,0x69,0x39,0x1e, +0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x39, +1,0x6d,0x35,0x70,0x18,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x35,0x6c, +0x1f,0x6c,0x3c,0x6f,0x4a,0x70,1,0x70,0x37,0x72,0x14,0x65,0x70,0x65,0x6e,0x64, +0x37,0x28,1,0x66,0x2b,0x76,0x2c,0x10,0x74,0x2f,0x13,0x74,0x68,0x65,0x72,0x21, +0x63,0x4c,0x65,0x64,0x67,1,0x61,0x3a,0x6c,0x19,0x75,0x65,0x61,0x66,0x74,0x65, +0x72,0x7a,0x77,0x6a,0x41,0x10,0x7a,0x41,2,0x6e,0x23,0x6f,0x24,0x72,0x25,0x14, +0x6e,0x74,0x72,0x6f,0x6c,0x23,2,0x62,0x34,0x6d,0x4e,0x78,0x26,0x13,0x74,0x65, +0x6e,0x64,0x27,0x3a,1,0x61,0x24,0x67,0x3d,0x11,0x73,0x65,0x3a,0x12,0x67,0x61, +0x7a,0x3d,0x3e,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x3f,9,0x6e,0x4a,0x6e, +0x34,0x6f,0x44,0x73,0x60,0x75,0x94,0x78,0x10,0x78,0x21,0x10,0x75,0x2a,0x14,0x6d, +0x65,0x72,0x69,0x63,0x2b,1,0x6c,0x2c,0x74,0x12,0x68,0x65,0x72,0x21,0x14,0x65, +0x74,0x74,0x65,0x72,0x2d,3,0x63,0x36,0x65,0x46,0x70,0x31,0x74,0x32,0x12,0x65, +0x72,0x6d,0x33,0x3c,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3d,0x2e,0x10,0x70, +0x2f,0x10,0x70,0x34,0x12,0x70,0x65,0x72,0x35,0x61,0x46,0x63,0x52,0x65,0x64,0x66, +0x72,0x6c,2,0x65,0x2d,0x66,0x3b,0x6f,0x28,0x12,0x77,0x65,0x72,0x29,0x10,0x74, +0x22,0x12,0x65,0x72,0x6d,0x23,1,0x6c,0x24,0x72,0x37,0x24,0x12,0x6f,0x73,0x65, +0x25,0x10,0x78,0x38,0x13,0x74,0x65,0x6e,0x64,0x39,0x10,0x6f,0x26,0x13,0x72,0x6d, +0x61,0x74,0x27,0,0x10,0x6c,0x88,0x72,0x40,0x72,0x36,0x73,0x5e,0x77,0x7a,0x78, +0x8a,0x7a,0x11,0x77,0x6a,0x4b,1,0x65,0x24,0x69,0x3b,0x1e,0x67,0x69,0x6f,0x6e, +0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x3b,1,0x69,0x24,0x71, +0x3f,0x18,0x6e,0x67,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x3f,0x17,0x73,0x65,0x67, +0x73,0x70,0x61,0x63,0x65,0x4d,0x10,0x78,0x21,0x6c,0x36,0x6d,0x3c,0x6e,0x76,0x6f, +0x13,0x74,0x68,0x65,0x72,0x21,1,0x65,0x23,0x66,0x35,3,0x62,0x37,0x69,0x28, +0x6c,0x29,0x6e,0x2b,0x10,0x64,1,0x6c,0x34,0x6e,0x11,0x75,0x6d,0x2a,0x12,0x6c, +0x65,0x74,0x37,0x14,0x65,0x74,0x74,0x65,0x72,0x29,2,0x65,0x36,0x6c,0x39,0x75, +0x2c,0x14,0x6d,0x65,0x72,0x69,0x63,0x2d,0x14,0x77,0x6c,0x69,0x6e,0x65,0x39,0x66, +0x3f,0x66,0x40,0x67,0x4e,0x68,0x70,0x6b,0x10,0x61,0x26,0x15,0x74,0x61,0x6b,0x61, +0x6e,0x61,0x27,0x10,0x6f,0x24,0x13,0x72,0x6d,0x61,0x74,0x25,1,0x61,0x3a,0x6c, +0x19,0x75,0x65,0x61,0x66,0x74,0x65,0x72,0x7a,0x77,0x6a,0x49,0x10,0x7a,0x49,1, +0x65,0x24,0x6c,0x3d,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74,0x74,0x65,0x72,0x3d, +0x61,0x86,0x63,0x92,0x64,0x94,0x65,2,0x62,0x44,0x6d,0x5e,0x78,0x2e,0x13,0x74, +0x65,0x6e,0x64,0x32,0x15,0x6e,0x75,0x6d,0x6c,0x65,0x74,0x2f,0x42,1,0x61,0x24, +0x67,0x45,0x11,0x73,0x65,0x42,0x12,0x67,0x61,0x7a,0x45,0x46,0x16,0x6f,0x64,0x69, +0x66,0x69,0x65,0x72,0x47,0x15,0x6c,0x65,0x74,0x74,0x65,0x72,0x23,0x10,0x72,0x31, +1,0x6f,0x24,0x71,0x41,0x18,0x75,0x62,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x41, +2,0x63,0x32,0x6e,0x3c,0x6f,0x22,0x12,0x70,0x65,0x6e,0x23,0x24,0x13,0x6c,0x6f, +0x73,0x65,0x25,0x20,0x12,0x6f,0x6e,0x65,0x21,6,0x6f,0x65,0x6f,0x4a,0x72,0x5c, +0x74,0x64,0x76,0x1d,0x69,0x73,0x75,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72,0x6c,0x65, +0x66,0x74,0x3d,0x18,0x76,0x65,0x72,0x73,0x74,0x72,0x75,0x63,0x6b,0x2d,0x13,0x69, +0x67,0x68,0x74,0x2f,0x11,0x6f,0x70,0x30,0x12,0x61,0x6e,0x64,2,0x62,0x32,0x6c, +0x62,0x72,0x13,0x69,0x67,0x68,0x74,0x3b,0x14,0x6f,0x74,0x74,0x6f,0x6d,0x32,0x12, +0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x35,0x12,0x65,0x66, +0x74,0x3f,0x12,0x65,0x66,0x74,0x36,0x17,0x61,0x6e,0x64,0x72,0x69,0x67,0x68,0x74, +0x39,0x62,0x2c,0x6c,0x5c,0x6e,0x10,0x61,0x21,0x14,0x6f,0x74,0x74,0x6f,0x6d,0x22, +0x12,0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x27,0x12,0x65, +0x66,0x74,0x25,0x12,0x65,0x66,0x74,0x28,0x17,0x61,0x6e,0x64,0x72,0x69,0x67,0x68, +0x74,0x2b,0xd,0x6e,0xbd,0x72,0x83,0x72,0x92,0x73,0xa2,0x59,0x74,0xa2,0x67,0x76, +1,0x69,0x60,0x6f,0x12,0x77,0x65,0x6c,0x62,1,0x64,0x3a,0x69,0x19,0x6e,0x64, +0x65,0x70,0x65,0x6e,0x64,0x65,0x6e,0x74,0x67,0x17,0x65,0x70,0x65,0x6e,0x64,0x65, +0x6e,0x74,0x65,1,0x72,0x2e,0x73,0x13,0x61,0x72,0x67,0x61,0x61,0x12,0x61,0x6d, +0x61,0x5f,0x10,0x65,1,0x67,0x40,0x6f,0x1c,0x72,0x64,0x65,0x72,0x69,0x6e,0x67, +0x6b,0x69,0x6c,0x6c,0x65,0x72,0x69,0x1b,0x69,0x73,0x74,0x65,0x72,0x73,0x68,0x69, +0x66,0x74,0x65,0x72,0x57,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x6d,0x6f,0x64, +0x69,0x66,0x69,0x65,0x72,0x59,0x12,0x6f,0x6e,0x65,1,0x6c,0x2c,0x6d,0x12,0x61, +0x72,0x6b,0x5d,0x14,0x65,0x74,0x74,0x65,0x72,0x5b,0x6e,0x3c,0x6f,0x7c,0x70,0x18, +0x75,0x72,0x65,0x6b,0x69,0x6c,0x6c,0x65,0x72,0x55,1,0x6f,0x4c,0x75,1,0x6b, +0x3c,0x6d,0x12,0x62,0x65,0x72,0x50,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x53,0x11, +0x74,0x61,0x4f,0x16,0x6e,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x4d,0x13,0x74,0x68,0x65, +0x72,0x21,0x67,0x3e,0x67,0x4a,0x69,0x64,0x6a,0x82,0x6d,0x1d,0x6f,0x64,0x69,0x66, +0x79,0x69,0x6e,0x67,0x6c,0x65,0x74,0x74,0x65,0x72,0x4b,0x1c,0x65,0x6d,0x69,0x6e, +0x61,0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x45,0x1e,0x6e,0x76,0x69,0x73,0x69, +0x62,0x6c,0x65,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x47,0x14,0x6f,0x69,0x6e,0x65, +0x72,0x49,0x61,0xa2,0xba,0x62,0xa2,0xc0,0x63,1,0x61,0xa2,0xa2,0x6f,0x16,0x6e, +0x73,0x6f,0x6e,0x61,0x6e,0x74,0x2a,8,0x6b,0x67,0x6b,0x48,0x6d,0x52,0x70,0x5c, +0x73,0xa2,0x42,0x77,0x19,0x69,0x74,0x68,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x43, +0x14,0x69,0x6c,0x6c,0x65,0x72,0x35,0x14,0x65,0x64,0x69,0x61,0x6c,0x37,1,0x6c, +0x52,0x72,0x10,0x65,1,0x63,0x2e,0x66,0x13,0x69,0x78,0x65,0x64,0x3d,0x19,0x65, +0x64,0x69,0x6e,0x67,0x72,0x65,0x70,0x68,0x61,0x3b,0x18,0x61,0x63,0x65,0x68,0x6f, +0x6c,0x64,0x65,0x72,0x39,0x10,0x75,1,0x62,0x3e,0x63,0x1b,0x63,0x65,0x65,0x64, +0x69,0x6e,0x67,0x72,0x65,0x70,0x68,0x61,0x41,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x64, +0x3f,0x64,0x4c,0x66,0x52,0x68,0x5a,0x69,0x1e,0x6e,0x69,0x74,0x69,0x61,0x6c,0x70, +0x6f,0x73,0x74,0x66,0x69,0x78,0x65,0x64,0x33,0x12,0x65,0x61,0x64,0x2d,0x13,0x69, +0x6e,0x61,0x6c,0x2f,0x18,0x65,0x61,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,0x1d, +0x6e,0x74,0x69,0x6c,0x6c,0x61,0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x29,0x16, +0x76,0x61,0x67,0x72,0x61,0x68,0x61,0x23,1,0x69,0x4a,0x72,0x10,0x61,0x1f,0x68, +0x6d,0x69,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x6e,0x75,0x6d,0x62,0x65,0x72,0x27, +0x12,0x6e,0x64,0x75,0x25,2,0x72,0x38,0x74,0x46,0x75,0x26,0x15,0x70,0x72,0x69, +0x67,0x68,0x74,0x27,0x20,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x21,1,0x72,0x24, +0x75,0x25,0x22,0x18,0x61,0x6e,0x73,0x66,0x6f,0x72,0x6d,0x65,0x64,1,0x72,0x32, +0x75,0x15,0x70,0x72,0x69,0x67,0x68,0x74,0x25,0x15,0x6f,0x74,0x61,0x74,0x65,0x64, +0x23,1,0x61,0x38,0x72,0x18,0x65,0x73,0x74,0x72,0x69,0x63,0x74,0x65,0x64,0x21, +0x15,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x23,3,0x63,0x34,0x65,0x44,0x6c,0x4e,0x6e, +0x12,0x6f,0x6e,0x65,0x21,0x17,0x6f,0x6e,0x73,0x6f,0x6e,0x61,0x6e,0x74,0x23,0x14, +0x78,0x74,0x65,0x6e,0x64,0x25,0x14,0x69,0x6e,0x6b,0x65,0x72,0x27,0xd,0x6e,0xc1, +0x86,0x73,0xa8,0x73,0x4c,0x74,0xa2,0x76,0x75,0xa2,0x83,0x7a,0xd8,0x70,0,2, +0x6c,0xd9,0x20,0,0x70,0xd9,0x40,0,0x73,0xc3,0,0xfe,0xf,0,0,0, +7,0x6f,0x3c,0x6f,0xff,8,0,0,0,0x70,0x3a,0x75,0x6e,0x79,0x13,0x6d, +0x62,0x6f,0x6c,0xff,0xf,0,0,0,0x11,0x61,0x63,1,0x65,0x34,0x69,0x15, +0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0,0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74, +0x6f,0x72,0xc3,0,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0xe1,0,0,0x63, +0xff,2,0,0,0,0x65,0x38,0x6b,0xff,4,0,0,0,0x6d,0xff,1, +0,0,0,0x16,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x70,0,0x1d,0x69, +0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,1,0x6e, +0x40,0x70,0x1c,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72, +0x25,0x17,0x61,0x73,0x73,0x69,0x67,0x6e,0x65,0x64,0x23,0x6e,0xa2,0x69,0x6f,0xa2, +0x89,0x70,0xfe,0x30,0xf8,0,0,9,0x69,0x33,0x69,0xff,0x10,0,0,0, +0x6f,0xfd,0x80,0,0,0x72,0x54,0x73,0xf9,0,0,0x75,0x12,0x6e,0x63,0x74, +0xfe,0x30,0xf8,0,0,0x15,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x30,0xf8,0, +0,0x17,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0xdd,0,0,0x61,0x48,0x63, +0xfd,0x40,0,0,0x64,0xe9,0,0,0x65,0xfd,0x20,0,0,0x66,0xff,0x20, +0,0,0,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72, +0x61,0x74,0x6f,0x72,0xd9,0x40,0,0xbe,0,3,0x64,0xa7,0,0x6c,0xab,0, +0x6f,0x30,0x75,0x13,0x6d,0x62,0x65,0x72,0xbf,0,0xb2,0,0x1b,0x6e,0x73,0x70, +0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa1,1,0x70,0x92,0x74,0x12,0x68, +0x65,0x72,0xe6,0x80,1,3,0x6c,0x40,0x6e,0x4a,0x70,0x56,0x73,0x14,0x79,0x6d, +0x62,0x6f,0x6c,0xff,8,0,0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x61,0x14, +0x75,0x6d,0x62,0x65,0x72,0xb3,0,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69, +0x6f,0x6e,0xfd,0x80,0,0,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61, +0x74,0x69,0x6f,0x6e,0xf9,0,0,0x66,0xc0,0xc4,0x66,0xa2,0x47,0x69,0xa2,0x64, +0x6c,0xa2,0x79,0x6d,0xa4,0xc0,4,0x61,0x6c,0x63,0xa5,0,0x65,0xa3,0x80,0x6e, +0xa1,0x6f,0x15,0x64,0x69,0x66,0x69,0x65,0x72,1,0x6c,0x38,0x73,0x14,0x79,0x6d, +0x62,0x6f,0x6c,0xff,4,0,0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x41,1, +0x72,0x3c,0x74,0x16,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff,1,0,0,0, +0x10,0x6b,0xa5,0xc0,1,0x69,0x32,0x6f,0x13,0x72,0x6d,0x61,0x74,0xdb,0,0, +0x1d,0x6e,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff, +0x20,0,0,0,0x10,0x6e,0x1f,0x69,0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63, +0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x10,0,0,0,0x9c,7,0x6d,0x18, +0x6d,0x41,0x6f,0x28,0x74,0x31,0x75,0x25,0x60,0x1c,0x77,0x65,0x72,0x63,0x61,0x73, +0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x29,0x63,0x3d,0x65,0x28,0x69,0x42,0x6c,0x29, +0x13,0x74,0x74,0x65,0x72,0x9c,0x15,0x6e,0x75,0x6d,0x62,0x65,0x72,0xab,0,0x1a, +0x6e,0x65,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x20,0,0x63,0x46, +0x64,0xa2,0x96,0x65,0x1b,0x6e,0x63,0x6c,0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72, +0x6b,0xa3,0x80,0xe6,0x80,1,7,0x6e,0x57,0x6e,0x52,0x6f,0x5e,0x73,0xe1,0, +0,0x75,0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff, +2,0,0,0,0x22,0x12,0x74,0x72,0x6c,0xd9,0x80,0,0xdc,0,0,1, +0x6d,0x62,0x6e,1,0x6e,0x30,0x74,0x12,0x72,0x6f,0x6c,0xd9,0x80,0,0x1f,0x65, +0x63,0x74,0x6f,0x72,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd, +0x40,0,0,0x19,0x62,0x69,0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0xc0, +0x61,0x58,0x63,0xd9,0x80,0,0x66,0xdb,0,0,0x6c,0x1d,0x6f,0x73,0x65,0x70, +0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd,0x20,0,0,0x18,0x73, +0x65,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x3d,2,0x61,0x32,0x65,0x50,0x69,0x12, +0x67,0x69,0x74,0xa7,0,0x1c,0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, +0x69,0x6f,0x6e,0xe9,0,0,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62, +0x65,0x72,0xa7,0,8,0x6e,0x50,0x6e,0x46,0x6f,0x7a,0x72,0x88,0x74,0x9c,0x75, +0x19,0x6e,0x63,0x6f,0x6d,0x6d,0x6f,0x6e,0x75,0x73,0x65,0x31,0x11,0x6f,0x74,2, +0x63,0x2e,0x6e,0x3e,0x78,0x11,0x69,0x64,0x29,0x17,0x68,0x61,0x72,0x61,0x63,0x74, +0x65,0x72,0x21,0x12,0x66,0x6b,0x63,0x27,0x16,0x62,0x73,0x6f,0x6c,0x65,0x74,0x65, +0x2d,0x19,0x65,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x64,0x65,0x64,0x37,0x17,0x65,0x63, +0x68,0x6e,0x69,0x63,0x61,0x6c,0x2f,0x64,0x40,0x65,0x78,0x69,0x88,0x6c,0x18,0x69, +0x6d,0x69,0x74,0x65,0x64,0x75,0x73,0x65,0x33,0x10,0x65,1,0x66,0x34,0x70,0x16, +0x72,0x65,0x63,0x61,0x74,0x65,0x64,0x23,0x1c,0x61,0x75,0x6c,0x74,0x69,0x67,0x6e, +0x6f,0x72,0x61,0x62,0x6c,0x65,0x25,0x17,0x78,0x63,0x6c,0x75,0x73,0x69,0x6f,0x6e, +0x2b,0x17,0x6e,0x63,0x6c,0x75,0x73,0x69,0x6f,0x6e,0x35 }; -const char PropNameData::nameGroups[23743]={ +const char PropNameData::nameGroups[24294]={ 2,'A','l','p','h','a',0,'A','l','p','h','a','b','e','t','i','c',0, 4,'N',0,'N','o',0,'F',0,'F','a','l','s','e',0,4,'Y',0,'Y','e','s',0,'T',0,'T','r','u','e',0, 2,'N','R',0,'N','o','t','_','R','e','o','r','d','e','r','e','d',0, @@ -1203,6 +1227,7 @@ const char PropNameData::nameGroups[23743]={ 2,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','S','t','a','r','t',0,'I','D','_','C','o','m','p','a','t','_', 'M','a','t','h','_','S','t','a','r','t',0,2,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','C','o','n','t','i', 'n','u','e',0,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','C','o','n','t','i','n','u','e',0, +2,'M','C','M',0,'M','o','d','i','f','i','e','r','_','C','o','m','b','i','n','i','n','g','_','M','a','r','k',0, 2,'b','c',0,'B','i','d','i','_','C','l','a','s','s',0,2,'L',0,'L','e','f','t','_','T','o','_','R','i','g','h','t',0, 2,'R',0,'R','i','g','h','t','_','T','o','_','L','e','f','t',0, 2,'E','N',0,'E','u','r','o','p','e','a','n','_','N','u','m','b','e','r',0, @@ -1597,6 +1622,18 @@ const char PropNameData::nameGroups[23743]={ 2,'K','a','w','i',0,'K','a','w','i',0,2,'N','a','g','_','M','u','n','d','a','r','i',0, 'N','a','g','_','M','u','n','d','a','r','i',0,2,'C','J','K','_','E','x','t','_','I',0,'C','J','K','_','U','n','i','f','i', 'e','d','_','I','d','e','o','g','r','a','p','h','s','_','E','x','t','e','n','s','i','o','n','_','I',0, +2,'E','g','y','p','t','i','a','n','_','H','i','e','r','o','g','l','y','p','h','s','_','E','x','t','_','A',0, +'E','g','y','p','t','i','a','n','_','H','i','e','r','o','g','l','y','p','h','s','_','E','x','t','e','n','d','e','d','_','A',0, +2,'G','a','r','a','y',0,'G','a','r','a','y',0,2,'G','u','r','u','n','g','_','K','h','e','m','a',0, +'G','u','r','u','n','g','_','K','h','e','m','a',0,2,'K','i','r','a','t','_','R','a','i',0, +'K','i','r','a','t','_','R','a','i',0,2,'M','y','a','n','m','a','r','_','E','x','t','_','C',0, +'M','y','a','n','m','a','r','_','E','x','t','e','n','d','e','d','_','C',0, +2,'O','l','_','O','n','a','l',0,'O','l','_','O','n','a','l',0, +2,'S','u','n','u','w','a','r',0,'S','u','n','u','w','a','r',0, +2,'S','y','m','b','o','l','s','_','F','o','r','_','L','e','g','a','c','y','_','C','o','m','p','u','t','i','n','g','_','S','u', +'p',0,'S','y','m','b','o','l','s','_','F','o','r','_','L','e','g','a','c','y','_','C','o','m','p','u','t','i','n','g','_','S', +'u','p','p','l','e','m','e','n','t',0,2,'T','o','d','h','r','i',0,'T','o','d','h','r','i',0, +2,'T','u','l','u','_','T','i','g','a','l','a','r','i',0,'T','u','l','u','_','T','i','g','a','l','a','r','i',0, 2,'c','c','c',0,'C','a','n','o','n','i','c','a','l','_','C','o','m','b','i','n','i','n','g','_','C','l','a','s','s',0, 2,'d','t',0,'D','e','c','o','m','p','o','s','i','t','i','o','n','_','T','y','p','e',0, 3,'N','o','n','e',0,'N','o','n','e',0,'n','o','n','e',0, @@ -1655,8 +1692,9 @@ const char PropNameData::nameGroups[23743]={ 2,'E',0,'E',0,2,'F','e','h',0,'F','e','h',0,2,'F','i','n','a','l','_','S','e','m','k','a','t','h',0, 'F','i','n','a','l','_','S','e','m','k','a','t','h',0,2,'G','a','f',0,'G','a','f',0, 2,'G','a','m','a','l',0,'G','a','m','a','l',0,2,'H','a','h',0,'H','a','h',0, -2,'T','e','h','_','M','a','r','b','u','t','a','_','G','o','a','l',0,'H','a','m','z','a','_','O','n','_','H','e','h','_','G', -'o','a','l',0,2,'H','e',0,'H','e',0,2,'H','e','h',0,'H','e','h',0, +3,'T','e','h','_','M','a','r','b','u','t','a','_','G','o','a','l',0,'T','e','h','_','M','a','r','b','u','t','a','_','G','o', +'a','l',0,'H','a','m','z','a','_','O','n','_','H','e','h','_','G','o','a','l',0, +2,'H','e',0,'H','e',0,2,'H','e','h',0,'H','e','h',0, 2,'H','e','h','_','G','o','a','l',0,'H','e','h','_','G','o','a','l',0, 2,'H','e','t','h',0,'H','e','t','h',0,2,'K','a','f',0,'K','a','f',0, 2,'K','a','p','h',0,'K','a','p','h',0,2,'K','n','o','t','t','e','d','_','H','e','h',0, @@ -1734,6 +1772,7 @@ const char PropNameData::nameGroups[23743]={ 2,'H','a','n','i','f','i','_','R','o','h','i','n','g','y','a','_','P','a',0,'H','a','n','i','f','i','_','R','o','h','i','n', 'g','y','a','_','P','a',0,2,'T','h','i','n','_','Y','e','h',0,'T','h','i','n','_','Y','e','h',0, 2,'V','e','r','t','i','c','a','l','_','T','a','i','l',0,'V','e','r','t','i','c','a','l','_','T','a','i','l',0, +2,'K','a','s','h','m','i','r','i','_','Y','e','h',0,'K','a','s','h','m','i','r','i','_','Y','e','h',0, 2,'j','t',0,'J','o','i','n','i','n','g','_','T','y','p','e',0, 2,'U',0,'N','o','n','_','J','o','i','n','i','n','g',0,2,'C',0,'J','o','i','n','_','C','a','u','s','i','n','g',0, 2,'D',0,'D','u','a','l','_','J','o','i','n','i','n','g',0, @@ -1893,8 +1932,13 @@ const char PropNameData::nameGroups[23743]={ 2,'O','u','g','r',0,'O','l','d','_','U','y','g','h','u','r',0, 2,'T','n','s','a',0,'T','a','n','g','s','a',0,2,'V','i','t','h',0,'V','i','t','h','k','u','q','i',0, 2,'N','a','g','m',0,'N','a','g','_','M','u','n','d','a','r','i',0, -2,'A','r','a','n',0,'A','r','a','n',0,2,'h','s','t',0,'H','a','n','g','u','l','_','S','y','l','l','a','b','l','e','_', -'T','y','p','e',0,2,'N','A',0,'N','o','t','_','A','p','p','l','i','c','a','b','l','e',0, +2,'A','r','a','n',0,'A','r','a','n',0,2,'G','a','r','a',0,'G','a','r','a','y',0, +2,'G','u','k','h',0,'G','u','r','u','n','g','_','K','h','e','m','a',0, +2,'K','r','a','i',0,'K','i','r','a','t','_','R','a','i',0, +2,'O','n','a','o',0,'O','l','_','O','n','a','l',0,2,'S','u','n','u',0,'S','u','n','u','w','a','r',0, +2,'T','o','d','r',0,'T','o','d','h','r','i',0,2,'T','u','t','g',0,'T','u','l','u','_','T','i','g','a','l','a','r','i', +0,2,'h','s','t',0,'H','a','n','g','u','l','_','S','y','l','l','a','b','l','e','_','T','y','p','e',0, +2,'N','A',0,'N','o','t','_','A','p','p','l','i','c','a','b','l','e',0, 2,'L',0,'L','e','a','d','i','n','g','_','J','a','m','o',0, 2,'V',0,'V','o','w','e','l','_','J','a','m','o',0,2,'T',0,'T','r','a','i','l','i','n','g','_','J','a','m','o',0, 2,'L','V',0,'L','V','_','S','y','l','l','a','b','l','e',0, @@ -1987,16 +2031,18 @@ const char PropNameData::nameGroups[23743]={ 'V','i','s','a','r','g','a',0,2,'V','o','w','e','l',0,'V','o','w','e','l',0, 2,'V','o','w','e','l','_','D','e','p','e','n','d','e','n','t',0,'V','o','w','e','l','_','D','e','p','e','n','d','e','n','t', 0,2,'V','o','w','e','l','_','I','n','d','e','p','e','n','d','e','n','t',0,'V','o','w','e','l','_','I','n','d','e','p','e', -'n','d','e','n','t',0,2,'v','o',0,'V','e','r','t','i','c','a','l','_','O','r','i','e','n','t','a','t','i','o','n',0, +'n','d','e','n','t',0,2,'R','e','o','r','d','e','r','i','n','g','_','K','i','l','l','e','r',0, +'R','e','o','r','d','e','r','i','n','g','_','K','i','l','l','e','r',0, +2,'v','o',0,'V','e','r','t','i','c','a','l','_','O','r','i','e','n','t','a','t','i','o','n',0, 2,'R',0,'R','o','t','a','t','e','d',0,2,'T','r',0,'T','r','a','n','s','f','o','r','m','e','d','_','R','o','t','a','t', 'e','d',0,2,'T','u',0,'T','r','a','n','s','f','o','r','m','e','d','_','U','p','r','i','g','h','t',0, -2,'U',0,'U','p','r','i','g','h','t',0,2,'I','d','e','n','t','i','f','i','e','r','_','S','t','a','t','u','s',0, -'I','d','e','n','t','i','f','i','e','r','_','S','t','a','t','u','s',0, -2,'R','e','s','t','r','i','c','t','e','d',0,'R','e','s','t','r','i','c','t','e','d',0, +2,'U',0,'U','p','r','i','g','h','t',0,2,'I','D','_','S','t','a','t','u','s',0,'I','d','e','n','t','i','f','i','e','r', +'_','S','t','a','t','u','s',0,2,'R','e','s','t','r','i','c','t','e','d',0,'R','e','s','t','r','i','c','t','e','d',0, 2,'A','l','l','o','w','e','d',0,'A','l','l','o','w','e','d',0, -2,'g','c','m',0,'G','e','n','e','r','a','l','_','C','a','t','e','g','o','r','y','_','M','a','s','k',0, -2,'C',0,'O','t','h','e','r',0,2,'L',0,'L','e','t','t','e','r',0, -2,'L','C',0,'C','a','s','e','d','_','L','e','t','t','e','r',0, +2,'I','n','C','B',0,'I','n','d','i','c','_','C','o','n','j','u','n','c','t','_','B','r','e','a','k',0, +2,'L','i','n','k','e','r',0,'L','i','n','k','e','r',0,2,'g','c','m',0,'G','e','n','e','r','a','l','_','C','a','t','e', +'g','o','r','y','_','M','a','s','k',0,2,'C',0,'O','t','h','e','r',0, +2,'L',0,'L','e','t','t','e','r',0,2,'L','C',0,'C','a','s','e','d','_','L','e','t','t','e','r',0, 3,'M',0,'M','a','r','k',0,'C','o','m','b','i','n','i','n','g','_','M','a','r','k',0, 2,'N',0,'N','u','m','b','e','r',0,3,'P',0,'P','u','n','c','t','u','a','t','i','o','n',0, 'p','u','n','c','t',0,2,'S',0,'S','y','m','b','o','l',0, @@ -2014,8 +2060,8 @@ const char PropNameData::nameGroups[23743]={ 2,'u','c',0,'U','p','p','e','r','c','a','s','e','_','M','a','p','p','i','n','g',0, 2,'b','p','b',0,'B','i','d','i','_','P','a','i','r','e','d','_','B','r','a','c','k','e','t',0, 2,'s','c','x',0,'S','c','r','i','p','t','_','E','x','t','e','n','s','i','o','n','s',0, -2,'I','d','e','n','t','i','f','i','e','r','_','T','y','p','e',0,'I','d','e','n','t','i','f','i','e','r','_','T','y','p','e', -0,2,'N','o','t','_','C','h','a','r','a','c','t','e','r',0,'N','o','t','_','C','h','a','r','a','c','t','e','r',0, +2,'I','D','_','T','y','p','e',0,'I','d','e','n','t','i','f','i','e','r','_','T','y','p','e',0, +2,'N','o','t','_','C','h','a','r','a','c','t','e','r',0,'N','o','t','_','C','h','a','r','a','c','t','e','r',0, 2,'D','e','p','r','e','c','a','t','e','d',0,'D','e','p','r','e','c','a','t','e','d',0, 2,'D','e','f','a','u','l','t','_','I','g','n','o','r','a','b','l','e',0,'D','e','f','a','u','l','t','_','I','g','n','o','r', 'a','b','l','e',0,2,'N','o','t','_','N','F','K','C',0,'N','o','t','_','N','F','K','C',0, diff --git a/deps/icu-small/source/common/propsvec.cpp b/deps/icu-small/source/common/propsvec.cpp index 18cc3e8cd8e8c4..64997313f9e3ab 100644 --- a/deps/icu-small/source/common/propsvec.cpp +++ b/deps/icu-small/source/common/propsvec.cpp @@ -102,29 +102,29 @@ _findRow(UPropsVectors *pv, UChar32 rangeStart) { /* check the vicinity of the last-seen row (start searching with an unrolled loop) */ row=pv->v+prevRow*columns; - if(rangeStart>=(UChar32)row[0]) { - if(rangeStart<(UChar32)row[1]) { + if (rangeStart >= static_cast<UChar32>(row[0])) { + if (rangeStart < static_cast<UChar32>(row[1])) { /* same row as last seen */ return row; - } else if(rangeStart<(UChar32)(row+=columns)[1]) { + } else if (rangeStart < static_cast<UChar32>((row += columns)[1])) { /* next row after the last one */ pv->prevRow=prevRow+1; return row; - } else if(rangeStart<(UChar32)(row+=columns)[1]) { + } else if (rangeStart < static_cast<UChar32>((row += columns)[1])) { /* second row after the last one */ pv->prevRow=prevRow+2; return row; - } else if((rangeStart-(UChar32)row[1])<10) { + } else if ((rangeStart - static_cast<UChar32>(row[1])) < 10) { /* we are close, continue looping */ prevRow+=2; do { ++prevRow; row+=columns; - } while(rangeStart>=(UChar32)row[1]); + } while (rangeStart >= static_cast<UChar32>(row[1])); pv->prevRow=prevRow; return row; } - } else if(rangeStart<(UChar32)pv->v[1]) { + } else if (rangeStart < static_cast<UChar32>(pv->v[1])) { /* the very first row */ pv->prevRow=0; return pv->v; @@ -135,9 +135,9 @@ _findRow(UPropsVectors *pv, UChar32 rangeStart) { while(start<limit-1) { i=(start+limit)/2; row=pv->v+i*columns; - if(rangeStart<(UChar32)row[0]) { + if (rangeStart < static_cast<UChar32>(row[0])) { limit=i; - } else if(rangeStart<(UChar32)row[1]) { + } else if (rangeStart < static_cast<UChar32>(row[1])) { pv->prevRow=i; return row; } else { @@ -194,8 +194,8 @@ upvec_setValue(UPropsVectors *pv, * input range (only possible for the first and last rows) * and if their value differs from the input value. */ - splitFirstRow= (UBool)(start!=(UChar32)firstRow[0] && value!=(firstRow[column]&mask)); - splitLastRow= (UBool)(limit!=(UChar32)lastRow[1] && value!=(lastRow[column]&mask)); + splitFirstRow = start != static_cast<UChar32>(firstRow[0]) && value != (firstRow[column] & mask); + splitLastRow = limit != static_cast<UChar32>(lastRow[1]) && value != (lastRow[column] & mask); /* split first/last rows if necessary */ if(splitFirstRow || splitLastRow) { @@ -312,8 +312,8 @@ upvec_getRow(const UPropsVectors *pv, int32_t rowIndex, static int32_t U_CALLCONV upvec_compareRows(const void *context, const void *l, const void *r) { - const uint32_t *left=(const uint32_t *)l, *right=(const uint32_t *)r; - const UPropsVectors *pv=(const UPropsVectors *)context; + const uint32_t* left = static_cast<const uint32_t*>(l), *right = static_cast<const uint32_t*>(r); + const UPropsVectors* pv = static_cast<const UPropsVectors*>(context); int32_t i, count, columns; count=columns=pv->columns; /* includes start/limit columns */ diff --git a/deps/icu-small/source/common/punycode.cpp b/deps/icu-small/source/common/punycode.cpp index 7ebdebc1888a6e..aa02298c5e6d07 100644 --- a/deps/icu-small/source/common/punycode.cpp +++ b/deps/icu-small/source/common/punycode.cpp @@ -97,12 +97,12 @@ digitToBasic(int32_t digit, UBool uppercase) { /* 26..35 map to ASCII 0..9 */ if(digit<26) { if(uppercase) { - return (char)(_CAPITAL_A+digit); + return static_cast<char>(_CAPITAL_A + digit); } else { - return (char)(_SMALL_A+digit); + return static_cast<char>(_SMALL_A + digit); } } else { - return (char)((_ZERO_-26)+digit); + return static_cast<char>((_ZERO_ - 26) + digit); } } @@ -353,10 +353,10 @@ u_strToPunycode(const char16_t *src, int32_t srcLength, } if(destLength<destCapacity) { - dest[destLength]=digitToBasic(q, (UBool)(cpBuffer[j]<0)); + dest[destLength] = digitToBasic(q, cpBuffer[j] < 0); } ++destLength; - bias=adaptBias(delta, handledCPCount+1, (UBool)(handledCPCount==basicLength)); + bias = adaptBias(delta, handledCPCount + 1, handledCPCount == basicLength); delta=0; ++handledCPCount; } @@ -421,7 +421,7 @@ u_strFromPunycode(const char16_t *src, int32_t srcLength, } if(j<destCapacity) { - dest[j]=(char16_t)b; + dest[j] = b; if(caseFlags!=nullptr) { caseFlags[j]=IS_BASIC_UPPERCASE(b); @@ -500,7 +500,7 @@ u_strFromPunycode(const char16_t *src, int32_t srcLength, * where needed instead of in for() loop tail. */ ++destCPCount; - bias=adaptBias(i-oldi, destCPCount, (UBool)(oldi==0)); + bias = adaptBias(i - oldi, destCPCount, oldi == 0); /* * i was supposed to wrap around from (incremented) destCPCount to 0, diff --git a/deps/icu-small/source/common/putil.cpp b/deps/icu-small/source/common/putil.cpp index 92c7940827a9d2..4cf07797ba350e 100644 --- a/deps/icu-small/source/common/putil.cpp +++ b/deps/icu-small/source/common/putil.cpp @@ -46,11 +46,6 @@ // First, the platform type. Need this for U_PLATFORM. #include "unicode/platform.h" -#if U_PLATFORM == U_PF_MINGW && defined __STRICT_ANSI__ -/* tzset isn't defined in strict ANSI on MinGW. */ -#undef __STRICT_ANSI__ -#endif - /* * Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement. */ @@ -180,8 +175,8 @@ typedef union { int64_t i64; /* This must be defined first in order to allow the initialization to work. This is a C89 feature. */ double d64; } BitPatternConversion; -static const BitPatternConversion gNan = { (int64_t) INT64_C(0x7FF8000000000000) }; -static const BitPatternConversion gInf = { (int64_t) INT64_C(0x7FF0000000000000) }; +static const BitPatternConversion gNan = {static_cast<int64_t>(INT64_C(0x7FF8000000000000))}; +static const BitPatternConversion gInf = {static_cast<int64_t>(INT64_C(0x7FF0000000000000))}; /*--------------------------------------------------------------------------- Platform utilities @@ -230,7 +225,7 @@ u_signBit(double d) { #if U_IS_BIG_ENDIAN hiByte = *(uint8_t *)&d; #else - hiByte = *(((uint8_t *)&d) + sizeof(double) - 1); + hiByte = *(reinterpret_cast<uint8_t*>(&d) + sizeof(double) - 1); #endif return (hiByte & 0x80) != 0; } @@ -347,7 +342,7 @@ uprv_isNaN(double number) BitPatternConversion convertedNumber; convertedNumber.d64 = number; /* Infinity is 0x7FF0000000000000U. Anything greater than that is a NaN */ - return (UBool)((convertedNumber.i64 & U_INT64_MAX) > gInf.i64); + return (convertedNumber.i64 & U_INT64_MAX) > gInf.i64; #elif U_PLATFORM == U_PF_OS390 uint32_t highBits = *(uint32_t*)u_topNBytesOfDouble(&number, @@ -373,7 +368,7 @@ uprv_isInfinite(double number) BitPatternConversion convertedNumber; convertedNumber.d64 = number; /* Infinity is exactly 0x7FF0000000000000U. */ - return (UBool)((convertedNumber.i64 & U_INT64_MAX) == gInf.i64); + return (convertedNumber.i64 & U_INT64_MAX) == gInf.i64; #elif U_PLATFORM == U_PF_OS390 uint32_t highBits = *(uint32_t*)u_topNBytesOfDouble(&number, sizeof(uint32_t)); @@ -394,7 +389,7 @@ U_CAPI UBool U_EXPORT2 uprv_isPositiveInfinity(double number) { #if IEEE_754 || U_PLATFORM == U_PF_OS390 - return (UBool)(number > 0 && uprv_isInfinite(number)); + return number > 0 && uprv_isInfinite(number); #else return uprv_isInfinite(number); #endif @@ -404,7 +399,7 @@ U_CAPI UBool U_EXPORT2 uprv_isNegativeInfinity(double number) { #if IEEE_754 || U_PLATFORM == U_PF_OS390 - return (UBool)(number < 0 && uprv_isInfinite(number)); + return number < 0 && uprv_isInfinite(number); #else uint32_t highBits = *(uint32_t*)u_topNBytesOfDouble(&number, @@ -749,11 +744,11 @@ static UBool isValidOlsonID(const char *id) { The timezone is sometimes set to "CST-7CDT", "CST6CDT5,J129,J131/19:30", "GRNLNDST3GRNLNDDT" or similar, so we cannot use it. The rest of the time it could be an Olson ID. George */ - return (UBool)(id[idx] == 0 + return id[idx] == 0 || uprv_strcmp(id, "PST8PDT") == 0 || uprv_strcmp(id, "MST7MDT") == 0 || uprv_strcmp(id, "CST6CDT") == 0 - || uprv_strcmp(id, "EST5EDT") == 0); + || uprv_strcmp(id, "EST5EDT") == 0; } /* On some Unix-like OS, 'posix' subdirectory in @@ -932,7 +927,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil */ if (tzInfo->defaultTZBuffer == nullptr) { rewind(tzInfo->defaultTZFilePtr); - tzInfo->defaultTZBuffer = (char*)uprv_malloc(sizeof(char) * tzInfo->defaultTZFileSize); + tzInfo->defaultTZBuffer = static_cast<char*>(uprv_malloc(sizeof(char) * tzInfo->defaultTZFileSize)); sizeFileRead = fread(tzInfo->defaultTZBuffer, 1, tzInfo->defaultTZFileSize, tzInfo->defaultTZFilePtr); } rewind(file); diff --git a/deps/icu-small/source/common/putilimp.h b/deps/icu-small/source/common/putilimp.h index 5b95a68418c428..8a8ff5008118df 100644 --- a/deps/icu-small/source/common/putilimp.h +++ b/deps/icu-small/source/common/putilimp.h @@ -90,6 +90,8 @@ typedef size_t uintptr_t; # define U_NL_LANGINFO_CODESET -1 #elif U_PLATFORM == U_PF_OS400 /* not defined */ +#elif U_PLATFORM == U_PF_HAIKU + /* not defined */ #else # define U_NL_LANGINFO_CODESET CODESET #endif @@ -103,6 +105,8 @@ typedef size_t uintptr_t; #endif #elif U_PLATFORM == U_PF_OS400 /* not defined */ +#elif U_PLATFORM == U_PF_HAIKU + /* not defined */ #else # define U_TZSET tzset #endif @@ -141,6 +145,8 @@ typedef size_t uintptr_t; #endif #elif U_PLATFORM == U_PF_OS400 /* not defined */ +#elif U_PLATFORM == U_PF_HAIKU + /* not defined, (well it is but a loop back to icu) */ #else # define U_TZNAME tzname #endif @@ -553,7 +559,7 @@ inline int32_t pinCapacity(T *dest, int32_t capacity) { if (maxInt < destInt) { // Less than 2GB to the end of the address space. // Pin to that to prevent address overflow. - maxInt = (uintptr_t)-1; + maxInt = static_cast<uintptr_t>(-1); } # endif diff --git a/deps/icu-small/source/common/rbbi.cpp b/deps/icu-small/source/common/rbbi.cpp index 9c4141022c35dc..069af21537113c 100644 --- a/deps/icu-small/source/common/rbbi.cpp +++ b/deps/icu-small/source/common/rbbi.cpp @@ -110,7 +110,7 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(const uint8_t *compiledRules, status = U_ILLEGAL_ARGUMENT_ERROR; return; } - const RBBIDataHeader *data = (const RBBIDataHeader *)compiledRules; + const RBBIDataHeader* data = reinterpret_cast<const RBBIDataHeader*>(compiledRules); if (data->fLength > ruleLength) { status = U_ILLEGAL_ARGUMENT_ERROR; return; @@ -553,7 +553,7 @@ int32_t RuleBasedBreakIterator::first() { * @return The text's past-the-end offset. */ int32_t RuleBasedBreakIterator::last() { - int32_t endPos = (int32_t)utext_nativeLength(&fText); + int32_t endPos = static_cast<int32_t>(utext_nativeLength(&fText)); UBool endShouldBeBoundary = isBoundary(endPos); // Has side effect of setting iterator position. (void)endShouldBeBoundary; U_ASSERT(endShouldBeBoundary); @@ -625,7 +625,7 @@ int32_t RuleBasedBreakIterator::following(int32_t startPos) { // Move requested offset to a code point start. It might be on a trail surrogate, // or on a trail byte if the input is UTF-8. Or it may be beyond the end of the text. utext_setNativeIndex(&fText, startPos); - startPos = (int32_t)utext_getNativeIndex(&fText); + startPos = static_cast<int32_t>(utext_getNativeIndex(&fText)); UErrorCode status = U_ZERO_ERROR; fBreakCache->following(startPos, status); @@ -881,7 +881,7 @@ int32_t RuleBasedBreakIterator::handleNext() { if (accepting == ACCEPTING_UNCONDITIONAL) { // Match found, common case. if (mode != RBBI_START) { - result = (int32_t)UTEXT_GETNATIVEINDEX(&fText); + result = static_cast<int32_t>(UTEXT_GETNATIVEINDEX(&fText)); } fRuleStatusIndex = row->fTagsIdx; // Remember the break status (tag) values. } else if (accepting > ACCEPTING_UNCONDITIONAL) { @@ -905,7 +905,7 @@ int32_t RuleBasedBreakIterator::handleNext() { U_ASSERT(rule == 0 || rule > ACCEPTING_UNCONDITIONAL); U_ASSERT(rule == 0 || rule < fData->fForwardTable->fLookAheadResultsSize); if (rule > ACCEPTING_UNCONDITIONAL) { - int32_t pos = (int32_t)UTEXT_GETNATIVEINDEX(&fText); + int32_t pos = static_cast<int32_t>(UTEXT_GETNATIVEINDEX(&fText)); fLookAheadMatches[rule] = pos; } @@ -937,7 +937,7 @@ int32_t RuleBasedBreakIterator::handleNext() { if (result == initialPosition) { utext_setNativeIndex(&fText, initialPosition); utext_next32(&fText); - result = (int32_t)utext_getNativeIndex(&fText); + result = static_cast<int32_t>(utext_getNativeIndex(&fText)); fRuleStatusIndex = 0; } @@ -1027,7 +1027,7 @@ int32_t RuleBasedBreakIterator::handleSafePrevious(int32_t fromPosition) { } // The state machine is done. Check whether it found a match... - result = (int32_t)UTEXT_GETNATIVEINDEX(&fText); + result = static_cast<int32_t>(UTEXT_GETNATIVEINDEX(&fText)); #ifdef RBBI_DEBUG if (gTrace) { RBBIDebugPrintf("result = %d\n\n", result); @@ -1091,7 +1091,7 @@ const uint8_t *RuleBasedBreakIterator::getBinaryRules(uint32_t &length) { length = 0; if (fData != nullptr) { - retPtr = (const uint8_t *)fData->fHeader; + retPtr = reinterpret_cast<const uint8_t*>(fData->fHeader); length = fData->fHeader->fLength; } return retPtr; @@ -1187,7 +1187,7 @@ getLanguageBreakEngineFromFactory(UChar32 c, const char* locale) int32_t i = gLanguageBreakFactories->size(); const LanguageBreakEngine *lbe = nullptr; while (--i >= 0) { - LanguageBreakFactory *factory = (LanguageBreakFactory *)(gLanguageBreakFactories->elementAt(i)); + LanguageBreakFactory* factory = static_cast<LanguageBreakFactory*>(gLanguageBreakFactories->elementAt(i)); lbe = factory->getEngineFor(c, locale); if (lbe != nullptr) { break; @@ -1219,7 +1219,7 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c, const char* locale) { int32_t i = fLanguageBreakEngines->size(); while (--i >= 0) { - lbe = (const LanguageBreakEngine *)(fLanguageBreakEngines->elementAt(i)); + lbe = static_cast<const LanguageBreakEngine*>(fLanguageBreakEngines->elementAt(i)); if (lbe->handles(c, locale)) { return lbe; } diff --git a/deps/icu-small/source/common/rbbi_cache.cpp b/deps/icu-small/source/common/rbbi_cache.cpp index 239345998bc4d0..3ef030cb919588 100644 --- a/deps/icu-small/source/common/rbbi_cache.cpp +++ b/deps/icu-small/source/common/rbbi_cache.cpp @@ -146,7 +146,7 @@ void RuleBasedBreakIterator::DictionaryCache::populateDictionary(int32_t startPo uint32_t dictStart = fBI->fData->fForwardTable->fDictCategoriesStart; while(U_SUCCESS(status)) { - while((current = (int32_t)UTEXT_GETNATIVEINDEX(text)) < rangeEnd + while ((current = static_cast<int32_t>(UTEXT_GETNATIVEINDEX(text))) < rangeEnd && (category < dictStart)) { utext_next32(text); // TODO: cleaner loop structure. c = utext_current32(text); @@ -221,7 +221,7 @@ void RuleBasedBreakIterator::BreakCache::reset(int32_t pos, int32_t ruleStatus) fTextIdx = pos; fBufIdx = 0; fBoundaries[0] = pos; - fStatuses[0] = (uint16_t)ruleStatus; + fStatuses[0] = static_cast<uint16_t>(ruleStatus); } diff --git a/deps/icu-small/source/common/rbbidata.cpp b/deps/icu-small/source/common/rbbidata.cpp index 49603b619345c6..edfa1bf0d85e93 100644 --- a/deps/icu-small/source/common/rbbidata.cpp +++ b/deps/icu-small/source/common/rbbidata.cpp @@ -104,10 +104,10 @@ void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) { fDontFreeData = false; if (data->fFTableLen != 0) { - fForwardTable = (RBBIStateTable *)((char *)data + fHeader->fFTable); + fForwardTable = reinterpret_cast<const RBBIStateTable*>(reinterpret_cast<const char*>(data) + fHeader->fFTable); } if (data->fRTableLen != 0) { - fReverseTable = (RBBIStateTable *)((char *)data + fHeader->fRTable); + fReverseTable = reinterpret_cast<const RBBIStateTable*>(reinterpret_cast<const char*>(data) + fHeader->fRTable); } fTrie = ucptrie_openFromBinary(UCPTRIE_TYPE_FAST, @@ -130,7 +130,7 @@ void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) { fRuleString = UnicodeString::fromUTF8(StringPiece(fRuleSource, fHeader->fRuleSourceLen)); U_ASSERT(data->fRuleSourceLen > 0); - fRuleStatusTable = (int32_t *)((char *)data + fHeader->fStatusTable); + fRuleStatusTable = reinterpret_cast<const int32_t*>(reinterpret_cast<const char*>(data) + fHeader->fStatusTable); fStatusMaxIdx = data->fStatusTableLen / sizeof(int32_t); fRefCount = 1; diff --git a/deps/icu-small/source/common/rbbirb.cpp b/deps/icu-small/source/common/rbbirb.cpp index 1b2ee67187b59f..4fd789970cc0b9 100644 --- a/deps/icu-small/source/common/rbbirb.cpp +++ b/deps/icu-small/source/common/rbbirb.cpp @@ -103,7 +103,7 @@ RBBIRuleBuilder::~RBBIRuleBuilder() { int i; for (i=0; ; i++) { - RBBINode *n = (RBBINode *)fUSetNodes->elementAt(i); + RBBINode* n = static_cast<RBBINode*>(fUSetNodes->elementAt(i)); if (n==nullptr) { break; } @@ -182,12 +182,12 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() { } #endif - RBBIDataHeader *data = (RBBIDataHeader *)uprv_malloc(totalSize); - if (data == nullptr) { + LocalMemory<RBBIDataHeader> data(static_cast<RBBIDataHeader*>(uprv_malloc(totalSize))); + if (data.isNull()) { *fStatus = U_MEMORY_ALLOCATION_ERROR; return nullptr; } - uprv_memset(data, 0, totalSize); + uprv_memset(data.getAlias(), 0, totalSize); data->fMagic = 0xb1a0; @@ -213,23 +213,23 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() { uprv_memset(data->fReserved, 0, sizeof(data->fReserved)); - fForwardTable->exportTable((uint8_t *)data + data->fFTable); - fForwardTable->exportSafeTable((uint8_t *)data + data->fRTable); - fSetBuilder->serializeTrie ((uint8_t *)data + data->fTrie); + fForwardTable->exportTable(reinterpret_cast<uint8_t*>(data.getAlias()) + data->fFTable); + fForwardTable->exportSafeTable(reinterpret_cast<uint8_t*>(data.getAlias()) + data->fRTable); + fSetBuilder->serializeTrie(reinterpret_cast<uint8_t*>(data.getAlias()) + data->fTrie); - int32_t *ruleStatusTable = (int32_t *)((uint8_t *)data + data->fStatusTable); + int32_t* ruleStatusTable = reinterpret_cast<int32_t*>(reinterpret_cast<uint8_t*>(data.getAlias()) + data->fStatusTable); for (i=0; i<fRuleStatusVals->size(); i++) { ruleStatusTable[i] = fRuleStatusVals->elementAti(i); } - u_strToUTF8WithSub((char *)data+data->fRuleSource, rulesSize, &rulesLengthInUTF8, + u_strToUTF8WithSub(reinterpret_cast<char*>(data.getAlias()) + data->fRuleSource, rulesSize, &rulesLengthInUTF8, fStrippedRules.getBuffer(), fStrippedRules.length(), 0xfffd, nullptr, fStatus); if (U_FAILURE(*fStatus)) { return nullptr; } - return data; + return data.orphan(); } diff --git a/deps/icu-small/source/common/rbbiscan.cpp b/deps/icu-small/source/common/rbbiscan.cpp index f5fdba076f02a2..cf2d63cd807b0f 100644 --- a/deps/icu-small/source/common/rbbiscan.cpp +++ b/deps/icu-small/source/common/rbbiscan.cpp @@ -748,7 +748,7 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode // First check whether we've already cached a set for this string. // If so, just use the cached set in the new node. // delete any set provided by the caller, since we own it. - el = (RBBISetTableEl *)uhash_get(fSetTable, &s); + el = static_cast<RBBISetTableEl*>(uhash_get(fSetTable, &s)); if (el != nullptr) { delete setToAdopt; node->fLeftChild = el->val; @@ -794,7 +794,7 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode // // Add the new set to the set hash table. // - el = (RBBISetTableEl *)uprv_malloc(sizeof(RBBISetTableEl)); + el = static_cast<RBBISetTableEl*>(uprv_malloc(sizeof(RBBISetTableEl))); UnicodeString *tkey = new UnicodeString(s); if (tkey == nullptr || el == nullptr || setToAdopt == nullptr) { // Delete to avoid memory leak @@ -864,7 +864,7 @@ UChar32 RBBIRuleScanner::nextCharLL() { UChar32 ch; if (fNextIndex >= fRB->fRules.length()) { - return (UChar32)-1; + return static_cast<UChar32>(-1); } ch = fRB->fRules.char32At(fNextIndex); if (U_IS_SURROGATE(ch)) { @@ -939,7 +939,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { } } - if (c.fChar == (UChar32)-1) { + if (c.fChar == static_cast<UChar32>(-1)) { return; } if (fQuoteMode) { @@ -958,7 +958,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { int32_t commentStart = fScanIndex; for (;;) { c.fChar = nextCharLL(); - if (c.fChar == (UChar32)-1 || // EOF + if (c.fChar == static_cast<UChar32>(-1) || // EOF c.fChar == chCR || c.fChar == chLF || c.fChar == chNEL || @@ -968,7 +968,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { fRB->fStrippedRules.setCharAt(i, u' '); } } - if (c.fChar == (UChar32)-1) { + if (c.fChar == static_cast<UChar32>(-1)) { return; } @@ -1065,14 +1065,14 @@ void RBBIRuleScanner::parse() { // Table row specified "escaped P" and the char is either 'p' or 'P'. break; } - if (tableEl->fCharClass == 252 && fC.fChar == (UChar32)-1) { + if (tableEl->fCharClass == 252 && fC.fChar == static_cast<UChar32>(-1)) { // Table row specified eof and we hit eof on the input. break; } if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class && fC.fEscaped == false && // char is not escaped && - fC.fChar != (UChar32)-1) { // char is not EOF + fC.fChar != static_cast<UChar32>(-1)) { // char is not EOF U_ASSERT((tableEl->fCharClass-128) < UPRV_LENGTHOF(fRuleSets)); if (fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) { // Table row specified a character class, or set of characters, @@ -1090,7 +1090,7 @@ void RBBIRuleScanner::parse() { // We've found the row of the state table that matches the current input // character from the rules string. // Perform any action specified by this row in the state table. - if (doParseActions((int32_t)tableEl->fAction) == false) { + if (doParseActions(static_cast<int32_t>(tableEl->fAction)) == false) { // Break out of the state machine loop if the // the action signalled some kind of error, or // the action was to exit, occurs on normal end-of-rules-input. diff --git a/deps/icu-small/source/common/rbbisetb.cpp b/deps/icu-small/source/common/rbbisetb.cpp index e6c72954bc3bb4..6c22cf470f8b2f 100644 --- a/deps/icu-small/source/common/rbbisetb.cpp +++ b/deps/icu-small/source/common/rbbisetb.cpp @@ -120,7 +120,7 @@ void RBBISetBuilder::buildRanges() { // int ni; for (ni=0; ; ni++) { // Loop over each of the UnicodeSets encountered in the input rules - usetNode = (RBBINode *)this->fRB->fUSetNodes->elementAt(ni); + usetNode = static_cast<RBBINode*>(this->fRB->fUSetNodes->elementAt(ni)); if (usetNode==nullptr) { break; } @@ -251,7 +251,7 @@ void RBBISetBuilder::buildRanges() { UnicodeString eofString(u"eof"); UnicodeString bofString(u"bof"); for (ni=0; ; ni++) { // Loop over each of the UnicodeSets encountered in the input rules - usetNode = (RBBINode *)this->fRB->fUSetNodes->elementAt(ni); + usetNode = static_cast<RBBINode*>(this->fRB->fUSetNodes->elementAt(ni)); if (usetNode==nullptr) { break; } @@ -369,7 +369,7 @@ void RBBISetBuilder::addValToSets(UVector *sets, uint32_t val) { int32_t ix; for (ix=0; ix<sets->size(); ix++) { - RBBINode *usetNode = (RBBINode *)sets->elementAt(ix); + RBBINode* usetNode = static_cast<RBBINode*>(sets->elementAt(ix)); addValToSet(usetNode, val); } } @@ -380,7 +380,7 @@ void RBBISetBuilder::addValToSet(RBBINode *usetNode, uint32_t val) { *fStatus = U_MEMORY_ALLOCATION_ERROR; return; } - leafNode->fVal = (unsigned short)val; + leafNode->fVal = static_cast<unsigned short>(val); if (usetNode->fLeftChild == nullptr) { usetNode->fLeftChild = leafNode; leafNode->fParent = usetNode; @@ -441,7 +441,7 @@ UBool RBBISetBuilder::sawBOF() const { //------------------------------------------------------------------------ UChar32 RBBISetBuilder::getFirstChar(int32_t category) const { RangeDescriptor *rlRange; - UChar32 retVal = (UChar32)-1; + UChar32 retVal = static_cast<UChar32>(-1); for (rlRange = fRangeList; rlRange!=nullptr; rlRange=rlRange->fNext) { if (rlRange->fNum == category) { retVal = rlRange->fStartChar; @@ -674,7 +674,7 @@ void RangeDescriptor::split(UChar32 where, UErrorCode &status) { bool RangeDescriptor::isDictionaryRange() { static const char16_t *dictionary = u"dictionary"; for (int32_t i=0; i<fIncludesSets->size(); i++) { - RBBINode *usetNode = (RBBINode *)fIncludesSets->elementAt(i); + RBBINode* usetNode = static_cast<RBBINode*>(fIncludesSets->elementAt(i)); RBBINode *setRef = usetNode->fParent; if (setRef != nullptr) { RBBINode *varRef = setRef->fParent; diff --git a/deps/icu-small/source/common/rbbistbl.cpp b/deps/icu-small/source/common/rbbistbl.cpp index bfaacf64254fdd..27f31a9d552c42 100644 --- a/deps/icu-small/source/common/rbbistbl.cpp +++ b/deps/icu-small/source/common/rbbistbl.cpp @@ -41,7 +41,7 @@ U_CDECL_END U_NAMESPACE_BEGIN RBBISymbolTable::RBBISymbolTable(RBBIRuleScanner *rs, const UnicodeString &rules, UErrorCode &status) - :fRules(rules), fRuleScanner(rs), ffffString(char16_t(0xffff)) + : fRules(rules), fRuleScanner(rs), ffffString(static_cast<char16_t>(0xffff)) { fHashTable = nullptr; fCachedSetLookup = nullptr; @@ -76,9 +76,9 @@ const UnicodeString *RBBISymbolTable::lookup(const UnicodeString& s) const RBBINode *exprNode; RBBINode *usetNode; const UnicodeString *retString; - RBBISymbolTable *This = (RBBISymbolTable *)this; // cast off const + RBBISymbolTable *This = const_cast<RBBISymbolTable*>(this); // cast off const - el = (RBBISymbolTableEntry *)uhash_get(fHashTable, &s); + el = static_cast<RBBISymbolTableEntry*>(uhash_get(fHashTable, &s)); if (el == nullptr) { return nullptr; } @@ -119,7 +119,7 @@ const UnicodeString *RBBISymbolTable::lookup(const UnicodeString& s) const const UnicodeFunctor *RBBISymbolTable::lookupMatcher(UChar32 ch) const { UnicodeSet *retVal = nullptr; - RBBISymbolTable *This = (RBBISymbolTable *)this; // cast off const + RBBISymbolTable *This = const_cast<RBBISymbolTable*>(this); // cast off const if (ch == 0xffff) { retVal = fCachedSetLookup; This->fCachedSetLookup = nullptr; @@ -170,7 +170,7 @@ RBBINode *RBBISymbolTable::lookupNode(const UnicodeString &key) const{ RBBINode *retNode = nullptr; RBBISymbolTableEntry *el; - el = (RBBISymbolTableEntry *)uhash_get(fHashTable, &key); + el = static_cast<RBBISymbolTableEntry*>(uhash_get(fHashTable, &key)); if (el != nullptr) { retNode = el->val; } @@ -190,7 +190,7 @@ void RBBISymbolTable::addEntry (const UnicodeString &key, RBBINode * if (U_FAILURE(err)) { return; } - e = (RBBISymbolTableEntry *)uhash_get(fHashTable, &key); + e = static_cast<RBBISymbolTableEntry*>(uhash_get(fHashTable, &key)); if (e != nullptr) { err = U_BRK_VARIABLE_REDFINITION; return; diff --git a/deps/icu-small/source/common/rbbitblb.cpp b/deps/icu-small/source/common/rbbitblb.cpp index 96a0b0338ded2b..4d95137601efb1 100644 --- a/deps/icu-small/source/common/rbbitblb.cpp +++ b/deps/icu-small/source/common/rbbitblb.cpp @@ -51,7 +51,7 @@ RBBITableBuilder::RBBITableBuilder(RBBIRuleBuilder *rb, RBBINode **rootNode, UEr RBBITableBuilder::~RBBITableBuilder() { int i; for (i=0; i<fDStates->size(); i++) { - delete (RBBIStateDescriptor *)fDStates->elementAt(i); + delete static_cast<RBBIStateDescriptor*>(fDStates->elementAt(i)); } delete fDStates; delete fSafeTable; @@ -361,8 +361,8 @@ void RBBITableBuilder::calcFollowPos(RBBINode *n) { UVector *LastPosOfLeftChild = n->fLeftChild->fLastPosSet; - for (ix=0; ix<(uint32_t)LastPosOfLeftChild->size(); ix++) { - i = (RBBINode *)LastPosOfLeftChild->elementAt(ix); + for (ix = 0; ix < static_cast<uint32_t>(LastPosOfLeftChild->size()); ix++) { + i = static_cast<RBBINode*>(LastPosOfLeftChild->elementAt(ix)); setAdd(i->fFollowPos, n->fRightChild->fFirstPosSet); } } @@ -373,8 +373,8 @@ void RBBITableBuilder::calcFollowPos(RBBINode *n) { RBBINode *i; // again, n and i are the names from Aho's description. uint32_t ix; - for (ix=0; ix<(uint32_t)n->fLastPosSet->size(); ix++) { - i = (RBBINode *)n->fLastPosSet->elementAt(ix); + for (ix = 0; ix < static_cast<uint32_t>(n->fLastPosSet->size()); ix++) { + i = static_cast<RBBINode*>(n->fLastPosSet->elementAt(ix)); setAdd(i->fFollowPos, n->fFirstPosSet); } } @@ -445,7 +445,7 @@ void RBBITableBuilder::calcChainedFollowPos(RBBINode *tree, RBBINode *endMarkNod int32_t startNodeIx; for (endNodeIx=0; endNodeIx<leafNodes.size(); endNodeIx++) { - RBBINode *endNode = (RBBINode *)leafNodes.elementAt(endNodeIx); + RBBINode* endNode = static_cast<RBBINode*>(leafNodes.elementAt(endNodeIx)); // Identify leaf nodes that correspond to overall rule match positions. // These include the endMarkNode in their followPos sets. @@ -465,7 +465,7 @@ void RBBITableBuilder::calcChainedFollowPos(RBBINode *tree, RBBINode *endMarkNod // with the same char class as our ending node. RBBINode *startNode; for (startNodeIx = 0; startNodeIx<matchStartNodes.size(); startNodeIx++) { - startNode = (RBBINode *)matchStartNodes.elementAt(startNodeIx); + startNode = static_cast<RBBINode*>(matchStartNodes.elementAt(startNodeIx)); if (startNode->fType != RBBINode::leafChar) { continue; } @@ -525,7 +525,7 @@ void RBBITableBuilder::bofFixup() { RBBINode *startNode; int startNodeIx; for (startNodeIx = 0; startNodeIx<matchStartNodes->size(); startNodeIx++) { - startNode = (RBBINode *)matchStartNodes->elementAt(startNodeIx); + startNode = static_cast<RBBINode*>(matchStartNodes->elementAt(startNodeIx)); if (startNode->fType != RBBINode::leafChar) { continue; } @@ -605,7 +605,7 @@ void RBBITableBuilder::buildStateTable() { int32_t tx; for (tx=1; tx<fDStates->size(); tx++) { RBBIStateDescriptor *temp; - temp = (RBBIStateDescriptor *)fDStates->elementAt(tx); + temp = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(tx)); if (temp->fMarked == false) { T = temp; break; @@ -628,7 +628,7 @@ void RBBITableBuilder::buildStateTable() { RBBINode *p; int32_t px; for (px=0; px<T->fPositions->size(); px++) { - p = (RBBINode *)T->fPositions->elementAt(px); + p = static_cast<RBBINode*>(T->fPositions->elementAt(px)); if ((p->fType == RBBINode::leafChar) && (p->fVal == a)) { if (U == nullptr) { U = new UVector(*fStatus); @@ -649,7 +649,7 @@ void RBBITableBuilder::buildStateTable() { int ix; for (ix=0; ix<fDStates->size(); ix++) { RBBIStateDescriptor *temp2; - temp2 = (RBBIStateDescriptor *)fDStates->elementAt(ix); + temp2 = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(ix)); if (setEquals(U, temp2->fPositions)) { delete U; U = temp2->fPositions; @@ -705,7 +705,7 @@ void RBBITableBuilder::mapLookAheadRules() { fLookAheadRuleMap->setSize(fRB->fScanner->numRules() + 1); for (int32_t n=0; n<fDStates->size(); n++) { - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(n); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(n)); int32_t laSlotForState = 0; // Establish the look-ahead slot for this state, if the state covers @@ -789,9 +789,9 @@ void RBBITableBuilder::flagAcceptingStates() { } for (i=0; i<endMarkerNodes.size(); i++) { - endMarker = (RBBINode *)endMarkerNodes.elementAt(i); + endMarker = static_cast<RBBINode*>(endMarkerNodes.elementAt(i)); for (n=0; n<fDStates->size(); n++) { - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(n); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(n)); if (sd->fPositions->indexOf(endMarker) >= 0) { // Any non-zero value for fAccepting means this is an accepting node. // The value is what will be returned to the user as the break status. @@ -837,11 +837,11 @@ void RBBITableBuilder::flagLookAheadStates() { return; } for (i=0; i<lookAheadNodes.size(); i++) { - lookAheadNode = (RBBINode *)lookAheadNodes.elementAt(i); + lookAheadNode = static_cast<RBBINode*>(lookAheadNodes.elementAt(i)); U_ASSERT(lookAheadNode->fType == RBBINode::NodeType::lookAhead); for (n=0; n<fDStates->size(); n++) { - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(n); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(n)); int32_t positionsIdx = sd->fPositions->indexOf(lookAheadNode); if (positionsIdx >= 0) { U_ASSERT(lookAheadNode == sd->fPositions->elementAt(positionsIdx)); @@ -882,10 +882,10 @@ void RBBITableBuilder::flagTaggedStates() { return; } for (i=0; i<tagNodes.size(); i++) { // For each tag node t (all of 'em) - tagNode = (RBBINode *)tagNodes.elementAt(i); + tagNode = static_cast<RBBINode*>(tagNodes.elementAt(i)); for (n=0; n<fDStates->size(); n++) { // For each state s (row in the state table) - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(n); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(n)); if (sd->fPositions->indexOf(tagNode) >= 0) { // if s include the tag node t sortedAdd(&sd->fTagVals, tagNode->fVal); } @@ -923,12 +923,12 @@ void RBBITableBuilder::mergeRuleStatusVals() { // We will need this as a default, for rule sets with no explicit tagging. if (fRB->fRuleStatusVals->size() == 0) { fRB->fRuleStatusVals->addElement(1, *fStatus); // Num of statuses in group - fRB->fRuleStatusVals->addElement((int32_t)0, *fStatus); // and our single status of zero + fRB->fRuleStatusVals->addElement(static_cast<int32_t>(0), *fStatus); // and our single status of zero } // For each state for (n=0; n<fDStates->size(); n++) { - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(n); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(n)); UVector *thisStatesTagValues = sd->fTagVals; if (thisStatesTagValues == nullptr) { // No tag values are explicitly associated with this state. @@ -1154,9 +1154,9 @@ bool RBBITableBuilder::findDuplCharClassFrom(IntPair *categories) { uint16_t table_base = 0; uint16_t table_dupl = 1; for (int32_t state=0; state<numStates; state++) { - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(state); - table_base = (uint16_t)sd->fDtran->elementAti(categories->first); - table_dupl = (uint16_t)sd->fDtran->elementAti(categories->second); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(state)); + table_base = static_cast<uint16_t>(sd->fDtran->elementAti(categories->first)); + table_dupl = static_cast<uint16_t>(sd->fDtran->elementAti(categories->second)); if (table_base != table_dupl) { break; } @@ -1176,7 +1176,7 @@ bool RBBITableBuilder::findDuplCharClassFrom(IntPair *categories) { void RBBITableBuilder::removeColumn(int32_t column) { int32_t numStates = fDStates->size(); for (int32_t state=0; state<numStates; state++) { - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(state); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(state)); U_ASSERT(column < sd->fDtran->size()); sd->fDtran->removeElementAt(column); } @@ -1190,9 +1190,9 @@ bool RBBITableBuilder::findDuplicateState(IntPair *states) { int32_t numCols = fRB->fSetBuilder->getNumCharCategories(); for (; states->first<numStates-1; states->first++) { - RBBIStateDescriptor *firstSD = (RBBIStateDescriptor *)fDStates->elementAt(states->first); + RBBIStateDescriptor* firstSD = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(states->first)); for (states->second=states->first+1; states->second<numStates; states->second++) { - RBBIStateDescriptor *duplSD = (RBBIStateDescriptor *)fDStates->elementAt(states->second); + RBBIStateDescriptor* duplSD = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(states->second)); if (firstSD->fAccepting != duplSD->fAccepting || firstSD->fLookAhead != duplSD->fLookAhead || firstSD->fTagsIdx != duplSD->fTagsIdx) { @@ -1252,14 +1252,14 @@ void RBBITableBuilder::removeState(IntPair duplStates) { U_ASSERT(keepState < duplState); U_ASSERT(duplState < fDStates->size()); - RBBIStateDescriptor *duplSD = (RBBIStateDescriptor *)fDStates->elementAt(duplState); + RBBIStateDescriptor* duplSD = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(duplState)); fDStates->removeElementAt(duplState); delete duplSD; int32_t numStates = fDStates->size(); int32_t numCols = fRB->fSetBuilder->getNumCharCategories(); for (int32_t state=0; state<numStates; ++state) { - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(state); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(state)); for (int32_t col=0; col<numCols; col++) { int32_t existingVal = sd->fDtran->elementAti(col); int32_t newVal = existingVal; @@ -1283,7 +1283,7 @@ void RBBITableBuilder::removeSafeState(IntPair duplStates) { // and will auto-delete the removed element. int32_t numStates = fSafeTable->size(); for (int32_t state=0; state<numStates; ++state) { - UnicodeString *sd = (UnicodeString *)fSafeTable->elementAt(state); + UnicodeString* sd = static_cast<UnicodeString*>(fSafeTable->elementAt(state)); int32_t numCols = sd->length(); for (int32_t col=0; col<numCols; col++) { int32_t existingVal = sd->charAt(col); @@ -1357,7 +1357,7 @@ bool RBBITableBuilder::use8BitsForTable() const { // //----------------------------------------------------------------------------- void RBBITableBuilder::exportTable(void *where) { - RBBIStateTable *table = (RBBIStateTable *)where; + RBBIStateTable* table = static_cast<RBBIStateTable*>(where); uint32_t state; int col; @@ -1390,13 +1390,13 @@ void RBBITableBuilder::exportTable(void *where) { } for (state=0; state<table->fNumStates; state++) { - RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(state); - RBBIStateTableRow *row = (RBBIStateTableRow *)(table->fTableData + state*table->fRowLen); + RBBIStateDescriptor* sd = static_cast<RBBIStateDescriptor*>(fDStates->elementAt(state)); + RBBIStateTableRow* row = reinterpret_cast<RBBIStateTableRow*>(table->fTableData + state * table->fRowLen); if (use8BitsForTable()) { U_ASSERT (sd->fAccepting <= 255); U_ASSERT (sd->fLookAhead <= 255); U_ASSERT (0 <= sd->fTagsIdx && sd->fTagsIdx <= 255); - RBBIStateTableRow8 *r8 = (RBBIStateTableRow8*)row; + RBBIStateTableRow8* r8 = reinterpret_cast<RBBIStateTableRow8*>(row); r8->fAccepting = sd->fAccepting; r8->fLookAhead = sd->fLookAhead; r8->fTagsIdx = sd->fTagsIdx; @@ -1472,8 +1472,8 @@ void RBBITableBuilder::buildSafeReverseTable(UErrorCode &status) { } } if (wantedEndState == endState) { - safePairs.append((char16_t)c1); - safePairs.append((char16_t)c2); + safePairs.append(static_cast<char16_t>(c1)); + safePairs.append(static_cast<char16_t>(c2)); // printf("(%d, %d) ", c1, c2); } } @@ -1579,7 +1579,7 @@ bool RBBITableBuilder::use8BitsForSafeTable() const { // //----------------------------------------------------------------------------- void RBBITableBuilder::exportSafeTable(void *where) { - RBBIStateTable *table = (RBBIStateTable *)where; + RBBIStateTable* table = static_cast<RBBIStateTable*>(where); uint32_t state; int col; @@ -1604,10 +1604,10 @@ void RBBITableBuilder::exportSafeTable(void *where) { } for (state=0; state<table->fNumStates; state++) { - UnicodeString *rowString = (UnicodeString *)fSafeTable->elementAt(state); - RBBIStateTableRow *row = (RBBIStateTableRow *)(table->fTableData + state*table->fRowLen); + UnicodeString* rowString = static_cast<UnicodeString*>(fSafeTable->elementAt(state)); + RBBIStateTableRow* row = reinterpret_cast<RBBIStateTableRow*>(table->fTableData + state * table->fRowLen); if (use8BitsForSafeTable()) { - RBBIStateTableRow8 *r8 = (RBBIStateTableRow8*)row; + RBBIStateTableRow8* r8 = reinterpret_cast<RBBIStateTableRow8*>(row); r8->fAccepting = 0; r8->fLookAhead = 0; r8->fTagsIdx = 0; diff --git a/deps/icu-small/source/common/resbund_cnv.cpp b/deps/icu-small/source/common/resbund_cnv.cpp index 7f83f06f0e0c0c..a109609189410e 100644 --- a/deps/icu-small/source/common/resbund_cnv.cpp +++ b/deps/icu-small/source/common/resbund_cnv.cpp @@ -49,7 +49,7 @@ ResourceBundle::constructForLocale(const UnicodeString& path, } else { UnicodeString nullTerminatedPath(path); - nullTerminatedPath.append((char16_t)0); + nullTerminatedPath.append(static_cast<char16_t>(0)); fResource = ures_openU(nullTerminatedPath.getBuffer(), locale.getName(), &error); } } diff --git a/deps/icu-small/source/common/ruleiter.cpp b/deps/icu-small/source/common/ruleiter.cpp index 0e665435a78524..39bea52e78b7b4 100644 --- a/deps/icu-small/source/common/ruleiter.cpp +++ b/deps/icu-small/source/common/ruleiter.cpp @@ -139,7 +139,7 @@ UChar32 RuleCharacterIterator::_current() const { return buf->char32At(bufPos); } else { int i = pos.getIndex(); - return (i < text.length()) ? text.char32At(i) : (UChar32)DONE; + return (i < text.length()) ? text.char32At(i) : static_cast<UChar32>(DONE); } } diff --git a/deps/icu-small/source/common/serv.cpp b/deps/icu-small/source/common/serv.cpp index 5248f7c192b81e..3a4aee5797f2df 100644 --- a/deps/icu-small/source/common/serv.cpp +++ b/deps/icu-small/source/common/serv.cpp @@ -424,7 +424,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer return handleDefault(key, actualReturn, status); } - ICUService* ncthis = (ICUService*)this; // cast away semantic const + ICUService* ncthis = const_cast<ICUService*>(this); // cast away semantic const CacheEntry* result = nullptr; { @@ -462,7 +462,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer if (factory != nullptr) { for (int32_t i = 0; i < limit; ++i) { - if (factory == (const ICUServiceFactory*)factories->elementAt(i)) { + if (factory == static_cast<const ICUServiceFactory*>(factories->elementAt(i))) { startIndex = i + 1; break; } @@ -478,7 +478,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer do { currentDescriptor.remove(); key.currentDescriptor(currentDescriptor); - result = (CacheEntry*)serviceCache->get(currentDescriptor); + result = static_cast<CacheEntry*>(serviceCache->get(currentDescriptor)); if (result != nullptr) { break; } @@ -490,7 +490,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer int32_t index = startIndex; while (index < limit) { - ICUServiceFactory* f = (ICUServiceFactory*)factories->elementAt(index++); + ICUServiceFactory* f = static_cast<ICUServiceFactory*>(factories->elementAt(index++)); LocalPointer<UObject> service(f->create(key, this, status)); if (U_FAILURE(status)) { return nullptr; @@ -543,7 +543,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer if (cacheDescriptorList.isValid()) { for (int32_t i = cacheDescriptorList->size(); --i >= 0;) { - UnicodeString* desc = (UnicodeString*)cacheDescriptorList->elementAt(i); + UnicodeString* desc = static_cast<UnicodeString*>(cacheDescriptorList->elementAt(i)); serviceCache->put(*desc, result, status); if (U_FAILURE(status)) { @@ -558,7 +558,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer if (actualReturn != nullptr) { // strip null prefix - if (result->actualDescriptor.indexOf((char16_t)0x2f) == 0) { // U+002f=slash (/) + if (result->actualDescriptor.indexOf(static_cast<char16_t>(0x2f)) == 0) { // U+002f=slash (/) actualReturn->remove(); actualReturn->append(result->actualDescriptor, 1, @@ -618,7 +618,7 @@ ICUService::getVisibleIDs(UVector& result, const UnicodeString* matchID, UErrorC break; } - const UnicodeString* id = (const UnicodeString*)e->key.pointer; + const UnicodeString* id = static_cast<const UnicodeString*>(e->key.pointer); if (fallbackKey != nullptr) { if (!fallbackKey->isFallbackOf(*id)) { continue; @@ -644,14 +644,14 @@ ICUService::getVisibleIDMap(UErrorCode& status) const { // must only be called when lock is already held - ICUService* ncthis = (ICUService*)this; // cast away semantic const + ICUService* ncthis = const_cast<ICUService*>(this); // cast away semantic const if (idCache == nullptr) { ncthis->idCache = new Hashtable(status); if (idCache == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else if (factories != nullptr) { for (int32_t pos = factories->size(); --pos >= 0;) { - ICUServiceFactory* f = (ICUServiceFactory*)factories->elementAt(pos); + ICUServiceFactory* f = static_cast<ICUServiceFactory*>(factories->elementAt(pos)); f->updateVisibleIDs(*idCache, status); } if (U_FAILURE(status)) { @@ -679,7 +679,7 @@ ICUService::getDisplayName(const UnicodeString& id, UnicodeString& result, const Mutex mutex(&lock); const Hashtable* map = getVisibleIDMap(status); if (map != nullptr) { - ICUServiceFactory* f = (ICUServiceFactory*)map->get(id); + ICUServiceFactory* f = static_cast<ICUServiceFactory*>(map->get(id)); if (f != nullptr) { f->getDisplayName(id, locale, result); return result; @@ -691,7 +691,7 @@ ICUService::getDisplayName(const UnicodeString& id, UnicodeString& result, const while (fallbackKey != nullptr && fallbackKey->fallback()) { UnicodeString us; fallbackKey->currentID(us); - f = (ICUServiceFactory*)map->get(us); + f = static_cast<ICUServiceFactory*>(map->get(us)); if (f != nullptr) { f->getDisplayName(id, locale, result); delete fallbackKey; @@ -727,7 +727,7 @@ ICUService::getDisplayNames(UVector& result, result.removeAllElements(); result.setDeleter(userv_deleteStringPair); if (U_SUCCESS(status)) { - ICUService* ncthis = (ICUService*)this; // cast away semantic const + ICUService* ncthis = const_cast<ICUService*>(this); // cast away semantic const Mutex mutex(&lock); if (dnCache != nullptr && dnCache->locale != locale) { @@ -749,8 +749,8 @@ ICUService::getDisplayNames(UVector& result, int32_t pos = UHASH_FIRST; const UHashElement* entry = nullptr; while ((entry = m->nextElement(pos)) != nullptr) { - const UnicodeString* id = (const UnicodeString*)entry->key.pointer; - ICUServiceFactory* f = (ICUServiceFactory*)entry->value.pointer; + const UnicodeString* id = static_cast<const UnicodeString*>(entry->key.pointer); + ICUServiceFactory* f = static_cast<ICUServiceFactory*>(entry->value.pointer); UnicodeString dname; f->getDisplayName(*id, locale, dname); if (dname.isBogus()) { @@ -776,11 +776,11 @@ ICUService::getDisplayNames(UVector& result, int32_t pos = UHASH_FIRST; const UHashElement *entry = nullptr; while ((entry = dnCache->cache.nextElement(pos)) != nullptr) { - const UnicodeString* id = (const UnicodeString*)entry->value.pointer; + const UnicodeString* id = static_cast<const UnicodeString*>(entry->value.pointer); if (matchKey != nullptr && !matchKey->isFallbackOf(*id)) { continue; } - const UnicodeString* dn = (const UnicodeString*)entry->key.pointer; + const UnicodeString* dn = static_cast<const UnicodeString*>(entry->key.pointer); StringPair* sp = StringPair::create(*id, *dn, status); result.adoptElement(sp, status); if (U_FAILURE(status)) { diff --git a/deps/icu-small/source/common/servlkf.cpp b/deps/icu-small/source/common/servlkf.cpp index f5bb0418c4e95a..7ca5e7adc94b83 100644 --- a/deps/icu-small/source/common/servlkf.cpp +++ b/deps/icu-small/source/common/servlkf.cpp @@ -76,7 +76,7 @@ LocaleKeyFactory::updateVisibleIDs(Hashtable& result, UErrorCode& status) const const UHashElement* elem = nullptr; int32_t pos = UHASH_FIRST; while ((elem = supported->nextElement(pos)) != nullptr) { - const UnicodeString& id = *((const UnicodeString*)elem->key.pointer); + const UnicodeString& id = *static_cast<const UnicodeString*>(elem->key.pointer); if (!visible) { result.remove(id); } else { diff --git a/deps/icu-small/source/common/servls.cpp b/deps/icu-small/source/common/servls.cpp index 978a956df7c331..33a113896233d6 100644 --- a/deps/icu-small/source/common/servls.cpp +++ b/deps/icu-small/source/common/servls.cpp @@ -179,7 +179,7 @@ class ServiceEnumeration : public StringEnumeration { length = other._ids.size(); for(i = 0; i < length; ++i) { - LocalPointer<UnicodeString> clonedId(((UnicodeString *)other._ids.elementAt(i))->clone(), status); + LocalPointer<UnicodeString> clonedId(static_cast<UnicodeString*>(other._ids.elementAt(i))->clone(), status); _ids.adoptElement(clonedId.orphan(), status); } @@ -228,7 +228,7 @@ class ServiceEnumeration : public StringEnumeration { virtual const UnicodeString* snext(UErrorCode& status) override { if (upToDate(status) && (_pos < _ids.size())) { - return (const UnicodeString*)_ids[_pos++]; + return static_cast<const UnicodeString*>(_ids[_pos++]); } return nullptr; } @@ -263,7 +263,7 @@ const UnicodeString& ICULocaleService::validateFallbackLocale() const { const Locale& loc = Locale::getDefault(); - ICULocaleService* ncThis = (ICULocaleService*)this; + ICULocaleService* ncThis = const_cast<ICULocaleService*>(this); static UMutex llock; { Mutex mutex(&llock); diff --git a/deps/icu-small/source/common/servnotf.cpp b/deps/icu-small/source/common/servnotf.cpp index b2ad663a488a74..3106152467ff93 100644 --- a/deps/icu-small/source/common/servnotf.cpp +++ b/deps/icu-small/source/common/servnotf.cpp @@ -56,7 +56,7 @@ ICUNotifier::addListener(const EventListener* l, UErrorCode& status) listeners = lpListeners.orphan(); } else { for (int i = 0, e = listeners->size(); i < e; ++i) { - const EventListener* el = (const EventListener*)(listeners->elementAt(i)); + const EventListener* el = static_cast<const EventListener*>(listeners->elementAt(i)); if (l == el) { return; } @@ -88,7 +88,7 @@ ICUNotifier::removeListener(const EventListener *l, UErrorCode& status) if (listeners != nullptr) { // identity equality check for (int i = 0, e = listeners->size(); i < e; ++i) { - const EventListener* el = (const EventListener*)listeners->elementAt(i); + const EventListener* el = static_cast<const EventListener*>(listeners->elementAt(i)); if (l == el) { listeners->removeElementAt(i); if (listeners->size() == 0) { @@ -109,7 +109,7 @@ ICUNotifier::notifyChanged() Mutex lmx(¬ifyLock); if (listeners != nullptr) { for (int i = 0, e = listeners->size(); i < e; ++i) { - EventListener* el = (EventListener*)listeners->elementAt(i); + EventListener* el = static_cast<EventListener*>(listeners->elementAt(i)); notifyListener(*el); } } diff --git a/deps/icu-small/source/common/servrbf.cpp b/deps/icu-small/source/common/servrbf.cpp index a4feca2c3b00b9..7f130d55aa502c 100644 --- a/deps/icu-small/source/common/servrbf.cpp +++ b/deps/icu-small/source/common/servrbf.cpp @@ -61,8 +61,8 @@ ICUResourceBundleFactory::handleCreate(const Locale& loc, int32_t /* kind */, co // who made this change? -- dlf char pkg[20]; int32_t length; - length=_bundleName.extract(0, INT32_MAX, pkg, (int32_t)sizeof(pkg), US_INV); - if(length>=(int32_t)sizeof(pkg)) { + length = _bundleName.extract(0, INT32_MAX, pkg, static_cast<int32_t>(sizeof(pkg)), US_INV); + if (length >= static_cast<int32_t>(sizeof(pkg))) { return nullptr; } return new ResourceBundle(pkg, loc, status); diff --git a/deps/icu-small/source/common/simpleformatter.cpp b/deps/icu-small/source/common/simpleformatter.cpp index 16256270727e8d..66074938943e7d 100644 --- a/deps/icu-small/source/common/simpleformatter.cpp +++ b/deps/icu-small/source/common/simpleformatter.cpp @@ -73,7 +73,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( const char16_t *patternBuffer = pattern.getBuffer(); int32_t patternLength = pattern.length(); // Reserve the first char for the number of arguments. - compiledPattern.setTo((char16_t)0); + compiledPattern.setTo(static_cast<char16_t>(0)); int32_t textLength = 0; int32_t maxArg = -1; UBool inQuote = false; @@ -98,7 +98,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( } else if (!inQuote && c == OPEN_BRACE) { if (textLength > 0) { compiledPattern.setCharAt(compiledPattern.length() - textLength - 1, - (char16_t)(ARG_NUM_LIMIT + textLength)); + static_cast<char16_t>(ARG_NUM_LIMIT + textLength)); textLength = 0; } int32_t argNumber; @@ -129,7 +129,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( if (argNumber > maxArg) { maxArg = argNumber; } - compiledPattern.append((char16_t)argNumber); + compiledPattern.append(static_cast<char16_t>(argNumber)); continue; } // else: c is part of literal text // Append c and track the literal-text segment length. @@ -144,14 +144,14 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( } if (textLength > 0) { compiledPattern.setCharAt(compiledPattern.length() - textLength - 1, - (char16_t)(ARG_NUM_LIMIT + textLength)); + static_cast<char16_t>(ARG_NUM_LIMIT + textLength)); } int32_t argCount = maxArg + 1; if (argCount < min || max < argCount) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; return false; } - compiledPattern.setCharAt(0, (char16_t)argCount); + compiledPattern.setCharAt(0, static_cast<char16_t>(argCount)); return true; } diff --git a/deps/icu-small/source/common/stringtriebuilder.cpp b/deps/icu-small/source/common/stringtriebuilder.cpp index 2a40dc88fd878a..68670390628911 100644 --- a/deps/icu-small/source/common/stringtriebuilder.cpp +++ b/deps/icu-small/source/common/stringtriebuilder.cpp @@ -328,7 +328,7 @@ StringTrieBuilder::registerNode(Node *newNode, UErrorCode &errorCode) { const UHashElement *old=uhash_find(nodes, newNode); if(old!=nullptr) { delete newNode; - return (Node *)old->key.pointer; + return static_cast<Node*>(old->key.pointer); } // If uhash_puti() returns a non-zero value from an equivalent, previously // registered node, then uhash_find() failed to find that and we will leak newNode. @@ -352,7 +352,7 @@ StringTrieBuilder::registerFinalValue(int32_t value, UErrorCode &errorCode) { FinalValueNode key(value); const UHashElement *old=uhash_find(nodes, &key); if(old!=nullptr) { - return (Node *)old->key.pointer; + return static_cast<Node*>(old->key.pointer); } Node *newNode=new FinalValueNode(value); if(newNode==nullptr) { @@ -375,12 +375,12 @@ StringTrieBuilder::registerFinalValue(int32_t value, UErrorCode &errorCode) { int32_t StringTrieBuilder::hashNode(const void *node) { - return ((const Node *)node)->hashCode(); + return static_cast<const Node*>(node)->hashCode(); } UBool StringTrieBuilder::equalNodes(const void *left, const void *right) { - return *(const Node *)left==*(const Node *)right; + return *static_cast<const Node*>(left) == *static_cast<const Node*>(right); } bool diff --git a/deps/icu-small/source/common/ubidi.cpp b/deps/icu-small/source/common/ubidi.cpp index fcf82fa97a8c89..400e049d781a98 100644 --- a/deps/icu-small/source/common/ubidi.cpp +++ b/deps/icu-small/source/common/ubidi.cpp @@ -304,7 +304,7 @@ ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode) UPRV_N if ((pBiDi!=nullptr) && (reorderingMode >= UBIDI_REORDER_DEFAULT) && (reorderingMode < UBIDI_REORDER_COUNT)) { pBiDi->reorderingMode = reorderingMode; - pBiDi->isInverse = (UBool)(reorderingMode == UBIDI_REORDER_INVERSE_NUMBERS_AS_L); + pBiDi->isInverse = reorderingMode == UBIDI_REORDER_INVERSE_NUMBERS_AS_L; } } @@ -381,7 +381,7 @@ firstL_R_AL(UBiDi *pBiDi) { for(i=0; i<length; ) { /* i is incremented by U16_NEXT */ U16_NEXT(text, i, length, uchar); - dirProp=(DirProp)ubidi_getCustomizedClass(pBiDi, uchar); + dirProp = static_cast<DirProp>(ubidi_getCustomizedClass(pBiDi, uchar)); if(result==ON) { if(dirProp==L || dirProp==R || dirProp==AL) { result=dirProp; @@ -436,13 +436,13 @@ getDirProps(UBiDi *pBiDi) { UBool isDefaultLevel=IS_DEFAULT_LEVEL(pBiDi->paraLevel); /* for inverse BiDi, the default para level is set to RTL if there is a strong R or AL character at either end of the text */ - UBool isDefaultLevelInverse=isDefaultLevel && (UBool) - (pBiDi->reorderingMode==UBIDI_REORDER_INVERSE_LIKE_DIRECT || - pBiDi->reorderingMode==UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL); + UBool isDefaultLevelInverse = isDefaultLevel && static_cast<UBool>( + pBiDi->reorderingMode == UBIDI_REORDER_INVERSE_LIKE_DIRECT || + pBiDi->reorderingMode == UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL); int32_t lastArabicPos=-1; int32_t controlCount=0; - UBool removeBiDiControls = (UBool)(pBiDi->reorderingOptions & - UBIDI_OPTION_REMOVE_CONTROLS); + UBool removeBiDiControls = + static_cast<UBool>(pBiDi->reorderingOptions & UBIDI_OPTION_REMOVE_CONTROLS); enum State { NOT_SEEKING_STRONG, /* 0: not contextual paraLevel, not after FSI */ @@ -676,7 +676,7 @@ bracketInit(UBiDi *pBiDi, BracketData *bd) { bd->isoRuns[0].level=GET_PARALEVEL(pBiDi, 0); UBiDiLevel t = GET_PARALEVEL(pBiDi, 0) & 1; bd->isoRuns[0].lastStrong = bd->isoRuns[0].lastBase = t; - bd->isoRuns[0].contextDir = (UBiDiDirection)t; + bd->isoRuns[0].contextDir = static_cast<UBiDiDirection>(t); bd->isoRuns[0].contextPos=0; if(pBiDi->openingsMemory) { bd->openings=pBiDi->openingsMemory; @@ -696,7 +696,7 @@ bracketProcessB(BracketData *bd, UBiDiLevel level) { bd->isoRuns[0].limit=0; bd->isoRuns[0].level=level; bd->isoRuns[0].lastStrong=bd->isoRuns[0].lastBase=level&1; - bd->isoRuns[0].contextDir=(UBiDiDirection)(level&1); + bd->isoRuns[0].contextDir = static_cast<UBiDiDirection>(level & 1); bd->isoRuns[0].contextPos=0; } @@ -713,8 +713,8 @@ bracketProcessBoundary(BracketData *bd, int32_t lastCcPos, pLastIsoRun->limit=pLastIsoRun->start; pLastIsoRun->level=embeddingLevel; pLastIsoRun->lastStrong=pLastIsoRun->lastBase=contextLevel&1; - pLastIsoRun->contextDir=(UBiDiDirection)(contextLevel&1); - pLastIsoRun->contextPos=(UBiDiDirection)lastCcPos; + pLastIsoRun->contextDir = static_cast<UBiDiDirection>(contextLevel & 1); + pLastIsoRun->contextPos = static_cast<UBiDiDirection>(lastCcPos); } /* LRI or RLI */ @@ -729,7 +729,7 @@ bracketProcessLRI_RLI(BracketData *bd, UBiDiLevel level) { pLastIsoRun->start=pLastIsoRun->limit=lastLimit; pLastIsoRun->level=level; pLastIsoRun->lastStrong=pLastIsoRun->lastBase=level&1; - pLastIsoRun->contextDir=(UBiDiDirection)(level&1); + pLastIsoRun->contextDir = static_cast<UBiDiDirection>(level & 1); pLastIsoRun->contextPos=0; } @@ -803,7 +803,7 @@ bracketProcessClosing(BracketData *bd, int32_t openIdx, int32_t position) { UBool stable; DirProp newProp; pOpening=&bd->openings[openIdx]; - direction=(UBiDiDirection)(pLastIsoRun->level&1); + direction = static_cast<UBiDiDirection>(pLastIsoRun->level & 1); stable=true; /* assume stable until proved otherwise */ /* The stable flag is set when brackets are paired and their @@ -896,7 +896,7 @@ bracketProcessChar(BracketData *bd, int32_t position) { break; } pLastIsoRun->lastBase=ON; - pLastIsoRun->contextDir=(UBiDiDirection)newProp; + pLastIsoRun->contextDir = static_cast<UBiDiDirection>(newProp); pLastIsoRun->contextPos=position; level=bd->pBiDi->levels[position]; if(level&UBIDI_LEVEL_OVERRIDE) { /* X4, X5 */ @@ -944,14 +944,14 @@ bracketProcessChar(BracketData *bd, int32_t position) { dirProps[position]=newProp; pLastIsoRun->lastBase=newProp; pLastIsoRun->lastStrong=newProp; - pLastIsoRun->contextDir=(UBiDiDirection)newProp; + pLastIsoRun->contextDir = static_cast<UBiDiDirection>(newProp); pLastIsoRun->contextPos=position; } else if(dirProp<=R || dirProp==AL) { newProp= static_cast<DirProp>(DIR_FROM_STRONG(dirProp)); pLastIsoRun->lastBase=dirProp; pLastIsoRun->lastStrong=dirProp; - pLastIsoRun->contextDir=(UBiDiDirection)newProp; + pLastIsoRun->contextDir = static_cast<UBiDiDirection>(newProp); pLastIsoRun->contextPos=position; } else if(dirProp==EN) { @@ -960,7 +960,7 @@ bracketProcessChar(BracketData *bd, int32_t position) { newProp=L; /* W7 */ if(!bd->isNumbersSpecial) dirProps[position]=ENL; - pLastIsoRun->contextDir=(UBiDiDirection)L; + pLastIsoRun->contextDir = static_cast<UBiDiDirection>(L); pLastIsoRun->contextPos=position; } else { @@ -969,14 +969,14 @@ bracketProcessChar(BracketData *bd, int32_t position) { dirProps[position]=AN; /* W2 */ else dirProps[position]=ENR; - pLastIsoRun->contextDir=(UBiDiDirection)R; + pLastIsoRun->contextDir = static_cast<UBiDiDirection>(R); pLastIsoRun->contextPos=position; } } else if(dirProp==AN) { newProp=R; /* N0 */ pLastIsoRun->lastBase=AN; - pLastIsoRun->contextDir=(UBiDiDirection)R; + pLastIsoRun->contextDir = static_cast<UBiDiDirection>(R); pLastIsoRun->contextPos=position; } else if(dirProp==NSM) { @@ -1177,10 +1177,10 @@ resolveExplicitLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) { levels[i]=previousLevel; if (dirProp==LRE || dirProp==LRO) /* least greater even level */ - newLevel=(UBiDiLevel)((embeddingLevel+2)&~(UBIDI_LEVEL_OVERRIDE|1)); + newLevel = static_cast<UBiDiLevel>((embeddingLevel + 2) & ~(UBIDI_LEVEL_OVERRIDE | 1)); else /* least greater odd level */ - newLevel=(UBiDiLevel)((NO_OVERRIDE(embeddingLevel)+1)|1); + newLevel = static_cast<UBiDiLevel>((NO_OVERRIDE(embeddingLevel) + 1) | 1); if(newLevel<=UBIDI_MAX_EXPLICIT_LEVEL && overflowIsolateCount==0 && overflowEmbeddingCount==0) { lastCcPos=i; @@ -1213,7 +1213,7 @@ resolveExplicitLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) { if(stackLast>0 && stack[stackLast]<ISOLATE) { /* not an isolate entry */ lastCcPos=i; stackLast--; - embeddingLevel=(UBiDiLevel)stack[stackLast]; + embeddingLevel = static_cast<UBiDiLevel>(stack[stackLast]); } break; case LRI: @@ -1229,10 +1229,10 @@ resolveExplicitLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) { /* (X5a, X5b) */ if(dirProp==LRI) /* least greater even level */ - newLevel=(UBiDiLevel)((embeddingLevel+2)&~(UBIDI_LEVEL_OVERRIDE|1)); + newLevel = static_cast<UBiDiLevel>((embeddingLevel + 2) & ~(UBIDI_LEVEL_OVERRIDE | 1)); else /* least greater odd level */ - newLevel=(UBiDiLevel)((NO_OVERRIDE(embeddingLevel)+1)|1); + newLevel = static_cast<UBiDiLevel>((NO_OVERRIDE(embeddingLevel) + 1) | 1); if(newLevel<=UBIDI_MAX_EXPLICIT_LEVEL && overflowIsolateCount==0 && overflowEmbeddingCount==0) { flags|=DIRPROP_FLAG(dirProp); @@ -1276,7 +1276,7 @@ resolveExplicitLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) { } else /* make it WS so that it is handled by adjustWSLevels() */ dirProps[i]=WS; - embeddingLevel=(UBiDiLevel)stack[stackLast]&~ISOLATE; + embeddingLevel = static_cast<UBiDiLevel>(stack[stackLast]) & ~ISOLATE; flags|=(DIRPROP_FLAG(ON)|DIRPROP_FLAG_LR(embeddingLevel)); previousLevel=embeddingLevel; levels[i]=NO_OVERRIDE(embeddingLevel); @@ -1315,7 +1315,7 @@ resolveExplicitLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) { previousLevel=embeddingLevel; levels[i]=embeddingLevel; if(!bracketProcessChar(&bracketData, i)) - return (UBiDiDirection)-1; + return static_cast<UBiDiDirection>(-1); /* the dirProp may have been changed in bracketProcessChar() */ flags|=DIRPROP_FLAG(dirProps[i]); break; @@ -1386,7 +1386,7 @@ checkExplicitLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) { } else { // Treat explicit level 0 as a wildcard for the paragraph level. // Avoid making the caller guess what the paragraph level would be. - level = (UBiDiLevel)currentParaLevel; + level = static_cast<UBiDiLevel>(currentParaLevel); levels[i] = level | overrideFlag; } } else { @@ -1868,7 +1868,7 @@ processPropertySeq(UBiDi *pBiDi, LevState *pLevState, uint8_t _prop, int32_t start0, k; start0=start; /* save original start position */ - oldStateSeq=(uint8_t)pLevState->state; + oldStateSeq = static_cast<uint8_t>(pLevState->state); cell=(*pImpTab)[oldStateSeq][_prop]; pLevState->state=GET_STATE(cell); /* isolate the new state */ actionSeq=(*pImpAct)[GET_ACTION(cell)]; /* isolate the action */ @@ -2076,7 +2076,7 @@ lastL_R_AL(UBiDi *pBiDi) { for(i=length; i>0; ) { /* i is decremented by U16_PREV */ U16_PREV(text, 0, i, uchar); - dirProp=(DirProp)ubidi_getCustomizedClass(pBiDi, uchar); + dirProp = static_cast<DirProp>(ubidi_getCustomizedClass(pBiDi, uchar)); if(dirProp==L) { return DirProp_L; } @@ -2104,7 +2104,7 @@ firstL_R_AL_EN_AN(UBiDi *pBiDi) { for(i=0; i<length; ) { /* i is incremented by U16_NEXT */ U16_NEXT(text, i, length, uchar); - dirProp=(DirProp)ubidi_getCustomizedClass(pBiDi, uchar); + dirProp = static_cast<DirProp>(ubidi_getCustomizedClass(pBiDi, uchar)); if(dirProp==L) { return DirProp_L; } @@ -2142,18 +2142,18 @@ resolveImplicitLevels(UBiDi *pBiDi, * actions) and different levels state tables (maybe very similar to the * LTR corresponding ones. */ - inverseRTL=(UBool) - ((start<pBiDi->lastArabicPos) && (GET_PARALEVEL(pBiDi, start) & 1) && - (pBiDi->reorderingMode==UBIDI_REORDER_INVERSE_LIKE_DIRECT || - pBiDi->reorderingMode==UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL)); + inverseRTL = + static_cast<UBool>((start < pBiDi->lastArabicPos) && (GET_PARALEVEL(pBiDi, start) & 1) && + (pBiDi->reorderingMode == UBIDI_REORDER_INVERSE_LIKE_DIRECT || + pBiDi->reorderingMode == UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL)); /* initialize for property and levels state tables */ levState.startL2EN=-1; /* used for INVERSE_LIKE_DIRECT_WITH_MARKS */ levState.lastStrongRTL=-1; /* used for INVERSE_LIKE_DIRECT_WITH_MARKS */ levState.runStart=start; levState.runLevel=pBiDi->levels[start]; - levState.pImpTab=(const ImpTab*)((pBiDi->pImpTabPair)->pImpTab)[levState.runLevel&1]; - levState.pImpAct=(const ImpAct*)((pBiDi->pImpTabPair)->pImpAct)[levState.runLevel&1]; + levState.pImpTab = static_cast<const ImpTab*>(((pBiDi->pImpTabPair)->pImpTab)[levState.runLevel & 1]); + levState.pImpAct = static_cast<const ImpAct*>(((pBiDi->pImpTabPair)->pImpAct)[levState.runLevel & 1]); if(start==0 && pBiDi->proLength>0) { DirProp lastStrong=lastL_R_AL(pBiDi); if(lastStrong!=DirProp_ON) { @@ -2391,8 +2391,8 @@ setParaRunsOnly(UBiDi *pBiDi, const char16_t *text, int32_t length, goto cleanup3; } visualMap=runsOnlyMemory; - visualText=(char16_t *)&visualMap[length]; - saveLevels=(UBiDiLevel *)&visualText[length]; + visualText = reinterpret_cast<char16_t*>(&visualMap[length]); + saveLevels = reinterpret_cast<UBiDiLevel*>(&visualText[length]); saveOptions=pBiDi->reorderingOptions; if(saveOptions & UBIDI_OPTION_INSERT_MARKS) { pBiDi->reorderingOptions&=~UBIDI_OPTION_INSERT_MARKS; diff --git a/deps/icu-small/source/common/ubidi_props.cpp b/deps/icu-small/source/common/ubidi_props.cpp index 8f3f6a65c4b399..1ac4ab12a2c395 100644 --- a/deps/icu-small/source/common/ubidi_props.cpp +++ b/deps/icu-small/source/common/ubidi_props.cpp @@ -51,7 +51,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 end, uint32 (void)end; (void)value; /* add the start code point to the USet */ - const USetAdder *sa=(const USetAdder *)context; + const USetAdder* sa = static_cast<const USetAdder*>(context); sa->add(sa->set, start); return true; } @@ -139,7 +139,7 @@ ubidi_getClass(UChar32 c) { U_CFUNC UBool ubidi_isMirrored(UChar32 c) { uint16_t props=UTRIE2_GET16(&ubidi_props_singleton.trie, c); - return (UBool)UBIDI_GET_FLAG(props, UBIDI_IS_MIRRORED_SHIFT); + return UBIDI_GET_FLAG(props, UBIDI_IS_MIRRORED_SHIFT); } static UChar32 @@ -183,13 +183,13 @@ ubidi_getMirror(UChar32 c) { U_CFUNC UBool ubidi_isBidiControl(UChar32 c) { uint16_t props=UTRIE2_GET16(&ubidi_props_singleton.trie, c); - return (UBool)UBIDI_GET_FLAG(props, UBIDI_BIDI_CONTROL_SHIFT); + return UBIDI_GET_FLAG(props, UBIDI_BIDI_CONTROL_SHIFT); } U_CFUNC UBool ubidi_isJoinControl(UChar32 c) { uint16_t props=UTRIE2_GET16(&ubidi_props_singleton.trie, c); - return (UBool)UBIDI_GET_FLAG(props, UBIDI_JOIN_CONTROL_SHIFT); + return UBIDI_GET_FLAG(props, UBIDI_JOIN_CONTROL_SHIFT); } U_CFUNC UJoiningType diff --git a/deps/icu-small/source/common/ubidi_props_data.h b/deps/icu-small/source/common/ubidi_props_data.h index f85dc0967565a4..bfd664a1b9f831 100644 --- a/deps/icu-small/source/common/ubidi_props_data.h +++ b/deps/icu-small/source/common/ubidi_props_data.h @@ -9,681 +9,694 @@ #ifdef INCLUDED_FROM_UBIDI_PROPS_C -static const UVersionInfo ubidi_props_dataVersion={0xf,1,0,0}; +static const UVersionInfo ubidi_props_dataVersion={0x10,0,0,0}; -static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6ba0,0x65b0,0x28,0x620,0x8cc,0x10ac0,0x10d24,0,0,0,0,0,0,0,0x6702b6}; +static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6f08,0x6778,0x28,0x620,0x8cb,0x10ac0,0x10ec5,0,0,0,0,0,0,0,0x6802b6}; -static const uint16_t ubidi_props_trieIndex[13008]={ -0x387,0x38f,0x397,0x39f,0x3b7,0x3bf,0x3c7,0x3cf,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af, -0x3a7,0x3af,0x3a7,0x3af,0x3d5,0x3dd,0x3e5,0x3ed,0x3f5,0x3fd,0x3f9,0x401,0x409,0x411,0x40c,0x414, -0x3a7,0x3af,0x3a7,0x3af,0x41c,0x424,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,0x42a,0x432,0x43a,0x442, -0x44a,0x452,0x45a,0x462,0x468,0x470,0x478,0x480,0x488,0x490,0x496,0x49e,0x4a6,0x4ae,0x4b6,0x4be, -0x4ca,0x4c6,0x4d2,0x4da,0x4e2,0x4f2,0x4f9,0x4ea,0x501,0x503,0x50b,0x513,0x51b,0x51c,0x524,0x52c, -0x534,0x51c,0x53c,0x541,0x534,0x51c,0x549,0x551,0x51b,0x559,0x561,0x513,0x569,0x3a7,0x571,0x575, -0x57d,0x57f,0x587,0x58f,0x51b,0x597,0x59f,0x513,0x41e,0x5a3,0x524,0x513,0x51b,0x3a7,0x5ab,0x3a7, -0x3a7,0x5b1,0x5b9,0x3a7,0x3a7,0x5bd,0x5c5,0x3a7,0x5c9,0x5d0,0x3a7,0x5d8,0x5e0,0x5e7,0x568,0x3a7, -0x3a7,0x5ef,0x5f7,0x5ff,0x607,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x60f,0x3a7,0x617,0x3a7,0x3a7,0x3a7, -0x61f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x627,0x3a7,0x3a7,0x3a7,0x62f,0x528,0x528,0x528,0x3a7,0x635,0x63d,0x617, -0x653,0x645,0x645,0x65b,0x662,0x64b,0x3a7,0x3a7,0x3a7,0x66a,0x672,0x3a7,0x3a7,0x3a7,0x674,0x67c, -0x684,0x3a7,0x68b,0x693,0x3a7,0x69b,0x4fe,0x3a7,0x558,0x6a3,0x569,0x6ab,0x41e,0x6b3,0x3a7,0x6ba, -0x3a7,0x6bf,0x3a7,0x3a7,0x3a7,0x3a7,0x6c5,0x6cd,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0x3f5, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x6d4,0x6dc,0x6e0, -0x6f8,0x6fe,0x6e8,0x6f0,0x706,0x70e,0x712,0x5ea,0x71a,0x722,0x72a,0x3a7,0x732,0x67c,0x67c,0x67c, -0x742,0x74a,0x752,0x75a,0x75f,0x767,0x76f,0x73a,0x777,0x77f,0x3a7,0x785,0x78c,0x67c,0x67c,0x67c, -0x67c,0x595,0x792,0x67c,0x79a,0x3a7,0x3a7,0x679,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c, -0x67c,0x67c,0x67c,0x67c,0x67c,0x7a2,0x67c,0x67c,0x67c,0x67c,0x67c,0x7a8,0x67c,0x67c,0x7b0,0x7b8, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x67c,0x67c,0x67c,0x67c,0x7c8,0x7d0,0x7d8,0x7c0, -0x7e8,0x7f0,0x7f8,0x7ff,0x806,0x80e,0x812,0x7e0,0x67c,0x67c,0x67c,0x81a,0x820,0x67c,0x67c,0x826, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x82e,0x3a7,0x3a7,0x3a7,0x836,0x3a7,0x3a7,0x3a7,0x3f5, -0x83e,0x846,0x849,0x3a7,0x851,0x67c,0x67c,0x67f,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x858,0x85e, -0x86e,0x866,0x3a7,0x3a7,0x876,0x61f,0x3a7,0x3ce,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x67c,0x87e, -0x3dc,0x3a7,0x85e,0x882,0x3a7,0x88a,0x892,0x3a7,0x3a7,0x3a7,0x3a7,0x896,0x3a7,0x3a7,0x674,0x3cd, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x67c,0x67c, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x85e,0x67c,0x595,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x89d,0x3a7,0x3a7,0x8a2,0x8aa,0x3a7,0x3a7,0x5cb,0x67c,0x673,0x3a7,0x3a7,0x8b2,0x3a7,0x3a7,0x3a7, -0x8ba,0x8c1,0x645,0x8c9,0x3a7,0x3a7,0x5a1,0x8d1,0x3a7,0x8d9,0x8e0,0x3a7,0x501,0x8e5,0x3a7,0x51a, -0x3a7,0x8ed,0x8f5,0x51c,0x3a7,0x8f9,0x51b,0x901,0x3a7,0x3a7,0x3a7,0x907,0x3a7,0x3a7,0x3a7,0x90e, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x922,0x916,0x91a,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, -0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x92a,0x932,0x4a6,0x4a6,0x4a6,0x937,0x93b, -0x943,0x94b,0x94f,0x957,0x4a6,0x4a6,0x4a6,0x95b,0x963,0x397,0x96b,0x973,0x3a7,0x3a7,0x3a7,0x97b, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xe9c,0xe9c,0xedc,0xf1c,0xe9c,0xe9c,0xe9c,0xe9c,0xe9c,0xe9c,0xf54,0xf94,0xfd4,0xfe4,0x1024,0x1030, -0xe9c,0xe9c,0x1070,0xe9c,0xe9c,0xe9c,0x10a8,0x10e8,0x1128,0x1168,0x11a0,0x11e0,0x1220,0x1258,0x1298,0x12d8, -0xa40,0xa80,0xac0,0xaff,0x1a0,0x1a0,0xb3f,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xb68,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xba8,0x1a0,0xbce,0xc09,0xc49,0xc89,0xcc9,0xd09,0xd49, +static const uint16_t ubidi_props_trieIndex[13236]={ +0x395,0x39d,0x3a5,0x3ad,0x3c5,0x3cd,0x3d5,0x3dd,0x3b5,0x3bd,0x3b5,0x3bd,0x3b5,0x3bd,0x3b5,0x3bd, +0x3b5,0x3bd,0x3b5,0x3bd,0x3e3,0x3eb,0x3f3,0x3fb,0x403,0x40b,0x407,0x40f,0x417,0x41f,0x41a,0x422, +0x3b5,0x3bd,0x3b5,0x3bd,0x42a,0x432,0x3b5,0x3bd,0x3b5,0x3bd,0x3b5,0x3bd,0x438,0x440,0x448,0x450, +0x458,0x460,0x468,0x470,0x476,0x47e,0x486,0x48e,0x496,0x49e,0x4a4,0x4ac,0x4b4,0x4bc,0x4c4,0x4cc, +0x4d8,0x4d4,0x4e0,0x4e8,0x4f0,0x500,0x507,0x4f8,0x50f,0x511,0x519,0x521,0x529,0x52a,0x532,0x53a, +0x542,0x52a,0x54a,0x54f,0x542,0x52a,0x557,0x55f,0x529,0x567,0x56f,0x521,0x577,0x3b5,0x57f,0x583, +0x58b,0x58d,0x595,0x59d,0x529,0x5a5,0x5ad,0x521,0x42c,0x5b1,0x532,0x521,0x529,0x3b5,0x5b9,0x3b5, +0x3b5,0x5bf,0x5c7,0x3b5,0x3b5,0x5cb,0x5d3,0x3b5,0x5d7,0x5de,0x3b5,0x5e6,0x5ee,0x5f5,0x576,0x3b5, +0x3b5,0x5fd,0x605,0x60d,0x615,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x61d,0x3b5,0x625,0x3b5,0x3b5,0x3b5, +0x62d,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x635,0x3b5,0x3b5,0x3b5,0x63d,0x536,0x536,0x536,0x3b5,0x643,0x64b,0x625, +0x661,0x653,0x653,0x669,0x670,0x659,0x3b5,0x3b5,0x3b5,0x678,0x680,0x3b5,0x3b5,0x3b5,0x682,0x68a, +0x692,0x3b5,0x699,0x6a1,0x3b5,0x6a9,0x50c,0x3b5,0x566,0x6b1,0x577,0x6b9,0x42c,0x6c1,0x3b5,0x6c8, +0x3b5,0x6cd,0x3b5,0x3b5,0x3b5,0x3b5,0x6d3,0x6db,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x403,0x403, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x6e2,0x6ea,0x6ee, +0x706,0x70c,0x6f6,0x6fe,0x714,0x71c,0x720,0x5f8,0x728,0x730,0x738,0x3b5,0x740,0x68a,0x68a,0x68a, +0x750,0x758,0x760,0x768,0x76d,0x775,0x77d,0x748,0x785,0x78d,0x3b5,0x793,0x79a,0x68a,0x68a,0x68a, +0x68a,0x790,0x7a0,0x68a,0x7a8,0x3b5,0x3b5,0x687,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, +0x68a,0x68a,0x68a,0x68a,0x68a,0x7b0,0x68a,0x68a,0x68a,0x68a,0x68a,0x7b6,0x68a,0x68a,0x7be,0x7c6, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x68a,0x68a,0x68a,0x68a,0x7d6,0x7de,0x7e6,0x7ce, +0x7f6,0x7fe,0x806,0x80d,0x814,0x81c,0x820,0x7ee,0x68a,0x68a,0x68a,0x828,0x82e,0x68a,0x68a,0x834, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x83c,0x3b5,0x3b5,0x3b5,0x844,0x3b5,0x3b5,0x3b5,0x403, +0x84c,0x854,0x857,0x3b5,0x85f,0x68a,0x68a,0x68d,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x866,0x86c, +0x87c,0x874,0x3b5,0x3b5,0x884,0x62d,0x3b5,0x3dc,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x68a,0x88c, +0x3ea,0x3b5,0x86c,0x890,0x3b5,0x898,0x8a0,0x3b5,0x3b5,0x3b5,0x3b5,0x8a4,0x3b5,0x3b5,0x682,0x3db, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x68a,0x68a, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x86c,0x68a,0x5a3,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x8ab,0x3b5,0x3b5,0x8b0,0x8b8,0x3b5,0x3b5,0x5d9,0x68a,0x681,0x3b5,0x3b5,0x8c0,0x3b5,0x3b5,0x3b5, +0x8c8,0x8cf,0x653,0x8d7,0x3b5,0x3b5,0x5af,0x8df,0x3b5,0x8e7,0x8ee,0x3b5,0x50f,0x8f3,0x3b5,0x528, +0x3b5,0x8fb,0x903,0x52a,0x3b5,0x907,0x529,0x90f,0x3b5,0x3b5,0x3b5,0x915,0x3b5,0x3b5,0x3b5,0x91c, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x930,0x924,0x928,0x4b4,0x4b4,0x4b4,0x4b4,0x4b4, +0x4b4,0x4b4,0x4b4,0x4b4,0x4b4,0x4b4,0x4b4,0x4b4,0x4b4,0x938,0x940,0x4b4,0x4b4,0x4b4,0x945,0x949, +0x951,0x959,0x95d,0x965,0x4b4,0x4b4,0x4b4,0x969,0x971,0x3a5,0x979,0x981,0x3b5,0x3b5,0x3b5,0x989, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0xed4,0xed4,0xf14,0xf54,0xed4,0xed4,0xed4,0xed4,0xed4,0xed4,0xf8c,0xfcc,0x100c,0x101c,0x105c,0x1068, +0xed4,0xed4,0x10a8,0xed4,0xed4,0xed4,0x10e0,0x1120,0x1160,0x11a0,0x11d8,0x1218,0x1258,0x1290,0x12d0,0x1310, +0xa40,0xa80,0xac0,0xaff,0x1a0,0x1a0,0xb3f,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xb77,0xba0,0x1a0,0x1a0, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xbe0,0x1a0,0xc06,0xc41,0xc81,0xcc1,0xd01,0xd41,0xd81, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, -0xdc9,0xdd9,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, +0xe01,0xe11,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, -0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x983,0x3a7,0x67c,0x67c,0x98b,0x61f,0x3a7,0x514, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x993,0x3a7,0x3a7,0x3a7,0x99a,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9a2,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, -0x9aa,0x9ae,0x43c,0x43c,0x43c,0x43c,0x9be,0x9b6,0x43c,0x9c6,0x43c,0x43c,0x9ce,0x9d4,0x43c,0x43c, -0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9e4,0x9dc,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, -0x43c,0x43c,0x43c,0x9ec,0x43c,0x9f4,0x4a6,0x9fc,0x43c,0xa04,0xa0b,0xa11,0xa19,0xa1d,0xa25,0x43c, -0x51b,0xa2d,0xa34,0xa3b,0x41e,0xa43,0x569,0x3a7,0x501,0xa4a,0x3a7,0xa50,0x41e,0xa55,0xa5d,0x3a7, -0x3a7,0xa62,0x51b,0x3a7,0x3a7,0x3a7,0x836,0xa6a,0x41e,0x5a3,0x57e,0xa71,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0xa2d,0xa79,0x3a7,0x3a7,0xa81,0xa89,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa8d,0xa95,0x3a7, -0x3a7,0xa9d,0x57e,0xaa5,0x3a7,0xaab,0x3a7,0x3a7,0x60f,0xab3,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xab8,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xabf,0xac7,0x3a7,0x3a7,0x3a7,0xaca,0x57e,0xad2, -0xad6,0xade,0x3a7,0xae5,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xaec,0x3a7,0x3a7,0xafa,0xaf4,0x3a7,0x3a7,0x3a7,0xb02,0xb0a,0x3a7,0xb0e,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x5a5,0x41e,0x99a,0xb16,0x3a7,0x3a7,0x3a7,0xb23,0xb1e,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xb2b,0xb33,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb39, -0x3a7,0xb3f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0xa51,0x3a7,0xb45,0x3a7,0x3a7,0xb4d,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x535,0xb55,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xb5d,0x500,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0xb65,0xb6d,0xb73,0x3a7,0xb79,0x67c,0x67c,0xb81,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x67c,0x67c,0xb89,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb8f, -0x3a7,0xb96,0x3a7,0xb92,0x3a7,0xb99,0x3a7,0xba1,0xba5,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xbad,0x3f5,0xbb4,0xbbb,0xbc3,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xbcb,0xbd3,0x3a7,0x3a7,0xa51,0x3a7,0x3a7, -0x3a7,0x3a7,0xb3f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa7d,0x3a7, -0xbd8,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xbe0,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0xbe8, -0x43c,0xbf0,0xbf0,0xbf7,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, -0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x91a,0x4a6,0x4a6,0x43c, -0x43c,0x4a6,0x4a6,0xbff,0x43c,0x43c,0x43c,0x43c,0x43c,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, -0xc07,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x67c,0xc0f,0x67c,0x67c,0x67f,0xc14,0xc18, -0x858,0xc20,0x3c9,0x3a7,0xc26,0x3a7,0xc2b,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x783,0x3a7,0x3a7,0x3a7, -0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c, -0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0xc33, -0x98b,0x67c,0x67c,0x67c,0xc3a,0x67c,0x67c,0xc41,0xc49,0xc0f,0x67c,0xc51,0x67c,0xc59,0xc5e,0x3a7, -0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67f,0xc66,0xc6f,0xc73,0xc7b, -0xc6b,0x67c,0x67c,0x67c,0x67c,0xc83,0x67c,0x792,0xc8b,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc92,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc92,0xca2,0xc9a,0xc9a,0xc9a,0xca3,0xca3,0xca3, -0xca3,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0xcab,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, -0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, -0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, -0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, -0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0x386,0x386,0x386,0x12,0x12,0x12,0x12, -0x12,0x12,0x12,0x12,0x12,8,7,8,9,7,0x12,0x12,0x12,0x12,0x12,0x12, -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,7,7,7,8,9,0xa,0xa,4, -4,4,0xa,0xa,0x310a,0xf20a,0xa,3,6,3,6,6,2,2,2,2, -2,2,2,2,2,2,6,0xa,0x500a,0xa,0xd00a,0xa,0xa,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0x510a,0xa,0xd20a,0xa,0xa,0xa,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0x510a,0xa,0xd20a,0xa,0x12,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x12,0x12,0x12,0x12, -0x12,7,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,6,0xa,4,4, -4,4,0xa,0xa,0xa,0xa,0,0x900a,0xa,0xb2,0xa,0xa,4,4,2,2, -0xa,0,0xa,0xa,0xa,2,0,0x900a,0xa,0xa,0xa,0xa,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0xa,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0xa,0,0,0,0,0,0,0,0,0,0,0,0, +0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xdc1, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x991,0x3b5,0x68a,0x68a,0x999,0x62d,0x3b5,0x522, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x9a1,0x3b5,0x3b5,0x3b5,0x9a8,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x9b0,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a, +0x9b8,0x9bc,0x44a,0x44a,0x44a,0x44a,0x9cc,0x9c4,0x44a,0x9d4,0x44a,0x44a,0x9dc,0x9e2,0x44a,0x44a, +0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x9f2,0x9ea,0xa02,0x9fa,0x44a,0x44a,0x44a,0x44a, +0x44a,0x44a,0x44a,0xa0a,0x44a,0xa12,0xa22,0xa1a,0x44a,0xa2a,0xa31,0xa37,0xa3f,0xa43,0xa4b,0x44a, +0x529,0xa53,0xa5a,0xa61,0x42c,0xa69,0x577,0x3b5,0x50f,0xa70,0x3b5,0xa76,0x42c,0xa7b,0xa83,0x3b5, +0x3b5,0xa88,0x529,0x3b5,0x3b5,0x3b5,0x844,0xa90,0x42c,0x5b1,0x58c,0xa97,0x3b5,0xa9d,0xaa5,0x542, +0x3b5,0xa53,0xaad,0x3b5,0x3b5,0xab5,0xabd,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0xac1,0xac9,0x3b5, +0x3b5,0xad1,0x58c,0xad9,0x3b5,0xadf,0x3b5,0x3b5,0xae5,0xaed,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0xaf2,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0xaf9,0xb01,0x3b5,0x3b5,0x3b5,0xb04,0x58c,0xb0c, +0xb10,0xb18,0x3b5,0xb1f,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0xb26,0x3b5,0x3b5,0xb34,0xb2e,0x3b5,0x3b5,0x3b5,0xb3c,0xae3,0x3b5,0xb44,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x5b3,0x42c,0x9a8,0xaae,0x3b5,0x3b5,0x3b5,0xb51,0xb4c,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0xb59,0xb61,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x8b8, +0xb69,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0xb6d,0x3b5,0xb73,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0xa77,0x3b5,0xb79,0x3b5,0x3b5,0xb81, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x543,0xb89,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x866,0xb8d,0x68a,0x68a, +0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68d,0x3b5,0x3b5,0x403,0xb95, +0x50e,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0xb9d,0xba5,0xbab,0x3b5, +0xbb1,0x68a,0x68a,0xbb9,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x68a,0x68a,0xbc1,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0xbc9,0x3dc,0xbd0,0xbd6,0xbcc,0x3d7,0xbd3,0xbc7,0xbde, +0xbe2,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x403,0xbea,0x403,0xbf1,0xbf8,0xc00,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0xc08,0xc10,0x3b5,0x3b5,0xa77,0x3b5,0x3b5,0x3b5,0x3b5,0xb73,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0xab1,0x3b5,0xc15,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0xc1d,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0xc22,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0xc2a,0x44a,0xc32,0xc32,0xc39,0x44a,0x44a,0x44a,0x44a, +0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a, +0x44a,0x44a,0x44a,0x44a,0x928,0x4b4,0x4b4,0x44a,0x44a,0x4b4,0x4b4,0xa26,0x44a,0x44a,0x44a,0x44a, +0x44a,0x4b4,0x4b4,0x4b4,0x4b4,0x4b4,0x4b4,0x4b4,0xc41,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a, +0x44a,0x68a,0xc49,0x68a,0x68a,0x68d,0xc4e,0xc52,0x866,0xc5a,0x3d7,0x3b5,0xc60,0x3b5,0xc65,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x791,0x3b5,0x3b5,0x3b5,0x3b5,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, +0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, +0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0xc6d,0x999,0x68a,0x68a,0x68a,0xc74,0x68a,0x68a,0xc7b, +0xc83,0xc49,0x68a,0xc8b,0x68a,0xc93,0xc98,0x681,0x3b5,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, +0x68a,0x68a,0x68a,0x68d,0xca0,0xca8,0x68a,0xcaf,0xcb7,0x68a,0x68a,0x68a,0x68a,0xcbf,0x68a,0x68a, +0xcc4,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0xccb,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5,0x3b5, +0xccb,0xcdb,0xcd3,0xcd3,0xcd3,0xcdc,0xcdc,0xcdc,0xcdc,0x403,0x403,0x403,0x403,0x403,0x403,0x403, +0xce4,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc, +0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc, +0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc, +0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc,0xcdc, +0xcdc,0x394,0x394,0x394,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,8,7,8, +9,7,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, +7,7,7,8,9,0xa,0xa,4,4,4,0xa,0xa,0x310a,0xf20a,0xa,3, +6,3,6,6,2,2,2,2,2,2,2,2,2,2,6,0xa, +0x500a,0xa,0xd00a,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x510a, +0xa,0xd20a,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x510a, +0xa,0xd20a,0xa,0x12,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x12,0x12,0x12,0x12,0x12,7,0x12,0x12,0x12,0x12,0x12,0x12, +0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, +0x12,0x12,0x12,0x12,6,0xa,4,4,4,4,0xa,0xa,0xa,0xa,0,0x900a, +0xa,0xb2,0xa,0xa,4,4,2,2,0xa,0,0xa,0xa,0xa,2,0,0x900a, +0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xa,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xa,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0, -0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xa,0xa,0,0,0,0,0,0,0,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0, +0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0,0,0,0,0xa,0xa,0,0,0,0,0,0, -0,0,0xa,0,0,0,0,0,0xa,0xa,0,0xa,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0, +0xa,0xa,0,0,0,0,0,0,0,0,0xa,0,0,0,0,0, +0xa,0xa,0,0xa,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0xa,0,0,0,0,0,0,0,0,0, -0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0, +0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0xa,0,0,0xa,0xa,4,1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0,0,0,0,0,0,0,0,0,0,0xa,0,0,0xa,0xa,4, +1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,1,0xb1,1,0xb1,0xb1,1,0xb1,0xb1,1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,1,0xb1, +1,0xb1,0xb1,1,0xb1,0xb1,1,0xb1,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,5,5,5,5,5,5,0xa,0xa, -0xd,4,4,0xd,6,0xd,0xa,0xa,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xd,0x8ad,0xd,0xd,0xd,0x4d,0xd,0x8d,0x8d,0x8d,0x8d,0x4d,0x8d, -0x4d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x8d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x2d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x8d,0x4d,0x4d,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,5,5,5,5,5,5,5,5, -5,5,4,5,5,0xd,0x4d,0x4d,0xb1,0x8d,0x8d,0x8d,0xd,0x8d,0x8d,0x8d, -0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d, -0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x8d,0x4d,0x4d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x4d,0x8d,0x4d,0x8d, -0x4d,0x4d,0x8d,0x8d,0xd,0x8d,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,5,0xa,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xd,0xd,0xb1,0xb1,0xa,0xb1,0xb1,0xb1,0xb1,0x8d,0x8d, -2,2,2,2,2,2,2,2,2,2,0x4d,0x4d,0x4d,0xd,0xd,0x4d, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xad, -0x8d,0xb1,0x4d,0x4d,0x4d,0x8d,0x8d,0x8d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x8d,0x4d, -0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x4d,0x8d,0x4d,0x8d,0x4d,0x4d,0x8d, +5,5,5,5,5,5,0xa,0xa,0xd,4,4,0xd,6,0xd,0xa,0xa, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xd,0x8ad,0xd,0xd,0xd, +0x4d,0xd,0x8d,0x8d,0x8d,0x8d,0x4d,0x8d,0x4d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d, +0x8d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x2d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x4d,0x4d,0xb1,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xd,0xd,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x4d,0x8d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x4d,0x4d,0x4d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x8d,0x4d,0x8d,0x8d,0x4d,0x4d,0x4d, -0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +5,5,5,5,5,5,5,5,5,5,4,5,5,0xd,0x4d,0x4d, +0xb1,0x8d,0x8d,0x8d,0xd,0x8d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d, +0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x4d,0x4d,0x8d,0x8d,0x8d,0x8d,0x8d, +0x8d,0x8d,0x8d,0x8d,0x4d,0x8d,0x4d,0x8d,0x4d,0x4d,0x8d,0x8d,0xd,0x8d,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,5,0xa,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xd,0xd,0xb1, +0xb1,0xa,0xb1,0xb1,0xb1,0xb1,0x8d,0x8d,2,2,2,2,2,2,2,2, +2,2,0x4d,0x4d,0x4d,0xd,0xd,0x4d,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xad,0x8d,0xb1,0x4d,0x4d,0x4d,0x8d,0x8d,0x8d, +0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x8d,0x4d,0x8d,0x4d,0x8d,0x4d,0x4d,0x8d,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xd,0xd,0x8d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x8d,0x4d,0x4d,0x4d, +0x4d,0x8d,0x4d,0x8d,0x8d,0x4d,0x4d,0x4d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, 0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,1,1,1,1,1,1,1,1, -1,1,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0xd,0xd,0xd,0xd,0xd,0xd,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +1,1,1,1,1,1,1,1,1,1,0x41,0x41,0x41,0x41,0x41,0x41, 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, -0x41,0x41,0x41,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,1,1,0xa,0xa, -0xa,0xa,0x21,1,1,0xb1,1,1,0xb1,0xb1,0xb1,0xb1,1,0xb1,0xb1,0xb1, -1,0xb1,0xb1,0xb1,0xb1,0xb1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,0xb1,0xb1, -0xb1,0xb1,1,0xb1,0xb1,0xb1,0xb1,0xb1,0x81,0x41,0x41,0x41,0x41,0x41,0x81,0x81, -0x41,0x81,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x81,0x41,0x81,0x81, -0x81,0xb1,0xb1,0xb1,1,1,1,1,0x4d,0xd,0x4d,0x4d,0x4d,0x4d,0xd,0x8d, -0x4d,0x8d,0x8d,0xd,0xd,0xd,0xd,0xd,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d, -0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x2d,0x2d,0x2d,0x4d,0xd, -0xd,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0xd,5,5,0xd,0xd,0xd,0xd,0xd,0xd, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,5,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x4d,0x4d,0x8d,0x8d,0x8d,0xd,0x8d,0x4d,0x4d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x4d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0xd,0xb1,0xb1, +0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,1,1,0xa,0xa,0xa,0xa,0x21,1,1,0xb1,1,1, +0xb1,0xb1,0xb1,0xb1,1,0xb1,0xb1,0xb1,1,0xb1,0xb1,0xb1,0xb1,0xb1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,0xb1,0xb1,0xb1,0xb1,1,0xb1,0xb1,0xb1,0xb1,0xb1, +0x81,0x41,0x41,0x41,0x41,0x41,0x81,0x81,0x41,0x81,0x41,0x41,0x41,0x41,0x41,0x41, +0x41,0x41,0x41,0x41,0x81,0x41,0x81,0x81,0x81,0xb1,0xb1,0xb1,1,1,1,1, +0x4d,0xd,0x4d,0x4d,0x4d,0x4d,0xd,0x8d,0x4d,0x8d,0x8d,0xd,0xd,0xd,0xd,0xd, +0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d, +0x8d,0x8d,0x8d,0x2d,0x2d,0x2d,0x4d,0xd,0xd,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0xd, +5,5,0xd,0xd,0xd,0xd,0xd,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,5,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0xb1,0,0xb1,0,0,0,0,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0xb1,0,0,0,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x8d,0x8d,0xd,0x8d,0x4d, +0x4d,0x8d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0xd,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0,0, -0,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0xb1,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,4,4,0,0,0,0,0,0,0,4,0,0,0xb1,0, -0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0xb1,0xb1,0,0,0,0,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0,0, -0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xb1,0xb1,0,0,0,0xb1,0,0,0,0,0,0, -0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0,0,0, -0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0, +0xb1,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0, +0,0xb1,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0, 0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0,0,0,0, -0,0,0,0,0,4,0,0,0,0,0,0,0,0,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0xb1,0,0,0xb1,0,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0, -0,0xb1,0,0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0, -0,0,0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0, -0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,4,0xa,0, -0,0,0,0,0xb1,0,0,0,0xb1,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xb1,0,0xb1,0xb1,0xb1,0,0,0, -0,0,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0, -0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0, +0,0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xb1,0,0,0xa0,0,0,0,0, -0,0,0xa0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0,0, +0,0,0,0,0xb1,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0, +0,0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0, +0,0,0,4,0,0,0xb1,0,0,0xb1,0xb1,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0,0,0, -0,0,0,0,0,0,0xb1,0,0,0,0,0,0,0,0xb1,0xb1, -0xb1,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0, -0,0,0,4,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0xb1, +0xb1,0,0,0xb1,0xb1,0xb1,0,0,0,0xb1,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0,0, +0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1, +0xb1,0xb1,0,0xb1,0xb1,0,0,0,0,0xb1,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0, +0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0xb1,0,0xb1,0,0xb1,0x310a,0xf20a,0x310a,0xf20a,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0, -0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0,0,0,0,0,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0,0,0xb1,0xb1,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xb1,0,0,0xb1,0,0xb1,0xb1,0xb1, +0xb1,0,0,0,0,0,0,0,0,0xb1,0,0,0,0,0,0, +0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0xb1,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xb1,0xb1,0,0,0,0,0xb1,0xb1,0xb1,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1, -0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0, -0,0xb1,0xb1,0,0,0,0,0,0,0xb1,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0,0, 0,0,0,0,0,0,0,0,0,0xb1,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xa, +0xa,0xa,0xa,0xa,0xa,4,0xa,0,0,0,0,0,0xb1,0,0,0, +0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0,0,0,0, +0xb1,0,0xb1,0xb1,0xb1,0,0,0,0,0,0xb1,0xb1,0xb1,0,0xb1,0xb1, +0xb1,0xb1,0,0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0, +0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0xa,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0, +0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0x310a,0xf20a,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, +0xb1,0,0,0xa0,0,0,0,0,0,0,0xa0,0,0,0,0,0, +0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0, +0,0,0,0,0,0,0xb1,0xb1,0xb1,0,0xb1,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,4,0,0,0,0, +0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0, +0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0xb1, +0,0xb1,0x310a,0xf20a,0x310a,0xf20a,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1, +0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0,0,0,0,0,0,0,0,0xb1,0,0,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,4, -0,0xb1,0,0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, -0x40,0x40,0x40,0x40,0x40,0xb1,0x40,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0x4a,0xa,0xa,0x2a,0xb1,0xb1,0xb1,0x12,0xb1,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x40,0x40,0x40,0x40, +0,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0, +0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0,0, +0,0,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xb1,0,0,0xb1,0xb1,0,0,0,0,0, +0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0, +0,0,0,0,0xa,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x310a, +0xf20a,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xb1,0xb1,0xb1,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0, +0,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0,0,0,0,0,0,0,4,0,0xb1,0,0,0x40,0x40,0x40,0x40, 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, -0x40,0x40,0x40,0x40,0x40,0,0,0,0,0,0,0,0,0xb1,0xb1,0x40, +0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xb1,0x40,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x4a,0xa,0xa,0x2a,0xb1, +0xb1,0xb1,0x12,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, +0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0,0,0, +0,0,0,0,0,0xb1,0xb1,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, -0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xb1,0xb1,0xb1,0,0,0,0,0xb1, -0xb1,0,0,0,0,0,0,0,0,0,0xb1,0,0,0,0,0, -0,0xb1,0xb1,0xb1,0,0,0,0,0xa,0,0,0,0xa,0xa,0,0, +0xb1,0xb1,0xb1,0,0,0,0,0xb1,0xb1,0,0,0,0,0,0,0, +0,0,0xb1,0,0,0,0,0,0,0xb1,0xb1,0xb1,0,0,0,0, +0xa,0,0,0,0xa,0xa,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa, +0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0xb1,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xb1,0,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0,0xb1,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0, +0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0,0xb1, +0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xb1,0,0xb1,0xb1,0,0,0,0xb1,0,0xb1, +0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0xb1,0,0,0,0,0,0, +0xb1,0,0,0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xa,0,0xa,0xa,0xa,0,0,0,0,0,0, +0,0,0,0,0,0xa,0xa,0xa,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xa,0xa,0xa,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xa,0xa,0,0xa,0xa,0xa,0xa,6,0x310a,0xf20a,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,9,0xb2,0xb2,0xb2,0xb2,0xb2,0x12,0x814,0x815, +0x813,0x816,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,2,0,0,0,2,2,2,2, +2,2,3,3,0xa,0x310a,0xf20a,0,9,9,9,9,9,9,9,9, +9,9,9,0xb2,0x412,0x432,0x8a0,0x8a1,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,9,7,0x8ab,0x8ae,0x8b0,0x8ac,0x8af,6, +4,4,4,4,4,0xa,0xa,0xa,0xa,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa, +2,2,2,2,2,2,2,2,2,2,3,3,0xa,0x310a,0xf20a,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xb1,0,0,0xb1,0,0,0,0, +4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xa,0xa,0,0xa,0xa,0xa,0xa,0,0xa,0xa,0,0,0,0,0,0, +0,0,0,0,0xa,0,0xa,0xa,0xa,0,0,0,0,0,0xa,0xa, +0xa,0xa,0xa,0xa,0,0xa,0,0xa,0,0xa,0,0,0,0,4,0, +0,0,0,0,0,0,0,0,0,0,0xa,0xa,0,0,0,0, +0x100a,0xa,0xa,0xa,0xa,0,0,0,0,0,0xa,0xa,0xa,0xa,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0,0,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa, +0x300a,0xf00a,0x900a,0x900a,0x900a,0x100a,0x900a,0x900a,0x100a,0x100a,0x900a,0x900a,0x900a,0x900a,0x900a,0x100a, +0xa,0x100a,0x100a,0x100a,0x100a,0xa,0xa,0xa,0x700a,0x700a,0x700a,0xb00a,0xb00a,0xb00a,0xa,0xa, +0xa,0x100a,3,4,0xa,0x900a,0x100a,0xa,0xa,0xa,0x100a,0x100a,0x100a,0x100a,0xa,0x900a, +0x900a,0x900a,0x900a,0xa,0x900a,0xa,0x100a,0xa,0xa,0xa,0xa,0x100a,0x100a,0x100a,0x100a,0x100a, +0x100a,0x100a,0x100a,0x100a,0xa,0xa,0xa,0xa,0xa,0x100a,0xa,0x100a,0x300a,0xf00a,0x100a,0x100a, +0x100a,0x100a,0x100a,0x900a,0x100a,0x900a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x900a,0xa,0xa,0xa, +0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a, +0x100a,0xa,0x100a,0xa,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa,0x100a,0x300a,0xf00a, +0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a, +0x100a,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0x900a,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0xa,0xa,0x900a,0x100a,0x900a,0x900a,0x100a,0x900a, +0x100a,0x100a,0x100a,0x100a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x900a,0xa,0xa,0xa, +0xa,0xa,0x100a,0x100a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x300a, +0xf00a,0x900a,0xa,0xa,0x300a,0xf00a,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a, +0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0x100a,0x100a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x310a,0xf20a,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0,0xb1,0, -0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0, +0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, -0xb1,0xb1,0,0,0xb1,0xb1,0,0xb1,0xb1,0xb1,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0, -0xb1,0xb1,0,0,0,0xb1,0,0xb1,0xb1,0xb1,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0,0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0, -0,0xb1,0,0,0,0,0,0,0xb1,0,0,0,0xb1,0xb1,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0,0xa, -0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa, -0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa, -0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0, -0xa,0xa,0xa,0xa,6,0x310a,0xf20a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,9, -0xb2,0xb2,0xb2,0xb2,0xb2,0x12,0x814,0x815,0x813,0x816,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2, -2,0,0,0,2,2,2,2,2,2,3,3,0xa,0x310a,0xf20a,0, -9,9,9,9,9,9,9,9,9,9,9,0xb2,0x412,0x432,0x8a0,0x8a1, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -9,7,0x8ab,0x8ae,0x8b0,0x8ac,0x8af,6,4,4,4,4,4,0xa,0xa,0xa, -0xa,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,2,2,2,2,2,2,2,2, -2,2,3,3,0xa,0x310a,0xf20a,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,4,4,4,4,4,4,4,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa,0xa,0,0xa,0xa,0xa,0xa,0, -0xa,0xa,0,0,0,0,0,0,0,0,0,0,0xa,0,0xa,0xa, -0xa,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa,0,0xa, -0,0xa,0,0,0,0,4,0,0,0,0,0,0,0,0,0, -0,0,0xa,0xa,0,0,0,0,0x100a,0xa,0xa,0xa,0xa,0,0,0, -0,0,0xa,0xa,0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, -0,0xa,0xa,0xa,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a, -0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0x300a,0xf00a,0x900a,0x900a,0x900a,0x100a,0x900a,0x900a, -0x100a,0x100a,0x900a,0x900a,0x900a,0x900a,0x900a,0x100a,0xa,0x100a,0x100a,0x100a,0x100a,0xa,0xa,0xa, -0x700a,0x700a,0x700a,0xb00a,0xb00a,0xb00a,0xa,0xa,0xa,0x100a,3,4,0xa,0x900a,0x100a,0xa, -0xa,0xa,0x100a,0x100a,0x100a,0x100a,0xa,0x900a,0x900a,0x900a,0x900a,0xa,0x900a,0xa,0x100a,0xa, -0xa,0xa,0xa,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0xa,0xa,0xa,0xa, -0xa,0x100a,0xa,0x100a,0x300a,0xf00a,0x100a,0x100a,0x100a,0x100a,0x100a,0x900a,0x100a,0x900a,0x100a,0x100a, -0x100a,0x100a,0x100a,0x100a,0x900a,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a,0x100a,0xa,0x100a,0xa,0x300a,0xf00a,0x300a,0xf00a, -0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a, -0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x100a,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0xa, -0xa,0xa,0xa,0xa,0x900a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a, -0xa,0xa,0x900a,0x100a,0x900a,0x900a,0x100a,0x900a,0x100a,0x100a,0x100a,0x100a,0x300a,0xf00a,0x300a,0xf00a, -0x300a,0xf00a,0x300a,0xf00a,0x900a,0xa,0xa,0xa,0xa,0xa,0x100a,0x100a,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x900a,0xa,0xa,0x300a,0xf00a,0xa,0xa, -0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a,0x100a,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0x310a,0xf20a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xa, +0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a,0xa,0xa,0x300a,0xf00a,0x310a,0xf20a,0xa, +0x300a,0xf00a,0xa,0x500a,0x100a,0xd00a,0xa,0xa,0xa,0xa,0xa,0x100a,0x100a,0x300a,0xf00a,0xa, +0xa,0xa,0xa,0xa,0x900a,0x300a,0xf00a,0xa,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x310a,0xf20a, +0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a,0xa,0x100a,0x100a,0x100a,0xa,0xa, +0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a,0x900a,0x100a,0x100a, +0x300a,0xf00a,0xa,0xa,0x310a,0xf20a,0xa,0xa,0xa,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a,0x310a, +0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x710a,0x320a,0xf10a,0xb20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a, +0xf20a,0xa,0xa,0x900a,0x100a,0x100a,0x100a,0x100a,0x900a,0xa,0x100a,0x900a,0x300a,0xf00a,0x100a,0x100a, +0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0x900a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x100a,0x100a,0x300a,0xf00a,0xa,0xa, +0xa,0x100a,0xa,0xa,0xa,0xa,0x100a,0x300a,0xf00a,0x300a,0xf00a,0xa,0x300a,0xf00a,0xa,0xa, +0x310a,0xf20a,0x310a,0xf20a,0x100a,0xa,0xa,0xa,0xa,0xa,0x100a,0x900a,0x900a,0x900a,0x100a,0xa, +0xa,0xa,0xa,0xa,0x300a,0xf00a,0x900a,0xa,0xa,0xa,0xa,0x100a,0xa,0xa,0xa,0x300a, +0xf00a,0x300a,0xf00a,0x100a,0xa,0x100a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a, +0x100a,0x100a,0x100a,0x100a,0x100a,0xa,0x100a,0x100a,0x100a,0x100a,0xa,0xa,0x100a,0xa,0x100a,0xa, +0xa,0x100a,0xa,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0xa,0xa, +0xa,0xa,0xa,0xa,0x300a,0xf00a,0x100a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a, +0x100a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0xa,0xa,0xa,0xa,0x100a,0x100a, +0x100a,0x100a,0xa,0x100a,0x100a,0xa,0xa,0x100a,0x100a,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x300a, +0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a, +0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a, +0xf00a,0x300a,0xf00a,0x100a,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa,0x300a, +0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a, +0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0x100a,0xa,0x900a,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a, -0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0x100a,0xa,0xa,0x300a,0xf00a,0x310a,0xf20a,0xa,0x300a,0xf00a,0xa,0x500a,0x100a,0xd00a,0xa,0xa, -0xa,0xa,0xa,0x100a,0x100a,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0x900a,0x300a,0xf00a,0xa, -0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a, +0xa,0xa,0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0x100a,0xa,0x100a,0x100a,0x100a,0xa,0xa,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0x100a,0x900a,0x100a,0x100a,0x300a,0xf00a,0xa,0xa,0x310a,0xf20a,0xa,0xa, -0xa,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x710a,0x320a,0xf10a, -0xb20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0x900a,0x100a,0x100a,0x100a,0x100a, -0x900a,0xa,0x100a,0x900a,0x300a,0xf00a,0x100a,0x100a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x900a,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0x300a,0xf00a,0x100a,0x100a,0x300a,0xf00a,0xa,0xa,0xa,0x100a,0xa,0xa,0xa,0xa,0x100a,0x300a, -0xf00a,0x300a,0xf00a,0xa,0x300a,0xf00a,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a,0x100a,0xa,0xa,0xa, -0xa,0xa,0x100a,0x900a,0x900a,0x900a,0x100a,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x900a,0xa, -0xa,0xa,0xa,0x100a,0xa,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x100a,0xa,0x100a,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a, -0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0x100a,0xa,0x100a,0x100a, -0x100a,0x100a,0xa,0xa,0x100a,0xa,0x100a,0xa,0xa,0x100a,0xa,0x300a,0xf00a,0x300a,0xf00a,0xa, -0xa,0xa,0xa,0xa,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x100a,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x900a,0xa, +0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0xb1, +0xb1,0xb1,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa,0xa,0x300a,0xf00a,0xa,0x300a,0xf00a,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x300a,0xf00a,0xa,0xa, +0x300a,0xf00a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x100a,0x100a,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0x300a,0xf00a,0xa,0xa,0xa,0xa,0x100a,0x100a,0x100a,0x100a,0xa,0x100a,0x100a,0xa,0xa,0x100a, -0x100a,0xa,0xa,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a, -0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a, -0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x100a,0xa,0xa,0x300a,0xf00a, -0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a, -0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0x300a,0xf00a,0xa, -0xa,0xa,0xa,0xa,0x100a,0xa,0x900a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0xa,0xa, +0xa,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0,0,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0x900a,0xa,0,0,0,0,0,0xa,0xa,0xa, -0xa,0xa,0xa,0,0,0,0,0xb1,0xb1,0xb1,0,0,0,0,0,0, -0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xa,0xa,0x300a,0xf00a,0x300a,0xf00a,0xa,0xa, -0xa,0x300a,0xf00a,0xa,0x300a,0xf00a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0x300a,0xf00a,0xa,0xa,0x300a,0xf00a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a, -0x310a,0xf20a,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a, -0xf20a,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0, -0,0,0xb1,0xb1,0xb1,0xb1,0,0,0xa,0,0,0,0,0,0xa,0xa, -0,0,0,0,0,0xa,0xa,0xa,9,0xa,0xa,0xa,0xa,0,0,0, -0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a, -0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0xb1,0xb1,0xa,0xa,0,0,0,0xa,0xa,0xa,0xa,0,0,0,0, -0,0,0,0,0,0,0,0xa,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, -0,0,0,0,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xa, -0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xa,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa,0xa,0,0,0,0,0,0,0,0, +0xa,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0, +0xa,0,0,0,0,0,0xa,0xa,0,0,0,0,0,0xa,0xa,0xa, +9,0xa,0xa,0xa,0xa,0,0,0,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a, +0x310a,0xf20a,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0xa,0xa, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0,0,0,0, -0xa,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0xb1,0,0,0,0xb1,0, -0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0xb1,0xb1,0,0xa,0xa,0xa,0xa, -0xb1,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0, -0,0,0,0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, -0x40,0x40,0x40,0x40,0x40,0x40,0x60,0,0xa,0xa,0xa,0xa,0,0,0,0, -0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0, -0,0,0,0xb1,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0,0, -0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0,0,0xb1,0xb1,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0,0,0,0,0,0,0,0, -0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xb1,0,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0,0,0, -0,0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, -0xb1,0xb1,0,0,0,0,0,0,0,0,0xb1,0,0,0,0,0, -0,0,0,0,0,0,0xa,0xa,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0, -0xb1,0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, -1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xa,0xa,0,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0xa, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0xb1,0xb1,0xb1,0xa,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa,0xa, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, +0,0,0,0,0,0,0,0,0xa,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xb1,0,0,0,0xb1,0,0,0,0,0xb1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,1,0xb1,1,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0,0xb1,0xb1,0,0xa,0xa,0xa,0xa,0xb1,0,0,0,0,0,0,0, +0,0,0,0,4,4,0,0,0,0,0,0,0x40,0x40,0x40,0x40, +0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x60,0, +0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0,0,0, +0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0,0,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0,0,0,0,0,0, +0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0, +0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0,0,0,0,0,0,0,0,0xb1,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0xb1,0xb1, +0xb1,0,0,0xb1,0xb1,0,0,0,0,0,0xb1,0xb1,0,0,0,0, +0,0,0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0,0, +0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0xb1,0,0,0xb1,0,0,0,0,0xb1,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,1,0xb1,1, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, 0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xa,0x12,0x12,0x12,0x12, -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xa,0xa,0xa,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,6,0xa,6,0, -0xa,6,0xa,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,4,0xa,0xa,3,3, -0x300a,0xf00a,0xa,0,0xa,4,4,0xa,0,0,0,0,0xd,0xd,0xd,0xd, +0xd,0xd,0xd,0xa,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, +0x12,0x12,0x12,0x12,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0xd,0xa,0xa,0xa,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0, +0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,6,0xa,6,0,0xa,6,0xa,0xa,0xa,0x310a,0xf20a,0x310a, +0xf20a,0x310a,0xf20a,4,0xa,0xa,3,3,0x300a,0xf00a,0xa,0,0xa,4,4,0xa, +0,0,0,0,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, 0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xb2,0,0xa,0xa,4, -4,4,0xa,0xa,0x310a,0xf20a,0xa,3,6,3,6,6,2,2,2,2, -2,2,2,2,2,2,6,0xa,0x500a,0xa,0xd00a,0xa,0xa,0,0,0, +0xd,0xd,0xd,0xb2,0,0xa,0xa,4,4,4,0xa,0xa,0x310a,0xf20a,0xa,3, +6,3,6,6,2,2,2,2,2,2,2,2,2,2,6,0xa, +0x500a,0xa,0xd00a,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x510a, +0xa,0xd20a,0xa,0x310a,0xf20a,0xa,0x310a,0xf20a,0xa,0xa,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0x510a,0xa,0xd20a,0xa,0x310a,0xf20a,0xa,0x310a,0xf20a, -0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,4,4,0xa,0xa, -0xa,4,4,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0x12,0x12,0x12,0x12, -0x12,0x12,0x12,0x12,0x12,0xaa,0xaa,0xaa,0xa,0xa,0x12,0x12,0,0xa,0,0, +0,0,0,0,4,4,0xa,0xa,0xa,4,4,0,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xaa,0xaa,0xaa, +0xa,0xa,0x12,0x12,0,0xa,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0xb1,2,2,2, +0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0,0,0,0xb1,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, -0xb1,0xb1,0xb1,0,0,0,0,0,1,1,1,1,1,1,1,1, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,0xa,1,0xb1,0xb1,0xb1,1,0xb1,0xb1,1, -1,1,1,1,0xb1,0xb1,0xb1,0xb1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0xa, +1,0xb1,0xb1,0xb1,1,0xb1,0xb1,1,1,1,1,1,0xb1,0xb1,0xb1,0xb1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -0xb1,0xb1,0xb1,1,1,1,1,0xb1,0x41,0x81,1,1,0x81,0xb1,0xb1,1, -1,1,1,0x41,0x41,0x41,0x41,0x81,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,0x41,0x41,0x41,0x41,0x41,0x81,1,0x81, -1,0x81,0x81,1,1,0x61,0x81,0x81,0x81,0x81,0x81,0x41,0x41,0x41,0x41,0x61, -0x41,0x41,0x41,0x41,0x41,0x81,0x41,0x41,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0xb1,0xb1,0xb1,1,1,1,1,0xb1, +0x41,0x81,1,1,0x81,0xb1,0xb1,1,1,1,1,0x41,0x41,0x41,0x41,0x81, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0x41,0x81,0x41,0x81,0x81,0x81,0x41,0x41, -0x41,0x81,0x41,0x41,0x81,0x41,0x81,0x81,0x41,0x81,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,0x81,0x81,0x81,0x81,0x41,0x41,1, +0x41,0x41,0x41,0x41,0x41,0x81,1,0x81,1,0x81,0x81,1,1,0x61,0x81,0x81, +0x81,0x81,0x81,0x41,0x41,0x41,0x41,0x61,0x41,0x41,0x41,0x41,0x41,0x81,0x41,0x41, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -0x4d,0x4d,0x8d,0x4d,0xb1,0xb1,0xb1,0xb1,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -5,5,5,5,5,5,5,5,5,5,0xd,0xd,0xd,0xd,0xd,0xd, -0x6d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +1,1,1,1,1,1,1,1,1,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0x41,0x81,0x41,0x81,0x81,0x81,0x41,0x41,0x41,0x81,0x41,0x41,0x81,0x41,0x81,0x81, +0x41,0x81,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,0x81,0x81,0x81,0x81,0x41,0x41,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0x4d,0x4d,0x8d,0x4d,0xb1,0xb1,0xb1,0xb1, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,5,5,5,5,5,5,5,5, +5,5,0xd,0xd,0xd,0xd,0xd,0xd,0x6d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, 0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,1,1,1,1,1,1,1,1, +1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5, +5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1, -1,1,1,1,1,1,1,1,1,1,1,0xb1,0xb1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1, +1,1,1,0xb1,0xb1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, 0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xb1,0xb1,0xb1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -0x4d,0x4d,0x4d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, -0x4d,0xd,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x4d,0x4d,0x4d, -0x8d,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0x41,0x41,0x41,0x41,0x81,0x81,0x41,0x41,0x41,0x41,0x41,0x41, -0x41,0x41,0x41,0x41,0x41,0x41,0xb1,0xb1,0xb1,0xb1,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,0x41,1,0x41,0x41,0x81,0x81,0x81,1,0x41,0x81,0x81,0x41, -0x41,0x81,0x41,0x41,1,0x41,0x81,0x81,0x41,1,1,1,1,0x81,0x41,0x61, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0, -0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0,0,0,0,0,0,0,0,0,0,0xb1,0,0,0xb1, -0xb1,0,0,0,0,0,0,0,0,0,0,0xb1,0,0,0,0, +0xd,0xd,0xd,0xd,0xb1,0xb1,0xb1,0xb1,0xd,0xd,0x8d,0x4d,0x4d,0xd,0xd,0xd, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0x4d,0x4d,0x4d,0x8d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0xd,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0x4d,0x4d,0x4d,0x8d,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0x41,0x41,0x41,0x41, +0x81,0x81,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0xb1,0xb1, +0xb1,0xb1,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,0x41,1,0x41,0x41, +0x81,0x81,0x81,1,0x41,0x81,0x81,0x41,0x41,0x81,0x41,0x41,1,0x41,0x81,0x81, +0x41,1,1,1,1,0x81,0x41,0x61,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0, +0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0, +0,0,0,0,0xb1,0,0,0xb1,0xb1,0,0,0,0,0,0,0, +0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0, +0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xb1,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0, +0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, -0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0,0,0,0,0,0,0,0,0xb1, -0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0, +0xb1,0xb1,0,0,0xb1,0,0xb1,0xb1,0,0,0,0,0,0,0xb1,0, +0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1, -0xb1,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0,0,0xb1,0,0xb1,0xb1, -0,0,0,0,0,0,0xb1,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0, +0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0xb1,0xb1,0xb1,0xb1, +0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xb1,0,0xb1,0,0xb1,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0xb1,0xb1,0xb1,0,0xb1,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -698,41 +711,41 @@ static const uint16_t ubidi_props_trieIndex[13008]={ 0,0xb1,0,0xb1,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, 0xa,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0xb1,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0,0xb1,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, -0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0, +0xb1,0xb1,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0xb1,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0,0,0,0,0, +0xb1,0,0xb1,0,0,0,0,0xb1,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xb1,0,0xb1,0,0,0,0,0xb1, +0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0,0,0,0, +0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa0,0xa0,0xb1,0xb1,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, -0,0,0xb1,0xb1,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa0, -0xa0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0xb1, -0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0, -0,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xa0, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0,0xb1,0xb1,0,0xb1,0xb1,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0, -0,0,0xb1,0,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1, +0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0, +0,0,0,0,0,0,0,0xb1,0,0,0,0,0,0,0,0, +0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0,0,0,0, +0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xa0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0,0xb1,0xb1,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xb1,0xb1,0,0,0,0xb1,0,0xb1, -0,0,0,0,0,0,0,0,0xb1,0,0xb1,0,0,0,0,0, +0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0, +0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0xb1,0,0xb1,0xb1,0,0xb1, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,4,4,4,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xa0,0xa0,0xa0,0xa0, -0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xb1,0,0,0, -0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xb1,0xb1,0,0,0,0xb1,0,0xb1,0,0,0,0,0,0,0,0, +4,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0, +0xa0,0xa0,0xa0,0xa0,0xb1,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0, +0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0, +0,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -741,6 +754,7 @@ static const uint16_t ubidi_props_trieIndex[13008]={ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0xb2,0xb2,0xb2,0xb2,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,2,2,2,2,2,2,2,2,2,2,0,0, 0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0,0, @@ -754,79 +768,80 @@ static const uint16_t ubidi_props_trieIndex[13008]={ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0, +0,0,0,0,0,0xa,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x100a, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0x100a,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0x100a,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0x100a,0,0,0,0,0,0,0,0, -0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +0,0,0,0,0,0x100a,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x100a,0,0,0,0, +0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0, -0,0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0, -0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1, -0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1, +2,2,2,2,2,2,2,2,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0, +0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0,0,0,0,0,0,0,0,0xb1,0,0,0,0,0,0, +0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1, +0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,1,1,1,1,1,1,1,1,1, -0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1, +0xb1,0xb1,0,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, +0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0xb1,0xb1,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,1, +1,1,1,1,1,1,1,1,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,0xd,0xd,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xa,0xa,0xd,0xd, -0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0, -0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -2,2,2,2,2,2,2,2,2,2,2,0xa,0xa,0xa,0xa,0xa, +0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0xd,0xd,0xd,0xd,0xa,0xa,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, +0xd,0xd,0xd,0xd,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,2,2,2,2,2,2,2,2, +2,2,2,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0xa,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, +0,0xa,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0, -0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0xa,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0, -0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0,0,0,0,0xa,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0, -0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0, -0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0, -0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0,0,0xa,0xa,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0xa,0xa,0xa,0xa, +0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2, -2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, +2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0x12,0x12,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2, +0,0,0,0,0,0,0,0,0,0,0x12,0x12,0xb2,0xb2,0xb2,0xb2, 0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2, -0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0x12,0xb2,0x12,0x12,0x12,0x12,0x12,0x12, +0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0x12,0xb2,0x12,0x12, +0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x12,0x12,0x12,0x12, -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0,0,0,0 +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, +0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, +0,0,0,0 }; static const uint32_t ubidi_props_mirrors[40]={ @@ -835,8 +850,8 @@ static const uint32_t ubidi_props_mirrors[40]={ 0x16029b8,0x4029f5,0x1802ade,0x1c02ae3,0x1a02ae4,0x1e02ae5,0xe02aee,0x602bfe }; -static const uint8_t ubidi_props_jgArray[684]={ -0x2d,0,3,3,0x2c,3,0x2d,3,4,0x2a,4,4,0xd,0xd,0xd,6, +static const uint8_t ubidi_props_jgArray[683]={ +0x68,0,3,3,0x2c,3,0x2d,3,4,0x2a,4,4,0xd,0xd,0xd,6, 6,0x1f,0x1f,0x23,0x23,0x21,0x21,0x28,0x28,1,1,0xb,0xb,0x37,0x37,0x37, 0,9,0x1d,0x13,0x16,0x18,0x1a,0x10,0x2c,0x2d,0x2d,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -878,10 +893,10 @@ static const uint8_t ubidi_props_jgArray[684]={ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 4,4,0xd,0x28,9,0x1d,0x16,0x18,0x2d,0x2d,0x1f,0x2c,0x39,0,6,0x21, 0xb,0x55,0x1f,1,0x13,0x1d,4,4,4,0x1f,0x2d,0x56,0x58,0x57,4,4, -4,0xd,0xb,1,0x58,0xd,0xd,0x16,0xb,0,0,0 +4,0xd,0xb,1,0x58,0xd,0xd,0x16,0xb,0,0 }; -static const uint8_t ubidi_props_jgArray2[612]={ +static const uint8_t ubidi_props_jgArray2[1029]={ 0x3a,0x3c,0x3c,0x40,0x40,0x3d,0,0x52,0,0x54,0x54,0,0,0x41,0x4f,0x53, 0x43,0x43,0x43,0x44,0x3e,0x50,0x45,0x46,0x4c,0x3b,0x3b,0x48,0x48,0x4b,0x49,0x49, 0x49,0x4a,0,0,0x4d,0,0,0,0,0,0,0x47,0x3f,0x4e,0x51,0x42, @@ -920,7 +935,33 @@ static const uint8_t ubidi_props_jgArray2[612]={ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0x65,0,0,0,0,0,0,0x65,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0x64,0,0,0x65,0,0x64,0, -0x64,0,0,0x64 +0x64,0,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,6,0x28,0x13 }; static const UBiDiProps ubidi_props_singleton={ @@ -931,16 +972,16 @@ static const UBiDiProps ubidi_props_singleton={ ubidi_props_jgArray2, { ubidi_props_trieIndex, - ubidi_props_trieIndex+3612, + ubidi_props_trieIndex+3668, nullptr, - 3612, - 9396, + 3668, + 9568, 0x1a0, - 0xe9c, + 0xed4, 0x0, 0x0, 0x110000, - 0x32cc, + 0x33b0, nullptr, 0, false, false, 0, nullptr }, { 2,2,0,0 } diff --git a/deps/icu-small/source/common/ubiditransform.cpp b/deps/icu-small/source/common/ubiditransform.cpp index 01f5901a2c2f6a..a39cc3100d2b29 100644 --- a/deps/icu-small/source/common/ubiditransform.cpp +++ b/deps/icu-small/source/common/ubiditransform.cpp @@ -233,7 +233,7 @@ updateSrc(UBiDiTransform *pTransform, const char16_t *newSrc, uint32_t newLength uprv_free(pTransform->src); pTransform->src = nullptr; } - pTransform->src = (char16_t *)uprv_malloc(newSize * sizeof(char16_t)); + pTransform->src = static_cast<char16_t*>(uprv_malloc(newSize * sizeof(char16_t))); if (pTransform->src == nullptr) { *pErrorCode = U_MEMORY_ALLOCATION_ERROR; //pTransform->srcLength = pTransform->srcSize = 0; @@ -499,7 +499,7 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform, /* Checking for U_SUCCESS() within the loop to bail out on first failure. */ for (action = pBiDiTransform->pActiveScheme->actions; *action && U_SUCCESS(*pErrorCode); action++) { if ((*action)(pBiDiTransform, pErrorCode)) { - if (action + 1) { + if (action[1] != nullptr) { updateSrc(pBiDiTransform, pBiDiTransform->dest, *pBiDiTransform->pDestLength, *pBiDiTransform->pDestLength, pErrorCode); } diff --git a/deps/icu-small/source/common/ubidiwrt.cpp b/deps/icu-small/source/common/ubidiwrt.cpp index 969807c24376aa..209b140722cbad 100644 --- a/deps/icu-small/source/common/ubidiwrt.cpp +++ b/deps/icu-small/source/common/ubidiwrt.cpp @@ -501,7 +501,10 @@ ubidi_writeReordered(UBiDi *pBiDi, destSize-=runLength; if((pBiDi->isInverse) && - (/*run<runCount-1 &&*/ dirProps[logicalStart+runLength-1]!=L)) { + (/*run<runCount-1 &&*/ + runLength > 0 && // doWriteForward may return 0 if src + // only include bidi control chars + dirProps[logicalStart+runLength-1]!=L)) { markFlag |= LRM_AFTER; } if (markFlag & LRM_AFTER) { @@ -632,7 +635,10 @@ ubidi_writeReordered(UBiDi *pBiDi, } destSize-=runLength; - if(/*run>0 &&*/ !(MASK_R_AL&DIRPROP_FLAG(dirProps[logicalStart+runLength-1]))) { + if(/*run>0 &&*/ + runLength > 0 && // doWriteForward may return 0 if src + // only include bidi control chars + !(MASK_R_AL&DIRPROP_FLAG(dirProps[logicalStart+runLength-1]))) { if(destSize>0) { *dest++=RLM_CHAR; } diff --git a/deps/icu-small/source/common/ucase.cpp b/deps/icu-small/source/common/ucase.cpp index 4fd23fc935c555..5a2feaee840b34 100644 --- a/deps/icu-small/source/common/ucase.cpp +++ b/deps/icu-small/source/common/ucase.cpp @@ -38,7 +38,7 @@ static UBool U_CALLCONV _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 /*end*/, uint32_t /*value*/) { /* add the start code point to the USet */ - const USetAdder *sa=(const USetAdder *)context; + const USetAdder* sa = static_cast<const USetAdder*>(context); sa->add(sa->set, start); return true; } @@ -696,17 +696,17 @@ getDotType(UChar32 c) { U_CAPI UBool U_EXPORT2 ucase_isSoftDotted(UChar32 c) { - return (UBool)(getDotType(c)==UCASE_SOFT_DOTTED); + return getDotType(c)==UCASE_SOFT_DOTTED; } U_CAPI UBool U_EXPORT2 ucase_isCaseSensitive(UChar32 c) { uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c); if(!UCASE_HAS_EXCEPTION(props)) { - return (UBool)((props&UCASE_SENSITIVE)!=0); + return (props&UCASE_SENSITIVE)!=0; } else { const uint16_t *pe=GET_EXCEPTIONS(&ucase_props_singleton, props); - return (UBool)((*pe&UCASE_EXC_SENSITIVE)!=0); + return (*pe&UCASE_EXC_SENSITIVE)!=0; } } @@ -1623,12 +1623,12 @@ ucase_toFullFolding(UChar32 c, U_CAPI UBool U_EXPORT2 u_isULowercase(UChar32 c) { - return (UBool)(UCASE_LOWER==ucase_getType(c)); + return UCASE_LOWER==ucase_getType(c); } U_CAPI UBool U_EXPORT2 u_isUUppercase(UChar32 c) { - return (UBool)(UCASE_UPPER==ucase_getType(c)); + return UCASE_UPPER==ucase_getType(c); } /* Transforms the Unicode character to its lower case equivalent.*/ diff --git a/deps/icu-small/source/common/ucase_props_data.h b/deps/icu-small/source/common/ucase_props_data.h index 92b59520cc507a..ce61f5c0646783 100644 --- a/deps/icu-small/source/common/ucase_props_data.h +++ b/deps/icu-small/source/common/ucase_props_data.h @@ -9,145 +9,145 @@ #ifdef INCLUDED_FROM_UCASE_CPP -static const UVersionInfo ucase_props_dataVersion={0xf,1,0,0}; +static const UVersionInfo ucase_props_dataVersion={0x10,0,0,0}; -static const int32_t ucase_props_indexes[UCASE_IX_TOP]={0x10,0x76ec,0x66c8,0x680,0x172,0,0,0,0,0,0,0,0,0,0,3}; +static const int32_t ucase_props_indexes[UCASE_IX_TOP]={0x10,0x78bc,0x6888,0x688,0x172,0,0,0,0,0,0,0,0,0,0,3}; -static const uint16_t ucase_props_trieIndex[13148]={ -0x355,0x35d,0x365,0x36d,0x37b,0x383,0x38b,0x393,0x39b,0x3a3,0x3aa,0x3b2,0x3ba,0x3c2,0x3ca,0x3d2, -0x3d8,0x3e0,0x3e8,0x3f0,0x3f8,0x400,0x408,0x410,0x418,0x420,0x428,0x430,0x438,0x440,0x448,0x450, -0x458,0x460,0x468,0x470,0x478,0x480,0x488,0x490,0x48c,0x494,0x499,0x4a1,0x4a8,0x4b0,0x4b8,0x4c0, -0x4c8,0x4d0,0x4d8,0x4e0,0x374,0x37c,0x4e5,0x4ed,0x4f2,0x4fa,0x502,0x50a,0x509,0x511,0x516,0x51e, -0x526,0x52d,0x531,0x374,0x538,0x355,0x548,0x540,0x550,0x552,0x55a,0x562,0x566,0x567,0x56f,0x577, -0x57f,0x567,0x587,0x58c,0x57f,0x567,0x594,0x59c,0x566,0x5a4,0x5ac,0x5b4,0x5bc,0x374,0x5c4,0x374, -0x5cc,0x5ce,0x5d6,0x5b4,0x566,0x5a4,0x5dd,0x5b4,0x5e5,0x5e7,0x56f,0x5b4,0x566,0x374,0x5ef,0x374, -0x374,0x5f5,0x5fc,0x374,0x374,0x600,0x608,0x374,0x60c,0x613,0x374,0x61a,0x622,0x629,0x631,0x374, -0x374,0x636,0x63e,0x646,0x64e,0x656,0x65d,0x665,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x66d,0x374,0x374,0x67d,0x67d,0x675, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x685,0x68b,0x573,0x573,0x374,0x691,0x699,0x374, -0x6a1,0x374,0x6a9,0x374,0x6b0,0x6b6,0x374,0x374,0x374,0x6be,0x374,0x374,0x374,0x374,0x374,0x374, -0x6c5,0x374,0x6cc,0x6d4,0x374,0x6dc,0x6e4,0x374,0x5a3,0x6e8,0x6f0,0x6f6,0x5e5,0x6fe,0x374,0x705, -0x374,0x70a,0x374,0x710,0x718,0x71c,0x724,0x72c,0x734,0x739,0x73c,0x744,0x754,0x74c,0x764,0x75c, -0x39b,0x76c,0x39b,0x774,0x777,0x39b,0x77f,0x39b,0x787,0x78f,0x797,0x79f,0x7a7,0x7af,0x7b7,0x7bf, -0x7c7,0x7ce,0x374,0x7d6,0x7de,0x374,0x7e6,0x7ee,0x7f6,0x7fe,0x806,0x80e,0x816,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x819,0x81f,0x825,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x82d,0x831,0x835,0x83d,0x39b,0x39b,0x39b,0x845,0x84d,0x854,0x374,0x859,0x374,0x374,0x374,0x861, -0x374,0x6a6,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x565,0x869,0x374,0x374,0x870,0x374,0x374,0x878,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x880,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x710,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x886,0x374,0x88e,0x893,0x89b,0x374,0x374,0x8a3,0x8ab,0x8b3,0x39b,0x8b8,0x8c0,0x8c6,0x8cd,0x8d4, -0x8dc,0x8e3,0x374,0x374,0x374,0x374,0x8ea,0x8f2,0x374,0x8fa,0x901,0x374,0x550,0x906,0x90e,0x6b0, -0x374,0x914,0x91c,0x920,0x374,0x928,0x930,0x938,0x374,0x93e,0x942,0x94a,0x95a,0x952,0x374,0x962, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x96a,0x374,0x374,0x374,0x374,0x972,0x550,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x977,0x97f,0x983,0x374,0x374,0x374,0x374,0x357,0x35d,0x98b,0x993,0x99a,0x50b,0x374,0x374,0x9a2, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0xdd4,0xdd4,0xdec,0xe2c,0xe6c,0xea8,0xee8,0xf28,0xf60,0xfa0,0xfe0,0x1020,0x1060,0x10a0,0x10e0,0x1120, -0x1160,0x11a0,0x11e0,0x1220,0x1230,0x1264,0x12a0,0x12e0,0x1320,0x1360,0xdd0,0x1394,0x13c8,0x1408,0x1424,0x1458, -0x9e1,0xa1f,0xa5f,0xa9e,0x188,0x188,0xad9,0x188,0x188,0x188,0x188,0x188,0x188,0xb02,0x188,0x188, -0x188,0x188,0x188,0x188,0x188,0xb42,0x188,0xb82,0x188,0xba8,0xbe3,0xc22,0xc62,0xc9c,0xcd3,0x188, +static const uint16_t ucase_props_trieIndex[13372]={ +0x363,0x36b,0x373,0x37b,0x389,0x391,0x399,0x3a1,0x3a9,0x3b1,0x3b8,0x3c0,0x3c8,0x3d0,0x3d8,0x3e0, +0x3e6,0x3ee,0x3f6,0x3fe,0x406,0x40e,0x416,0x41e,0x426,0x42e,0x436,0x43e,0x446,0x44e,0x456,0x45e, +0x466,0x46e,0x476,0x47e,0x486,0x48e,0x496,0x49e,0x49a,0x4a2,0x4a7,0x4af,0x4b6,0x4be,0x4c6,0x4ce, +0x4d6,0x4de,0x4e6,0x4ee,0x382,0x38a,0x4f3,0x4fb,0x500,0x508,0x510,0x518,0x517,0x51f,0x524,0x52c, +0x534,0x53b,0x53f,0x382,0x546,0x363,0x556,0x54e,0x55e,0x560,0x568,0x570,0x574,0x575,0x57d,0x585, +0x58d,0x575,0x595,0x59a,0x58d,0x575,0x5a2,0x5aa,0x574,0x5b2,0x5ba,0x5c2,0x5ca,0x382,0x5d2,0x382, +0x5da,0x5dc,0x5e4,0x5c2,0x574,0x5b2,0x5eb,0x5c2,0x5f3,0x5f5,0x57d,0x5c2,0x574,0x382,0x5fd,0x382, +0x382,0x603,0x60a,0x382,0x382,0x60e,0x616,0x382,0x61a,0x621,0x382,0x628,0x630,0x637,0x63f,0x382, +0x382,0x644,0x64c,0x654,0x65c,0x664,0x66b,0x673,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x67b,0x382,0x382,0x68b,0x68b,0x683, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x693,0x699,0x581,0x581,0x382,0x69f,0x6a7,0x382, +0x6af,0x382,0x6b7,0x382,0x6be,0x6c4,0x382,0x382,0x382,0x6cc,0x382,0x382,0x382,0x382,0x382,0x382, +0x6d3,0x382,0x6da,0x6e2,0x382,0x6ea,0x6f2,0x382,0x5b1,0x6f6,0x6fe,0x704,0x5f3,0x70c,0x382,0x713, +0x382,0x718,0x382,0x71e,0x726,0x72a,0x732,0x73a,0x742,0x747,0x74a,0x752,0x762,0x75a,0x772,0x76a, +0x3a9,0x77a,0x3a9,0x782,0x785,0x3a9,0x78d,0x3a9,0x795,0x79d,0x7a5,0x7ad,0x7b5,0x7bd,0x7c5,0x7cd, +0x7d5,0x7dc,0x382,0x7e4,0x7ec,0x382,0x7f4,0x7fc,0x804,0x80c,0x814,0x81c,0x824,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x827,0x82d,0x833,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x83b,0x83f,0x843,0x84b,0x3a9,0x3a9,0x3a9,0x853,0x85b,0x862,0x382,0x867,0x382,0x382,0x382,0x86f, +0x382,0x6b4,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x573,0x877,0x382,0x382,0x87e,0x382,0x382,0x886,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x88e,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x71e,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x894,0x382,0x89c,0x8a1,0x8a9,0x382,0x382,0x8b1,0x8b9,0x8c1,0x3a9,0x8c6,0x8ce,0x8d4,0x8db,0x8e3, +0x8eb,0x8f2,0x382,0x382,0x382,0x382,0x8f9,0x901,0x382,0x909,0x910,0x382,0x55e,0x915,0x91d,0x6be, +0x382,0x923,0x92b,0x92f,0x382,0x937,0x93f,0x947,0x382,0x94d,0x951,0x959,0x969,0x961,0x382,0x971, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x979,0x382,0x382,0x382,0x382,0x981,0x55e,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x986,0x98e,0x992,0x382,0x382,0x382,0x382,0x365,0x36b,0x99a,0x9a2,0x9a9,0x519,0x382,0x382,0x9b1, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0xe0c,0xe0c,0xe24,0xe64,0xea4,0xee0,0xf20,0xf60,0xf98,0xfd8,0x1018,0x1058,0x1098,0x10d8,0x1118,0x1158, +0x1198,0x11d8,0x1218,0x1258,0x1268,0x129c,0x12d8,0x1318,0x1358,0x1398,0xe08,0x13cc,0x1400,0x1440,0x145c,0x1490, +0x9e1,0xa1f,0xa5f,0xa9e,0x188,0x188,0xad9,0x188,0x188,0x188,0x188,0x188,0xb11,0xb3a,0x188,0x188, +0x188,0x188,0x188,0x188,0x188,0xb7a,0x188,0xbba,0x188,0xbe0,0xc1b,0xc5a,0xc9a,0xcd4,0xd0b,0x188, 0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188, 0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188, 0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188, @@ -172,657 +172,671 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188, 0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188, 0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188, -0xd13,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x9a9,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x9b1,0x374,0x374,0x374,0x9b4,0x374,0x374,0x374, -0x374,0x9bc,0x9c2,0x9c6,0x374,0x374,0x9ca,0x9ce,0x9d4,0x374,0x374,0x374,0x9db,0x9df,0x9e7,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x9f7,0x9ef,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x9ff, -0xa03,0x374,0x374,0x374,0x374,0x374,0xa0b,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0xa13,0xa17,0xa1f,0xa23,0x374,0xa2a,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0xa30,0x374,0xa34,0x374,0x374,0xa3c,0x374,0xa44,0x374,0x374,0x374,0x566, -0xa46,0xa4d,0xa51,0x5e5,0xa59,0xa61,0x374,0xa69,0xa70,0x374,0xa76,0x5e5,0xa7b,0xa83,0x374,0x374, -0xa88,0x566,0x374,0x374,0x374,0x357,0xa90,0x5e5,0x5e7,0xa98,0xa9f,0x374,0x374,0x374,0x374,0x374, -0xa46,0xaa7,0x374,0x374,0xaaf,0xab7,0x374,0x374,0x374,0x374,0x374,0x374,0xabb,0xac3,0x374,0x374, -0xacb,0x4cf,0x374,0x374,0xad3,0x374,0x374,0xad9,0xae1,0x374,0x374,0x374,0x374,0x374,0x374,0xae6, -0x374,0x374,0x374,0xaee,0xaf6,0x374,0x374,0xafe,0xb06,0x374,0x374,0x374,0xb09,0x9b1,0xb11,0xb15, -0xb1d,0x374,0xb24,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xb2b, -0x374,0x374,0x972,0xb33,0x374,0x374,0x374,0xb39,0xb41,0x374,0xb45,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0xb4b,0x5e5,0xb51,0xb59,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xb5d,0xb65,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xb6b,0x374,0xb71,0x5a3,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0xaee,0xaf6,0x374,0x374,0x374,0x374,0x374,0x374,0x6a6,0x374,0xb77,0x374, -0x374,0xb7f,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0xb84,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0xb8c,0x5a3,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x8ab,0xb94,0xb9b,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xba2,0xbaa, -0xbb0,0x374,0x374,0x374,0x374,0xbb8,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0xbc0,0xbc8,0xbcd,0xbd3,0xbdb,0xbe3,0xbeb,0xbc4,0xbf3,0xbfb,0xc03,0xc0a,0xbc5, -0xbc0,0xbc8,0xbc3,0xbd3,0xbc6,0xbc1,0xc12,0xbc4,0xc1a,0xc22,0xc2a,0xc31,0xc1d,0xc25,0xc2d,0xc34, -0xc20,0xc3c,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x8ab,0xc44,0x8ab,0xc4b,0xc52,0xc5a,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xc6a,0xc72,0x374,0x374,0x374,0x374, -0x374,0x374,0xc62,0xc7a,0xc8d,0xc80,0xc85,0x374,0x374,0x374,0x374,0xc95,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xaab,0x374,0xa28,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xc9d,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0xca1,0x374,0xca9,0xcb1,0xcb8,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xbbc,0xcc0,0xcc0,0xcc6, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0xa6b,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x566,0x8ab,0x8ab,0x8ab,0x374,0x374,0x374,0x374,0x8ab,0x8ab,0x8ab,0x8ab,0x8ab, -0x8ab,0x8ab,0xcce,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374, -0x374,0x374,0x374,0x354,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0, -0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0, -0,0,0,0,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0xa,0x5a,0x7a, -0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0xba,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0, -0,0,4,0,4,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf9,0xf031,0x149, -0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x189,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0xd4b,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x9b8,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x9c0,0x382,0x382,0x382,0x9c3,0x382,0x382,0x382, +0x382,0x9cb,0x9d1,0x9d5,0x382,0x382,0x9d9,0x9dd,0x9e3,0x382,0x382,0x382,0x9ea,0x9ee,0x9f6,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xa06,0x9fe,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xa0e, +0xa12,0x382,0x382,0x382,0x382,0x382,0xa1a,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0xa22,0xa26,0xa2e,0xa32,0x382,0xa39,0xa3e,0xa45,0xa4c,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0xa52,0x382,0xa56,0x382,0x382,0xa5e,0x382,0xa66,0x382,0x382,0x382,0x574, +0xa68,0xa6f,0xa73,0x5f3,0xa7b,0xa83,0x382,0xa8b,0xa92,0x382,0xa98,0x5f3,0xa9d,0xaa5,0x382,0x382, +0xaaa,0x574,0x382,0x382,0x382,0x365,0xab2,0x5f3,0x5f5,0xaba,0xac1,0x382,0xa8d,0xac9,0x58d,0x382, +0xa68,0xad1,0x382,0x382,0xad9,0xae1,0x382,0x382,0x382,0x382,0x382,0x382,0xae5,0xaed,0x382,0x382, +0xaf5,0x4dd,0x382,0x382,0xafd,0x382,0x382,0xb03,0xb0b,0x382,0x382,0x382,0x382,0x382,0x382,0xb10, +0x382,0x382,0x382,0xb18,0xb20,0x382,0x382,0xb28,0xb30,0x382,0x382,0x382,0xb33,0x9c0,0xb3b,0xb3f, +0xb47,0x382,0xb4e,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xb55, +0x382,0x382,0x981,0xb5d,0x382,0x382,0x382,0xb63,0xb6b,0x382,0xb6f,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0xb75,0x5f3,0xb7b,0xb83,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xb8a,0xb92,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x519,0xb9a,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0xb9e,0x382,0xba4,0x5b1,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x55e,0xb77,0x382,0x382,0x382,0x382,0x382,0x382,0xb18,0xb20,0x382,0x382, +0x382,0x382,0x382,0x382,0x6b4,0x382,0xbaa,0x382,0x382,0xbb2,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xbb7,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xbbf,0x5b1, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x8b9,0xbc7,0xbce,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0xbd5,0xbdd,0xbe3,0x382,0x382,0x382,0x382,0xbeb,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xbf3,0xbfb,0xc00,0xc06,0xc0e, +0xc16,0xc1e,0xbf7,0xc26,0xc2e,0xc36,0xc3d,0xbf8,0xbf3,0xbfb,0xbf6,0xc06,0xbf9,0xbf4,0xc45,0xbf7, +0xc4d,0xc55,0xc5d,0xc64,0xc50,0xc58,0xc60,0xc67,0xc53,0xc6f,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x8b9,0xc77,0x8b9,0xc7e,0xc85,0xc8d, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0xc9d,0xca5,0x382,0x382,0x382,0x382,0x382,0x382,0xc95,0xcad,0xcc0,0xcb3,0xcb8,0x382, +0x382,0x382,0x382,0xcc8,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xad5, +0x382,0xa37,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0xcd0,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xcd5,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xcd9,0x382,0xce1,0xce9,0xcf0,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0xbef,0xcf8,0xcf8,0xcfe,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0xa8d,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x574,0x8b9,0x8b9,0x8b9,0x382, +0x382,0x382,0x382,0x8b9,0x8b9,0x8b9,0x8b9,0x8b9,0x8b9,0x8b9,0xd06,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382, +0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x382,0x362,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,4,0,0,0,0,0,0,4,0,0,0,0,0, +0,0,0,0,0,0,4,0,0,0,0,0,0,0x1012,0x1012,0x1012, +0x1012,0x1012,0x1012,0x1012,0x1012,0xa,0x5a,0x7a,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0xba, +0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0,0,0,4,0,4,0xf011,0xf011,0xf011, +0xf011,0xf011,0xf011,0xf011,0xf011,0xf9,0xf031,0x149,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x189, +0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,4,0,1,0,0,4,0,4,0,0,0,0, -4,0x1c9,0,4,4,0,1,0,0,0,0,0,0x1012,0x1012,0x1012,0x1012, -0x1012,0x1fa,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x5a,0x5a,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012, -0x1012,0x1012,0x1012,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x239,0xf011,0xf011,0xf011,0xf011, -0xf011,0x2d9,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011, -0xf011,0xf011,0xf011,0,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x3c91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0,0,0,0,0,0,0,0,0,0,0,0,4,0,1,0, +0,4,0,4,0,0,0,0,4,0x1c9,0,4,4,0,1,0, +0,0,0,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1fa,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012, +0x5a,0x5a,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0,0x1012,0x1012,0x1012,0x1012, +0x1012,0x1012,0x1012,0x239,0xf011,0xf011,0xf011,0xf011,0xf011,0x2d9,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011, +0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0,0xf011,0xf011,0xf011,0xf011, +0xf011,0xf011,0xf011,0x3c91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x31a,0xff91,0x92,0xff91,0x92,0xff91,0x31a,0xffb1,0x33a,0x389,0x92,0xff91, -0x92,0xff91,0x92,0xff91,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92, -0xff91,0x3d9,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x31a,0xff91,0x92,0xff91, +0x92,0xff91,0x31a,0xffb1,0x33a,0x389,0x92,0xff91,0x92,0xff91,0x92,0xff91,1,0x92,0xff91,0x92, +0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x3d9,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0xc392,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x459,0x6191,0x6912,0x92,0xff91,0x92,0xff91,0x6712,0x92, -0xff91,0x6692,0x6692,0x92,0xff91,1,0x2792,0x6512,0x6592,0x92,0xff91,0x6692,0x6792,0x3091,0x6992,0x6892, -0x92,0xff91,0x5191,1,0x6992,0x6a92,0x4111,0x6b12,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x6d12,0x92, -0xff91,0x6d12,1,1,0x92,0xff91,0x6d12,0x92,0xff91,0x6c92,0x6c92,0x92,0xff91,0x92,0xff91,0x6d92, -0x92,0xff91,1,0,0x92,0xff91,1,0x1c11,0,0,0,0,0x48a,0x4bb,0x4f9,0x52a, -0x55b,0x599,0x5ca,0x5fb,0x639,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92, -0xff91,0x92,0xff91,0x92,0xff91,0xd891,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x669,0x6ea,0x71b,0x759,0x92,0xff91,0xcf92,0xe412, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xc392,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x459, +0x6191,0x6912,0x92,0xff91,0x92,0xff91,0x6712,0x92,0xff91,0x6692,0x6692,0x92,0xff91,1,0x2792,0x6512, +0x6592,0x92,0xff91,0x6692,0x6792,0x3091,0x6992,0x6892,0x92,0xff91,0x5191,0x489,0x6992,0x6a92,0x4111,0x6b12, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x6d12,0x92,0xff91,0x6d12,1,1,0x92,0xff91,0x6d12,0x92, +0xff91,0x6c92,0x6c92,0x92,0xff91,0x92,0xff91,0x6d92,0x92,0xff91,1,0,0x92,0xff91,1,0x1c11, +0,0,0,0,0x4aa,0x4db,0x519,0x54a,0x57b,0x5b9,0x5ea,0x61b,0x659,0x92,0xff91,0x92, +0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xd891,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x689,0x70a,0x73b,0x779,0x92,0xff91,0xcf92,0xe412,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0xbf12,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,1,1,1,1,1,1,0x78a,0x92,0xff91,0xae92,0x7aa,0x7c9, -0x7c9,0x92,0xff91,0x9e92,0x2292,0x2392,0x92,0xff91,0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x7e9,0x809,0x829,0x9711,0x9911,1,0x9991,0x9991,1,0x9b11,1,0x9a91,0x849,1,1,1, -0x9991,0x869,1,0x9891,1,0x889,0x8a9,1,0x97b1,0x9691,0x8a9,0x8c9,0x8e9,1,1,0x9691, -1,0x909,0x9591,1,1,0x9511,1,1,1,1,1,1,1,0x929,1,1, -0x9311,1,0x949,0x9311,1,1,1,0x969,0x9311,0xdd91,0x9391,0x9391,0xdc91,1,1,1, -1,1,0x9291,1,0,1,1,1,1,1,1,1,1,0x989,0x9a9,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -5,5,0x25,5,5,5,5,5,5,4,4,4,0x14,4,0x14,4, -5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xbf12,1,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,1,1,1,1, +1,1,0x7aa,0x92,0xff91,0xae92,0x7ca,0x7e9,0x7e9,0x92,0xff91,0x9e92,0x2292,0x2392,0x92,0xff91, +0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x809,0x829,0x849,0x9711,0x9911,1,0x9991,0x9991, +1,0x9b11,1,0x9a91,0x869,1,1,1,0x9991,0x889,1,0x9891,0x8a9,0x8c9,0x8e9,1, +0x97b1,0x9691,0x8e9,0x909,0x929,1,1,0x9691,1,0x949,0x9591,1,1,0x9511,1,1, +1,1,1,1,1,0x969,1,1,0x9311,1,0x989,0x9311,1,1,1,0x9a9, +0x9311,0xdd91,0x9391,0x9391,0xdc91,1,1,1,1,1,0x9291,1,0,1,1,1, +1,1,1,1,1,0x9c9,0x9e9,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,5,5,0x25,5,5,5,5,5, +5,4,4,4,0x14,4,0x14,4,5,5,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,5,5,5,5,5,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -0x54,0x54,0x44,0x44,0x44,0x44,0x44,0x9cc,0x54,0x44,0x54,0x44,0x54,0x44,0x44,0x44, -0x44,0x44,0x44,0x54,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64, +4,4,4,4,4,4,4,4,0x54,0x54,0x44,0x44,0x44,0x44,0x44,0xa0c, +0x54,0x44,0x54,0x44,0x54,0x44,0x44,0x44,0x44,0x44,0x44,0x54,0x44,0x64,0x64,0x64, 0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64, -0x64,0x74,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x44, -0x44,0x44,0x54,0x44,0x44,0x9dd,0x44,0x64,0x64,0x64,0x44,0x44,0x44,0x64,0x64,4, -0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x44,0x64,0x64,0x64,0x44,0x64,0x64,0x64,0x64, -0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, -0x92,0xff91,0x92,0xff91,4,4,0x92,0xff91,0,0,5,0x4111,0x4111,0x4111,0,0x3a12, -0,0,0,0,4,4,0x1312,4,0x1292,0x1292,0x1292,0,0x2012,0,0x1f92,0x1f92, -0xa29,0x1012,0xafa,0x1012,0x1012,0xb3a,0x1012,0x1012,0xb7a,0xbca,0xc1a,0x1012,0xc5a,0x1012,0x1012,0x1012, -0xc9a,0xcda,0,0xd1a,0x1012,0x1012,0xd5a,0x1012,0x1012,0xd9a,0x1012,0x1012,0xed11,0xed91,0xed91,0xed91, -0xdd9,0xf011,0xea9,0xf011,0xf011,0xee9,0xf011,0xf011,0xf29,0xf79,0xfc9,0xf011,0x1009,0xf011,0xf011,0xf011, -0x1049,0x1089,0x10c9,0x10f9,0xf011,0xf011,0x1139,0xf011,0xf011,0x1179,0xf011,0xf011,0xe011,0xe091,0xe091,0x412, -0x11b9,0x11e9,2,2,2,0x1239,0x1269,0xfc11,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x1299,0x12c9,0x391,0xc631,0x12fa,0x1349,0,0x92,0xff91,0xfc92,0x92,0xff91,1,0xbf12,0xbf12,0xbf12, -0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812, -0x1012,0x1012,0x137a,0x1012,0x13ba,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x13fa,0x1012, -0x1012,0x143a,0x147a,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x14ca,0x1012,0x1012,0x1012,0x1012,0x1012, -0xf011,0xf011,0x1509,0xf011,0x1549,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x1589,0xf011, -0xf011,0x15c9,0x1609,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x1659,0xf011,0xf011,0xf011,0xf011,0xf011, -0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0xd831,0xd811,0xd831,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811, -0x92,0xff91,0x169a,0x16d9,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0,0x44,0x44,0x44,0x44,0x44,4,4,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x74,0x64,0x64,0x64,0x64,0x64,0x64, +0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x54,0x44,0x44,0xa1d,0x44,0x64, +0x64,0x64,0x44,0x44,0x44,0x64,0x64,4,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x44, +0x64,0x64,0x64,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x92,0xff91,0x92,0xff91,4,4,0x92,0xff91, +0,0,5,0x4111,0x4111,0x4111,0,0x3a12,0,0,0,0,4,4,0x1312,4, +0x1292,0x1292,0x1292,0,0x2012,0,0x1f92,0x1f92,0xa69,0x1012,0xb3a,0x1012,0x1012,0xb7a,0x1012,0x1012, +0xbba,0xc0a,0xc5a,0x1012,0xc9a,0x1012,0x1012,0x1012,0xcda,0xd1a,0,0xd5a,0x1012,0x1012,0xd9a,0x1012, +0x1012,0xdda,0x1012,0x1012,0xed11,0xed91,0xed91,0xed91,0xe19,0xf011,0xee9,0xf011,0xf011,0xf29,0xf011,0xf011, +0xf69,0xfb9,0x1009,0xf011,0x1049,0xf011,0xf011,0xf011,0x1089,0x10c9,0x1109,0x1139,0xf011,0xf011,0x1179,0xf011, +0xf011,0x11b9,0xf011,0xf011,0xe011,0xe091,0xe091,0x412,0x11f9,0x1229,2,2,2,0x1279,0x12a9,0xfc11, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x12d9,0x1309,0x391,0xc631,0x133a,0x1389,0,0x92, +0xff91,0xfc92,0x92,0xff91,1,0xbf12,0xbf12,0xbf12,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812, +0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x1012,0x1012,0x13ba,0x1012,0x13fa,0x1012,0x1012,0x1012, +0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x143a,0x1012,0x1012,0x147a,0x14ba,0x1012,0x1012,0x1012,0x1012,0x1012, +0x1012,0x1012,0x150a,0x1012,0x1012,0x1012,0x1012,0x1012,0xf011,0xf011,0x1549,0xf011,0x1589,0xf011,0xf011,0xf011, +0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x15c9,0xf011,0xf011,0x1609,0x1649,0xf011,0xf011,0xf011,0xf011,0xf011, +0xf011,0xf011,0x1699,0xf011,0xf011,0xf011,0xf011,0xf011,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0xd831,0xd811, +0xd831,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0x92,0xff91,0x16da,0x1719,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0,0x44,0x44,0x44,0x44,0x44, +4,4,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x792,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xf891, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x792,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92, +0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xf891,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, -0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0,0,4,0,0, -0,0,0,4,1,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, +0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, +0x1812,0x1812,0x1812,0,0,4,0,0,0,0,0,4,1,0xe811,0xe811,0xe811, 0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811, -0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0x1719,1,0,0,0,0,0,0,0, -0,0x64,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44, -0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x44, -0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0x64, -0,0x64,0x64,0,0x44,0x64,0,0x64,0,0,0,0,0,0,0,0, +0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0x1759, +1,0,0,0,0,0,0,0,0,0x64,0x44,0x44,0x44,0x44,0x64,0x44, +0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64, +0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64, +0x64,0x64,0x64,0x64,0x64,0x64,0,0x64,0,0x64,0x64,0,0x44,0x64,0,0x64, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0, -4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0, -0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0,4,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, +0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0, +0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, +0x64,0x64,0x64,0,4,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, +0,0,0,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,0x64,0x44, +0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x64,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x64,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,0,0,0,0,0,0,0,0,0,0,0x64,0x64,0x64,0x64,0x64, -0x64,0x64,0x64,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x64, +0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,4,0,0x44,0x44,0x44,0x44,0x64, +0x44,4,4,0x44,0x44,0,0x64,0x44,0x44,0x64,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, +0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44, -0x44,4,0,0x44,0x44,0x44,0x44,0x64,0x44,4,4,0x44,0x44,0,0x64,0x44, -0x44,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,4,0,0x64,0,0,0,0,0,0, +0x44,0x64,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x64,0x44,0x64,0x64,0x44,0x64,0x44, +0x44,0x44,0x64,0x44,0x64,0x44,0x64,0x44,0x64,0x44,0x44,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x44,0x64,0x44,0x44,0x64,0x44,0x44,0x64, -0x64,0x64,0x44,0x64,0x64,0x44,0x64,0x44,0x44,0x44,0x64,0x44,0x64,0x44,0x64,0x44, -0x64,0x44,0x44,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, -4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0, +0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x44,4,4,0,0, -0,0,4,0,0,0x64,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44, -0x44,0x44,4,0x44,0x44,0x44,0x44,0x44,4,0x44,0x44,0x44,4,0x44,0x44,0x44, -0x44,0x44,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,0x64,0x64, -0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, -4,4,0,0,0,0,0,0,0x44,0x64,0x64,0x64,0x44,0x44,0x44,0x44, -0x44,0x44,4,0x64,0x44,0x44,0x64,0x44,0x44,0x64,0x44,0x44,0x44,0x64,0x64,0x64, -0x64,0x64,0x64,0x44,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44, -0,0,0,0,0,0,0,0,0,4,0x44,0x44,0x44,0x44,0x44,0x64, -0x64,0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, -4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,4,0,0x64,0,0,0,0,4,4,4,4,4,4,4, -4,0,0,0,0,0x64,0,0,0,0x44,0x64,0x44,0x44,4,4,4, -0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0, -0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x64,0,0,0,0,4,4,4, -4,0,0,0,0,0,0,0,0,0x64,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4, +0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44, +0x44,0x44,0x64,0x44,4,4,0,0,0,0,4,0,0,0x64,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0x44,0,0,4,4,0, +0,0,0,0,0,0,0x44,0x44,0x44,0x44,4,0x44,0x44,0x44,0x44,0x44, +4,0x44,0x44,0x44,4,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0, -0,0,0,4,4,0,0,4,4,0x64,0,0,0,4,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0, -0,4,4,4,4,4,0,4,4,0,0,0,0,0x64,0,0, +0,0,0,0,0,0x64,0x64,0x64,0,0,0,0,0,0,0,0, +4,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0x44, +0x44,0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,4,0x64,0x44,0x44,0x64,0x44, +0x44,0x64,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x44,0x64,0x44, +0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0, +0,4,0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x44,0x44, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,4,4,4,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,4,0,0x64,0,0,0, +0,4,4,4,4,4,4,4,4,0,0,0,0,0x64,0,0, +0,0x44,0x64,0x44,0x44,4,4,4,0,0,0,0,0,0,0,0, 0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, +0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x64,0,0,4, -0,4,4,4,4,0,0,0,0,0,0,0,0,0x64,0,0, -0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0, -0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0, +0x64,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0, +0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x44,0,0,4,4,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,0,0,0,0,0,0,0,0,0,0,0,0,0x64,0,0, +0,0,0,0,0,4,4,0,0,0,0,4,4,0,0,4, +4,0x64,0,0,0,4,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,4,0,0,0,4,0,0, +0,0,0,0,0,0,0,0,0,4,4,4,4,4,0,4, +4,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0, +0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x64,0,4,4,4,0,0,0,0,0,4,4, -4,0,4,4,4,0x64,0,0,0,0,0,0,0,0x64,0x64,0, -0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0, -4,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x64,0,0,4,0,4,4,4,4,0,0,0, +0,0,0,0,0,0x64,0,0,0,0,0,0,0,4,4,0, +0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0x64,0x64,0,0,0,0,0,0,0, -0,0,0,0,0,0,0x64,0,0,0,0,0,0,0,4,4, -4,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,4,0,0,4,4,4,4,0x64,0x64,0x64,0, -0,0,0,0,0,0,4,4,0x64,0x64,0x64,0x64,4,4,4,0, +0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,4,0,0,4,4,4,4,0x64,0x64,0x64,4,4,0,0,0, -0,0,0,0,0,0,4,0,0x64,0x64,0x64,0x64,4,4,4,0, +0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, +0,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x64,0x64,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x64,0,4,4, +4,0,0,0,0,0,4,4,4,0,4,4,4,0x64,0,0, +0,0,0,0,0,0x64,0x64,0,0,0,0,0,0,0,0,0, +0,0,4,0,0,0,0,0,4,0x64,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0x64,0,0x64,0,0x64,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0x64,0x64,4,0x64,4,4,4, -4,4,0x64,0x64,0x64,0x64,4,0,0x64,4,0x44,0x44,0x64,0,0x44,0x44, -0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4, -0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x64, +0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,0, +0,0,0,0,0,0,4,4,4,0,4,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0, +4,4,4,4,0x64,0x64,0x64,0,0,0,0,0,0,0,4,4, +0x64,0x64,0x64,0x64,4,4,4,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,4,0,0,4,4,4,4, +0x64,0x64,0x64,4,4,0,0,0,0,0,0,0,0,0,4,0, +0x64,0x64,0x64,0x64,4,4,4,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x64,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x64,0,0x64,0,0x64,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x64,0x64,4,0x64,4,4,4,4,4,0x64,0x64,0x64,0x64,4,0, +0x64,4,0x44,0x44,0x64,0,0x44,0x44,0,0,0,0,0,4,4,4, +4,4,4,4,4,4,4,4,0,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,0,0,0,0,0,0,0,0,0,0x64,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,4,4,4,4,0,4,4,4,4,4,0x64, -0,0x64,0x64,0,0,4,4,0,0,0,0,0,0,0,0,0, +4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0, +0,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4, +4,0,4,4,4,4,4,0x64,0,0x64,0x64,0,0,4,4,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,0,0,0,0,4,4,4,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0, -0,0,0,0,0,0,0,0,0,0,4,0,0,4,4,0, -0,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,4,0,0,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a, -0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a, -0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0,0x175a,0,0,0,0, -0,0x175a,0,0,0x1779,0x17a9,0x17d9,0x1809,0x1839,0x1869,0x1899,0x18c9,0x18f9,0x1929,0x1959,0x1989, -0x19b9,0x19e9,0x1a19,0x1a49,0x1a79,0x1aa9,0x1ad9,0x1b09,0x1b39,0x1b69,0x1b99,0x1bc9,0x1bf9,0x1c29,0x1c59,0x1c89, -0x1cb9,0x1ce9,0x1d19,0x1d49,0x1d79,0x1da9,0x1dd9,0x1e09,0x1e39,0x1e69,0x1e99,0x1ec9,0x1ef9,0x1f29,0x1f59,0, -5,0x1f89,0x1fb9,0x1fe9,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0x44,0x44,0x44,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a, -0x201a,0x201a,0x201a,0x201a,0x203a,0x203a,0x203a,0x203a,0x203a,0x203a,0,0,0x2059,0x2089,0x20b9,0x20e9, -0x2119,0x2149,0,0,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a, -0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a, -0x201a,0x201a,0x201a,0x201a,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,4,4,0x64,0x60,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,4,0,0,0,0,4,4, +4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0, +0,0,4,0,0,4,4,0,0,0,0,0,0,0x64,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0, +0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a, +0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a, +0x179a,0x179a,0,0x179a,0,0,0,0,0,0x179a,0,0,0x17b9,0x17e9,0x1819,0x1849, +0x1879,0x18a9,0x18d9,0x1909,0x1939,0x1969,0x1999,0x19c9,0x19f9,0x1a29,0x1a59,0x1a89,0x1ab9,0x1ae9,0x1b19,0x1b49, +0x1b79,0x1ba9,0x1bd9,0x1c09,0x1c39,0x1c69,0x1c99,0x1cc9,0x1cf9,0x1d29,0x1d59,0x1d89,0x1db9,0x1de9,0x1e19,0x1e49, +0x1e79,0x1ea9,0x1ed9,0x1f09,0x1f39,0x1f69,0x1f99,0,5,0x1fc9,0x1ff9,0x2029,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x205a,0x205a,0x205a,0x205a, +0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x207a,0x207a,0x207a,0x207a, +0x207a,0x207a,0,0,0x2099,0x20c9,0x20f9,0x2129,0x2159,0x2189,0,0,0x205a,0x205a,0x205a,0x205a, +0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a, +0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0x205a,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4, -0x60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,4,0,4,4,4,4,4, -4,4,0,0,0,0,0,0,0,0,4,0,0,4,4,4, -4,4,4,4,4,4,0x64,4,0,0,0,4,0,0,0,0, -0,0x44,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0, +0x64,0x60,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,4,4,0x60,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0, -0,0x64,0x44,0x64,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0x44,0x64,0,0,4, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,0, -0x64,0,4,0,0,4,4,4,4,4,4,4,4,0,0,0, -0,0,0,4,4,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0x64, -0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0, -0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,4,0x64, -0x64,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x44,0x44,0, +4,4,0,4,4,4,4,4,4,4,0,0,0,0,0,0, +0,0,4,0,0,4,4,4,4,4,4,4,4,4,0x64,4, +0,0,0,4,0,0,0,0,0,0x44,0,0,0,0,0,0, +0,0,0,0,0,0,0,4,4,4,4,4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x64,0,4,4,4,4,4,0,4,0,0,0, -0,0,4,0,0x60,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0x44,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0, -4,4,0x60,0x64,4,4,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0x64,0,4,4,0,0, -0,4,0,4,4,4,0x60,0x60,0,0,0,0,0,0,0,0, -0,0,0,0,4,4,4,4,4,4,4,4,0,0,4,0x64, +0,0,0,0,0,0,0,0,0,0x64,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0, -0x2179,0x21a9,0x21d9,0x2209,0x2239,0x2289,0x22d9,0x2309,0x2339,0,0,0,0,0,0,0, -0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a, -0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0,0,0x236a,0x236a,0x236a, +4,4,4,0,0,0,0,4,4,0,0,0,0,0,0,0, +0,0,4,0,0,0,0,0,0,0x64,0x44,0x64,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x44,0x44,0x44,0,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,0x64,0x64,0x64, -0x44,0,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0,0,0,0x64,0,0, -0,0,0,0,0x44,0,0,0,0x44,0x44,0,0,0,0,0,0, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +0,0,0,0x44,0x64,0,0,4,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0, +4,4,4,4,4,4,4,0,0x64,0,4,0,0,4,4,4, +4,4,4,4,4,0,0,0,0,0,0,4,4,0x44,0x44,0x44, +0x44,0x44,0x44,0x44,0x44,0,0,0x64,0,0,0,0,0,0,0,4, +0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64, +0x64,0x64,0x64,0x44,0x44,0x64,4,0x64,0x64,0x44,0x44,0x64,0x64,0x44,0x44,0x44, +0x44,0x44,0x64,0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x64,0,4,4, +4,4,4,0,4,0,0,0,0,0,4,0,0x60,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x44,0x64,0x44,0x44,0x44, +0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,4,4,4,4,0,0,4,4,0x60,0x64,4,4,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x64,0,4,4,0,0,0,4,0,4,4,4,0x60,0x60, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, +4,4,4,4,0,0,4,0x64,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +4,4,4,4,4,4,0,0,0x21b9,0x21e9,0x2219,0x2249,0x2279,0x22c9,0x2319,0x2349, +0x2379,0x92,0xff91,0,0,0,0,0,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa, +0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa,0x23aa, +0x23aa,0x23aa,0x23aa,0,0,0x23aa,0x23aa,0x23aa,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x44,0x44,0x44,0,0x64,0x64,0x64,0x64, +0x64,0x64,0x44,0x44,0x64,0x64,0x64,0x64,0x44,0,0x64,0x64,0x64,0x64,0x64,0x64, +0x64,0,0,0,0,0x64,0,0,0,0,0,0,0x44,0,0,0, +0x44,0x44,0,0,0,0,0,0,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,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0x25,5,5,5,5,5,5,5,5,1,1,1,1,1, -1,1,1,1,1,1,1,1,5,0x2389,1,1,1,0x23a9,1,1, -5,5,5,5,0x25,5,5,5,0x25,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x23c9,1, -1,1,1,1,1,1,0x21,1,1,1,1,5,5,5,5,5, -0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, -0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x44,0x64,0x64,0x44,0x64, -0x44,0x44,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x64, -0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xffb1,0x92,0xff91, +5,5,5,5,5,5,5,5,5,5,0x25,5,5,5,5,5, +5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1, +5,0x23c9,1,1,1,0x23e9,1,1,5,5,5,5,0x25,5,5,5, +0x25,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,0x2409,1,1,1,1,1,1,1,0x21,1, +1,1,1,5,5,5,5,5,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x64, +0x64,0x64,0x64,0x44,0x64,0x64,0x44,0x64,0x44,0x44,0x64,0x44,0x44,0x44,0x44,0x44, +0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x242a,0x2469,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x23ea,0x2429,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x24a9,0x2529,0x25a9,0x2629,0x26a9,0x2729, +1,1,0x275a,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xffb1, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x2469,0x24e9,0x2569,0x25e9,0x2669,0x26e9,1,1,0x271a,1,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x411,0x411,0x411,0x411, -0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411, -0x411,0x411,0,0,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0,0,0x411,0x411,0x411,0x411, -0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411, -0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411, -0x411,0x411,0,0,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0,0,0x2769,0x411,0x27e9,0x411, -0x2899,0x411,0x2949,0x411,0,0xfc12,0,0xfc12,0,0xfc12,0,0xfc12,0x411,0x411,0x411,0x411, -0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x2511,0x2511,0x2b11,0x2b11, -0x2b11,0x2b11,0x3211,0x3211,0x4011,0x4011,0x3811,0x3811,0x3f11,0x3f11,0,0,0x29f9,0x2a69,0x2ad9,0x2b49, -0x2bb9,0x2c29,0x2c99,0x2d09,0x2d7b,0x2deb,0x2e5b,0x2ecb,0x2f3b,0x2fab,0x301b,0x308b,0x30f9,0x3169,0x31d9,0x3249, -0x32b9,0x3329,0x3399,0x3409,0x347b,0x34eb,0x355b,0x35cb,0x363b,0x36ab,0x371b,0x378b,0x37f9,0x3869,0x38d9,0x3949, -0x39b9,0x3a29,0x3a99,0x3b09,0x3b7b,0x3beb,0x3c5b,0x3ccb,0x3d3b,0x3dab,0x3e1b,0x3e8b,0x411,0x411,0x3ef9,0x3f79, -0x3fe9,0,0x4069,0x40e9,0xfc12,0xfc12,0xdb12,0xdb12,0x419b,4,0x4209,4,4,4,0x4259,0x42d9, -0x4349,0,0x43c9,0x4449,0xd512,0xd512,0xd512,0xd512,0x44fb,4,4,4,0x411,0x411,0x4569,0x4619, -0,0,0x46d9,0x4759,0xfc12,0xfc12,0xce12,0xce12,0,4,4,4,0x411,0x411,0x4809,0x48b9, -0x4979,0x391,0x49f9,0x4a79,0xfc12,0xfc12,0xc812,0xc812,0xfc92,4,4,4,0,0,0x4b29,0x4ba9, -0x4c19,0,0x4c99,0x4d19,0xc012,0xc012,0xc112,0xc112,0x4dcb,4,4,0,0,0,0,0, -0,0,0,0,0,0,0,4,4,4,4,4,0,0,0,0, -0,0,0,0,4,4,0,0,0,0,0,0,4,0,0,4, -0,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,4,4,4,4,0,4,4, -4,4,4,4,4,4,4,4,0,0x25,0,0,0,0,0,0, -0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44, -0x64,0x64,0x64,0x44,0x44,4,4,4,4,0x44,4,4,4,0x64,0x64,0x44, -0x64,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2, -0,0,1,2,2,2,1,1,2,2,2,1,0,2,0,0, -0,2,2,2,2,2,0,0,0,0,0,0,2,0,0x4e3a,0, -2,0,0x4e7a,0x4eba,2,2,0,1,2,2,0xe12,2,1,0,0,0, -0,1,0,0,1,1,2,2,0,0,0,0,0,2,1,1, -0x21,0x21,0,0,0,0,0xf211,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812, -0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811, -0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0,0,0,0x92,0xff91,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12, -0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xf311,0xf311,0xf311,0xf311, -0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, +0x92,0xff91,0x92,0xff91,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12, +0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,0x411,0x411,0,0,0xfc12,0xfc12,0xfc12,0xfc12, +0xfc12,0xfc12,0,0,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12, +0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12, +0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,0x411,0x411,0,0,0xfc12,0xfc12,0xfc12,0xfc12, +0xfc12,0xfc12,0,0,0x27a9,0x411,0x2829,0x411,0x28d9,0x411,0x2989,0x411,0,0xfc12,0,0xfc12, +0,0xfc12,0,0xfc12,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12, +0xfc12,0xfc12,0xfc12,0xfc12,0x2511,0x2511,0x2b11,0x2b11,0x2b11,0x2b11,0x3211,0x3211,0x4011,0x4011,0x3811,0x3811, +0x3f11,0x3f11,0,0,0x2a39,0x2aa9,0x2b19,0x2b89,0x2bf9,0x2c69,0x2cd9,0x2d49,0x2dbb,0x2e2b,0x2e9b,0x2f0b, +0x2f7b,0x2feb,0x305b,0x30cb,0x3139,0x31a9,0x3219,0x3289,0x32f9,0x3369,0x33d9,0x3449,0x34bb,0x352b,0x359b,0x360b, +0x367b,0x36eb,0x375b,0x37cb,0x3839,0x38a9,0x3919,0x3989,0x39f9,0x3a69,0x3ad9,0x3b49,0x3bbb,0x3c2b,0x3c9b,0x3d0b, +0x3d7b,0x3deb,0x3e5b,0x3ecb,0x411,0x411,0x3f39,0x3fb9,0x4029,0,0x40a9,0x4129,0xfc12,0xfc12,0xdb12,0xdb12, +0x41db,4,0x4249,4,4,4,0x4299,0x4319,0x4389,0,0x4409,0x4489,0xd512,0xd512,0xd512,0xd512, +0x453b,4,4,4,0x411,0x411,0x45a9,0x4659,0,0,0x4719,0x4799,0xfc12,0xfc12,0xce12,0xce12, +0,4,4,4,0x411,0x411,0x4849,0x48f9,0x49b9,0x391,0x4a39,0x4ab9,0xfc12,0xfc12,0xc812,0xc812, +0xfc92,4,4,4,0,0,0x4b69,0x4be9,0x4c59,0,0x4cd9,0x4d59,0xc012,0xc012,0xc112,0xc112, +0x4e0b,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4, +4,4,4,4,0,0,0,0,0,0,0,0,4,4,0,0, +0,0,0,0,4,0,0,4,0,0,4,4,4,4,4,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +4,4,4,4,4,0,4,4,4,4,4,4,4,4,4,4, +0,0x25,0,0,0,0,0,0,0,0,0,0,0,0,0,5, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x44,0x44,4,4,4, +4,0x44,4,4,4,0x64,0x64,0x44,0x64,0x44,0x64,0x64,0x64,0x64,0x64,0x64, +0x44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,2,0,0,0,0,2,0,0,1,2,2,2,1,1, +2,2,2,1,0,2,0,0,0,2,2,2,2,2,0,0, +0,0,0,0,2,0,0x4e7a,0,2,0,0x4eba,0x4efa,2,2,0,1, +2,2,0xe12,2,1,0,0,0,0,1,0,0,1,1,2,2, +0,0,0,0,0,2,1,1,0x21,0x21,0,0,0,0,0xf211,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812, +0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811, +0,0,0,0x92,0xff91,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12, +0xd12,0xd12,0xd12,0xd12,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311, +0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1812,0x1812,0x1812,0x1812, 0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, -0x1812,0x1812,0x1812,0x1812,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811, +0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0xe811,0xe811,0xe811,0xe811, 0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811, -0xe811,0xe811,0xe811,0xe811,0x92,0xff91,0x4efa,0x4f1a,0x4f3a,0x4f59,0x4f79,0x92,0xff91,0x92,0xff91,0x92, -0xff91,0x4f9a,0x4fba,0x4fda,0x4ffa,1,0x92,0xff91,1,0x92,0xff91,1,1,1,1,1, -0x25,5,0x501a,0x501a,0x92,0xff91,0x92,0xff91,1,0,0,0,0,0,0,0x92, -0xff91,0x92,0xff91,0x44,0x44,0x44,0x92,0xff91,0,0,0,0,0,0,0,0, -0,0,0,0,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039, -0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039, -0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0,0x5039,0,0,0,0,0,0x5039,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, +0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0x92,0xff91,0x4f3a,0x4f5a, +0x4f7a,0x4f99,0x4fb9,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x4fda,0x4ffa,0x501a,0x503a,1,0x92,0xff91, +1,0x92,0xff91,1,1,1,1,1,0x25,5,0x505a,0x505a,0x92,0xff91,0x92,0xff91, +1,0,0,0,0,0,0,0x92,0xff91,0x92,0xff91,0x44,0x44,0x44,0x92,0xff91, +0,0,0,0,0,0,0,0,0,0,0,0,0x5079,0x5079,0x5079,0x5079, +0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079, +0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0x5079,0,0x5079, +0,0,0,0,0,0x5079,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x64,0x44,0x44,0x44,0x44, 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, -0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0,0,0x64,0x64, -0x64,0x64,0x60,0x60,0,4,4,4,4,4,0,0,0,0,0,4, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0, +0,0,0,0,0,0,0x64,0x64,0x64,0x64,0x60,0x60,0,4,4,4, +4,4,0,0,0,0,0,4,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0x64,0x64,4,4,4,4,0, +0,0x64,0x64,4,4,4,4,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0, +0,0,0,0,4,4,4,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x505a,0x5099,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0,0x44,4,4,4,0, -0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,4,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x509a,0x50d9,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,5,5,0x44,0x44,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,1,1,0x92,0xff91, +0x92,0xff91,0,0x44,4,4,4,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, +0x44,0x44,0,4,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -5,1,1,1,1,1,1,1,1,0x92,0xff91,0x92,0xff91,0x50da,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,4,4,4,0x92,0xff91,0x50fa,1,0, -0x92,0xff91,0x92,0xff91,0x1811,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x511a,0x513a,0x515a,0x517a,0x511a,1,0x519a,0x51ba,0x51da,0x51fa,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xe812,0x521a,0x523a,0x92,0xff91,0x92,0xff91,0, -0,0,0,0,0x92,0xff91,0,1,0,1,0x92,0xff91,0x92,0xff91,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,5,5,5,0x92,0xff91,0,5,5,1,0,0,0,0,0, -0,0,4,0,0,0,0x64,0,0,0,0,4,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,4,4,0,0,0,0,0,0x64,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x64,4,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, -0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0, -0,0,0,0,0,0,0,4,0,0,0,0,0,0,4,4, -4,4,4,0x64,0x64,0x64,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4, -4,4,4,4,4,4,0,0x60,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0x64,0,0,4,4, -4,4,0,0,4,4,0,0,0x60,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0, -0,4,4,0,0,4,4,0,0,0,0,0,0,0,0,0, -0,0,0,4,0,0,0,0,0,0,0,0,4,0,0,0, +5,5,0x44,0x44,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x44,0x44,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,1,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,5,1,1,1,1,1,1,1, +1,0x92,0xff91,0x92,0xff91,0x511a,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +4,4,4,0x92,0xff91,0x513a,1,0,0x92,0xff91,0x92,0xff91,0x1811,1,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x515a,0x517a,0x519a,0x51ba,0x515a,1, +0x51da,0x51fa,0x521a,0x523a,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0xe812,0x525a,0x527a,0x92,0xff91,0x92,0xff91,0x529a,0x92,0xff91,0,0,0x92,0xff91,0,1, +0,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x52ba,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5, +5,0x92,0xff91,0,5,5,1,0,0,0,0,0,0,0,4,0, +0,0,0x64,0,0,0,0,4,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0, +0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x64,4,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, +0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, +0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0,0, +0,0,0,4,0,0,0,0,0,0,4,4,4,4,4,0x64, +0x64,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4, +4,4,0,0x60,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x64,0,0,4,4,4,4,0,0, +4,4,0,0,0x60,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,4,4,4,4,4,4,0,0,4,4,0, +0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4, +0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, +0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x44,0,0x44,0x44, +0x64,0,0,0x44,0x44,0,0,0,0,0,0x44,0x44,0,0x44,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x44,0,0x44,0x44,0x64,0,0,0x44,0x44,0,0,0,0,0,0x44,0x44, -0,0x44,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0, -0,0,0,4,4,0,0x64,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,0x5259,1,1,1,1, -1,1,1,4,5,5,5,5,1,1,1,1,1,1,1,1, -1,5,4,4,0,0,0,0,0x5279,0x52a9,0x52d9,0x5309,0x5339,0x5369,0x5399,0x53c9, -0x53f9,0x5429,0x5459,0x5489,0x54b9,0x54e9,0x5519,0x5549,0x5b79,0x5ba9,0x5bd9,0x5c09,0x5c39,0x5c69,0x5c99,0x5cc9, -0x5cf9,0x5d29,0x5d59,0x5d89,0x5db9,0x5de9,0x5e19,0x5e49,0x5e79,0x5ea9,0x5ed9,0x5f09,0x5f39,0x5f69,0x5f99,0x5fc9, -0x5ff9,0x6029,0x6059,0x6089,0x60b9,0x60e9,0x6119,0x6149,0x5579,0x55a9,0x55d9,0x5609,0x5639,0x5669,0x5699,0x56c9, -0x56f9,0x5729,0x5759,0x5789,0x57b9,0x57e9,0x5819,0x5849,0x5879,0x58a9,0x58d9,0x5909,0x5939,0x5969,0x5999,0x59c9, -0x59f9,0x5a29,0x5a59,0x5a89,0x5ab9,0x5ae9,0x5b19,0x5b49,0,0,0,0,0,4,0,0, -4,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x6179,0x61f9,0x6279,0x62f9,0x63a9,0x6459,0x64e9,0, -0,0,0,0,0,0,0,0,0,0,0,0x6589,0x6609,0x6689,0x6709,0x6789, -0,0,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,4, -0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44, -0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0, -0,4,0,0,0,0,0,0,0,0,0,0,0,0x1012,0x1012,0x1012, +0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,4, +4,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,0x52d9,1,1,1,1,1,1,1,4, +5,5,5,5,1,1,1,1,1,1,1,1,1,5,4,4, +0,0,0,0,0x52f9,0x5329,0x5359,0x5389,0x53b9,0x53e9,0x5419,0x5449,0x5479,0x54a9,0x54d9,0x5509, +0x5539,0x5569,0x5599,0x55c9,0x5bf9,0x5c29,0x5c59,0x5c89,0x5cb9,0x5ce9,0x5d19,0x5d49,0x5d79,0x5da9,0x5dd9,0x5e09, +0x5e39,0x5e69,0x5e99,0x5ec9,0x5ef9,0x5f29,0x5f59,0x5f89,0x5fb9,0x5fe9,0x6019,0x6049,0x6079,0x60a9,0x60d9,0x6109, +0x6139,0x6169,0x6199,0x61c9,0x55f9,0x5629,0x5659,0x5689,0x56b9,0x56e9,0x5719,0x5749,0x5779,0x57a9,0x57d9,0x5809, +0x5839,0x5869,0x5899,0x58c9,0x58f9,0x5929,0x5959,0x5989,0x59b9,0x59e9,0x5a19,0x5a49,0x5a79,0x5aa9,0x5ad9,0x5b09, +0x5b39,0x5b69,0x5b99,0x5bc9,0,0,0,0,0,4,0,0,4,0,0,0, +0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x61f9,0x6279,0x62f9,0x6379,0x6429,0x64d9,0x6569,0,0,0,0,0, +0,0,0,0,0,0,0,0x6609,0x6689,0x6709,0x6789,0x6809,0,0,0,0, +0,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,0,0,0,4,0,0,0,0, +0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64, +0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,4,0,0,4,0,0, +0,0,0,0,0,0,0,0,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012, 0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012, -0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0,0,0,4,0,4,0xf011,0xf011,0xf011, +0x1012,0x1012,0x1012,0,0,0,4,0,4,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011, 0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011, -0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0, +0xf011,0xf011,0xf011,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0x64,0,0,0x64,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,0,0, +0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0, -0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412, +0,0,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0x1412,0x1412,0x1412,0x1412, 0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412, +0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0xec11,0xec11,0xec11,0xec11, 0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11, -0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412, -0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0,0,0,0, +0xec11,0xec11,0xec11,0xec11,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412, +0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0,0,0,0,0xec11,0xec11,0xec11,0xec11, 0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11, -0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1392,0x1392,0x1392,0x1392, -0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0, -0x1392,0x1392,0,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91, -0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91, -0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91,0xec91,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5, -5,5,5,5,5,5,5,0,0,0,0,0,5,4,4,5, -5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,4,4,4, -0,4,4,0,0,0,0,0,4,0x64,4,0x44,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x44,0x64,0x64,0,0,0,0,0x64,0,0,0,0, -0,0x44,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x2012,0x2012,0x2012,0x2012, -0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012, -0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xe011,0xe011,0xe011,0xe011, -0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011, -0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44, +0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392, +0x1392,0x1392,0x1392,0,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0,0x1392,0x1392,0,0xec91, +0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91,0xec91,0xec91,0xec91,0xec91, +0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91,0xec91,0xec91,0xec91,0xec91, +0xec91,0xec91,0,0xec91,0xec91,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5, +5,5,5,0,0,0,0,0,5,4,4,5,5,5,0,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,4,4,4,0,4,4,0, +0,0,0,0,4,0x64,4,0x44,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0,0,0, +0x44,0x64,0x64,0,0,0,0,0x64,0,0,0,0,0,0x44,0x64,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,0x64,0x64, -0,0,0,0,0,0,0x64,0x64,0x44,0x44,0x44,0x64,0x44,0x64,0x64,0x64, -0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0x44,0x64,0x44,0x64,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012, +0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012, +0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011, +0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011, +0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,4,4,4,4,4,4,4,4,0x64,0,0,0,0,0, +0,0,0,0,0,0,4,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012, +0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0,0,0,0x44,0x44,0x44, +0x44,0x44,0,4,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011, +0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x64,0,0,4,4,0,0,0,0,0,0,0, -0,0,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,4,4,4,4,0,0,0x64,0x64,0, -0,4,0,0,0,0,4,0,0,0,0,0,0,0,0,0, -0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0, +0,0,0,0x44,0x44,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,4,4,4,4,4,0,4,4,4, -4,4,4,0x64,0x64,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0x64,0,0,0,0, +0,0,0,0,4,0x64,0x64,0x64,0,0,0,0,0,0,0x64,0x64, +0x44,0x44,0x44,0x64,0x44,0x64,0x64,0x64,0x64,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0x44,0x64,0x44,0x64,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,4,4,4,4,4,4,4,4,4,0,0x60,0,0,0, -0,0,0,0,0,4,0x64,4,4,0,0,4,0,0,0,0, +0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4, +4,4,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x64,0,0,4, +4,0,0,0,0,0,0,0,0,0,0,0x64,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,4,0,0,4,0x60,0x64,4,0,0,0,0,0,0,4,0, -0,0,0,4,4,4,4,4,4,0x64,0x64,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,0,0,0,0,0,0,0,0,0,0,0,0,0x60,0,0, +4,4,4,0,0,0x64,0x64,0,0,4,0,0,0,0,4,0, +0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0x44,0x44,0x44,0x44, -0x44,0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,4, -4,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0x44,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,4,4,4,4,0,4,0,0,0,0,4,4,0,0x64,0x64, +4,4,4,4,0,4,4,4,4,4,4,0x64,0x64,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4, -4,4,0,0,0,0,0,0,4,4,0,0x64,0x64,0,0,0, +0,0,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, +4,4,4,0,0x60,0,0,0,0,0,0,0,0,4,0x64,4, +4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,4,4,4,0,0,4,0x60,0x64,4, +0,0,0,0,0,0,4,0,0,0,0,4,4,4,4,4, +4,0x64,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, +0,0,0,0,0,0x60,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44, +0x44,0,0,0,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0,0, +0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x64,0x60,0x64,0,4,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0x64,4,4,0,0x64,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,4,4,4,4,4,4,0,0,4,0,0x64,0,0,0,0, -0,0,0,0,0,0,0,4,0,4,0,0,4,4,4,4, -4,4,0x60,0x64,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x44,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,4,4,4,4,4,4,0,4,0, +0,0,0,4,4,0,0x64,0x64,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,4,4,4,0,0,4,4,4,4,0,4,4,4,4,0x64, +0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0, +4,4,0,0x64,0x64,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4, -0,0x64,0x64,0,0,0,0,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012, +4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0, +0,4,0,0x64,0,0,0,0,0,0,0,0,0,0,0,4, +0,4,0,0,4,4,4,4,4,4,0x60,0x64,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,4,0,4,0,0,4,4, +4,4,0,4,4,4,4,0x64,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, +4,4,4,4,4,4,4,4,0,0x64,0x64,0,0,0,0,0, +0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012, 0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012, -0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011, 0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011, -0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,4,4,0x60,0x64,0,0,0,0,0x64,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,4,4,4,4,0,0,4,4, -0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,0, +0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,4,0x64,4,4,4,4,0,0,4, -4,4,4,0,0,0,0,0,0,0,0,0x64,0,0,0,0, -0,0,0,0,0,4,4,4,4,4,4,0,0,4,4,4, -0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, -4,4,4,4,4,4,4,0,4,0x64,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, -4,4,4,0,4,4,4,4,4,4,0,0x64,4,4,4,4, -4,4,4,4,0,0,4,4,4,4,4,4,4,0,4,4, -0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,4,4,4,4,4,4,0,0,0,4,0, -4,4,0,4,4,4,0x64,4,0x64,0x64,0,4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,4,4,0x60,0x64,0, +0,0,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,4,4,0,0,0,4,0,0x64,0,0,0,0, +4,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4, +4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,0, -0,0,0,0,4,0x60,0x64,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4, -4,4,4,4,4,0,0,0,0,0,0,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x64,0x64,0x64,0x64, -0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,4, -4,0,0,0,0,0,0,0,0,0,0,0,0x60,0x60,0,0, +0x64,4,4,4,4,0,0,4,4,4,4,0,0,0,0,0, +0,0,0,0x64,0,0,0,0,0,0,0,0,0,4,4,4, +4,4,4,0,0,4,4,4,0,0,0,0,0,0,0,0, +0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,0, +4,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,4,4,4,4,4,4,4,0,4,4,4,4, +4,4,0,0x64,4,4,4,4,4,4,4,4,0,0,4,4, +4,4,4,4,4,0,4,4,0,4,4,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4, +4,4,4,0,0,0,4,0,4,4,0,4,4,4,0x64,4, +0x64,0x64,0,4,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0, +0,4,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,4,4,0,4,4,4,4,4,4,4,0,4,4,0, +0,0,4,4,4,4,4,0,0,0,0,0,4,0x60,0x64,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,4,0x64,0, +0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0x60,0x60,0x64, -0x64,0x64,0,0,0,0x60,0x60,0x60,0x60,0x60,0x60,4,4,4,4,4, -4,4,4,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0,0x44,0x44,0x44, -0x44,0x44,0x64,0x64,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0,0, +0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4, +4,4,0,0,0,4,4,0x64,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x64,0x64,0x64,0x64,0x64,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,0,4,4,0,0,0, +0,0,0,0,0,0,0,0,0x60,0x60,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, +0,4,4,4,4,4,4,4,0,4,4,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,4,0x64,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0x60,0x60,0x64,0x64,0x64,0,0, +0,0x60,0x60,0x60,0x60,0x60,0x60,4,4,4,4,4,4,4,4,0x64, +0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0,0x44,0x44,0x44,0x44,0x44,0x64,0x64, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0x44,0x44,0x44,0x44,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44, +0x44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1, -1,1,0x21,0x21,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,1,1,1,1,1,1,1,0,0x21,0x21,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,1,1,1,1,1,1,1,1,0x21,0x21, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1, -1,1,1,1,1,1,0x21,0x21,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,2,0,2,2,0,0,2,0, -0,2,2,0,0,2,2,2,2,0,2,2,2,2,2,2, -2,2,1,1,1,1,0,1,0,1,0x21,0x21,1,1,1,1, -0,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1, -2,2,0,2,2,2,2,0,0,2,2,2,2,2,2,2, -2,0,2,2,2,2,2,2,2,0,1,1,1,1,1,1, +1,1,1,1,1,0,0x21,0x21,1,1,1,1,1,1,1,1, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1, 1,1,0x21,0x21,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,0,2,2,2,2,0,2,2,2,2, -2,0,2,0,0,0,2,2,2,2,2,2,2,0,1,1, -1,1,1,1,1,1,0x21,0x21,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1, +1,1,1,1,2,0,2,2,0,0,2,0,0,2,2,0, +0,2,2,2,2,0,2,2,2,2,2,2,2,2,1,1, +1,1,0,1,0,1,0x21,0x21,1,1,1,1,0,1,1,1, 1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,1,1,1,1,1,1,0,0, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1, +2,2,2,2,2,2,2,2,1,1,1,1,2,2,0,2, +2,2,2,0,0,2,2,2,2,2,2,2,2,0,2,2, +2,2,2,2,2,0,1,1,1,1,1,1,1,1,0x21,0x21, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,0,1,1,1,1,1,1,2,2,2,2,2,2, +2,2,0,2,2,2,2,0,2,2,2,2,2,0,2,0, +0,0,2,2,2,2,2,2,2,0,1,1,1,1,1,1, +1,1,0x21,0x21,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, +2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,1,1,1,1,1,1,0,0,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -1,1,1,0,1,1,1,1,1,1,2,1,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,2,2,2,2,0,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,0, +1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,0,1,1,1,1,1,1,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,0, +1,1,1,1,1,1,2,1,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,4,4,4,4,4,4,0,0,0,0,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0, -0,4,0,0,0,0,0,0,0,0,0,0,4,0,0,0, +4,4,4,0,0,0,0,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,0,0,0,0,0,0,0,0,4,0,0, +0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, +4,4,4,4,0,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0x44,0x44,0x44,0x44, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0x44, +0x44,0x44,0x44,0x44,1,1,1,1,1,1,1,1,1,1,0,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x21,1, +1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,4,4,4,4,4,0,4,4,4,4,4,4,4, -4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0, -0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, -0x44,0,0,0x44,0x44,0x44,0x44,0x44,1,1,1,1,1,1,1,1, -1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,0x21,1,1,1,1,0,0,0,0,0,0,1,1,1, -1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x44,0x44,0,0x44,0x44,0,0x44,0x44, -0x44,0x44,0x44,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0x25,5,5,5,5,5,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0x44,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x44,0x44,0,0x44,0x44,0,0x44,0x44,0x44,0x44,0x44,0, 0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -0x25,0x25,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,4,4,4,4,4, -4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4, -0x64,0x64,0x64,0x44,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,0x25,5,5,5,5,5,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x44, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,0x25,0x25,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,4,4,4,4,4,4,4,0,0, +0,0,0,0,0,0,0,0,0,0,0,4,0x64,0x64,0x64,0x44, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x44,0x64,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0,0,0,0, 0,0,0,0,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112, 0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112, @@ -838,111 +852,112 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0,0,0,0,0,0,0,0,0,0,0,0 }; -static const uint16_t ucase_props_exceptions[1664]={ +static const uint16_t ucase_props_exceptions[1672]={ 0xc850,0x20,2,0x130,0x131,0x4810,0x20,0x841,0x6b,1,0x212a,0x841,0x73,1,0x17f,0x5c50, 0x20,2,0x130,0x131,0x844,0x4b,1,0x212a,0x844,0x53,1,0x17f,0x806,0x3bc,0x39c,0x841, 0xe5,1,0x212b,0x8c0,1,0x2220,0x73,0x73,0x53,0x53,0x53,0x73,0x1e9e,0x844,0xc5,1, 0x212b,0x4810,1,0xce50,0xc7,2,0x49,0x131,0x844,0x49,2,0x69,0x130,0x880,0x2220,0x2bc, -0x6e,0x2bc,0x4e,0x2bc,0x4e,0x806,0x73,0x53,0x809,0x1c6,0x1c5,0x80d,0x1c6,0x1c4,0x1c5,0x80c, -0x1c4,0x1c5,0x809,0x1c9,0x1c8,0x80d,0x1c9,0x1c7,0x1c8,0x80c,0x1c7,0x1c8,0x809,0x1cc,0x1cb,0x80d, -0x1cc,0x1ca,0x1cb,0x80c,0x1ca,0x1cb,0x880,0x2220,0x6a,0x30c,0x4a,0x30c,0x4a,0x30c,0x809,0x1f3, -0x1f2,0x80d,0x1f3,0x1f1,0x1f2,0x80c,0x1f1,0x1f2,0x810,0x2a2b,0x810,0x2a28,0x810,0x2a3f,0x810,0x2a1f, -0x810,0x2a1c,0x810,0x2a1e,0x810,0xa54f,0x810,0xa54b,0x810,0xa528,0x810,0xa544,0x810,0x29f7,0x810,0xa541, -0x810,0x29fd,0x810,0x29e7,0x810,0xa543,0x810,0xa52a,0x1810,0xa515,0x810,0xa512,0x6800,0x3846,0x3b9,0x399, -1,0x1fbe,0x8c0,1,0x3330,0x3b9,0x308,0x301,0x399,0x308,0x301,0x399,0x308,0x301,0x1fd3,0x841, -0x3b2,1,0x3d0,0x841,0x3b5,1,0x3f5,0x841,0x3b8,2,0x3d1,0x3f4,0x841,0x3b9,2,0x345, -0x1fbe,0x841,0x3ba,1,0x3f0,0x841,0x3bc,1,0xb5,0x841,0x3c0,1,0x3d6,0x841,0x3c1,1, -0x3f1,0x4850,0x20,1,0x3c2,0x841,0x3c6,1,0x3d5,0x841,0x3c9,1,0x2126,0x8c0,1,0x3330, -0x3c5,0x308,0x301,0x3a5,0x308,0x301,0x3a5,0x308,0x301,0x1fe3,0x844,0x392,1,0x3d0,0x844,0x395, -1,0x3f5,0x844,0x398,2,0x3d1,0x3f4,0x844,0x399,2,0x345,0x1fbe,0x844,0x39a,1,0x3f0, -0x844,0x39c,1,0xb5,0x844,0x3a0,1,0x3d6,0x844,0x3a1,1,0x3f1,0x806,0x3c3,0x3a3,0x844, -0x3a3,1,0x3c2,0x844,0x3a6,1,0x3d5,0x844,0x3a9,1,0x2126,0x806,0x3b2,0x392,0x846,0x3b8, -0x398,1,0x3f4,0x806,0x3c6,0x3a6,0x806,0x3c0,0x3a0,0x806,0x3ba,0x39a,0x806,0x3c1,0x3a1,0x841, -0x3b8,2,0x398,0x3d1,0x806,0x3b5,0x395,0x841,0x432,1,0x1c80,0x841,0x434,1,0x1c81,0x841, -0x43e,1,0x1c82,0x841,0x441,1,0x1c83,0x841,0x442,2,0x1c84,0x1c85,0x841,0x44a,1,0x1c86, -0x844,0x412,1,0x1c80,0x844,0x414,1,0x1c81,0x844,0x41e,1,0x1c82,0x844,0x421,1,0x1c83, -0x844,0x422,2,0x1c84,0x1c85,0x844,0x42a,1,0x1c86,0x841,0x463,1,0x1c87,0x844,0x462,1, -0x1c87,0x4880,0x20,0x565,0x582,0x810,0x1c60,0x80c,0x1c90,0x10d0,0x80c,0x1c91,0x10d1,0x80c,0x1c92,0x10d2, -0x80c,0x1c93,0x10d3,0x80c,0x1c94,0x10d4,0x80c,0x1c95,0x10d5,0x80c,0x1c96,0x10d6,0x80c,0x1c97,0x10d7,0x80c, -0x1c98,0x10d8,0x80c,0x1c99,0x10d9,0x80c,0x1c9a,0x10da,0x80c,0x1c9b,0x10db,0x80c,0x1c9c,0x10dc,0x80c,0x1c9d, -0x10dd,0x80c,0x1c9e,0x10de,0x80c,0x1c9f,0x10df,0x80c,0x1ca0,0x10e0,0x80c,0x1ca1,0x10e1,0x80c,0x1ca2,0x10e2, -0x80c,0x1ca3,0x10e3,0x80c,0x1ca4,0x10e4,0x80c,0x1ca5,0x10e5,0x80c,0x1ca6,0x10e6,0x80c,0x1ca7,0x10e7,0x80c, -0x1ca8,0x10e8,0x80c,0x1ca9,0x10e9,0x80c,0x1caa,0x10ea,0x80c,0x1cab,0x10eb,0x80c,0x1cac,0x10ec,0x80c,0x1cad, -0x10ed,0x80c,0x1cae,0x10ee,0x80c,0x1caf,0x10ef,0x80c,0x1cb0,0x10f0,0x80c,0x1cb1,0x10f1,0x80c,0x1cb2,0x10f2, -0x80c,0x1cb3,0x10f3,0x80c,0x1cb4,0x10f4,0x80c,0x1cb5,0x10f5,0x80c,0x1cb6,0x10f6,0x80c,0x1cb7,0x10f7,0x80c, -0x1cb8,0x10f8,0x80c,0x1cb9,0x10f9,0x80c,0x1cba,0x10fa,0x80c,0x1cbd,0x10fd,0x80c,0x1cbe,0x10fe,0x80c,0x1cbf, -0x10ff,0xa10,0x97d0,0xa10,8,0x806,0x13f0,0x13f0,0x806,0x13f1,0x13f1,0x806,0x13f2,0x13f2,0x806,0x13f3, -0x13f3,0x806,0x13f4,0x13f4,0x806,0x13f5,0x13f5,0x806,0x432,0x412,0x806,0x434,0x414,0x806,0x43e,0x41e, -0x806,0x441,0x421,0x846,0x442,0x422,1,0x1c85,0x846,0x442,0x422,1,0x1c84,0x806,0x44a,0x42a, -0x806,0x463,0x462,0x806,0xa64b,0xa64a,0xc10,0xbc0,0x810,0x8a04,0x810,0xee6,0x810,0x8a38,0x841,0x1e61, -1,0x1e9b,0x844,0x1e60,1,0x1e9b,0x880,0x2220,0x68,0x331,0x48,0x331,0x48,0x331,0x880,0x2220, -0x74,0x308,0x54,0x308,0x54,0x308,0x880,0x2220,0x77,0x30a,0x57,0x30a,0x57,0x30a,0x880,0x2220, -0x79,0x30a,0x59,0x30a,0x59,0x30a,0x880,0x2220,0x61,0x2be,0x41,0x2be,0x41,0x2be,0x806,0x1e61, -0x1e60,0xc90,0x1dbf,0x20,0x73,0x73,0x880,0x2220,0x3c5,0x313,0x3a5,0x313,0x3a5,0x313,0x880,0x3330, -0x3c5,0x313,0x300,0x3a5,0x313,0x300,0x3a5,0x313,0x300,0x880,0x3330,0x3c5,0x313,0x301,0x3a5,0x313, -0x301,0x3a5,0x313,0x301,0x880,0x3330,0x3c5,0x313,0x342,0x3a5,0x313,0x342,0x3a5,0x313,0x342,0x890, -8,0x220,0x1f00,0x3b9,0x1f08,0x399,0x890,8,0x220,0x1f01,0x3b9,0x1f09,0x399,0x890,8,0x220, -0x1f02,0x3b9,0x1f0a,0x399,0x890,8,0x220,0x1f03,0x3b9,0x1f0b,0x399,0x890,8,0x220,0x1f04,0x3b9, -0x1f0c,0x399,0x890,8,0x220,0x1f05,0x3b9,0x1f0d,0x399,0x890,8,0x220,0x1f06,0x3b9,0x1f0e,0x399, -0x890,8,0x220,0x1f07,0x3b9,0x1f0f,0x399,0xc90,8,0x220,0x1f00,0x3b9,0x1f08,0x399,0xc90,8, -0x220,0x1f01,0x3b9,0x1f09,0x399,0xc90,8,0x220,0x1f02,0x3b9,0x1f0a,0x399,0xc90,8,0x220,0x1f03, -0x3b9,0x1f0b,0x399,0xc90,8,0x220,0x1f04,0x3b9,0x1f0c,0x399,0xc90,8,0x220,0x1f05,0x3b9,0x1f0d, -0x399,0xc90,8,0x220,0x1f06,0x3b9,0x1f0e,0x399,0xc90,8,0x220,0x1f07,0x3b9,0x1f0f,0x399,0x890, -8,0x220,0x1f20,0x3b9,0x1f28,0x399,0x890,8,0x220,0x1f21,0x3b9,0x1f29,0x399,0x890,8,0x220, -0x1f22,0x3b9,0x1f2a,0x399,0x890,8,0x220,0x1f23,0x3b9,0x1f2b,0x399,0x890,8,0x220,0x1f24,0x3b9, -0x1f2c,0x399,0x890,8,0x220,0x1f25,0x3b9,0x1f2d,0x399,0x890,8,0x220,0x1f26,0x3b9,0x1f2e,0x399, -0x890,8,0x220,0x1f27,0x3b9,0x1f2f,0x399,0xc90,8,0x220,0x1f20,0x3b9,0x1f28,0x399,0xc90,8, -0x220,0x1f21,0x3b9,0x1f29,0x399,0xc90,8,0x220,0x1f22,0x3b9,0x1f2a,0x399,0xc90,8,0x220,0x1f23, -0x3b9,0x1f2b,0x399,0xc90,8,0x220,0x1f24,0x3b9,0x1f2c,0x399,0xc90,8,0x220,0x1f25,0x3b9,0x1f2d, -0x399,0xc90,8,0x220,0x1f26,0x3b9,0x1f2e,0x399,0xc90,8,0x220,0x1f27,0x3b9,0x1f2f,0x399,0x890, -8,0x220,0x1f60,0x3b9,0x1f68,0x399,0x890,8,0x220,0x1f61,0x3b9,0x1f69,0x399,0x890,8,0x220, -0x1f62,0x3b9,0x1f6a,0x399,0x890,8,0x220,0x1f63,0x3b9,0x1f6b,0x399,0x890,8,0x220,0x1f64,0x3b9, -0x1f6c,0x399,0x890,8,0x220,0x1f65,0x3b9,0x1f6d,0x399,0x890,8,0x220,0x1f66,0x3b9,0x1f6e,0x399, -0x890,8,0x220,0x1f67,0x3b9,0x1f6f,0x399,0xc90,8,0x220,0x1f60,0x3b9,0x1f68,0x399,0xc90,8, -0x220,0x1f61,0x3b9,0x1f69,0x399,0xc90,8,0x220,0x1f62,0x3b9,0x1f6a,0x399,0xc90,8,0x220,0x1f63, -0x3b9,0x1f6b,0x399,0xc90,8,0x220,0x1f64,0x3b9,0x1f6c,0x399,0xc90,8,0x220,0x1f65,0x3b9,0x1f6d, -0x399,0xc90,8,0x220,0x1f66,0x3b9,0x1f6e,0x399,0xc90,8,0x220,0x1f67,0x3b9,0x1f6f,0x399,0x880, -0x2220,0x1f70,0x3b9,0x1fba,0x399,0x1fba,0x345,0x890,9,0x220,0x3b1,0x3b9,0x391,0x399,0x880,0x2220, -0x3ac,0x3b9,0x386,0x399,0x386,0x345,0x880,0x2220,0x3b1,0x342,0x391,0x342,0x391,0x342,0x880,0x3330, -0x3b1,0x342,0x3b9,0x391,0x342,0x399,0x391,0x342,0x345,0xc90,9,0x220,0x3b1,0x3b9,0x391,0x399, -0x846,0x3b9,0x399,1,0x345,0x880,0x2220,0x1f74,0x3b9,0x1fca,0x399,0x1fca,0x345,0x890,9,0x220, -0x3b7,0x3b9,0x397,0x399,0x880,0x2220,0x3ae,0x3b9,0x389,0x399,0x389,0x345,0x880,0x2220,0x3b7,0x342, -0x397,0x342,0x397,0x342,0x880,0x3330,0x3b7,0x342,0x3b9,0x397,0x342,0x399,0x397,0x342,0x345,0xc90, -9,0x220,0x3b7,0x3b9,0x397,0x399,0x880,0x3330,0x3b9,0x308,0x300,0x399,0x308,0x300,0x399,0x308, -0x300,0x882,0x390,0x3330,0x3b9,0x308,0x301,0x399,0x308,0x301,0x399,0x308,0x301,0x880,0x2220,0x3b9, -0x342,0x399,0x342,0x399,0x342,0x880,0x3330,0x3b9,0x308,0x342,0x399,0x308,0x342,0x399,0x308,0x342, -0x880,0x3330,0x3c5,0x308,0x300,0x3a5,0x308,0x300,0x3a5,0x308,0x300,0x882,0x3b0,0x3330,0x3c5,0x308, -0x301,0x3a5,0x308,0x301,0x3a5,0x308,0x301,0x880,0x2220,0x3c1,0x313,0x3a1,0x313,0x3a1,0x313,0x880, -0x2220,0x3c5,0x342,0x3a5,0x342,0x3a5,0x342,0x880,0x3330,0x3c5,0x308,0x342,0x3a5,0x308,0x342,0x3a5, -0x308,0x342,0x880,0x2220,0x1f7c,0x3b9,0x1ffa,0x399,0x1ffa,0x345,0x890,9,0x220,0x3c9,0x3b9,0x3a9, -0x399,0x880,0x2220,0x3ce,0x3b9,0x38f,0x399,0x38f,0x345,0x880,0x2220,0x3c9,0x342,0x3a9,0x342,0x3a9, -0x342,0x880,0x3330,0x3c9,0x342,0x3b9,0x3a9,0x342,0x399,0x3a9,0x342,0x345,0xc90,9,0x220,0x3c9, -0x3b9,0x3a9,0x399,0xc50,0x1d5d,1,0x3a9,0xc50,0x20bf,1,0x4b,0xc50,0x2046,1,0xc5,0xc10, -0x29f7,0xc10,0xee6,0xc10,0x29e7,0xc10,0x2a2b,0xc10,0x2a28,0xc10,0x2a1c,0xc10,0x29fd,0xc10,0x2a1f,0xc10, -0x2a1e,0xc10,0x2a3f,0xc10,0x1c60,0x841,0xa64b,1,0x1c88,0x844,0xa64a,1,0x1c88,0xc10,0x8a04,0xc10, -0xa528,0xc10,0xa544,0xc10,0xa54f,0xc10,0xa54b,0xc10,0xa541,0xc10,0xa512,0xc10,0xa52a,0xc10,0xa515,0x810, -0x3a0,0xc10,0xa543,0xc10,0x8a38,0xc10,0x3a0,0x806,0x13a0,0x13a0,0x806,0x13a1,0x13a1,0x806,0x13a2,0x13a2, -0x806,0x13a3,0x13a3,0x806,0x13a4,0x13a4,0x806,0x13a5,0x13a5,0x806,0x13a6,0x13a6,0x806,0x13a7,0x13a7,0x806, -0x13a8,0x13a8,0x806,0x13a9,0x13a9,0x806,0x13aa,0x13aa,0x806,0x13ab,0x13ab,0x806,0x13ac,0x13ac,0x806,0x13ad, -0x13ad,0x806,0x13ae,0x13ae,0x806,0x13af,0x13af,0x806,0x13b0,0x13b0,0x806,0x13b1,0x13b1,0x806,0x13b2,0x13b2, -0x806,0x13b3,0x13b3,0x806,0x13b4,0x13b4,0x806,0x13b5,0x13b5,0x806,0x13b6,0x13b6,0x806,0x13b7,0x13b7,0x806, -0x13b8,0x13b8,0x806,0x13b9,0x13b9,0x806,0x13ba,0x13ba,0x806,0x13bb,0x13bb,0x806,0x13bc,0x13bc,0x806,0x13bd, -0x13bd,0x806,0x13be,0x13be,0x806,0x13bf,0x13bf,0x806,0x13c0,0x13c0,0x806,0x13c1,0x13c1,0x806,0x13c2,0x13c2, -0x806,0x13c3,0x13c3,0x806,0x13c4,0x13c4,0x806,0x13c5,0x13c5,0x806,0x13c6,0x13c6,0x806,0x13c7,0x13c7,0x806, -0x13c8,0x13c8,0x806,0x13c9,0x13c9,0x806,0x13ca,0x13ca,0x806,0x13cb,0x13cb,0x806,0x13cc,0x13cc,0x806,0x13cd, -0x13cd,0x806,0x13ce,0x13ce,0x806,0x13cf,0x13cf,0x806,0x13d0,0x13d0,0x806,0x13d1,0x13d1,0x806,0x13d2,0x13d2, -0x806,0x13d3,0x13d3,0x806,0x13d4,0x13d4,0x806,0x13d5,0x13d5,0x806,0x13d6,0x13d6,0x806,0x13d7,0x13d7,0x806, -0x13d8,0x13d8,0x806,0x13d9,0x13d9,0x806,0x13da,0x13da,0x806,0x13db,0x13db,0x806,0x13dc,0x13dc,0x806,0x13dd, -0x13dd,0x806,0x13de,0x13de,0x806,0x13df,0x13df,0x806,0x13e0,0x13e0,0x806,0x13e1,0x13e1,0x806,0x13e2,0x13e2, -0x806,0x13e3,0x13e3,0x806,0x13e4,0x13e4,0x806,0x13e5,0x13e5,0x806,0x13e6,0x13e6,0x806,0x13e7,0x13e7,0x806, -0x13e8,0x13e8,0x806,0x13e9,0x13e9,0x806,0x13ea,0x13ea,0x806,0x13eb,0x13eb,0x806,0x13ec,0x13ec,0x806,0x13ed, -0x13ed,0x806,0x13ee,0x13ee,0x806,0x13ef,0x13ef,0x880,0x2220,0x66,0x66,0x46,0x46,0x46,0x66,0x880, -0x2220,0x66,0x69,0x46,0x49,0x46,0x69,0x880,0x2220,0x66,0x6c,0x46,0x4c,0x46,0x6c,0x880, -0x3330,0x66,0x66,0x69,0x46,0x46,0x49,0x46,0x66,0x69,0x880,0x3330,0x66,0x66,0x6c,0x46, -0x46,0x4c,0x46,0x66,0x6c,0x882,0xfb06,0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0x8c0,1, -0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0xfb05,0x880,0x2220,0x574,0x576,0x544,0x546,0x544,0x576, -0x880,0x2220,0x574,0x565,0x544,0x535,0x544,0x565,0x880,0x2220,0x574,0x56b,0x544,0x53b,0x544,0x56b, -0x880,0x2220,0x57e,0x576,0x54e,0x546,0x54e,0x576,0x880,0x2220,0x574,0x56d,0x544,0x53d,0x544,0x56d +0x6e,0x2bc,0x4e,0x2bc,0x4e,0x806,0x73,0x53,0x810,0xa641,0x809,0x1c6,0x1c5,0x80d,0x1c6,0x1c4, +0x1c5,0x80c,0x1c4,0x1c5,0x809,0x1c9,0x1c8,0x80d,0x1c9,0x1c7,0x1c8,0x80c,0x1c7,0x1c8,0x809,0x1cc, +0x1cb,0x80d,0x1cc,0x1ca,0x1cb,0x80c,0x1ca,0x1cb,0x880,0x2220,0x6a,0x30c,0x4a,0x30c,0x4a,0x30c, +0x809,0x1f3,0x1f2,0x80d,0x1f3,0x1f1,0x1f2,0x80c,0x1f1,0x1f2,0x810,0x2a2b,0x810,0x2a28,0x810,0x2a3f, +0x810,0x2a1f,0x810,0x2a1c,0x810,0x2a1e,0x810,0xa54f,0x810,0xa54b,0x810,0xa567,0x810,0xa528,0x810,0xa544, +0x810,0x29f7,0x810,0xa541,0x810,0x29fd,0x810,0x29e7,0x810,0xa543,0x810,0xa52a,0x1810,0xa515,0x810,0xa512, +0x6800,0x3846,0x3b9,0x399,1,0x1fbe,0x8c0,1,0x3330,0x3b9,0x308,0x301,0x399,0x308,0x301,0x399, +0x308,0x301,0x1fd3,0x841,0x3b2,1,0x3d0,0x841,0x3b5,1,0x3f5,0x841,0x3b8,2,0x3d1,0x3f4, +0x841,0x3b9,2,0x345,0x1fbe,0x841,0x3ba,1,0x3f0,0x841,0x3bc,1,0xb5,0x841,0x3c0,1, +0x3d6,0x841,0x3c1,1,0x3f1,0x4850,0x20,1,0x3c2,0x841,0x3c6,1,0x3d5,0x841,0x3c9,1, +0x2126,0x8c0,1,0x3330,0x3c5,0x308,0x301,0x3a5,0x308,0x301,0x3a5,0x308,0x301,0x1fe3,0x844,0x392, +1,0x3d0,0x844,0x395,1,0x3f5,0x844,0x398,2,0x3d1,0x3f4,0x844,0x399,2,0x345,0x1fbe, +0x844,0x39a,1,0x3f0,0x844,0x39c,1,0xb5,0x844,0x3a0,1,0x3d6,0x844,0x3a1,1,0x3f1, +0x806,0x3c3,0x3a3,0x844,0x3a3,1,0x3c2,0x844,0x3a6,1,0x3d5,0x844,0x3a9,1,0x2126,0x806, +0x3b2,0x392,0x846,0x3b8,0x398,1,0x3f4,0x806,0x3c6,0x3a6,0x806,0x3c0,0x3a0,0x806,0x3ba,0x39a, +0x806,0x3c1,0x3a1,0x841,0x3b8,2,0x398,0x3d1,0x806,0x3b5,0x395,0x841,0x432,1,0x1c80,0x841, +0x434,1,0x1c81,0x841,0x43e,1,0x1c82,0x841,0x441,1,0x1c83,0x841,0x442,2,0x1c84,0x1c85, +0x841,0x44a,1,0x1c86,0x844,0x412,1,0x1c80,0x844,0x414,1,0x1c81,0x844,0x41e,1,0x1c82, +0x844,0x421,1,0x1c83,0x844,0x422,2,0x1c84,0x1c85,0x844,0x42a,1,0x1c86,0x841,0x463,1, +0x1c87,0x844,0x462,1,0x1c87,0x4880,0x20,0x565,0x582,0x810,0x1c60,0x80c,0x1c90,0x10d0,0x80c,0x1c91, +0x10d1,0x80c,0x1c92,0x10d2,0x80c,0x1c93,0x10d3,0x80c,0x1c94,0x10d4,0x80c,0x1c95,0x10d5,0x80c,0x1c96,0x10d6, +0x80c,0x1c97,0x10d7,0x80c,0x1c98,0x10d8,0x80c,0x1c99,0x10d9,0x80c,0x1c9a,0x10da,0x80c,0x1c9b,0x10db,0x80c, +0x1c9c,0x10dc,0x80c,0x1c9d,0x10dd,0x80c,0x1c9e,0x10de,0x80c,0x1c9f,0x10df,0x80c,0x1ca0,0x10e0,0x80c,0x1ca1, +0x10e1,0x80c,0x1ca2,0x10e2,0x80c,0x1ca3,0x10e3,0x80c,0x1ca4,0x10e4,0x80c,0x1ca5,0x10e5,0x80c,0x1ca6,0x10e6, +0x80c,0x1ca7,0x10e7,0x80c,0x1ca8,0x10e8,0x80c,0x1ca9,0x10e9,0x80c,0x1caa,0x10ea,0x80c,0x1cab,0x10eb,0x80c, +0x1cac,0x10ec,0x80c,0x1cad,0x10ed,0x80c,0x1cae,0x10ee,0x80c,0x1caf,0x10ef,0x80c,0x1cb0,0x10f0,0x80c,0x1cb1, +0x10f1,0x80c,0x1cb2,0x10f2,0x80c,0x1cb3,0x10f3,0x80c,0x1cb4,0x10f4,0x80c,0x1cb5,0x10f5,0x80c,0x1cb6,0x10f6, +0x80c,0x1cb7,0x10f7,0x80c,0x1cb8,0x10f8,0x80c,0x1cb9,0x10f9,0x80c,0x1cba,0x10fa,0x80c,0x1cbd,0x10fd,0x80c, +0x1cbe,0x10fe,0x80c,0x1cbf,0x10ff,0xa10,0x97d0,0xa10,8,0x806,0x13f0,0x13f0,0x806,0x13f1,0x13f1,0x806, +0x13f2,0x13f2,0x806,0x13f3,0x13f3,0x806,0x13f4,0x13f4,0x806,0x13f5,0x13f5,0x806,0x432,0x412,0x806,0x434, +0x414,0x806,0x43e,0x41e,0x806,0x441,0x421,0x846,0x442,0x422,1,0x1c85,0x846,0x442,0x422,1, +0x1c84,0x806,0x44a,0x42a,0x806,0x463,0x462,0x806,0xa64b,0xa64a,0xc10,0xbc0,0x810,0x8a04,0x810,0xee6, +0x810,0x8a38,0x841,0x1e61,1,0x1e9b,0x844,0x1e60,1,0x1e9b,0x880,0x2220,0x68,0x331,0x48,0x331, +0x48,0x331,0x880,0x2220,0x74,0x308,0x54,0x308,0x54,0x308,0x880,0x2220,0x77,0x30a,0x57,0x30a, +0x57,0x30a,0x880,0x2220,0x79,0x30a,0x59,0x30a,0x59,0x30a,0x880,0x2220,0x61,0x2be,0x41,0x2be, +0x41,0x2be,0x806,0x1e61,0x1e60,0xc90,0x1dbf,0x20,0x73,0x73,0x880,0x2220,0x3c5,0x313,0x3a5,0x313, +0x3a5,0x313,0x880,0x3330,0x3c5,0x313,0x300,0x3a5,0x313,0x300,0x3a5,0x313,0x300,0x880,0x3330,0x3c5, +0x313,0x301,0x3a5,0x313,0x301,0x3a5,0x313,0x301,0x880,0x3330,0x3c5,0x313,0x342,0x3a5,0x313,0x342, +0x3a5,0x313,0x342,0x890,8,0x220,0x1f00,0x3b9,0x1f08,0x399,0x890,8,0x220,0x1f01,0x3b9,0x1f09, +0x399,0x890,8,0x220,0x1f02,0x3b9,0x1f0a,0x399,0x890,8,0x220,0x1f03,0x3b9,0x1f0b,0x399,0x890, +8,0x220,0x1f04,0x3b9,0x1f0c,0x399,0x890,8,0x220,0x1f05,0x3b9,0x1f0d,0x399,0x890,8,0x220, +0x1f06,0x3b9,0x1f0e,0x399,0x890,8,0x220,0x1f07,0x3b9,0x1f0f,0x399,0xc90,8,0x220,0x1f00,0x3b9, +0x1f08,0x399,0xc90,8,0x220,0x1f01,0x3b9,0x1f09,0x399,0xc90,8,0x220,0x1f02,0x3b9,0x1f0a,0x399, +0xc90,8,0x220,0x1f03,0x3b9,0x1f0b,0x399,0xc90,8,0x220,0x1f04,0x3b9,0x1f0c,0x399,0xc90,8, +0x220,0x1f05,0x3b9,0x1f0d,0x399,0xc90,8,0x220,0x1f06,0x3b9,0x1f0e,0x399,0xc90,8,0x220,0x1f07, +0x3b9,0x1f0f,0x399,0x890,8,0x220,0x1f20,0x3b9,0x1f28,0x399,0x890,8,0x220,0x1f21,0x3b9,0x1f29, +0x399,0x890,8,0x220,0x1f22,0x3b9,0x1f2a,0x399,0x890,8,0x220,0x1f23,0x3b9,0x1f2b,0x399,0x890, +8,0x220,0x1f24,0x3b9,0x1f2c,0x399,0x890,8,0x220,0x1f25,0x3b9,0x1f2d,0x399,0x890,8,0x220, +0x1f26,0x3b9,0x1f2e,0x399,0x890,8,0x220,0x1f27,0x3b9,0x1f2f,0x399,0xc90,8,0x220,0x1f20,0x3b9, +0x1f28,0x399,0xc90,8,0x220,0x1f21,0x3b9,0x1f29,0x399,0xc90,8,0x220,0x1f22,0x3b9,0x1f2a,0x399, +0xc90,8,0x220,0x1f23,0x3b9,0x1f2b,0x399,0xc90,8,0x220,0x1f24,0x3b9,0x1f2c,0x399,0xc90,8, +0x220,0x1f25,0x3b9,0x1f2d,0x399,0xc90,8,0x220,0x1f26,0x3b9,0x1f2e,0x399,0xc90,8,0x220,0x1f27, +0x3b9,0x1f2f,0x399,0x890,8,0x220,0x1f60,0x3b9,0x1f68,0x399,0x890,8,0x220,0x1f61,0x3b9,0x1f69, +0x399,0x890,8,0x220,0x1f62,0x3b9,0x1f6a,0x399,0x890,8,0x220,0x1f63,0x3b9,0x1f6b,0x399,0x890, +8,0x220,0x1f64,0x3b9,0x1f6c,0x399,0x890,8,0x220,0x1f65,0x3b9,0x1f6d,0x399,0x890,8,0x220, +0x1f66,0x3b9,0x1f6e,0x399,0x890,8,0x220,0x1f67,0x3b9,0x1f6f,0x399,0xc90,8,0x220,0x1f60,0x3b9, +0x1f68,0x399,0xc90,8,0x220,0x1f61,0x3b9,0x1f69,0x399,0xc90,8,0x220,0x1f62,0x3b9,0x1f6a,0x399, +0xc90,8,0x220,0x1f63,0x3b9,0x1f6b,0x399,0xc90,8,0x220,0x1f64,0x3b9,0x1f6c,0x399,0xc90,8, +0x220,0x1f65,0x3b9,0x1f6d,0x399,0xc90,8,0x220,0x1f66,0x3b9,0x1f6e,0x399,0xc90,8,0x220,0x1f67, +0x3b9,0x1f6f,0x399,0x880,0x2220,0x1f70,0x3b9,0x1fba,0x399,0x1fba,0x345,0x890,9,0x220,0x3b1,0x3b9, +0x391,0x399,0x880,0x2220,0x3ac,0x3b9,0x386,0x399,0x386,0x345,0x880,0x2220,0x3b1,0x342,0x391,0x342, +0x391,0x342,0x880,0x3330,0x3b1,0x342,0x3b9,0x391,0x342,0x399,0x391,0x342,0x345,0xc90,9,0x220, +0x3b1,0x3b9,0x391,0x399,0x846,0x3b9,0x399,1,0x345,0x880,0x2220,0x1f74,0x3b9,0x1fca,0x399,0x1fca, +0x345,0x890,9,0x220,0x3b7,0x3b9,0x397,0x399,0x880,0x2220,0x3ae,0x3b9,0x389,0x399,0x389,0x345, +0x880,0x2220,0x3b7,0x342,0x397,0x342,0x397,0x342,0x880,0x3330,0x3b7,0x342,0x3b9,0x397,0x342,0x399, +0x397,0x342,0x345,0xc90,9,0x220,0x3b7,0x3b9,0x397,0x399,0x880,0x3330,0x3b9,0x308,0x300,0x399, +0x308,0x300,0x399,0x308,0x300,0x882,0x390,0x3330,0x3b9,0x308,0x301,0x399,0x308,0x301,0x399,0x308, +0x301,0x880,0x2220,0x3b9,0x342,0x399,0x342,0x399,0x342,0x880,0x3330,0x3b9,0x308,0x342,0x399,0x308, +0x342,0x399,0x308,0x342,0x880,0x3330,0x3c5,0x308,0x300,0x3a5,0x308,0x300,0x3a5,0x308,0x300,0x882, +0x3b0,0x3330,0x3c5,0x308,0x301,0x3a5,0x308,0x301,0x3a5,0x308,0x301,0x880,0x2220,0x3c1,0x313,0x3a1, +0x313,0x3a1,0x313,0x880,0x2220,0x3c5,0x342,0x3a5,0x342,0x3a5,0x342,0x880,0x3330,0x3c5,0x308,0x342, +0x3a5,0x308,0x342,0x3a5,0x308,0x342,0x880,0x2220,0x1f7c,0x3b9,0x1ffa,0x399,0x1ffa,0x345,0x890,9, +0x220,0x3c9,0x3b9,0x3a9,0x399,0x880,0x2220,0x3ce,0x3b9,0x38f,0x399,0x38f,0x345,0x880,0x2220,0x3c9, +0x342,0x3a9,0x342,0x3a9,0x342,0x880,0x3330,0x3c9,0x342,0x3b9,0x3a9,0x342,0x399,0x3a9,0x342,0x345, +0xc90,9,0x220,0x3c9,0x3b9,0x3a9,0x399,0xc50,0x1d5d,1,0x3a9,0xc50,0x20bf,1,0x4b,0xc50, +0x2046,1,0xc5,0xc10,0x29f7,0xc10,0xee6,0xc10,0x29e7,0xc10,0x2a2b,0xc10,0x2a28,0xc10,0x2a1c,0xc10, +0x29fd,0xc10,0x2a1f,0xc10,0x2a1e,0xc10,0x2a3f,0xc10,0x1c60,0x841,0xa64b,1,0x1c88,0x844,0xa64a,1, +0x1c88,0xc10,0x8a04,0xc10,0xa528,0xc10,0xa544,0xc10,0xa54f,0xc10,0xa54b,0xc10,0xa541,0xc10,0xa512,0xc10, +0xa52a,0xc10,0xa515,0x810,0x3a0,0xc10,0xa543,0xc10,0x8a38,0xc10,0xa567,0xc10,0xa641,0xc10,0x3a0,0x806, +0x13a0,0x13a0,0x806,0x13a1,0x13a1,0x806,0x13a2,0x13a2,0x806,0x13a3,0x13a3,0x806,0x13a4,0x13a4,0x806,0x13a5, +0x13a5,0x806,0x13a6,0x13a6,0x806,0x13a7,0x13a7,0x806,0x13a8,0x13a8,0x806,0x13a9,0x13a9,0x806,0x13aa,0x13aa, +0x806,0x13ab,0x13ab,0x806,0x13ac,0x13ac,0x806,0x13ad,0x13ad,0x806,0x13ae,0x13ae,0x806,0x13af,0x13af,0x806, +0x13b0,0x13b0,0x806,0x13b1,0x13b1,0x806,0x13b2,0x13b2,0x806,0x13b3,0x13b3,0x806,0x13b4,0x13b4,0x806,0x13b5, +0x13b5,0x806,0x13b6,0x13b6,0x806,0x13b7,0x13b7,0x806,0x13b8,0x13b8,0x806,0x13b9,0x13b9,0x806,0x13ba,0x13ba, +0x806,0x13bb,0x13bb,0x806,0x13bc,0x13bc,0x806,0x13bd,0x13bd,0x806,0x13be,0x13be,0x806,0x13bf,0x13bf,0x806, +0x13c0,0x13c0,0x806,0x13c1,0x13c1,0x806,0x13c2,0x13c2,0x806,0x13c3,0x13c3,0x806,0x13c4,0x13c4,0x806,0x13c5, +0x13c5,0x806,0x13c6,0x13c6,0x806,0x13c7,0x13c7,0x806,0x13c8,0x13c8,0x806,0x13c9,0x13c9,0x806,0x13ca,0x13ca, +0x806,0x13cb,0x13cb,0x806,0x13cc,0x13cc,0x806,0x13cd,0x13cd,0x806,0x13ce,0x13ce,0x806,0x13cf,0x13cf,0x806, +0x13d0,0x13d0,0x806,0x13d1,0x13d1,0x806,0x13d2,0x13d2,0x806,0x13d3,0x13d3,0x806,0x13d4,0x13d4,0x806,0x13d5, +0x13d5,0x806,0x13d6,0x13d6,0x806,0x13d7,0x13d7,0x806,0x13d8,0x13d8,0x806,0x13d9,0x13d9,0x806,0x13da,0x13da, +0x806,0x13db,0x13db,0x806,0x13dc,0x13dc,0x806,0x13dd,0x13dd,0x806,0x13de,0x13de,0x806,0x13df,0x13df,0x806, +0x13e0,0x13e0,0x806,0x13e1,0x13e1,0x806,0x13e2,0x13e2,0x806,0x13e3,0x13e3,0x806,0x13e4,0x13e4,0x806,0x13e5, +0x13e5,0x806,0x13e6,0x13e6,0x806,0x13e7,0x13e7,0x806,0x13e8,0x13e8,0x806,0x13e9,0x13e9,0x806,0x13ea,0x13ea, +0x806,0x13eb,0x13eb,0x806,0x13ec,0x13ec,0x806,0x13ed,0x13ed,0x806,0x13ee,0x13ee,0x806,0x13ef,0x13ef,0x880, +0x2220,0x66,0x66,0x46,0x46,0x46,0x66,0x880,0x2220,0x66,0x69,0x46,0x49,0x46,0x69,0x880, +0x2220,0x66,0x6c,0x46,0x4c,0x46,0x6c,0x880,0x3330,0x66,0x66,0x69,0x46,0x46,0x49,0x46, +0x66,0x69,0x880,0x3330,0x66,0x66,0x6c,0x46,0x46,0x4c,0x46,0x66,0x6c,0x882,0xfb06,0x2220, +0x73,0x74,0x53,0x54,0x53,0x74,0x8c0,1,0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0xfb05, +0x880,0x2220,0x574,0x576,0x544,0x546,0x544,0x576,0x880,0x2220,0x574,0x565,0x544,0x535,0x544,0x565, +0x880,0x2220,0x574,0x56b,0x544,0x53b,0x544,0x56b,0x880,0x2220,0x57e,0x576,0x54e,0x546,0x54e,0x576, +0x880,0x2220,0x574,0x56d,0x544,0x53d,0x544,0x56d }; static const uint16_t ucase_props_unfold[370]={ @@ -979,16 +994,16 @@ static const UCaseProps ucase_props_singleton={ ucase_props_unfold, { ucase_props_trieIndex, - ucase_props_trieIndex+3412, + ucase_props_trieIndex+3468, nullptr, - 3412, - 9736, + 3468, + 9904, 0x188, - 0xdd0, + 0xe08, 0x0, 0x0, 0xe0800, - 0x3358, + 0x3438, nullptr, 0, false, false, 0, nullptr }, { 4,0,0,0 } diff --git a/deps/icu-small/source/common/ucasemap.cpp b/deps/icu-small/source/common/ucasemap.cpp index f419f65c32a4cf..928c52421537fe 100644 --- a/deps/icu-small/source/common/ucasemap.cpp +++ b/deps/icu-small/source/common/ucasemap.cpp @@ -160,12 +160,12 @@ appendResult(int32_t cpLength, int32_t result, const char16_t *s, } // See unicode/utf8.h U8_APPEND_UNSAFE(). -inline uint8_t getTwoByteLead(UChar32 c) { return (uint8_t)((c >> 6) | 0xc0); } -inline uint8_t getTwoByteTrail(UChar32 c) { return (uint8_t)((c & 0x3f) | 0x80); } +inline uint8_t getTwoByteLead(UChar32 c) { return static_cast<uint8_t>((c >> 6) | 0xc0); } +inline uint8_t getTwoByteTrail(UChar32 c) { return static_cast<uint8_t>((c & 0x3f) | 0x80); } UChar32 U_CALLCONV utf8_caseContextIterator(void *context, int8_t dir) { - UCaseContext *csc=(UCaseContext *)context; + UCaseContext* csc = static_cast<UCaseContext*>(context); UChar32 c; if(dir<0) { @@ -234,7 +234,7 @@ void toLower(int32_t caseLocale, uint32_t options, if (d == 0) { continue; } ByteSinkUtil::appendUnchanged(src + prev, srcIndex - 1 - prev, sink, options, edits, errorCode); - char ascii = (char)(lead + d); + char ascii = static_cast<char>(lead + d); sink.Append(&ascii, 1); if (edits != nullptr) { edits->addReplace(1, 1); @@ -342,7 +342,7 @@ void toUpper(int32_t caseLocale, uint32_t options, if (d == 0) { continue; } ByteSinkUtil::appendUnchanged(src + prev, srcIndex - 1 - prev, sink, options, edits, errorCode); - char ascii = (char)(lead + d); + char ascii = static_cast<char>(lead + d); sink.Append(&ascii, 1); if (edits != nullptr) { edits->addReplace(1, 1); @@ -747,14 +747,14 @@ void toUpper(uint32_t options, int32_t i2 = i + 2; if ((data & HAS_EITHER_DIALYTIKA) != 0) { change |= (i2 + 2) > nextIndex || - src[i2] != (uint8_t)u8"\u0308"[0] || - src[i2 + 1] != (uint8_t)u8"\u0308"[1]; + src[i2] != static_cast<uint8_t>(u8"\u0308"[0]) || + src[i2 + 1] != static_cast<uint8_t>(u8"\u0308"[1]); i2 += 2; } if (addTonos) { change |= (i2 + 2) > nextIndex || - src[i2] != (uint8_t)u8"\u0301"[0] || - src[i2 + 1] != (uint8_t)u8"\u0301"[1]; + src[i2] != static_cast<uint8_t>(u8"\u0301"[0]) || + src[i2 + 1] != static_cast<uint8_t>(u8"\u0301"[1]); i2 += 2; } int32_t oldLength = nextIndex - i; @@ -867,14 +867,14 @@ ucasemap_mapUTF8(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_P // Get the string length. if (srcLength == -1) { - srcLength = (int32_t)uprv_strlen((const char *)src); + srcLength = static_cast<int32_t>(uprv_strlen(src)); } if (edits != nullptr && (options & U_EDITS_NO_RESET) == 0) { edits->reset(); } stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR - (const uint8_t *)src, srcLength, sink, edits, errorCode); + reinterpret_cast<const uint8_t*>(src), srcLength, sink, edits, errorCode); sink.Flush(); if (U_SUCCESS(errorCode)) { if (edits != nullptr) { @@ -904,7 +904,7 @@ ucasemap_mapUTF8(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_P /* get the string length */ if(srcLength==-1) { - srcLength=(int32_t)uprv_strlen((const char *)src); + srcLength = static_cast<int32_t>(uprv_strlen(src)); } /* check for overlapping source and destination */ @@ -923,7 +923,7 @@ ucasemap_mapUTF8(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_P dest, destCapacity, [&](ByteSink& sink, UErrorCode& status) { stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR - (const uint8_t *)src, srcLength, sink, edits, status); + reinterpret_cast<const uint8_t*>(src), srcLength, sink, edits, status); }, errorCode); if (U_SUCCESS(errorCode) && edits != nullptr) { diff --git a/deps/icu-small/source/common/ucasemap_titlecase_brkiter.cpp b/deps/icu-small/source/common/ucasemap_titlecase_brkiter.cpp index c2b44a2c7887f6..ebc952a9797557 100644 --- a/deps/icu-small/source/common/ucasemap_titlecase_brkiter.cpp +++ b/deps/icu-small/source/common/ucasemap_titlecase_brkiter.cpp @@ -107,7 +107,7 @@ ucasemap_utf8ToTitle(UCaseMap *csm, return 0; } UText utext=UTEXT_INITIALIZER; - utext_openUTF8(&utext, (const char *)src, srcLength, pErrorCode); + utext_openUTF8(&utext, src, srcLength, pErrorCode); if (U_FAILURE(*pErrorCode)) { return 0; } diff --git a/deps/icu-small/source/common/uchar.cpp b/deps/icu-small/source/common/uchar.cpp index ff12962baa5ae6..3b2ae8c8af5d98 100644 --- a/deps/icu-small/source/common/uchar.cpp +++ b/deps/icu-small/source/common/uchar.cpp @@ -23,6 +23,7 @@ #include "unicode/utypes.h" #include "unicode/uchar.h" +#include "unicode/ucptrie.h" #include "unicode/uscript.h" #include "unicode/udata.h" #include "uassert.h" @@ -67,9 +68,9 @@ _enumTypeValue(const void *context, uint32_t value) { static UBool U_CALLCONV _enumTypeRange(const void *context, UChar32 start, UChar32 end, uint32_t value) { /* just cast the value to UCharCategory */ - return ((struct _EnumTypeCallback *)context)-> - enumRange(((struct _EnumTypeCallback *)context)->context, - start, end+1, (UCharCategory)value); + return static_cast<const _EnumTypeCallback*>(context)-> + enumRange(static_cast<const _EnumTypeCallback*>(context)->context, + start, end + 1, static_cast<UCharCategory>(value)); } U_CAPI void U_EXPORT2 @@ -90,7 +91,7 @@ U_CAPI UBool U_EXPORT2 u_islower(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)(GET_CATEGORY(props)==U_LOWERCASE_LETTER); + return GET_CATEGORY(props)==U_LOWERCASE_LETTER; } /* Checks if ch is an upper case letter.*/ @@ -98,7 +99,7 @@ U_CAPI UBool U_EXPORT2 u_isupper(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)(GET_CATEGORY(props)==U_UPPERCASE_LETTER); + return GET_CATEGORY(props)==U_UPPERCASE_LETTER; } /* Checks if ch is a title case letter; usually upper case letters.*/ @@ -106,7 +107,7 @@ U_CAPI UBool U_EXPORT2 u_istitle(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)(GET_CATEGORY(props)==U_TITLECASE_LETTER); + return GET_CATEGORY(props)==U_TITLECASE_LETTER; } /* Checks if ch is a decimal digit. */ @@ -114,7 +115,7 @@ U_CAPI UBool U_EXPORT2 u_isdigit(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)(GET_CATEGORY(props)==U_DECIMAL_DIGIT_NUMBER); + return GET_CATEGORY(props)==U_DECIMAL_DIGIT_NUMBER; } U_CAPI UBool U_EXPORT2 @@ -130,7 +131,7 @@ u_isxdigit(UChar32 c) { } GET_PROPS(c, props); - return (UBool)(GET_CATEGORY(props)==U_DECIMAL_DIGIT_NUMBER); + return GET_CATEGORY(props)==U_DECIMAL_DIGIT_NUMBER; } /* Checks if the Unicode character is a letter.*/ @@ -138,7 +139,7 @@ U_CAPI UBool U_EXPORT2 u_isalpha(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)((CAT_MASK(props)&U_GC_L_MASK)!=0); + return (CAT_MASK(props)&U_GC_L_MASK)!=0; } U_CAPI UBool U_EXPORT2 @@ -151,7 +152,7 @@ U_CAPI UBool U_EXPORT2 u_isalnum(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)((CAT_MASK(props)&(U_GC_L_MASK|U_GC_ND_MASK))!=0); + return (CAT_MASK(props)&(U_GC_L_MASK|U_GC_ND_MASK))!=0; } /** @@ -160,7 +161,7 @@ u_isalnum(UChar32 c) { */ U_CFUNC UBool u_isalnumPOSIX(UChar32 c) { - return (UBool)(u_isUAlphabetic(c) || u_isdigit(c)); + return u_isUAlphabetic(c) || u_isdigit(c); } /* Checks if ch is a unicode character with assigned character type.*/ @@ -168,7 +169,7 @@ U_CAPI UBool U_EXPORT2 u_isdefined(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)(GET_CATEGORY(props)!=0); + return GET_CATEGORY(props)!=0; } /* Checks if the Unicode character is a base form character that can take a diacritic.*/ @@ -176,7 +177,7 @@ U_CAPI UBool U_EXPORT2 u_isbase(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)((CAT_MASK(props)&(U_GC_L_MASK|U_GC_N_MASK|U_GC_MC_MASK|U_GC_ME_MASK))!=0); + return (CAT_MASK(props)&(U_GC_L_MASK|U_GC_N_MASK|U_GC_MC_MASK|U_GC_ME_MASK))!=0; } /* Checks if the Unicode character is a control character.*/ @@ -184,7 +185,7 @@ U_CAPI UBool U_EXPORT2 u_iscntrl(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)((CAT_MASK(props)&(U_GC_CC_MASK|U_GC_CF_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK))!=0); + return (CAT_MASK(props)&(U_GC_CC_MASK|U_GC_CF_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK))!=0; } U_CAPI UBool U_EXPORT2 @@ -205,14 +206,14 @@ U_CAPI UBool U_EXPORT2 u_isspace(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)((CAT_MASK(props)&U_GC_Z_MASK)!=0 || IS_THAT_CONTROL_SPACE(c)); + return (CAT_MASK(props)&U_GC_Z_MASK)!=0 || IS_THAT_CONTROL_SPACE(c); } U_CAPI UBool U_EXPORT2 u_isJavaSpaceChar(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)((CAT_MASK(props)&U_GC_Z_MASK)!=0); + return (CAT_MASK(props)&U_GC_Z_MASK)!=0; } /* Checks if the Unicode character is a whitespace character.*/ @@ -220,11 +221,9 @@ U_CAPI UBool U_EXPORT2 u_isWhitespace(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)( - ((CAT_MASK(props)&U_GC_Z_MASK)!=0 && - c!=NBSP && c!=FIGURESP && c!=NNBSP) || /* exclude no-break spaces */ - IS_THAT_ASCII_CONTROL_SPACE(c) - ); + return ((CAT_MASK(props)&U_GC_Z_MASK)!=0 && + c!=NBSP && c!=FIGURESP && c!=NNBSP) || /* exclude no-break spaces */ + IS_THAT_ASCII_CONTROL_SPACE(c); } U_CAPI UBool U_EXPORT2 @@ -235,7 +234,7 @@ u_isblank(UChar32 c) { /* Zs */ uint32_t props; GET_PROPS(c, props); - return (UBool)(GET_CATEGORY(props)==U_SPACE_SEPARATOR); + return GET_CATEGORY(props)==U_SPACE_SEPARATOR; } } @@ -250,7 +249,7 @@ u_isprint(UChar32 c) { uint32_t props; GET_PROPS(c, props); /* comparing ==0 returns false for the categories mentioned */ - return (UBool)((CAT_MASK(props)&U_GC_C_MASK)==0); + return (CAT_MASK(props)&U_GC_C_MASK)==0; } /** @@ -266,7 +265,7 @@ u_isprintPOSIX(UChar32 c) { * The only cntrl character in graph+blank is TAB (in blank). * Here we implement (blank-TAB)=Zs instead of calling u_isblank(). */ - return (UBool)((GET_CATEGORY(props)==U_SPACE_SEPARATOR) || u_isgraphPOSIX(c)); + return (GET_CATEGORY(props)==U_SPACE_SEPARATOR) || u_isgraphPOSIX(c); } U_CAPI UBool U_EXPORT2 @@ -274,9 +273,9 @@ u_isgraph(UChar32 c) { uint32_t props; GET_PROPS(c, props); /* comparing ==0 returns false for the categories mentioned */ - return (UBool)((CAT_MASK(props)& - (U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK)) - ==0); + return (CAT_MASK(props)& + (U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK)) + ==0; } /** @@ -292,16 +291,16 @@ u_isgraphPOSIX(UChar32 c) { GET_PROPS(c, props); /* \p{space}\p{gc=Control} == \p{gc=Z}\p{Control} */ /* comparing ==0 returns false for the categories mentioned */ - return (UBool)((CAT_MASK(props)& - (U_GC_CC_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK)) - ==0); + return (CAT_MASK(props)& + (U_GC_CC_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK)) + ==0; } U_CAPI UBool U_EXPORT2 u_ispunct(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)((CAT_MASK(props)&U_GC_P_MASK)!=0); + return (CAT_MASK(props)&U_GC_P_MASK)!=0; } /*Checks if the Unicode character can be ignorable in a Java or Unicode identifier.*/ @@ -312,7 +311,7 @@ u_isIDIgnorable(UChar32 c) { } else { uint32_t props; GET_PROPS(c, props); - return (UBool)(GET_CATEGORY(props)==U_FORMAT_CHAR); + return GET_CATEGORY(props)==U_FORMAT_CHAR; } } @@ -321,7 +320,7 @@ U_CAPI UBool U_EXPORT2 u_isJavaIDStart(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)((CAT_MASK(props)&(U_GC_L_MASK|U_GC_SC_MASK|U_GC_PC_MASK))!=0); + return (CAT_MASK(props)&(U_GC_L_MASK|U_GC_SC_MASK|U_GC_PC_MASK))!=0; } /*Checks if the Unicode character can be a Java identifier part other than starting the @@ -331,14 +330,13 @@ U_CAPI UBool U_EXPORT2 u_isJavaIDPart(UChar32 c) { uint32_t props; GET_PROPS(c, props); - return (UBool)( - (CAT_MASK(props)& + return (CAT_MASK(props)& (U_GC_ND_MASK|U_GC_NL_MASK| U_GC_L_MASK| U_GC_SC_MASK|U_GC_PC_MASK| U_GC_MC_MASK|U_GC_MN_MASK) )!=0 || - u_isIDIgnorable(c)); + u_isIDIgnorable(c); } U_CAPI int32_t U_EXPORT2 @@ -515,6 +513,8 @@ uprv_getMaxValues(int32_t column) { return indexes[UPROPS_MAX_VALUES_INDEX]; case 2: return indexes[UPROPS_MAX_VALUES_2_INDEX]; + case UPROPS_MAX_VALUES_OTHER_INDEX: + return indexes[column]; default: return 0; } @@ -524,8 +524,8 @@ U_CAPI void U_EXPORT2 u_charAge(UChar32 c, UVersionInfo versionArray) { if(versionArray!=nullptr) { uint32_t version=u_getUnicodeProperties(c, 0)>>UPROPS_AGE_SHIFT; - versionArray[0]=(uint8_t)(version>>4); - versionArray[1]=(uint8_t)(version&0xf); + versionArray[0]=(uint8_t)(version>>2); + versionArray[1]=(uint8_t)(version&3); versionArray[2]=versionArray[3]=0; } } @@ -540,7 +540,7 @@ uscript_getScript(UChar32 c, UErrorCode *pErrorCode) { return USCRIPT_INVALID_CODE; } uint32_t scriptX=u_getUnicodeProperties(c, 0)&UPROPS_SCRIPT_X_MASK; - uint32_t codeOrIndex=uprops_mergeScriptCodeOrIndex(scriptX); + uint32_t codeOrIndex=scriptX&UPROPS_MAX_SCRIPT; if(scriptX<UPROPS_SCRIPT_X_WITH_COMMON) { return (UScriptCode)codeOrIndex; } else if(scriptX<UPROPS_SCRIPT_X_WITH_INHERITED) { @@ -555,7 +555,7 @@ uscript_getScript(UChar32 c, UErrorCode *pErrorCode) { U_CAPI UBool U_EXPORT2 uscript_hasScript(UChar32 c, UScriptCode sc) UPRV_NO_SANITIZE_UNDEFINED { uint32_t scriptX=u_getUnicodeProperties(c, 0)&UPROPS_SCRIPT_X_MASK; - uint32_t codeOrIndex=uprops_mergeScriptCodeOrIndex(scriptX); + uint32_t codeOrIndex=scriptX&UPROPS_MAX_SCRIPT; if(scriptX<UPROPS_SCRIPT_X_WITH_COMMON) { return sc==(UScriptCode)codeOrIndex; } @@ -587,7 +587,7 @@ uscript_getScriptExtensions(UChar32 c, return 0; } uint32_t scriptX=u_getUnicodeProperties(c, 0)&UPROPS_SCRIPT_X_MASK; - uint32_t codeOrIndex=uprops_mergeScriptCodeOrIndex(scriptX); + uint32_t codeOrIndex=scriptX&UPROPS_MAX_SCRIPT; if(scriptX<UPROPS_SCRIPT_X_WITH_COMMON) { if(capacity==0) { *pErrorCode=U_BUFFER_OVERFLOW_ERROR; @@ -618,7 +618,15 @@ uscript_getScriptExtensions(UChar32 c, U_CAPI UBlockCode U_EXPORT2 ublock_getCode(UChar32 c) { - return (UBlockCode)((u_getUnicodeProperties(c, 0)&UPROPS_BLOCK_MASK)>>UPROPS_BLOCK_SHIFT); + // We store Block values indexed by the code point shifted right 4 bits + // and use a "small" UCPTrie=CodePointTrie for minimal data size. + // This works because blocks have xxx0..xxxF ranges. + uint32_t c4 = c; // unsigned so that shifting right does not worry the compiler + // Shift unless out of range, in which case we fetch the trie's error value. + if (c4 <= 0x10ffff) { + c4 >>= 4; + } + return (UBlockCode)ucptrie_get(&block_trie, c4); } /* property starts for UnicodeSet ------------------------------------------- */ @@ -626,7 +634,7 @@ ublock_getCode(UChar32 c) { static UBool U_CALLCONV _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 end, uint32_t value) { /* add the start code point to the USet */ - const USetAdder *sa=(const USetAdder *)context; + const USetAdder* sa = static_cast<const USetAdder*>(context); sa->add(sa->set, start); (void)end; (void)value; @@ -706,3 +714,18 @@ upropsvec_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) { /* add the start code point of each same-value range of the properties vectors trie */ utrie2_enum(&propsVectorsTrie, nullptr, _enumPropertyStartsRange, sa); } + +U_CFUNC void U_EXPORT2 +ublock_addPropertyStarts(const USetAdder *sa, UErrorCode & /*errorCode*/) { + // Add the start code point of each same-value range of the trie. + // We store Block values indexed by the code point shifted right 4 bits; + // see ublock_getCode(). + UChar32 start = 0, end; + uint32_t value; + while (start < 0x11000 && // limit: (max code point + 1) >> 4 + (end = ucptrie_getRange(&block_trie, start, UCPMAP_RANGE_NORMAL, 0, + nullptr, nullptr, &value)) >= 0) { + sa->add(sa->set, start << 4); + start = end + 1; + } +} diff --git a/deps/icu-small/source/common/uchar_props_data.h b/deps/icu-small/source/common/uchar_props_data.h index 0cacf142afa52c..215afd1a5250a7 100644 --- a/deps/icu-small/source/common/uchar_props_data.h +++ b/deps/icu-small/source/common/uchar_props_data.h @@ -9,146 +9,146 @@ #ifdef INCLUDED_FROM_UCHAR_C -static const UVersionInfo dataVersion={0xf,1,0,0}; +static const UVersionInfo dataVersion={0x10,0,0,0}; -static const uint16_t propsTrie_index[23156]={ -0x495,0x49d,0x4a5,0x4ad,0x4c5,0x4cd,0x4d5,0x4dd,0x4e5,0x4ed,0x4f3,0x4fb,0x503,0x50b,0x513,0x51b, -0x521,0x529,0x531,0x539,0x53c,0x544,0x54c,0x554,0x55c,0x564,0x560,0x568,0x570,0x578,0x57d,0x585, -0x58d,0x595,0x599,0x5a1,0x5a9,0x5b1,0x5b9,0x5c1,0x5bd,0x5c5,0x5ca,0x5d2,0x5d8,0x5e0,0x5e8,0x5f0, -0x5f8,0x600,0x608,0x610,0x615,0x61d,0x620,0x628,0x630,0x638,0x63e,0x646,0x645,0x64d,0x655,0x65d, -0x66d,0x665,0x675,0x67d,0x683,0x600,0x693,0x68b,0x6a3,0x6a5,0x6ad,0x69b,0x6bd,0x6c3,0x6cb,0x6b5, -0x6db,0x6e1,0x6e9,0x6d3,0x6f9,0x6ff,0x707,0x6f1,0x717,0x71d,0x725,0x70f,0x735,0x73d,0x745,0x72d, -0x755,0x75b,0x763,0x74d,0x773,0x779,0x781,0x76b,0x791,0x796,0x79e,0x789,0x7ae,0x7b5,0x7bd,0x7a6, -0x641,0x7c5,0x7cd,0x4b5,0x7d5,0x7dc,0x7e4,0x4b5,0x7ec,0x7f4,0x7fc,0x801,0x809,0x810,0x818,0x4b5, -0x600,0x820,0x828,0x830,0x838,0x58d,0x848,0x840,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x850,0x600,0x858,0x85c,0x864,0x600,0x86a,0x600,0x870,0x878,0x880,0x58d,0x58d,0x888, -0x890,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x895,0x89d,0x600,0x600,0x8a5,0x8ad,0x8b5,0x8bd,0x8c5,0x600,0x8cd,0x8d5,0x8dd, -0x8ed,0x600,0x8f5,0x8f7,0x8ff,0x8e5,0x600,0x902,0x916,0x90a,0x912,0x91e,0x600,0x926,0x92c,0x934, -0x93c,0x600,0x94c,0x954,0x95c,0x944,0x96c,0x4b5,0x974,0x977,0x97f,0x964,0x98f,0x987,0x600,0x996, -0x600,0x9a5,0x99e,0x9ad,0x9b5,0x9b9,0x9c1,0x9c9,0x535,0x9d1,0x9d4,0x9da,0x9e1,0x9d4,0x55c,0x55c, -0x4e5,0x4e5,0x4e5,0x4e5,0x9e9,0x4e5,0x4e5,0x4e5,0x9f9,0xa01,0xa09,0xa11,0xa19,0xa1d,0xa25,0x9f1, -0xa3d,0xa45,0xa2d,0xa35,0xa4d,0xa55,0xa5d,0xa65,0xa7d,0xa6d,0xa75,0xa85,0xa8d,0xa9c,0xaa1,0xa94, -0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xab1,0xab9,0x934,0xabc,0xac4,0xacb,0xad0,0xad8, -0x934,0xadf,0xade,0xaef,0xaf2,0x934,0x934,0xae7,0x934,0x934,0x934,0x934,0x934,0xb01,0xb09,0xaf9, -0x934,0x934,0x934,0xb0e,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xb14,0xb1c,0x934,0xb24,0xb2b, -0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xaa9,0xaa9,0xaa9,0xaa9,0xb33,0xaa9,0xb3a,0xb41, -0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0x934,0xb49,0xb50,0xb54,0xb5a,0x934,0x934,0x934, -0x58d,0x595,0x535,0xb62,0x4e5,0x4e5,0x4e5,0xb6a,0x535,0xb72,0x600,0xb78,0xb88,0xb80,0xb80,0x55c, -0xb90,0xb98,0xba0,0x4b5,0xba8,0x934,0x934,0xbaf,0x934,0x934,0x934,0x934,0x934,0x934,0xbb7,0xbbd, -0xbcd,0xbc5,0x641,0x600,0xbd5,0x890,0x600,0xbdd,0xbe5,0xbe9,0x600,0x600,0xbee,0x600,0x934,0xbf5, -0xad9,0xbfd,0xc03,0x934,0xbfd,0xc0b,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934, -0xc13,0x600,0x600,0x600,0xc1b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0xc21,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc26,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x934,0x934, -0xc2e,0xc35,0xc37,0x600,0xc3f,0xc45,0xc4d,0xc55,0xc5a,0x600,0x600,0xc5e,0x600,0x600,0x600,0xc64, -0xc6b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc72,0x600,0xc79,0xc7f,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc87,0x600,0x600,0x600,0xc8f,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0xc91,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc98,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0xc9f,0x600,0x600,0x600,0xca6,0xcae,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0xcb3,0xcb8,0x600,0x600,0xcc0,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc4,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc9,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc7,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcd1,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0xcd7,0xcdf,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xce5, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xcec,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0xcf1,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0xcf6,0x600,0x600,0x600,0xc32,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0xcd3,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0xcfc,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0xd04,0xd0b,0xd0f,0x600,0x600,0x600,0xccb,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0xd1e,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xd16,0x934,0xd26,0x9ad,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0xd2b,0xd33,0x4e5,0xd43,0xd3b,0x600,0x600,0xd4b,0xd53,0xd63,0x4e5,0xd68,0xd70,0xd76,0xd7d,0xd5b, -0xd85,0xd8d,0x600,0xd95,0xda5,0xda8,0xd9d,0xdb0,0x655,0xdb8,0xdbf,0x8f6,0x6a3,0xdcf,0xdc7,0xdd7, -0x600,0xddf,0xde7,0xdef,0x600,0xdf7,0xdff,0xe07,0xe0f,0xe17,0xe1b,0xe23,0x535,0x535,0x600,0xe2b, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe33,0xe3f,0xe37, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, -0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0x600,0x600,0x600,0xe57,0x600,0xccc,0xe5e,0xe63, -0x600,0x600,0x600,0xe6b,0x600,0x600,0x901,0x4b5,0xe81,0xe71,0xe79,0x600,0x600,0xe89,0xe91,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe96,0x938,0x600,0xe9e,0x600,0xea4,0xea8, -0xeb0,0xeb8,0xebf,0xec7,0x600,0x600,0x600,0xecd,0xee5,0x4a5,0xeed,0xef5,0xefa,0x916,0xed5,0xedd, -0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, -0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, -0x12d4,0x12d4,0x1314,0x1354,0x1394,0x13cc,0x140c,0x144c,0x1484,0x14c4,0x14f0,0x1530,0x1570,0x1580,0x15c0,0x15f4, -0x1634,0x1664,0x16a4,0x16e4,0x16f4,0x1728,0x1760,0x17a0,0x17e0,0x1820,0x1854,0x1880,0x18c0,0x18f8,0x1914,0x1954, -0xa80,0xac0,0xb00,0xb40,0xb80,0xbab,0xbeb,0xa40,0xc0e,0xa40,0xa40,0xa40,0xa40,0xc4e,0x1db,0x1db, -0xc8e,0xcce,0xa40,0xa40,0xa40,0xcf7,0xd37,0xd57,0xa40,0xd7d,0xdbd,0xdfd,0xe3d,0xe7d,0xebd,0xefd, -0xf3d,0xf74,0x1db,0x1db,0xf98,0xfcc,0x1db,0xff4,0x1db,0x1db,0x1db,0x1db,0x1021,0x1db,0x1db,0x1db, -0x1db,0x1db,0x1db,0x1db,0x1035,0x1db,0x106d,0x10ad,0x1db,0x10b8,0x1db,0x1db,0x1db,0x10ee,0xa40,0x112e, -0x1db,0x1db,0x116e,0x1db,0x1191,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, +static const uint16_t propsTrie_index[23796]={ +0x4a3,0x4ab,0x4b3,0x4bb,0x4d3,0x4db,0x4e3,0x4eb,0x4f3,0x4fb,0x501,0x509,0x511,0x519,0x521,0x529, +0x52f,0x537,0x53f,0x547,0x54a,0x552,0x55a,0x562,0x56a,0x572,0x56e,0x576,0x57e,0x586,0x58b,0x593, +0x59b,0x5a3,0x5a7,0x5af,0x5b7,0x5bf,0x5c7,0x5cf,0x5cb,0x5d3,0x5d8,0x5e0,0x5e6,0x5ee,0x5f6,0x5fe, +0x606,0x60e,0x616,0x61e,0x623,0x62b,0x62e,0x636,0x63e,0x646,0x64c,0x654,0x653,0x65b,0x663,0x66b, +0x67b,0x673,0x683,0x68b,0x691,0x60e,0x6a1,0x699,0x6b1,0x6b3,0x6bb,0x6a9,0x6cb,0x6d1,0x6d9,0x6c3, +0x6e9,0x6ef,0x6f7,0x6e1,0x707,0x70d,0x715,0x6ff,0x725,0x72b,0x733,0x71d,0x743,0x74b,0x753,0x73b, +0x763,0x769,0x771,0x75b,0x781,0x787,0x78f,0x779,0x79f,0x7a4,0x7ac,0x797,0x7bc,0x7c3,0x7cb,0x7b4, +0x64f,0x7d3,0x7db,0x4c3,0x7e3,0x7ea,0x7f2,0x4c3,0x7fa,0x802,0x80a,0x80f,0x817,0x81e,0x826,0x4c3, +0x60e,0x82e,0x836,0x83e,0x846,0x59b,0x856,0x84e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x85e,0x60e,0x866,0x86a,0x872,0x60e,0x878,0x60e,0x87e,0x886,0x88e,0x59b,0x59b,0x896, +0x89e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x8a3,0x8ab,0x60e,0x60e,0x8b3,0x8bb,0x8c3,0x8cb,0x8d3,0x60e,0x8db,0x8e3,0x8eb, +0x8fb,0x60e,0x903,0x905,0x90d,0x8f3,0x60e,0x910,0x924,0x918,0x920,0x92c,0x60e,0x934,0x93a,0x942, +0x94a,0x60e,0x95a,0x962,0x96a,0x952,0x97a,0x4c3,0x982,0x985,0x98d,0x972,0x99d,0x995,0x60e,0x9a4, +0x60e,0x9b3,0x9ac,0x9bb,0x9c3,0x9c7,0x9cf,0x9d7,0x543,0x9df,0x9e2,0x9e8,0x9ef,0x9e2,0x56a,0x56a, +0x4f3,0x4f3,0x4f3,0x4f3,0x9f7,0x4f3,0x4f3,0x4f3,0xa07,0xa0f,0xa17,0xa1f,0xa27,0xa2b,0xa33,0x9ff, +0xa4b,0xa53,0xa3b,0xa43,0xa5b,0xa63,0xa6b,0xa73,0xa8b,0xa7b,0xa83,0xa93,0xa9b,0xaaa,0xaaf,0xaa2, +0xab7,0xab7,0xab7,0xab7,0xab7,0xab7,0xab7,0xab7,0xabf,0xac7,0x942,0xaca,0xad2,0xad9,0xade,0xae6, +0x942,0xaec,0xaf4,0xb04,0xb07,0x942,0x942,0xafc,0x942,0x942,0x942,0x942,0x942,0xb16,0xb1e,0xb0e, +0x942,0x942,0x942,0xb23,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0xb29,0xb31,0x942,0xb39,0xb40, +0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0xab7,0xab7,0xab7,0xab7,0xb48,0xab7,0xb4f,0xb56, +0xab7,0xab7,0xab7,0xab7,0xab7,0xab7,0xab7,0xab7,0x942,0xb5e,0xb65,0xb69,0xb6f,0x942,0x942,0x942, +0x59b,0x5a3,0x543,0xb77,0x4f3,0x4f3,0x4f3,0xb7f,0x543,0xb87,0x60e,0xb8d,0xb9d,0xb95,0xb95,0x56a, +0xba5,0xbad,0xbb5,0x4c3,0xbbd,0x942,0x942,0xbc4,0x942,0x942,0x942,0x942,0x942,0x942,0xae9,0xbc9, +0xbd9,0xbd1,0x64f,0x60e,0xbe1,0x89e,0x60e,0xbe9,0xbf1,0xbf5,0x60e,0x60e,0xbfa,0x60e,0x942,0xc01, +0xc09,0xc11,0xc17,0x942,0xc11,0xc1f,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942, +0xc27,0x60e,0x60e,0x60e,0xc2f,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0xc35,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xc3a,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x942,0x942, +0xc42,0xc49,0xc4b,0x60e,0xc53,0xc59,0xc61,0xc69,0xc6e,0x60e,0x60e,0xc72,0x60e,0x60e,0x60e,0xc78, +0xc7f,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xc86,0x60e,0xc8d,0xc93,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xc9b,0x60e,0x60e,0x60e,0xca3,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xca5,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xcac,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0xcb3,0x60e,0x60e,0x60e,0xcba,0xcc2,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xcc7,0xccc,0x60e,0x60e,0xcd4,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xcd8,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xcdd,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xcdb,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xce5,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0xceb,0xcf3,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xcf9, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0xd00,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0xd05,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0xd0a,0x60e,0x60e,0x60e,0xc46,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0xce7,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0xd10,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0xd18,0xd1f,0xd23,0x60e,0x60e,0x60e,0xcdf,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0xd32,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0xd2a,0x942,0xd3a,0x9bb,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0xd3f,0xd47,0x4f3,0xd57,0xd4f,0x60e,0x60e,0xd5f,0xd67,0xd77,0x4f3,0xd7c,0xd84,0xd8a,0xd91,0xd6f, +0xd99,0xda1,0x60e,0xda9,0xdb9,0xdbc,0xdb1,0xdc4,0x663,0xdcc,0xdd3,0x904,0x6b1,0xde3,0xddb,0xdeb, +0x60e,0xdf3,0xdfb,0xe03,0x60e,0xe0b,0xe13,0xe1b,0xe23,0xe2b,0xe2f,0xe37,0x543,0x543,0x60e,0xe3f, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xe47,0xe53,0xe4b, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, +0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0x60e,0x60e,0x60e,0xe6b,0x60e,0xce0,0xe72,0xe77, +0x60e,0x60e,0x60e,0xe7f,0x60e,0x60e,0x90f,0x4c3,0xe95,0xe85,0xe8d,0x60e,0x60e,0xe9d,0xea5,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xeaa,0x946,0x60e,0xeb2,0x60e,0xeb8,0xebc, +0xec4,0xecc,0xed3,0xedb,0x60e,0x60e,0x60e,0xee1,0xef9,0x4b3,0xf01,0xf09,0xf0e,0x924,0xee9,0xef1, +0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, +0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, +0x130c,0x130c,0x134c,0x138c,0x13cc,0x1404,0x1444,0x1484,0x14bc,0x14fc,0x1528,0x1568,0x15a8,0x15b8,0x15f8,0x162c, +0x166c,0x169c,0x16dc,0x171c,0x172c,0x1760,0x1798,0x17d8,0x1818,0x1858,0x188c,0x18b8,0x18f8,0x1930,0x194c,0x198c, +0xa80,0xac0,0xb00,0xb40,0xb80,0xbab,0xbeb,0x1db,0xc0e,0xa40,0xa40,0xa40,0xc46,0xc86,0x1db,0x1db, +0xcc6,0xd06,0xa40,0xa40,0xa40,0xd2f,0xd6f,0xd8f,0xa40,0xdb5,0xdf5,0xe35,0xe75,0xeb5,0xef5,0xf35, +0xf75,0xfac,0x1db,0x1db,0xfd0,0x1004,0x1db,0x102c,0x1db,0x1db,0x1db,0x1db,0x1059,0x1db,0x1db,0x1db, +0x1db,0x1db,0x1db,0x1db,0x106d,0x1db,0x10a5,0x10e5,0x1db,0x10f0,0x1db,0x1db,0x1db,0x1126,0xa40,0x1166, +0x1db,0x1db,0x11a6,0x1db,0x11c9,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, @@ -170,600 +170,603 @@ static const uint16_t propsTrie_index[23156]={ 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0x11d1,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, +0x1209,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700, -0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x1211, +0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x1249, 0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700, -0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x1211, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0xf02,0xf09,0xf11,0x4b5,0x600,0x600,0x600,0xf19,0xf29,0xf21,0xf40,0xf31,0xf38,0xf48,0xbbd,0xf50, -0x4b5,0x4b5,0x4b5,0x4b5,0x8f6,0x600,0xf58,0xf60,0x600,0xf68,0xf70,0xf74,0xf7c,0x600,0xf84,0x4b5, -0x58d,0x597,0xf8c,0x600,0xf90,0xf98,0xfa8,0xfa0,0x600,0xfb0,0x600,0xfb7,0xfc7,0xfbf,0x4b5,0x4b5, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xb88,0x902,0xfcf,0xfdf,0xfd7,0x4b5,0x4b5, -0xfef,0xfe7,0xff2,0xffa,0x916,0x1002,0x4b5,0x100a,0x1012,0x101a,0x4b5,0x4b5,0x600,0x102a,0x1032,0x1022, -0x1042,0x1049,0x103a,0x1051,0x1059,0x4b5,0x1069,0x1061,0x600,0x106c,0x1074,0x107c,0x1084,0x108c,0x4b5,0x4b5, -0x600,0x600,0x1094,0x4b5,0x58d,0x109c,0x535,0x10a4,0x600,0x10ac,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x10b4,0x600,0x10bc,0x4b5,0x10c1,0x10c9,0x10d1,0x10d8,0x1006,0x10e0,0x1006,0x10e8,0xb88, -0x10f8,0x636,0x1100,0x10f0,0x98f,0x1108,0x1110,0x1116,0x112e,0x111e,0x1126,0x1132,0x98f,0x1142,0x113a,0x114a, -0x1162,0x1152,0x115a,0x4b5,0x1169,0x1171,0x658,0x1179,0x1189,0x118f,0x1197,0x1181,0x4b5,0x4b5,0x4b5,0x4b5, -0x600,0x119f,0x11a7,0x10c0,0x600,0x11af,0x11b7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x11bf,0x11c7,0x4b5, -0x600,0x11cf,0x11d7,0x11df,0x600,0x11ef,0x11e7,0x4b5,0x870,0x11f7,0x11ff,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x600,0x1207,0x4b5,0x4b5,0x4b5,0x58d,0x535,0x120f,0x121f,0x1225,0x1217,0x4b5,0x4b5,0x1235,0x1239,0x122d, -0x1251,0x1241,0x1249,0x600,0x125f,0x1259,0x600,0x8f7,0x126f,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x127d,0x1282,0x1267,0x1277,0x1292,0x128a,0x4b5,0x4b5,0x12a1,0x12a5,0x1299,0x12b5,0x12ad,0x11e7,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x12b9,0x12c9,0x12ce,0x12c1,0x4b5,0x4b5,0x12d6,0x12e6,0x12de, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x4b5,0x4b5,0x4b5, -0x12f6,0x12fe,0x1306,0x12ee,0x600,0x600,0x600,0x600,0x600,0x600,0x130e,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1006,0x600,0x600,0x1316,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x131e,0x1326,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x11ff,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x8f7, -0x916,0xdcb,0x600,0x916,0x132e,0x1333,0x600,0x1343,0x134b,0x1353,0x133b,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x58d,0x535,0x135b,0x4b5,0x4b5,0x4b5,0x600,0x600,0x1363,0x1368,0x136e,0x4b5,0x4b5,0x1376,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x137e,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x902,0x4b5,0x1094,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1384,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x138c,0x1391,0x1398,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe37,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,0x600,0x139e,0x13a3,0x13ab,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x13bb,0x13c2,0x934,0x934,0x934,0x13b3,0x4b5,0x934,0x934,0x934, -0x934,0x934,0x934,0x934,0xbb7,0x934,0x13c9,0x934,0x13d0,0x13d8,0x13de,0x934,0xade,0x934,0x934,0x13e6, -0x4b5,0x4b5,0x4b5,0x13ee,0x13ee,0x934,0x934,0xadb,0x13f6,0x4b5,0x4b5,0x4b5,0x4b5,0x1406,0x140d,0x1412, -0x1418,0x1420,0x1428,0x1430,0x140a,0x1438,0x1440,0x1448,0x144d,0x141f,0x1406,0x140d,0x1409,0x1418,0x1455,0x1407, -0x1458,0x140a,0x1460,0x1468,0x1470,0x1477,0x1463,0x146b,0x1473,0x147a,0x1466,0x1482,0x13fe,0x934,0x934,0x934, -0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x55c,0x1492,0x55c, -0x1499,0x14a0,0x148a,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14af,0x14b7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14a7,0x14bf,0x9d4, -0x14cf,0x14c7,0x4b5,0x4b5,0x4b5,0x600,0x14df,0x14d7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x1006,0x14e7,0x600,0x14ef,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x1006,0x14f7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14ff,0x600,0x600,0x600, -0x600,0x600,0x600,0x1507,0x4b5,0x58d,0x1517,0x150f,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x151f,0x152f,0x1527,0x4b5,0x4b5,0x153f,0x1537,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x154f,0x1557,0x155f, -0x1567,0x156f,0x1577,0x4b5,0x1547,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x157f,0x934, -0x934,0xbaf,0x13c7,0x1587,0xbb7,0x158f,0x934,0x934,0x934,0x934,0xbb9,0x4b5,0x1597,0x159f,0x15a3,0x15ab, -0x15b3,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x15bb,0x934,0x934,0x934, -0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934, -0x934,0x934,0x934,0x15a4,0x15c3,0x934,0x934,0x934,0x15cb,0x934,0x934,0x15d2,0x15da,0x157f,0x934,0x15e2, -0x934,0x15ea,0x15ef,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xbaf, -0x15f7,0x1600,0x1604,0x160c,0x15fc,0x934,0x934,0x934,0x934,0x1614,0x934,0xade,0x11e3,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x161c,0x600,0x600, -0x1623,0x600,0x600,0x600,0x162b,0x600,0x1633,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xca3,0x600,0x600, -0x163b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1643,0x164b,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xc32,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1652,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1659,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x1660,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x4b5,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x600,0x600,0x600,0x600,0x600,0x600,0xf90,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1668,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1670,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0xf90,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, -0x600,0x600,0x1674,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xf90,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x67d,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x133b,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x1684,0x167c,0x167c,0x167c,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c, -0x168c,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, -0x1694,0x494,0x494,0x494,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x1249, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0xf16,0xf1d,0xf25,0x4c3,0x60e,0x60e,0x60e,0xf2d,0xf3d,0xf35,0xf54,0xf45,0xf4c,0xf5c,0xbc9,0xf64, +0x4c3,0x4c3,0x4c3,0x4c3,0x904,0x60e,0xf6c,0xf74,0x60e,0xf7c,0xf84,0xf88,0xf90,0x60e,0xf98,0x4c3, +0x59b,0x5a5,0xfa0,0x60e,0xfa4,0xfac,0xfbc,0xfb4,0x60e,0xfc4,0x60e,0xfcb,0xfdb,0xfd3,0x60e,0xfe3, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xb9d,0x910,0xfe6,0xff6,0xfee,0x4c3,0x4c3, +0x1006,0xffe,0x1009,0x1011,0x924,0x1019,0x4c3,0x1021,0x1029,0x1031,0x4c3,0x4c3,0x60e,0x1041,0x1049,0x1039, +0x1059,0x1060,0x1051,0x1068,0x1070,0x4c3,0x1080,0x1078,0x60e,0x1083,0x108b,0x1093,0x109b,0x10a3,0x4c3,0x4c3, +0x60e,0x60e,0x10ab,0x4c3,0x59b,0x10b3,0x543,0x10bb,0x60e,0x10c3,0x10da,0x10cb,0x10d2,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x10e2,0x60e,0x10ea,0x10f7,0x10ef,0x10ff,0x1107,0x110e,0x101d,0x1116,0x101d,0x111e,0xb9d, +0x112e,0x644,0x1136,0x1126,0x99d,0x113e,0x1146,0x114c,0x1164,0x1154,0x115c,0x1168,0x99d,0x1178,0x1170,0x1180, +0x1198,0x1188,0x1190,0x4c3,0x119f,0x11a7,0x666,0x11af,0x11bf,0x11c5,0x11cd,0x11b7,0x11dd,0x11e1,0x11e9,0x11d5, +0x60e,0x11f1,0x11f9,0x10ee,0x60e,0x1201,0x1209,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x60e,0x1211,0x1219,0x4c3, +0x60e,0x1221,0x1229,0x1231,0x60e,0x1241,0x1239,0x1249,0x1261,0x1251,0x1259,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x60e,0x1269,0x4c3,0x4c3,0x4c3,0x59b,0x543,0x1271,0x1281,0x1287,0x1279,0x4c3,0x4c3,0x1297,0x129b,0x128f, +0x12b3,0x12a3,0x12ab,0x60e,0x12c1,0x12bb,0x60e,0x905,0x12c9,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x60e,0x12d1, +0x12e7,0x12ec,0x12d9,0x12e1,0x12fc,0x12f4,0x4c3,0x4c3,0x130b,0x130f,0x1303,0x1327,0x1317,0x131f,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x132b,0x133b,0x1340,0x1333,0x4c3,0x4c3,0x1348,0x1358,0x1350, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x90f,0x4c3,0x4c3,0x4c3, +0x1368,0x1370,0x1378,0x1360,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x1380,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x101d,0x60e,0x60e,0x1388,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x1390,0x1398,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xf2d,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x1259,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x655,0x13a0, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x905,0x924,0xddf,0x60e,0x924,0x13a4,0x13a9,0x60e,0x13b1, +0x13b9,0x13c1,0xfe4,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x13d1,0x13c9,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x59b,0x543,0x13d9,0x4c3,0x4c3,0x4c3,0x60e,0x60e, +0x13e1,0x13e6,0x13ec,0x4c3,0x4c3,0x13f4,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x13fc,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x910,0x1402,0x10ab,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x140a,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x1412,0x1417,0x141e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xe4b,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x60e, +0x60e,0x60e,0x1424,0x1429,0x1431,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x1439,0x942,0x942,0x942, +0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0xbc4,0x4c3,0x4c3,0x56a,0x1449,0x1450, +0x942,0x942,0x942,0x1441,0x4c3,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0xae9,0x942,0x1457,0x942, +0x145e,0x1466,0x146c,0x942,0xaf4,0x942,0x942,0x1474,0x4c3,0x4c3,0x4c3,0x147c,0x147c,0x942,0x942,0x1484, +0x148c,0x4c3,0x4c3,0x4c3,0x4c3,0x149c,0x14a3,0x14a8,0x14ae,0x14b6,0x14be,0x14c6,0x14a0,0x14ce,0x14d6,0x14de, +0x14e3,0x14b5,0x149c,0x14a3,0x149f,0x14ae,0x14eb,0x149d,0x14ee,0x14a0,0x14f6,0x14fe,0x1506,0x150d,0x14f9,0x1501, +0x1509,0x1510,0x14fc,0x1518,0x1494,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942, +0x942,0x942,0x942,0x942,0x942,0x56a,0x1528,0x56a,0x152f,0x1536,0x1520,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x1545,0x154d,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x153d,0x1555,0x9e2,0x1565,0x155d,0x4c3,0x4c3,0x4c3,0x60e,0x1575,0x156d, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x101d,0x157d,0x60e,0x1585,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x101d,0x158d,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x101d,0x1595,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x159d,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x15a5,0x4c3,0x59b,0x15b5,0x15ad, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x15bd,0x15cd,0x15c5,0x4c3,0x4c3,0x15dd,0x15d5,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x15ed,0x15f5,0x15fd,0x1605,0x160d,0x1615,0x4c3,0x15e5,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x942,0x161d,0x942,0x942,0xbc4,0x1455,0x1625,0xae9,0x162d,0x942,0x942, +0x942,0x942,0xaeb,0x4c3,0x1635,0x163d,0x1641,0x1649,0x1651,0x4c3,0x4c3,0x4c3,0x4c3,0x942,0x942,0x942, +0x942,0x942,0x942,0x942,0x1659,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942, +0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x942,0x1642,0x1661,0x942,0x942,0x942, +0x1669,0x942,0x942,0xae8,0x1670,0x161d,0x942,0x1678,0x942,0x1680,0x1685,0x168d,0x4c3,0x942,0x942,0x942, +0x942,0x942,0x942,0x942,0x942,0x942,0x942,0xbc4,0x1695,0x169d,0x942,0x16a4,0x16ac,0x942,0x942,0x942, +0x942,0x16b4,0x942,0x942,0x1439,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x16bc,0x60e,0x60e,0x16c3,0x60e,0x60e,0x60e,0x16cb,0x60e,0x16d3,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0xcb7,0x60e,0x60e,0x16db,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x16e3,0x16eb,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xc46,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x16f2,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x16f9,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x1700,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x4c3,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x90f,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0xfa4,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x1708,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x1710,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xfa4,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x60e,0x60e,0x60e,0x60e,0x1714,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xfa4,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x68b,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0x60e, +0x60e,0x60e,0x60e,0x60e,0x60e,0x60e,0xfe4,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x1724,0x171c,0x171c,0x171c,0x4c3,0x4c3,0x4c3, +0x4c3,0x56a,0x56a,0x56a,0x56a,0x56a,0x56a,0x56a,0x172c,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3, +0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0x4c3,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63, +0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0xe63,0x1734,0x4a2,0x4a2,0x4a2,0xf,0xf,0xf,0xf, 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, -0xf,0xf,0xf,0xf,0xc,0x17,0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18, -0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17, -0x18,0x18,0x18,0x17,0x17,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,0x14, -0x17,0x15,0x1a,0x16,0x1a,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0x14, -0x18,0x15,0x18,0xf,0,0,0,0,0,0,0,0,0,0,0,0, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xc,0x17,0x17,0x17, +0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18,0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x18,0x18,0x18,0x17,0x17,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,0x14,0x17,0x15,0x1a,0x16,0x1a,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,0x14,0x18,0x15,0x18,0xf,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0,0,0,0,0,0,0,0,0,0,0,0,0xf,0xf,0xf,0xf, 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, -0xf,0xf,0xf,0xf,0xc,0x17,0x19,0x19,0x19,0x19,0x1b,0x17,0x1a,0x1b,5,0x1c, -0x18,0x10,0x1b,0x1a,0x1b,0x18,0x34b,0x38b,0x1a,2,0x17,0x17,0x1a,0x30b,5,0x1d, -0x34cb,0x344b,0x3ccb,0x17,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,0x18,1,1,1,1, -1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,0x18,2,2,2,2, -2,2,2,2,1,2,1,2,1,2,1,2,1,2,1,2, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xc,0x17,0x19,0x19, +0x19,0x19,0x1b,0x17,0x1a,0x1b,5,0x1c,0x18,0x10,0x1b,0x1a,0x1b,0x18,0x34b,0x38b, +0x1a,2,0x17,0x17,0x1a,0x30b,5,0x1d,0x34cb,0x344b,0x3ccb,0x17,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,0x18,1,1,1,1,1,1,1,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,0x18,2,2,2,2,2,2,2,2,1,2,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,2,1,2,1,2,2,1,2,1, -2,1,2,1,2,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,2,2,1,2,1,2,1,2,1,2,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,1,2,1,2,1,2,2,2,1,1,2, -1,2,1,1,2,1,1,1,2,2,1,1,1,1,2,1, -1,2,1,1,1,2,2,2,1,1,2,1,1,2,1,2, -1,2,1,1,2,1,2,2,1,2,1,1,2,1,1,1, -2,1,2,1,1,2,2,5,1,2,2,2,5,5,5,5, -1,3,2,1,3,2,1,3,2,1,2,1,2,1,2,1, -2,1,2,1,2,1,2,1,2,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,2,1,2,1,2,2,1,3,2, -1,2,1,1,1,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,1,2,1, +2,1,2,2,2,1,1,2,1,2,1,1,2,1,1,1, +2,2,1,1,1,1,2,1,1,2,1,1,1,2,2,2, +1,1,2,1,1,2,1,2,1,2,1,1,2,1,2,2, +1,2,1,1,2,1,1,1,2,1,2,1,1,2,2,5, +1,2,2,2,5,5,5,5,1,3,2,1,3,2,1,3, +2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, +2,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,2,2,1,3,2,1,2,1,1,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,2,2,2,2,2,2,2,1,1, -2,1,1,2,2,1,2,1,1,1,1,2,1,2,1,2, -1,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, +2,2,2,2,2,2,1,1,2,1,1,2,2,1,2,1, +1,1,1,2,1,2,1,2,1,2,1,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,5,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,5,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,4,0x1a,0x1a,0x1a,0x1a,4,4,4,4,4,4,4,4,4,4, -4,4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, -4,4,4,4,4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,0x1a,4,0x1a, -0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, +2,2,2,2,2,2,2,2,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,0x1a,0x1a,0x1a,0x1a,4,4, +4,4,4,4,4,4,4,4,4,4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, +0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,4,4,4,4,0x1a,0x1a,0x1a, +0x1a,0x1a,0x1a,0x1a,4,0x1a,4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, +0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -1,2,1,2,4,0x1a,1,2,0,0,4,2,2,2,0x17,1, -0,0,0,0,0x1a,0x1a,1,0x17,1,1,1,0,1,0,1,1, -2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,0,1,1,1,1,1,1,1,1,1,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,1,2,2,1,1,1,2,2,2,1,2,1,2, -1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,2,2,2,2,1,2,0x18,1,2,1,1,2, -2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +6,6,6,6,6,6,6,6,1,2,1,2,4,0x1a,1,2, +0,0,4,2,2,2,0x17,1,0,0,0,0,0x1a,0x1a,1,0x17, +1,1,1,0,1,0,1,1,2,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1, +1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,1,2,2,1,1, +1,2,2,2,1,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,2,2,2,2, +1,2,0x18,1,2,1,1,2,2,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,2,2,2,2,2,2,2,2,2,2,2,2, +1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,1,2,1,2,1,2,1,2,1,2,1,2, +2,2,2,2,2,2,2,2,2,2,2,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,2,0x1b,6,6,6,6,6,7,7,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,2,0x1b,6, +6,6,6,6,7,7,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,1,2,1, +2,1,2,1,2,1,2,1,2,1,2,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,1,2,1,2,1,2,1,2,1,2,1, -2,1,2,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,0,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,0, -0,4,0x17,0x17,0x17,0x17,0x17,0x17,2,2,2,2,2,2,2,2, +1,2,1,2,1,2,1,2,1,2,1,2,0,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,0,0,4,0x17,0x17,0x17,0x17,0x17,0x17, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,0x17,0x13,0,0,0x1b,0x1b,0x19, -0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,0x17,0x13,0,0,0x1b,0x1b,0x19,0,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,0x13,6, -0x17,6,6,0x17,6,6,0x17,6,0,0,0,0,0,0,0,0, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,0x13,6,0x17,6,6,0x17,6,6,0x17,6, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,5, -5,5,5,0x17,0x17,0,0,0,0,0,0,0,0,0,0,0, -0x10,0x10,0x10,0x10,0x10,0x10,0x18,0x18,0x18,0x17,0x17,0x19,0x17,0x17,0x1b,0x1b, -6,6,6,6,6,6,6,6,6,6,6,0x17,0x10,0x17,0x17,0x17, +5,5,5,0,0,0,0,5,5,5,5,0x17,0x17,0,0,0, +0,0,0,0,0,0,0,0,0x10,0x10,0x10,0x10,0x10,0x10,0x18,0x18, +0x18,0x17,0x17,0x19,0x17,0x17,0x1b,0x1b,6,6,6,6,6,6,6,6, +6,6,6,0x17,0x10,0x17,0x17,0x17,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,4,5,5,5,5,5,5,5, +5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0x17,0x17,0x17,0x17,5,5,6,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -4,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,5,5, -6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x17,5,6,6, +6,6,6,6,6,0x10,0x1b,6,6,6,6,6,6,4,4,6, +6,0x1b,6,6,6,6,5,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,5,5,5,0x1b,0x1b,5,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0,0x10,5,6,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x17,5,6,6,6,6,6,6,6,0x10,0x1b,6, -6,6,6,6,6,4,4,6,6,0x1b,6,6,6,6,5,5, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,0x1b,0x1b,5, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0x10, -5,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,6,0,0,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,0,0,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6, -6,6,6,6,6,5,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5, +5,5,6,6,6,6,6,6,6,6,6,6,6,5,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6, -6,6,6,6,6,6,6,6,4,4,0x1b,0x17,0x17,0x17,4,0, -0,6,0x19,0x19,6,6,6,6,4,6,6,6,4,6,6,6, -6,6,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,6,6,6,4,6, -6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6, -0,0,0x17,0,5,5,5,5,5,5,5,5,5,5,5,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x1a,5,5,5,5,5,5,0,0x10,0x10,0,0, -0,0,0,0,6,6,6,6,6,6,6,6,6,6,0x10,6, +5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6, +4,4,0x1b,0x17,0x17,0x17,4,0,0,6,0x19,0x19,6,6,6,6, +4,6,6,6,4,6,6,6,6,6,0,0,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,6,6,6,6,4,6,6,6,6,6,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,6,6,6,0,0,0x17,0,5,5,5,5, +5,5,5,5,5,5,5,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x1a,5,5,5, +5,5,5,0,0x10,0x10,0,0,0,0,0,6,6,6,6,6, +6,6,6,6,6,6,0x10,6,6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,5,5,5,5, -5,5,5,5,5,4,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,5,5,6,6, -0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,4,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,8, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,8, -6,5,8,8,8,6,6,6,6,6,6,6,6,8,8,8, -8,6,8,8,5,6,6,6,6,6,6,6,5,5,5,5, -5,5,5,5,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,5,5,0x19,0x19,0x37cb,0x35cb,0x3fcb,0x34cb,0x3ccb,0x94b,0x1b,0x19, -5,0x17,6,0,5,6,8,8,0,5,5,5,5,5,5,5, -5,0,0,5,5,0,0,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,5,5,5,5,5,5,5,0,5,0, -0,0,5,5,5,5,0,0,6,5,8,8,8,6,6,6, -6,0,0,8,8,0,0,8,8,6,5,0,0,0,0,0, -0,0,0,8,0,0,0,0,5,5,0,5,0,0,0,0, -0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,6,6,5,5, -5,6,0x17,0,0,0,0,0,0,0,0,0,0,6,6,8, -0,5,5,5,5,5,5,0,0,0,0,5,5,0,0,5, +6,6,6,6,5,5,5,5,5,5,5,5,5,4,6,6, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,6,6,5,5,6,6,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189, +0x1c9,0x209,0x249,0x289,0x17,4,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,6,6,6,8,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,6,8,6,5,8,8,8,6,6,6, +6,6,6,6,6,8,8,8,8,6,8,8,5,6,6,6, +6,6,6,6,5,5,5,5,5,5,5,5,5,5,6,6, +0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,0x19,0x19, +0x37cb,0x35cb,0x3fcb,0x34cb,0x3ccb,0x94b,0x1b,0x19,5,0x17,6,0,5,6,8,8, +0,5,5,5,5,5,5,5,5,0,0,5,5,0,0,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5, -5,5,5,5,5,0,5,5,0,5,5,0,5,5,0,0, -6,0,8,8,8,6,6,0,0,0,0,6,6,0,0,6, -6,6,0,0,0,6,0,0,0,0,0,0,0,5,5,5, -5,0,5,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,0x17,0x19,0,0,0,0,0,0,0,5,6,6, -6,6,6,6,0,6,6,8,0,5,5,5,5,5,5,5, -5,5,0,5,5,5,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,5,0,0,0,5,5,5,5,0,0, +6,5,8,8,8,6,6,6,6,0,0,8,8,0,0,8, +8,6,5,0,0,0,0,0,0,0,0,8,0,0,0,0, +5,5,0,5,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, +0x1c9,0x209,0x249,0x289,6,6,5,5,5,6,0x17,0,0,0,0,0, +0,0,0,0,0,6,6,8,0,5,5,5,5,5,5,0, +0,0,0,5,5,0,0,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,0,5,5,5,5,5,5,5,0,5,5, -0,5,5,5,5,5,0,0,6,5,8,8,8,6,6,6, -6,6,0,6,6,8,0,8,8,6,0,0,5,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,6,6, -0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x1b,5,0x34cb,0x344b, -0x3ccb,0x37cb,0x35cb,0x3fcb,0,0,0,0,0,0,0,0,0,6,8,8, -0,5,5,5,5,5,5,5,5,0,0,5,5,0,0,5, +0,5,5,0,5,5,0,0,6,0,8,8,8,6,6,0, +0,0,0,6,6,0,0,6,6,6,0,0,0,6,0,0, +0,0,0,0,0,5,5,5,5,0,5,0,5,5,6,6, +0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x19,0,0, +0,0,0,0,0,5,6,6,6,6,6,6,0,6,6,8, +0,5,5,5,5,5,5,5,5,5,0,5,5,5,0,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5, 5,5,5,5,5,0,5,5,0,5,5,5,5,5,0,0, -6,5,8,6,8,6,6,6,6,0,0,8,8,0,0,8, -8,6,0,0,0,0,0,0,0,6,6,8,0,0,0,0, -5,5,0,5,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,0x7cb,0x1e4b,0x784b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x1b,0, -0,0,0,0,0,0,6,5,0,5,5,5,5,5,5,0, -0,0,5,5,5,0,5,5,5,5,0,0,0,5,5,0, -5,0,5,5,0,0,0,5,5,0,0,0,5,5,5,0, -0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0, -0,0,8,8,6,8,8,0,0,0,8,8,8,0,8,8, -8,6,0,0,5,0,0,0,0,0,0,8,0,0,0,0, +6,5,8,8,8,6,6,6,6,6,0,6,6,8,0,8, +8,6,0,0,5,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0,0x17,0x54b,0x58b,0x5cb,0x60b, -0x58b,0x5cb,0x60b,0x1b,6,8,8,8,6,5,5,5,5,5,5,5, -5,0,5,5,5,0,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,6,5,6,6,6,8,8,8, -8,0,6,6,6,0,6,6,6,6,0,0,0,0,0,0, -0,6,6,0,5,5,5,0,0,5,0,0,5,5,6,6, -0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,5,5,8, -0,0,0,0,0,0,0,0,0,0,0,0,5,6,8,8, -0x17,5,5,5,5,5,5,5,5,0,5,5,5,0,5,5, +0x1c9,0x209,0x249,0x289,0x1b,5,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0,0,0,0, +0,0,0,0,0,6,8,8,0,5,5,5,5,5,5,5, +5,0,0,5,5,0,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,5,5,5,5,5,5,5,0,5,5, +0,5,5,5,5,5,0,0,6,5,8,6,8,6,6,6, +6,0,0,8,8,0,0,8,8,6,0,0,0,0,0,0, +0,6,6,8,0,0,0,0,5,5,0,5,0,0,0,0, +0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0x1e4b,0x784b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x1b,0,0,0,0,0,0,0,6,5, +0,5,5,5,5,5,5,0,0,0,5,5,5,0,5,5, +5,5,0,0,0,5,5,0,5,0,5,5,0,0,0,5, +5,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5, +5,5,5,5,5,5,0,0,0,0,8,8,6,8,8,0, +0,0,8,8,8,0,8,8,8,6,0,0,5,0,0,0, +0,0,0,8,0,0,0,0,0,0,0,0,5,5,6,6, +0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0, +0,0,0,0x17,0x54b,0x58b,0x5cb,0x60b,0x58b,0x5cb,0x60b,0x1b,6,8,8,8, +6,5,5,5,5,5,5,5,5,0,5,5,5,0,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5, -5,5,5,5,5,5,5,5,0,5,5,5,5,5,0,0, -6,5,8,6,8,8,8,8,8,0,6,8,8,0,8,8, -6,6,0,0,0,0,0,0,0,8,8,0,0,0,0,0, -0,5,5,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,0x7cb,0x1e4b,0x784b,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,5,5, -5,5,5,5,6,6,8,8,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, +6,5,6,6,6,8,8,8,8,0,6,6,6,0,6,6, +6,6,0,0,0,0,0,0,0,6,6,0,5,5,5,0, +0,5,0,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, +0x1c9,0x209,0x249,0x289,0,5,5,8,0,0,0,0,0,0,0,0, +0,0,0,0,5,6,8,8,0x17,5,5,5,5,5,5,5, 5,0,5,5,5,0,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, +0,5,5,5,5,5,0,0,6,5,8,6,8,8,8,8, +8,0,6,8,8,0,8,8,6,6,0,0,0,0,0,0, +0,8,8,0,0,0,0,0,0,5,5,0,5,5,6,6, +0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0x1e4b,0x784b,0x34cb, +0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,5,5,5,5,5,5,6,6,8,8, +5,5,5,5,5,5,5,5,5,0,5,5,5,0,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,6,6,5,8,8,8,6,6,6,6,0,8,8, -8,0,8,8,8,6,5,0x1b,0,0,0,0,5,5,5,8, -0xcc0b,0xca0b,0xcb4b,0xc90b,0x364b,0xc94b,0x350b,5,0,0,0,0,0,0,0x49,0x89, -0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,8,8,0x17,0,0,0, -0,0,0,0,0,0,0,0,0,6,8,8,0,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, -0,5,0,0,5,5,5,5,5,5,5,0,0,0,6,0, -0,0,0,8,8,8,6,6,6,0,6,0,8,8,8,8, -8,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,6,5,5,6,6,6,6,6,6,6,0, -0,0,0,0x19,5,5,5,5,5,5,4,6,6,6,6,6, -6,6,6,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17, -0,0,0,0,0,5,5,0,5,0,5,5,5,5,5,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,5,0,5,5,5,5,5,5,5,5,5, -5,6,5,5,6,6,6,6,6,6,6,6,6,5,0,0, -5,5,5,5,5,0,4,0,6,6,6,6,6,6,6,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,5,5,5,5, -5,0x1b,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x1b,0x17,0x1b,0x1b,0x1b,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x344b,0x3c4b,0x444b,0x4c4b,0x544b,0x5c4b, -0x644b,0x6c4b,0x744b,0x2c4b,0x1b,6,0x1b,6,0x1b,6,0x14,0x15,0x14,0x15,8,8, -5,5,5,5,5,5,5,5,0,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,8,6,6,6,6,6,0x17,6,6,5,5,5,5, -5,6,6,6,6,6,6,6,6,6,6,6,0,6,6,6, +5,5,5,5,5,5,5,5,5,5,5,6,6,5,8,8, +8,6,6,6,6,0,8,8,8,0,8,8,8,6,5,0x1b, +0,0,0,0,5,5,5,8,0xcc0b,0xca0b,0xcb4b,0xc90b,0x364b,0xc94b,0x350b,5, +0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, +0,0,8,8,0x17,0,0,0,0,0,0,0,0,0,0,0, +0,6,8,8,0,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5, +5,5,5,5,5,5,5,5,0,5,0,0,5,5,5,5, +5,5,5,0,0,0,6,0,0,0,0,8,8,8,6,6, +6,0,6,0,8,8,8,8,8,8,8,8,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,6,5,5, +6,6,6,6,6,6,6,0,0,0,0,0x19,5,5,5,5, +5,5,4,6,6,6,6,6,6,6,6,0x17,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0,0,0,0,0,5,5,0, +5,0,5,5,5,5,5,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0,5,0,5, +5,5,5,5,5,5,5,5,5,6,5,5,6,6,6,6, +6,6,6,6,6,5,0,0,5,5,5,5,5,0,4,0, +6,6,6,6,6,6,6,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0,0,5,5,5,5,5,0x1b,0x1b,0x1b,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1b,0x17,0x1b,0x1b,0x1b, +6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0x344b,0x3c4b,0x444b,0x4c4b,0x544b,0x5c4b,0x644b,0x6c4b,0x744b,0x2c4b,0x1b,6,0x1b,6, +0x1b,6,0x14,0x15,0x14,0x15,8,8,5,5,5,5,5,5,5,5, +0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0,0,0,0,6,6,6, +6,6,6,6,6,6,6,6,6,6,6,8,6,6,6,6, +6,0x17,6,6,5,5,5,5,5,6,6,6,6,6,6,6, +6,6,6,6,0,6,6,6,6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,0,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b, -0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,8,8,6,6,6, -6,8,6,6,6,6,6,6,8,6,6,8,8,6,6,5, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17, -5,5,5,5,5,5,8,8,6,6,5,5,5,5,6,6, -6,5,8,8,8,5,5,8,8,8,8,8,8,8,5,5, -5,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5, -5,5,6,8,8,6,6,8,8,8,8,8,8,6,5,8, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,8,8,8,6,0x1b,0x1b, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,0x17,4,2,2,2, -1,1,1,1,1,1,0,1,0,0,0,0,0,1,0,0, +6,6,6,6,6,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b, +0x1b,0x17,0x17,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,8,8,6,6,6,6,8,6,6,6,6,6,6, +8,6,6,8,8,6,6,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17,5,5,5,5,5,5,8,8, +6,6,5,5,5,5,6,6,6,5,8,8,8,5,5,8, +8,8,8,8,8,8,5,5,5,6,6,6,6,5,5,5, +5,5,5,5,5,5,5,5,5,5,6,8,8,6,6,8, +8,8,8,8,8,6,5,8,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,8,8,8,6,0x1b,0x1b,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,0x17,4,2,2,2,1,1,1,1,1,1,0,1, +0,0,0,0,0,1,0,0,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,5,5,5,5,5,5,5,5, +5,0,5,5,5,5,0,0,5,5,5,5,5,5,5,0, +5,0,5,5,5,5,0,0,5,5,5,5,5,5,5,5, +5,0,5,5,5,5,0,0,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,0,5,5,5,5,0,0, 5,5,5,5,5,5,5,0,5,0,5,5,5,5,0,0, -5,5,5,5,5,5,5,5,5,0,5,5,5,5,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0,5,5,5,5,0,0,5,5,5,5,5,5,5,0, 5,0,5,5,5,5,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,5,5,5,5,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0,0,6,6,6, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b, -0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x788b,0,0,0, +5,5,5,0,0,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, +0x16cb,0x194b,0x1bcb,0x1e4b,0x788b,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0,0,0,0,0,0,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, +2,2,2,2,2,2,0,0,0x13,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,0,0,2,2,2,2,2,2,0,0, -0x13,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x1b,0x17,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0xc,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x14, -0x15,0,0,0,5,5,5,5,5,5,5,5,5,5,5,0x17, -0x17,0x17,0x98a,0x9ca,0xa0a,5,5,5,5,5,5,5,5,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,6,6,6,8,0,0,0,0,0,0, -0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,6,6,8,0x17,0x17,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,6,6,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,0,5,5,5,0,6,6,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,6,6,8,6,6,6,6,6, -6,6,8,8,8,8,8,8,8,8,6,8,8,6,6,6, -6,6,6,6,6,6,6,6,0x17,0x17,0x17,4,0x17,0x17,0x17,0x19, -5,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,6,5,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x17,0x17,6, -6,6,0x10,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,5,5,5,4,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x1b,0x17,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0xc,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,0x14,0x15,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,0x17,0x17,0x17,0x98a,0x9ca,0xa0a,5,5,5, 5,5,5,5,5,0,0,0,0,0,0,0,5,5,5,5, -5,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6, +6,8,0,0,0,0,0,0,0,0,0,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6, +8,0x17,0x17,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,0,5,5,5,0,6,6, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +6,6,8,6,6,6,6,6,6,6,8,8,8,8,8,8, +8,8,6,8,8,6,6,6,6,6,6,6,6,6,6,6, +0x17,0x17,0x17,4,0x17,0x17,0x17,0x19,5,6,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0x54b,0x58b,0x5cb,0x60b, +0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,6,5,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0x17,0x17, +0x17,0x17,0x13,0x17,0x17,0x17,0x17,6,6,6,0x10,6,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,4, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0, +0,0,0,0,5,5,5,5,5,6,6,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0, +6,6,6,8,8,8,8,6,6,8,8,8,0,0,0,0, +8,8,6,8,8,8,8,8,8,6,6,6,0,0,0,0, +0x1b,0,0,0,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, -0,0,0,0,0,0,0,0,6,6,6,8,8,8,8,6, -6,8,8,8,0,0,0,0,8,8,6,8,8,8,8,8, -8,6,6,6,0,0,0,0,0x1b,0,0,0,0x17,0x17,0x49,0x89, -0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,5,5,5,5,5,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x30b,0,0,0,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +5,5,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0x30b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6, +6,8,8,6,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,4, +0x17,0x17,0x17,0x17,0x17,0x17,0,0,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,7,6,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,8,6,8, +6,6,6,6,6,6,6,0,6,8,6,8,8,6,6,6, +6,6,6,6,6,8,8,8,8,8,8,6,6,6,6,6, +6,6,6,6,6,0,0,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0,0,0,0,0,0,0x17,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0x17,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,6,6,6,6,8,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,6,6,8,8,6,0,0,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,4,0x17,0x17,0x17,0x17,0x17,0x17,0,0, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6, +5,5,5,5,5,5,5,5,6,8,6,6,6,6,6,8, +6,8,8,8,8,8,6,8,8,5,5,5,5,5,5,5, +5,0,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17, +0x17,0x17,0x17,0x17,5,8,6,6,6,6,8,8,6,6,8,6, +6,6,5,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5, +5,5,5,5,6,6,8,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,8,6,8,6,6,6,6,6,6,6,0, -6,8,6,8,8,6,6,6,6,6,6,6,6,8,8,8, -8,8,8,6,6,6,6,6,6,6,6,6,6,0,0,6, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -0x17,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,6,6, -6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -6,6,6,6,8,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -6,8,6,6,6,6,6,8,6,8,8,8,8,8,6,8, -8,5,5,5,5,5,5,5,5,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17,5,8,6,6, -6,6,8,8,6,6,8,6,6,6,5,5,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,6,6,8,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,8, -6,6,8,8,8,6,8,6,6,6,8,8,0,0,0,0, -0,0,0,0,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,5,5,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,5,5,5,5,5,5,8,8,8,8,8,8,8,8, -6,6,6,6,6,6,6,6,8,8,6,6,0,0,0,0x17, -0x17,0x17,0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,4,4,4,4, -4,4,0x17,0x17,2,2,2,2,2,2,2,2,2,0,0,0, -0,0,0,0,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,0, -0,1,1,1,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0, -0,0,0,0,6,6,6,0x17,6,6,6,6,6,6,6,6, -6,6,6,6,6,8,6,6,6,6,6,6,6,5,5,5, -5,6,5,5,5,5,5,5,6,5,5,8,6,6,5,0, -0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +5,5,5,5,5,5,6,8,6,6,8,8,8,6,8,6, +6,6,8,8,0,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17, +0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,5,5,5, +0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5, +8,8,8,8,8,8,8,8,6,6,6,6,6,6,6,6, +8,8,6,6,0,0,0,0x17,0x17,0x17,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,4,4,4,4,4,4,0x17,0x17,2,2,2,2, +2,2,2,2,2,1,2,0,0,0,0,0,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,0,0,1,1,1,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,6,6,6,0x17, +6,6,6,6,6,6,6,6,6,6,6,6,6,8,6,6, +6,6,6,6,6,5,5,5,5,6,5,5,5,5,5,5, +6,5,5,8,6,6,5,0,0,0,0,0,2,2,2,2, +2,2,2,2,2,2,2,2,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2, -4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4, -4,4,4,4,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,2,1,2,2,2,2,2,2,2, -2,2,1,2,2,2,2,2,2,2,2,2,1,1,1,1, -1,0x1a,0x1a,0x1a,0,0,2,2,2,0,2,2,1,1,1,1, -3,0x1a,0x1a,0,2,2,2,2,2,2,2,2,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,0,0,1,1,1,1, -1,1,0,0,2,2,2,2,2,2,2,2,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,2,2,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,0,0,1,1,1,1, -1,1,0,0,2,2,2,2,2,2,2,2,0,1,0,1, -0,1,0,1,2,2,2,2,2,2,2,2,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,0,0,2,2,2,2,2,2,2,2,3,3,3,3, -3,3,3,3,2,2,2,2,2,2,2,2,3,3,3,3, -3,3,3,3,2,2,2,2,2,0,2,2,1,1,1,1, -3,0x1a,2,0x1a,0x1a,0x1a,2,2,2,0,2,2,1,1,1,1, -3,0x1a,0x1a,0x1a,2,2,2,2,0,0,2,2,1,1,1,1, -0,0x1a,0x1a,0x1a,0x16,0x17,0x17,0x17,0x18,0x14,0x15,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x18,0x17,0x16,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0xc,0x10,0x10,0x10,0x10,0x10,0,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x2cb,4,0,0,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18, -0x18,0x14,0x15,4,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x10, -0x10,0x10,0x10,0x10,0x13,0x13,0x13,0x13,0x13,0x13,0x17,0x17,0x1c,0x1d,0x14,0x1c, -0x1c,0x1d,0x14,0x1c,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0xd,0xe,0x10,0x10, -0x10,0x10,0x10,0xc,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1c,0x1d,0x17, -0x17,0x17,0x17,0x16,0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18, -0x18,0x14,0x15,0,4,4,4,4,4,4,4,4,4,4,4,4, -4,0,0,0,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, +4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,2, +2,2,2,2,2,2,2,2,4,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,4,4,4,4,4,1,2,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, +1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2, +2,2,2,2,1,1,1,1,1,0x1a,0x1a,0x1a,0,0,2,2, +2,0,2,2,1,1,1,1,3,0x1a,0x1a,0,2,2,2,2, +2,2,2,2,1,1,1,1,1,1,1,1,2,2,2,2, +2,2,0,0,1,1,1,1,1,1,0,0,2,2,2,2, +2,2,2,2,1,1,1,1,1,1,1,1,2,2,2,2, +2,2,2,2,1,1,1,1,1,1,1,1,2,2,2,2, +2,2,0,0,1,1,1,1,1,1,0,0,2,2,2,2, +2,2,2,2,0,1,0,1,0,1,0,1,2,2,2,2, +2,2,2,2,1,1,1,1,1,1,1,1,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,0,0,2,2,2,2, +2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2, +2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2, +2,0,2,2,1,1,1,1,3,0x1a,2,0x1a,0x1a,0x1a,2,2, +2,0,2,2,1,1,1,1,3,0x1a,0x1a,0x1a,2,2,2,2, +0,0,2,2,1,1,1,1,0,0x1a,0x1a,0x1a,0x16,0x17,0x17,0x17, +0x18,0x14,0x15,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x18,0x17, +0x16,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0xc,0x10,0x10,0x10,0x10, +0x10,0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x2cb,4,0,0, +0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18,0x18,0x14,0x15,4,0xc,0xc,0xc,0xc, +0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x10,0x10,0x10,0x10,0x10,0x13,0x13,0x13,0x13, +0x13,0x13,0x17,0x17,0x1c,0x1d,0x14,0x1c,0x1c,0x1d,0x14,0x1c,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0xd,0xe,0x10,0x10,0x10,0x10,0x10,0xc,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x1c,0x1d,0x17,0x17,0x17,0x17,0x16,0x2cb,0x30b,0x34b,0x38b, +0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18,0x18,0x14,0x15,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,0,0,0,0x19,0x19,0x19,0x19, 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, -0x19,0x19,0x19,0x19,0x19,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6, -6,7,7,7,7,6,7,7,7,6,6,6,6,6,6,6, -6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,1,0x1b,1,0x1b,1,0x1b,1,1, -1,1,0x1b,2,1,1,1,1,2,5,5,5,5,2,0x1b,0x1b, -2,2,1,1,0x18,0x18,0x18,0x18,0x18,1,2,2,2,2,0x1b,0x18, -0x1b,0x1b,2,0x1b,0x358b,0x360b,0x364b,0x348b,0x388b,0x350b,0x390b,0x3d0b,0x410b,0x354b,0x454b,0x35cb, -0x3dcb,0x45cb,0x4dcb,0x58b,0x1b,0x1b,1,0x1b,0x1b,0x1b,0x1b,1,0x1b,0x1b,2,1, -1,1,2,2,1,1,1,2,0x1b,1,0x1b,0x1b,0x18,1,1,1, -1,1,0x1b,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a, -0x11ca,0x1e4a,0x980a,0x784a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a, -0x11ca,0x1e4a,0x980a,0x784a,0x784a,0x984a,0x788a,1,2,0x6ca,0x11ca,0x988a,0x78ca,0x54b,0x1b,0x1b, -0,0,0,0,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x18,0x1b,0x1b,0x18,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x18,0x18,0x1b,0x1b,0x18,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6, +6,6,6,6,6,6,6,6,6,7,7,7,7,6,7,7, +7,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +1,0x1b,1,0x1b,1,0x1b,1,1,1,1,0x1b,2,1,1,1,1, +2,5,5,5,5,2,0x1b,0x1b,2,2,1,1,0x18,0x18,0x18,0x18, +0x18,1,2,2,2,2,0x1b,0x18,0x1b,0x1b,2,0x1b,0x358b,0x360b,0x364b,0x348b, +0x388b,0x350b,0x390b,0x3d0b,0x410b,0x354b,0x454b,0x35cb,0x3dcb,0x45cb,0x4dcb,0x58b,0x1b,0x1b,1,0x1b, +0x1b,0x1b,0x1b,1,0x1b,0x1b,2,1,1,1,2,2,1,1,1,2, +0x1b,1,0x1b,0x1b,0x18,1,1,1,1,1,0x1b,0x1b,0x58a,0x5ca,0x60a,0x64a, +0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a,0x11ca,0x1e4a,0x980a,0x784a,0x58a,0x5ca,0x60a,0x64a, +0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a,0x11ca,0x1e4a,0x980a,0x784a,0x784a,0x984a,0x788a,1, +2,0x6ca,0x11ca,0x988a,0x78ca,0x54b,0x1b,0x1b,0,0,0,0,0x18,0x18,0x18,0x18, +0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x18,0x1b,0x1b,0x18,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x1b,0x1b,0x18,0x1b, +0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18, 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x1b, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18, -0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18, -0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x2cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b, -0xa4b,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x2cb,0x30b,0x34b,0x38b,0x3cb, -0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0xa4b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x2cb,0x80b,0x84b,0x88b,0x8cb,0x90b, +0x94b,0x98b,0x9cb,0xa0b,0xa4b,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x2cb, 0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b, -0x98b,0x9cb,0xa0b,0xa4b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18, -0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x98b,0x9cb,0xa0b,0xa4b,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x80b,0x84b, +0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0xa4b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15, -0x14,0x15,0x14,0x15,0x14,0x15,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb, -0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b, -0x48b,0x4cb,0x50b,0x7cb,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15, +0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b, +0x48b,0x4cb,0x50b,0x7cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x30b,0x34b, +0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15, 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x18,0x18,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18, -0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14, -0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14, -0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14, +0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18, 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x14,0x15,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, -0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b, +0x18,0x18,0x18,0x18,0x14,0x15,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18, +0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1,2,1,1, +1,2,2,1,2,1,2,1,2,1,1,1,1,2,1,2, +2,1,2,2,2,2,2,2,4,4,1,1,1,2,1,2, +2,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1,2,1,2,6,6,6,1,2, +0,0,0,0,0,0x17,0x17,0x17,0x17,0x344b,0x17,0x17,2,2,2,2, +2,2,0,2,0,0,0,0,0,2,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, +0,0,0,4,0x17,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,6,5,5,5,5,5,5,5,0,5,5,5,5, +5,5,5,0,5,5,5,5,5,5,5,0,5,5,5,5, +5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0, +0,0,0,0,0x17,0x17,0x1c,0x1d,0x1c,0x1d,0x17,0x17,0x17,0x1c,0x1d,0x17, +0x1c,0x1d,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x13,0x17, +0x1c,0x1d,0x17,0x17,0x1c,0x1d,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17, +0x17,0x17,0x17,4,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x13, +0x17,0x17,0x17,0x17,0x13,0x17,0x14,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x1b,0x1b,0x17,0x17,0x17,0x14,0x15,0x14,0x15,0x14,0x15,0x14, +0x15,0x13,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1,2,1,1,1,2,2,1, -2,1,2,1,2,1,1,1,1,2,1,2,2,1,2,2, -2,2,2,2,4,4,1,1,1,2,1,2,2,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,1,2,1,2,6,6,6,1,2,0,0,0,0, -0,0x17,0x17,0x17,0x17,0x344b,0x17,0x17,2,2,2,2,2,2,0,2, -0,0,0,0,0,2,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,4, -0x17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6, -5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,0, -5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0, -0x17,0x17,0x1c,0x1d,0x1c,0x1d,0x17,0x17,0x17,0x1c,0x1d,0x17,0x1c,0x1d,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x13,0x17,0x1c,0x1d,0x17,0x17, -0x1c,0x1d,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x17,0x17,0x17,4, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x13,0x17,0x17,0x17,0x17, -0x13,0x17,0x14,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x1b,0x1b,0x17,0x17,0x17,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x13,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,6,6, 6,6,8,8,0x13,4,4,4,4,4,0x1b,0x1b,0x7ca,0xa4a,0xcca,4, @@ -777,9 +780,11 @@ static const uint16_t propsTrie_index[23156]={ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,0,0x1b,0x1b,0x58b,0x5cb,0x60b,0x64b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, 0,0,0,0x1b,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x1b,0x1b, +5,5,5,5,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1b,0xa8b,0xacb,0xb0b, 0xb4b,0xb8b,0xbcb,0xc0b,0xc4b,0xc8b,0xccb,0xd0b,0xd4b,0xd8b,0xdcb,0xe0b,0x1b,0x1b,0x1b,0x1b, @@ -875,9 +880,9 @@ static const uint16_t propsTrie_index[23156]={ 1,2,1,2,1,2,1,2,4,0x1a,0x1a,1,2,1,2,5, 1,2,1,2,2,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,2, -1,2,1,2,1,2,1,2,1,1,1,1,2,1,2,0, -0,0,0,0,1,2,0,2,0,2,1,2,1,2,0,0, -0,0,0,0,5,5,6,5,5,5,6,5,5,5,5,6, +1,2,1,2,1,2,1,2,1,1,1,1,2,1,2,1, +1,2,0,0,1,2,0,2,0,2,1,2,1,2,1,2, +1,0,0,0,5,5,6,5,5,5,6,5,5,5,5,6, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,8,8,6,6,8,0x1b,0x1b,0x1b,0x1b, 6,0,0,0,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,0x1b,0x19,0x1b,0,0, @@ -1024,408 +1029,443 @@ static const uint16_t propsTrie_index[23156]={ 2,2,2,2,2,2,0,2,2,0,0,0,1,1,1,1, 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0, 1,1,0,2,2,2,2,2,2,2,2,2,5,5,5,5, -5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,0,4,4, -4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4, -4,4,0,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,5,5,0,0,0,5,0,0,5,5,5,5,5, -5,5,0,0,5,0,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0x17, -0x58b,0x5cb,0x60b,0x7cb,0xa4b,0x1e4b,0x784b,0x788b,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x1b, -0x1b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0,0,0,0,0,0,0,0x58b, -0x5cb,0x60b,0x64b,0x64b,0x68b,0x7cb,0xa4b,0x1e4b,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0,5,5,0,0, -0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x58b,0x7cb, -0xa4b,0x1e4b,0x5cb,0x60b,0,0,0,0x17,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,0,0,0,0,0x17,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b, -0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x88cb,0x90cb,0x98cb,0xa0cb,0xa8cb,0xb0cb,0xb8cb,0x36cb,0x354b, -0x34cb,0x348b,0x46cb,0x344b,0x4ecb,0x388b,0x3ccb,0x454b,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0,0,0,0,0x5ecb,0x344b,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b, -0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0,0,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b, -0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0x30b,0x34b,0x38b,0x3cb,0x7cb,0xa4b,0x1e4b,0x784b, -0x344b,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x17,0,0,0,0,0,0,0,5,6,6,6,0,6,6,0, -0,0,0,0,6,6,6,6,5,5,5,5,0,5,5,5, -0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,0, -0,0,0,6,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x58b,0x11cb,0x17,5,5,5,5,5,5,5,5,5,5,5,5, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,0,4,4,4,4,4,4, +4,4,4,0,0,0,0,0,4,4,4,4,4,4,0,4, +4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5, +5,0,0,0,5,0,0,5,5,5,5,5,5,5,0,0, +5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,0x17,0x58b,0x5cb,0x60b,0x7cb, +0xa4b,0x1e4b,0x784b,0x788b,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0x1b,0x1b,0x58b,0x5cb,0x60b, +0x64b,0x68b,0x7cb,0xa4b,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x64b, +0x68b,0x7cb,0xa4b,0x1e4b,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,0,5,5,0,0,0,0,0,0x58b, +0x68b,0x7cb,0xa4b,0x1e4b,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0x58b,0x7cb,0xa4b,0x1e4b,0x5cb,0x60b, +0,0,0,0x17,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, +0,0,0,0x17,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b, +0xb88b,0x78cb,0x80cb,0x88cb,0x90cb,0x98cb,0xa0cb,0xa8cb,0xb0cb,0xb8cb,0x36cb,0x354b,0x34cb,0x348b,0x46cb,0x344b, +0x4ecb,0x388b,0x3ccb,0x454b,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, +0x5ecb,0x344b,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb, +0xf4b,0x11cb,0x144b,0x16cb,0,0,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b, +0x804b,0x884b,0x904b,0x984b,0x30b,0x34b,0x38b,0x3cb,0x7cb,0xa4b,0x1e4b,0x784b,0x344b,0,0,0, +0,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0, +0,0,0,0,5,6,6,6,0,6,6,0,0,0,0,0, +6,6,6,6,5,5,5,5,0,5,5,5,0,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x58b,0x7cb,0xa4b,5,5,5,5,5,6,6,0,0,0,0,0x58b, -0x68b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,0x1b,5,5,5, +5,5,5,5,5,5,0,0,6,6,6,0,0,0,0,6, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x58b,0x11cb,0x17, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x58b,0x7cb,0xa4b, +5,5,5,5,5,6,6,0,0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,0x1b,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b, +5,5,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17,0,0,0, -0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b, +5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, +0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, +0,0,0,0,0,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0, +0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, +0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0, +0,0,0,0,0,0,0x58b,0x68b,0x7cb,0x11cb,0x1e4b,0x784b,5,5,5,5, +6,6,6,6,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,1,1,1,1, +1,1,0,0,0,6,6,6,6,6,0x13,4,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0, +0,0,0,0,0,0,0x18,0x18,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,5,5,5,5,4,5,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb, +0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b, +0xa80b,0xb00b,0xb80b,0x344b,0x34cb,0x348b,0x388b,0,5,5,5,5,5,5,5,5, +5,5,0,6,6,0x13,0,0,5,5,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,6,6,6,6,0,0,5,5, +5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b, +0xccb,0x1e4b,0x344b,5,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6, +6,6,6,6,6,6,6,6,6,0x58b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17, +0x17,0x17,0,0,0,0,0,0,5,5,6,6,6,6,0x17,0x17, +0x17,0x17,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,0x58b,0x5cb,0x60b, +0x64b,0x7cb,0xa4b,0x1e4b,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0x49,0x89, +0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,6,5,5,6,6,5,0,0, +0,0,0,0,0,0,0,6,8,6,8,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b, +0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,8,8,8,6,6,6,6,8, +8,6,6,0x17,0x17,0x10,0x17,0x17,0x17,0x17,6,0,0,0,0,0, +0,0,0,0,0,0x10,0,0,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,0,0,0,0,0,0,0,0x58b,0x68b,0x7cb,0x11cb,0x1e4b,0x784b, -5,5,5,5,6,6,6,6,0,0,0,0,0,0,0,0, 0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb, -0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x344b,0x34cb,0x348b,0x388b,0, -5,5,5,5,5,5,5,5,5,5,0,6,6,0x13,0,0, -5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,6,6,6,6,6,8,6,6,6, +6,6,6,6,6,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, +0x17,0x17,0x17,0x17,5,8,8,5,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0xccb,0x1e4b,0x344b,5,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6, -6,0x58b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0, -5,5,6,6,6,6,0x17,0x17,0x17,0x17,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, -6,5,5,6,6,5,0,0,0,0,0,0,0,0,0,6, -8,6,8,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0, -0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb, +6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -8,8,8,6,6,6,6,8,8,6,6,0x17,0x17,0x10,0x17,0x17, -0x17,0x17,6,0,0,0,0,0,0,0,0,0,0,0x10,0,0, +5,5,5,6,0x17,0x17,5,0,0,0,0,0,0,0,0,0, +8,5,5,5,5,0x17,0x17,0x17,0x17,6,6,6,6,0x17,8,6, +0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,0x17,5,0x17,0x17,0x17, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,6, -6,6,6,6,8,6,6,6,6,6,6,6,6,0,0x49,0x89, -0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,5,8,8,5, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,6,6,6,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,6,0x17,0x17,5,0, -0,0,0,0,0,0,0,0,8,5,5,5,5,0x17,0x17,0x17, -0x17,6,6,6,6,0x17,8,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,5,0x17,5,0x17,0x17,0x17,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,8,8,8,6,6, -6,6,6,6,6,6,6,8,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b, -0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,8,8,8,6,6,6,8,8,6,8,6,6, -0x17,0x17,0x17,0x17,0x17,0x17,6,5,5,6,0,0,0,0,0,0, +5,5,5,8,8,8,6,6,6,6,6,6,6,6,6,8, +0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, +0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, +6,6,8,8,6,8,6,6,0x17,0x17,0x17,0x17,0x17,0x17,6,5, +5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0,5,0,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,5,5,5,5,5,5,5,5,5,5,0x17,0,0, +5,5,5,0,5,0,5,5,5,5,0,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5, +5,5,5,5,5,0x17,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, +6,6,6,6,6,6,6,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,8,8, +0,0,6,6,6,6,6,6,6,0,0,0,6,6,6,6, +6,0,0,0,0,0,0,0,0,0,0,0,6,6,8,8, +0,5,5,5,5,5,5,5,5,0,0,5,5,0,0,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5, +5,5,5,5,5,0,5,5,0,5,5,5,5,5,0,6, +6,5,8,8,6,8,8,8,8,0,0,8,8,0,0,8, +8,8,0,0,5,0,0,0,0,0,0,8,0,0,0,0, +0,5,5,5,0,6,6,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,0,5, +0,0,5,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,5,8,8,8,6, +6,6,6,6,6,0,8,0,0,8,0,8,8,8,8,0, +8,8,6,8,6,5,6,5,0x17,0x17,0,0x17,0x17,0,0,0, 0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,8,8,8,6,6,6,6,6,6,6,6,0, +5,5,5,5,5,5,5,5,5,8,8,8,6,6,6,6, +6,6,6,6,8,8,6,6,6,8,6,5,5,5,5,0x17, +0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17, +0,0x17,6,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,8,8,8,6,6,6,6,6,6,8,6,8, +8,8,8,6,6,8,6,6,5,5,0x17,5,0,0,0,0, 0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,5,5,8,8,0,0,6,6,6,6,6,6, -6,0,0,0,6,6,6,6,6,0,0,0,0,0,0,0, -0,0,0,0,6,6,8,8,0,5,5,5,5,5,5,5, -5,0,0,5,5,0,0,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,5,5,5,5,5,5,5,0,5,5, -0,5,5,5,5,5,0,6,6,5,8,8,6,8,8,8, -8,0,0,8,8,0,0,8,8,8,0,0,5,0,0,0, -0,0,0,8,0,0,0,0,0,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,8,8,8,6,6,6,6,6,6,6,6,8,8,6,6, -6,8,6,5,5,5,5,0x17,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0,0x17,6,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, -6,6,6,6,6,8,6,8,8,8,8,6,6,8,6,6, -5,5,0x17,5,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,8,8,8,6,6, -6,6,0,0,8,8,8,8,6,6,8,6,6,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,5,5,5,5,6,6,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, -6,6,6,6,6,6,6,8,8,6,8,6,6,0x17,0x17,0x17, -5,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,8,8,8,6,6,6,6,0,0,8,8,8,8, +6,6,8,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,5,5,5,5, +6,6,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,8,8,8,6,6,6,6,6,6,6,6,8, +8,6,8,6,6,0x17,0x17,0x17,5,0,0,0,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89, +0xc9,0x109,0x149,0x189,5,5,5,5,5,5,5,5,5,5,5,6, +8,6,8,8,6,6,6,6,6,6,8,6,5,0x17,0,0, +0,0,0,0,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,8,8,6,6,6,6,8,6,6,6,6,6, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b, +0x17,0x17,0x17,0x1b,5,5,5,5,5,5,5,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, +0,6,8,6,5,5,5,5,5,5,5,5,5,5,5,5, +8,8,8,6,6,6,6,6,6,6,6,6,8,6,6,0x17, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b, +0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0,0,0,0,0,0,0,0,0, +0,0,0,5,8,5,8,6,0x17,0x17,0x17,0,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,5,5,5,5,5,5,5,0,0,5,0,0, +5,5,5,5,5,5,5,5,0,5,5,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,8, +8,8,0,8,8,0,0,6,6,8,6,5,6,5,0x17,5, +8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,6,8,6,8,8,6,6,6,6, -6,6,8,6,5,0x17,0,0,0,0,0,0,8,8,6,6, -6,6,8,6,6,6,6,6,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0x17,0x17,0x17,0x1b,5,5,5,5, -5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,0,0,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,8,8,8, +6,6,6,6,0,0,6,6,8,8,8,8,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6, +6,6,6,6,6,8,5,6,6,6,6,0x17,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,6,0,0,0,0,0,0,0,0,5,6,6,6, +6,6,6,8,8,6,6,6,5,5,5,5,5,6,6,6, +6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0x17,0, 0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,6,6,6,6,6, -6,6,6,6,8,6,6,0x17,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0, -0,0,0,0,0,0,0,0,0,0,0,5,8,5,8,6, -0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, -5,5,5,0,0,5,0,0,5,5,5,5,5,5,5,5, -0,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,8,8,8,8,8,8,0,8,8,0,0,6, -6,8,6,5,6,5,0x17,5,8,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6, +6,6,6,6,6,6,6,6,6,6,6,8,6,6,0x17,0x17, +0x17,5,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,0,0,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,8,8,8,6,6,6,6,0,0,6,6, -8,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,6,6,6,6,6,6,8,5,6, -6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,6,0,0,0,0, -0,0,0,0,5,6,6,6,6,6,6,8,8,6,6,6, -5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,5, +0,0,0,0,5,0x17,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,5,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x58b,0x5cb, +0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb, +0x1e4b,0,0,0,0x17,0x17,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8, +6,6,6,6,6,6,6,0,6,6,6,6,6,6,8,6, +6,6,6,6,6,6,6,6,0,8,6,6,6,6,6,6, +6,8,6,6,8,6,6,0,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6, -6,6,6,8,6,6,0x17,0x17,0x17,5,0x17,0x17,5,0x17,0x17,0x17, -0x17,0x17,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x70b,0x74b,0x78b,0x7cb, -0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0,0,0,0x17,0x17,5,5, +0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,5,6,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, +5,5,5,0,5,5,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6, +6,6,6,0,0,0,6,0,6,6,0,6,5,5,5,5, +5,5,5,5,5,5,8,8,8,8,8,0,6,6,0,8, +8,6,8,6,5,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,0,5,5,0,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6, +6,8,8,0x17,0x17,0,0,0,0,0,0,0,6,8,6,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,6,0,0,0,0,0,6,6,5,8, 5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,8,6,6,6,6,6,6,6,0, -6,6,6,6,6,6,8,6,6,6,6,6,6,6,6,6, -0,8,6,6,6,6,6,6,6,8,6,6,8,6,6,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0,0,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,5,6,0,0,0,0, -0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,5,5,5,5,5,5,5,0,5,5,0,5, +5,5,5,5,8,8,6,6,6,6,6,0,0,0,8,8, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x19,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0x17, +0xcd0b,0xcc0b,0xcb0b,0xd00b,0xca0b,0xcf0b,0xcb4b,0xd04b,0xc90b,0x37cb,0x37cb,0x364b,0x35cb,0xc94b,0x3fcb,0x350b, +0x34cb,0x344b,0x344b,0x3ccb,0xcd0b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x19,0x19, +0x34ca,0x354a,0x34ca,0x34ca,0x344a,0x348a,0x388a,0xf4a,0x11ca,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0, +0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0,0, +0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x64a, +0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca, +0x60a,0x64a,0x68a,0x5ca,0x60a,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x60a, +0x64a,0x68a,0xc08a,0xc18a,0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0x60a,0x60a,0x64a,0x64a,0x64a,0x64a, +0x6ca,0x70a,0x70a,0x70a,0x74a,0x74a,0x78a,0x78a,0x78a,0x78a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x58a, +0x5ca,0x60a,0x64a,0x64a,0x68a,0x68a,0x5ca,0x60a,0x58a,0x5ca,0x348a,0x388a,0x454a,0x348a,0x388a,0x35ca, +5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,6,6,6,6,6,6,0,0,0,6,0, -6,6,0,6,5,5,5,5,5,5,5,5,5,5,8,8, -8,8,8,0,6,6,0,8,8,6,8,6,5,0,0,0, -0,0,0,0,5,5,5,5,5,5,0,5,5,0,5,5, +5,0x17,0x17,0,0,0,0,0,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,6,6,8,8,0x17,0x17,0,0,0, -0,0,0,0,6,8,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,6,6,5,8,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,8,8,6,6, -6,6,6,0,0,0,8,8,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x19,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, -0,0,0,0,0,0,0,0x17,0xcd0b,0xcc0b,0xcb0b,0xd00b,0xca0b,0xcf0b,0xcb4b,0xd04b, -0xc90b,0x37cb,0x37cb,0x364b,0x35cb,0xc94b,0x3fcb,0x350b,0x34cb,0x344b,0x344b,0x3ccb,0xcd0b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x19,0x19,0x34ca,0x354a,0x34ca,0x34ca,0x344a,0x348a,0x388a,0xf4a, -0x11ca,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0,0x17,0x17,0x17,0x17,0x17,0,0,0, -0,0,0,0,0,0,0,0,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a, -0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a, -0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x5ca,0x60a,0x60a,0x64a,0x68a, -0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0xc08a,0xc18a,0x58a,0x5ca,0x60a,0x60a, -0x64a,0x68a,0x60a,0x60a,0x64a,0x64a,0x64a,0x64a,0x6ca,0x70a,0x70a,0x70a,0x74a,0x74a,0x78a,0x78a, -0x78a,0x78a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x58a,0x5ca,0x60a,0x64a,0x64a,0x68a,0x68a,0x5ca,0x60a, -0x58a,0x5ca,0x348a,0x388a,0x454a,0x348a,0x388a,0x35ca,5,5,5,5,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0x17,0x17,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,5,5,5,5,5,5,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0, -0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,6, -6,0x17,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +6,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0, +6,6,6,6,6,6,6,6,6,6,8,8,8,6,6,6, +0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,6,6,6,6,6,0x17,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17, +0x1b,0x1b,0x1b,0x1b,4,4,4,4,0x17,0x1b,0,0,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0x7cb, +0x1e4b,0x788b,0x790b,0x798b,0x7a0b,0x7a8b,0,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6, -6,6,6,0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b,4,4,4,4, -0x17,0x1b,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0x7cb,0x1e4b,0x788b,0x790b,0x798b,0x7a0b,0x7a8b,0,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,0,5,5,5,0x54b,0x58b,0x5cb,0x60b, -0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b, -0x58b,0x5cb,0x60b,0x17,0x17,0x17,0x17,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,0,0,0,0,6,5,8,8,8, -8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4, +4,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,4,4,4,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b, +0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0x58b,0x5cb,0x60b,0x17,0x17,0x17,0x17,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,0, +0,0,0,6,5,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -0,0,0,0,0,0,0,6,6,6,6,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,0x17,4,6,0,0,0, -0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,6, +6,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,0x17,4,6,0,0,0,0,0,0,0,0,0,0,0, +8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,4,4,0,4,4,4,4,4,4,4,0,4,4,0, -5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,0,0,5,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,0,0,0x1b,6,6,0x17,0x10,0x10,0x10,0x10, +0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,4,4,4,4,0,4,4,4, +4,4,4,4,0,4,4,0,5,5,5,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0, +0,5,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,0,0, +0x1b,6,6,0x17,0x10,0x10,0x10,0x10,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,0,0,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0, -0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b, +0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,0,0,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,8,8,6,6,6,0x1b,0x1b,0x1b,8,8,8, -8,8,8,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,6,6,6,6, -6,6,6,0x1b,0x1b,6,6,6,6,6,6,6,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,8,8,6, +6,6,0x1b,0x1b,0x1b,8,8,8,8,8,8,0x10,0x10,0x10,0x10,0x10, +0x10,0x10,0x10,6,6,6,6,6,6,6,6,0x1b,0x1b,6,6,6, +6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,6,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,0x1b,0,0, +0x1b,0x1b,6,6,6,0x1b,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b, -0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0,0,0,0, -0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b, -0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x58b,0x5cb,0x60b,0x64b,0x68b,0x58b, -0x68b,0,0,0,0,0,0,0,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89, -0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,1,1,1,1,1,1,1,1, +0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b, +0x94b,0x98b,0x9cb,0xa0b,0,0,0,0,0,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0, +0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb, +0x194b,0x1bcb,0x58b,0x5cb,0x60b,0x64b,0x68b,0x58b,0x68b,0,0,0,0,0,0,0, +0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2, +2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,2, +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,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,1,0,1,1,0,0,1,0,0,1,1,0, +0,1,1,1,1,0,1,1,1,1,1,1,1,1,2,2, +2,2,0,2,0,2,2,2,2,2,2,2,0,2,2,2, 2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,2,2,2,2,2,2,2,0,2,2, +1,1,1,1,1,1,1,1,2,2,2,2,1,1,0,1, +1,1,1,0,0,1,1,1,1,1,1,1,1,0,1,1, +1,1,1,1,1,0,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +1,1,0,1,1,1,1,0,1,1,1,1,1,0,1,0, +0,0,1,1,1,1,1,1,1,0,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,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,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,1,0,1,1, -0,0,1,0,0,1,1,0,0,1,1,1,1,0,1,1, -1,1,1,1,1,1,2,2,2,2,0,2,0,2,2,2, -2,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -2,2,2,2,1,1,0,1,1,1,1,0,0,1,1,1, -1,1,1,1,1,0,1,1,1,1,1,1,1,0,2,2, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,1,1,0,1,1,1,1,0, -1,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1, -1,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,2,2,2,2,2,2,0,0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2, +1,1,1,1,1,1,1,1,1,0x18,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,0x18,2,2,2,2,2,2,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -2,2,2,2,2,2,0,0,1,1,1,1,1,1,1,1, +1,1,1,0x18,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,0x18,2,2,2,2,2,2, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,0x18,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,0x18,2,2,2,2, -2,2,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,0x18,2,2,2,2, +2,2,2,0x18,2,2,2,2,2,2,1,2,0,0,0x49,0x89, +0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,0x1b,0x1b,0x1b,0x1b,6,6,6,6,6, +6,6,6,6,6,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x17, +0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,6,6,6,6,6,6,6,6,0,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,6, +6,6,6,6,2,2,2,2,2,2,2,2,2,2,5,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,0x18,2,2,2,2,2,2,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,2,2,2,0x18,2,2,2,2, -2,2,1,2,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0x1b, -0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6, -6,6,6,0,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,0,0,6,6,6,6,6,2,2,2,2, -2,2,2,2,2,2,5,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0, -0,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,6, -6,0,6,6,6,6,6,0,0,0,0,0,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,5,0x1b,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,0,0,6,6,6,6, -6,6,6,4,4,4,4,4,4,4,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,6,6,6,6,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0x19,5,5,5,5, -5,5,5,5,5,5,5,4,6,6,6,6,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, -5,5,5,0,5,5,5,5,0,5,5,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5, -5,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,6,6,6,6, -6,6,6,0,0,0,0,0,0,0,0,0,2,2,2,2, -6,6,6,6,6,6,6,4,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17,1,1,2,2, +2,2,2,0,0,0,0,0,0,2,2,2,2,2,2,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,6,6,0,6,6,0,6,6,6,6,6,0, +0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,5,0x1b,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,0,0,0,6,6,6,6,6,6,6,4,4,4,4,4, +4,4,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +6,6,6,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0x19,5,5,5,5,5,5,5,5,5,5,5,4, +6,6,6,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,6,6,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0, +0,0,0,0x17,5,5,5,5,5,5,5,0,5,5,5,5, +0,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,0,5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b, +0x6cb,0x70b,0x74b,0x78b,6,6,6,6,6,6,6,0,0,0,0,0, +0,0,0,0,2,2,2,2,6,6,6,6,6,6,6,4, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0x17,0x17,1,1,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b, -0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x78cb,0x794b,0x814b,0x58b, -0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x1b,0x34cb,0x344b,0x3ccb,0x19,0x58b,0x5cb,0x788b, -0x78cb,0,0,0,0,0,0,0,0,0,0,0,0x16cb,0x194b,0x1bcb,0x1e4b, -0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b,0xa84b,0xb04b, -0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x984b,0xa04b,0xa84b,0xb04b, -0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x1b,0x5cb,0x60b,0x64b,0x68b,0x6cb, -0x70b,0x74b,0x78b,0x7cb,0x900b,0xa00b,0x804b,0x788b,0x344b,0x354b,0,0,0,0x58b,0x5cb,0x60b, -0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b, -0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x18,0x18,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,0, -5,0,0,5,0,5,5,5,5,5,5,5,5,5,5,0, -5,5,5,5,0,5,0,5,0,0,0,0,0,0,5,0, -0,0,0,5,0,5,0,5,0,5,5,5,0,5,5,0, -5,0,0,5,0,5,0,5,0,5,0,5,0,5,5,0, -5,0,0,5,5,5,5,0,5,5,5,5,5,5,5,0, -5,5,5,5,0,5,5,5,5,0,5,0,5,5,5,5, -5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0,0,0,0,0,5,5,5, -0,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x2cb,0x2cb,0x30b,0x34b, -0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x54b,0x54b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, -0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0x1b,0x1b,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b, +0xccb,0xf4b,0x11cb,0x144b,0x78cb,0x794b,0x814b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b, +0x1b,0x34cb,0x344b,0x3ccb,0x19,0x58b,0x5cb,0x788b,0x78cb,0,0,0,0,0,0,0, +0,0,0,0,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b, +0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b, +0xb08b,0xb88b,0x78cb,0x80cb,0x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b, +0xb08b,0xb88b,0x1b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x900b,0xa00b,0x804b,0x788b, +0x344b,0x354b,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b, +0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b, +0x784b,0x804b,0x884b,0x904b,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x18,0x18,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,0,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,0,5,5,0,5,0,0,5,0,5,5,5, +5,5,5,5,5,5,5,0,5,5,5,5,0,5,0,5, +0,0,0,0,0,0,5,0,0,0,0,5,0,5,0,5, +0,5,5,5,0,5,5,0,5,0,0,5,0,5,0,5, +0,5,0,5,0,5,5,0,5,0,0,5,5,5,5,0, +5,5,5,5,5,5,5,0,5,5,5,5,0,5,5,5, +5,0,5,0,5,5,5,5,5,5,5,5,5,5,0,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +0,0,0,0,0,5,5,5,0,5,5,5,5,5,0,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x2cb,0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x54b, +0x54b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, +0,0,0,0,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1a, +0x1a,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, +0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0, +0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0,0,0,0,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0, +0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 5,0x705,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, @@ -1464,2580 +1504,2759 @@ static const uint16_t propsTrie_index[23156]={ static const UTrie2 propsTrie={ propsTrie_index, - propsTrie_index+4692, + propsTrie_index+4748, nullptr, - 4692, - 18464, + 4748, + 19048, 0xa40, - 0x12d4, + 0x130c, 0x0, 0x0, 0x110000, - 0x5a70, + 0x5cf0, nullptr, 0, false, false, 0, nullptr }; -static const uint16_t propsVectorsTrie_index[32784]={ -0x53e,0x546,0x54e,0x556,0x56e,0x576,0x57e,0x586,0x58e,0x596,0x59e,0x5a6,0x5ae,0x5b6,0x5be,0x5c6, -0x5cd,0x5d5,0x5dd,0x5e5,0x5ed,0x5f5,0x5fd,0x605,0x60d,0x615,0x61d,0x625,0x62d,0x635,0x63d,0x645, -0x64d,0x655,0x65c,0x664,0x66c,0x674,0x67c,0x684,0x68c,0x694,0x699,0x6a1,0x6a8,0x6b0,0x6b8,0x6c0, -0x6c8,0x6d0,0x6d8,0x6e0,0x6e7,0x6ef,0x6f7,0x6ff,0x707,0x70f,0x717,0x71f,0x727,0x72f,0x737,0x73f, -0x1b48,0xd94,0xe60,0x1197,0x12d6,0x1d10,0x1eaf,0x1d08,0x13f5,0x1405,0x13ed,0x13fd,0x814,0x81a,0x822,0x82a, -0x832,0x838,0x840,0x848,0x850,0x856,0x85e,0x866,0x86e,0x874,0x87c,0x884,0x88c,0x894,0x89c,0x8a3, -0x8ab,0x8b1,0x8b9,0x8c1,0x8c9,0x8cf,0x8d7,0x8df,0x8e7,0x140d,0x8ef,0x8f7,0x8ff,0x906,0x90e,0x916, -0x91e,0x922,0x92a,0x931,0x939,0x941,0x949,0x951,0x1727,0x172f,0x959,0x961,0x969,0x971,0x979,0x980, -0x178d,0x177d,0x1785,0x1a82,0x1a8a,0x141d,0x988,0x1415,0x1670,0x1670,0x1672,0x1431,0x1432,0x1425,0x1427,0x1429, -0x1795,0x1797,0x990,0x1797,0x998,0x99d,0x9a5,0x179c,0x9ab,0x1797,0x9b1,0x9b9,0xc74,0x17a4,0x17a4,0x9c1, -0x17b4,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5, -0x17b5,0x17b5,0x17b5,0x17ac,0x9c9,0x17bd,0x17bd,0x9d1,0xb9c,0xba4,0xbac,0xbb4,0x17cd,0x17c5,0x9d9,0x9e1, -0x9e9,0x17d7,0x17df,0x9f1,0x17d5,0x9f9,0x1b50,0xd9c,0xbbc,0xbc4,0xbcc,0xbd1,0x19e8,0xc9b,0xca2,0x1944, -0xc4c,0x1b58,0xda4,0xdac,0xdb4,0xdbc,0xf6a,0xf6e,0x1a48,0x1a4d,0xcda,0xce2,0x1abe,0x1ac6,0x1c28,0xe68, -0x1ace,0xd28,0xd30,0x1ad6,0x110f,0x11bf,0xf42,0xdc4,0x1964,0x194c,0x195c,0x1954,0x1a00,0x19f8,0x19b4,0x1a40, -0x1442,0x1442,0x1442,0x1442,0x143a,0x1442,0x1442,0x1444,0xa01,0x144c,0xa05,0xa0d,0x144c,0xa15,0xa1d,0xa25, -0x145c,0x1454,0x1464,0xa2d,0xa35,0x146c,0xa3d,0xa45,0x1474,0x147c,0x1484,0x148c,0xa4d,0x1494,0x149b,0x14a3, -0x14ab,0x14b3,0x14bb,0x14c3,0x14cb,0x14d2,0x14da,0x14e2,0x14ea,0x14f2,0x14f5,0x14f7,0x17e7,0x18da,0x18e0,0x1a30, -0x14ff,0xa55,0xa5d,0x1625,0x162a,0x162d,0x1633,0x1507,0x163b,0x163b,0x1517,0x150f,0x151f,0x1527,0x152f,0x1537, -0x153f,0x1547,0x154f,0x1557,0x18e8,0x193c,0x1a92,0x1bf0,0x1567,0x156d,0x1575,0x157d,0x155f,0x1585,0x18f0,0x18f7, -0x17ef,0x17ef,0x17ef,0x17ef,0x17ef,0x17ef,0x17ef,0x17ef,0x18ff,0x18ff,0x18ff,0x18ff,0x1907,0x190e,0x1910,0x1917, -0x191f,0x1923,0x1923,0x1926,0x1923,0x1923,0x192c,0x1923,0x196c,0x1a38,0x1a9a,0xbd9,0xbdf,0x1d54,0x1d5c,0x1e3a, -0x19d8,0x19cc,0x19d0,0x1a55,0x19bc,0x19bc,0x19bc,0xc5c,0x19c4,0xc7c,0x1a18,0xcca,0xc64,0xc6c,0xc6c,0x1ade, -0x1a08,0x1aa2,0xcb2,0xcba,0xa65,0x17f7,0x17f7,0xa6d,0x17ff,0x17ff,0x17ff,0x17ff,0x17ff,0x17ff,0xa75,0x747, -0x1658,0x167a,0xa7d,0x1682,0xa85,0x168a,0x1692,0x169a,0xa8d,0xa92,0x16a2,0x16a9,0xa97,0x1807,0x1a28,0xc54, -0xa9f,0x1704,0x170b,0x16b1,0x1713,0x1717,0x16b9,0x16bd,0x16d6,0x16d6,0x16d8,0x16c5,0x16cd,0x16cd,0x16ce,0x171f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, -0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x1812,0x1974,0x1974, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, -0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e7,0x1b40,0x1f1b, -0x181a,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820, -0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820,0x1820, -0x1820,0x1820,0x1820,0x1820,0xaa7,0x1828,0xaaf,0x1b60,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb, -0x1ae6,0xd38,0x1afb,0x1af3,0x1afd,0x1b68,0x1b68,0xdcc,0x19e0,0x1a5d,0x1ab2,0x1ab6,0x1aaa,0x1c20,0xcea,0xcf1, -0x1a10,0xcc2,0x1a65,0xcf9,0x1b05,0x1b08,0xd40,0x1b70,0x1b18,0x1b10,0xd48,0xdd4,0x1b78,0x1b7c,0xddc,0x1019, -0x1b20,0xd50,0xd58,0x1b84,0x1b94,0x1b8c,0xde4,0xf12,0xe70,0xe78,0x1daa,0xfc9,0x1e57,0x1e57,0x1b9c,0xdec, -0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770, -0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772, -0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774, -0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f, -0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771, -0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773, -0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775, -0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770, -0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772, -0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774, -0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f, -0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771, -0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773, -0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775, -0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770, -0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772, -0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774, -0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f, -0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771, -0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773, -0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775, -0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0x1775,0x176f,0x1770,0x1771,0x1772,0x1773,0x1774,0xab7,0xdf4,0xdf7, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747, -0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747,0x1747, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643, -0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x1643,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef, -0x16f4,0x16fc,0x1934,0x13a2,0x1a20,0x1a20,0x13a6,0x13ad,0xabf,0xac7,0xacf,0x15a5,0x15ac,0x15b4,0xad7,0x15bc, -0x15fa,0x15fa,0x158d,0x1595,0x15c4,0x15f1,0x15f2,0x1602,0x15cc,0x15d1,0x15d9,0x15e1,0xadf,0x15e9,0xae7,0x159d, -0xcd2,0x160a,0xaef,0xaf7,0x1612,0x1618,0x161d,0xaff,0xb0f,0x1660,0x1668,0x164b,0x1650,0xb17,0xb1f,0xb07, -0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737, -0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x173f,0x173f,0x173f,0x173f, -0x1578,0x1578,0x15b8,0x15f8,0x1638,0x1678,0x16b8,0x16f8,0x1734,0x1774,0x17b4,0x17f4,0x1834,0x1874,0x18b4,0x18f4, -0x1934,0x1970,0x19b0,0x19f0,0x1a30,0x1a64,0x1aa0,0x1ae0,0x1b20,0x1b60,0x1b9c,0x1bdc,0x1c1c,0x1c5c,0x1c9c,0x1cdc, -0xe59,0xa80,0xac0,0xb00,0xb40,0xb6b,0xf99,0xa40,0xed9,0xa40,0xa40,0xa40,0xa40,0xbab,0x13f5,0x13f5, -0xf19,0xfd9,0xa40,0xa40,0xa40,0xbeb,0xf59,0xc2b,0xa40,0xc51,0xc91,0xcd1,0xd11,0xd51,0xe99,0xdc9, -0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335, -0x1335,0x1335,0x1335,0x1335,0x1019,0x1375,0x116a,0x11aa,0x13b5,0x11b5,0x1435,0x1435,0x1435,0x1059,0x108c,0x10cc, -0x1475,0x1475,0x11f5,0x14b5,0x110c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c, -0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x112a, +static const uint16_t propsVectorsTrie_index[32324]={ +0x51d,0x525,0x52d,0x535,0x54d,0x555,0x55d,0x565,0x56d,0x575,0x57d,0x585,0x58d,0x595,0x59d,0x5a5, +0x5ac,0x5b4,0x5bc,0x5c4,0x5cc,0x5d4,0x5dc,0x5e4,0x5ec,0x5f4,0x5fc,0x604,0x60c,0x614,0x61c,0x624, +0x62c,0x634,0x63b,0x643,0x64b,0x653,0x65b,0x663,0x66b,0x673,0x678,0x680,0x687,0x68f,0x697,0x69f, +0x6a7,0x6af,0x6b7,0x6bf,0x6c6,0x6ce,0x6d6,0x6de,0x6e6,0x6ee,0x6f6,0x6fe,0x706,0x70e,0x716,0x71e, +0x1b20,0x726,0x72e,0x736,0x73c,0x1c5c,0x1e3e,0x1ca0,0x1553,0x1559,0x1561,0x154b,0x744,0x74a,0x752,0x75a, +0x762,0x768,0x770,0x778,0x780,0x786,0x78e,0x796,0x79e,0x7a4,0x7ac,0x7b4,0x7bc,0x7c4,0x7cc,0x7d3, +0x7db,0x7e1,0x7e9,0x7f1,0x7f9,0x7ff,0x807,0x80f,0x817,0x15b0,0x81f,0x827,0x82f,0x836,0x83e,0x846, +0x84e,0x852,0x85a,0x53d,0x862,0x86a,0x872,0x53d,0x16c2,0x16ca,0x87a,0x882,0x88a,0x892,0x89a,0x53d, +0x174e,0x1746,0x173e,0x1a39,0x1a31,0x1571,0x8a2,0x1569,0x1650,0x1650,0x1652,0x158d,0x158e,0x1581,0x1583,0x1585, +0x1708,0x170a,0x8aa,0x170a,0x8b2,0x8b7,0x8bf,0x170f,0x8c5,0x170a,0x8cb,0x8d3,0x8db,0x1700,0x1700,0x8e3, +0x1766,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x175e,0x8eb,0x1756,0x1756,0x8f3,0x8fb,0x903,0x90b,0x913,0x171f,0x1717,0x91b,0x923, +0x92b,0x1727,0x172f,0x933,0x1736,0x93b,0x1ac0,0x93f,0x947,0x94f,0x957,0x95c,0x1967,0x964,0x96b,0x18d3, +0x973,0x1af8,0x97b,0x983,0x98b,0x993,0x99b,0x53d,0x19bf,0x19c4,0x9a3,0x19b7,0x1a90,0x1a88,0x1b8c,0x9ab, +0x1a58,0x9b3,0x9bb,0x1a75,0x9c3,0x9c7,0x9cf,0x9d7,0x18db,0x18bb,0x18cb,0x18c3,0x1943,0x193b,0x198f,0x19e1, +0x15a6,0x15a6,0x15a6,0x15a6,0x1596,0x15a6,0x15a6,0x15a8,0x9df,0x1579,0x9e3,0x9eb,0x1579,0x9f3,0x9fb,0xa03, +0x139e,0x1396,0x13d6,0xa0b,0xa13,0x13be,0x12fc,0xa1b,0x13ae,0x13b6,0x13ce,0x159e,0xa23,0x13e6,0x13ed,0x13f5, +0x147c,0x1484,0x148c,0x1494,0x149c,0x14a3,0x14ab,0x14b3,0x13fd,0x1405,0x1408,0x140a,0x16f8,0x1852,0x1858,0x199f, +0x1408,0x1315,0x131d,0x15c0,0x15c5,0x15c8,0x15ce,0x13c6,0x15d6,0x15d6,0x1412,0x13de,0x1416,0x141e,0x1426,0x142e, +0x1436,0x143e,0x1446,0x144e,0x1860,0x18ab,0x1a0b,0x1b6c,0x1456,0x145c,0x1464,0x146c,0x13a6,0x1474,0x1868,0x186f, +0x176f,0x176f,0x176f,0x176f,0x176f,0x176f,0x176f,0x176f,0x1873,0x1873,0x1873,0x1873,0x187b,0x1873,0x1882,0x1889, +0x1891,0x1873,0x1873,0x1895,0x1873,0x1873,0x189b,0x1873,0x18b3,0x19a7,0x19fb,0x1325,0x132b,0x1cd6,0x1cde,0x1d86, +0x1957,0x194b,0x194f,0x19af,0x1913,0x1913,0x1913,0xa2b,0x191b,0xa33,0x196f,0xa3a,0xa42,0xa4a,0xa4a,0x1aa0, +0x190b,0x1a03,0x1333,0x133b,0xa52,0x177f,0x177f,0xa5a,0x1787,0x1787,0x1787,0x1787,0x1787,0x1787,0xa62,0xa68, +0x1603,0x15b8,0xa70,0x1669,0xa78,0x1687,0x168f,0x1697,0xa80,0xa85,0x165a,0x1661,0xa8a,0x1777,0x1987,0xa92, +0xa9a,0x169f,0x16a6,0x160b,0x16b6,0x16ba,0x1671,0x1675,0x167d,0x167d,0x167f,0x161b,0x1623,0x1623,0x1624,0x16ae, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f, +0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x178f,0x1792,0x18f3,0x18f3, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1648,0x1a98,0x1e76, +0x17a2,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8, +0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8,0x17a8, +0x17a8,0x17a8,0x17a8,0x17a8,0xaa2,0x179a,0xaaa,0x1b3c,0x1a65,0x1a65,0x1a65,0x1a65,0x1a65,0x1a65,0x1a65,0x1a65, +0x1a60,0xab2,0x1a1b,0x1a13,0x1a1d,0x1b34,0x1b34,0xaba,0x1903,0x1997,0x1a25,0x1a29,0x19f3,0x1b84,0xac2,0xaca, +0x195f,0xad2,0x19cc,0xada,0x1a7d,0x1a80,0xae2,0x1ab0,0x1a49,0x1a50,0xaea,0xaf2,0x1ae4,0x1ae8,0xafa,0xb02, +0x1a41,0xb0a,0xb12,0x1ab8,0x1b28,0x1b2c,0xb1a,0xb22,0xb2a,0xb32,0x1cce,0xb3a,0x1d8e,0x1d8e,0x1b00,0xb42, +0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb, +0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed, +0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef, +0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea, +0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec, +0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee, +0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0, +0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb, +0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed, +0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef, +0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea, +0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec, +0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee, +0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0, +0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb, +0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed, +0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef, +0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea, +0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec, +0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee, +0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0, +0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0x16f0,0x16ea,0x16eb,0x16ec,0x16ed,0x16ee,0x16ef,0xb4a,0xb51,0xb54, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, +0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de, +0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x15de,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c, +0x1631,0x1639,0x18a3,0x1343,0x197f,0x197f,0x1347,0x134e,0xb5c,0xb64,0xb6c,0x14d3,0x14da,0x14e2,0xb74,0x14ea, +0x153b,0x153b,0x14bb,0x14c3,0x14f2,0x1532,0x1533,0x1543,0x14fa,0x14ff,0x1507,0x150f,0xb7c,0x1517,0xb84,0x14cb, +0xb8c,0x1613,0xb94,0xb9c,0x151f,0x1525,0x152a,0xba4,0xbac,0x15f3,0x15fb,0x15e6,0x15eb,0xbb4,0xbbc,0xbc4, +0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, +0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, +0x14f4,0x14f4,0x1534,0x1574,0x15b4,0x15f4,0x1634,0x1674,0x16b0,0x16f0,0x1730,0x1770,0x17b0,0x17f0,0x1830,0x1870, +0x18b0,0x18ec,0x192c,0x196c,0x19ac,0x19e0,0x1a1c,0x1a5c,0x1a9c,0x1adc,0x1b18,0x1b58,0x1b98,0x1bd8,0x1c18,0x1c58, +0xa80,0xac0,0xb00,0xb40,0xb80,0xbab,0xbeb,0x1432,0xc0e,0xa40,0xa40,0xa40,0xc46,0xc86,0x1332,0x1332, +0xcc6,0xd06,0xa40,0xa40,0xa40,0xd2f,0xd6f,0xd8f,0xa40,0xdb5,0xdf5,0xe35,0xe75,0xeb5,0xf75,0xef5, +0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272, +0x1272,0x1272,0x1272,0x1272,0x1005,0x12b2,0x103d,0x107d,0x12f2,0x1088,0x1372,0x1372,0x1372,0x10be,0x10f1,0x1131, +0x13b2,0x13b2,0x1171,0x13f2,0x1194,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1, +0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x10f1,0x11b2, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, -0xe09,0xe19,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, -0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, -0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5, -0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x1235, -0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5, -0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x1275, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0xc31,0xc34,0xdff,0x1dfa,0x1021,0x74f,0x55e,0x10bb,0xd01,0xd80,0x55e,0x55e,0x1d20,0xf1a,0xf22,0x1e42, -0xc84,0xc8b,0xc93,0x1ba4,0x1dda,0x55e,0x1dba,0xff1,0x1bac,0xe07,0xe0f,0xe17,0x1049,0x757,0x55e,0x55e, -0x1bb4,0x1bb4,0x75f,0x55e,0x1e6f,0x10d3,0x1e67,0x10db,0x1f5b,0x11d5,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0xe1f,0x1fb3,0x12ce,0x1350,0x1351,0x1f7b,0x11fd,0x1204,0x120b,0x130d,0x1311,0x1285,0x121b, -0x1c30,0x1c32,0xe80,0xe87,0x1bbc,0x1bc4,0xe27,0xf3a,0x1d18,0xf02,0xf0a,0xfe9,0x1d38,0x1d3c,0x1d44,0x1069, -0xfb9,0x1d9a,0x767,0x55e,0x10c3,0x10cb,0x1da2,0xfc1,0xf9b,0xfa1,0xfa9,0xfb1,0x55e,0x55e,0x55e,0x55e, -0x1edf,0x1ed7,0x1145,0x114d,0x1e22,0x1e1a,0x1091,0x55e,0x55e,0x55e,0x55e,0x55e,0x1e0a,0x1051,0x1059,0x1061, -0x1dd2,0x1dca,0x1001,0x113d,0x1d4c,0xf4a,0x76f,0x55e,0x10a1,0x10a9,0x777,0x55e,0x55e,0x55e,0x55e,0x55e, -0x1f53,0x11b7,0x77f,0x55e,0x55e,0x1e32,0x1e2a,0x1099,0x128d,0x1293,0x129b,0x55e,0x55e,0x1223,0x1227,0x122f, -0x1f13,0x1f0b,0x119f,0x1f03,0x1efb,0x118f,0x1e02,0x1041,0x1361,0x1364,0x1364,0x55e,0x55e,0x55e,0x55e,0x55e, -0x10f3,0x10f8,0x1100,0x1107,0x112f,0x1135,0x55e,0x55e,0x1173,0x1177,0x117f,0x11c7,0x11cd,0x787,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x11e5,0x1374,0x1379,0x1381,0x55e,0x55e,0x78b,0x1f9b,0x1275, -0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d, -0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a6d,0x1a72,0xd09,0xd10,0xd10,0xd10, -0x1a7a,0x1a7a,0x1a7a,0xd18,0x1e5f,0x1e5f,0x1e5f,0x1e5f,0x1e5f,0x1e5f,0x793,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x797,0x1fcb,0x1fcb,0x12de,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a, -0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0x1c3a,0xe8f,0x1009,0x1011,0x1fd3, -0x1319,0x1321,0xf52,0x1df2,0x1dea,0x1031,0x1039,0x79f,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1f73,0x1f6b,0x11f5, -0x55e,0x55e,0x55e,0x1d30,0x1d30,0xf2a,0x1d28,0xf32,0x55e,0x55e,0x1127,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x7a3,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1d82,0x1d82,0x1d82,0xf76,0xf7b, -0x7ab,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1fe3,0x1341,0x1348,0x1fdb,0x1fdb,0x1fdb,0x7b3, -0x55e,0x184d,0x184d,0x184d,0x184d,0x184d,0x184d,0x184d,0xb35,0x185d,0xb3d,0x185e,0x1855,0x1866,0x186c,0x1874, -0xb45,0x199c,0x199c,0x7bb,0x55e,0x55e,0x55e,0x136c,0x11ed,0x198c,0x198c,0xc3c,0xd20,0x55e,0x55e,0x55e, -0x55e,0x18a5,0x18ac,0xb4d,0x18af,0xb55,0xb5d,0xb65,0x18a9,0xb6d,0xb75,0xb7d,0x18ae,0x18b6,0x18a5,0x18ac, -0x18a8,0x18af,0x18b7,0x18a6,0x18ad,0x18a9,0xb84,0x187c,0x1884,0x188b,0x1892,0x187f,0x1887,0x188e,0x1895,0xb8c, -0x189d,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87,0x1e87, -0x1e87,0x1e77,0x1e7a,0x1e77,0x1e81,0x10e3,0x7c3,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x12fa,0x1302,0x1305,0x1305,0x1305,0x1305,0x1305, -0x1305,0x1117,0x111f,0x1feb,0x1359,0x7cb,0x55e,0x55e,0x55e,0x1f93,0x1237,0x7d3,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x7d7,0x1329,0x1fa3,0x127d,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x7df,0x1389,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x12e6,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0xff9,0x55e,0x1ecf,0x1ec7,0x10eb,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x7e7,0x1f63,0x11dd,0x55e,0x55e,0x123f,0x1240,0x7ef,0x55e,0x55e,0x55e,0x55e, -0x55e,0xec7,0xecf,0xed7,0xedf,0xee7,0xeef,0xef6,0xefa,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x7f3,0x1071,0x1e12,0x1077,0x1e12,0x107f,0x1084,0x1089, -0x1089,0x1e97,0x1eb7,0x1ebf,0x1f2b,0x1e9f,0x1f83,0x1ea7,0x1f33,0x1f8b,0x1f8b,0x11a7,0x11af,0x1257,0x125d,0x1265, -0x126d,0x1fab,0x1fab,0x1fab,0x1fab,0x12b1,0x1fab,0x12b7,0x12bb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb, -0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb, -0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fb,0x7fc,0xb94,0x18bf,0x18bf,0x18bf,0x804,0x804,0x804, -0x804,0x1994,0x1994,0x1994,0x1994,0x1994,0x1994,0x1994,0x80c,0x804,0x804,0x804,0x804,0x804,0x804,0x804, -0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804, -0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804, -0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804, -0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0xbe7,0xbee,0xbf6,0xbfe,0x197c,0x197c,0x197c, -0xc06,0xc0e,0xc11,0x19ac,0x19a4,0xc44,0xd60,0xd64,0xd68,0x55e,0x55e,0x55e,0x55e,0xd70,0x1b28,0xd78, -0xf62,0x1830,0xb27,0xb2d,0x1029,0xc19,0x19f0,0xcaa,0x55e,0x1845,0x1838,0x183d,0x1984,0xc21,0xc29,0x1155, -0x115b,0x1d8a,0xf83,0x1d7a,0xf5a,0x1331,0x1339,0x55e,0x55e,0x1db2,0x1db2,0x1db2,0x1db2,0x1db2,0x1db2,0x1db2, -0x1db2,0x1db2,0xfd1,0xfd9,0xfe1,0x12ee,0x12f2,0x55e,0x55e,0x1b30,0xd88,0x1b38,0x1b38,0xd8c,0xe97,0xe9f, -0xea7,0x1c00,0x1be8,0x1c08,0x1c10,0x1bf8,0xe2f,0xe33,0xe3a,0xe42,0xe46,0xe4e,0xe56,0xe58,0xe58,0xe58, -0xe58,0x1c71,0x1c79,0x1c71,0x1c7f,0x1c87,0x1c52,0x1c8f,0x1c97,0x1c71,0x1c9f,0x1ca7,0x1cae,0x1cb6,0x1c5a,0x1c71, -0x1cbb,0x1c62,0x1c69,0x1cc3,0x1cc9,0x1d6b,0x1d72,0x1d64,0x1cd0,0x1cd8,0x1ce0,0x1ce8,0x1de2,0x1cf0,0x1cf8,0xeaf, -0xeb7,0x1c42,0x1c42,0x1c42,0xebf,0x1d92,0x1d92,0xf8b,0xf93,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a, -0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4f,0x1e4a,0x1e4a,0x1e4a,0x10b1,0x10b3,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, -0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, -0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, -0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, -0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1163,0x1c4a,0x1f23,0x1f23,0x1f23,0x1f23,0x1f23,0x1f23, -0x1f23,0x1f43,0x116b,0x1248,0x124f,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b,0x1f4b, -0x1187,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc, -0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bce,0x1bcc,0x1bd6,0x1bcc,0x1bcc, -0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bd9,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1bcc,0x1be0,0x1213,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef, -0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef,0x1eef, -0x1ef3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x1fc3,0x12a3, -0x12a9,0x12c3,0x12c6,0x12c6,0x12c6,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, -0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, -0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, -0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, -0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18ca, -0x1391,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, -0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, -0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x13d5,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb, -0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x1ffb,0x13e5,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x18d2,0x18d2,0x18d2,0x18d2, -0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x13b5,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1392,0x1ff3,0x1ff3,0x1ff3,0x1ff3, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x139a,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391, -0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1391,0x1392,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, -0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, -0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, -0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, -0x1c18,0x1c18,0x1c18,0x13bd,0x1d00,0x1d00,0x1d00,0x1d00,0x1d00,0x1d00,0x13c5,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, -0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, -0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, -0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, -0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x13cd,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, -0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, -0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x13dd, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, -0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, -0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, -0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, -0x175f,0x175f,0x175f,0x175f,0x174f,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1757,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, -0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, -0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, -0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f,0x175f, -0x175f,0x175f,0x175f,0x175f,0x175f,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, -0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, -0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, -0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x18c7, -0x18c7,0x18c7,0x18c7,0x18c7,0x18c7,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, -0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, -0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, -0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1c18, -0x1c18,0x1c18,0x1c18,0x1c18,0x1c18,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, -0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, -0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, -0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, -0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, -0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, -0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, -0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7, -0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1ee7,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, -0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, -0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, -0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b, -0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1f3b,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, -0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, -0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, -0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb, -0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3, -0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x1ff3,0x53d,0x53d,0x53d,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2, -0x2e2,0x2e5,0x2ee,0x2e8,0x2e8,0x2eb,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2, -0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x828,0x822,0x804,0x7ec,0x7f8,0x7f5,0x7ec,0x807, -0x7f2,0x7fe,0x7ec,0x819,0x80d,0x801,0x825,0x7fb,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9, -0x7e9,0x7e9,0x810,0x80a,0x813,0x813,0x813,0x822,0x7ec,0x834,0x834,0x834,0x834,0x834,0x834,0x82e, -0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e, -0x82e,0x82e,0x82e,0x7f2,0x7f8,0x7fe,0x81f,0x7e6,0x81c,0x831,0x831,0x831,0x831,0x831,0x831,0x82b, -0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b, -0x82b,0x82b,0x82b,0x7f2,0x816,0x7ef,0x813,0x2e2,0,0,0,0,0,0,0,0, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, +0xfb5,0xfc5,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, +0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xf35, +0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232, +0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x11f2, +0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232, +0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x1232,0x11f2, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0xbcc,0xbd3,0xbdb,0x53d,0x18e3,0x18e3,0x18e3,0xbe3,0xbeb,0xbee,0x1933,0x1923,0xbf6,0xbfe,0xc02,0xc06, +0x53d,0x53d,0x53d,0x53d,0xc0e,0x1a6d,0xc16,0xc1e,0x182f,0xc26,0xc2c,0xc30,0xc38,0x1977,0xc40,0x53d, +0x1827,0x181a,0x181f,0x18eb,0xc48,0xc50,0xc54,0xc5a,0x1d0e,0xc62,0x1d5e,0xc69,0xc6d,0xc75,0x1f88,0xc7d, +0x1cf6,0x1cf6,0x1cf6,0x1cf6,0x1cf6,0x1cf6,0x1cf6,0x1cf6,0x1cf6,0xc85,0xc8d,0xc95,0xc9d,0xca1,0x53d,0x53d, +0xca9,0xcac,0xcb4,0x1d26,0xcbc,0xcc4,0x53d,0xccc,0xcd4,0xcdc,0x53d,0x53d,0x1c64,0xce4,0xcec,0x1dc5, +0xcf4,0xcfb,0xd03,0x1b44,0x1d1e,0x53d,0x1cfe,0xd0b,0x1b08,0xd13,0xd1b,0xd23,0xd2b,0xd33,0x53d,0x53d, +0x1af0,0x1af0,0xd3b,0x53d,0x1d9e,0xd43,0x1d96,0xd4b,0x1eb7,0xd53,0x1f68,0xd5b,0xd62,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0xd6a,0x1efd,0xd72,0xd7a,0xd7c,0x1ebf,0xd84,0xd8b,0xd92,0xd9a,0xd9e,0xda5,0xdad, +0x1b94,0x1b96,0xdb5,0xdbc,0x1b18,0x1b10,0xdc4,0xdca,0x1c7c,0xdd2,0xdda,0xdde,0x1c8c,0x1c90,0x1c84,0xde6, +0xdee,0x1d46,0xdf6,0x53d,0xdfe,0xe06,0x1d2e,0xe0e,0xe16,0xe1c,0xe24,0xe2c,0xe34,0xe39,0xe41,0xe49, +0x1e2a,0x1e22,0xe51,0xe59,0x1d56,0x1d4e,0xe61,0x53d,0x53d,0x53d,0x53d,0x53d,0x1d7e,0xe69,0xe71,0x53d, +0x1d6e,0x1d66,0xe79,0xe81,0x1c98,0xe89,0xe91,0xe98,0xea0,0xea8,0xeb0,0x53d,0x53d,0x53d,0x53d,0x53d, +0x1e9f,0xeb8,0x53d,0x53d,0x53d,0x1d3e,0x1d36,0xec0,0xec8,0xece,0xed6,0x53d,0x53d,0xede,0xee2,0xeea, +0x1e5e,0x1e56,0xef2,0x1e4e,0x1e46,0xefa,0x1d76,0xf02,0xf0a,0x53d,0x53d,0x53d,0x53d,0x53d,0x1f80,0xf12, +0xf1a,0xf1f,0xf27,0xf2e,0xf33,0xf39,0x53d,0x53d,0xf41,0xf45,0xf4d,0xf55,0xf5b,0xf63,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0xf6b,0xf73,0xf78,0xf80,0x53d,0x53d,0xf87,0x1ed7,0xf8f, +0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4, +0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d4,0x19d9,0xf97,0x53d,0x53d,0x53d, +0x19d4,0x19d4,0x19d4,0xf9f,0x1da6,0x1da6,0x1da6,0x1da6,0x1da6,0x1da6,0xfa7,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0xfab,0x1f25,0x1f25,0xfaf,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8, +0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1aca,0x1ac8,0x1ad2, +0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ad5,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1ac8,0x1adc,0xfb7,0x1f60,0x1f60, +0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60, +0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0xfbf,0x1dcd,0x1dcd, +0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dcd,0x1dd2,0x1dcd,0x1dcd,0x1dcd, +0xfc7,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x1f70,0xfcf, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e, +0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0x1b9e,0xfd7,0xfdf,0xfe7,0x1f2d,0xfeb,0xff3,0xff8,0x1cee,0x1ce6, +0x1000,0x1008,0x1010,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x1f78,0x1018,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x1eaf,0x1ea7,0x1020,0x53d,0x53d,0x53d,0x1c74,0x1c74, +0x1028,0x1c6c,0x1030,0x53d,0x53d,0x1038,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1040,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e36,0x1f15,0x1f15, +0x1f15,0x1f15,0x1f15,0x1f15,0x1f15,0x1f15,0x1f15,0x1f15,0x1f15,0x1f15,0x1f15,0x1f15,0x1048,0x104e,0x1056,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x105a,0x1c54, +0x1e86,0x1e86,0x1e86,0x1e86,0x1e86,0x1e86,0x1e86,0x1e87,0x1062,0x1067,0x106e,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f, +0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1e8f,0x1072,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x1d06, +0x1d06,0x1d06,0x107a,0x107f,0x1087,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x1f55,0x1f55,0x1f55,0x1f55,0x1f55,0x1f55,0x1f58,0x108f,0x1f55,0x1f55,0x1f55, +0x1f55,0x1f55,0x1f55,0x1f55,0x1f55,0x1f55,0x1f55,0x1f55,0x1f55,0x1f55,0x1097,0x53d,0x53d,0x1f35,0x109f,0x10a6, +0x1f1d,0x1f1d,0x1f1d,0x10ad,0x53d,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x10b5,0x17b8,0x10bd,0x17b9, +0x17b0,0x17c1,0x17c7,0x17cf,0x10c5,0x192b,0x192b,0x10cd,0x53d,0x53d,0x53d,0x10d5,0x10dd,0x18f3,0x18f3,0x10e5, +0x10ed,0x53d,0x53d,0x53d,0x53d,0x1800,0x1807,0x10f5,0x180a,0x10fd,0x1105,0x110d,0x1804,0x1115,0x111d,0x1125, +0x1809,0x1811,0x1800,0x1807,0x1803,0x180a,0x1812,0x1801,0x1808,0x1804,0x112c,0x17d7,0x17df,0x17e6,0x17ed,0x17da, +0x17e2,0x17e9,0x17f0,0x1134,0x17f8,0x1dae,0x1dae,0x1dae,0x1dae,0x1dae,0x1dae,0x1dae,0x1dae,0x1dae,0x1dae,0x1dae, +0x1dae,0x1dae,0x1dae,0x1dae,0x1dae,0x1dfa,0x1db6,0x1dfa,0x1dbd,0x113c,0x1144,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x114c,0x1154,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x115c,0x1164,0x1f3d,0x116c,0x1171,0x53d,0x53d,0x53d,0x1edf,0x1179,0x1181, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x1185,0x118a,0x1ee7,0x1192,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x119a,0x119f,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x11a6,0x11ab,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x11b3,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x11bb,0x53d,0x1e1a,0x1e12,0x11c3, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x11cb,0x1e97,0x11d0,0x53d,0x53d,0x11d8,0x11d9,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x11e1,0x11e9,0x11f1,0x11f9,0x1201,0x1209,0x53d,0x1210,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x1218,0x1cb7,0x121e,0x1cb7,0x1226,0x122b,0x1233,0x53d,0x1dda,0x1e02,0x1e0a, +0x1e66,0x1de2,0x1ec7,0x1dea,0x1e6e,0x1ecf,0x1ecf,0x12cd,0x12d5,0x12dd,0x1f05,0x12e5,0x12ed,0x1eef,0x1eef,0x1eef, +0x1eef,0x123b,0x1eef,0x1ef5,0x1243,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a, +0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a,0x127a, +0x127a,0x127a,0x127a,0x127a,0x12f4,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d,0x53d, +0x53d,0x53d,0x53d,0x53d,0x124a,0x19e9,0x1252,0x19eb,0x19eb,0x1256,0x125e,0x1266,0x126e,0x1b54,0x1aa8,0x1b5c, +0x1b64,0x1b4c,0x1276,0x127a,0x1281,0x1289,0x128d,0x1295,0x129d,0x127a,0x127a,0x127a,0x127a,0x1bc5,0x1bcd,0x1bc5, +0x1bd3,0x1bdb,0x1ba6,0x1be3,0x1beb,0x1bc5,0x1bf3,0x1bfb,0x1c02,0x1c0a,0x1bae,0x1bc5,0x1c0f,0x1bb6,0x1bbd,0x1c17, +0x1c1d,0x1cbf,0x1cc6,0x1ca8,0x1c24,0x1c2c,0x1c34,0x1c3c,0x1cb0,0x1bc5,0x1c44,0x12a5,0x12ad,0x1b7c,0x1b7c,0x1b7c, +0x12b5,0x1cb7,0x1cb7,0x12bd,0x12c5,0x1304,0x184a,0x184a,0x184a,0x1305,0x1305,0x1305,0x1305,0x18fb,0x18fb,0x18fb, +0x18fb,0x18fb,0x18fb,0x18fb,0x130d,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305, +0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305, +0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305, +0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305, +0x1305,0x1305,0x1305,0x1305,0x1305,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, +0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, +0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, +0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x1842,0x134e,0x1b74,0x1b74,0x1b74, +0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74, +0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74, +0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74, +0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1356,0x1c4c,0x1c4c,0x1c4c,0x1c4c,0x1c4c,0x1c4c,0x135e,0x1df2,0x1df2, +0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2, +0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2, +0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2, +0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1366,0x1e7e,0x1e7e, +0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e, +0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x136e,0x1f4d,0x1f4d, +0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d,0x1f4d, +0x1372,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837,0x1837, +0x1837,0x137a,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x1382,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d, +0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x138a,0x1f45,0x1f45,0x1f45,0x1f45, +0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45, +0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45, +0x1f45,0x138e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e,0x134e, +0x134e,0x1382,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2, +0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2, +0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2, +0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2, +0x16e2,0x16da,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2, +0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2, +0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2, +0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2,0x16e2, +0x16e2,0x16e2,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, +0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, +0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, +0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, +0x183f,0x183f,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74, +0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74, +0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74, +0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74,0x1b74, +0x1b74,0x1b74,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2, +0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2, +0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2, +0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2, +0x1df2,0x1df2,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32,0x1e32, +0x1e32,0x1e32,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e, +0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e, +0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e, +0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e,0x1e7e, +0x1e7e,0x1e7e,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d, +0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d, +0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d, +0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d,0x1f0d, +0x1f0d,0x1f0d,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45, +0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45, +0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45, +0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45,0x1f45, +0x1f45,0x1f45,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60, +0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60, +0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60, +0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60,0x1f60, +0x1f60,0x1f60,0x51c,0x51c,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xf3,0xff,0xf9, +0xf9,0xfc,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, +0x12,0x12,0x12,0x12,0x43e,0x438,0x41d,0x405,0x411,0x40e,0x405,0x420,0x40b,0x417,0x405,0x42f, +0x423,0x41a,0x43b,0x414,0x402,0x402,0x402,0x402,0x402,0x402,0x402,0x402,0x402,0x402,0x426,0x423, +0x429,0x429,0x429,0x438,0x405,0x44a,0x44a,0x44a,0x44a,0x44a,0x44a,0x444,0x444,0x444,0x444,0x444, +0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x40b, +0x411,0x417,0x435,0x3ff,0x432,0x447,0x447,0x447,0x447,0x447,0x447,0x441,0x441,0x441,0x441,0x441, +0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x40b, +0x42c,0x408,0x429,0x12,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x300,0x2f1,0x2f1, -0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1, -0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f4,0x690,0x83d,0x840,0x696,0x840,0x83a,0x68a, -0x681,0x2fa,0x69f,0x2fd,0x843,0x678,0x68d,0x837,0x693,0x69c,0x67e,0x67e,0x684,0x2f7,0x68a,0x687, -0x681,0x67e,0x69f,0x2fd,0x67b,0x67b,0x67b,0x690,0x306,0x306,0x306,0x306,0x306,0x306,0x6a8,0x306, -0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x6a8,0x306,0x306,0x306,0x306,0x306,0x306,0x699, -0x6a8,0x306,0x306,0x306,0x306,0x306,0x6a8,0x6a2,0x6a5,0x6a5,0x303,0x303,0x303,0x303,0x6a2,0x303, -0x6a5,0x6a5,0x6a5,0x303,0x6a5,0x6a5,0x303,0x303,0x6a2,0x303,0x6a5,0x6a5,0x303,0x303,0x303,0x699, -0x6a2,0x6a5,0x6a5,0x303,0x6a5,0x303,0x6a2,0x303,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x312,0x30c, -0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x30f,0x6b1,0x312,0x6b4,0x312,0x30c,0x312,0x30c, -0x312,0x30c,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x6b7,0x6b1, -0x312,0x30c,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x312,0x6b1,0x6ae,0x6ab,0x312,0x30c,0x312,0x30c, -0x6b1,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x6ae,0x6ab,0x6b7,0x6b1,0x312,0x6b4,0x312,0x30c,0x312, -0x6b4,0x6ba,0x6b7,0x6b1,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x6b7,0x6b1,0x312,0x30c,0x312,0x30c, -0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x6b7,0x6b1, -0x312,0x30c,0x312,0x6b4,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x312,0x30c, -0x312,0x312,0x30c,0x312,0x30c,0x312,0x30c,0x309,0x318,0x327,0x327,0x324,0x327,0x324,0x327,0x327, -0x324,0x327,0x327,0x327,0x324,0x31e,0x327,0x333,0x327,0x327,0x324,0x327,0x327,0x324,0x327,0x327, -0x327,0x324,0x324,0x324,0x327,0x327,0x324,0x327,0x336,0x330,0x327,0x324,0x327,0x324,0x327,0x327, -0x324,0x327,0x31e,0x31e,0x327,0x324,0x327,0x336,0x330,0x327,0x327,0x327,0x324,0x327,0x324,0x327, -0x327,0x315,0x31e,0x321,0x327,0x324,0x31e,0x315,0x31b,0x31b,0x31b,0x31b,0x32d,0x32d,0x32a,0x32d, -0x32d,0x32a,0x32d,0x32d,0x32a,0x336,0x6bd,0x336,0x6bd,0x336,0x6bd,0x336,0x6bd,0x336,0x6bd,0x336, -0x6bd,0x336,0x6bd,0x336,0x6bd,0x324,0x336,0x330,0x336,0x330,0x336,0x330,0x327,0x324,0x336,0x330, -0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x330,0x32d,0x32d,0x32a,0x336,0x330,0xa29,0xa29, -0xa35,0xa32,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330, -0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0x336,0x330,0xa35,0xa32,0xa35,0xa32, -0xa29,0xa26,0xa35,0xa32,0xc0c,0xd08,0xa2f,0xa2c,0xa2f,0xa2c,0xa35,0xa32,0xa35,0xa32,0xa35,0xa32, -0xa35,0xa32,0xa35,0xa32,0xa35,0xa32,0xa35,0xa32,0xd05,0xd05,0xd05,0xe01,0xe01,0xe01,0xe04,0xe04, -0xe01,0xe04,0xe04,0xe01,0xe01,0xe04,0xf4e,0xf51,0xf51,0xf51,0xf51,0xf4e,0xf51,0xf4e,0xf51,0xf4e, -0xf51,0xf4e,0xf51,0xf4e,0x339,0x6c0,0x339,0x342,0x342,0x339,0x342,0x342,0x339,0x345,0x339,0x342, -0x339,0x339,0x339,0x339,0x339,0x6c0,0x339,0x342,0x339,0x339,0x339,0x339,0x342,0x342,0x339,0x339, -0x339,0x339,0x339,0x339,0x339,0x339,0x342,0x339,0x339,0x339,0x339,0x33f,0x339,0x339,0x339,0x339, -0x33f,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x342,0x339,0x339, -0x339,0x339,0x339,0x339,0x339,0x339,0x342,0x339,0x33c,0x339,0x339,0x339,0x339,0x339,0x339,0x339, -0x339,0x339,0x33f,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0xa38,0xa38,0xa38, -0xa38,0xa38,0xd0b,0xd0b,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x351,0x351,0x357, -0x357,0x351,0x351,0x351,0x34e,0x34e,0x348,0x348,0x6c3,0x348,0x351,0x6c9,0x354,0x6c9,0x6c9,0x6c9, -0x354,0x6c9,0x351,0x351,0x6cc,0x35a,0x348,0x348,0x348,0x348,0x348,0x348,0x6c6,0x6c6,0x6c6,0x6c6, -0x34b,0x6c6,0x348,0xb82,0x35d,0x35d,0x35d,0x35d,0x35d,0x348,0x348,0x348,0x348,0x348,0xa44,0xa44, -0xa41,0xa3b,0xa3e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e, -0xd0e,0xd0e,0xd0e,0xd0e,0x6db,0x6db,0x6db,0x6db,0x6db,0x6d5,0x6db,0x6db,0x6db,0x6db,0x6db,0x6db, -0x6db,0x6d5,0x6cf,0x6db,0x6db,0x6db,0x6cf,0x6db,0x6db,0x6cf,0x6d5,0x6cf,0x6cf,0x6cf,0x6cf,0x6db, -0x6cf,0x6cf,0x6cf,0x6cf,0x6cf,0x6d5,0x6d5,0x6db,0x6db,0x6db,0x6db,0x6db,0x6db,0x6cf,0x6cf,0x6cf, -0x6cf,0x6db,0x6db,0x6cf,0x6db,0x6db,0x6d5,0x6cf,0x6d5,0x6db,0x6d5,0x6cf,0x6db,0x6db,0x6cf,0x6cf, -0x6cf,0x6cf,0x6cf,0x6cf,0x6d8,0x6d8,0x981,0x6d8,0x6d8,0x984,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85, -0xb85,0xb85,0xb85,0xcbd,0xdcb,0xdcb,0xdcb,0xdcb,0xdcb,0xdcb,0xdcb,0xdcb,0xf15,0xf0f,0xf0f,0xf0f, -0xf12,0xdce,0xdce,0xdce,0x6d2,0x6d2,0xb88,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02, -0xd02,0xd02,0xd02,0xd02,0x100e,0x100b,0x100e,0x100b,0x369,0x375,0x100e,0x100b,9,9,0x378,0xf54, -0xf54,0xf54,0x360,0x158a,9,9,9,9,0x372,0x363,0x38d,0x366,0x38d,0x38d,0x38d,9, -0x38d,9,0x38d,0x38d,0x38a,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1, -0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,9,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x6e1,0x38d,0x38d, -0x38a,0x38a,0x38a,0x38a,0x38a,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de, -0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x387,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x6de,0x38a,0x38a, -0x38a,0x38a,0x38a,0x1011,0x390,0x390,0x393,0x384,0x384,0x390,0x381,0xa4a,0xc15,0xc12,0x37b,0xa47, -0x37b,0xa47,0x37b,0xa47,0x37b,0xa47,0x36f,0x36c,0x36f,0x36c,0x36f,0x36c,0x36f,0x36c,0x36f,0x36c, -0x36f,0x36c,0x36f,0x36c,0x390,0x390,0x381,0x37e,0xbc4,0xbc1,0xc0f,0xd14,0xd11,0xd17,0xd14,0xd11, -0xe07,0xe0a,0xe0a,0xe0a,0xa59,0x6ed,0x3ab,0x3ae,0x3ab,0x3ab,0x3ab,0x3ae,0x3ab,0x3ab,0x3ab,0x3ab, -0x3ae,0xa59,0x3ae,0x3ab,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ed,0x6ea,0x6ea, +0,0,0,0,0x12,0x12,0x12,0x12,0x12,0x102,0x12,0x12,0x12,0x12,0x12,0x12, +0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, +0x12,0x12,0x12,0x12,0x4b,0x30f,0x40e,0x411,0x315,0x411,0x405,0x306,0x2fa,0xa5,0x366,0xcc, +0x429,0x2d6,0x309,0x3fc,0x312,0x33f,0x2e8,0x2e8,0x2fd,0x84,0x306,0x384,0x2fa,0x2e8,0x366,0xcc, +0x2e2,0x2e2,0x2e2,0x30f,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d,0x37b,0x23d,0x23d,0x23d,0x23d,0x23d, +0x23d,0x23d,0x23d,0x23d,0x37b,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d,0x336,0x37b,0x23d,0x23d,0x23d, +0x23d,0x23d,0x37b,0x375,0x378,0x378,0x237,0x237,0x237,0x237,0x375,0x237,0x378,0x378,0x378,0x237, +0x378,0x378,0x237,0x237,0x375,0x237,0x378,0x378,0x237,0x237,0x237,0x336,0x375,0x378,0x378,0x237, +0x378,0x237,0x375,0x237,0x23d,0x378,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237, +0x23d,0x237,0x23d,0x237,0x23a,0x375,0x23d,0x378,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x378, +0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x37b,0x375,0x23d,0x237,0x23d,0x378, +0x23d,0x237,0x23d,0x237,0x23d,0x375,0x372,0x36f,0x23d,0x237,0x23d,0x237,0x375,0x23d,0x237,0x23d, +0x237,0x23d,0x237,0x372,0x36f,0x37b,0x375,0x23d,0x378,0x23d,0x237,0x23d,0x378,0x37e,0x37b,0x375, +0x23d,0x378,0x23d,0x237,0x23d,0x237,0x37b,0x375,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237, +0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x37b,0x375,0x23d,0x237,0x23d,0x378, +0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x23d,0x237,0x23d, +0x237,0x23d,0x237,0x22b,0x216,0x225,0x225,0x222,0x225,0x222,0x225,0x225,0x222,0x225,0x225,0x225, +0x222,0x21c,0x225,0x23a,0x225,0x225,0x222,0x225,0x225,0x222,0x225,0x225,0x225,0x222,0x222,0x222, +0x225,0x225,0x222,0x225,0x23d,0x237,0x225,0x222,0x225,0x222,0x225,0x225,0x222,0x225,0x21c,0x21c, +0x225,0x222,0x225,0x23d,0x237,0x225,0x225,0x225,0x222,0x225,0x222,0x225,0x225,0x210,0x21c,0x21f, +0x225,0x222,0x21c,0x210,0x219,0x219,0x219,0x219,0x231,0x231,0x22b,0x231,0x231,0x22b,0x231,0x231, +0x22b,0x23d,0x378,0x23d,0x378,0x23d,0x378,0x23d,0x378,0x23d,0x378,0x23d,0x378,0x23d,0x378,0x23d, +0x378,0x222,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x225,0x222,0x23d,0x237,0x23d,0x237,0x23d,0x237, +0x23d,0x237,0x23d,0x237,0x237,0x231,0x231,0x22b,0x23d,0x237,0x738,0x738,0x74a,0x747,0x23d,0x237, +0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237, +0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x74a,0x747,0x74a,0x747,0x738,0x735,0x74a,0x747, +0x8eb,0x9b4,0x744,0x741,0x744,0x741,0x74a,0x747,0x74a,0x747,0x74a,0x747,0x74a,0x747,0x74a,0x747, +0x74a,0x747,0x74a,0x747,0x9b1,0x9b1,0x9b1,0xabf,0xabf,0xabf,0xac2,0xac2,0xabf,0xac2,0xac2,0xabf, +0xabf,0xac2,0xbac,0xbaf,0xbaf,0xbaf,0xbaf,0xbac,0xbaf,0xbac,0xbaf,0xbac,0xbaf,0xbac,0xbaf,0xbac, +0x216,0x360,0x216,0x228,0x228,0x216,0x228,0x228,0x216,0x234,0x216,0x228,0x216,0x216,0x216,0x216, +0x216,0x360,0x216,0x228,0x216,0x216,0x216,0x216,0x228,0x228,0x216,0x216,0x216,0x216,0x216,0x216, +0x216,0x216,0x228,0x216,0x216,0x216,0x216,0x21c,0x216,0x216,0x216,0x216,0x21c,0x216,0x216,0x216, +0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x228,0x216,0x216,0x216,0x216,0x216,0x216, +0x216,0x216,0x228,0x216,0x219,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x21c,0x216, +0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x73b,0x73b,0x73b,0x73b,0x73b,0x9b1,0x9b1, +0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x96,0x96,0x9c,0x28b,0x96,0x96,0x96, +0x93,0x93,0x6c,0x6c,0x2f7,0x6c,0x96,0x38a,0x99,0x38a,0x38a,0x38a,0x99,0x38d,0x96,0x96, +0x303,0x9f,0x6c,0x6c,0x6c,0x6c,0x6c,0x28e,0x2fa,0x387,0x2fa,0x2fa,0x72,0x2fa,0x6c,0x7d7, +0x240,0x240,0x240,0x240,0x240,0x6c,0x6c,0x6c,0x6c,0x6c,0x6e7,0x6e7,0x6d5,0x6cc,0x6d2,0x963, +0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963, +0x5ee,0x5f1,0x5f4,0x5fa,0x5fd,0x600,0x603,0x606,0x609,0x5f7,0x60c,0x60f,0x612,0x615,0x61b,0x5eb, +0x618,0x61e,0x5df,0x621,0x5eb,0x5df,0x5e5,0x5df,0x5df,0x5df,0x5df,0x5eb,0x5df,0x5df,0x5df,0x5df, +0x624,0x5e5,0x5e5,0x62a,0x62d,0x627,0x5eb,0x5eb,0x5eb,0x5df,0x5df,0x5df,0x5df,0x630,0x627,0x5df, +0x633,0x636,0x5e5,0x5df,0x5e5,0x5eb,0x5e5,0x5df,0x5eb,0x5eb,0x5df,0x5df,0x5df,0x5df,0x5df,0x5df, +0x5e8,0x5e8,0x639,0x5e8,0x5e8,0x63c,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x957, +0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xb7c,0xb76,0xb76,0xb76,0xb79,0xa3e,0xa44,0xa3e, +0x5e2,0x5e2,0x849,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d, +0xc8a,0xc87,0xc8a,0xc87,0x291,0x2b2,0xc8a,0xc87,0,0,0x19e,0xb9a,0xb9a,0xb9a,0x4e,0x119d, +0,0,0,0,0x198,0x6f,0x1b6,0x78,0x1b6,0x1b6,0x1b6,0,0x1b6,0,0x1b6,0x1b6, +0x1b3,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d, +0x35d,0x35d,0,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x35d,0x1b6,0x1b6,0x1b3,0x1b3,0x1b3,0x1b3, +0x1b3,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a, +0x35a,0x35a,0x1b0,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x35a,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0xc8d, +0x1b9,0x1b9,0x1bc,0x1ad,0x1ad,0x1b9,0x1aa,0x70e,0x8e8,0x8e5,0x1a1,0x70b,0x1a1,0x70b,0x1a1,0x70b, +0x1a1,0x70b,0x165,0x162,0x165,0x162,0x165,0x162,0x165,0x162,0x165,0x162,0x165,0x162,0x165,0x162, +0x1b9,0x1b9,0x1aa,0x1a4,0x870,0x86d,0x8e2,0x993,0x990,0x999,0x993,0x990,0xab3,0xab6,0xab6,0xab6, +0x6f6,0x354,0x17d,0x180,0x17d,0x17d,0x17d,0x180,0x17d,0x17d,0x17d,0x17d,0x180,0x6f6,0x180,0x17d, +0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x354,0x351,0x351,0x351,0x351,0x351,0x351, +0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351,0x351, +0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34e,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b, +0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x34b,0x6f0,0x34e,0x177,0x17a, +0x177,0x177,0x177,0x17a,0x177,0x177,0x177,0x177,0x17a,0x6f0,0x17a,0x177,0x171,0x16b,0x171,0x16b, +0x171,0x16b,0x171,0x16b,0x171,0x16b,0x171,0x16b,0x171,0x16b,0x171,0x16b,0x171,0x16b,0x171,0x16b, +0x171,0x16b,0x174,0x16e,0x171,0x16b,0x171,0x16b,0x171,0x16b,0x171,0x16b,0x171,0x16b,0x168,0x5d9, +0x5dc,0x5ca,0x5ca,0xdd7,0x7fe,0x7fe,0x8dc,0x8d9,0x6f3,0x6ed,0x6f3,0x6ed,0x17d,0x177,0x17d,0x177, +0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177, +0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177, +0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x177,0x17d,0x180,0x17a,0x17d, +0x177,0x8dc,0x8d9,0x17d,0x177,0x8dc,0x8d9,0x17d,0x177,0x8dc,0x8d9,0xb94,0x180,0x17a,0x180,0x17a, +0x17d,0x177,0x180,0x17a,0x17d,0x177,0x180,0x17a,0x180,0x17a,0x180,0x17a,0x17d,0x177,0x180,0x17a, +0x180,0x17a,0x180,0x17a,0x17d,0x177,0x180,0x17a,0x6f6,0x6f0,0x180,0x17a,0x180,0x17a,0x180,0x17a, +0x180,0x17a,0xa95,0xa92,0x180,0x17a,0xb97,0xb94,0xb97,0xb94,0xb97,0xb94,0x8d6,0x8d3,0x8d6,0x8d3, +0x8d6,0x8d3,0x8d6,0x8d3,0x8d6,0x8d3,0x8d6,0x8d3,0x8d6,0x8d3,0x8d6,0x8d3,0xb97,0xb94,0xb97,0xb94, +0xc7b,0xc78,0xc7b,0xc78,0xc7b,0xc78,0xc7b,0xc78,0xc7b,0xc78,0xc7b,0xc78,0xc7b,0xc78,0xc7b,0xc78, +0xdfe,0xdfb,0xfc0,0xfbd,0x1191,0x118e,0x118b,0x1188,0x118b,0x1188,0x1191,0x118e,0,0x14d,0x14d,0x14d, +0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d, +0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,0,0,0x150,0x13e,0x13e,0x13e,0x144,0x13e,0x141, +0x1557,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a, +0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a, +0x14a,0x14a,0x14a,0x147,0x1557,0x2b5,0x6e4,0,0,0x1182,0x1182,0x108c,0,0x69f,0x69f,0x69f, +0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0xb58,0x69f, +0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x594,0x594,0x594,0x594, +0x59a,0x594,0x594,0x594,0x594,0x594,0xc09,0x594,0x594,0x594,0x1e0,0x594,0x1d7,0x594,0x594,0x1e3, +0x6a2,0xb5b,0xab9,0xb5e,0,0,0,0,0,0,0,0,0x1f2,0x1f2,0x1f2,0x1f2, +0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2, +0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0,0,0,0,0x1563,0x1f2,0x1f2,0x1f2,0x1dd, +0x1da,0,0,0,0,0,0,0,0,0,0,0,0x97e,0x97e,0x97e,0x97e, +0x1089,0x1179,0xc63,0xc63,0xc63,0xc60,0xc60,0xa6e,0x297,0x978,0x975,0x975,0xa20,0xa20,0xa20,0xa20, +0xa20,0xa20,0xd92,0xd92,0xd92,0xd92,0xd92,0x294,0x114c,0x174c,0xa74,0x29a,0xfb4,0x132,0x135,0x135, +0x135,0x135,0x135,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132, +0x132,0x132,0x132,0x132,0x132,0x132,0x132,0xc66,0xc66,0xc66,0xc66,0xc66,0x29d,0x132,0x132,0x132, +0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x5d0,0x5d0,0x5d0,0x5d0,0x5d0,0x5d0,0x5d0,0x5d0,0x843, +0x843,0x843,0xa20,0xa26,0xa23,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0x104a,0x2b8,0x2b8,0x2b8,0x2b8, +0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x117,0x114,0x111,0x10e,0x8cd,0x8cd,0x5cd,0x132,0x132,0x13b, +0x132,0x123,0x123,0x123,0x123,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132, +0x132,0x132,0x132,0x132,0x132,0x132,0x120,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132, +0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x120,0x132,0x132,0x132,0x132,0x132,0x132, +0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132, +0x6e1,0x6e1,0x132,0x132,0x132,0x132,0x132,0x6e1,0x135,0x132,0x135,0x132,0x132,0x132,0x132,0x132, +0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x6e1,0x132,0x132,0x132,0x135,0x2bb,0x132,0x570,0x570, +0x570,0x570,0x570,0x570,0x570,0x108,0x10e,0x573,0x573,0x570,0x570,0x570,0x570,0x138,0x138,0x570, +0x570,0x10e,0x573,0x573,0x573,0x570,0x97b,0x97b,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a, +0x11a,0x11a,0x6e1,0x6e1,0x6e1,0x6de,0x6de,0x97b,0x7a7,0x7a7,0x7a7,0x7a1,0x7a1,0x7a1,0x7a1,0x7a1, +0x7a1,0x7a1,0x7a1,0x79e,0x7a1,0x79e,0,0x7aa,0x7a4,0x831,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4, +0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x7a4, +0x7a4,0x7a4,0x7a4,0x7a4,0x7a4,0x9c0,0x9c0,0x9c0,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837, +0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x834,0x834,0x834,0x834,0x834,0x834,0x834,0x834, +0x834,0x834,0x834,0,0,0x9c0,0x9c0,0x9c0,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71, +0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71, +0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66, +0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad, +0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad, +0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x7ad,0x83a,0x83a, +0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x8f1,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3, +0xbd3,0xbd3,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6, +0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6, +0xbd9,0xbd9,0xbd9,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xbdc,0xbdc,0xbcd,0xbcd, +0xbd0,0xbe2,0xbdf,0,0,0x15f0,0x157b,0x157b,0xf78,0xf78,0xf78,0xf78,0xea9,0xf78,0xf78,0xf78, +0xea9,0xf78,0xf78,0xf78,0xf78,0xf75,0,0,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea3,0xeac, +0xea6,0xeac,0xea6,0xea6,0xea6,0xeac,0xeac,0,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b, +0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b,0x100b, +0x100b,0x1068,0x1068,0x1068,0,0,0x1008,0,0x14c7,0x14c7,0x14c7,0x14c7,0x14c7,0x14c7,0x14c7,0x14c7, +0x14c7,0x14c7,0x14c7,0,0,0,0,0,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746, +0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1740,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0, +0x174f,0x174f,0,0,0,0,0,0x18ea,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1, +0x1185,0x576,0x159,0x159,0,0x15f,0x15f,0x15f,0x15f,0x15f,0x15f,0x15f,0x15f,0,0,0x15f, +0x15f,0,0,0x15f,0x15f,0x546,0x546,0x546,0x546,0x546,0x546,0x546,0x546,0x546,0x546,0x546, +0x546,0,0x546,0x546,0x546,0x546,0x546,0x546,0x546,0,0x546,0,0,0,0x546,0x546, +0x546,0x546,0,0,0x579,0x981,0x576,0x159,0x159,0x576,0x576,0x576,0x576,0,0,0x159, +0x159,0,0,0x15c,0x15c,0x64b,0xa77,0,0,0,0,0,0,0,0,0x576, +0,0,0,0,0x543,0x543,0,0x543,0x15f,0x15f,0x576,0x576,0,0,0x2c1,0x2c1, +0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x546,0x546,0x156,0x156,0x153,0x153,0x153,0x153, +0x153,0x156,0x153,0xdf2,0x14c1,0x14be,0x15e7,0,0,0xa2c,0x588,0x9a8,0,0x1cb,0x1cb,0x1cb, +0x1cb,0x1cb,0x1cb,0,0,0,0,0x1cb,0x1cb,0,0,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb, +0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb, +0x1cb,0,0x1cb,0x1c8,0,0x1cb,0x1c8,0,0x1cb,0x1cb,0,0,0x58b,0,0x1c5,0x1c5, +0x1c5,0x588,0x588,0,0,0,0,0x588,0x588,0,0,0x588,0x588,0x591,0,0, +0,0xd9e,0,0,0,0,0,0,0,0x1c8,0x1c8,0x1c8,0x1cb,0,0x1c8,0, +0,0,0,0,0,0,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4, +0x588,0x58e,0x1cb,0x1cb,0x1cb,0xd9e,0x1560,0,0,0,0,0,0,0,0,0, +0,0x582,0x582,0x1bf,0,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x9a5,0x1c2,0,0x1c2, +0x1c2,0x1c2,0,0x1c2,0x1c2,0x552,0x552,0x552,0x552,0x552,0x552,0x552,0x552,0x552,0x552,0x552, +0x552,0,0x552,0x552,0x552,0x552,0x552,0x552,0x552,0,0x552,0x552,0,0x552,0x552,0x552, +0x552,0x552,0,0,0x585,0x1c2,0x1bf,0x1bf,0x1bf,0x582,0x582,0x582,0x582,0x582,0,0x582, +0x582,0x1bf,0,0x1bf,0x1bf,0x651,0,0,0x1c2,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1c2,0x9a5,0xa29,0xa29,0,0,0x2c7,0x2c7, +0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x109e,0x9a2,0,0,0,0,0,0, +0,0x13d7,0x1518,0x151e,0x1518,0x151b,0x151b,0x151b,0,0x5af,0x255,0x255,0,0x25b,0x25b,0x25b, +0x25b,0x25b,0x25b,0x25b,0x25b,0,0,0x25b,0x25b,0,0,0x25b,0x25b,0x55b,0x55b,0x55b, +0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b, +0x55b,0,0x55b,0x55b,0,0xa1d,0x55b,0x55b,0x55b,0x55b,0,0,0x5b2,0x25b,0x5af,0x5af, +0x255,0x5af,0x5af,0x5af,0xdad,0,0,0x255,0x258,0,0,0x258,0x258,0x657,0,0, +0,0,0,0,0,0x170d,0x5af,0x5af,0,0,0,0,0x558,0x558,0,0x55b, +0x25b,0x25b,0xdad,0xdad,0,0,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252, +0x24f,0xa1d,0xfde,0xfde,0xfde,0xfde,0xfde,0xfde,0,0,0,0,0,0,0,0, +0,0,0x5b5,0x264,0,0x264,0x264,0x264,0x264,0x264,0x264,0,0,0,0x264,0x264, +0x264,0,0x264,0x264,0x267,0x264,0,0,0,0x264,0x264,0,0x264,0,0x264,0x264, +0,0,0,0x264,0x264,0,0,0,0x264,0x264,0x264,0,0,0,0x264,0x264, +0x264,0x264,0x264,0x264,0x264,0x264,0xacb,0x264,0x264,0x264,0,0,0,0,0x5b5,0x25e, +0x5b5,0x25e,0x25e,0,0,0,0x25e,0x25e,0x25e,0,0x261,0x261,0x261,0x5b8,0,0, +0xcd2,0,0,0,0,0,0,0x5b5,0,0,0,0,0,0,0,0, +0,0,0xb19,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2ca,0x2ca,0x2ca,0x9fc, +0x9c3,0x9c3,0x9c3,0x9c3,0x9c3,0x9c6,0x9c3,0,0,0,0,0,0x12f0,0x26d,0x26d,0x26d, +0x15ed,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0,0x270,0x270,0x270,0,0x270,0x270, +0x270,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x12cf,0x55e,0x55e,0x55e,0x55e,0x55e,0,0, +0x17c7,0xcd8,0x5bb,0x5bb,0x5bb,0x26d,0x26d,0x26d,0x26d,0,0x5bb,0x5bb,0x5be,0,0x5bb,0x5bb, +0x5bb,0x65a,0,0,0,0,0,0,0,0x5bb,0x5bb,0,0xd7a,0xd7a,0x13da,0, +0,0x176d,0,0,0x270,0x270,0xdb0,0xdb0,0,0,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a, +0x26a,0x26a,0x26a,0x26a,0,0,0,0,0,0,0,0x1635,0xcd5,0xcd5,0xcd5,0xcd5, +0xcd5,0xcd5,0xcd5,0xcd5,0x1416,0x12e4,0x1f5,0x1f5,0x1566,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb, +0x1fb,0,0x1fb,0x1fb,0x1fb,0,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb, +0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb, +0,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0,0,0xa2f,0x9ab,0x1f5,0x59d,0x5a0,0x1f5,0x59d,0x1f5, +0x1f5,0,0x59d,0x5a0,0x5a0,0,0x5a0,0x5a0,0x59d,0x5a3,0,0,0,0,0,0, +0,0x59d,0x59d,0,0,0,0,0,0,0x1755,0x1f8,0,0x1fb,0x1fb,0xc0c,0xc0c, +0,0,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0,0,0xb9d,0xb9d,0x17ee, +0,0,0,0,0,0,0,0,0,0,0,0,0x1521,0x12e7,0x246,0x246, +0x16c5,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0,0x24c,0x24c,0x24c,0,0x24c,0x24c, +0x24c,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x246,0x5ac,0x5ac,0x5ac, +0xda1,0,0x246,0x246,0x246,0,0x249,0x249,0x249,0x654,0xfdb,0x141c,0,0,0,0, +0x141f,0x141f,0x141f,0x5ac,0x141c,0x141c,0x141c,0x141c,0x141c,0x141c,0x141c,0x1377,0x24c,0x24c,0xda1,0xda1, +0,0,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0xcb4,0xcb4,0xcb4,0xcb4, +0xcb4,0xcb4,0x141c,0x141c,0x141c,0xcb7,0xcba,0xcba,0xcba,0xcba,0xcba,0xcba,0,0x1710,0x792,0x792, +0,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x798,0x798,0x79b,0x79b,0x79b, +0x79b,0x79b,0x79b,0,0,0,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x798,0x79b, +0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0,0x79b,0x79b,0x79b,0x79b,0x79b, +0x79b,0x79b,0x79b,0x79b,0,0x79b,0,0,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0, +0,0,0x82e,0,0,0,0,0x82b,0x792,0x792,0x82b,0x82b,0x82b,0,0x82b,0, +0x792,0x792,0x795,0x792,0x795,0x795,0x795,0x828,0,0,0,0,0,0,0x11c4,0x11c4, +0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0,0,0x792,0x78f,0x78c,0,0,0, +0,0,0,0,0,0,0,0,0,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f, +0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f, +0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x5c1,0x27f,0x27c,0x5c1,0x5c1,0x5c1,0x5c1, +0x5c1,0x5c1,0x5c7,0,0,0,0,0x2a,0x285,0x285,0x285,0x285,0x285,0x27f,0x282,0x5c4, +0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c1,0x5c4,0x273,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279, +0x279,0x279,0x276,0x276,0,0,0,0,0,0x207,0x207,0,0x207,0,0x161d,0x207, +0x207,0x161d,0x207,0,0x161d,0x207,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x207,0x207,0x207,0x207, +0x161d,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x161d,0x207,0x207,0x207,0,0x207,0,0x207, +0x161d,0x161d,0x207,0x207,0x161d,0x207,0x207,0x207,0x207,0x5a6,0x207,0x201,0x5a6,0x5a6,0x5a6,0x5a6, +0x5a6,0x5a6,0x168f,0x5a6,0x5a6,0x207,0,0,0x20d,0x20d,0x20d,0x20d,0x20d,0,0x20a,0, +0x5a9,0x5a9,0x5a9,0x5a9,0x5a9,0x5a6,0x1833,0,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe, +0x1fe,0x1fe,0,0,0x204,0x204,0x10a1,0x10a1,0x68d,0x68d,0x68d,0x68a,0x68d,0x68d,0x68d,0x68d, +0,0x68d,0x68d,0x68d,0x68d,0x68a,0x68d,0x68d,0x68d,0x68d,0x68a,0x68d,0x68d,0x68d,0x68d,0x68a, +0x68d,0x68d,0x68d,0x68d,0x68a,0x68d,0x68d,0x68d,0x68d,0x68d,0x68d,0x68d,0x68d,0x68d,0x68d,0x68d, +0x68d,0x68a,0x7b6,0xce4,0xce4,0,0,0,0,0x6a8,0x6a8,0x6a5,0x6a8,0x6a5,0x6a5,0x6ba, +0x6a5,0x6ba,0x6a8,0x6a8,0x6a8,0x6a8,0x6a8,0x684,0x6a8,0x6a5,0x6b4,0x6b4,0x6b7,0x666,0x6b1,0x6b1, +0x68d,0x68d,0x68d,0x68d,0xfe4,0x1053,0x1053,0x1053,0x6a8,0x6a8,0x6a8,0x6a5,0x6a8,0x6a8,0x83d,0x6a8, +0,0x6a8,0x6a8,0x6a8,0x6a8,0x6a5,0x6a8,0x6a8,0x6a8,0x6a8,0x6a5,0x6a8,0x6a8,0x6a8,0x6a8,0x6a5, +0x6a8,0x6a8,0x6a8,0x6a8,0x6a5,0x6a8,0x83d,0x83d,0x83d,0x6a8,0x6a8,0x6a8,0x6a8,0x6a8,0x6a8,0x6a8, +0x83d,0x6a5,0x83d,0x83d,0x83d,0,0x7b3,0x7b3,0x7b0,0x7b0,0x7b0,0x7b0,0x7b0,0x7b0,0x840,0x7b0, +0x7b0,0x7b0,0x7b0,0x7b0,0x7b0,0,0xcdb,0x7b0,0xace,0xace,0xcde,0xce1,0xcdb,0xddd,0xddd,0xddd, +0xddd,0xfe1,0xfe1,0,0,0,0,0,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0,0x109b, +0,0,0,0,0,0x109b,0,0,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192, +0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0xa9b, +0x705,0,0x705,0x705,0x705,0x705,0,0,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0, +0x705,0,0x705,0x705,0x705,0x705,0,0,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0xa9b, +0x705,0,0x705,0x705,0x705,0x705,0,0,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705, +0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0xa9b,0x705,0,0x705,0x705, +0x705,0x705,0,0,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0,0x705,0,0x705,0x705, +0x705,0x705,0,0,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0xa9b,0x705,0x705,0x705,0x705, +0x705,0x705,0x705,0,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705, +0x705,0x705,0x705,0xa9b,0x705,0,0x705,0x705,0x705,0x705,0,0,0x705,0x705,0x705,0x705, +0x705,0x705,0x705,0xa9b,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705, +0x705,0x705,0x705,0x705,0x705,0x705,0x705,0,0,0x1050,0x1050,0xb52,0xa98,0x6ff,0x708,0x6fc, +0x6fc,0x6fc,0x6fc,0x708,0x708,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x6f9,0x6f9, +0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0,0,0,0xa9b,0xa9b,0xa9b,0xa9b, +0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa98,0xa98,0xa98,0xa98, +0xa98,0xa98,0xa98,0xa98,0xa98,0xa98,0,0,0,0,0,0,0x6ea,0x6ea,0x6ea,0x6ea, 0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea, -0x6ea,0x6ea,0x6ea,0x6ea,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e7,0x6e4,0x6e4, -0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4,0x6e4, -0xa53,0x6e7,0x3a5,0x3a8,0x3a5,0x3a5,0x3a5,0x3a8,0x3a5,0x3a5,0x3a5,0x3a5,0x3a8,0xa53,0x3a8,0x3a5, -0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399, -0x39f,0x399,0x39f,0x399,0x39f,0x399,0x3a2,0x39c,0x39f,0x399,0x39f,0x399,0x39f,0x399,0x39f,0x399, -0x39f,0x399,0x396,0x98d,0x990,0x972,0x972,0x11e2,0xa4d,0xa4d,0xc1b,0xc18,0xa56,0xa50,0xa56,0xa50, -0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5, -0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5, -0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5,0x3ab,0x3a5, -0x3ab,0x3ae,0x3a8,0x3ab,0x3a5,0xc1b,0xc18,0x3ab,0x3a5,0xc1b,0xc18,0x3ab,0x3a5,0xc1b,0xc18,0xf57, -0x3ae,0x3a8,0x3ae,0x3a8,0x3ab,0x3a5,0x3ae,0x3a8,0x3ab,0x3a5,0x3ae,0x3a8,0x3ae,0x3a8,0x3ae,0x3a8, -0x3ab,0x3a5,0x3ae,0x3a8,0x3ae,0x3a8,0x3ae,0x3a8,0x3ab,0x3a5,0x3ae,0x3a8,0xa59,0xa53,0x3ae,0x3a8, -0x3ae,0x3a8,0x3ae,0x3a8,0x3ae,0x3a8,0xe10,0xe0d,0x3ae,0x3a8,0xf5a,0xf57,0xf5a,0xf57,0xf5a,0xf57, -0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e,0xc81,0xc7e, -0xf87,0xf84,0xf87,0xf84,0x1092,0x108f,0x1092,0x108f,0x1092,0x108f,0x1092,0x108f,0x1092,0x108f,0x1092,0x108f, -0x1092,0x108f,0x1092,0x108f,0x121b,0x1218,0x13f8,0x13f5,0x15c6,0x15c3,0x15c0,0x15bd,0x15c0,0x15bd,0x15c6,0x15c3, -0xc,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0, -0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0x3c0,0xc,0xc,0x3c3,0x3b1,0x3b1, -0x3b1,0x3b7,0x3b1,0x3b4,0x19d7,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd, -0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd, -0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3ba,0x19d7,0x3c6,0xa5c,0xc,0xc,0x158d,0x158d,0x14a6, -0xf,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4, -0x9b4,0x9b4,0xe13,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4,0x9b4, -0x3c9,0x3c9,0x3c9,0x3c9,0x3cc,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0xf5d,0x3c9,0x3c9,0x3c9,0x3d8,0x3c9, -0x3cf,0x3c9,0x3c9,0x3db,0x9b7,0xe16,0xe1c,0xe19,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, -0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de, -0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0xf,0xf,0xf,0xf,0x19da, -0x3de,0x3de,0x3de,0x3d5,0x3d2,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, -0xd2c,0xd2c,0xd2c,0xd2c,0x14a9,0x1590,0x101a,0x101a,0x101a,0x1017,0x1017,0xe22,0x8f7,0xd26,0xd23,0xd23, -0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0x1014,0x1014,0x1014,0x1014,0x1014,0x8f4,0x1587,0x1bfc,0xe25,0x8fa, -0x13bf,0x3ff,0x402,0x402,0x402,0x402,0x402,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff, -0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x101d,0x101d,0x101d,0x101d,0x101d, -0x8fd,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x978,0x978,0x978,0x978,0x978, -0x978,0x978,0x978,0xbbb,0xbbb,0xbbb,0xd1a,0xd20,0xd1d,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0x13bc, -0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x3f3,0x3f0,0x3ed,0x3ea,0xc1e,0xc1e, -0x975,0x3ff,0x3ff,0x408,0x3ff,0x3fc,0x3fc,0x3fc,0x3fc,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff, -0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3f9,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff, -0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3f9,0x3ff,0x3ff, -0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff, -0x3ff,0x3ff,0x3ff,0x3ff,0xa62,0xa62,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0xa62,0x402,0x3ff,0x402,0x3ff, -0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0x3ff,0xa62,0x3ff,0x3ff,0x3ff,0x402, -0x996,0x3ff,0x3e4,0x3e4,0x3e4,0x3e4,0x3e4,0x3e4,0x3e4,0x3e1,0x3ea,0x3e7,0x3e7,0x3e4,0x3e4,0x3e4, -0x3e4,0x405,0x405,0x3e4,0x3e4,0x3ea,0x3e7,0x3e7,0x3e7,0x3e4,0xd29,0xd29,0x3f6,0x3f6,0x3f6,0x3f6, -0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0xa62,0xa62,0xa62,0xa5f,0xa5f,0xd29,0xa77,0xa77,0xa77,0xa71, -0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa6e,0xa71,0xa6e,0x12,0xa7a,0xa74,0xa65,0xa74,0xa74, -0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74, -0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xd2f,0xd2f,0xd2f,0xa6b,0xa6b,0xa6b,0xa6b, -0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa68,0xa68,0xa68,0xa68, -0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0x12,0x12,0xd2f,0xd2f,0xd2f,0xe85,0xe85,0xe85,0xe85, -0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85, -0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0xe85,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4, -0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0xa80,0xa80,0xa80,0xa80, -0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80, -0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80,0xa80, -0xa80,0xa80,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xc21,0x15,0x15, -0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0xf9f,0xf9f,0xf9f,0xf9f, -0xf9f,0xf9f,0xf9f,0xf9f,0xf9f,0xf9f,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2, -0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2, -0xfa2,0xfa2,0xfa2,0xfa2,0xfa5,0xfa5,0xfa5,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96, -0xfa8,0xfa8,0xf99,0xf99,0xf9c,0xfae,0xfab,0xff,0xff,0x19fe,0x1a01,0x1a01,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xb94,0xb94,0xb97,0xb97, -0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0x1d40,0x1d40,0x1d3d,0x1d3d,0x1dd,0x1dd,0x1dd,0x1dd, -0x1dd,0x1dd,0x1dd,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1e9,0x1e9,0x1e9,0x1e9, -0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1311,0x1311,0x1311,0x1311, -0x1311,0x1311,0x1311,0x1311,0x1311,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1cda,0x1cd7,0x1bf,0x1bf, -0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1563,0x1563,0x1563,0x1563, -0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1c59,0x1c59,0x1c59,0x1c59, -0x1c59,0x1c59,0x1c59,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x246,0x246,0x246,0x246, -0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1a4f,0x1a4f,0x1a4f,0x1a4f, -0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1bc0,0x288,0x288,0x288, -0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x183f,0x183f,0x183f,0x183f, -0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1c6b,0x1c6b,0x1c6b,0x1c6b, -0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x172b,0x172b,0x172b,0x172b, -0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1cc2,0x1cc2,0x1cc2,0x1cc2, -0x29d,0x1cc2,0x1cc2,0x1cc2,0x1cc2,0x1cc2,0x1cc2,0x1cc2,0x29d,0x1cc2,0x1cc2,0x29d,0x17a3,0x17a3,0x17a3,0x17a3, -0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1c9e,0x1c9e,0x1c9e,0x1c9e, -0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0xe7c,0xe7c,0xe79,0xe79, -0xe79,0xe7c,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x210,0x1857,0x1857,0x1857, -0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x2b8,0x2b8,0x2b8,0x2b8, -0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x1cf5,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1b0c,0x1b0c,0x1b0c,0x1b0c, -0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x26d,0x26d,0x26d,0x26d,0x1b0f,0x1b09,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1c92,0x1c92,0x1c92,0x1c92, -0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x1d25,0x1d25,0x1d25,0x1d25, -0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x252,0x1a64,0x1a64,0x1a64, -0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x270,0x270,0x270,0x270, -0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0,0,0,0, +0x6ea,0x1365,0,0,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0,0,0x783,0x786,0x786,0x786, +0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786, +0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x780,0x77d,0,0,0,0x789,0x789,0x789,0x789, +0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x7c5,0x7c5,0x7c5,0x789,0x789,0x789,0x11be,0x11be,0x11be, +0x11be,0x11be,0x11be,0x11be,0x11be,0,0,0,0,0,0,0,0x8f4,0x8f4,0x8f4,0x8f4, +0x8f4,0x8f4,0x8f4,0x8f4,0x8f4,0x8f4,0x8f4,0x8f4,0x8f4,0x1773,0x8f4,0x8f4,0x8f4,0x8f4,0x945,0x945, +0x948,0x17ca,0,0,0,0,0,0,0,0,0,0x1773,0x8f7,0x8f7,0x8f7,0x8f7, +0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x8f7,0x94b,0x94b, +0x94e,0x900,0x900,0,0,0,0,0,0,0,0,0,0x8fa,0x8fa,0x8fa,0x8fa, +0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x951,0x951, +0,0,0,0,0,0,0,0,0,0,0,0,0x8fd,0x8fd,0x8fd,0x8fd, +0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0,0x8fd,0x8fd,0x8fd,0,0x954,0x954, +0,0,0,0,0,0,0,0,0,0,0,0,0x726,0x726,0x726,0x726, +0x726,0x726,0x801,0x726,0x726,0x80d,0x80d,0x80d,0x80d,0x80d,0x807,0x807,0x80d,0x80a,0x810,0x804, +0x732,0x732,0x720,0x72c,0x71a,0x714,0x71d,0x717,0x72c,0xa32,0,0,0x723,0x723,0x723,0x723, +0x723,0x723,0x723,0x723,0x723,0x723,0,0,0,0,0,0,0x9ae,0x9ae,0x9ae,0x9ae, +0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0,0,0,0,0,0,0x750,0x750,0x7cb,0x7ce, +0x756,0x7c8,0x753,0x750,0x759,0x768,0x75c,0x81c,0x81c,0x81c,0x74d,0x17c4,0x75f,0x75f,0x75f,0x75f, +0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0,0,0,0,0,0,0x762,0x762,0x762,0x762, +0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762, +0x762,0x762,0x762,0x762,0x1572,0,0,0,0,0,0,0,0x762,0x762,0x762,0x762, +0x762,0x762,0x762,0x762,0x762,0x816,0xcbd,0,0,0,0,0,0xe25,0xe25,0xe25,0xe25, +0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25, +0xe25,0xe25,0,0,0,0,0,0,0,0,0,0,0x9d5,0x9d5,0x9d5,0x9d5, +0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5, +0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0x11c7,0x11c7,0,0xa35,0xa35,0xa35,0x9d2, +0x9d2,0x9d2,0x9d2,0xa35,0xa35,0x9d2,0x9d2,0x9d2,0,0,0,0,0x9d2,0x9d2,0xa35,0x9d2, +0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0xa38,0xa38,0xa38,0,0,0,0,0x9cc,0,0,0, +0x9d8,0x9d8,0x9cf,0x9cf,0x9cf,0x9cf,0x9cf,0x9cf,0x9cf,0x9cf,0x9cf,0x9cf,0x9e7,0x9e7,0x9e7,0x9e7, +0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0,0, +0x9e7,0x9e7,0x9e7,0x9e7,0x9e7,0,0,0,0,0,0,0,0,0,0,0, +0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xe2b,0xe2b,0,0,0,0, +0xafb,0xafb,0xafb,0xafb,0xafb,0xafe,0xafe,0xafe,0xafb,0xafb,0xafe,0xafb,0xafb,0xafb,0xafb,0xafb, +0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0,0,0,0,0,0,0xaf8,0xaf8,0xaf8,0xaf8, +0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xe28,0,0,0,0xaf5,0xaf5,0xad7,0xad7,0xad7,0xad7, +0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7, +0xad7,0xad7,0xad7,0xb61,0xb61,0xad4,0xad4,0xb61,0,0,0xad1,0xad1,0xe5b,0xe5b,0xe5b,0xe5b, +0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, +0xe5b,0xe58,0xf5a,0xe58,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0,0xf63,0xe55,0xf5a,0xe55, +0xe55,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xf5a, +0xf5a,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0,0,0xf5d,0xe52,0xe52,0xe52,0xe52, +0xe52,0xe52,0xe52,0xe52,0xe52,0xe52,0,0,0,0,0,0,0xe52,0xe52,0xe52,0xe52, +0xe52,0xe52,0xe52,0xe52,0xe52,0xe52,0,0,0,0,0,0,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe5e,0xe61,0xe61,0xe61,0xe61,0xe4f,0xe4f,0,0,0x12d8,0x12d8,0x12d8,0x12d8, +0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d2,0x170a,0x170a,0x17be,0x17be,0x17be, +0x17be,0x17be,0x17be,0x17be,0x17be,0x17be,0x17be,0x17be,0x17b8,0x17b8,0x17b8,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xbc1,0xbc1,0xc0f,0xc12, +0xc1b,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0x177c,0,0x1872,0x1872,0xbbb,0xbbb,0xbbb,0xbbb, +0xbbb,0xbbb,0xbbb,0xbbb,0xbbb,0xbbb,0xbca,0xbca,0xbb5,0xbb8,0xbca,0xbca,0xff0,0xff0,0xff0,0xff0, +0xff0,0xff0,0x105c,0xfed,0x1059,0x1059,0xfed,0xfed,0xfed,0x1059,0xfed,0x1059,0x1059,0x1059,0x105f,0x105f, +0,0,0,0,0,0,0,0,0xfea,0xfea,0xfea,0xfea,0xd0b,0xd0b,0xd0b,0xd0b, +0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc, +0xd08,0xd08,0xdc2,0xdbf,0,0,0,0xd0e,0xd0e,0xd02,0xd02,0xd02,0xd05,0xd05,0xd05,0xd05, +0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0,0,0,0xd0b,0xd0b,0xd0b,0xd32,0xd32,0xd32,0xd32, +0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0x1410,0x1410,0x1410,0x1410, +0x1410,0x1410,0x1410,0x1410,0x1410,0x1866,0x1863,0,0,0,0,0,0x155d,0x155d,0x155d,0x155d, +0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d, +0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0,0,0x155d,0x155d,0x155d,0x10bc,0x10bc,0x10bc,0x10bc, +0x10bc,0x10bc,0x10bc,0x10bc,0,0,0,0,0,0,0,0,0xf8a,0xf87,0xf8a,0xedf, +0xf87,0xf8d,0xf8d,0xf90,0xf8d,0xf90,0xf93,0xf87,0xf90,0xf90,0xf87,0xf87,0xf90,0xee2,0xf87,0xf87, +0xf87,0xf87,0xf87,0xf87,0xf87,0xee8,0xee5,0xedc,0xedc,0xf8d,0xedc,0xedc,0xedc,0xedc,0xeeb,0x1107, +0x1143,0x1104,0x1104,0x14fd,0x1344,0x1344,0x1674,0,0,0,0,0,0x1b3,0x1b3,0x1b3,0x1b3, +0x1b3,0x1b3,0x1b3,0x1b3,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b3,0x1b3,0x1b3,0x1b3, +0x1b3,0x1b3,0,0,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0,0,0x1b3,0x1b3,0x1b3,0x1b3, +0x1b3,0x1b3,0x1b3,0x1b3,0,0x1b6,0,0x1b6,0,0x1b6,0,0x1b6,0x1b3,0x1b3,0x1b3,0x1b3, +0x1b3,0x1b3,0x1b3,0x1b3,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b3,0x1a7,0x1b3,0x1a7, +0x1b3,0x1a7,0x1b3,0x1a7,0x1b3,0x1a7,0x1b3,0x1a7,0x1b3,0x1a7,0,0,0x1b3,0x1b3,0x1b3,0x1b3, +0x1b3,0x1b3,0x1b3,0x1b3,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b3,0x1b3,0x1b3,0x1b3, +0x1b3,0,0x1b3,0x1b3,0x1b6,0x1b6,0x1b6,0x1ad,0x1b6,0x198,0x1a7,0x198,0x198,0x195,0x1b3,0x1b3, +0x1b3,0,0x1b3,0x1b3,0x1b6,0x1ad,0x1b6,0x1ad,0x1b6,0x195,0x195,0x195,0x1b3,0x1b3,0x1b3,0x1a7, +0,0,0x1b3,0x1b3,0x1b6,0x1b6,0x1b6,0x1ad,0,0x195,0x195,0x195,0x1b3,0x1b3,0x1b3,0x1a7, +0x1b3,0x1b3,0x1b3,0x1b3,0x1b6,0x1b6,0x1b6,0x1ad,0x1b6,0x195,0x195,0x195,0,0,0x1b3,0x1b3, +0x1b3,0,0x1b3,0x1b3,0x1b6,0x1ad,0x1b6,0x1ad,0x1b6,0x19b,0x198,0,0x88e,0x891,0x891,0x891, +0xc21,9,0x1149,0x1149,0x1149,0x1149,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x3f,0x8ee,0,0, +0x2e8,0x3f,0x3f,0x3f,0x3f,0x3f,0x57,0x69,0x57,0x63,0x5d,0x366,0x3c,0x2e5,0x2e5,0x2e5, +0x2e5,0x3c,0x3c,0x3c,0x3c,0x3c,0x54,0x66,0x54,0x60,0x5a,0,0xac5,0xac5,0xac5,0xac5, +0xac5,0xfd5,0xfd5,0xfd5,0xfd5,0xfd5,0xfd5,0xfd5,0xfd5,0,0,0,0x561,0x564,0x7fb,0x7fb, +0x93c,0x942,0x942,0x93f,0x93f,0x93f,0x93f,0xb4c,0xc03,0xc03,0xc03,0xc03,0xdd4,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x21f,0x21f,0x21f,0x73e, +0xba0,0xc93,0xc93,0xc93,0xc93,0xf0c,0x1353,0x1353,0,0,0,0,0x336,0x336,0x336,0x336, +0x336,0x336,0x336,0x336,0x336,0x336,0xd2,0xd2,0xcf,0xcf,0xcf,0xcf,0xa86,0xa83,0xa86,0xa83, +0xa83,0xa7a,0xa7a,0xa7a,0xa7a,0xa7a,0xa7a,0xdf8,0xdf5,0xdf8,0xdf5,0xf42,0xf45,0xf45,0x1092,0x108f, +0,0,0,0,0,0xa8c,0xa89,0xa89,0xa7d,0xa7a,0xa80,0xa7d,0xa9e,0xa9e,0xa9e,0xa9e, +0xa9e,0xa9e,0,0x1095,0,0,0,0,0,0x1095,0,0,0xb01,0xb01,0xb01,0xb01, +0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0x10ad,0x10ad, +0,0,0,0,0,0,0,0xb04,0xfe7,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x1056,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b, +0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0, +0,0,0,0,0,0,0,0,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0, +0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0, +0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, +0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, +0x7dd,0x7dd,0,0x7dd,0x7dd,0x7dd,0x7dd,0x7e0,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, +0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7e0,0,0,0,0, +0,0,0,0,0,0,0,0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0, +0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x7f2,0x7f2,0x7f5,0x7f5,0x7f2,0x7f2,0x7f2,0x7f2,0x7f2,0x7f2,0x7f2,0x7f2,0x1851,0x1851,0x184e,0x184e, +0,0x4d1,0x4cb,0x4d1,0x4cb,0x4d1,0x4cb,0x4d1,0x4cb,0x4d1,0x4cb,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb, +0x4ce,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb, +0x4cb,0x4cb,0x4cb,0x4d1,0x4cb,0x4d1,0x4cb,0x4d1,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4d1,0x4cb, +0x4cb,0x4cb,0x4cb,0x4cb,0x4ce,0x924,0x924,0,0,0x645,0x645,0x519,0x519,0x4d4,0x4d7,0x921, +0,0,0,0,0,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7, +0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7,0x4a7, +0x4a7,0xd71,0x1506,0x15db,0,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2, +0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0,0x525,0x525,0x531,0x531,0x531,0x531,0x531,0x531, +0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0xd77,0xd77,0xd77,0xd77,0x18e7,0x18e7,0,0, +0,0,0,0,0,0,0,0x1851,0x927,0x927,0x927,0x927,0x927,0x927,0x927,0x927, +0x927,0x927,0x927,0x927,0x927,0x927,0x927,0x927,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9, +0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9, +0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0xa17,0xa17,0,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec, +0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0,0,0,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9, +0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x92d,0x7e9,0x7e9,0x7e9,0x92d,0x7e9,0, +0,0,0,0,0,0,0,0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0, +0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xd14,0xd14,0xd14,0xd14,0xd14,0xd14,0xd14,0xd14, +0xd14,0xd14,0xd1a,0xd1a,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7, +0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xf84,0xf84,0xec1,0xeca,0xec4,0xec4,0xec4,0xeca, +0,0,0,0,0,0,0,0,0x1761,0x175b,0x1629,0x1626,0x1629,0x1629,0x1629,0x16bf, +0x16bc,0x16bf,0x16bc,0x186c,0x186c,0x1869,0,0,0x1761,0x175b,0,0x175b,0,0x175b,0x1761,0x175b, +0x1761,0x175b,0x186c,0x1869,0x186c,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0x1758,0x1758,0x1758,0x16b6,0x16b3,0x11a3, +0x10aa,0x10aa,0xfd2,0xc93,0xc93,0xc93,0xc93,0xc93,0xaf2,0xaf2,0xaf2,0xaef,0xaef,0xb6d,0xb6d,0xaef, +0xaec,0xaec,0xaec,0xaec,0x1713,0,0,0,0xef1,0xef1,0xef1,0xef4,0xef4,0xef4,0xef7,0xef7, +0xefa,0xef7,0,0,0,0,0,0,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8, +0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe5,0xbe5,0xbeb,0xbeb, +0,0,0,0,0,0,0,0,0xd4d,0xd4d,0xd4d,0xd4d,0xdcb,0x148e,0,0, +0,0,0,0,0,0,0xd53,0xd53,0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xd4a, +0xd4a,0xd4a,0,0,0,0,0,0,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xdc5, +0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xd44,0xdc8,0,0,0,0, +0,0,0,0,0,0,0,0xd41,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33, +0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33,0xf33, +0xf33,0xf33,0xf33,0xf33,0xf33,0,0,0,0xf57,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe3a, +0xe46,0xe46,0xe37,0xe37,0xe37,0xe37,0,0xefd,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d, +0xe3d,0xe3d,0,0,0,0,0xe37,0xe37,0x11b2,0x11b2,0x11b2,0x11b2,0x11b2,0x12ea,0x11b8,0x11b5, +0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac, +0x11ac,0x11ac,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3, +0xcf3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xced,0xced,0xdb3,0xdb3,0xced,0xced,0xdb3,0xdb3,0, +0,0,0,0,0,0,0,0,0xcf0,0xcf0,0xcf0,0xdb3,0xcf0,0xcf0,0xcf0,0xcf0, +0xcf0,0xcf0,0xcf0,0xcf0,0xdb3,0xced,0,0,0xcea,0xcea,0xcea,0xcea,0xcea,0xcea,0xcea,0xcea, +0xcea,0xcea,0,0,0xce7,0xcf6,0xcf6,0xcf6,0xeb8,0xf81,0xeb8,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0xeb5,0xeb5,0xebb,0xeaf,0xeb2,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5, +0x10c5,0x10c5,0x10c5,0x10c2,0x1125,0x1125,0x10c2,0x10c2,0x10cb,0x10cb,0x10c5,0x10c8,0x10c8,0x10c2,0x1128,0, +0,0,0,0,0,0,0,0,0,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0, +0,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0,0,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0, +0,0,0,0,0,0,0,0,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0, +0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0xfc9,0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0, +0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x136e,0x136e,0x136e,0x136e,0x11a0,0x119a,0x1626,0x1626, +0x16b9,0x16c2,0x16a7,0x16a7,0,0,0,0,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362, +0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0xe6d,0xe6d,0xe6d,0xe67,0xe67,0xf66,0xe67,0xe67, +0xf66,0xe67,0xe67,0xe70,0xe6a,0xf69,0,0,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64, +0xe64,0xe64,0,0,0,0,0,0,0x69c,0x69c,0x69c,0x69c,0,0,0,0, +0,0,0,0,0,0,0,0,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d, +0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0,0,0,0,0xe0a, +0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a, +0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0,0,0,0, +0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0,0,0,0,0,0,0,0,0, +0,0,0,0x147,0x147,0x147,0x147,0x147,0,0,0,0,0,0x711,0x597,0x1e9, +0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1e6,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9, +0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0,0x1e9,0, +0x1e9,0x1e9,0,0x1e9,0x1e9,0,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1ec, +0x12c,0x126,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126, +0xfb1,0xfb1,0x1743,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x12c,0x12c,0x126, +0x126,0x126,0x126,0x129,0x126,0x126,0x129,0x126,0x129,0x129,0x129,0x126,0x129,0x129,0x129,0x129, +0,0,0x129,0x129,0x129,0x129,0x126,0x126,0x129,0x126,0x126,0x126,0x126,0x129,0x126,0x126, +0x126,0x126,0x126,0x129,0x129,0x129,0x126,0x126,0,0,0,0,0,0,0,0x1743, +0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879, +0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a,0x95a, +0xb1f,0xb1f,0xb2e,0xb28,0xb25,0xb31,0xb31,0xb2b,0xb1c,0xb22,0,0,0,0,0,0, +0x456,0x47a,0x477,0x47a,0x477,0x930,0x930,0xa0e,0xa08,0x459,0x459,0x459,0x459,0x48f,0x48f,0x48f, +0x47d,0x480,0x495,0,0x486,0x483,0x498,0x498,0x471,0x465,0x453,0x465,0x453,0x465,0x453,0x45c, +0x45c,0x489,0x489,0x48c,0x489,0x489,0x489,0,0x489,0x46e,0x46b,0x45c,0,0,0,0, +0x11d,0x12f,0x11d,0x8d0,0x11d,0,0x11d,0x12f,0x11d,0x12f,0x11d,0x12f,0x11d,0x12f,0x11d,0x12f, +0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c, +0x126,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x12c,0x126,0,0,0x1b, +0,0x3ed,0x3cc,0x3ba,0x3c3,0x3c0,0x3ba,0x3cf,0x3bd,0x3b7,0x3ba,0x3db,0x3d2,0x3c9,0x3ea,0x3ba, +0x3e7,0x3e7,0x3e7,0x3e7,0x3e7,0x3e7,0x3e7,0x3e7,0x3e7,0x3e7,0x3d5,0x3d8,0x3db,0x3db,0x3db,0x3ed, +0x39c,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399, +0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0x399,0, +0,0,0x399,0x399,0x399,0x399,0x399,0x399,0,0,0x399,0x399,0x399,0x399,0x399,0x399, +0,0,0x399,0x399,0x399,0x399,0x399,0x399,0,0,0x399,0x399,0x399,0,0,0, +0x3c0,0x3c3,0x3db,0x3de,0x3ba,0x3c3,0x3c3,0,0x393,0x396,0x396,0x396,0x396,0x393,0x393,0, +9,9,9,9,9,9,9,9,9,0x6c3,0x6c3,0x6c3,0x6bd,0x2d9,0x288,0x288, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0,0x9db,0x9db,0,0x9db,0x9db,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0,0,0x9db,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0,0,0x9db,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0,0,0,0,0,0x9f3,0x9f3,0x9f9,0, +0,0,0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0, +0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0,0,0,0x9f6, +0x9f6,0x9f6,0x9f6,0x9f6,0x9f6,0x9f6,0x9f6,0x9f6,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7, +0xaa7,0xaa7,0xaa7,0x1197,0x1197,0x1413,0x1413,0,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24, +0xc24,0xc24,0xc24,0xc24,0x16a4,0,0,0,0x1197,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, +0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, +0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xd7d,0,0,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29, +0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29, +0xd29,0xd29,0xd29,0xd29,0xd29,0,0,0,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26, +0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1347,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd, +0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd,0x12bd, +0x12bd,0x12bd,0x12bd,0x12bd,0,0,0,0,0x873,0x873,0x873,0x873,0,0,0,0, +0,0,0,0,0,0x14c4,0x14c4,0x14c4,0x86a,0x86a,0x86a,0x86a,0x86a,0x86a,0x86a,0x86a, +0x86a,0x86a,0x86a,0x86a,0x86a,0x86a,0x86a,0x86a,0x86a,0x86a,0x86a,0,0,0,0,0, +0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df, +0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0,0,0,0,0, +0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed, +0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0,0x9ea, +0xb0a,0xb0a,0xb0a,0xb0a,0,0,0,0,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a, +0xb07,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0,0,0,0,0,0,0,0,0,0, +0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1, +0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0x9e1,0,0, +0x9de,0x9de,0x9de,0x9de,0x9de,0x9de,0x9de,0x9de,0x9de,0x9de,0,0,0,0,0,0, +0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a, +0x146a,0x146a,0x146a,0x146a,0,0,0,0,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467, +0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467, +0x1467,0x1467,0x1467,0x1467,0,0,0,0,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c, +0,0,0,0,0,0,0,0,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281, +0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0,0,0,0,0,0,0,0, +0,0,0,0x127e,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0, +0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0x17a3,0,0x17a3,0x17a3,0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0, +0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0, +0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0,0x17a0, +0x17a0,0,0,0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c3,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0, +0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0,0,0,0,0,0,0,0, +0,0,0,0,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc, +0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0,0,0,0,0, +0,0,0,0,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc, +0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0,0,0,0,0,0, +0,0,0,0,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x1764,0x176a,0x176a,0x1767,0x1767,0x1767,0,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0, +0,0,0,0,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0,0,0x9c9,0,0x9c9,0x9c9, +0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9, +0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0x9c9,0,0x9c9,0x9c9,0,0,0,0x9c9,0,0,0x9c9, +0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79, +0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0,0xe76,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73, +0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230, +0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0, +0,0,0,0,0,0,0,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0,0x13bf,0x13bf,0,0,0,0,0,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc, +0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4, +0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbf4,0xbee,0xbee,0xbee,0xbee,0xe4c,0xe4c,0,0,0,0xbf1, +0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, +0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0,0,0,0,0,0xd2c, +0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd, +0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0,0,0,0,0x1392,0x1392,0x10dd,0x10dd, +0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392, +0,0,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392, +0xae6,0xb64,0xb64,0xb64,0,0xb64,0xb64,0,0,0,0,0,0xb64,0xb64,0xb64,0xb64, +0xae6,0xae6,0xae6,0xae6,0,0xae6,0xae6,0xae6,0,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6, +0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6, +0x1578,0x1578,0,0,0xb67,0xb67,0xb67,0,0,0,0,0xb6a,0xae0,0xae0,0xae0,0xae0, +0xae0,0xae0,0xae0,0xae0,0x1575,0,0,0,0,0,0,0,0xae3,0xae3,0xae3,0xae3, +0xae3,0xae3,0xae9,0xae9,0xae0,0,0,0,0,0,0,0,0x11f1,0x11f1,0x11f1,0x11f1, +0x11f1,0x12fc,0x12fc,0,0,0,0,0x11e8,0x11e8,0x11e8,0x11e8,0x11e8,0x11ee,0x11ee,0x12c0,0x11ee, +0x11ee,0x11ee,0x11eb,0,0,0,0,0,0,0,0,0,0xe82,0xe82,0xe82,0xe82, +0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82, +0xe82,0xe82,0,0,0,0xe7c,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xea0,0xea0,0xea0,0xea0, +0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0,0xea0, +0xea0,0xea0,0,0,0xe9d,0xe9d,0xe9d,0xe9d,0xe9d,0xe9d,0xe9d,0xe9d,0xe9a,0xe9a,0xe9a,0xe9a, +0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0xe9a,0, +0,0,0,0,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0x11fa,0x11fa,0x11fa,0x11fa, +0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0x11fa,0,0, +0,0,0,0,0,0x11f7,0x11f7,0x11f7,0x11f7,0,0,0,0,0,0,0, +0,0,0,0,0,0x11f4,0x11f4,0x11f4,0x11f4,0x11f4,0x11f4,0x11f4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0xe49,0xe49,0xe49,0xe49, +0xe49,0xe49,0xe49,0xe49,0xe49,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1380,0x1380,0x1380,0x1380, +0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x137d,0x137d,0x137d,0x137d, +0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0, +0,0,0,0,0,0,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x15bd,0x15bd,0x15c0,0x15c0, +0x1608,0x1608,0x1608,0x1608,0,0,0,0,0,0,0,0,0x15ba,0x15ba,0x15ba,0x15ba, +0x15ba,0x15ba,0x15ba,0x15ba,0x15ba,0x15ba,0,0,0,0,0,0,0x1887,0x1887,0x1887,0x1887, +0x1887,0x1887,0,0,0,0x18f3,0x18f6,0x18f0,0x18f0,0x18f0,0x1878,0x188a,0x1881,0x1881,0x1881,0x1881, +0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0,0, +0,0,0,0,0,0,0x187b,0x187b,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef, +0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef, +0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5, +0x16f5,0x16f5,0,0x1725,0x1725,0x16f2,0,0,0x16f5,0x16f5,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0x1860,0x1860,0x1860,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x18ea,0x182d,0x182d,0x182d, +0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cf,0,0,0,0,0,0,0,0, +0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, +0x15c6,0x15c6,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x15c3,0x15c3,0x15c3, +0x15c3,0x15c9,0x15c9,0x15c9,0x15c9,0x15c9,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1791,0x1791,0x1791,0x1791,0x1791,0x1791,0x1791,0x1791, +0x1791,0x1791,0x1791,0x1791,0x1791,0x1791,0x1791,0x1791,0x1791,0x1791,0x17d6,0x17d6,0x17d6,0x17d6,0x1794,0x1794, +0x1794,0x1794,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da, +0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16d7,0x16d7,0x16d7,0x16d7,0x16d7,0x16d7,0x16d7, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, +0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0,0,0,0,0, +0,0,0,0,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1065,0x1005,0x1005,0xff6,0xff6,0xff6, +0xff6,0xff6,0,0,0,0,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3, +0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9, +0x17d0,0x1782,0x1782,0x17cd,0x17cd,0x1782,0,0,0,0,0,0,0,0,0,0x12f3, +0xe91,0xe91,0x17d3,0,0,0,0,0,0,0,0,0,0,0x1584,0,0, +0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8, +0x10f8,0,0,0,0,0,0,0,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5, +0x10f5,0x10f5,0,0,0,0,0,0,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x112b, +0x112b,0x112b,0x112b,0x112b,0x10d4,0x112b,0x112e,0x112e,0x112b,0x112b,0x112b,0x1131,0x1131,0,0x10d1,0x10d1, +0x10d1,0x10d1,0x10d1,0x10d1,0x10d1,0x10d1,0x10d1,0x10d1,0x10ce,0x10da,0x10da,0x10da,0x1581,0x157e,0x157e,0x16c8, +0,0,0,0,0,0,0,0,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a, +0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x1332,0x1284,0x1287,0x128a,0, +0,0,0,0,0,0,0,0,0,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1, +0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0,0,0, +0,0,0,0,0,0,0,0,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0,0x1269,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1803,0x183c,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0, +0x13c2,0,0x13c2,0x13c2,0x13c2,0x13c2,0,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, +0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, +0x13c2,0x13c5,0,0,0,0,0,0,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f, +0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123c,0x123c,0x123c,0x1314,0x1314,0x1314,0x1314,0x1314, +0x1314,0x1317,0x131a,0,0,0,0,0,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239, +0x1239,0x1239,0,0,0,0,0,0,0x13ec,0x134a,0x120f,0x12c3,0,0x1218,0x1218,0x1218, +0x1218,0x1218,0x1218,0x1218,0x1218,0,0,0x1218,0x1218,0,0,0x1218,0x1218,0x1218,0x1218,0x1218, +0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218, +0x1218,0,0x1218,0x1218,0,0x1218,0x1218,0x1218,0x1218,0x1218,0,0x160e,0x134d,0x1215,0x1308,0x120f, +0x1308,0x120f,0x120f,0x120f,0x120f,0,0,0x120f,0x120f,0,0,0x1212,0x1212,0x130e,0,0, +0x138f,0,0,0,0,0,0,0x1308,0,0,0,0,0,0x121e,0x121b,0x121b, +0x1218,0x1218,0x120f,0x120f,0,0,0x130b,0x130b,0x130b,0x130b,0x130b,0x130b,0x130b,0,0,0, +0x130b,0x130b,0x130b,0x130b,0x130b,0,0,0,0,0,0,0,0,0,0,0, +0x18d5,0x18d5,0x18d5,0x18d8,0x18d5,0x18d8,0x18d5,0x18d5,0x18d5,0x18d5,0,0x18d5,0,0,0x18d8,0, +0x18d5,0x18d8,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf, +0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0,0x18cc,0x1908,0x18c9,0x18c9,0x1908, +0x1908,0x1908,0x1908,0x1908,0x1908,0,0x1908,0,0,0x190b,0,0x190b,0x190b,0x1908,0x18c9,0, +0x18c9,0x18c9,0x1914,0x1914,0x1917,0x18d2,0x1911,0x18db,0x18de,0x18de,0,0x18c6,0x18c6,0,0,0, +0,0,0,0,0,0x190e,0x190e,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x145e,0x145e,0x14ac,0x14a6,0x14a6,0x145e,0x14a9,0x1461,0x1461,0x1461,0x1461,0x1464, +0x1464,0x1458,0x1455,0x1452,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x16d1,0x1458, +0,0x1452,0x15f3,0x164d,0x16d4,0x16d4,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0x9b1,0x9b1,3,3,3,3, +0,0,0,0,0x1329,0x1275,0x132f,0x132c,0x127b,0x127b,0x126f,0x127b,0,0,0,0, +0,0,0,0,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0,0, +0,0,0,0,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae, +0x12ae,0x12ae,0x12ae,0x133b,0x12a8,0x12a8,0x133b,0x133b,0x133b,0x133b,0,0,0x12a8,0x12a8,0x12ab,0x12ab, +0x133b,0x133b,0x12a8,0x1341,0x133e,0x129f,0x12b1,0x12b1,0x12a2,0x12a2,0x12a5,0x12a5,0x12a5,0x12b1,0x13cb,0x13cb, +0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13c8,0x13c8,0x13c8,0x13c8, +0x13fb,0x13fb,0,0,0x1335,0x1299,0x1299,0x128d,0x1296,0,0,0,0,0,0,0, +0,0,0,0,0x1290,0x1290,0x1290,0x1290,0x1290,0x1290,0x1290,0x1290,0x1290,0x1290,0,0, +0,0,0,0,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422, +0x1422,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x113a, +0x10fe,0x113a,0x10fe,0x10fe,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x1140,0x113d,0x1647,0x1785,0,0, +0,0,0,0,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0,0, +0,0,0,0,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f, +0x186f,0x186f,0x186f,0x186f,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, +0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x1587,0,0,0x13f5,0x13b3,0x13f5, +0x13b0,0x13b0,0x13f5,0x13f5,0x13f5,0x13f5,0x13b3,0x13f5,0x13f5,0x13f5,0x13f5,0x13f8,0,0,0,0, +0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x13aa,0x13aa,0x13b9,0x13b9,0x13b9,0x13aa, +0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1590,0x1590,0x1590,0x15f6, +0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x1590,0x15fc,0x15f9,0x158d,0,0,0,0, +0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242, +0x1242,0x1242,0x1242,0,0,0,0,0,0,0,0,0,0,0,0,0x124b, +0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0,0,0x16e9,0,0,0x16e9,0x16e9,0x16e9,0x16e9, +0x16e9,0x16e9,0x16e9,0x16e9,0,0x16e9,0x16e9,0,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9, +0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x16e9,0x1719,0x16e3,0x16e3,0x16e3,0x16e3,0x16e3,0,0x16e3, +0x16e6,0,0,0x1719,0x1719,0x171f,0x1722,0x16ec,0x16e3,0x16ec,0x16e3,0x171c,0x16ef,0x16dd,0x16ef,0, +0,0,0,0,0,0,0,0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0, +0x16e0,0x16e0,0,0,0,0,0,0,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668, +0,0,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668, +0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1665,0x1665,0x1665,0x1698,0x1698,0x1698,0x1698, +0,0,0x1698,0x1698,0x1665,0x1665,0x1665,0x1665,0x169b,0x1668,0x1662,0x1668,0x1665,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x14e8,0x14eb,0x14fa,0x14fa,0x14eb,0x14ee,0x14e8,0x153f, +0,0,0,0,0,0,0,0,0x14df,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x14dc, +0x14dc,0x1530,0x1530,0x1530,0x14df,0x14df,0x14df,0x14df,0x14d6,0x14d9,0x14d9,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1770,0x1770,0x1770,0x1770,0x1770,0x1770,0x1770,0x1770, +0x1770,0x1770,0x1770,0x1770,0x1770,0x1770,0x1770,0x1770,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c, +0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c, +0x129c,0,0,0,0,0,0,0,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb, +0x17eb,0x17eb,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x18bd,0x18b7,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba, +0x18ba,0x18ba,0,0,0,0,0,0,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440, +0x1440,0,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440, +0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x143d,0x149d,0x149d,0x149d,0x149d, +0x149d,0x149d,0x149d,0,0x149d,0x149d,0x149d,0x149d,0x149d,0x149d,0x143d,0x14a0,0x1440,0x1443,0x1443,0x1437, +0x1434,0x1434,0,0,0,0,0,0,0,0,0,0,0x143a,0x143a,0x143a,0x143a, +0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431, +0x1431,0x1431,0x1431,0x1431,0x1431,0,0,0,0x1446,0x1449,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f, +0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0,0,0x14a3,0x14a3, +0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0,0x144c,0x14a3,0x14a3, +0x14a3,0x14a3,0x14a3,0x14a3,0x14a3,0x144c,0x14a3,0x14a3,0x144c,0x14a3,0x14a3,0,0,0,0,0, +0,0,0,0,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0,0x14cd,0x14cd,0,0x14cd, +0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x14cd, +0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0,0,0,0x1527,0, +0x1527,0x1527,0,0x1527,0x1527,0x1527,0x152a,0x1527,0x152d,0x152d,0x14d0,0x1527,0,0,0,0, +0,0,0,0,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0,0, +0,0,0,0,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0,0x159c,0x159c,0,0x159c,0x159c, +0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x159c, +0x159c,0x159c,0x159c,0x159c,0x159c,0x159c,0x1599,0x1599,0x1599,0x1599,0x1599,0,0x15ff,0x15ff,0,0x1599, +0x1599,0x15ff,0x1599,0x1602,0x159c,0,0,0,0,0,0,0,0x1596,0x1596,0x1596,0x1596, +0x1596,0x1596,0x1596,0x1596,0x1596,0x1596,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x15a5,0x15a5,0x15a5,0x15a5, +0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a2,0x1605, +0x1605,0x159f,0x159f,0x15a8,0x15a8,0,0,0,0,0,0,0,0x183f,0x183f,0x1812,0x180c, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f, +0x180f,0x180f,0x180f,0x180f,0x180c,0x180c,0x183f,0x183f,0x183f,0x183f,0x183f,0,0,0,0x180c,0x180c, +0x183f,0x1842,0x1845,0x1815,0x1815,0x1806,0x1806,0x1806,0x1806,0x1806,0x1806,0x1806,0x1806,0x1806,0x1806,0x1806, +0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x18ed,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x16cb,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1632,0x162c,0x162c,0x162c, +0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x162f,0x11e5,0x11e5,0x11e5,0x11e5, +0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5, +0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x1383,0,0,0,0,0,0,0xbfa,0xbfa,0xbfa,0x11e5, +0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0,0xbf7,0xbf7,0xbf7,0xbf7, +0x11e2,0,0,0,0,0,0,0,0,0,0,0,0x1383,0x1383,0x1383,0x1383, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x178e,0x178e,0x178e,0x178e, +0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178b,0x178b,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1836,0x17fd,0x17fd,0x17fd, +0x17fd,0x17fd,0x17fd,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839, +0x1839,0x1839,0,0,0,0,0,0,0,0,0,0,0x1875,0x1875,0x1875,0x1875, +0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875, +0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0,0,0,0,0,0x13a1,0x13a1,0x13a1,0x13a1, +0x13a1,0x13a1,0x13a1,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x18f9,0x18fc,0x18fc,0x18fc, +0x18fc,0x18fc,0x18fc,0x18fc,0x18fc,0x18f9,0x1893,0x1893,0x1893,0x18f9,0x18f9,0x18ff,0x1890,0x1890,0x1890,0x1890, +0x1890,0x1890,0x1890,0x1890,0x1890,0x1890,0,0,0,0,0,0,0x100e,0x100e,0x100e,0x100e, +0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e, +0x100e,0x100e,0x100e,0x100e,0x100e,0,0,0,0,0,0,0,0x1254,0x1254,0x1254,0x1254, +0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254, +0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0x1254,0,0x1251,0x1251,0x1251,0x1251, +0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0,0,0,0,0x1257,0x1257,0x179a,0x179a,0x179a,0x179a, +0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a, +0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0,0x1797,0x1797,0x1797,0x1797, +0x1797,0x1797,0x1797,0x1797,0x1797,0x1797,0,0,0,0,0,0,0x11fd,0x11fd,0x11fd,0x11fd, +0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0,0, +0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x1200,0,0,0,0,0,0,0,0,0,0, +0x11d3,0x11d3,0x11d6,0x11d6,0x11d9,0x11ca,0,0,0,0,0,0,0,0,0,0, +0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0,0x11ca,0x11ca,0x11ca,0x11ca,0x11ca, +0x11ca,0x11ca,0,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3, +0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0,0,0,0,0,0x11d3,0x11d3,0x11d3, +0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x189f,0x189f,0x189f,0x18a2,0x189f,0x189f,0x189f,0x18a2,0x18a5,0x18a5,0x18a5,0x18a8,0x18a8,0x1899,0x18ab,0x18ab, +0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0,0,0,0,0,0, +0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab, +0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ab,0x15ae,0x15b7,0x15ab,0x15ab,0,0,0,0,0, +0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0,0,0,0,0x1692, +0x10b6,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3, +0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0,0,0,0,0,0,0,0x111c, +0x111c,0x111c,0x111c,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9, +0x147f,0x1512,0x1680,0x1683,0x172b,0,0,0,0,0,0,0,0,0,0,0, +0x1728,0x1728,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x15e1,0x15e1,0x15e1, +0x15e1,0x15e1,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0,0,0,0,0,0,0,0, +0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, +0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x18e4,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704, +0x1704,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x17b5,0x17b5,0x17b5,0x17b5,0,0x17b5,0x17b5,0x17b5, +0x17b5,0x17b5,0x17b5,0x17b5,0,0x17b5,0x17b5,0,0x17b2,0x17b2,0x17b2,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0x1827,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1686,0x1686,0x1686,0, +0,0x182a,0,0,0,0,0,0,0,0,0,0,0x1689,0x1689,0x1689,0x1689, +0,0,0,0,0,0,0,0,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f, +0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f, +0x150f,0x150f,0x150f,0x150f,0,0,0,0,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206, +0x1206,0x1206,0x1206,0,0,0,0,0,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206, +0x1206,0x1206,0x1206,0x1206,0x1206,0,0,0,0,0,0,0,0x1206,0x1206,0x1206,0x1206, +0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0,0,0x1203,0x1302,0x1305,0x1209,0x12b4,0x12b4,0x12b4,0x12b4, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1857,0x1857,0x1857,0x1857, +0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x185a,0x185a,0x185a,0x185a, +0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0,0,0,0,0,0,0x1854,0x1854,0x1854,0x1854, +0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854, +0,0,0,0,0,0,0,0,0,0,0,0,0x17bb,0x17bb,0x17bb,0x17bb, +0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0,0,0x17bb,0x17bb,0x17bb,0x17bb, +0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0, +0,0,0,0,0,0,0,0,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731, +0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0,0,0,0,0,0, +0,0,0,0,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0,0,0xc2d,0x852,0x852, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, +0x852,0x852,0x852,0x852,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x1731,0x1731,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0xaaa,0xaaa,0xb55,0xb55,0xb55,0xaaa,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df, +0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0,0,0,0,0,0,0,0, +0,0,0,0,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0,0,0,0,0,0,0,0, +0,0,0,0,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05, +0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0,0,0,0,0, +0,0,0,0,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, +0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x1545,0x1545,0,0,0, +0,0,0,0,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0x861,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x861,0x861,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x861,0,0x861,0x861,0,0,0x861,0,0,0x861,0x861,0,0,0x861,0x861,0x861, +0x861,0,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x85e,0x85e,0x85e,0x85e,0,0x85e, +0,0x85e,0x85e,0x85e,0x85e,0x969,0x85e,0x85e,0,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0x861,0x861,0x861,0x85e,0x85e,0x85e,0x85e,0x861,0x861,0,0x861,0x861,0x861,0x861,0, +0,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x861,0x861,0,0x861, +0x861,0x861,0x861,0,0x861,0x861,0x861,0x861,0x861,0,0x861,0,0,0,0x861,0x861, +0x861,0x861,0x861,0x861,0x861,0,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0xa50,0xa50,0,0,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x85e,0x85e,0x85e,0x858,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0xb88,0xb85,0,0,0x85b,0x85b, +0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b, +0x1386,0x1386,0x1386,0x1386,0x13e9,0x1386,0x1386,0x1389,0x138c,0x1389,0x1389,0x1386,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9, +0,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175e,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0, +0,0,0,0,0,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b, +0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0,0,0x148b,0x148b,0x148b,0x148b,0x148b, +0x148b,0x148b,0,0x148b,0x148b,0,0x148b,0x148b,0x148b,0x148b,0x148b,0,0,0,0,0, +0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8, +0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e8,0x17e8,0x17e8,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x1830,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, +0x165c,0,0,0,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x165c,0x165c,0x165c,0x165c,0x165c, +0x165f,0x165f,0,0,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0,0, +0,0,0x165c,0x1656,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d, +0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x17d9,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671, +0x1671,0x1671,0x1671,0x1671,0x169e,0x169e,0x169e,0x169e,0x166e,0x166e,0x166e,0x166e,0x166e,0x166e,0x166e,0x166e, +0x166e,0x166e,0,0,0,0,0,0x166b,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b, +0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x1848,0x1848,0x1848,0x1848,0x1818,0x1818,0x1818,0x1818, +0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4, +0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x1902,0x1905,0x18b4,0x18b1,0x18b1,0x18b1, +0x18b1,0x18b1,0x18b1,0x18b1,0x18b1,0x18b1,0x18b1,0,0,0,0,0x18ae,0x1752,0x1752,0x1752,0x1752, +0x1752,0x1752,0x1752,0,0x1752,0x1752,0x1752,0x1752,0,0x1752,0x1752,0,0x1752,0x1752,0x1752,0x1752, +0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0,0x1224,0x1224,0x1224,0x1224, +0x1224,0,0,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x1311,0x1311,0x1311,0x1311, +0x1311,0x1311,0x1311,0,0,0,0,0,0,0,0,0,0x142b,0x142b,0x142b,0x142b, +0x149a,0x149a,0x149a,0x1494,0x1497,0x1497,0x1497,0x164a,0,0,0,0,0x1428,0x1428,0x1428,0x1428, +0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0,0,0,0,0x1425,0x1425,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x154b,0x1545,0x1545,0x1545, +0x154b,0x1545,0x1545,0x1545,0x1545,0,0,0,0,0,0,0,0,0,0,0, +0,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611, +0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611, +0x1611,0x1611,0,0,0x1086,0x1086,0x1086,0x1086,0,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086, +0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086, +0x1086,0x1086,0x1086,0x1086,0,0x1086,0x1086,0,0x1086,0,0,0x1086,0,0x1086,0x1086,0x1086, +0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0,0x1086,0x1086,0x1086,0x1086,0,0x1086,0,0x1086, +0,0,0,0,0,0,0x1086,0,0,0,0,0x1086,0,0x1086,0,0x1086, +0,0x1086,0x1086,0x1086,0,0x1086,0x1086,0,0x1086,0,0,0x1086,0,0x1086,0,0x1086, +0,0x1086,0,0x1086,0,0x1086,0x1086,0,0x1086,0,0,0x1086,0x1086,0x1086,0x1086,0, +0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0,0x1086,0x1086,0x1086,0x1086,0,0x1086,0x1086,0x1086, +0x1086,0,0x1086,0,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0,0x1086, +0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086, +0,0,0,0,0,0x1086,0x1086,0x1086,0,0x1086,0x1086,0x1086,0x1086,0x1086,0,0x1086, +0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086,0x1086, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1080,0x1080,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0,0,0,0, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152, +0,0,0,0,0,0,0,0,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152, +0x1152,0x1152,0,0,0,0,0,0,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152, +0,0,0,0,0,0,0,0,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0,0,0x16a4,0x16a4,0x1854,0x1854, +0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0,0,0,0,0x1854,0x1854,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x16a4,0x16a4,0x16a4,0x16a4, +0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0, +0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x1854,0x1854,0x1854,0x1854, +0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x16aa,0x16aa,0x16aa,0x16aa, +0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0x693,0x693,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27, +0xc27,0xc27,0xc27,0xc27,3,3,3,3,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27, +0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,3,3,3,3, +3,3,3,3,3,3,3,3,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c, +0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,3,3,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c, +0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0x1155,3,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c, +0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0x1023,3,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c, +0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0xf9c,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,3,3, +3,3,3,3,3,3,3,3,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470, +0x1470,0x1470,0x1470,0x1470,0x1470,0x16a4,3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -3,3,3,3,3,3,3,3,3,3,3,3,3,3,0x9b1,0x9b1, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -0x1596,0x426,0x435,0x435,0x18,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x18,0x18,0x43e, -0x43e,0x18,0x18,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e, -0x43e,0x18,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x43e,0x18,0x43e,0x18,0x18,0x18,0x43e,0x43e, -0x43e,0x43e,0x18,0x18,0x429,0xd35,0x426,0x435,0x435,0x426,0x426,0x426,0x426,0x18,0x18,0x435, -0x435,0x18,0x18,0x438,0x438,0x42c,0xe2b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x426, -0x18,0x18,0x18,0x18,0x43b,0x43b,0x18,0x43b,0x43e,0x43e,0x426,0x426,0x18,0x18,0x99c,0x99c, -0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x43e,0x43e,0x432,0x432,0x42f,0x42f,0x42f,0x42f, -0x42f,0x432,0x42f,0x11f1,0x1938,0x1935,0x19dd,0x18,0x1b,0xd38,0x441,0xd3b,0x1b,0x450,0x450,0x450, -0x450,0x450,0x450,0x1b,0x1b,0x1b,0x1b,0x450,0x450,0x1b,0x1b,0x450,0x450,0x450,0x450,0x450, -0x450,0x450,0x450,0x450,0x450,0x450,0x450,0x450,0x450,0x1b,0x450,0x450,0x450,0x450,0x450,0x450, -0x450,0x1b,0x450,0x44d,0x1b,0x450,0x44d,0x1b,0x450,0x450,0x1b,0x1b,0x444,0x1b,0x44a,0x44a, -0x44a,0x441,0x441,0x1b,0x1b,0x1b,0x1b,0x441,0x441,0x1b,0x1b,0x441,0x441,0x447,0x1b,0x1b, -0x1b,0x1026,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x44d,0x44d,0x44d,0x450,0x1b,0x44d,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f,0x99f, -0x441,0x441,0x450,0x450,0x450,0x1026,0x19e0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1e,0x453,0x453,0x45c,0x1e,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0xd44,0x45f,0x1e,0x45f, -0x45f,0x45f,0x1e,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f, -0x45f,0x1e,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x1e,0x45f,0x45f,0x1e,0x45f,0x45f,0x45f, -0x45f,0x45f,0x1e,0x1e,0x456,0x45f,0x45c,0x45c,0x45c,0x453,0x453,0x453,0x453,0x453,0x1e,0x453, -0x453,0x45c,0x1e,0x45c,0x45c,0x459,0x1e,0x1e,0x45f,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x45f,0xd44,0xd3e,0xd3e,0x1e,0x1e,0x9a2,0x9a2, -0x9a2,0x9a2,0x9a2,0x9a2,0x9a2,0x9a2,0x9a2,0x9a2,0x14ac,0xd41,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x1e,0x17b8,0x193b,0x193b,0x193b,0x193e,0x193e,0x193e,0x21,0x462,0x471,0x471,0x21,0x47a,0x47a,0x47a, -0x47a,0x47a,0x47a,0x47a,0x47a,0x21,0x21,0x47a,0x47a,0x21,0x21,0x47a,0x47a,0x47a,0x47a,0x47a, -0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x21,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a, -0x47a,0x21,0x47a,0x47a,0x21,0xd47,0x47a,0x47a,0x47a,0x47a,0x21,0x21,0x465,0x47a,0x462,0x462, -0x471,0x462,0x462,0x462,0x1029,0x21,0x21,0x471,0x474,0x21,0x21,0x474,0x474,0x468,0x21,0x21, -0x21,0x21,0x21,0x21,0x21,0x1b54,0x462,0x462,0x21,0x21,0x21,0x21,0x477,0x477,0x21,0x47a, -0x47a,0x47a,0x1029,0x1029,0x21,0x21,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e,0x46e, -0x46b,0xd47,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, -0x24,0x24,0x47d,0x489,0x24,0x489,0x489,0x489,0x489,0x489,0x489,0x24,0x24,0x24,0x489,0x489, -0x489,0x24,0x489,0x489,0x48c,0x489,0x24,0x24,0x24,0x489,0x489,0x24,0x489,0x24,0x489,0x489, -0x24,0x24,0x24,0x489,0x489,0x24,0x24,0x24,0x489,0x489,0x489,0x24,0x24,0x24,0x489,0x489, -0x489,0x489,0x489,0x489,0x489,0x489,0xe2e,0x489,0x489,0x489,0x24,0x24,0x24,0x24,0x47d,0x483, -0x47d,0x483,0x483,0x24,0x24,0x24,0x483,0x483,0x483,0x24,0x486,0x486,0x486,0x480,0x24,0x24, -0x102c,0x24,0x24,0x24,0x24,0x24,0x24,0x47d,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, -0x24,0x24,0xf4b,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a5,0x9a5,0x9a5,0xdfb, -0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xd4d,0xd4a,0x24,0x24,0x24,0x24,0x24,0x1599,0x49b,0x49b,0x49b, -0x19e3,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x27,0x49e,0x49e,0x49e,0x27,0x49e,0x49e, -0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x27,0x49e,0x49e, -0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x159c,0x49e,0x49e,0x49e,0x49e,0x49e,0x27,0x27, -0x1bff,0x1038,0x48f,0x48f,0x48f,0x49b,0x49b,0x49b,0x49b,0x27,0x48f,0x48f,0x492,0x27,0x48f,0x48f, -0x48f,0x495,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x48f,0x48f,0x27,0x1035,0x1035,0x17bb,0x27, -0x27,0x1c02,0x27,0x27,0x49e,0x49e,0x102f,0x102f,0x27,0x27,0x498,0x498,0x498,0x498,0x498,0x498, -0x498,0x498,0x498,0x498,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x1ab2,0x1032,0x1032,0x1032,0x1032, -0x1032,0x1032,0x1032,0x1032,0x187b,0x159f,0x4a7,0x4a7,0x19e6,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0, -0x4b0,0x2a,0x4b0,0x4b0,0x4b0,0x2a,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0, -0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x2a,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0, -0x2a,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x2a,0x2a,0xd50,0xd53,0x4a7,0x4a1,0x4aa,0x4a7,0x4a1,0x4a7, -0x4a7,0x2a,0x4a1,0x4aa,0x4aa,0x2a,0x4aa,0x4aa,0x4a1,0x4a4,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x4a1,0x4a1,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x1c05,0x4ad,0x2a,0x4b0,0x4b0,0xf63,0xf63, -0x2a,0x2a,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x2a,0xf66,0xf66,0x1cc8, -0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x1941,0x15a2,0x4bc,0x4bc, -0x1b57,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x2d,0x4c2,0x4c2,0x4c2,0x2d,0x4c2,0x4c2, -0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4bc,0x4b3,0x4b3,0x4b3, -0x103b,0x2d,0x4bc,0x4bc,0x4bc,0x2d,0x4bf,0x4bf,0x4bf,0x4b6,0x13d1,0x187e,0x2d,0x2d,0x2d,0x2d, -0x1881,0x1881,0x1881,0x4b3,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x17be,0x4c2,0x4c2,0x103b,0x103b, -0x2d,0x2d,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x103e,0x103e,0x103e,0x103e, -0x103e,0x103e,0x187e,0x187e,0x187e,0x1041,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x30,0x1b5a,0xa92,0xa92, -0x30,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa98,0xa98,0xa9b,0xa9b,0xa9b, -0xa9b,0xa9b,0xa9b,0x30,0x30,0x30,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa98,0xa9b, -0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0x30,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b, -0xa9b,0xa9b,0xa9b,0xa9b,0x30,0xa9b,0x30,0x30,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0xa9b,0x30, -0x30,0x30,0xa89,0x30,0x30,0x30,0x30,0xa86,0xa92,0xa92,0xa86,0xa86,0xa86,0x30,0xa86,0x30, -0xa92,0xa92,0xa95,0xa92,0xa95,0xa95,0xa95,0xa83,0x30,0x30,0x30,0x30,0x30,0x30,0x15a5,0x15a5, -0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x30,0x30,0xa92,0xa8f,0xa8c,0x30,0x30,0x30, -0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x33,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd, -0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd, -0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4c8,0x4dd,0x4da,0x4c8,0x4c8,0x4c8,0x4c8, -0x4c8,0x4c8,0x4ce,0x33,0x33,0x33,0x33,0x4c5,0x4e3,0x4e3,0x4e3,0x4e3,0x4e3,0x4dd,0x4e0,0x4cb, -0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4c8,0x4cb,0x4d1,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7, -0x4d7,0x4d7,0x4d4,0x4d4,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, -0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, -0x33,0x33,0x33,0x33,0x36,0x4f5,0x4f5,0x36,0x4f5,0x36,0x1ab8,0x4f5,0x4f5,0x1ab8,0x4f5,0x36, -0x1ab8,0x4f5,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x4f5,0x4f5,0x4f5,0x4f5,0x1ab8,0x4f5,0x4f5,0x4f5, -0x4f5,0x4f5,0x4f5,0x4f5,0x1ab8,0x4f5,0x4f5,0x4f5,0x36,0x4f5,0x36,0x4f5,0x1ab8,0x1ab8,0x4f5,0x4f5, -0x1ab8,0x4f5,0x4f5,0x4f5,0x4f5,0x4e6,0x4f5,0x4ef,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x1ab5,0x4e6, -0x4e6,0x4f5,0x36,0x36,0x4fb,0x4fb,0x4fb,0x4fb,0x4fb,0x36,0x4f8,0x36,0x4e9,0x4e9,0x4e9,0x4e9, -0x4e9,0x4e6,0x1ccb,0x36,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0x36,0x36, -0x4f2,0x4f2,0x14af,0x14af,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, -0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, -0x36,0x36,0x36,0x36,0x9fc,0x9fc,0x9fc,0x9f9,0x9fc,0x9fc,0x9fc,0x9fc,0x39,0x9fc,0x9fc,0x9fc, -0x9fc,0x9f9,0x9fc,0x9fc,0x9fc,0x9fc,0x9f9,0x9fc,0x9fc,0x9fc,0x9fc,0x9f9,0x9fc,0x9fc,0x9fc,0x9fc, -0x9f9,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9fc,0x9f9,0xaaa,0x1050, -0x1050,0x39,0x39,0x39,0x39,0x9bd,0x9bd,0x9ba,0x9bd,0x9ba,0x9ba,0x9cf,0x9ba,0x9cf,0x9bd,0x9bd, -0x9bd,0x9bd,0x9bd,0x9f3,0x9bd,0x9ba,0x9c9,0x9c9,0x9cc,0x9d5,0x9c6,0x9c6,0x9fc,0x9fc,0x9fc,0x9fc, -0x13da,0x13d4,0x13d4,0x13d4,0x9bd,0x9bd,0x9bd,0x9ba,0x9bd,0x9bd,0xa9e,0x9bd,0x39,0x9bd,0x9bd,0x9bd, -0x9bd,0x9ba,0x9bd,0x9bd,0x9bd,0x9bd,0x9ba,0x9bd,0x9bd,0x9bd,0x9bd,0x9ba,0x9bd,0x9bd,0x9bd,0x9bd, -0x9ba,0x9bd,0xa9e,0xa9e,0xa9e,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0xa9e,0x9ba,0xa9e,0xa9e, -0xa9e,0x39,0xaa7,0xaa7,0xaa4,0xaa4,0xaa4,0xaa4,0xaa4,0xaa4,0xaa1,0xaa4,0xaa4,0xaa4,0xaa4,0xaa4, -0xaa4,0x39,0x1047,0xaa4,0xe31,0xe31,0x104a,0x104d,0x1047,0x11f4,0x11f4,0x11f4,0x11f4,0x13d7,0x13d7,0x39, -0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, -0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, -0x501,0x501,0x501,0x501,0x501,0x501,0x3c,0x14b5,0x3c,0x3c,0x3c,0x3c,0x3c,0x14b5,0x3c,0x3c, -0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0x3f,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4, -0xad4,0xad4,0xad4,0xe40,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f,0xad4,0xad4,0xad4,0xad4, -0xad4,0xad4,0xad4,0x3f,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4,0x3f,0x3f,0xad4,0xad4,0xad4,0xad4, -0xad4,0xad4,0xad4,0xe40,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0x3f,0xad4,0xad4,0xad4,0xad4, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0x3f,0xad4,0xad4, -0xad4,0xad4,0x3f,0x3f,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0xad4,0xad4,0xad4, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0x3f, -0x3f,0x13dd,0x13dd,0xe3a,0xe3d,0xace,0xad7,0xacb,0xacb,0xacb,0xacb,0xad7,0xad7,0xad1,0xad1,0xad1, -0xad1,0xad1,0xad1,0xad1,0xad1,0xad1,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0x3f,0x3f,0x3f,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada, -0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0x17c4,0x42,0x42,0x17c1,0x17c1,0x17c1,0x17c1, -0x17c1,0x17c1,0x42,0x42,0xaec,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef, -0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xae9, -0xae6,0x45,0x45,0x45,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf2, -0xaf2,0xaf2,0xaf5,0xaf5,0xaf5,0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x48,0x48,0x48, -0x48,0x48,0x48,0x48,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xaf8,0xb1f,0xb1f,0xb04,0xb04,0xb04, -0xb04,0xb04,0xafe,0xafe,0xb04,0xb01,0xb07,0xafb,0xb2b,0xb2b,0xb19,0xb25,0xb13,0xb0d,0xb16,0xb10, -0xb25,0xd56,0x4b,0x4b,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0x4b,0x4b, -0x4b,0x4b,0x4b,0x4b,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0x4b,0x4b, -0x4b,0x4b,0x4b,0x4b,0xb37,0xb37,0xbaf,0xbb2,0xb3d,0xbac,0xb3a,0xb37,0xb40,0xb4f,0xb43,0xb52, -0xb52,0xb52,0xb2e,0x1c08,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0x4e,0x4e, -0x4e,0x4e,0x4e,0x4e,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49, -0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0x19e9,0x4e,0x4e,0x4e, -0x4e,0x4e,0x4e,0x4e,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb31,0x106e,0x4e, -0x4e,0x4e,0x4e,0x4e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, -0x124e,0x124e,0x124e,0x124e,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b, -0x52b,0x52b,0x52b,0x52b,0x528,0x528,0x528,0x528,0x528,0x528,0x51,0x51,0x52b,0x52b,0x52b,0x52b, -0x52b,0x52b,0x51,0x51,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x51,0x52b,0x51,0x52b, -0x51,0x52b,0x51,0x52b,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b, -0x52b,0x52b,0x52b,0x52b,0x528,0x522,0x528,0x522,0x528,0x522,0x528,0x522,0x528,0x522,0x528,0x522, -0x528,0x522,0x51,0x51,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b, -0x52b,0x52b,0x52b,0x52b,0x528,0x528,0x528,0x528,0x528,0x51,0x528,0x528,0x52b,0x52b,0x52b,0x525, -0x52b,0x51c,0x522,0x51c,0x51c,0x519,0x528,0x528,0x528,0x51,0x528,0x528,0x52b,0x525,0x52b,0x525, -0x52b,0x519,0x519,0x519,0x528,0x528,0x528,0x522,0x51,0x51,0x528,0x528,0x52b,0x52b,0x52b,0x525, -0x51,0x519,0x519,0x519,0x528,0x528,0x528,0x522,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x525, -0x52b,0x519,0x519,0x519,0x51,0x51,0x528,0x528,0x528,0x51,0x528,0x528,0x52b,0x525,0x52b,0x525, -0x52b,0x51f,0x51c,0x51,0xc27,0xc2a,0xc2a,0xc2a,0x107a,0x54,0x1584,0x1584,0x1584,0x1584,0x534,0x534, -0x534,0x534,0x534,0x534,0x57f,0xc3c,0x57,0x57,0x726,0x57f,0x57f,0x57f,0x57f,0x57f,0x585,0x597, -0x585,0x591,0x58b,0x729,0x57c,0x723,0x723,0x723,0x723,0x57c,0x57c,0x57c,0x57c,0x57c,0x582,0x594, -0x582,0x58e,0x588,0x57,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0x13e0,0x13e0,0x13e0,0x13e0,0x13e0,0x13e0,0x13e0, -0x13e0,0x57,0x57,0x57,0x1c0b,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a, -0x5a,0x5a,0x5a,0x5a,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6, -0x5a6,0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0xb5e,0xb5e,0xc42,0xc48,0xc48,0xc45,0xc45,0xc45,0xc45,0xe52, -0xf69,0xf69,0xf69,0xf69,0x11df,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d, -0x5d,0x5d,0x5d,0x5d,0x5d6,0x5d6,0x5d6,0xb67,0xf72,0x1080,0x1080,0x1080,0x1080,0x133e,0x17ca,0x17ca, -0x60,0x60,0x60,0x60,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x5e5,0x5e5, -0x5e2,0x5e2,0x5e2,0x5e2,0x606,0x606,0x606,0x606,0x606,0xb70,0xb70,0x63,0x63,0x63,0x63,0x63, -0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, -0x63,0x63,0x63,0x63,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x66, -0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66, -0x66,0x66,0x66,0x66,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, -0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0x69,0xb8b, -0xb8b,0xb8b,0xb8b,0xb8e,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, -0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8e,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69, -0x69,0x69,0x69,0x69,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91, -0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c, -0x6c,0x6c,0x6c,0x6c,0x6f,0x873,0x86d,0x873,0x86d,0x873,0x86d,0x873,0x86d,0x873,0x86d,0x86d, -0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d,0x870,0x86d, -0x870,0x86d,0x870,0x86d,0x86d,0x86d,0x86d,0x873,0x86d,0x873,0x86d,0x873,0x86d,0x86d,0x86d,0x86d, -0x86d,0x86d,0x873,0x86d,0x86d,0x86d,0x86d,0x86d,0x870,0xce1,0xce1,0x6f,0x6f,0x98a,0x98a,0x951, -0x951,0x876,0x879,0xcde,0x72,0x72,0x72,0x72,0x72,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b, -0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b, -0x88b,0x88b,0x88b,0x88b,0x88b,0x11cd,0x19b0,0x1a9d,0x75,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, -0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x75,0x95a,0x95a,0x95d,0x95d, -0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x95d,0x897,0x897,0x897,0x897, -0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897, -0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0x897,0xde0,0xde0,0x78,0xba3,0xba3,0xba3,0xba3, -0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0x7b,0x7b,0x7b,0xba9,0xba9,0xba9,0xba9, -0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xcea,0xba9,0xba9, -0xba9,0xcea,0xba9,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x1275,0x1275,0x1275,0x1275, -0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0xa1d,0xa1d,0xa1d,0xa1d, -0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x12ea,0x12ea,0x12ea,0x12ea, -0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x64e,0x64e,0x64e,0x64e, -0x64e,0x64e,0x64e,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x63c, -0x63c,0x63c,0x63c,0x63c,0x84,0x84,0x84,0x84,0x84,0xb7c,0x63f,0x645,0x64b,0x64b,0x64b,0x64b, -0x64b,0x64b,0x64b,0x64b,0x64b,0x642,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645, -0x645,0x645,0x645,0x84,0x645,0x645,0x645,0x645,0x645,0x84,0x645,0x84,0x645,0x645,0x84,0x645, -0x645,0x84,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x645,0x648,0x65a,0x654,0x65a,0x654, -0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x13f2,0x13f2,0x1c0e,0x87, -0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x65a, -0x654,0x657,0x65d,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x65a,0x654,0x654,0x654,0x654,0x657, -0x654,0x654,0x657,0x654,0x657,0x657,0x657,0x654,0x657,0x657,0x657,0x657,0x87,0x87,0x657,0x657, -0x657,0x657,0x654,0x654,0x657,0x654,0x654,0x654,0x654,0x657,0x654,0x654,0x654,0x654,0x654,0x657, -0x657,0x657,0x654,0x654,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x1c0e,0xbc7,0xbc7,0xbc7,0xbc7, -0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0x8af,0x8c1,0x8be,0x8c1, -0x8be,0xcff,0xcff,0xdec,0xde9,0x8b2,0x8b2,0x8b2,0x8b2,0x8c4,0x8c4,0x8c4,0x8dc,0x8df,0x8ee,0x8a, -0x8e2,0x8e5,0x8f1,0x8f1,0x8d9,0x8d0,0x8ca,0x8d0,0x8ca,0x8d0,0x8ca,0x8cd,0x8cd,0x8e8,0x8e8,0x8eb, -0x8e8,0x8e8,0x8e8,0x8a,0x8e8,0x8d6,0x8d3,0x8cd,0x8a,0x8a,0x8a,0x8a,0x666,0x672,0x666,0xc7b, -0x666,0x8d,0x666,0x672,0x666,0x672,0x666,0x672,0x666,0x672,0x666,0x672,0x672,0x66f,0x669,0x66c, -0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x66c, -0x672,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x8d,0x8d,0x663,0x7ad,0x7b0,0x7c5,0x7c8, -0x7a7,0x7b0,0x7b0,0x93,0x78f,0x792,0x792,0x792,0x792,0x78f,0x78f,0x93,0x90,0x90,0x90,0x90, -0x90,0x90,0x90,0x90,0x90,0xb7f,0xb7f,0xb7f,0xa20,0x789,0x675,0x675,0x93,0x7d7,0x7b6,0x7a7, -0x7b0,0x7ad,0x7a7,0x7b9,0x7aa,0x7a4,0x7a7,0x7c5,0x7bc,0x7b3,0x7d4,0x7a7,0x7d1,0x7d1,0x7d1,0x7d1, -0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7c2,0x7bf,0x7c5,0x7c5,0x7c5,0x7d7,0x798,0x795,0x795,0x795, -0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795, -0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x795,0x93,0x93,0x93,0x795,0x795, -0x795,0x795,0x795,0x795,0x93,0x93,0x795,0x795,0x795,0x795,0x795,0x795,0x93,0x93,0x795,0x795, -0x795,0x795,0x795,0x795,0x93,0x93,0x795,0x795,0x795,0x93,0x93,0x93,0xbca,0xbca,0xbca,0xbca, -0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x194d,0x194d,0x194d,0xbd0,0xbd0,0xbd0,0xbd0, -0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0x99, -0x99,0x99,0x99,0x99,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713, -0x1713,0x1713,0x1713,0x1713,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, -0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c, -0x9c,0x9c,0x9c,0x9c,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0x9f,0x9f,0x108c,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x1c11,0x1c11,0x9f, -0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f, -0x9f,0x9f,0x9f,0x9f,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfd,0xbfd,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfd,0xa2,0xbfd,0xbfd,0xa2,0xa2,0xbfd,0xa2,0xa2,0xbfd,0xbfd,0xa2,0xa2,0xbfd,0xbfd,0xbfd, -0xbfd,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfa,0xbfa,0xbfa,0xbfa,0xa2,0xbfa, -0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xd74,0xbfa,0xbfa,0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfd,0xbfd,0xbfd,0xbfd,0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xa2, -0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfd,0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xa2,0xbfd, -0xbfd,0xbfd,0xbfd,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xa2,0xbfd,0xa2,0xa2,0xa2,0xbfd,0xbfd, -0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xa2,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xe64,0xe64,0xa2,0xa2,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfa,0xbfa,0xbfa,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xf81,0xf7e,0xa2,0xa2,0xbf7,0xbf7, -0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7, -0xa5,0xc03,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +3,3,3,3,3,3,3,3,3,3,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2, +0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2,0xfa2, +0xfa2,0xfa2,0xfa2,0xfa2,0xf36,0x1029,0x1029,3,3,3,3,3,3,3,3,3, +3,3,3,3,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, +0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0x1029,0x1029,0x1029,0x1029,0x1029,0x1029,0x1029,0x1029,0x1029,0x1479, +3,3,3,3,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,3,3,3, +3,3,3,3,0x1041,0x1041,3,3,3,3,3,3,3,3,3,3, +3,3,3,3,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,3,3,3,3,3,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,3,3,3,0x1026,0x1023,0x1023,0x1023,0x1023,0x1023,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155, +0x12c9,0x1155,0x1155,0x1155,0x13ce,0x1473,0x1473,0x14b2,0x14b2,0x167a,0x16f8,0x16f8,3,3,3,3, +0x181e,0x17a6,0x17a6,0x17a6,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x12c6, +0x12c6,3,3,3,0x1155,0x1155,0x1155,0x1155,0x1473,0x1473,0x1473,0x1500,0x1500,0x15d5,0x167a,0x16f8, +0x16f8,3,3,3,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99, +0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0x17e2,0x17e2,0x17e2,3,3,3,3,0x17e2, +0x17e2,0x17e2,0x17e2,0x17e2,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1548,0x1548,0x1548,0x1548,0x17e2,3,3, +3,3,3,3,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a, +3,3,3,3,0x17a6,3,3,3,3,3,3,3,3,3,3,3, +3,3,3,3,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611, +0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,3,3,3,3,3,3,3,3, +3,3,3,3,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548, +0x1548,0x1548,3,3,0x167a,0x167a,0x167a,0x167a,0x16f8,0x181e,0x181e,0x181e,0x167a,0x167a,0x167a,0x17a6, +0x17a6,3,3,3,0x167a,0x167a,0x167a,0x16f8,0x16f8,0x16f8,0x16f8,0x181e,0x181e,0x18e1,3,3, +3,3,3,0x18e1,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8, +0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x17a9,0x17a9,0x17a9,0x18e1,3,3,3,3,3, +3,3,0x181e,0x181e,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x17a6,0x17a6,0x17a6,0x181e,0x181e, +0x18e1,3,3,0x18e1,0x17a6,0x17a6,0x17a6,0x17a6,0x17a6,0x17a6,0x17a6,0x17a6,0x181e,0x18e1,3,3, +3,3,3,3,0x17a9,0x17a9,0x17a9,0x17a9,0x17a9,0x17a9,0x17a9,0x1821,0x1821,3,3,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,0x693,0x693, +0x172e,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x561,0x561,0x561, +9,0x84f,9,9,9,9,9,9,9,9,9,9,9,9,9,9, +9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, +9,9,9,9,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41, +0xa41,0xa41,0xa41,0xa41,9,9,9,9,9,9,9,9,9,9,9,9, +9,9,9,9,0xa5,0xa5,0xa5,0xa5,0xa5,0x6d8,0x6d8,0x185d,0x185d,0x185d,0xc,0xc, +0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc, +0xc,0xc,0xc,0xc,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xc, +0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc, +0xc,0xc,0xc,0xc,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a, +0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0xc,0xc,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a, +0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a, +0x116a,0x116a,0xc,0x16ad,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x1173,0x12ba,0x1176,0x146d, +0x1407,0x14bb,0x14bb,0x14bb,0x14bb,0x14bb,0x1551,0x154e,0x1554,0x154e,0x1554,0x161a,0x16ad,0x16ad,0x16ad,0x173d, +0x173d,0x1734,0x1737,0x1734,0x1737,0x1734,0x1737,0x1734,0x1737,0x173a,0xc,0xc,0xc,0xc,0xc,0xc, +0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc, +0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x91e,0x91e,0x91e,0x91e, +0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0xf2d,0xf2d,0xf2d,0xf,0xf,0xb3a,0xb3a,0xb3a,0xb3a, +0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a, +0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30, +0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0x17ac,0x17ac,0x17ac, +0x17ac,0x1824,0xf,0xf,0xf,0xf,0xf,0xf,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038, +0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038, +0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0xf,0xf,0x13d4,0x13d4,0xf,0xf,0xf,0xf,0xf,0xf, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509, +0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b, +0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b, +0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0xf,0xf,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c, +0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c, +0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0xf,0xf,0xf,0xf,0xf,0xf,0x693,0x693,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701, +0x1701,0x1701,0x1701,0xf,0xf,0xf,0xf,0xf,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824, +0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0x306,0x306,0x309,0xa5,0x348,0x31b,0x31b,0x31e, +0xf6,0xf6,0x15,0x15,0x15,0x15,0x15,0x7d1,0x312,0xb4,0x33c,0x345,0xe7,0x312,0xc0,0xc0, +0xa5,0xcc,0xcc,0x306,0xf0,0xed,0x318,0x75,0x45,0x45,0x48,0x48,0x48,0x48,0x48,0x4b, +0x48,0x48,0x48,0x18,0x10b,0x56d,0x105,0x105,0x32a,0xc6,0xc3,0x327,0x324,0x321,0x336,0xbd, +0x330,0x333,0xc9,0xcc,0x32d,0x32d,0xc9,0xcc,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, +0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0xa5,0x102c,0x102c,0x102c, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x36,0x36,0x90,0x2eb,0x24,0x2dc,0x36,0x8d, +0x24,0x2eb,0x87,0x90,0x90,0x90,0x87,0x87,0x90,0x90,0x90,0x300,0x24,0x90,0x2ee,0x24, +0x81,0x90,0x90,0x90,0x90,0x90,0x24,0x24,0x3f,0x2dc,0x2e8,0x24,0x90,0x24,0x357,0x2d, +0x90,0x51,0x22e,0x369,0x90,0x90,0x7e,0x87,0x90,0x90,0x213,0x90,0x87,0x8a,0x8a,0x8a, +0x8a,0x6cf,0x6c6,0x960,0xa50,0x8a3,0x8a6,0x8a6,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x27, +0x42,0x390,0x2a,0x65d,0x6c0,0x6c9,0x6c9,0x6c9,0x897,0x897,0xa4a,0xa4a,0xa4a,0xa4a,0xde0,0xde3, +0xde3,0xf9f,0x1146,0x115b,0x115e,0x115e,0x1350,0x14b5,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1, +0x2f1,0x2f1,0x30,0x906,0x906,0x906,0x906,0x906,0x906,0x906,0x906,0x906,0x906,0x906,0x906,0x906, +0x906,0x906,0x906,0x906,0x906,0x906,0x906,0xa02,0x8a0,0x89d,0x89d,0x89d,0x89d,0x8a6,0x8a3,0x8a3, +0x8a3,0x8a3,0x894,0x89d,0xa47,0xb7f,0xba0,0xc2a,0xde6,0xde6,0xde6,0x2e2,0x2e2,0x33,0x33,0x33, +0x33,0x33,0x33,0x2e2,0x2e2,0x2e2,0x2e2,0x39,0x7b,0xa5,0xa5,0xa5,0xdb,0xb1,0xa8,0x8c7, +0x6db,0x6db,0x6d8,0x6d8,0x6d8,0x6d8,0x8ac,0x903,0x8ac,0x8ac,0x8b8,0x96f,0x966,0xa53,0xa5f,0x8b5, +0xa5f,0xa5f,0xb0d,0xa5f,0xa5c,0xb10,0xa5f,0x89a,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306, +0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0xa2,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0xa5,0xcf,0xcf,0xcf,0xcf,0xcf,0xd2,0xa5,0xcf,0xcf,0xa5,0xa5,0xa5,0xa5,0xcf,0xcf, +0x309,0x309,0xa5,0xa5,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0xcf,0xd2,0xd2,0xd2,0xcf,0xcf,0x336,0xcf,0x336,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0xa5,0xcf,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xcf,0xcf,0xa5,0x309,0xa5,0xa5,0xa5,0x6d8, +0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0xa5,0x6d8,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xde,0xd5,0xde,0xd5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x306,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x49e,0x49e, +0xa5,0xa5,0xa5,0xa5,0xcf,0xcf,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x4a4,0x4a1,0xa5, 0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, -0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0x1c17,0xc8a,0xc8a, -0xc8a,0xc8a,0xc84,0xc84,0xc87,0x1c14,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0x1c17, -0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93,0xc93, -0xc93,0xc93,0xc8d,0xc8d,0xc90,0xcf3,0xcf3,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab, -0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99,0xc99, -0xc99,0xc99,0xc96,0xc96,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae, -0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xc9f,0xb1,0xc9f,0xc9f, -0xc9f,0xb1,0xc9c,0xc9c,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1, -0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86, -0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0x15c9,0x15c9,0xb4, -0xd77,0xd77,0xd77,0xd83,0xd83,0xd83,0xd83,0xd77,0xd77,0xd83,0xd83,0xd83,0xb4,0xb4,0xb4,0xb4, -0xd83,0xd83,0xd77,0xd83,0xd83,0xd83,0xd83,0xd83,0xd83,0xd7a,0xd7a,0xd7a,0xb4,0xb4,0xb4,0xb4, -0xd7d,0xb4,0xb4,0xb4,0xd89,0xd89,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80,0xd80, -0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c, -0xd8c,0xd8c,0xb7,0xb7,0xd8c,0xd8c,0xd8c,0xd8c,0xd8c,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7, -0xb7,0xb7,0xb7,0xb7,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, -0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0xba,0xba,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, -0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, -0x15cc,0x15cc,0xba,0x1b5d,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0xdb0,0xdb0,0xdb0,0xdb0, -0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xbd,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0, -0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xbd, -0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0, -0xdb0,0xdb0,0xdb0,0xbd,0xdb0,0xdb0,0xbd,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0, -0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xbd,0xbd,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0, -0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xdb0,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd, -0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd, -0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3, -0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3, -0xdb3,0xdb3,0xdb3,0xc0,0xc0,0xc0,0xc0,0xc0,0xdf2,0xdf2,0xdf8,0xc3,0xc3,0xc3,0xc3,0xdef, -0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef, -0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xdef,0xc3,0xc3,0xc3,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5, -0xdf5,0xdf5,0xdf5,0xdf5,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9, -0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9,0xdb9, -0xdb9,0xdb9,0xc6,0xdb6,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2, -0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2, -0xdc2,0xdc2,0xc9,0xc9,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xc9,0xc9, -0xc9,0xc9,0xc9,0xc9,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911, -0x1911,0x1911,0x1911,0x1911,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xcc,0xcc,0xdc5,0xcc,0xdc5,0xdc5, -0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5, -0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0xcc,0xdc5,0xdc5,0xcc,0xcc,0xcc,0xdc5,0xcc,0xcc,0xdc5, -0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8, -0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, -0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0x15cf,0x15cf,0x1887,0x1887,0xd5, -0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x1b72,0x126,0x126,0x126, -0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91, -0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe88,0xe88,0xe8e,0xe8e,0xe88,0xd8,0xd8,0xe8b,0xe8b, -0x11d9,0x11d9,0x11d9,0x11d9,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0x1d43, -0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0, -0xea3,0xea0,0xea3,0xea0,0xea0,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0x122a,0x1227,0x122a,0x1227,0x1221, -0x1224,0x1224,0x14be,0x14bb,0xde,0xde,0xde,0xde,0xde,0xe9d,0xe9a,0xe9a,0xe9a,0xe97,0xe9d,0xe9a, -0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6, -0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, -0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1, -0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xea6,0xe1, -0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac,0xeac, -0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4, -0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xe7,0x14c1,0xe7,0xe7,0xe7,0xe7,0xe7,0x14c1,0xe7,0xe7, -0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09, -0xec7,0xebb,0xebb,0xebb,0xea,0xebb,0xebb,0xea,0xea,0xea,0xea,0xea,0xebb,0xebb,0xebb,0xebb, -0xec7,0xec7,0xec7,0xec7,0xea,0xec7,0xec7,0xec7,0xea,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7, -0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7, -0x19f2,0x19f2,0xea,0xea,0xeb8,0xeb8,0xeb8,0xea,0xea,0xea,0xea,0xebe,0xec1,0xec1,0xec1,0xec1, -0xec1,0xec1,0xec1,0xec1,0x19ef,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xec4,0xec4,0xec4,0xec4, -0xec4,0xec4,0xeca,0xeca,0xec1,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xed6,0xed6,0xed6,0xed6, -0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0x1230,0x1230,0xed,0xed,0xed,0xed,0xed6,0xed6,0xed6,0xed6, -0xed6,0xed9,0xed9,0xed9,0xed6,0xed6,0xed9,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6, -0xed6,0xed6,0xed,0xed,0xed,0xed,0xed,0xed,0xed3,0xed3,0xed3,0xed3,0xed3,0xed3,0xed3,0xed3, -0xed3,0xed3,0x122d,0xed,0xed,0xed,0xed0,0xed0,0xedf,0xedf,0xedf,0xedf,0xf0,0xf0,0xf0,0xf0, -0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedc,0xedf,0xedf,0xedf,0xedf,0xedf,0xf0,0xf0, -0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x15de,0x15e4,0x15e1,0x1932,0x188d,0x1956,0x1956,0x1956, -0x1956,0x1956,0x19f8,0x19f5,0x19fb,0x19f5,0x19fb,0x1abe,0x1b60,0x1b60,0x1b60,0x1c29,0x1c29,0x1c23,0x1c20,0x1c23, -0x1c20,0x1c23,0x1c20,0x1c23,0x1c20,0x1c26,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3, -0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3, -0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf06,0xf06,0xf06,0xf03,0xf03,0xefa,0xefa,0xf03, -0xf00,0xf00,0xf00,0xf00,0x1b63,0xf6,0xf6,0xf6,0x1395,0x1395,0x1395,0x1398,0x1398,0x1398,0x139b,0x139b, -0x139e,0x139b,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0x14d0,0x14d0, -0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf0c,0x1404,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9, -0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0x1401,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3, -0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xf3c,0xf2d,0xf27,0xf39,0xf36,0xf30,0xf30,0xf3f, -0xf2a,0xf33,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc9,0xfc9,0xfb1,0xfc9,0xfcc,0xfcf,0xfcf,0xfcf, -0xfcf,0xfcf,0xfcf,0xfcf,0x1c2c,0x102,0x102,0x102,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3, -0xfc3,0xfc3,0xfd5,0xfd5,0xfbd,0xfc0,0xfd5,0xfd5,0xfba,0xfbd,0xfbd,0xfbd,0xfbd,0xfbd,0xfbd,0xfbd, -0xfbd,0xfbd,0xfbd,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfbd,0xfbd,0xfbd,0xfbd, -0xfbd,0xfbd,0xfbd,0xfbd,0xfbd,0x1c2f,0x1c2f,0x102,0x1c38,0x1c35,0x1aca,0x1ac7,0x1aca,0x1aca,0x1aca,0x1b6f, -0x1b6c,0x1b6f,0x1b6c,0x105,0x105,0x105,0x105,0x105,0x1c38,0x1c35,0x105,0x1c35,0x105,0x1c35,0x1c38,0x1c35, -0x1c38,0x1c35,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105, -0x105,0x105,0x105,0x105,0x105,0x105,0x1c32,0x1c32,0x1c32,0x1b69,0x1b66,0x15ed,0x14d9,0x14d9,0x140d,0x10ef, -0x10ef,0x10ef,0x10ef,0x10ef,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0, -0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xfed,0xfed,0xff3,0xff3,0x108,0x108,0x108,0x108, -0x108,0x108,0x108,0x108,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc, -0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xff6,0xff6,0xff6,0xff6,0x1239,0x1239, -0x10b,0x10b,0x10b,0xff9,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3, -0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x17df,0x10e,0x10e, -0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e, -0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e, -0x1005,0x1005,0x1005,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x111, -0x1002,0x1002,0x1002,0x1002,0x15f6,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111, -0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008, -0x1008,0x1008,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x114,0x114,0x114,0x114,0x114,0x114,0x114, -0x1125,0x1125,0x1125,0x1125,0x1122,0x1122,0x1122,0x1122,0x1122,0x1122,0x1122,0x1122,0x1113,0x1113,0x1113,0x1113, -0x1113,0x1113,0x1113,0x1113,0x1122,0x1122,0x1119,0x1116,0x117,0x117,0x117,0x1128,0x1128,0x111c,0x111c,0x111c, -0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x117,0x117,0x117,0x1125,0x1125,0x1125, -0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112b,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e, -0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1140,0x1146,0x1146,0x11a,0x11a,0x11a,0x11a, -0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a, -0x1170,0x1170,0x1170,0x1170,0x116a,0x1893,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x1176,0x1176, -0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d, -0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188, -0x1188,0x1188,0x118e,0x1191,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x118b, -0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x1197,0x1197,0x1197,0x1197,0x1197,0x1197,0x11a0, -0x11a0,0x1197,0x1197,0x11a0,0x11a0,0x1197,0x1197,0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x123, -0x11a3,0x11a3,0x11a3,0x1197,0x11a3,0x11a3,0x11a3,0x11a3,0x11a3,0x11a3,0x11a3,0x11a3,0x1197,0x11a0,0x123,0x123, -0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x123,0x123,0x119a,0x11a9,0x11a9,0x11a9, -0x1605,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0x6d8,0x8b8,0x6d8,0x6d8,0x6d8,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306, +0x306,0x306,0x306,0x306,0xa5,0xa5,0xa5,0xa5,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306, +0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0xa5,0xa5,0x306,0x306,0x306,0x306,0x8ac,0x8ac, +0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x336,0x336,0xa5,0x306,0x306,0x306,0x306,0x306, +0x306,0x306,0xa5,0xa5,0xa5,0xa5,0xcf,0xcf,0xcf,0xcf,0x336,0x336,0xcf,0xcf,0x336,0x336, +0xa5,0xa5,0xa5,0xa5,0x336,0x336,0xcf,0xcf,0x336,0x336,0xa5,0xa5,0xa5,0xa5,0x336,0x336, +0x306,0xa5,0xcf,0x336,0xa5,0xa5,0x306,0x336,0x336,0x336,0xcf,0xcf,0xa5,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x336,0x306,0x336,0x306,0xa5,0xcf, +0xcf,0xcf,0xcf,0xcf,0xcf,0xa5,0xa5,0x306,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x918,0x918,0x8b8,0xae,0xae,0xae,0xae,0xa5,0x336,0x336,0xa5, +0xa5,0x306,0xa5,0xa5,0xa5,0xa5,0x306,0x306,0xa5,0xa5,0xa5,0xa5,0xa14,0xa14,0x8a9,0x8a9, +0xa56,0x6d8,0xae,0xae,0x30c,0xba,0x30c,0xae,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b, +0xa5,0xae,0xae,0xae,0xa5,0xa5,0xa5,0xa5,0x336,0xa5,0x336,0xa5,0xa5,0xa5,0xa5,0xa5, +0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0x49b,0xa5,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x336,0x336,0xcf,0x336,0x306,0x306,0xa5,0x306, +0x30c,0x306,0x306,0xa5,0x306,0x336,0xcf,0x336,0x6d8,0x6d8,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac, +0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0xa53,0xb37,0x1170,0xae,0xae,0xae,0xae,0x102c,0xa5,0xa5, +0xae,0xae,0x1032,0x1032,0xba,0xba,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x102c,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x309,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x102c,0xa5,0x102c,0xa5, +0xa5,0xa5,0xa5,0x102c,0x102c,0x102c,0xa5,0xf27,0xa5,0xa5,0xa5,0xb7,0xb7,0xb7,0xb7,0xfab, +0xfab,0xa5,0xab,0xab,0xae,0xa5,0xa5,0xa5,0x8b2,0x8af,0x8b2,0x8af,0x8b2,0x8af,0x8b2,0x8af, +0x8b2,0x8af,0x8b2,0x8af,0x8b2,0x8af,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +0x102c,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0x102c, +0x336,0xcf,0x336,0x336,0xd2,0xcf,0xcf,0x336,0x336,0xd2,0xcf,0x336,0xd2,0xcf,0xcf,0x336, +0xcf,0x336,0xea,0xe1,0xcf,0x336,0xcf,0xcf,0xcf,0xcf,0x336,0xcf,0xcf,0x336,0x336,0x336, +0x336,0xcf,0xcf,0x336,0xd2,0x336,0xd2,0x336,0x336,0x336,0x336,0x336,0x342,0xe4,0x336,0xe4, +0xe4,0xcf,0xcf,0xcf,0x336,0x336,0x336,0x336,0xcf,0xcf,0xcf,0xcf,0x336,0x336,0xcf,0xcf, +0xcf,0xd2,0xcf,0xcf,0xd2,0xcf,0xcf,0xd2,0x336,0xd2,0xcf,0xcf,0x336,0xcf,0xcf,0xcf, +0xcf,0xcf,0x336,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0x339,0x336,0xd2,0xcf,0x336,0x336,0x336,0x336,0xcf,0xcf,0x336,0x336,0xcf,0xd2,0x339,0x339, +0xd2,0xd2,0xcf,0xcf,0xd2,0xd2,0xcf,0xcf,0xd2,0xd2,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0xd2,0xd2,0x336,0x336,0xd2,0xd2,0x336,0x336,0xd2,0xd2,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0xcf,0xcf,0xcf,0xcf,0xcf,0x336,0xcf,0xcf,0xcf,0x336,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0xcf,0x336,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xd2,0xd2,0xd2,0xd2,0xcf,0xcf,0xcf,0xcf, +0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0x336,0xcf,0xcf,0xcf,0xcf, +0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf, +0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xd2,0xd2,0xd2,0xd2, +0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xd2,0xd2,0xd2,0xd2,0xcf,0xd8,0xcf,0xcf,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x12c,0x12c,0x12c,0x12c, +0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c, +0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d, 0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126, -0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af, -0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11af,0x11b2,0x129,0x129, -0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5, -0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x12c,0x12c,0x12c, -0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8, -0x11b8,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f, -0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be, -0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x11be,0x132,0x132,0x132,0x132,0x132,0x11bb, -0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x135,0x135,0x135,0x135, -0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4, -0x11c4,0x11c4,0x11c4,0x11c4,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138, -0x123f,0x123f,0x123f,0x123f,0x1248,0x123f,0x123f,0x123f,0x1248,0x123f,0x123f,0x123f,0x123f,0x123c,0x13b,0x13b, -0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x124b,0x1245,0x124b,0x1245,0x1245,0x1245,0x124b,0x124b,0x13b, -0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, -0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e, -0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, -0x1269,0x1269,0x1269,0x1269,0x1269,0x1266,0x1251,0x1266,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x141, -0x125a,0x1263,0x1251,0x1263,0x1263,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1266,0x1266,0x1266, -0x1266,0x1266,0x1266,0x1251,0x1251,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x141,0x141,0x1254, -0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x141,0x141,0x141,0x141,0x141,0x141, -0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x141,0x141,0x141,0x141,0x141,0x141, -0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x126c,0x126f,0x126f,0x126f,0x126f,0x125d,0x125d,0x141,0x141, -0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1644,0x1b84, -0x13b0,0x1389,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x138f,0x138c,0x1383,0x1383,0x13ad,0x1383,0x1383, -0x1383,0x1383,0x1392,0x1578,0x157e,0x157b,0x157b,0x19d1,0x17a6,0x17a6,0x1b4b,0x144,0x144,0x144,0x144,0x144, -0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284, -0x127b,0x127b,0x127e,0x1287,0x1281,0x1281,0x1281,0x1287,0x147,0x147,0x147,0x147,0x147,0x147,0x147,0x147, -0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374, -0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x1374,0x14d,0x14d,0x14d, -0x12a5,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x129c,0x12ab,0x12ab,0x1299,0x1299,0x1299,0x1299,0x150,0x13a4, -0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x150,0x150,0x150,0x150,0x1299,0x1299, -0x12c9,0x12bd,0x12c9,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153, -0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x12c6,0x12c6,0x12cc,0x12c0,0x12c3, -0x12e1,0x12e1,0x12e1,0x12db,0x12db,0x12d2,0x12db,0x12db,0x12d2,0x12db,0x12db,0x12e4,0x12de,0x12d5,0x156,0x156, -0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x156,0x156,0x156,0x156,0x156,0x156, -0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x159,0x159,0x159,0x159,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7, -0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7, -0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x12e7,0x159,0x159,0x159,0x159,0x12f3,0x12f3,0x12f3,0x12f3, -0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3,0x12f3, -0x12f3,0x12f3,0x15c,0x12f0,0x12ed,0x12ed,0x12ed,0x12ed,0x12ed,0x12ed,0x12ed,0x12ed,0x1302,0x1302,0x1302,0x1302, -0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302, -0x1302,0x1302,0x15f,0x15f,0x15f,0x12fc,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x1308,0x1308,0x1308,0x1308, -0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308,0x1308, -0x1308,0x1308,0x162,0x162,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x1305,0x130e,0x130e,0x130e,0x130e, -0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x130e,0x165, -0x165,0x165,0x165,0x165,0x130b,0x130b,0x130b,0x130b,0x130b,0x130b,0x130b,0x130b,0x1314,0x1314,0x1314,0x1314, -0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314, -0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x1314,0x16b,0x132c,0x132c,0x1c3b,0x16e, -0x16e,0x16e,0x16e,0x16e,0x16e,0x16e,0x16e,0x16e,0x16e,0x1a16,0x16e,0x16e,0x1557,0x1557,0x1557,0x1557, -0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1914,0x1914,0x1914,0x1914, -0x1914,0x1914,0x1914,0x1914,0x1914,0x1914,0x1914,0x1914,0x1914,0x1b75,0x171,0x171,0x171,0x171,0x171,0x171, -0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171, -0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x1419,0x1419, -0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419, -0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x137d,0x147f,0x147f,0x174,0x174,0x174,0x174,0x174, -0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a, -0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f, -0x147f,0x147f,0x147f,0x1917,0x174,0x174,0x174,0x174,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377, -0x1377,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x14a3,0x14a3,0x174,0x174,0x174,0x174,0x174,0x174, -0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x174,0x174, -0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, -0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, -0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422, -0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x141c,0x141c,0x141c,0x177,0x177,0x141f,0x177, -0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1425,0x142e,0x1428,0x1428,0x142e,0x142e,0x142e,0x1428,0x142e,0x1428, -0x1428,0x1428,0x1431,0x1431,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x142b,0x142b,0x142b,0x142b, -0x17d,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d,0x17d,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d, -0x17d,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d, -0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437,0x17d, -0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa, -0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143d,0x1452,0x1452,0x1443,0x1443,0x1443,0x1443,0x1443,0x180,0x180, -0x180,0x180,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440,0x1440, -0x1440,0x1440,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1c41,0x1c44,0x1c44,0x1c3e, -0x1c3e,0x1c44,0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x1614,0x1455,0x1455,0x1455,0x1455, -0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, -0x1455,0x1455,0x1455,0x1455,0x1455,0x183,0x183,0x183,0x183,0x183,0x183,0x183,0x1458,0x1458,0x1458,0x1458, -0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x186,0x186,0x1458,0x1458,0x1458, -0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1617,0x186,0x1458,0x1458,0x1458, -0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1488,0x186,0x1458,0x1458,0x1458, -0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1617,0x1617,0x1617,0x1617, -0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617, -0x1617,0x1617,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x149d,0x149a,0x149a,0x149a, -0x149a,0x149a,0x1623,0x1623,0x1623,0x1623,0x1623,0x1623,0x179d,0x1623,0x1623,0x1623,0x186f,0x1920,0x1920,0x1959, -0x1959,0x1b2d,0x1bde,0x1bde,0x189,0x189,0x189,0x189,0x1d2b,0x1cad,0x1cad,0x1cad,0x1623,0x1623,0x1623,0x1623, -0x1623,0x1623,0x1623,0x1623,0x1623,0x1623,0x1623,0x179a,0x179a,0x189,0x189,0x189,0x1623,0x1623,0x1623,0x1623, -0x1920,0x1920,0x1920,0x19bc,0x19bc,0x1aa3,0x1b2d,0x1bde,0x1bde,0x189,0x189,0x189,0x145b,0x145b,0x145b,0x145b, -0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b, -0x1cd1,0x1cd1,0x1cd1,0x18c,0x18c,0x18c,0x18c,0x1cd1,0x1cd1,0x1cd1,0x1cd1,0x1cd1,0x14fa,0x14fa,0x14fa,0x14fa, -0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa, -0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x18f, -0x14fa,0x18f,0x18f,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f, -0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x14fa,0x18f, -0x18f,0x18f,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x18f, -0x14fa,0x18f,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x14fa,0x18f, -0x14fa,0x18f,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f, -0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa, -0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa, -0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x18f,0x18f,0x18f,0x18f,0x14fa,0x14fa,0x14fa, -0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa, -0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, +0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x879,0x879,0x879,0x879, +0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x879,0x12c,0x12c,0x2d3,0x12c, +0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x11d,0x11d,0x8ca,0x9ff,0x1743,0x1743,0x129,0x12f,0x12c,0x126, +0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126, +0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c,0x126,0x12c,0x126, +0x12c,0x126,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126, +0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c,0x126, +0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c,0x126,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1, +0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x129,0x12f, +0x129,0x12f,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x12c,0x126, +0x129,0x12c,0x126,0x129,0x12c,0x126,0x129,0x12f,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126, +0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x129, +0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c, +0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x126,0x126,0x126,0x126,0x126,0x126,0x126, +0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x129,0x129,0x129,0x129,0x129,0x129,0x129, +0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x126,0x12c,0x2ac,0x2af,0x1743,0x1743,0x1743,0x1743, +0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x129,0x126,0x129,0x129, +0x129,0x129,0x129,0x129,0x126,0x129,0x126,0x126,0x129,0x129,0x126,0x126,0x129,0x129,0x126,0x129, +0x126,0x129,0x126,0x126,0x129,0x126,0x126,0x129,0x126,0x129,0x126,0x126,0x129,0x126,0x129,0x129, +0x126,0x126,0x126,0x129,0x126,0x126,0x126,0x126,0x126,0x129,0x126,0x126,0x126,0x126,0x126,0x126, +0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126, +0x129,0x129,0x126,0x126,0x129,0x126,0x129,0x126,0x126,0x126,0x126,0x126,0x12c,0x12c,0x126,0x12c, +0x126,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c,0x126,0x129,0x12f,0x12c, +0x126,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x12c, +0x126,0x12c,0x126,0x12c,0x126,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129, +0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129, +0x12f,0x12c,0x126,0x129,0x12f,0x12c,0x126,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129, +0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129, +0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x12f,0x12c,0x12c,0x12c,0x12c, +0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c, +0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12f,0x12f,0x12f,0x12f, +0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f, +0x12f,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x12c,0x189,0x189,0x57c,0x57c, +0x2a0,0x2a3,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x183,0xc84,0xc81,0xfc6, +0xfc6,0xfc6,0xfc6,0xfc6,0x12cc,0xf3c,0xf3c,0xc00,0xc00,0xb46,0xc00,0xc00,0xf48,0x57c,0x57c,0x186, +0x98d,0x189,0x189,0x189,0x189,0x189,0x189,0x189,0x189,0x189,0x189,0x189,0x189,0x189,0x189,0x189, +0x189,0x54c,0x54c,0x54c,0x54c,0x54c,0x54c,0x54c,0x54c,0x54c,0x54c,0x54c,0x54c,0x54f,0x54c,0x54c, +0x54c,0x54c,0x54c,0x54c,0x54c,0x54f,0x54c,0x54c,0x54f,0x54c,0x54c,0x54c,0x54c,0x54c,0x104d,0xfc3, +0x57f,0x189,0x186,0x186,0x186,0x57c,0x57c,0x57c,0x57c,0x57c,0x57c,0x57c,0x57c,0x186,0x186,0x186, +0x186,0x64e,0xe04,0xfc3,0x189,0x5d3,0x5d6,0x567,0x567,0xf48,0x104d,0x104d,0x549,0x549,0x549,0x549, +0x549,0x549,0x549,0x549,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192, +0x192,0x192,0x192,0x192,0x192,0x18c,0x18c,0x18c,0x18c,0x18c,0x18c,0x8df,0x8df,0xaa4,0xaa4,0x2a6, +0xaa1,0x1098,0x1098,0x1098,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, 0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, -0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x14f7,0x14f7,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, -0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x14fd, -0x14fd,0x14fd,0x14fd,0x14fd,0x150c,0x14fd,0x1500,0x1500,0x14fd,0x14fd,0x14fd,0x1503,0x1503,0x192,0x1509,0x1509, -0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1506,0x1512,0x1512,0x1512,0x1a22,0x1a1f,0x1a1f,0x1b7b, -0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc, -0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x151e,0x151e,0x151e,0x151e,0x151e,0x151e,0x151e,0x151e, -0x151e,0x151e,0x151e,0x151b,0x1515,0x1515,0x151b,0x151b,0x1524,0x1524,0x151e,0x1521,0x1521,0x151b,0x1518,0x195, -0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527, -0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527, -0x198,0x198,0x198,0x198,0x17f4,0x17f4,0x1527,0x1527,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, -0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x198,0x198,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, -0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x1533,0x1533,0x1533,0x1533,0x1533,0x1ad6,0x1ad6,0x1ad6, -0x1ad6,0x1ad6,0x1ad6,0x19b,0x19b,0x19b,0x19b,0x1ad0,0x1533,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530, -0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1ad3,0x1ad3,0x1ad3,0x1ad3,0x1ad3,0x1ad3,0x1ad3,0x1ad3, -0x19b,0x19b,0x19b,0x19b,0x19b,0x19b,0x19b,0x152d,0x152d,0x152d,0x152d,0x1536,0x1536,0x1536,0x1536,0x1536, -0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557,0x1557, -0x1557,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554, -0x1554,0x1554,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x155a,0x155a,0x155a,0x155a,0x155a,0x155a,0x155a,0x155a, -0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x13aa,0x13a7,0x13aa,0x1386,0x13a7,0x13ad,0x13ad,0x13b0, -0x13ad,0x13b0,0x13b3,0x13a7,0x13b0,0x13b0,0x13a7,0x13a7,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c, -0x156c,0x156c,0x156c,0x155d,0x1566,0x155d,0x1566,0x1566,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x1569,0x1560, -0x1ad9,0x1c50,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638, -0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1a7,0x1a7,0x1635,0x1635,0x1635,0x1635,0x1635,0x163b,0x1a7,0x1a7, -0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1641,0x1641,0x1641,0x1641,0x1aa,0x1aa,0x1aa,0x1aa, -0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x163e,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b, -0x1c9b,0x1c9b,0x1c9b,0x2af,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x17a9,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0, -0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0, -0x17a0,0x17a0,0x17a0,0x17a0,0x1ad,0x1ad,0x1ad,0x1ad,0x1b84,0x1c56,0x1c56,0x1c56,0x1c56,0x1c56,0x1c56,0x1c56, -0x1c56,0x1c56,0x1c56,0x1c56,0x1c53,0x1c53,0x1c53,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0, -0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0, -0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, -0x1653,0x1653,0x1653,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, -0x1653,0x1653,0x1653,0x1653,0x1653,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1653,0x1653,0x1653,0x1653, -0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1b3,0x1b3,0x1650,0x164a,0x164d,0x1656,0x1659,0x1659,0x1659,0x1659, -0x1659,0x1659,0x1659,0x1659,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1641,0x1641,0x1641,0x1641, -0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x165c,0x165c,0x165c,0x165c, -0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, -0x165c,0x1a25,0x1a25,0x1a25,0x1a25,0x1cd4,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b30,0x1b30,0x1b30,0x1b30, -0x1b30,0x1b30,0x1b30,0x1b30,0x1b30,0x1b30,0x1b30,0x1b30,0x1b9,0x1b9,0x1b9,0x1b9,0x1cb0,0x1b9,0x1b9,0x1b9, -0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1809,0x17ac,0x1665,0x17b2, -0x1bc,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1bc,0x1bc,0x1671,0x1671,0x1bc,0x1bc,0x1671, -0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1bc,0x1671,0x1671, -0x1671,0x1671,0x1671,0x1671,0x1671,0x1bc,0x1671,0x1671,0x1bc,0x1671,0x1671,0x1671,0x1671,0x1671,0x1bc,0x1aaf, -0x17af,0x166e,0x165f,0x1665,0x165f,0x1665,0x1665,0x1665,0x1665,0x1bc,0x1bc,0x1665,0x1665,0x1bc,0x1bc,0x1668, -0x1668,0x166b,0x1bc,0x1bc,0x180c,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x165f,0x1bc,0x1bc,0x1bc,0x1bc, -0x1bc,0x1677,0x1674,0x1674,0x1671,0x1671,0x1665,0x1665,0x1bc,0x1bc,0x1662,0x1662,0x1662,0x1662,0x1662,0x1662, -0x1662,0x1bc,0x1bc,0x1bc,0x1662,0x1662,0x1662,0x1662,0x1662,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc, -0x1bc,0x1bc,0x1bc,0x1bc,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c, -0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x1bf,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c, -0x168c,0x168c,0x168c,0x168c,0x169e,0x169e,0x169e,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1695,0x1698,0x1c2, -0x1c2,0x1c2,0x1c2,0x1c2,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x1c2,0x1c2, -0x1c2,0x1c2,0x1c2,0x1c2,0x180f,0x180f,0x180f,0x180f,0x16aa,0x16a7,0x1adc,0x1adc,0x1b8a,0x1b8d,0x1b87,0x1b87, -0x1c5,0x1c5,0x1c5,0x1c5,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c, -0x183c,0x183c,0x183c,0x183c,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, -0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, -0x1c8,0x1c8,0x1c8,0x1c8,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, -0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, -0x1c8,0x1c8,0x1c8,0x1c8,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x1c8,0x1c8,0x1c8,0x1c8, -0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, -0x1c8,0x1c8,0x1c8,0x1c8,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc, -0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16bc,0x16b3,0x16b6,0x16b9,0x16bc,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb, -0x1cb,0x1cb,0x1cb,0x1cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16bf,0x16bf,0x1ce,0x1ce,0x1ce,0x1ce,0x16c2, -0x16c2,0x16c2,0x16c2,0x16c2,0x16c8,0x16c8,0x17b5,0x16c8,0x16c8,0x16c8,0x16c5,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce, -0x1ce,0x1ce,0x1ce,0x1ce,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x1d1,0x1d1,0x16d1,0x16d1,0x16d1,0x16d1,0x16d1, -0x16d1,0x16d1,0x16d1,0x16d1,0x16ce,0x16ce,0x16ce,0x16ce,0x16ce,0x16ce,0x16ce,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1, -0x1d1,0x1d1,0x1d1,0x1d1,0x16d7,0x16e9,0x16e9,0x16dd,0x16e6,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4, -0x1d4,0x1d4,0x1d4,0x1d4,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x16e0,0x1d4,0x1d4, -0x1d4,0x1d4,0x1d4,0x1d4,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef, -0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef,0x16ef, -0x16ef,0x16ef,0x16ef,0x1d7,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x16ec,0x1d7,0x1d7, -0x1d7,0x1d7,0x16f2,0x16f2,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c, -0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x16fb,0x16fb,0x16fb,0x16fb,0x16fb,0x16f5,0x1701,0x16fe,0x16fe,0x16fe,0x16fe,0x16fe, -0x16fe,0x16fe,0x16fe,0x16fe,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16fe,0x16fe, -0x16fe,0x16fe,0x16fe,0x1da,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, -0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, -0x1707,0x1707,0x1707,0x1dd,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713, -0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1713,0x1710,0x1710,0x1710,0x1710,0x1710,0x1e0, -0x1e0,0x1e0,0x1e0,0x1e0,0x172b,0x172b,0x172e,0x172e,0x1731,0x1722,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3, -0x1e3,0x1e3,0x1e3,0x1e3,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1e3,0x1722, -0x1722,0x1722,0x1722,0x1722,0x1722,0x1722,0x1e3,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, -0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x1e3,0x1e3,0x1e3,0x1e3, -0x1e3,0x172b,0x172b,0x172b,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a, -0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x1e6,0x1e6,0x1e6, -0x1e6,0x1e6,0x1e6,0x1e6,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743, -0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1740,0x1740,0x1740, -0x1740,0x1e9,0x1e9,0x1e9,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, -0x175e,0x175e,0x175e,0x1746,0x1758,0x1758,0x1746,0x1746,0x1746,0x1746,0x1ef,0x1ef,0x1758,0x1758,0x175b,0x175b, -0x1746,0x1746,0x1758,0x174c,0x1749,0x174f,0x1761,0x1761,0x1752,0x1752,0x1755,0x1755,0x1755,0x1761,0x1818,0x1818, -0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1818,0x1815,0x1815,0x1815,0x1815, -0x1812,0x1812,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef, -0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef, -0x1ef,0x1ef,0x1ef,0x1ef,0x1f2,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764, -0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2, -0x1f2,0x1f2,0x1f2,0x1f2,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1f5,0x1f5,0x1f5,0x1f5,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1f5,0x1f5, -0x1b90,0x1b90,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5, -0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5, -0x1f5,0x1f5,0x1f5,0x1f5,0x176a,0x1779,0x1770,0x176d,0x177f,0x177f,0x1773,0x177f,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1782,0x1782, -0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb, -0x1fb,0x1fb,0x1fb,0x178b,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d, -0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x1a28,0x1fe, -0x1fe,0x181b,0x181b,0x181b,0x1827,0x1827,0x181b,0x181b,0x181b,0x181b,0x182a,0x181b,0x181b,0x181b,0x181b,0x181e, -0x1fe,0x1fe,0x1fe,0x1fe,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1821,0x1821, -0x1830,0x1830,0x1830,0x1821,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x201,0x201,0x201,0x201,0x201, -0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201, -0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x1845,0x1845,0x1845,0x1845, -0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x207, -0x1845,0x1845,0x207,0x207,0x207,0x207,0x207,0x1842,0x1842,0x1842,0x1842,0x1842,0x1848,0x1848,0x1848,0x1848, -0x1848,0x1848,0x1848,0x20a,0x1848,0x20a,0x1848,0x1848,0x1848,0x1848,0x20a,0x1848,0x1848,0x1848,0x1848,0x1848, -0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x20a,0x1848,0x1848,0x1848,0x1848,0x1848, -0x1848,0x1848,0x1848,0x1848,0x1848,0x184b,0x20a,0x20a,0x20a,0x20a,0x20a,0x20a,0x16a1,0x16a1,0x16a1,0x16a1, -0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x1854,0x1854,0x1854,0x1854, -0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x20d, -0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x1851,0x1851,0x1851,0x1851, -0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x20d, -0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x185a,0x185a,0x185a,0x185a, -0x1857,0x185a,0x185a,0x185d,0x1860,0x185d,0x185d,0x185a,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210, -0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x1857,0x1857,0x1857,0x1857,0x1857,0x18b7,0x18b7,0x18b7,0x18b7, -0x18ae,0x18ae,0x18ae,0x18a8,0x18ab,0x18ab,0x18ab,0x1adf,0x213,0x213,0x213,0x213,0x18b4,0x18b4,0x18b4,0x18b4, -0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x213,0x213,0x213,0x213,0x18b1,0x18b1,0x18d2,0x18d2,0x18d2,0x18d2, -0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x216,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2, -0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18cf, -0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x216,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18cf,0x18c0, -0x18d2,0x18d5,0x18d5,0x18c9,0x18c6,0x18c6,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, -0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x216,0x216,0x216,0x18e1,0x18e4,0x18ea,0x18ea, -0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18d8,0x18d8,0x18d8,0x18d8, -0x18d8,0x18d8,0x18d8,0x18d8,0x18d8,0x219,0x219,0x219,0x219,0x219,0x219,0x219,0x1a46,0x1a46,0x1a46,0x1a46, -0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x18db,0x18db,0x18db,0x18db, -0x18db,0x18db,0x18db,0x21c,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, -0x18db,0x18db,0x18db,0x18db,0x18db,0x21c,0x21c,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x21c,0x18db, -0x18db,0x21c,0x18db,0x18db,0x18db,0x18db,0x18db,0x21c,0x21c,0x21c,0x21c,0x21c,0x1cfb,0x1cfb,0x1cfb,0x1cfb, -0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1929,0x19c5,0x1b39,0x1b3c, -0x1bea,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x1be7,0x1be7,0x21f,0x21f, -0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x18ea,0x18ea,0x18ea,0x18ea, -0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x222,0x222,0x18de,0x18de, -0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x222,0x18e7,0x18de,0x18de, -0x18de,0x18de,0x18de,0x18de,0x18de,0x18e7,0x18de,0x18de,0x18e7,0x18de,0x18de,0x222,0x222,0x222,0x222,0x222, -0x222,0x222,0x222,0x222,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed, -0x18ed,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225, -0x225,0x225,0x225,0x225,0x1905,0x1905,0x18f6,0x18f0,0x18f0,0x1905,0x18f3,0x1908,0x1908,0x1908,0x1908,0x190b, -0x190b,0x18ff,0x18fc,0x18f9,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1902,0x1b93,0x18ff, -0x228,0x18f9,0x1a2b,0x1ae2,0x1b96,0x1b96,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228, -0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228, -0x228,0x228,0x228,0x228,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911, -0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x1911,0x22b,0x22b,0x22b,0x22b,0x190e,0x190e,0x190e,0x190e, -0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e, -0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x22b,0x22b,0x22b,0x22b,0x192c,0x192c,0x192c,0x192c, -0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1b3f,0x1b3f, -0x1b3f,0x1b3f,0x1b3f,0x1b3f,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x1cb9,0x1cb9,0x1cb9,0x231, -0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x273,0x273,0x1d2e,0x273, -0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x196b,0x196b,0x196b,0x196b, -0x196b,0x196b,0x196b,0x234,0x196b,0x196b,0x234,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b, -0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x195f,0x195f,0x195f, -0x195f,0x195f,0x195f,0x234,0x234,0x234,0x195f,0x234,0x195f,0x195f,0x234,0x195f,0x195f,0x195f,0x1962,0x195f, -0x1965,0x1965,0x196e,0x195f,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x1968,0x1968,0x1968,0x1968, -0x1968,0x1968,0x1968,0x1968,0x1968,0x1968,0x234,0x234,0x234,0x234,0x234,0x234,0x19ce,0x19ce,0x19ce,0x19ce, -0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce, -0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x237,0x237,0x237,0x237,0x197d,0x1980,0x1980,0x23a, -0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x1c95,0x1c95,0x1c95,0x1c95, -0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x1c95,0x198f,0x198f,0x198f,0x198f, -0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x23d,0x23d,0x23d,0x23d,0x23d,0x1c62,0x1c62,0x1c62,0x1c62, -0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x199b,0x199e,0x19ad,0x19ad, -0x199e,0x19a1,0x199b,0x1998,0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x1986,0x1971,0x1971,0x1971, -0x1971,0x1971,0x1971,0x1983,0x1983,0x1971,0x1971,0x1971,0x1986,0x1986,0x1986,0x1986,0x1ae8,0x1ae8,0x1ae8,0x1ae8, -0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8, -0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x1a31,0x1a31,0x1a31,0x1a31, -0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x243,0x243,0x1b48,0x1b48,0x1b48,0x1b48, -0x1bf0,0x1d34,0x1d34,0x1d34,0x1b48,0x1b48,0x1b48,0x1cbc,0x1cbc,0x276,0x276,0x276,0x1a43,0x1a43,0x1a43,0x1a43, -0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a40,0x1a40,0x1a40,0x1a34,0x1a34,0x1a34,0x1a34,0x1a34, -0x1a34,0x1a34,0x1a34,0x1a34,0x1a40,0x1a3a,0x1a37,0x1a3d,0x246,0x246,0x246,0x246,0x1a46,0x1a46,0x1a46,0x1a46, -0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46, -0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x249,0x249,0x1a46,0x1a46,0x1a46,0x1a55,0x1a55,0x1a55,0x1a55, -0x1a55,0x1a55,0x24c,0x1a55,0x1a55,0x24c,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55, -0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a55,0x1a52,0x1a52, -0x1a52,0x1a52,0x1a52,0x24c,0x1a49,0x1a49,0x24c,0x1a52,0x1a52,0x1a49,0x1a52,0x1a4c,0x1a55,0x24c,0x24c,0x24c, -0x24c,0x24c,0x24c,0x24c,0x1a5e,0x1a5e,0x1a61,0x1a61,0x1a58,0x1a58,0x1a58,0x1a58,0x24f,0x24f,0x24f,0x24f, -0x24f,0x24f,0x24f,0x24f,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x1a5b,0x24f,0x24f, -0x24f,0x24f,0x24f,0x24f,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64, -0x1a67,0x1a64,0x1a64,0x1a64,0x1a67,0x1a64,0x1a64,0x1a64,0x1a64,0x252,0x252,0x252,0x252,0x252,0x252,0x252, -0x252,0x252,0x252,0x252,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73, -0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a73,0x1a70,0x1a6a,0x1a6a,0x1a6d,0x1a6d,0x1a76,0x1a76,0x255,0x255,0x255, -0x255,0x255,0x255,0x255,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79, -0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258, -0x258,0x258,0x258,0x258,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c, -0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7c,0x1a7f,0x1a88,0x1a7c,0x1a7c,0x25b, -0x25b,0x25b,0x25b,0x25b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8e,0x25e,0x25e,0x25e,0x25e, -0x25e,0x25e,0x25e,0x25e,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97, -0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a97,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91,0x1a91, -0x1a91,0x1a94,0x1a94,0x1a94,0x1a94,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x261,0x261,0x261,0x261,0x261,0x261, -0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x1c83,0x1c83,0x1c83,0x1c83, -0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1c83,0x1ce6,0x1cec,0x1cec,0x1cec, -0x1cec,0x1cec,0x1cec,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9,0x1ce9, -0x1ce9,0x1ce9,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x1af4,0x1af4,0x1af4,0x1af4, -0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4, -0x1af4,0x1af4,0x1af4,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x1b03,0x1b03,0x1b03,0x1b03, -0x1b03,0x1b03,0x1b03,0x1b03,0x26a,0x26a,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03, -0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b00,0x1b00,0x1b00, -0x1af7,0x1af7,0x1af7,0x1af7,0x26a,0x26a,0x1af7,0x1af7,0x1b00,0x1b00,0x1b00,0x1b00,0x1afa,0x1b03,0x1afd,0x1b03, -0x1b00,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a, -0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x1b0f,0x1b0f,0x1b0f,0x1b0f, -0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x26d,0x26d,0x26d,0x1b06,0x1b06,0x1b06,0x1b06, -0x1b06,0x1b06,0x1b06,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b12,0x1b12,0x26d,0x26d,0x270,0x1b15,0x1b15,0x1b15, -0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15, -0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x1b15,0x270,0x270, -0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273, -0x1b42,0x1b42,0x1b42,0x273,0x273,0x1d31,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273, -0x1b45,0x1b45,0x1b45,0x1b45,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x19ce,0x19ce,0x19ce,0x19ce, -0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x1b48,0x1b48,0x1b48,0x1bf0, -0x1bf0,0x1bf0,0x1bf0,0x1d34,0x1d34,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x1b48,0x1b48,0x1b48,0x1b48, -0x1b48,0x1b48,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1cbc,0x1cbc,0x1cbc, -0x1cbc,0x1d34,0x1d34,0x1d34,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1d34, -0x1d34,0x1d34,0x276,0x1d34,0x1bf0,0x1bf0,0x1bf0,0x1cbf,0x1cbf,0x1cbf,0x276,0x276,0x276,0x276,0x276,0x276, -0x276,0x276,0x1d34,0x1d34,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1cbc,0x1cbc,0x1cbc,0x1d34,0x1d34, -0x276,0x276,0x276,0x276,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1cbc,0x1d34,0x276,0x276,0x276, -0x276,0x276,0x276,0x276,0x1cbf,0x1cbf,0x1cbf,0x1cbf,0x1cbf,0x1cbf,0x1cbf,0x1d37,0x1d37,0x276,0x276,0x276, -0x276,0x276,0x276,0x276,0x1b1e,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18, -0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279, -0x279,0x279,0x279,0x1b1b,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a, -0x1b21,0x1b21,0x1b21,0x1b21,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x1b27,0x27c,0x27c, -0x27c,0x27c,0x27c,0x1b24,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99, -0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f, -0x27f,0x27f,0x27f,0x27f,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x282,0x282,0x1bb7,0x282,0x282, -0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x282,0x1bb7,0x1bb7,0x282,0x1bb7,0x1bb7,0x1bb7,0x1bb7, -0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1bb7,0x1b9f,0x1bae,0x1bae,0x1bae, -0x1bae,0x1bae,0x282,0x1bae,0x1bb1,0x282,0x282,0x1b9f,0x1b9f,0x1bb4,0x1ba5,0x1bba,0x1bae,0x1bba,0x1bae,0x1ba2, -0x1bbd,0x1ba8,0x1bbd,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x1bab,0x1bab,0x1bab,0x1bab, -0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x282,0x282,0x282,0x282,0x282,0x282,0x1bf6,0x1bf6,0x1bf6,0x1bf6, -0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6, -0x1bf6,0x1bf6,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285, -0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285, -0x285,0x285,0x285,0x285,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3, -0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x28b,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3, -0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b, -0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x1bc6,0x1bc6,0x1bc6,0x1bc6, -0x1bc6,0x1bc6,0x1bc6,0x1bc6,0x1bc6,0x1bc6,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x1bf9,0x1bf9,0x1bf9,0x1bf9, -0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e, -0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e, -0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf, -0x1bcf,0x1bcf,0x291,0x1bc9,0x1bc9,0x1bcc,0x291,0x291,0x1bcf,0x1bcf,0x291,0x291,0x291,0x291,0x291,0x291, -0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62, -0x1c5f,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x1c62,0x294,0x1c65,0x1c65,0x294,0x294,0x294,0x294,0x294,0x294, -0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c5c,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b, -0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c68,0x1c68,0x297,0x297,0x297,0x297,0x297, -0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x29a, -0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x29a,0x1c6e,0x1c6e,0x29a,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e, -0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x1c6e,0x29a,0x1c71,0x1c77,0x1c77,0x1c74,0x1c74,0x1c74,0x2a0,0x1c74, -0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74, -0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x2a0,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74,0x1c74, -0x1c74,0x1c74,0x1c74,0x2a0,0x2a0,0x2a0,0x2a0,0x2a0,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a, -0x1c7a,0x1c7a,0x1c7d,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a, -0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x1c7a,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x1cef,0x1cef,0x1cef, -0x1cef,0x1cef,0x1cef,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3, -0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3, -0x2a3,0x2a3,0x2a3,0x2a3,0x1c83,0x1c83,0x1c80,0x1c80,0x1c80,0x1c80,0x1c86,0x1c86,0x1c86,0x1c86,0x2a6,0x2a6, -0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6, -0x2a6,0x2a6,0x2a6,0x2a6,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c, -0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c, -0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c, -0x1c8c,0x1c8c,0x1c8c,0x2a9,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x1c89,0x2a9,0x2a9, -0x2a9,0x2a9,0x2a9,0x2a9,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638, -0x1638,0x1638,0x1638,0x1638,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92,0x1c92, -0x1c92,0x1c92,0x1c8f,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac, -0x2ac,0x2ac,0x2ac,0x2ac,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x2af, -0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x1c9b,0x2af,0x1c9b,0x1c9b,0x2af,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98, -0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x2af,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98, -0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x2af,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x1c98,0x2af,0x1c98, -0x1c98,0x2af,0x2af,0x2af,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1, -0x1ca1,0x1ca1,0x2b2,0x2b2,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1, -0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2, -0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e, -0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5, -0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5, -0x2b5,0x1cf2,0x1cf2,0x1cf2,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cfb, -0x1cfb,0x1cfb,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8, -0x2b8,0x2b8,0x2b8,0x2b8,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x1cfe,0x2bb,0x2bb, -0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, -0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, -0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01,0x1d01, -0x1d01,0x1d01,0x1d01,0x1d01,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be, -0x1d04,0x1d04,0x1d19,0x1d10,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16, -0x1d16,0x2c1,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16, -0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d16,0x1d10,0x1d10,0x1d04,0x1d04,0x1d04,0x1d04,0x1d04,0x2c1, -0x2c1,0x2c1,0x1d10,0x1d10,0x1d04,0x1d13,0x1d07,0x1d1c,0x1d1c,0x1d0a,0x1d0a,0x1d0a,0x1d0a,0x1d0a,0x1d0a,0x1d0a, -0x1d0a,0x1d0a,0x1d0a,0x1d0a,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x1d0d,0x2c1,0x2c1, -0x2c1,0x2c1,0x2c1,0x2c1,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25, -0x1d1f,0x1d1f,0x1d1f,0x1d1f,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x1d22,0x2c4,0x2c4, -0x2c4,0x2c4,0x2c4,0x2c4,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, -0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, -0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x9b1,0x9b1,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a, -0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, -0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced, -0xced,0xced,0xced,0x136e,0x136e,0x136e,0x2ca,0x2ca,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, -0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, -0xf24,0xf24,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, -0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, -0xc09,0xc09,0x2cd,0x2cd,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1caa,0x1caa,0x1caa,0x1caa,0x1d28,0x2d0,0x2d0, -0x2d0,0x2d0,0x2d0,0x2d0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0, -0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0, -0x14a0,0x14a0,0x2d3,0x2d3,0x1872,0x1872,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6, -0x2d6,0x2d6,0x2d6,0x2d6,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8, -0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9, -0x2d9,0x2d9,0x2d9,0x2d9,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46, -0x1d46,0x1d46,0x1d46,0x1d46,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x2dc, -0x2dc,0x2dc,0x2dc,0x2dc,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a, -0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46, -0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46, -0x1d46,0x1d46,0x2df,0x2df,0x41a,0x40e,0x40e,0x40e,0x40e,0x40e,0x40e,0x40e,0x40e,0x41a,0x41a,0x41a, -0x41a,0x414,0x11eb,0x13c5,0x420,0x97b,0x97e,0x40b,0x40b,0x11e8,0x13c2,0x13c2,0x41d,0x41d,0x41d,0x41d, -0x41d,0x41d,0x41d,0x41d,0x11e8,0x40e,0x40e,0x41a,0xd32,0x420,0x420,0x420,0x420,0x420,0x420,0x420, -0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420, -0x420,0x420,0x420,0x420,0x420,0x420,0x40e,0x40e,0x900,0x903,0x999,0x999,0x999,0x999,0x999,0x999, -0x999,0x999,0x999,0x999,0x417,0x1023,0x1020,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x1593,0x11ee,0x11ee,0xf60, -0xf60,0xe28,0xf60,0xf60,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x420,0x423,0x420,0x420, -0x420,0x420,0x420,0x420,0x420,0x423,0x420,0x420,0x423,0x420,0x420,0x420,0x420,0x420,0x13c2,0x13c5, -0x411,0x420,0x41a,0x41a,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x13ce,0x4c2,0x4c2, -0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x13ce,0x1944, -0x1944,0x1044,0x4b3,0x4bc,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504,0x504, -0x504,0x504,0x504,0x504,0x504,0x4fe,0x4fe,0x4fe,0x4fe,0x4fe,0x4fe,0xc24,0xc24,0xe37,0xe37,0x906, -0xe34,0x14b2,0x14b2,0x14b2,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501, -0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501,0x501, -0x501,0x501,0x501,0x501,0x50a,0x50a,0x50a,0x1203,0x1203,0x1203,0x1203,0x1203,0x507,0x507,0x507,0x507, -0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507, -0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x507,0x1200,0x1200, -0x1200,0x1200,0x1200,0x1200,0x50d,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a, -0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a, -0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x50a,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513, -0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x513,0x513, -0x513,0x513,0x510,0x9ff,0x1071,0x1071,0x1077,0x1071,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513, -0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513, -0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x516,0x513,0x1074,0x1071,0x1074,0x1071,0x1074,0x1071, -0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b, -0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b, -0x6f0,0x6f0,0x6f3,0x546,0x6ff,0x6fc,0x6fc,0x702,0x570,0x570,0x52e,0x52e,0x52e,0x52e,0x52e,0xbb5, -0x6f6,0x54f,0x71d,0x720,0x567,0x6f6,0x555,0x555,0x546,0x561,0x561,0x6f0,0x56d,0x56a,0x6f9,0x540, -0x537,0x537,0x53a,0x53a,0x53a,0x53a,0x53a,0x53d,0x53a,0x53a,0x53a,0x531,0x579,0x576,0x573,0x573, -0x70e,0x55b,0x558,0x70b,0x708,0x705,0x71a,0x552,0x714,0x717,0x55e,0x561,0x711,0x711,0x55e,0x561, -0x543,0x546,0x546,0x546,0x564,0x54c,0x549,0xc39,0xb58,0xb58,0xb55,0xb55,0xb55,0xb55,0xc30,0xc30, -0xc30,0xc30,0xc36,0xd5f,0xd5c,0xe43,0xe49,0xc33,0xe49,0xe49,0xe49,0xe49,0xe46,0xe49,0xe49,0xc2d, -0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59a,0x5a0,0x78c,0x59d,0xa02,0xa23,0xb5b,0xb5b,0xb5b, -0xc3f,0xc3f,0xe4f,0xe4f,0xe4f,0xe4f,0x120c,0x120f,0x120f,0x13e3,0x1581,0x15ab,0x15ae,0x15ae,0x17c7,0x1947, -0x5af,0x5af,0x5c7,0x732,0x5a9,0x72c,0x5af,0x5c4,0x5a9,0x732,0x5be,0x5c7,0x5c7,0x5c7,0x5be,0x5be, -0x5c7,0x5c7,0x5c7,0x738,0x5a9,0x5c7,0x735,0x5a9,0x5bb,0x5c7,0x5c7,0x5c7,0x5c7,0x5c7,0x5a9,0x5a9, -0x5b2,0x72c,0x72f,0x5a9,0x5c7,0x5a9,0x73b,0x5ac,0x5c7,0x5b5,0x5cd,0x73e,0x5c7,0x5c7,0x5b8,0x5be, -0x5c7,0x5c7,0x5ca,0x5c7,0x5be,0x5c1,0x5c1,0x5c1,0x5c1,0xb64,0xb61,0xd62,0xe58,0xc54,0xc57,0xc57, -0xc51,0xc4e,0xc4e,0xc4e,0xc4e,0xc57,0xc54,0xc54,0xc54,0xc54,0xc4b,0xc4e,0xe55,0xf6c,0xf6f,0x107d, -0x1212,0x1212,0x1212,0x744,0x741,0x5d0,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x741,0x744,0x744,0x741,0x5d3, -0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x74a,0x5dc,0x5dc,0x5dc,0x5dc, -0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9, -0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5df,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e5,0x5df, -0x5e2,0x5e2,0x5df,0x5df,0x5df,0x5df,0x5e2,0x5e2,0x74d,0x74d,0x5df,0x5df,0x5e2,0x5e2,0x5e2,0x5e2, -0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e5,0x5e5,0x5e5,0x5e2,0x5e2,0x750,0x5e2, -0x750,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5e2,0x5df,0x5e2,0x5df,0x5df,0x5df,0x5df,0x5df,0x5df, -0x5e2,0x5e2,0x5df,0x74d,0x5df,0x5df,0x5df,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a, -0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0x753,0x5e8,0x753,0x753, -0x5eb,0x5e8,0x5e8,0x753,0x753,0x5eb,0x5e8,0x753,0x5eb,0x5e8,0x5e8,0x753,0x5e8,0x753,0x5f7,0x5f1, -0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x5e8,0x5e8,0x753,0x753,0x753,0x753,0x5e8,0x5e8,0x753, -0x5eb,0x753,0x5eb,0x753,0x753,0x753,0x753,0x753,0x759,0x5f4,0x753,0x5f4,0x5f4,0x5e8,0x5e8,0x5e8, -0x753,0x753,0x753,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x753,0x5e8,0x5e8,0x5e8,0x5eb,0x5e8,0x5e8, -0x5eb,0x5e8,0x5e8,0x5eb,0x753,0x5eb,0x5e8,0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x756,0x753,0x5eb,0x5e8, -0x753,0x753,0x753,0x753,0x5e8,0x5e8,0x753,0x753,0x5e8,0x5eb,0x756,0x756,0x5eb,0x5eb,0x5e8,0x5e8, -0x5eb,0x5eb,0x5e8,0x5e8,0x5eb,0x5eb,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5eb,0x5eb,0x753,0x753, -0x5eb,0x5eb,0x753,0x753,0x5eb,0x5eb,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5eb,0x5eb,0x5eb,0x5eb,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x753,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5eb,0x5eb,0x5eb,0x5eb,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5eb,0x5eb,0x5eb,0x5eb,0x5e8,0x5ee,0x5e8,0x5e8,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d, -0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0x5fa,0xb6d,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, -0x603,0x600,0x603,0x600,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x75c,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, -0x5fa,0x5fa,0x84c,0x84c,0x5fa,0x5fa,0x5fa,0x5fa,0x5fd,0x5fd,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, -0x5fa,0x852,0x84f,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, -0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa, -0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0xb6d,0xc63,0xb6d,0xb6d,0xb6d,0x606,0x606,0x606,0x606, -0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606, -0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x765,0x765,0x765,0x765, -0x765,0x765,0x765,0x765,0x765,0x765,0x60c,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0, -0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xcc0,0xdd1,0x76b,0x76b,0x76b,0x76b, -0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b, -0x60f,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x76b,0x76b,0x76b,0x76b, -0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x612,0x612,0x612,0x612,0x76b,0x76b,0x76b,0x76b, -0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76e,0x76e,0x76e,0x76e, -0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x76e,0x615,0x615,0x76e,0x76e, -0x76e,0x76e,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0x774,0x774,0x618,0x771, -0x771,0x771,0x771,0x771,0x771,0x771,0x618,0x618,0x618,0x618,0x61b,0x61b,0x61b,0x61b,0x774,0x774, -0x61b,0x61b,0x774,0x774,0x618,0x618,0x618,0x618,0x774,0x774,0x61b,0x61b,0x774,0x774,0x618,0x618, -0x618,0x618,0x774,0x774,0x771,0x618,0x61b,0x774,0x618,0x618,0x771,0x774,0x774,0x774,0x61b,0x61b, -0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x774,0x771, -0x774,0x771,0x618,0x61b,0x61b,0x61b,0x61b,0x61b,0x61b,0x618,0x618,0x771,0xb73,0xb73,0xb73,0xb73, -0xb73,0xb73,0xb73,0xb73,0xc69,0xc69,0xc69,0xc69,0xc69,0xcd8,0xcd8,0xc69,0x621,0x621,0x621,0x621, -0x61e,0x77d,0x77d,0x61e,0x61e,0x777,0x61e,0x61e,0x61e,0x61e,0x777,0x777,0x61e,0x61e,0x61e,0x61e, -0xdda,0xdda,0xc6c,0xc6c,0xe61,0xb76,0x621,0x621,0x77a,0x624,0x77a,0x621,0x61e,0x61e,0x61e,0x61e, -0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e, -0x61e,0x61e,0x61e,0x61e,0x61e,0x621,0x621,0x621,0x61e,0x61e,0x61e,0x61e,0x77d,0x61e,0x77d,0x61e, -0x61e,0x61e,0x61e,0x61e,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855, -0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x61e,0x77d,0x77d,0x627,0x77d, -0x777,0x777,0x61e,0x777,0x77a,0x777,0x777,0x61e,0x777,0x77d,0x627,0x77d,0xb76,0xb76,0xc6f,0xc6f, -0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xe5e,0xf1b,0x62a,0x62a,0x62a,0x62a, -0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a,0x62a, -0x62d,0x1473,0x1473,0x1473,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x15b4,0x633,0x633,0x633, -0x633,0x1473,0x62d,0x62d,0x633,0x633,0x1476,0x1476,0x639,0x639,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, -0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x1473,0x62d,0x62d,0x62d, -0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, -0x62d,0x783,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, -0x1473,0x62d,0x1473,0x62d,0x62d,0x62d,0x62d,0x1473,0x1473,0x1473,0x62d,0x1368,0x62d,0x62d,0x62d,0x636, -0x636,0x636,0x636,0x13ef,0x13ef,0x62d,0x630,0x630,0x633,0x62d,0x62d,0x62d,0xc75,0xc72,0xc75,0xc72, -0xc75,0xc72,0xc75,0xc72,0xc75,0xc72,0xc75,0xc72,0xc75,0xc72,0x780,0x780,0x780,0x780,0x780,0x780, -0x780,0x780,0x780,0x780,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, -0x62d,0x62d,0x62d,0x62d,0x1473,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d,0x62d, -0x62d,0x62d,0x62d,0x1473,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, -0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, -0x65a,0x65a,0x651,0x651,0x651,0x651,0x651,0x651,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, -0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, -0x654,0x654,0x654,0x654,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7, -0xbc7,0xbc7,0xbc7,0xbc7,0x65a,0x65a,0x9ae,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x651,0x651, -0xc78,0xdfe,0x1c0e,0x1c0e,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654, -0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654, -0x657,0x65d,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654, -0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654, -0x65a,0x654,0x657,0x65d,0x65a,0x654,0x65a,0x654,0x657,0x65d,0x65a,0x654,0x657,0x65d,0x65a,0x654, -0x65a,0x654,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2,0x13f2, -0x65a,0x654,0x65a,0x654,0x65a,0x654,0x657,0x65d,0x657,0x65d,0x65a,0x654,0x65a,0x654,0x65a,0x654, -0x65a,0x654,0x65a,0x654,0x65a,0x654,0x65a,0x654,0x657,0x65a,0x654,0x657,0x65a,0x654,0x657,0x65d, -0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, -0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657, -0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, -0x65a,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, -0x654,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d, -0x654,0x65a,0x96c,0x96f,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e, -0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x657,0x654,0x657,0x657,0x657,0x657,0x657,0x657,0x654,0x657,0x654,0x654, -0x657,0x657,0x654,0x654,0x657,0x657,0x654,0x657,0x654,0x657,0x654,0x654,0x657,0x654,0x654,0x657, -0x654,0x657,0x654,0x654,0x657,0x654,0x657,0x657,0x654,0x654,0x654,0x657,0x654,0x654,0x654,0x654, -0x654,0x657,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654, -0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x654,0x657,0x657,0x654,0x654,0x657,0x654,0x657,0x654, -0x654,0x654,0x654,0x654,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657, -0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x657, -0x657,0x657,0x657,0x657,0x657,0x657,0x657,0x65d,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, -0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a, -0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d, -0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65d,0x65a,0x65a,0x65a, -0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x65a,0x660,0x660,0x660,0x660,0x1089,0x1089,0x1089,0x15b7, -0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x17cd,0x17cd,0x8b5,0x8bb,0x8bb,0x8c7,0x8c7,0x8b8,0x8af,0x8b8, -0x8af,0x8b8,0x8af,0x8b8,0x8af,0x8b8,0x8af,0x8b8,0x66f,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x66f, -0x669,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66f,0x669,0x66c, -0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66f,0x669,0x66f,0x669,0x66f, -0x669,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c, -0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c,0x672,0x66f,0x669,0x66c, -0x672,0x66f,0x669,0x66c,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762, -0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f, -0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f, -0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x75f,0x768,0x768,0x768,0x768,0x768,0x768, -0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x768,0x765,0x765,0x765,0x765, -0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x765,0x76b,0x76b,0x76b,0x76b, -0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b, -0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x76b,0x786,0x786,0x786,0x786, -0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786, -0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0x786,0xcc6,0x918,0x90f,0x90c, -0x912,0x915,0x79b,0x79e,0x79e,0x79e,0x79e,0x79e,0x79e,0x79e,0x79e,0x79e,0x91e,0x79b,0x79b,0x79b, -0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b, -0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x91b,0x91b, -0x7a1,0x92d,0x930,0x936,0x858,0x867,0x94e,0x864,0x924,0x921,0x924,0x921,0x92a,0x927,0x92a,0x927, -0x924,0x921,0x85e,0x936,0x924,0x921,0x924,0x921,0x924,0x921,0x924,0x921,0x93c,0x942,0x945,0x93f, -0x7a7,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, -0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7aa,0x7c5,0x7a4,0x7cb,0x7ce, -0x7c8,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da, -0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7aa,0x7c5,0x7a4,0x7c5,0xcc9, -0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, -0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, -0x846,0x846,0x1362,0x1362,0x1362,0x1362,0x1362,0x849,0x85e,0x861,0x861,0x861,0x861,0x861,0x861,0x861, -0x861,0x861,0x987,0x987,0x987,0x987,0x86a,0x86a,0x939,0x94b,0x94b,0x94b,0x94b,0x948,0x85b,0x933, -0xb9a,0xb9a,0xb9a,0xcdb,0xcf9,0xcf6,0xbb8,0x909,0x870,0x86d,0x870,0x873,0x86d,0x870,0x86d,0x870, -0x86d,0x870,0x86d,0x86d,0x86d,0x86d,0x86d,0x86d,0x870,0x870,0x86d,0x870,0x870,0x86d,0x870,0x870, -0x86d,0x870,0x870,0x86d,0x870,0x870,0x86d,0x86d,0xcfc,0x882,0x87c,0x882,0x87c,0x882,0x87c,0x882, -0x87c,0x882,0x87c,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c, -0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x87c,0x87f,0x882,0x87c,0x87f,0x87c,0x87f, -0x87c,0x87f,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87f,0x87f,0x87c,0x87f,0x87f,0x87c,0x87f,0x87f, -0x87c,0x87f,0x87f,0x87c,0x87f,0x87f,0x87c,0x87c,0x87c,0x87c,0x87c,0x882,0x87c,0x882,0x87c,0x882, -0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x882,0x87c,0x87c,0x87c,0x87c,0x87c,0x87f,0x882,0x882,0x87f, -0x87f,0x87f,0x87f,0x954,0x957,0x885,0x888,0xce4,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, -0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, -0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x891,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, -0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e,0x88e, -0x88e,0x88e,0x88e,0x88e,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a, -0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a,0x89a, -0xde3,0xde3,0xf1e,0x894,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960, -0xddd,0xddd,0xddd,0xddd,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d, -0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d,0x89d, -0x89d,0x89d,0x89d,0x1b51,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966, -0x966,0x966,0x966,0x966,0x966,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0xde6,0xde6,0xde6,0xde6,0x969, -0x969,0x969,0x969,0x969,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0, -0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0, -0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0x8a0,0xde6,0xde6,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3, -0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3, -0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x8a3,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966, -0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6, -0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6, -0x8a6,0x8a6,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21, -0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0x11d0,0x11d0,0x11d0,0x11d0,0x8a9,0x8a9,0x8a9,0x8a9, -0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9, -0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8ac,0x8ac, -0x8a9,0x8ac,0x8a9,0x8ac,0x8ac,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8a9,0x8ac, -0x8a9,0x8ac,0x8a9,0x8ac,0x8ac,0x8a9,0x8a9,0x8ac,0x8ac,0x8ac,0x8a9,0x8a9,0x8a9,0x8a9,0x1572,0x1572, -0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced, -0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960, -0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960, -0x13a1,0x13a1,0x13a1,0x13a1,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0xddd,0xce7,0xce7,0xce7, -0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0x963,0x963,0x963,0x963, -0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963, -0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0x963,0xce7,0xce7,0xce7, -0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0x966,0x966,0x966,0x966, -0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966, -0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0xde6,0x9fc,0x9d8,0x9d8,0x9d8, -0x9d8,0x9d2,0x9d8,0x9d8,0x9ed,0x9d8,0x9d8,0x9e7,0x9e4,0x9ea,0x9ea,0x9ea,0x9ea,0x9ea,0x9ed,0x9d2, -0x9de,0x9d2,0x9d2,0x9d2,0x9c0,0x9c0,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9f0,0x9f0,0x9f0,0x9f0, -0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2,0x9d2, -0x9d5,0x9c6,0x9d2,0x9c6,0x9d2,0x9c3,0x9e1,0x9db,0x9e1,0x9db,0x9f6,0x9f6,0xa05,0xa05,0xa05,0xa05, +0x18f,0x18f,0x18f,0x18f,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b6,0x1b6,0x1b6,0x1b6, +0x1b6,0x1b6,0x1b6,0x1b6,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b6,0x1b6,0x1b6,0x1b6, +0x1b6,0x1b6,0x1b6,0x1b6,0x1d1,0x1d1,0x1d1,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0x1ce,0x1ce,0x1ce,0x1ce, +0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce, +0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0xe0a,0xe0a, +0xe0a,0xe0a,0xe0a,0xe0a,0x1d4,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1, +0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1, +0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237, +0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x237,0x237, +0x237,0x237,0x22b,0x660,0xc99,0xc99,0xcb1,0xc99,0x36c,0x36c,0x36c,0x36c,0x36c,0x36c,0x36c,0x36c, +0x36c,0x36c,0x36c,0x36c,0x231,0x231,0x231,0x231,0x363,0x363,0x363,0x363,0x363,0x363,0x363,0x363, +0x363,0x363,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237, +0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237, +0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0x23d,0x237,0xc9c,0xc99,0xc9c,0xc99,0xc9c,0xc99, +0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x1044,0x555,0x555,0x555,0x555,0x555,0x555, +0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x1044,0x1524,0x1524,0xcba,0x5ac,0x246, +0x49e,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x648,0x648,0x648,0x648,0x642,0x642, +0x50a,0x51f,0x51f,0x51f,0x51f,0x51c,0x459,0x504,0x7e3,0x7e3,0x7e3,0x91b,0x939,0x936,0x7f8,0x2a9, +0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df,0x2df, +0x2df,0x2df,0x2df,0x2df,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc, +0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc, +0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4, +0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f4,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1, +0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306, +0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306, +0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381, +0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381, +0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x381,0x909,0x3b1,0x3a8,0x3a5,0x3ab,0x3ae,0x39f,0x3a2, +0x3a2,0x3a2,0x3a2,0x3a2,0x3a2,0x3a2,0x3a2,0x3a2,0x3b4,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f, +0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f, +0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x63f,0x63f,0x3ba,0x3f9,0x3f9,0x3f9, +0x3f9,0x3f9,0x3f9,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3, +0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3f3,0x3bd,0x3db,0x3b7,0x3e1,0x3e4,0x3de,0x3f6,0x3f6,0x3f6, +0x3f6,0x3f6,0x3f6,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0, +0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3f0,0x3bd,0x3db,0x3b7,0x3db,0x90c,0x3c6,0x4fe,0x501,0x507, +0x44d,0x4b3,0x534,0x4b0,0x53a,0x537,0x540,0x53d,0x4fb,0x4f8,0x4fb,0x4f8,0x4f5,0x4f2,0x49e,0x507, +0x4f5,0x4f2,0x4f5,0x4f2,0x4f5,0x4f2,0x4f5,0x4f2,0x50d,0x513,0x516,0x510,0x4bc,0x4bc,0x4bc,0x4bc, +0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc, +0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0xa1a,0xa1a,0xb40,0x450,0x56a,0x567,0x56a,0x567, +0xd8c,0xd89,0xd8c,0x12de,0x12db,0x12de,0x12db,0x12de,0x12db,0x12de,0x13e6,0x13e3,0x462,0x474,0x474,0x492, +0x492,0x468,0x456,0x468,0x456,0x468,0x456,0x468,0x456,0x468,0x456,0x468,0x528,0x528,0x528,0x528, +0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x45f,0x45f,0x45f, +0x45f,0x45f,0x45f,0xa0b,0xa0b,0xa0b,0xa0b,0x52e,0x52e,0x52e,0x52e,0x52e,0x45f,0x45f,0x45f,0x45f, +0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f, +0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0x45f,0xa0b,0xa0b, +0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad, +0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad, +0x4ad,0x4ad,0x4b6,0x4b6,0x4ad,0x4b6,0x4ad,0x4b6,0x4b6,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad, +0x4ad,0x4ad,0x4ad,0x4b6,0x4ad,0x4b6,0x4ad,0x4b6,0x4b6,0x4ad,0x4ad,0x4b6,0x4b6,0x4b6,0x4ad,0x4ad, +0x4ad,0x4ad,0x110d,0x110d,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e, +0x91e,0x91e,0x91e,0x91e,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6, +0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6, +0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d, +0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xd74,0xd74,0xd74,0xd74, +0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf, +0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf, +0x4bf,0x4bf,0xf33,0xf33,0xf33,0xf33,0xf33,0x4c8,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2, +0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2, +0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c5,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2, +0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x4c2, +0x4c2,0x4c2,0x4c2,0x4c2,0x4ce,0x4cb,0x4ce,0x4d1,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb,0x4ce,0x4cb,0x4cb, +0x4cb,0x4cb,0x4cb,0x4cb,0x4ce,0x4ce,0x4cb,0x4ce,0x4ce,0x4cb,0x4ce,0x4ce,0x4cb,0x4ce,0x4ce,0x4cb, +0x4ce,0x4ce,0x4cb,0x4cb,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528, +0xa0b,0xa0b,0xa0b,0xa0b,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da, +0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da, +0x4da,0x4da,0x4da,0x16a1,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd, +0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd, +0x4dd,0x4dd,0x4dd,0x4dd,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x933,0x4e6,0x4e0,0x4e6, +0x4e0,0x4e6,0x4e0,0x4e6,0x4e0,0x4e6,0x4e0,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0, +0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e6, +0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e3,0x4e0,0x4e0,0x4e0,0x4e0,0x4e0,0x4e0,0x4e3,0x4e3,0x4e0,0x4e3, +0x4e3,0x4e0,0x4e3,0x4e3,0x4e0,0x4e3,0x4e3,0x4e0,0x4e3,0x4e3,0x4e0,0x4e0,0x4e0,0x4e0,0x4e0,0x4e6, +0x4e0,0x4e6,0x4e0,0x4e6,0x4e0,0x4e0,0x4e0,0x4e0,0x4e0,0x4e0,0x4e6,0x4e0,0x4e0,0x4e0,0x4e0,0x4e0, +0x4e3,0x4e6,0x4e6,0x4e3,0x4e3,0x4e3,0x4e3,0x4ef,0x522,0x4e9,0x4ec,0x92a,0x528,0x528,0x528,0x528, +0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528, +0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0xf39,0xf39,0xf39,0xf39, +0xf03,0xf03,0xf03,0xf03,0xf03,0xf03,0xf03,0xf03,0xa0b,0x915,0x915,0x915,0x915,0x915,0x915,0x915, +0x915,0x915,0x915,0x915,0x915,0x915,0x915,0x915,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528, +0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528,0x528, +0x528,0x528,0x528,0x528,0x528,0x528,0x528,0xa0b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b, +0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b, +0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x52b,0x915,0x915,0x915,0x915,0x915,0x915,0x915, +0x915,0x915,0x915,0x915,0x915,0x915,0x915,0x915,0x68d,0x669,0x669,0x669,0x669,0x663,0x669,0x669, +0x67e,0x669,0x669,0x678,0x675,0x67b,0x67b,0x67b,0x67b,0x67b,0x67e,0x663,0x66f,0x663,0x663,0x663, +0x6ab,0x6ab,0x663,0x663,0x663,0x663,0x663,0x663,0x681,0x681,0x681,0x681,0x681,0x681,0x681,0x681, +0x681,0x681,0x663,0x663,0x663,0x663,0x663,0x663,0x663,0x663,0x663,0x663,0x666,0x6b1,0x663,0x6b1, +0x663,0x6ae,0x672,0x66c,0x672,0x66c,0x687,0x687,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690, +0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690, +0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696, +0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696, +0x696,0x696,0x696,0x696,0x696,0x696,0x693,0x693,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696, +0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696, +0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x699,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c, +0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c, +0x69c,0x69c,0x69c,0x69c,0x699,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c, +0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c,0x69c, +0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8, +0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x6d8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea, +0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea, +0x705,0x705,0x705,0x705,0x705,0x705,0x705,0xa9b,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705, +0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705, +0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0xa9b,0x705,0x705,0x705,0x705, +0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x72c,0x72c,0x72c,0x72f, +0x72f,0x72c,0x72c,0x72c,0x729,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c, +0x813,0x813,0x726,0x801,0x801,0x801,0x801,0x801,0x801,0x801,0x726,0x726,0x72c,0x72c,0x72c,0x72c, +0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c, +0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x72c,0x762,0x762,0x762,0x762, +0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762, +0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x765, +0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762, +0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x819,0x819,0x762, +0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762, +0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x762,0x7d4,0x7d4,0x7d4,0x7d4,0x7d4,0x7d4,0x7d4,0x7d4, +0x7d4,0x7d4,0x77a,0x77a,0x76b,0x76b,0x76b,0x76b,0x774,0x774,0x774,0x774,0x774,0x774,0x771,0x771, +0x81f,0x81f,0xccf,0xccf,0xccf,0xccf,0xda4,0xda4,0x774,0x774,0xccf,0x774,0x774,0x774,0x777,0x774, +0xccf,0x774,0x774,0xcc6,0x76e,0x81f,0x81f,0x81f,0x81f,0x771,0x81f,0xda4,0xda4,0xda4,0x81f,0x822, +0x76e,0x825,0xdaa,0xcc9,0xcc9,0xda4,0xda4,0xccf,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774, +0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774, +0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789, +0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789, +0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x789,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc, +0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7b9,0x7bf,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0xe25, +0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe22,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc, +0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc, +0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7bc,0x7c2,0x7c2,0x7c2,0x7c2, +0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2, +0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7c2,0x7da,0x7da,0x7da,0x7da, +0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da,0x7da, +0x7da,0x7da,0x7da,0x7da,0x1035,0x1035,0x1035,0x16fe,0x16fe,0x16fe,0x16fe,0x16fe,0x7dd,0x7dd,0x7dd,0x7dd, +0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, +0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7e0,0x7e0,0x7e0,0x7e0, +0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0, +0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e6,0x7e6,0x7e6,0x7e6, +0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6, +0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x1701,0x1701, +0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x7e9,0x7e9,0x92d,0x92d,0x7e9,0x7e9,0x7e9,0x7e9, +0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x92d,0x7e9,0x7e9,0x7e9, +0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec, +0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ef,0x7ec,0x7ec, +0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec, +0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec,0x7ec, +0x855,0x855,0x855,0x855,0x855,0x885,0x885,0x88b,0x88b,0x88b,0x852,0x852,0x852,0x888,0x888,0x888, +0x888,0x888,0x888,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x88b,0x88b,0x88b,0x88b,0x88b, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, +0x852,0x852,0x855,0x855,0x88b,0x88b,0x88b,0x852,0x852,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b,0x88b, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, +0x852,0x852,0x852,0x852,0x852,0x852,0x88b,0x88b,0x88b,0x88b,0x852,0x852,0x852,0x852,0x852,0x852, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x855,0x855,0x855,0x855,0x855,0x855,0x852,0x852,0x852, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x1359,0x1359,0x861,0x858,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x858,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x861,0x861, +0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x858,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x858,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x858,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b, +0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b,0x85b, +0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861, +0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x861,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e,0x85e, +0x85e,0x85e,0x85e,0x85e,0x861,0x861,0x861,0x861,0x867,0x867,0x867,0x867,0x867,0x867,0x98a,0x98a, +0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864, +0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x864,0x987,0x987,0x9e4,0x9e4,0x9e4,0x9e4, +0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x867,0x867,0x867,0x867, +0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867, +0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x867,0x876,0x876,0x876,0x876, +0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876, +0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x876,0x11bb,0x87c,0x87c,0x87c,0x87c, +0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c, +0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87c,0x87f,0x87f,0x87f,0x87f, +0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f, +0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x87f,0x1701, +0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x17ac,0x17ac,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882, +0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882, +0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x882,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8ac,0x8b8, +0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x96c, +0x972,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xb91,0xb91,0xb91,0xb91, +0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0x8ac,0xa11,0xa11,0xa11,0xa11,0xa11,0xa11, +0x96c,0x96c,0xa53,0xb34,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xc36,0xf18,0xf18, +0xa65,0xa65,0xa65,0xa65,0xa65,0xa6b,0xa68,0xb91,0xb91,0xb91,0xb91,0x107d,0xc51,0x107d,0xfae,0xfae, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x912,0x90f,0x912,0x90f,0x912,0x90f,0xd68,0xd65,0xc57,0xc54,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8be, +0x8bb,0x912,0x90f,0x8be,0x8bb,0x8be,0x8bb,0x8be,0x8bb,0x8be,0x8bb,0x8be,0x8bb,0x8be,0x8bb,0x8be, +0x8bb,0x8be,0x8bb,0x8be,0x8bb,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8be,0x8bb,0x8be,0x8bb,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8be,0x8bb,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8c4,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8c4,0x8c4,0x8c4,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8, +0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8b8,0x8c1,0x8b8,0x8b8,0x8b8,0x91e,0x91e,0x91e,0x91e, +0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e, +0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x91e,0x96c,0xa11,0xa53,0xa53, +0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xb34,0xb34,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53,0xb8e,0xc36, +0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xf2a,0xf2a,0xf1b,0x96c,0x96c,0x96c,0x96c, +0x96c,0x96c,0x96c,0x96c,0x96c,0x96c,0x96c,0x96c,0x96c,0x96c,0xa53,0xa53,0xa53,0xa53,0xa53,0xa53, +0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xd6e,0xd6e,0xc36,0xc36,0xc36,0x9b1,0x9b1,0x9b1,0x9b1, +0x9b1,0x9b1,0x996,0x996,0x996,0x996,0x996,0x984,0x9bd,0x9bd,0x9bd,0x9b7,0x9bd,0x9bd,0x9bd,0x9bd, +0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9b7,0x9bd,0x9bd,0x9bd,0x9bd,0x99f,0x99f,0x9ba,0x9ba, +0x9ba,0x9ba,0x99c,0x99c,0x99c,0x99c,0x99c,0x9b1,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc, +0xabc,0xabc,0xabc,0xabc,0xa8f,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0x9bd,0x9bd,0x9bd,0x9bd, +0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9b7,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd, +0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x9bd,0x99f,0x99f,0x99f,0x9ae,0x9ae,0x9ae,0x9ae, +0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae, +0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9b1,0x9b1,0x9b1,0x9b1, +0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1, +0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9b1,0x9db,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db, +0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9db,0x9e4,0x9e4,0x9e4,0x9e4, +0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4, +0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0x9e4,0xa05,0xa05,0xa05,0xa05, 0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05, -0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa08,0xa08,0xa08,0xa08, -0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08, -0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa0b,0xa0b,0xa0b,0xa0b, -0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b, -0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa14,0xa14,0xa14,0xa14, -0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14, -0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa0e,0xa0e,0xa17,0xa17,0xa17,0xa17, -0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, -0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa11,0xa11,0xa14,0xa14,0xa14,0xa14, -0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14, -0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa17,0xa17,0xa17,0xa17, -0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, -0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa1a,0xa1d,0xa1d,0xa1d, -0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d, -0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1a,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d, -0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d,0xa1d, -0xa1d,0xa1d,0xa1d,0xa1d,0xabf,0xabf,0x106b,0xabf,0xabf,0xabf,0xac2,0xabf,0x106b,0xabf,0xabf,0x1062, -0xab9,0xaad,0xaad,0xaad,0xaad,0xabc,0xaad,0x1053,0x1053,0x1053,0xaad,0xab0,0xab9,0xab3,0x1059,0x1065, -0x1065,0x1053,0x1053,0x106b,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xbbe,0xac5,0xac5, -0xab6,0xab6,0xab6,0xab6,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabc,0xabc,0xaad,0xaad,0x106b,0x106b, -0x106b,0x106b,0x1053,0x1053,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf, -0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf,0xabf, -0xabf,0xabf,0xabf,0xabf,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40,0xad4,0xad4,0xad4,0xad4, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xe40, -0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4,0xad4, -0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada, +0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa41,0xa41,0xa41,0xa41, +0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41, +0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xa41,0xb16,0xb16,0xb16,0xb16, +0xb16,0xb16,0xb16,0xb16,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d, +0xa4d,0xa4d,0xa4d,0xb8b,0xb8b,0xb8b,0xb8b,0xc33,0xc33,0xc33,0xc33,0xc33,0xa62,0xa62,0xa62,0xa62, +0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f, +0xa5f,0xa5f,0xa5c,0xb13,0xc42,0xc39,0xc4e,0xc36,0xa59,0xa59,0xc36,0xc36,0xa86,0xa83,0xa86,0xa83, +0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa86,0xa83, +0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa86,0xa83,0xa9e,0xa9e,0xa9e,0xa9e, +0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e, +0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xa9e,0xaad,0xaad,0xaad,0xaad, +0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad, +0xaad,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaaa,0xaaa,0xaaa,0xaaa, +0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa, +0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaaa,0xaad,0xaad,0xaad,0xaad, +0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad, +0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xaad,0xac8,0xac8,0xac8,0xac8, +0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, +0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xab0,0xabc,0xabc,0xabc,0xabc, +0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc, +0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xabc,0xac8,0xac8,0xac8,0xac8,0xac8,0xadd,0xadd,0xadd,0xadd, +0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0x1779,0xada,0xada,0xada,0xada, 0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada, -0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xadd,0xae3,0xae0, -0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209, -0x1206,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0, -0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0, -0xae0,0xae0,0xae0,0xae0,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5, -0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5,0xaf5, -0xaf5,0xaf5,0xaf5,0xaf5,0xb25,0xb25,0xb25,0xb28,0xb28,0xb25,0xb25,0xb25,0xb22,0xb25,0xb25,0xb25, -0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb0a,0xb0a,0xb1f,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8, -0xaf8,0xaf8,0xb1f,0xb1f,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25, -0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25, -0xb25,0xb25,0xb25,0xb25,0xb49,0xb49,0xb49,0xb49,0xb49,0xb34,0xb34,0xb49,0xb49,0xb49,0xb49,0xb49, -0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49, -0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb4c, -0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49, -0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb6d,0xb6d,0xb6d,0xb6d, -0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d, -0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xc63,0xc63,0xc63,0xc63,0xc63,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb8b,0xb8b,0xb8b,0xb8b, -0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, -0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb91,0xb91,0xb91,0xb91, -0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91, -0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb91,0xb9d,0xb9d,0xb9d,0xb9d, -0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d,0xb9d, -0xb9d,0xb9d,0xb9d,0xb9d,0x1479,0x1479,0x1479,0x1bd2,0x1bd2,0x1bd2,0x1bd2,0x1bd2,0xba0,0xba0,0xba0,0xba0, -0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0, -0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0xba0,0x1bd5,0x1bd5, -0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3, -0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba6,0xba3,0xba3, -0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3, -0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3,0xba3, -0xba9,0xba9,0xcea,0xcea,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9, -0xba9,0xba9,0xba9,0xba9,0xcea,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9,0xba9, -0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd, -0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0x15ba, -0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xd71,0xd71,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3, -0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3, -0xbd3,0xbd3,0xd6e,0xd6e,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc, -0xdbc,0xdbc,0xdbc,0xdbc,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6, -0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xbd6, -0xbd6,0xbd6,0xbd6,0xbd6,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, -0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, -0xbd9,0xbd9,0xbd9,0xbd9,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbdf,0xbeb,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5, -0xbe5,0xbee,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbf1, -0xbf1,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe8,0xbe8,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5,0xbf1,0xbf1,0xbf1, -0xbf1,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbf1,0xbf1,0xbf1,0xbf1,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8, -0xbe8,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0x17d0,0x17d0, -0xbfd,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbf4,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbf4,0xbfa,0xbfa, +0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0xada,0x1776,0xadd,0xadd,0xadd,0xadd, +0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd, +0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xadd,0xaf2,0xaf2,0xb6d,0xaf2, +0xaf2,0xaf2,0xb70,0xaf2,0xaf2,0xaf2,0xaf2,0xb6d,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2, +0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xafb,0xafb,0xafb,0xafb, +0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb, +0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xb01,0xb01,0xb01,0xb01, +0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01, +0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb0a,0xb0a,0xb0a,0xb0a, +0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a, +0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb3a,0xb3a,0xb3a,0xb3a, +0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a, +0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb43,0xb43,0xb43,0xb43, +0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xd77,0xd77,0xd77,0xd77, +0xd77,0xd77,0xd77,0xd77,0xd77,0xd77,0xd77,0xd77,0xd77,0xd77,0xd77,0xd77,0xb73,0xb73,0xb49,0xb49, +0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xd89,0xd89,0xd8c,0xd8f,0xd89,0xd80,0xd83,0xd83,0xd86, +0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xb82,0xb82,0xca2,0xc9f, +0xca2,0xc9f,0xca2,0xc9f,0xca2,0xc9f,0xca2,0xc9f,0xca2,0xc9f,0xca2,0xc9f,0xc90,0xc90,0xc96,0xc90, +0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xb91,0xb91,0xb91,0xb8e, +0xb8e,0xb8e,0xb8e,0xb8e,0xdec,0x102c,0x102c,0x102c,0x102c,0xfa5,0xfa5,0xfa5,0x102f,0xfa8,0xfa8,0x102f, +0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x1404,0x1404,0x1404,0x1404,0x14b8,0xb8e,0xb8e,0xb8e,0xb8e, +0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc51,0xc51,0xc51,0xc51, +0xc51,0xc51,0xc51,0xc51,0xc51,0xc51,0xc51,0xc51,0xc51,0xc51,0xc51,0xc51,0xba9,0xba6,0xba9,0xba9, +0xba9,0xba6,0xba6,0xba9,0xbac,0xbaf,0xbac,0xbaf,0xbac,0xc96,0xc96,0xc96,0xe10,0xc90,0xc96,0xc90, +0xba0,0xba3,0xba0,0xba6,0xc99,0xc99,0xc99,0xc99,0xcab,0xcae,0xe10,0xe10,0xbb2,0xbb5,0xbb5,0xbb5, +0xbb5,0xbb5,0xbb5,0xbb5,0xbb5,0xbb5,0xbb5,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18, +0xbb5,0xbb5,0xbb5,0xbb5,0xbb5,0xbb5,0xbb5,0xbb5,0xbb5,0x177f,0x177f,0x1872,0xc0f,0xc0f,0xc0f,0xc0f, +0xbbe,0xbc4,0xbc7,0xbc4,0xbc7,0xbc4,0xbc7,0xbc4,0xbc7,0xbc4,0xbc7,0xbc4,0xbc4,0xbc4,0xbc7,0xbc4, +0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4,0xbc4, +0xbc4,0xbc4,0xbc4,0xbc4,0xc15,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc12,0xc0f,0xc12,0xbbe,0xbbe, +0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8, +0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8, 0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7, -0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7, -0xbf7,0xbf7,0xbf7,0xbf7,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfa,0xbfa, 0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd, -0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfd,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa, -0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfa,0xbfd,0xbfd,0xbfd,0xbfd,0xc00,0xc00,0xc00,0xc00, -0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00, -0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc06,0xc06,0xc06,0xc06, -0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06, -0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0x1bdb, -0x1bdb,0x1bdb,0x1bdb,0x1bdb,0x1bdb,0x1bdb,0x1ca7,0x1ca7,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, -0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, -0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63, -0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc63,0xc60,0xc63, -0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xc60,0xd65, -0xd68,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xf78,0xf78,0xf78,0xf78, -0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b, -0xd6b,0xd6b,0xe5e,0xf18,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0x1083,0x1341,0x1341, -0xe67,0xe67,0xe67,0xe67,0xe67,0xe6d,0xe6a,0xf8a,0xf8a,0xf8a,0xf8a,0x14b8,0x1095,0x14b8,0x13fb,0x13fb, -0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2,0xca2, -0xca2,0xca2,0xccf,0xccc,0xccf,0xccc,0xccf,0xccc,0x11ca,0x11c7,0x109b,0x1098,0xca5,0xca5,0xca5,0xca5, -0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca5,0xca8,0xca8,0xca8,0xca8, -0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8, -0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xca8,0xcab,0xcab,0xcab,0xcb1, -0xcae,0xcd5,0xcd2,0xcb1,0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcb1, -0xcae,0xcb1,0xcae,0xcb1,0xcae,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab, -0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab, -0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcb1,0xcae,0xcb1,0xcae,0xcab,0xcab,0xcab,0xcab, -0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab, -0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcab,0xcb1,0xcae,0xcab,0xcab,0xcb4,0xcb4,0xcb4,0xcb4, -0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcba,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4, -0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4, -0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcba,0xcba,0xcba,0xcb4, -0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4, -0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb7,0xcb4,0xcb4,0xcb4, -0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced, -0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced,0xced, -0xd6b,0xdd7,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xf18,0xf18,0xe5e,0xe5e,0xe5e,0xe5e, -0xe5e,0xe5e,0xf7b,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1365,0x1365,0x1344, -0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f, -0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f,0xd8f, -0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd95,0xd95,0xd95,0xd95,0xd95,0xd92,0xda7,0xda7,0xda7,0xda1, -0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda1,0xda7,0xda7,0xda7,0xda7, -0xd9b,0xd9b,0xda4,0xda4,0xda4,0xda4,0xd98,0xd98,0xd98,0xd98,0xd98,0xd9e,0xe73,0xe73,0xe73,0xe73, -0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe70,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73,0xe73, -0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda1,0xda7, -0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xda7,0xd9b,0xd9b,0xd9b, -0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e, -0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e,0xd9e, -0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xdaa,0xe76,0xe76, -0xe76,0xe76,0xe76,0xe76,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0x11d3,0x11d3,0x109e,0x109e,0x109e, -0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad, -0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad,0xdad, -0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3, -0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3,0xdb3, -0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc, -0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc,0xdbc, -0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8, -0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8,0xdc8, -0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4, -0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4, -0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, -0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, -0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82, -0xe82,0xe82,0xe82,0xe82,0xe82,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f, +0xbfa,0xbfa,0xbfa,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5, +0x11e5,0x11e5,0x11e5,0x11e5,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0x12d5,0x12d5,0x12d5,0x12d5,0x12d5, +0x12d5,0x12d5,0x12d5,0x12d5,0x12d5,0x12d5,0x12d5,0x12d5,0x12d5,0x12db,0x1515,0x1515,0x1542,0x1515,0x17dc,0x1482, +0x1047,0xf3f,0xc06,0xc06,0xc27,0xc27,0xc27,0xc27,0xd6b,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27, +0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27, +0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc96,0xc90,0xc96,0xc90, +0xc96,0xc90,0xc96,0xc90,0xc33,0xc30,0xc30,0xca8,0xca5,0xfd8,0xfd2,0x1371,0xfcf,0xfcc,0x10a7,0x10a4, +0x11a0,0x11a0,0x11a6,0x11a0,0x11a6,0x11a0,0x11a6,0x11a0,0x11a6,0x11a0,0x11a6,0x11a0,0xc51,0xc51,0xc51,0xc51, +0xc51,0xc36,0xc36,0xc51,0xc51,0xc51,0xc51,0xc51,0xc51,0x116a,0x116a,0x116a,0xd6e,0xc36,0xc36,0xc36, +0xc36,0xf27,0xf18,0xf18,0xf18,0xf18,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0xc48,0xc48,0xc45,0xc3c, +0xc45,0xc3c,0xc45,0xc3c,0xc45,0xc3c,0xc4b,0xc4b,0xc4b,0xc4b,0xc5d,0xc5a,0xd5f,0xeee,0x1077,0x1074, +0x1074,0x1077,0x1071,0x1071,0x1071,0x1077,0x107a,0x107a,0x12b7,0x116d,0x116d,0x116a,0xc3f,0xc3f,0xc3f,0xc3f, +0xf2a,0xf2a,0xf1b,0xf1b,0xf1b,0xf18,0xf18,0xf18,0xf18,0xf1b,0x102c,0xf1b,0xf1b,0xf1b,0xf18,0xf1b, +0xf2a,0xf18,0xf18,0xf18,0xf1b,0xf1b,0xf18,0xf18,0xf1b,0xf18,0xf18,0xf1b,0xfba,0xfb7,0xc75,0xc6f, +0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc72,0xdda,0xd95,0xd95,0xd95,0xc6c, +0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0xd9b,0xd9b,0xc69,0xc7e,0xc75,0xc6f,0xc75,0xc6f, +0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f, +0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0xc75,0xc6f,0x118b,0x1188,0x118b,0x1188, +0x1194,0x1194,0x13e0,0x1119,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90, +0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90,0xc96,0xc90, +0xc96,0xc90,0xc96,0xc90,0xcae,0xc90,0xc90,0xc90,0xc90,0xc90,0xc90,0xc90,0xc90,0xc96,0xc90,0xc96, +0xc90,0xc96,0xc96,0xc90,0xccf,0xccf,0xda4,0xcc6,0xcc9,0xda4,0xda4,0xccc,0xccc,0xccc,0xccc,0xccc, +0xccc,0xda7,0xccf,0xccc,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xe19,0xe19, +0xe16,0xf4e,0xcc0,0xcc0,0xda4,0xccf,0xcc6,0xccc,0xccc,0xccf,0xccf,0xcc6,0xcc6,0xccc,0xccc,0xccc, +0xccc,0xccc,0xccf,0xccf,0xccf,0xda4,0xda4,0xda4,0xda4,0xccf,0xccf,0xccf,0xccf,0xccf,0xccf,0xccf, +0xccf,0xccf,0xccf,0xccf,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3, +0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3,0xcf3, +0xcf3,0xcf3,0xcf3,0xcf3,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcfc,0xcfc, +0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc, +0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xdb6,0xdb6,0xdb6,0xdb6,0xdb6,0xdb9,0xdb9,0xdb9,0xd62,0xcff, +0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47, +0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b, +0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b, +0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd1d,0xd11,0xd23,0xd20, +0xd1a,0xd1a,0xd1a,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17, +0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17, +0xd17,0xd17,0xd17,0xd17,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26, +0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26, +0xd26,0xd26,0xd26,0xd26,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35, +0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd38,0xd38,0xd38,0xd3b, +0xd38,0xd38,0xd3e,0xd3e,0xd4d,0xd4d,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50, +0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50, +0xd50,0xd50,0xd50,0xd50,0xd4d,0xd4d,0xd4d,0xd4d,0xd4d,0xd4d,0xd4d,0xd4d,0xd4d,0xd4d,0xd4d,0xd4d, +0xd5c,0xd59,0xdce,0xdce,0xdce,0xdce,0xd59,0xd59,0xdce,0xdce,0xdd1,0x1122,0x111f,0x111f,0xd5c,0xd5c, +0xd56,0xd56,0xd56,0xd56,0xd56,0xd56,0xd56,0xd56,0xd56,0xd56,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf, +0xdce,0xdce,0xd59,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c, +0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c,0xd5c, +0xd74,0xd74,0xd74,0xd74,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0x1110,0x13d4,0x13d4,0x13d4, +0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509, +0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98, +0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98, +0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf09,0xf09,0xf09,0xde9,0x1545, +0x101a,0xf15,0x101a,0x101a,0x101a,0x101a,0x101a,0x101a,0x101a,0x101a,0x101a,0x101a,0x101a,0xf15,0x101a,0xf15, +0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b, +0xf4b,0xf96,0xe07,0xf00,0xe07,0xe07,0xe07,0xe07,0xe01,0xe01,0xe01,0xe07,0x1368,0x136b,0x155a,0x15ea, +0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c, +0xe1f,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe13,0xe13,0xe13,0xe1c,0xe19,0x12ed,0x11af,0x11b5,0x11b5, +0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25, +0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25, +0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e, +0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e, +0xe34,0xe34,0xe34,0xe31,0xe31,0xe31,0xe2e,0xe2e,0xe2e,0xe2e,0xe31,0xe2e,0xe2e,0xe2e,0xe34,0xe31, +0xe34,0xe31,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e, +0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe34,0xe31,0xe31, +0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0x1800, +0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163e,0x1638,0x17f7,0x17f7,0x17f7,0x17fa,0x17f4,0x17fa,0x17f4, +0xf51,0xf51,0xf51,0xe40,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43, +0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43, +0xe43,0xe43,0xe43,0xf54,0xe40,0xe40,0xf51,0xf51,0xf51,0xf51,0xe40,0xe40,0xf51,0xf51,0xe40,0xe40, +0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49, +0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49, +0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, +0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, +0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d, +0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d,0xe6d, 0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82, 0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82,0xe82, -0xf48,0xf48,0xe94,0xe94,0xf90,0xf90,0xf90,0xf90,0xf90,0xf90,0xf90,0x10ad,0x10ad,0x10b0,0x10b3,0x10ad, -0x10a7,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa, -0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0, -0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0,0xea3,0xea0, -0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf, -0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf,0xeaf, -0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0x1c1d, -0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2, -0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0x1c1a, +0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8e,0xe8b,0xe8b,0xe8b,0xe8b, +0xe88,0xe88,0xe88,0xf6c,0xf6c,0xf6c,0xf6c,0xe88,0xe88,0xf72,0xf6f,0xe85,0xe85,0xe94,0xe91,0xe91, +0xf6c,0xf6c,0xe88,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b, +0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8b,0xe8e,0xe8b,0xe8e,0xe8b,0xe8b,0xe8b, +0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xea9, +0xea9,0xea9,0xea9,0xea9,0xea9,0xea9,0xf78,0xf78,0xf7b,0xf7b,0xea9,0xf78,0xf78,0xf78,0xf78,0xf78, 0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5, 0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5, -0xf42,0xf42,0xf42,0xf42,0xf42,0xf42,0xf42,0xf42,0xecd,0xecd,0xecd,0xecd,0xecd,0xecd,0xecd,0xecd, -0xecd,0xecd,0xecd,0xecd,0xecd,0xecd,0xecd,0xf93,0xf93,0xf93,0xf93,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6, -0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6, -0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6,0xed6, -0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf, -0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf,0xedf, -0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8, -0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee8,0xee2, -0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5, -0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee5,0xee8,0xee8,0xee8,0xee8,0xee8, -0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef1,0xef1, -0xef1,0xef1,0xef1,0xef1,0xef1,0xef1,0xeee,0xef7,0x10c2,0x10bc,0x10ce,0x10b9,0xeeb,0xeeb,0x10b9,0x10b9, -0xf06,0xf06,0xefa,0xf06,0xf06,0xf06,0xefd,0xf06,0xf06,0xf06,0xf06,0xefa,0xf06,0xf06,0xf06,0xf06, +0xf7e,0xeb5,0xf7e,0xf7e,0xf7e,0xebe,0xebe,0xf7e,0xf7e,0xebe,0xeb5,0xebe,0xebe,0xeb5,0xf7e,0xf81, +0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7, +0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7,0xec7, +0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0, +0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xed0,0xecd,0xed3, +0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9, +0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed9,0xed6,0xed6,0xed6, +0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0xf03,0xf03,0xf03,0xf03,0x101d,0x1011, +0xf0f,0x101d,0x101d,0x101d,0x101d,0x101d,0x101d,0x101d,0x101d,0x101d,0x101d,0x1470,0x1470,0x1470,0x1470,0x1470, +0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0x114f,0x114f,0x16a4,0x16a4,0x16a4, 0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06, -0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09, -0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09, -0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, -0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24, -0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45,0xf45, -0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9, -0xf78,0xf78,0xf78,0xf75,0xf75,0xf75,0xf75,0xf75,0x1215,0x146a,0x146a,0x146a,0x146a,0x13e6,0x13e6,0x13e6, -0x146d,0x13e9,0x13e9,0x146d,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x1884,0x1884,0x1884,0x1884,0x194a, -0xf8d,0xf8d,0xf8d,0xf8d,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e,0x109e, -0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1, -0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2, -0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d5,0x1953,0x1953,0x19d4,0x1953,0x1cc5,0x188a,0x13fe,0x121e,0xf90,0xf90, -0xfb1,0xfb1,0xfb1,0xfb1,0xfc6,0xfcf,0xfd2,0xfcf,0xfd2,0xfcf,0xfd2,0xfcf,0xfd2,0xfcf,0xfd2,0xfcf, -0xfcf,0xfcf,0xfd2,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf, -0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfcf,0xfb4,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfc9, -0xfb1,0xfc9,0xfc6,0xfc6,0xfe1,0xfde,0xfe1,0xfe1,0xfe1,0xfde,0xfde,0xfe1,0xfe4,0xfe7,0xfe4,0xfe7, -0xfe4,0x10da,0x10da,0x10da,0x1236,0x10d7,0x10da,0x10d7,0xfd8,0xfdb,0xfd8,0xfde,0x10dd,0x10dd,0x10dd,0x10dd, -0x10e0,0x10e3,0x1236,0x1236,0xfea,0xfea,0x10f8,0x10f5,0x10f8,0x10f5,0x10f8,0x10f5,0x10f8,0x10f5,0x10f8,0x10f5, -0x10f8,0x10f5,0x10f8,0x10f5,0x10ec,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec, -0x10f2,0x10ec,0x10f2,0x10ec,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0, +0x101a,0x101a,0xf15,0x101a,0x101a,0x101a,0xf15,0x101a,0x101a,0x101a,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0x1014, +0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0xf12,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0xf12, +0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x106e,0x106e,0x1614,0x16a4,0x16a4,0x16a4, +0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0x1017,0xf12,0x1017,0xf12,0xf12,0x1017,0x1017,0xf12, +0xf1b,0xf1b,0xfa5,0xf18,0xfa5,0xfa5,0xfa5,0xfa5,0xf18,0xf18,0xf2a,0xf18,0xf18,0xf18,0xf18,0xf18, +0xf18,0xf1b,0xf2a,0xf2a,0xf1b,0xf2a,0xf18,0xf1b,0xf1b,0xf1e,0xf2a,0xf18,0xf18,0xf2a,0xf1b,0xf1b, +0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30, +0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30, +0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99, +0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99, +0xfcf,0xfcc,0xfcf,0xfcc,0xfcf,0xfcc,0xfcf,0xfcc,0xfcf,0xfcc,0x10a7,0x11a6,0x11a6,0x11a6,0x1419,0x1569, +0x11a6,0x11a6,0x1374,0x1374,0x1374,0x136e,0x1374,0x136e,0x156f,0x156c,0x1623,0x1620,0x1623,0x1620,0x1623,0x1620, 0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0, -0xff0,0xff0,0xff0,0xff0,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff, +0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0,0xff0, +0xffc,0x1062,0xffc,0x1002,0x1002,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff, 0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff, -0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3, -0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005, -0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005, -0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1005,0x1053,0x106b,0x1062,0x1068,0x1068,0x106b,0x106b,0x1062, -0x1062,0x1068,0x1068,0x1068,0x1068,0x1068,0x106b,0x106b,0x106b,0x1053,0x1053,0x1053,0x1053,0x106b,0x106b,0x106b, -0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x1053,0x1062,0x1065,0x1053,0x1053,0x1068, -0x1068,0x1068,0x1068,0x1068,0x1068,0x1056,0x106b,0x1068,0x105f,0x105f,0x105f,0x105f,0x105f,0x105f,0x105f,0x105f, -0x105f,0x105f,0x11fd,0x11fd,0x11fa,0x11f7,0x105c,0x105c,0x1086,0x1086,0x1086,0x1086,0x1365,0x1365,0x1344,0x1344, -0x1344,0x1341,0x1341,0x1341,0x1341,0x1344,0x1470,0x1344,0x1344,0x1344,0x1341,0x1344,0x1365,0x1341,0x1341,0x1341, -0x1344,0x1344,0x1341,0x1341,0x1344,0x1341,0x1341,0x1344,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x109e,0x109e,0x10a1, -0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x15cc,0x15cc,0x15cc,0x11d3,0x109e,0x109e,0x109e,0x109e,0x1371,0x134d,0x134d, -0x134d,0x134d,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x10c8,0x10c8,0x10c5,0x10bf,0x10c5,0x10bf,0x10c5,0x10bf, -0x10c5,0x10bf,0x10cb,0x10cb,0x10cb,0x10cb,0x10d4,0x10d1,0x10cb,0x1233,0x14ca,0x14c7,0x14c7,0x14ca,0x14c4,0x14c4, -0x14c4,0x14ca,0x14cd,0x14cd,0x15e7,0x15db,0x15db,0x15d8,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec, -0x10e9,0x10e6,0x10e6,0x10fe,0x10fb,0x1410,0x140d,0x17d9,0x140a,0x1407,0x14d6,0x14d3,0x15ea,0x15ea,0x15f0,0x15ea, -0x15f0,0x15ea,0x15f0,0x15ea,0x15f0,0x15ea,0x15f0,0x15ea,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec, -0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec, -0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x1101,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, -0x10ec,0x10f2,0x10ec,0x10f2,0x10ec,0x10f2,0x10f2,0x10ec,0x1104,0x1104,0x110a,0x1110,0x1110,0x1110,0x1110,0x1110, -0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110, -0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x110a,0x1104,0x1104,0x1104,0x1104,0x110a,0x110a, -0x1104,0x1104,0x110d,0x14df,0x14dc,0x14dc,0x1110,0x1110,0x1107,0x1107,0x1107,0x1107,0x1107,0x1107,0x1107,0x1107, -0x1107,0x1107,0x14e2,0x14e2,0x14e2,0x14e2,0x14e2,0x14e2,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125, -0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125, -0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x1125,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e, -0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e,0x112e, -0x1131,0x1131,0x1131,0x1134,0x1131,0x1131,0x1137,0x1137,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a, -0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a, -0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143, -0x1143,0x1143,0x1143,0x1143,0x1149,0x113d,0x114f,0x114c,0x1146,0x1146,0x1146,0x1143,0x1143,0x1143,0x1143,0x1143, -0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143, -0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1416,0x1413,0x1164,0x115e, -0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1161,0x11e5,0x1152,0x1152,0x1152,0x115b, -0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x1155,0x1155,0x1158,0x1167,0x1164,0x115e,0x1164,0x115e, -0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e, -0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x1164,0x115e,0x15ff,0x15fc,0x15ff,0x15fc, -0x1602,0x1602,0x17e2,0x14e5,0x1170,0x1170,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173, -0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173,0x1173, -0x1173,0x1173,0x1173,0x1173,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170,0x1170, -0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1179,0x1179,0x1179,0x1179,0x1179,0x117c,0x117c,0x117c,0x11dc,0x1185, -0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194,0x1194, -0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182, -0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182, -0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, -0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, -0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8, -0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8,0x11b8, -0x11c1,0x11c1,0x11c1,0x11c1,0x11d6,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1, -0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1, -0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4, -0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4,0x11c4, -0x11d0,0x11d0,0x11d0,0x11d0,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x156f,0x1863,0x1863,0x1863, -0x1863,0x1863,0x1863,0x1863,0x1863,0x1863,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3, +0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e, +0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e, +0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x100e,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1020,0x1020,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1020,0x1023,0x1023,0x1023,0x1020,0x1023,0x1020,0x1023,0x1020,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1026,0x1023,0x1023,0x1023,0x1023,0x1020,0x1023,0x1020,0x1020,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1020, +0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020, +0x1020,0x1020,0x1152,0x1152,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155, +0x1155,0x13ce,0x13ce,0x13ce,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1155,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1155,0x13ce,0x13ce,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1026,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1152,0x1152,0x1155,0x1155,0x1023,0x1023,0x1026,0x1026, +0x1026,0x12c6,0x1023,0x1026,0x1023,0x1023,0x1026,0x1164,0x1164,0x1155,0x1155,0x13ce,0x13ce,0x13ce,0x13ce,0x13ce, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1155,0x1155,0x1155, +0x12c6,0x1155,0x1155,0x1155,0x13ce,0x13ce,0x13ce,0x13fe,0x13fe,0x13fe,0x13fe,0x13fe,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1155,0x1023,0x1155,0x1026,0x1026, +0x1023,0x1023,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1026,0x1026, +0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026,0x1026, +0x1026,0x1023,0x1023,0x1023,0x1026,0x1023,0x1023,0x1023,0x1023,0x1026,0x1026,0x1026,0x1023,0x1026,0x1026,0x1026, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1026,0x1023,0x1026,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x12c6,0x1023,0x1023,0x1023,0x1023,0x1155,0x1155,0x13ce,0x106b,0x106b,0x106b,0x106b, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1155,0x13ce,0x13ce,0x13ce,0x13ce,0x1356,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1155,0x1155,0x1155,0x1155, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1164,0x1164,0x1155,0x1155,0x1155,0x1155,0x1476,0x1155, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155, +0x1155,0x1155,0x1155,0x1155,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1155,0x1023,0x1023,0x1023,0x1023,0x1023, +0x110a,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x110a,0x1023,0x1023,0x1023,0x110a,0x1023,0x110a,0x1023,0x110a,0x1023,0x110a,0x1023,0x1023,0x1023,0x110a, +0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x110a,0x110a,0x1023,0x1023,0x1023,0x1023,0x110a,0x1023,0x110a,0x110a, +0x1023,0x1023,0x1023,0x1023,0x110a,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x12c6,0x12c6,0x13ce,0x13ce,0x1026,0x1026,0x1026,0x1023,0x1023,0x1023,0x1026,0x1026,0x1026,0x1026,0x1026, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152, +0x1023,0x1023,0x1023,0x1026,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1023,0x1023,0x1023,0x1023,0x1026,0x1026,0x1026,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023,0x1023, +0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038, +0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038, +0x103e,0x103b,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c, +0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c, +0x1083,0x117f,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x117c,0x117c,0x117c, +0x117c,0x117c,0x117f,0x135f,0x135f,0x1746,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x16b0,0x16b0, +0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0, +0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0, +0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3, +0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x1641, +0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6, +0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6, +0x112b,0x112b,0x112b,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7, +0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7, +0x1137,0x10ec,0x10ef,0x10ef,0x10ec,0x10f2,0x10f2,0x10e0,0x10e3,0x13ef,0x13f2,0x13f2,0x13f2,0x125d,0x16ce,0x1716, +0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x125a,0x1398,0x139b,0x1395,0x139e,0x139e, +0x1134,0x1134,0x10e9,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, +0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, +0x10ec,0x10ec,0x10ec,0x10e9,0x10e9,0x10e9,0x1134,0x1134,0x1134,0x1134,0x1134,0x1134,0x1134,0x1134,0x1134,0x10e9, +0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101, +0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101,0x1101, +0x1485,0x1485,0x140a,0x13dd,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113, +0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x1116,0x12e1, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155, +0x1155,0x1155,0x1155,0x1155,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1155,0x1155,0x1155,0x1155, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1161,0x1161,0x1161,0x1158,0x1158,0x1158,0x1152,0x1152,0x1152,0x1152, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152, +0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1152,0x1155,0x1155,0x1155,0x1155, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1164,0x1155,0x1155,0x1155, +0x1155,0x12c9,0x12c9,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1473,0x1155,0x1155,0x1155, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155, +0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x1155,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0, +0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0, +0x11a0,0x11a0,0x11a0,0x1167,0x11a9,0x11a9,0x11a9,0x11a9,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a, +0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a, +0x116a,0x116a,0x154e,0x154e,0x154e,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a, +0x116a,0x1617,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x14b8,0x154e,0x154e,0x154e,0x154e,0x154e, +0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3, +0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x12f6,0x12f6,0x12f6,0x12f6,0x12f6,0x12f6,0x12f6,0x11d9, +0x11d9,0x11cd,0x11ca,0x11ca,0x11ca,0x11ca,0x11ca,0x11ca,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3, +0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3, +0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11d3,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc, +0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc, +0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11dc,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1, +0x11e8,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1, +0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x11f1,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206, +0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206, +0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c, +0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c, +0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x120c,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224, +0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224, +0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a, +0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a, +0x122a,0x122a,0x122a,0x122a,0x122a,0x1227,0x1227,0x1227,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236, +0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x1233, +0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f, +0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f, +0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x1314,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248, 0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248, -0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x123f,0x123f,0x1242,0x1242,0x1248,0x123f,0x123f,0x123f,0x123f,0x123f, -0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, +0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, 0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e, -0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, -0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, -0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275, -0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1275,0x1272,0x1278, -0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284, -0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284, -0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a, -0x128a,0x13b6,0x1290,0x13b9,0x1290,0x1290,0x1290,0x1290,0x128d,0x128d,0x128d,0x1290,0x17e5,0x17e8,0x1a13,0x1a10, -0x1293,0x1293,0x1293,0x12a2,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8, -0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8, -0x12a8,0x12a8,0x12a8,0x1296,0x12a2,0x12a2,0x1293,0x1293,0x1293,0x1293,0x12a2,0x12a2,0x1293,0x1293,0x12a2,0x12a2, -0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4, -0x12b7,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12b4,0x12ae,0x12ae,0x12ae,0x12b4,0x12b1,0x1608,0x160b,0x160e,0x160e, -0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6, -0x12ba,0x12c6,0x12ba,0x12ba,0x12ba,0x12cf,0x12cf,0x12ba,0x12ba,0x12cf,0x12c6,0x12cf,0x12cf,0x12c6,0x12ba,0x12bd, -0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6, -0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6, -0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1, -0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1,0x12e1, -0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9, -0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9,0x12f6,0x12f6,0x12f6, -0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302, -0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302,0x1302, -0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311, -0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311, -0x1317,0x1317,0x1323,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326, -0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1329,0x1326,0x1329,0x1326,0x1326,0x1326, -0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1326,0x1329,0x1326,0x1326,0x1326,0x1326, -0x1323,0x1323,0x1323,0x1317,0x1317,0x1317,0x1317,0x1323,0x1323,0x131d,0x131a,0x1320,0x1320,0x132f,0x132c,0x132c, -0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332, -0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332, -0x1338,0x1338,0x1338,0x1335,0x1335,0x1335,0x1332,0x1332,0x1332,0x1332,0x1335,0x1332,0x1332,0x1332,0x1338,0x1335, -0x1338,0x1335,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332, -0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1338,0x1335,0x1335, -0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1332,0x1cce, -0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1af1,0x1aeb,0x1ce0,0x1ce0,0x1ce0,0x1ce3,0x1cdd,0x1ce3,0x1cdd, -0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1356,0x1356,0x1356,0x133b,0x1a19, -0x1467,0x135f,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x135f,0x1467,0x135f, -0x1344,0x1344,0x13ec,0x1341,0x13ec,0x13ec,0x13ec,0x13ec,0x1341,0x1341,0x1365,0x1341,0x1341,0x1341,0x1341,0x1341, -0x1341,0x1344,0x1365,0x1365,0x1344,0x1365,0x1341,0x1344,0x1344,0x1347,0x1365,0x1341,0x1341,0x1365,0x1344,0x1344, -0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1350,0x1350,0x1350,0x1350,0x147c,0x145e, -0x1359,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x1914,0x1914,0x1914,0x1914,0x1914, -0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1611,0x1611,0x1b75,0x1b75,0x1b75, -0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353, -0x1467,0x1467,0x135f,0x1467,0x1467,0x1467,0x135f,0x1467,0x1467,0x1467,0x1359,0x1359,0x1359,0x1359,0x1359,0x1461, -0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x135c,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x135c, -0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x14e8,0x14e8,0x1acd,0x1b75,0x1b75,0x1b75, -0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x135c,0x1464,0x135c,0x135c,0x1464,0x1464,0x135c, -0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, +0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x124e,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1266,0x1266,0x1266,0x131d,0x131d,0x131d,0x1266,0x1266,0x131d,0x1326,0x1320,0x1323, +0x126c,0x126c,0x1263,0x126c,0x126c,0x1260,0x1491,0x1803,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b, +0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x1329,0x1275,0x1275,0x1329,0x1329,0x1329,0x1329,0x1329, +0x1329,0x1275,0x1329,0x1278,0x1278,0x1329,0x1278,0x1329,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b, +0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b, +0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x127b,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281, +0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281, +0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296, +0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1293,0x1293,0x1293,0x1335,0x1335,0x1335,0x1335,0x1335, +0x1335,0x1335,0x1335,0x1293,0x1293,0x1335,0x1293,0x1338,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296, +0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296, +0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c, +0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c, +0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae, +0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae, +0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e, +0x154e,0x154e,0x154e,0x154e,0x135c,0x135c,0x135c,0x135c,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e, +0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x154e,0x1617,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362, +0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362, +0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d, +0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d, +0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, 0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x140a,0x1407,0x140a,0x1407,0x140a,0x1407,0x140a,0x1407,0x140a,0x1407,0x14d6,0x15f0,0x15f0,0x15f0,0x1890,0x1a04, -0x15f0,0x15f0,0x17dc,0x17dc,0x17dc,0x17d6,0x17dc,0x17d6,0x1a0a,0x1a07,0x1ac4,0x1ac1,0x1ac4,0x1ac1,0x1ac4,0x1ac1, -0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434, -0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434, -0x1449,0x143a,0x1449,0x144f,0x144f,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c, -0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c, -0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, -0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, -0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b, -0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b, -0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x1485,0x1482,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9, -0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9, -0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148b,0x148b,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148b,0x148e,0x148e,0x148e,0x148b,0x148e,0x148b,0x148e,0x148b,0x148e,0x148e,0x148e, -0x148e,0x148e,0x1491,0x148e,0x148e,0x148e,0x148e,0x148b,0x148e,0x148b,0x148b,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148b, -0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b, -0x148b,0x148b,0x161a,0x161a,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d, -0x161d,0x1866,0x1866,0x1866,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x1866,0x1866,0x148e,0x148e,0x148e,0x148e, -0x148e,0x1491,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161a,0x161a,0x161d,0x161d,0x148e,0x148e,0x1491,0x1491, -0x1491,0x1791,0x148e,0x1491,0x148e,0x148e,0x1491,0x1620,0x1620,0x161d,0x161d,0x1866,0x1866,0x1866,0x1866,0x1866, -0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x161d,0x161d, -0x1791,0x161d,0x161d,0x161d,0x1866,0x1866,0x1866,0x1869,0x1869,0x1869,0x1869,0x1869,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x148e,0x161d,0x1491,0x1491, -0x148e,0x148e,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x1491,0x1491, -0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491, -0x1491,0x148e,0x148e,0x148e,0x1491,0x148e,0x148e,0x148e,0x148e,0x1491,0x1491,0x1491,0x148e,0x1491,0x1491,0x1491, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x1491,0x148e,0x1491,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x1791,0x148e,0x148e,0x148e,0x148e,0x161d,0x161d,0x1866,0x14eb,0x14eb,0x14eb,0x14eb, -0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161d,0x1866,0x1866,0x1866,0x1866,0x17eb,0x148e,0x148e,0x148e,0x148e, -0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x148e,0x161d,0x161d,0x161d,0x161d, -0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x1620,0x1620,0x161d,0x161d,0x161d,0x161d,0x191d,0x161d, -0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d, -0x161d,0x161d,0x161d,0x161d,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161d,0x148e,0x148e,0x148e,0x148e,0x148e, -0x1575,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494, -0x1494,0x1575,0x1494,0x1494,0x1494,0x1575,0x1494,0x1575,0x1494,0x1575,0x1494,0x1575,0x1494,0x1494,0x1494,0x1575, -0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1575,0x1575,0x1494,0x1494,0x1494,0x1494,0x1575,0x1494,0x1575,0x1575, -0x1494,0x1494,0x1494,0x1494,0x1575,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494,0x1494, -0x1494,0x1797,0x1797,0x186c,0x186c,0x1497,0x1497,0x1497,0x1494,0x1494,0x1494,0x1497,0x1497,0x1497,0x1497,0x1497, -0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716, -0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, -0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, -0x149a,0x149a,0x149a,0x149d,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, -0x149a,0x149a,0x149a,0x149a,0x149d,0x149d,0x149d,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, -0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0, -0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0,0x14a0, -0x1899,0x1899,0x1896,0x17ee,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14ee,0x14ee,0x14ee,0x14ee,0x14ee,0x14ee, -0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x1626, -0x14f4,0x162c,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x1629,0x1629,0x1629, -0x1629,0x1629,0x162c,0x17f1,0x17f1,0x1c4a,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x1b78,0x1b78, -0x14fd,0x14fd,0x14fd,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f, +0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383, +0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383, +0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386, +0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386, +0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9, +0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x1386, +0x1386,0x1386,0x1386,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9, +0x13e9,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x13e9,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386, +0x1386,0x1386,0x1386,0x1386,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392, +0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392, +0x1392,0x1392,0x1392,0x1392,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1, +0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1, +0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a7,0x13a4,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1, +0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x14af,0x14af,0x14af,0x14af,0x14af,0x14af,0x14af,0x14af, +0x14af,0x14af,0x14af,0x14af,0x16fb,0x167a,0x167a,0x167d,0x13ce,0x13ce,0x13ce,0x13ce,0x13ce,0x13ce,0x13ce,0x13ce, +0x13d1,0x1476,0x1476,0x1476,0x1476,0x1476,0x1476,0x1503,0x13ce,0x13ce,0x13ce,0x13ce,0x13ce,0x1473,0x1473,0x1473, +0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x13ce,0x15d5,0x15d5,0x167a,0x167a,0x167a,0x167a,0x167a, +0x167a,0x167a,0x167a,0x16f8,0x17a6,0x167d,0x167d,0x167d,0x1500,0x1503,0x1503,0x1503,0x1503,0x1503,0x1503,0x1503, +0x1503,0x1503,0x1503,0x1503,0x1503,0x1503,0x1500,0x1500,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4, +0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4, +0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13d4,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9, +0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9, +0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x13e9,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1476,0x1473, +0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1476,0x1503,0x1503,0x1476,0x1476,0x1476,0x1476,0x1476, +0x1476,0x1476,0x1473,0x1401,0x1476,0x1476,0x1476,0x167a,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1401,0x1473, +0x1473,0x1473,0x1473,0x1473,0x1500,0x15d5,0x15d5,0x15d5,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473, +0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1473,0x1500,0x142e,0x142e,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b, +0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b, +0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142b,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e, +0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e, +0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461, +0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x145e,0x145e,0x145e, +0x14a6,0x14a6,0x14a6,0x14a6,0x14a6,0x14a6,0x14a6,0x14a6,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461, +0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461, +0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c, +0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c, +0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x1704,0x1704,0x1704,0x1704,0x1704, +0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x1704,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, +0x1746,0x1749,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x15e4,0x1488,0x1488,0x1488,0x1488, +0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x14df,0x14df,0x14df,0x14df,0x1650,0x1650,0x14e2,0x14e2, +0x14e2,0x14e2,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x14dc, +0x1533,0x1536,0x14d3,0x14e5,0x14e5,0x158a,0x14d6,0x14d6,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df, +0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df, +0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4, +0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x1539,0x153f,0x153c,0x153c,0x153c, +0x153c,0x14f1,0x14f7,0x153c,0x153c,0x153c,0x153c,0x14ee,0x14f4,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, +0x153c,0x153c,0x153c,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4, +0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500, +0x1500,0x1500,0x1500,0x1500,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x167a,0x16f8,0x15d5,0x15d5,0x15d5,0x15d5,0x16fb, +0x16f8,0x17a6,0x15d5,0x167a,0x15d5,0x15d5,0x15d5,0x15d5,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x15d5, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509, +0x1509,0x1509,0x1509,0x15de,0x15de,0x15de,0x15de,0x15de,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701, +0x1701,0x1701,0x1701,0x1701,0x1701,0x17ac,0x17ac,0x17ac,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509, +0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509, +0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x1509,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c, +0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c, +0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x150c,0x17af,0x150f,0x150f,0x150f,0x150f, 0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f, -0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a, -0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a, -0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530, -0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1ad3, -0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533, -0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533,0x1533, -0x1539,0x1539,0x1545,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b, -0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b, -0x154b,0x154b,0x154b,0x1545,0x1545,0x1545,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1545, -0x1548,0x154b,0x154e,0x154e,0x154b,0x1551,0x1551,0x153c,0x153f,0x17f7,0x17fa,0x17fa,0x17fa,0x1632,0x1b81,0x1b7e, -0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x162f,0x1800,0x1803,0x17fd,0x1806,0x1806, -0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c, -0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c, -0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, -0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x19ec,0x19ec,0x19ec,0x15cc,0x15cc,0x15cc, -0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x1abb,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc,0x15cc, -0x15cc,0x15cc,0x1950,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec, -0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d, -0x161d,0x161d,0x161d,0x161d,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161d,0x161d,0x161d,0x161d, -0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x1620,0x161d,0x161d,0x161d, -0x161d,0x1794,0x1794,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x191a,0x161d,0x161d,0x161d, -0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d, -0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, -0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641, -0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, -0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653, -0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659, -0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659, -0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, +0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x150f,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1593,0x1593,0x1593,0x1593, +0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593, +0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x1593,0x15b1,0x15b1,0x15b1,0x15b1, +0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1, +0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b4,0x15b4,0x15b4,0x15b4, +0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4, +0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15bd,0x15bd,0x15bd,0x15bd, +0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd, +0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15bd,0x15cf,0x15cf,0x15cf,0x15cf, +0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf, +0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cc,0x15cc,0x15cc,0x15d5,0x15d5,0x15d5,0x16f8, +0x16f8,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x16f8,0x16f8,0x16f8,0x167a,0x167a,0x15d5,0x15d5,0x15d5,0x15d5, +0x15d5,0x15d8,0x15d8,0x15d5,0x15d8,0x15d8,0x167a,0x167d,0x167a,0x167a,0x167a,0x167a,0x1611,0x1611,0x1611,0x1611, +0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611, +0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x162c,0x162c,0x162c,0x162c, +0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x1677,0x1677,0x162c,0x1677, +0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x1632,0x1632,0x1632,0x165c,0x165c,0x165c,0x165c, 0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, -0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c, -0x168c,0x168c,0x168c,0x168c,0x1686,0x1686,0x1686,0x167a,0x167a,0x167a,0x1686,0x1686,0x167a,0x1689,0x167d,0x167a, -0x168f,0x168f,0x1683,0x168f,0x168f,0x1680,0x18a2,0x1cda,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1, -0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1, -0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x1692,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa, -0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa, -0x16aa,0x16aa,0x16aa,0x16a4,0x16ad,0x16ad,0x16ad,0x16ad,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, -0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, -0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb, -0x16c2,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb, -0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16cb,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4, -0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4, -0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6, -0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e3,0x16e3,0x16e3,0x16d7,0x16d7,0x16d7,0x16d7,0x16d7, -0x16d7,0x16d7,0x16d7,0x16e3,0x16e3,0x16d7,0x16e3,0x16da,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6, -0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6, -0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x16e6,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d, -0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d,0x170d, -0x170d,0x170d,0x170d,0x170d,0x170d,0x170a,0x170a,0x170a,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716, -0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x171c,0x171c, -0x171c,0x1719,0x1719,0x1719,0x1716,0x1716,0x1716,0x1716,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, -0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x171f,0x171f,0x171f,0x171f,0x171f,0x171f,0x171f,0x1731, -0x1731,0x1725,0x1722,0x1722,0x1722,0x1722,0x1722,0x1722,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, -0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, -0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737, -0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1734, -0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a, -0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a, -0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, -0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, -0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f, -0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x176a,0x1779,0x1779,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x1779,0x176a,0x177c,0x177c,0x176a,0x177c,0x176a,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f, -0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f, -0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x177f,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788, -0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788, -0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e, +0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x1671,0x1671,0x1671,0x1671, +0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671, +0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x16a4,0x16a4,0x16a4,0x16a4, +0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4, +0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x1854, +0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854, +0x1854,0x1854,0x1854,0x1854,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5, +0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5, +0x16f5,0x16f5,0x16f5,0x16f5,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x17a6,0x17a6,0x17a6, +0x17a6,0x181e,0x181e,0x181e,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x16f8,0x17a6,0x17a6,0x17a6,0x17a6,0x181e, +0x181e,0x181e,0x18e1,0x181e,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701, +0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701,0x1701, +0x1701,0x1701,0x1701,0x1701,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, +0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, +0x1707,0x1707,0x1707,0x1707,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731, +0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731,0x1731, +0x1731,0x1731,0x1731,0x1731,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e, 0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e, -0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x178e,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec, -0x19ec,0x19ec,0x19ec,0x19ec,0x17d3,0x17d3,0x17d3,0x17d3,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec, -0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x1abb,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, -0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, -0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833, -0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833, -0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1839,0x1836,0x1833,0x1833,0x1833,0x1833, -0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x183c,0x183c,0x183c,0x183c, -0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c, -0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183c,0x183f,0x183f,0x183f,0x183f, -0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, -0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x1851,0x1851,0x1851,0x1851, -0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851, -0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1854,0x1854,0x1854,0x1854, +0x178e,0x178e,0x178e,0x178e,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a, +0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a,0x179a, +0x179a,0x179a,0x179a,0x179a,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb, +0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb, +0x17bb,0x17bb,0x17bb,0x17bb,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e8, +0x17e8,0x17e8,0x17e8,0x17e8,0x17e8,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5, +0x17e5,0x17e5,0x17e5,0x17e5,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824, +0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824, +0x1824,0x1824,0x1824,0x1824,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b, +0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b,0x184b, +0x184b,0x184b,0x184b,0x184b,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854, 0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854, -0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1857,0x1857,0x1857,0x1857, -0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857, -0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x185a, -0x185a,0x185a,0x185a,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857, -0x1857,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x1857,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a, -0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a, -0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x185a,0x1872,0x1872,0x1872,0x1872, -0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872, -0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x195c,0x195c,0x195c,0x195c, -0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x1be4,0x1b33,0x1b33,0x1b36,0x1875,0x1875,0x1875,0x1875, -0x1875,0x1875,0x1875,0x1875,0x1878,0x1926,0x1926,0x1926,0x1926,0x1926,0x1926,0x19c2,0x1875,0x1875,0x1875,0x1875, -0x1875,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x19bf,0x19bf, -0x19bf,0x19bf,0x19bf,0x19bf,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1875,0x1aa6,0x1aa6,0x1b33, -0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1be1,0x1cb3,0x1b36,0x1b36,0x1b36,0x19bf,0x19c2,0x19c2,0x19c2, -0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19c2,0x19bf,0x19bf,0x1b78,0x1b78,0x1b78,0x1b78, -0x1b78,0x1b78,0x1b78,0x1b78,0x1c4a,0x1c4d,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1c47,0x1a1c, -0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x189c,0x1923,0x1923,0x1923,0x1923, -0x1923,0x1923,0x1926,0x1923,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x1926,0x19c2,0x19c2,0x1926, -0x1926,0x1926,0x1926,0x1926,0x1926,0x1926,0x1923,0x18a5,0x1926,0x1926,0x1926,0x1b33,0x1923,0x1923,0x1923,0x1923, -0x1923,0x1923,0x18a5,0x1923,0x1923,0x1923,0x1923,0x1923,0x19bf,0x1aa6,0x1aa6,0x1aa6,0x1923,0x1923,0x1923,0x1923, -0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x1923,0x19bf,0x18ba,0x18ba,0x18b7,0x18b7, -0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7, -0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18ba,0x18ba,0x18ba,0x18ba, -0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba, -0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x1908,0x1908,0x1908,0x1908, -0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908, -0x1908,0x1905,0x1905,0x1905,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x1908,0x1908,0x1908,0x1908, -0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908, -0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x1908,0x192c,0x192c,0x192c,0x192c, -0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c, -0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192c,0x192f,0x192f,0x192f,0x192f, -0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f, -0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x1bed, -0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1986,0x1986,0x1986,0x1986, -0x1ae5,0x1ae5,0x1989,0x1989,0x1989,0x1989,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971,0x1971, -0x1971,0x1971,0x1971,0x1983,0x1974,0x1977,0x197a,0x198c,0x198c,0x1a2e,0x197d,0x197d,0x1986,0x1986,0x1986,0x1986, -0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986, -0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x19a7,0x19a7,0x19a7,0x19a7, -0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x1992, -0x1998,0x1995,0x1995,0x1995,0x1995,0x19a4,0x19aa,0x1995,0x1995,0x1995,0x1995,0x19a1,0x19a7,0x1995,0x1995,0x1995, -0x1995,0x1995,0x1995,0x1995,0x1995,0x1995,0x1995,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7, -0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x19b3,0x19b3,0x19b3,0x19b3, -0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x1aa0,0x1aa0,0x1aa0,0x1aa0,0x1aa0,0x1bd8,0x1bd8,0x1bd8,0x1bd8, -0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1bd8,0x1ca4,0x1ca4,0x1ca4,0x19b9,0x19b9,0x19b9,0x19b9, -0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9, -0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x19bf,0x19bf,0x19bf,0x19bf, -0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1b33,0x1be1,0x1aa6, -0x1aa6,0x1aa6,0x1aa6,0x1be4,0x1be1,0x1cb3,0x1aa6,0x1b33,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x19bf,0x19bf,0x19bf,0x19bf, -0x19bf,0x19bf,0x19bf,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6, -0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x19c8,0x19c8,0x19c8,0x19c8, -0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8, -0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19cb,0x19cb,0x19cb,0x19cb, -0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb, -0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x1cb6,0x19ce,0x19ce,0x19ce,0x19ce, -0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce, -0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x19ce,0x1a43,0x1a43,0x1a43,0x1a43, -0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43, -0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a5e,0x1a5e,0x1a5e,0x1a5e, -0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e, -0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a5e,0x1a64,0x1a64,0x1a64,0x1a64, -0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64, -0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a64,0x1a82,0x1a82,0x1a82,0x1a82, -0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82, -0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a82,0x1a85,0x1a85,0x1a85,0x1a85, -0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85, -0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a85,0x1a8e,0x1a8e,0x1a8e,0x1a8e, -0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e, -0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8e,0x1a8b,0x1a8b,0x1a8b,0x1aa6,0x1aa6,0x1aa6,0x1be1, -0x1be1,0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1b33,0x1be1,0x1be1,0x1be1,0x1b33,0x1b33,0x1aa6,0x1aa6,0x1aa6,0x1aa6, -0x1aa6,0x1aa9,0x1aa9,0x1aa6,0x1aa9,0x1aa9,0x1b33,0x1b36,0x1b33,0x1b33,0x1b33,0x1b33,0x1ae8,0x1ae8,0x1ae8,0x1ae8, -0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8, -0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1b0f,0x1b0f,0x1b0f,0x1b0f, -0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f, -0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b18,0x1b18,0x1b18,0x1b18, -0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b4e,0x1b4e,0x1b18,0x1b4e, -0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b18,0x1b1e,0x1b1e,0x1b1e,0x1b2a,0x1b2a,0x1b2a,0x1b2a, -0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a, -0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1b2a,0x1bc3,0x1bc3,0x1bc3,0x1bc3, -0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3, -0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bcf,0x1bcf,0x1bcf,0x1bcf, -0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf, -0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bf3,0x1bf3,0x1bf3,0x1bf3, -0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3, -0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf3,0x1bf6,0x1bf6,0x1bf6,0x1bf6, -0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6, -0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1bf6,0x1c6b,0x1c6b,0x1c6b,0x1c6b, -0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b, -0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c8c,0x1c8c,0x1c8c,0x1c8c, -0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c, -0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c8c,0x1c9e,0x1c9e,0x1c9e,0x1c9e, -0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e, -0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1c9e,0x1ca1,0x1ca1,0x1ca1,0x1ca1, -0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1, -0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1ca1,0x1cfb,0x1cfb,0x1cfb,0x1cfb, -0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cf8,0x1cf8,0x1cf8, -0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1cf8,0x1d3a,0x1d3a,0x1d3a,0x1d3a, -0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a, -0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d3a,0x1d46,0x1d46,0x1d46,0x1d46, -0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46, -0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0x1d46,0,0,0,0 +0x1854,0x1854,0x1854,0x1854,0x1854,0x1854,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857,0x1857, +0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875, +0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875,0x1875, +0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x1884,0x1884,0x1884,0x1884,0x188d,0x1884, +0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887, +0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896, +0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x18f9,0x18f9, +0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f, +0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f,0x189f, +0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd, +0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd,0x18bd, +0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c3,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0, +0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0, +0,0,0,0 }; static const UTrie2 propsVectorsTrie={ propsVectorsTrie_index, - propsVectorsTrie_index+5368, + propsVectorsTrie_index+5236, nullptr, - 5368, - 27416, + 5236, + 27088, 0xa40, - 0x1578, + 0x14f4, 0x0, 0x0, 0x110000, - 0x800c, + 0x7e40, nullptr, 0, false, false, 0, nullptr }; -static const uint32_t propsVectors[7497]={ -0x67,0,0,0x67,0,0xe00000,0x67,0x80000,0x20,0x867,0,0,0xa67,0,0,0xb67, -0,0,0xd67,0,0,0xe67,0,0,0x1067,0,0,0x1167,0,0,0x1267,0, -0,0x1367,0,0,0x1467,0,0,0x1567,0,0,0x1667,0,0,0x1767,0,0, -0x1867,0,0,0x1967,0,0,0x1a67,0,0,0x1b67,0,0,0x1d67,0,0,0x1f67, -0,0,0x2067,0,0,0x2267,0,0,0x2367,0,0,0x2467,0,0,0x2567,0, -0,0x2767,0,0,0x2867,0x80000,0x20,0x2967,0,0,0x2a67,0,0x1600000,0x2b67,0,0, -0x2d67,0,0,0x3167,0x20000000,0,0x3267,0x20000000,0,0x3a67,0,0,0x3b67,0,0,0x3e67, -0,0,0x4067,0,0,0x4167,0,0,0x4467,0,0,0x4867,0,0,0x4967,0, -0,0x4a67,0,0,0x5067,0,0,0x5167,0,0,0x5467,0,0,0x5567,0,0, -0x5667,0x80000,0x20,0x5767,0,0,0x5867,0,0,0x5967,0,0,0x5b67,0,0,0x5c67, -0,0,0x5d67,0,0,0x6067,0x80000,0x20,0x6267,0,0,0x6367,0,0,0x6467,0, -0,0x6567,0,0,0x6f67,0,0,0x7067,0,0,0x7367,0x20000000,0,0x7567,0,0, -0x7667,0,0,0x7767,0,0,0x7867,0,0,0x7a67,0,0,0x7b67,0,0,0x7c67, -0,0,0x7e67,0,0,0x7f67,0,0,0x8167,0,0,0x8267,0,0,0x8467,0, -0,0x8567,0,0,0x8667,0,0,0x8767,0,0,0x8967,0,0,0x8b67,0,0, -0x8c67,0,0,0x8e67,0x20000000,0,0x8f67,0,0,0x9067,0,0,0x9167,0,0,0x9267, -0,0,0x9367,0,0,0x9567,0,0,0x9667,0,0,0x9767,0,0,0x9867,0, -0,0x9967,0,0,0x9a67,0,0,0x9c67,0,0,0x9f67,0,0,0xa167,0,0, -0xa367,0,0,0xa467,0,0,0xa567,0,0,0xa667,0,0,0xa767,0,0,0xa867, -0,0,0xa967,0,0,0xaa67,0,0xe00000,0xab67,0,0xe00000,0xac67,0,0,0xad67,0, -0,0xae67,0,0,0xaf67,0,0,0xb167,0,0,0xb267,0,0,0xb467,0,0, -0xb567,0,0,0xb767,0,0,0xb867,0,0,0xb967,0,0,0xba67,0,0,0xbc67, -0,0,0xbd67,0,0,0xbe67,0,0,0xbf67,0,0,0xc067,0,0,0xc167,0, -0,0xc367,0,0xe00000,0xc467,0,0xe00000,0xc667,0,0,0xc767,0,0,0xc867,0,0, -0xc967,0,0,0xca67,0,0,0xcc67,0,0xe00000,0xcf67,0,0xe00000,0xd067,0,0xe00000,0xd367, -0,0,0xd467,0,0,0xd567,0,0,0xd667,0,0,0xd867,0,0,0xda67,0, -0,0xdb67,0,0,0xdc67,0,0,0xdd67,0,0,0xde67,0,0,0xdf67,0,0, -0xe067,0,0,0xe167,0,0,0xe267,0,0,0xe367,0,0xe00000,0xe467,0,0,0xe567, -0,0,0xe667,0,0,0xe767,0,0,0xe867,0,0,0xe967,0,0,0xea67,0, -0,0xeb67,0,0,0xec67,0,0,0xed67,0,0,0xee67,0,0,0xef67,0,0, -0xf167,0,0,0xf367,0,0,0xf567,0,0,0xf667,0,0,0xf767,0,0,0xf867, -0,0,0xf967,0,0,0xfa67,0,0xe00000,0xfb67,0,0,0xfc67,0,0,0xfd67,0, -0,0xfe67,0,0,0x10167,0,0,0x10267,0,0,0x10367,0,0,0x10467,0,0, -0x10667,0,0,0x10767,0,0,0x10867,0,0,0x10967,0,0,0x10a67,0,0,0x10b67, -0,0,0x10c67,0,0,0x10d67,0,0,0x10e67,0,0,0x10f67,0,0,0x11067,0, -0,0x11367,0,0,0x11467,0,0,0x11567,0,0,0x11667,0,0,0x11767,0,0, -0x11867,0,0,0x11967,0,0xe00000,0x11a67,0,0,0x11b67,0,0,0x11c67,0,0,0x11d67, -0,0,0x11e67,0,0,0x11f67,0,0,0x12067,0,0,0x12167,0,0,0x12267,0, -0,0x12367,0,0,0x12467,0,0,0x12567,0,0,0x12667,0,0,0x12767,0,0, -0x12867,0,0,0x12967,0,0,0x12a67,0,0xe00000,0x12b67,0,0,0x12c67,0,0,0x12d67, -0,0,0x12f67,0,0,0x13067,0,0,0x13167,0,0,0x13267,0,0,0x13367,0, -0,0x13467,0,0,0x13567,0,0,0x13667,0,0,0x13767,0,0,0x13867,0,0, -0x13967,0,0,0x13a67,0,0,0x13b67,0,0,0x13c67,0,0,0x13d67,0,0,0x13f67, -0,0,0x14067,0,0,0x14167,0,0,0x14367,0,0,0x14467,0,0,0x14567,0, -0,0x14667,0,0,0x14767,0,0,0xa0067,0,0xe00000,0xa4f67,0,0xe00000,0xa5f67,0,0xe00000, -0xac567,0,0xe00000,0xad167,0,0xe00000,0xb0067,0,0xe00000,0xb1267,0,0xe00000,0xb2e67,0,0xe00000,0xb4867, -0,0xe00000,0x11000100,0,0x900020,0x11000100,0x40000001,0x4440020,0x11000100,0x40000001,0x4643020,0x11000100,0x40000001,0x4a5a040,0x11000100,0x40000001, -0x516a8a0,0x11000200,0,0x900020,0x11000200,0x4000001,0xc8c4000b,0x11000200,0x7c00100,0xc8220402,0x11000200,0x24000000,0x4200000,0x11000200,0x24000008,0x5710000, -0x11000200,0x40000001,0x5d3b020,0x11000219,0x7c00100,0xfc220401,0x11000219,0x7c00100,0xfc250401,0x11000319,0x7c00100,0xc8220402,0x11000319,0x7c00100,0xfc220401,0x11000319, -0x7c00100,0xfc250400,0x11000319,0x7c00100,0xfc250401,0x11000419,0x7c00100,0x8220400,0x11000419,0x7c00100,0x10220400,0x11000419,0x7c00100,0x10230400,0x11000419,0x7c00100, -0x18220400,0x11000419,0x7c00100,0x18230400,0x11000419,0x7c00100,0x20220400,0x11000419,0x7c00100,0x20250400,0x11000419,0x7c00100,0xc8220402,0x11000419,0x7c00100,0xc8250402, -0x11000419,0x7c00100,0xfc220401,0x11000419,0x7c00100,0xfc250400,0x11000419,0x7c00100,0xfc250401,0x11000519,0x7c00100,0x10220400,0x11000519,0x7c00100,0x10230400,0x11000519, -0x7c00100,0x18220400,0x11000519,0x7c00100,0x30220400,0x11000519,0x7c00100,0xfc220400,0x11000600,0x4000400,0x4200400,0x11000600,0x4000400,0xc8200002,0x11000600,0x7c00500, -0x10220400,0x11000600,0x7c00500,0x10230400,0x11000600,0x7c00500,0x10530400,0x11000600,0x7c00500,0xfc230400,0x11000600,0x7c00d00,0x10230400,0x11000619,0x7c00500,0xc822040f, -0x11000800,0x4000010,0xc9001401,0x11000800,0x4000400,0xc8200001,0x11000800,0x6800010,0xc8201001,0x11000800,0x7c00500,0xc8230401,0x11000807,0x7c00100,0x80220400,0x11000807, -0x7c00100,0x80250400,0x1100080e,0x4000400,0xc8200002,0x1100080e,0x4000400,0xf8200000,0x1100080e,0x7000500,0xc8220402,0x1100080e,0x7c00100,0x8250400,0x1100080e,0x7c00100, -0x18220400,0x1100080e,0x7c00100,0xc8220402,0x1100080e,0x7c00100,0xc8250401,0x1100080e,0x7c00100,0xfc220400,0x1100080e,0x7c00100,0xfc220401,0x1100080e,0x7c00100,0xfc250401, -0x1100080e,0x7c00120,0xc8220402,0x1100080e,0x7c00120,0xc8250402,0x11000908,0x4000000,0xc200000,0x11000908,0x7c00100,0x8220400,0x11000908,0x7c00100,0x8220401,0x11000908, -0x7c00100,0x8250400,0x11000908,0x7c00100,0x8250401,0x11000908,0x7c00100,0xfc220400,0x11000908,0x7c00100,0xfc220401,0x11000908,0x7c00100,0xfc250400,0x11000908,0x7c00100, -0xfc250401,0x11000a03,0x4000000,0x4200400,0x11000a03,0x4000000,0x4201000,0x11000a03,0x4000000,0x4270000,0x11000a03,0x7c00100,0xc8220402,0x11000a03,0x7c00100,0xfc220400, -0x11000a03,0x7c00100,0xfc250400,0x11000a03,0x7c00500,0xfc230400,0x11000a03,0xc000010,0x5049400,0x11000b13,0x2802500,0x20962460,0x11000b13,0x2802500,0xfc962460,0x11000b13, -0x4000000,0x4200000,0x11000b13,0x4000000,0xf8201000,0x11000b13,0x4000000,0xf8230400,0x11000b13,0x4000002,0x4400000,0x11000b13,0x4000010,0x4200000,0x11000b13,0x7c00100, -0xfe633800,0x11000c00,0x80000000,0x5329960,0x11000c02,0x2802100,0x20962460,0x11000c02,0x2802400,0x20962460,0x11000c02,0x4000000,0x4200000,0x11000c02,0x4000000,0x5329400, -0x11000c02,0x4000000,0x5329800,0x11000c02,0x4000000,0x5500000,0x11000c02,0x6800000,0xfd329800,0x11000c02,0x7c00100,0x8230400,0x11000c02,0x7c00100,0xc8230402,0x11000c02, -0x7c00100,0xfc230400,0x11000c02,0x7c00100,0xfc230401,0x11000c02,0x7c00500,0xfc230400,0x11000c02,0x7d00100,0xc0230400,0x11000f01,0x2802400,0x10962460,0x11000f0a,0x2802100, -0xfc962460,0x11000f0a,0x2802400,0xfc962460,0x11000f0a,0x2806400,0xfc962460,0x11000f0a,0x4000000,0x4200000,0x11000f0a,0x6800100,0xfc962540,0x11000f0a,0x7c00100,0xc8230401, -0x11000f0a,0x7c00100,0xfc230400,0x11000f0a,0x7c00100,0xfc230401,0x11001004,0x2802100,0xfc962460,0x11001004,0x2802400,0xfc962460,0x11001004,0x2806400,0xfc962460,0x11001004, -0x4000000,0x4200000,0x11001004,0x4000000,0x5500000,0x11001004,0x6800100,0xfc962540,0x11001004,0x6800100,0xfc962541,0x11001004,0x7c00100,0xc8230401,0x11001004,0x7c00100, -0xfc230400,0x11001110,0x2802100,0xfc962460,0x11001110,0x2802400,0xfc962460,0x11001110,0x2806400,0xfc962460,0x11001110,0x6800100,0xfc962540,0x11001110,0x7c00100,0xc8230401, -0x11001110,0x7c00100,0xfc230400,0x1100120f,0x2802100,0xfc962460,0x1100120f,0x2802400,0xfc962460,0x1100120f,0x2806400,0xfc962460,0x1100120f,0x6800100,0xfc962540,0x1100120f, -0x7c00100,0xfc230400,0x1100131f,0x2802100,0xfc962460,0x1100131f,0x2802400,0xfc962460,0x1100131f,0x2806400,0xfc962460,0x1100131f,0x4000000,0x4200000,0x1100131f,0x6800000, -0xfd329800,0x1100131f,0x6800100,0xfc962540,0x1100131f,0x6800100,0xfc962541,0x1100131f,0x7c00100,0xc8230401,0x1100131f,0x7c00100,0xfc230400,0x11001423,0x2802100,0xfc962460, -0x11001423,0x2806400,0xfc962460,0x11001423,0x6800100,0xfc962540,0x11001423,0x6800100,0xfc962541,0x11001423,0x7c00100,0xfc230400,0x11001423,0x7c00100,0xfc230401,0x11001524, -0x2802100,0xfc962460,0x11001524,0x2802100,0xfc962461,0x11001524,0x2806400,0xfc962460,0x11001524,0x6800000,0xfd329800,0x11001524,0x6800100,0xfc962540,0x11001524,0x7c00100, -0xfc230400,0x11001615,0x2802100,0xfc962460,0x11001615,0x2806400,0xfc962460,0x11001615,0x6800100,0xfc962540,0x11001615,0x6800100,0xfc962541,0x11001615,0x7c00100,0x8230400, -0x11001615,0x7c00100,0xfc230400,0x1100171a,0x2802100,0xfc962460,0x1100171a,0x2806400,0xfc962460,0x1100171a,0x6800000,0xfd329800,0x1100171a,0x6800100,0xfc962540,0x1100171a, -0x6800100,0xfc962541,0x1100171a,0x7c00100,0xfc230400,0x11001900,0x4000000,0x5600000,0x11001926,0x2802100,0xfd862460,0x11001926,0x2802400,0xfd862460,0x11001926,0x2806100, -0xfd862460,0x11001926,0x4000000,0x4200000,0x11001926,0x4000010,0x4400000,0x11001926,0x6800000,0xfd329800,0x11001926,0x7800100,0xc9830142,0x11001926,0x7c00100,0xfd830000, -0x11001926,0x7c00900,0xfd830000,0x11001926,0x7e00100,0xfd830000,0x11001a18,0x2802100,0xfd862460,0x11001a18,0x2802400,0xfd862460,0x11001a18,0x6800000,0xfd329800,0x11001a18, -0x7800100,0xc9830142,0x11001a18,0x7c00100,0xc9830002,0x11001a18,0x7c00100,0xfd830000,0x11001a18,0x7c00900,0xfd830000,0x11001a18,0x7e00100,0xfd830000,0x11001d0c,0x7c00100, -0x8230400,0x11001d0c,0x7c00100,0x8250400,0x11001d0c,0x7c00100,0xfc230400,0x11001e12,0x7c00100,0xa230500,0x11001e12,0x7c00100,0xa330520,0x11001e12,0x7c80100,0xc6330520, -0x11002619,0x7c00100,0xc8220402,0x11002619,0x7c00100,0xfc220401,0x11002619,0x7c00100,0xfc250401,0x1100270e,0x4000400,0xc8200001,0x1100270e,0x4000400,0xc8200002,0x1100270e, -0x4000400,0xc8500001,0x1100270e,0x7c00100,0xc8220401,0x1100270e,0x7c00100,0xc8250401,0x1100270e,0x7c00100,0xfc220401,0x1100270e,0x7c00100,0xfc250401,0x11002800,0x80000, -0xc4918820,0x11002800,0x80000,0xc5c18020,0x11002800,0x180000,0xc0918820,0x11002800,0x4000001,0xc8445801,0x11002800,0x4000001,0xc8445802,0x11002800,0x4000001,0xc8c4000b, -0x11002800,0x6800000,0x10201c00,0x11002800,0x6800020,0x10201c00,0x11002800,0x24000000,0x4200000,0x11002800,0x24000000,0x4810000,0x11002800,0x24000000,0x5410000,0x11002800, -0x24000000,0x5500000,0x11002800,0x24000000,0xc8200002,0x11002800,0x24000000,0xc9500002,0x11002800,0x24000002,0x4400000,0x11002800,0x24000006,0xc8c0000b,0x11002800,0x24000008, -0x5410000,0x11002800,0x24000008,0x5710000,0x11002800,0x24000020,0x5001400,0x11002800,0x24000020,0xc9500002,0x11002800,0x2c000010,0x5248000,0x11002800,0x2c000010,0xc9248002, -0x11002800,0x40000001,0x463b020,0x11002800,0x40080000,0xc4918820,0x11002801,0x2880000,0xc6a65620,0x11002801,0x2882000,0xc4962460,0x11002900,0x4000000,0xc820000e,0x11002900, -0x4000000,0xc820000f,0x11002900,0x4000020,0xc820000e,0x11002900,0x4000020,0xc820000f,0x11002900,0x4000020,0xc881000e,0x11002900,0x4000020,0xc881000f,0x11002900,0x4000020, -0xc941000e,0x11002900,0x4000020,0xc941000f,0x11002900,0x4000022,0xc820000e,0x11002900,0x4000022,0xc820000f,0x11002a00,0x4000000,0x5500000,0x11002a00,0x4000000,0x5600000, -0x11002a00,0x4000000,0xc9600002,0x11002b01,0x2000,0x14962460,0x11002b01,0x2802020,0x10962460,0x11002c00,0x4000000,0x4200000,0x11002c00,0x4000000,0xc200000,0x11002c00, -0x4000000,0xc8200002,0x11002c00,0x4000000,0xc820000f,0x11002c00,0x4000020,0x4200000,0x11002c00,0x7c00000,0x10200000,0x11002c00,0x7c00020,0x10200000,0x11002c00,0x7c00120, -0xc8220405,0x11002c00,0x7c00120,0xc8230402,0x11002c00,0x7c00120,0xc8250402,0x11002c00,0x7c00120,0xc8250405,0x11002c19,0x7c00100,0x8250400,0x11002c19,0x7c00100,0xc8250401, -0x11002d00,0x4000000,0xc8100006,0x11002d00,0x4000000,0xc8200006,0x11002d19,0x7c00100,0x18230400,0x11002d19,0x7c00100,0xc8220402,0x11002d19,0x7c00100,0xc8250402,0x11002e00, -0x24000000,0x4200000,0x11002e00,0x24000020,0x4200000,0x11002e00,0x24000020,0x4200001,0x11002f00,0x24000020,0x4200000,0x11002f00,0x24000020,0x4200001,0x11002f00,0x24000020, -0x4f00000,0x11002f00,0x24000020,0x5600000,0x11002f00,0x24000020,0xc8200002,0x11002f00,0x24000022,0x5600000,0x11003000,0x24000000,0x4200000,0x11003000,0x24000020,0x4200000, -0x11003000,0x24000020,0x4810000,0x11003000,0x24000020,0x5410000,0x11003100,0x24000000,0x4200000,0x11003200,0x24000000,0x4200000,0x11003300,0x4000000,0xc8100003,0x11003400, -0x24000000,0x4100000,0x11003400,0x24000000,0x4200000,0x11003500,0x24000000,0x4200000,0x11003600,0x24000000,0x4200000,0x11003600,0x24000020,0x4200000,0x11003700,0x24000000, -0x4200000,0x11003700,0x24000000,0x4e00000,0x11003700,0x24000000,0x6800000,0x11003700,0x24000020,0x4200000,0x11003800,0x4000000,0x4100000,0x11003800,0x24000000,0x4200000, -0x11003800,0x24000000,0x4b00000,0x11003800,0x24000000,0x4e00000,0x11003800,0x24000000,0x5710000,0x11003800,0x24000000,0x6800000,0x11005003,0x7c00100,0xc8220402,0x11005013, -0x2802500,0x30962460,0x11005013,0x4000020,0xc8200005,0x11005013,0x7c00100,0xca633801,0x11005013,0x7c00100,0xca633802,0x11005013,0x7c00100,0xca633805,0x11005019,0x7c00100, -0xc8220402,0x11005102,0x7000100,0xc8230408,0x11005102,0x7c00100,0xc8230404,0x11005102,0x7c00100,0xc8230407,0x11005102,0x7c00100,0xc8230408,0x11005102,0x7c00100,0xc8230409, -0x11005201,0x2802400,0x10962460,0x11005500,0x80000,0xc5e18820,0x11005502,0x7000100,0xc8230408,0x11005502,0x7c00100,0xc8230404,0x11005502,0x7c00100,0xc8230407,0x11005502, -0x7c00100,0xc8230408,0x11005502,0x7c00100,0xc8230409,0x11005667,0x1000,0,0x11020200,0x80004,0xc4418820,0x11020200,0x4000000,0xc8100006,0x11020200,0x4000000, -0xc810000f,0x11020200,0x4000400,0xc8100002,0x11020200,0x4000400,0xc8500002,0x11020200,0x6800c00,0xf8101000,0x11020200,0x24000000,0x4100000,0x11020200,0x24000000,0x4200000, -0x11020200,0x24000000,0x5400000,0x11020200,0x24000000,0x5500000,0x11020200,0x24000000,0x5600000,0x11020200,0x24000020,0x4100000,0x11020200,0x24000020,0x5600000,0x11020219, -0x7c00100,0xc812040f,0x11020219,0x7c00100,0xfc220400,0x11020219,0x7c00100,0xfc220401,0x11020219,0x7c00100,0xfc250400,0x11020319,0x7c00100,0xc8220402,0x11020319,0x7c00100, -0xc8250402,0x11020319,0x7c00100,0xfc220400,0x11020319,0x7c00100,0xfc220401,0x11020319,0x7c00100,0xfc250400,0x11020319,0x7d00100,0xc0220402,0x11020419,0x7c00100,0xfc220401, -0x11020519,0x7c00100,0x10220400,0x11020600,0x4000400,0x4200400,0x11020600,0x4000400,0xc8100002,0x11020600,0x7c00500,0x10130400,0x11020600,0x7c00d00,0x10130400,0x11020701, -0x2802400,0x10962460,0x11020701,0x2802400,0x10c62460,0x11020701,0x2802400,0x20962460,0x11020701,0x2802400,0xc8962461,0x11020701,0x2802400,0xfc962460,0x1102080e,0x7c00100, -0xfc220400,0x1102080e,0x7c00100,0xfc250400,0x11020908,0x7c00100,0xfc220400,0x11020908,0x7c00100,0xfc220401,0x11020908,0x7c00100,0xfc250400,0x11020908,0x7c00100,0xfc250401, -0x11022800,0x24000000,0x4100000,0x11022800,0x24000000,0x4200000,0x11022800,0x24000000,0x5500000,0x11022800,0x24000000,0xc8200002,0x11022800,0x24000000,0xc8f00002,0x11022800, -0x24000000,0xc8f0ac02,0x11022800,0x24000000,0xf8401000,0x11022800,0x24000002,0x4100000,0x11022800,0x24000002,0x4370000,0x11022800,0x24000002,0x4470000,0x11022800,0x24000006, -0xf8400000,0x11022800,0x24000008,0x5710000,0x11022800,0x24000008,0x5712c00,0x11022800,0x24000008,0xf9712c00,0x11022800,0x24000020,0x4100000,0x11022800,0x24000020,0x5500000, -0x11022800,0x24000020,0xc9500002,0x11022900,0x4000000,0xc810000e,0x11022900,0x4000000,0xc810000f,0x11022919,0x7c00100,0xc812040f,0x11022c00,0x4000000,0xc8100002,0x11022c00, -0x4000000,0xc810000f,0x11022c00,0x4000000,0xc9500002,0x11022c00,0x4000000,0xc9600002,0x11022c00,0x7c00120,0xc8120405,0x11022c0e,0x7c00100,0xc8250401,0x11022c19,0x7c00100, -0xc8150401,0x11022d00,0x4000000,0xc8100006,0x11022d00,0x4000000,0xc8200006,0x11022d19,0x7c00100,0xc8120402,0x11022d19,0x7c00100,0xc8150402,0x11022e00,0x24000000,0x4200000, -0x11022e00,0x24000020,0x4100000,0x11022f00,0x24000020,0x4100000,0x11022f00,0x24000020,0x4100001,0x11022f00,0x24000020,0xc8100002,0x11023000,0x24000000,0x4100000,0x11023300, -0x4000000,0xc8100002,0x11023300,0x4000000,0xc8100003,0x11023300,0x4000100,0xc8120403,0x11023300,0x4000100,0xc8150403,0x11023400,0x24000000,0x4100000,0x11023500,0x24000000, -0x4100000,0x11023600,0x24000000,0x4100000,0x11023600,0x24000020,0x4100000,0x11023700,0x24000000,0x4100000,0x11023700,0x24000000,0x4e00000,0x11023700,0x24000020,0x4100000, -0x11023800,0x4000000,0x4100000,0x11023800,0x24000000,0x4200000,0x11024e67,0,0,0x11025600,0x4000000,0x4100000,0x11042a00,0x4000000,0x5600000,0x11045700, -0x4000000,0xc820000a,0x11045700,0x4000020,0xc820000a,0x11045712,0x7c00100,0xc8e3040a,0x11045712,0x7c80100,0xc4e3040a,0x11045716,0x7c00100,0xc8e30c0a,0x11045716,0x7c00100, -0xca530c0a,0x11063d00,0x4000001,0xc8445811,0x11065700,0x4000000,0xc8810011,0x11065700,0x4000000,0xc8e00011,0x11065700,0x4000000,0xc9410011,0x11065700,0x4000000,0xc9500011, -0x11065700,0x4000000,0xc9600011,0x11065700,0x4000006,0xc8e70011,0x11065700,0x4000008,0xc8e00011,0x11065700,0x4000008,0xc8e02c11,0x11065700,0x4000010,0xc8871411,0x11065700, -0x4000010,0xc9201411,0x11065700,0x4000010,0xc9271011,0x11065700,0x4000020,0xc8e00011,0x11065700,0x4000400,0xc8e00011,0x11065700,0x4000420,0xc8e00011,0x11065700,0x6800000, -0xc8e01c11,0x11065700,0x6800040,0xc8e29811,0x11065700,0xc000010,0xc880ac11,0x11065700,0xc000010,0xc8b48011,0x11065719,0x7c00100,0xc8e20411,0x11065719,0x7c00100,0xc8e50411, -0x11065719,0x7c00140,0xc8e20411,0x11065719,0x7c00140,0xc8e50411,0x11080100,0x6800000,0xfc201c00,0x11080100,0x68000c0,0xfd329800,0x11080100,0x24000000,0x4200000,0x11080100, -0x24000000,0x4810000,0x11080100,0x24000000,0x5410000,0x11080100,0x24000000,0x5500000,0x11080100,0x24000000,0x5600000,0x11080100,0x24000000,0x5b00000,0x11080100,0x24000000, -0x6410000,0x11080100,0x24000006,0xf8d70000,0x11080100,0x24000008,0x5714000,0x11080100,0x24000008,0xf9713c00,0x11080100,0x24000010,0x5001400,0x11080100,0x24000010,0x5071400, -0x11080100,0x24000010,0xf9071000,0x11080100,0x24000020,0x4200000,0x11080100,0x24000020,0x4400000,0x11080100,0x24000020,0x5600000,0x11080100,0x24000400,0x4200000,0x11080100, -0x24000420,0x4200000,0x11080100,0x2c000010,0x4b48000,0x11080100,0x2c000010,0xf900ac00,0x11080100,0x44000001,0x5a45800,0x11080119,0x7c00100,0xfc220400,0x11080119,0x7c00100, -0xfc250400,0x11080119,0x7c001c0,0xfc220400,0x11080119,0x7c001c0,0xfc250400,0x11080200,0x4000400,0xc8200002,0x11080200,0x24000000,0x4200000,0x11080200,0x24000000,0x5500000, -0x11080200,0x24000000,0x5600000,0x11080200,0x24000020,0x4200000,0x110a1e12,0x7c00100,0xa130480,0x110a1e12,0x7c80100,0xc6130480,0x110a3000,0x24000000,0x4e00000,0x110a3000, -0x24100000,0xc0810001,0x110a3000,0x24100000,0xc1410001,0x110a3700,0x24000000,0x4200000,0x110a3d00,0x4000000,0x4e00000,0x110a3d00,0x4000000,0xc8e00002,0x110a3d00,0x24000000, -0x4e00000,0x110a3d11,0x7c00300,0x10e30000,0x110a3d11,0x7c00300,0xfce30000,0x110a3d11,0x7c00900,0xfd230400,0x110a3d12,0x2802400,0x18962460,0x110a3e14,0x7c00100,0xfce30000, -0x110a3e14,0x7c00100,0xfce30001,0x110a3e14,0x7c00100,0xfe530000,0x110a3e14,0x7c00900,0xfd230000,0x110a3e14,0x7c00900,0xfd230001,0x110a3f16,0x7c00100,0xfce30c00,0x110a3f16, -0x7c00100,0xfce30c01,0x110a3f16,0x7c00100,0xfe530c00,0x110a3f16,0x7c00900,0xfd230c00,0x110a3f16,0x7c00900,0xfd230c01,0x110a4005,0x7c00100,0xfce30400,0x110a4112,0x7c00100, -0xc8e30402,0x110a4112,0x7c80100,0xc4e30402,0x110a4400,0x4000000,0x14e00000,0x110a4412,0x4000000,0xc8e00002,0x110a4412,0x4000000,0xc8e00003,0x110a4416,0x4000000,0xc8e00c03, -0x110a4500,0x4000000,0xc8e0000d,0x110a4516,0x4000000,0xc8e00c0d,0x110a4711,0x7c40300,0xfce30000,0x110a4f11,0x7c00300,0xc8e30001,0x110a4f11,0x7c40300,0xfce30000,0x110a5300, -0x4000000,0xc8810010,0x110a5300,0x4000000,0xc8e00002,0x110a5300,0x4000000,0xc8e00010,0x110a5300,0x4000000,0xc9410010,0x110a5300,0x4000002,0xc8e70010,0x110a5300,0x4000008, -0xc8810010,0x110a5300,0x4000008,0xc9410010,0x110a5300,0x6800000,0xc8e01c02,0x110a5300,0x6800000,0xc8e01c10,0x110a5400,0x4000000,0xc881000c,0x110a5400,0x4000000,0xc8e0000c, -0x110a5400,0x4000000,0xc941000c,0x110a5400,0x4000000,0xc950000c,0x110a5400,0x4000000,0xc960000c,0x110a5400,0x4000002,0xc8e7000c,0x110a5400,0x4000010,0xc887140c,0x110a5400, -0x4000010,0xc8e7000c,0x110a5400,0x4000010,0xc920140c,0x110a5400,0x4000010,0xc927100c,0x110a5400,0x4000020,0xc8e0000c,0x110a5400,0x4000026,0xc8e7000c,0x110a5400,0xc000010, -0xc880ac0c,0x110a5400,0xc000010,0xc8b4800c,0x11400c0c,0x4000010,0x4b00000,0x11400c0c,0x4000010,0x5071400,0x11400c17,0xc000010,0x4b48000,0x11400c1e,0x7c00900,0x8230400, -0x11400f4b,0xc000010,0x4448000,0x11400f5f,0xc000010,0x4448000,0x11401d94,0x4000000,0x4200000,0x11403dcc,0x4000000,0x4e00000,0x114457c1,0x4000008,0xc881000a,0x114457c1, -0x4000008,0xc941000a,0x114457c1,0x4000010,0xc887000a,0x114457c1,0x6800004,0xc920000a,0x114457c1,0xc000010,0xc884800a,0x114457ca,0x3802500,0xc926246a,0x114457ca,0x7c00d00, -0xca530c0a,0x114a3dc1,0x24000000,0x4810000,0x114a3dc1,0x24000000,0x5410000,0x114a3dc1,0x24000008,0x4810000,0x114a3dc1,0x24000008,0x5410000,0x114a3dc1,0x24000010,0x4870000, -0x114a3dc1,0x2c000010,0x4848000,0x114a3dc7,0x4000000,0x4e00000,0x114a3dc7,0x24000000,0x4e00000,0x114a3dc7,0x24000002,0x4e00000,0x114a3dc7,0x24000002,0x5200000,0x114a3dc7, -0x24000008,0x4810000,0x114a3dc7,0x24000008,0x5410000,0x114a3dc7,0x24000008,0xc810000,0x114a3dca,0x7c00900,0x10930c00,0x114a3dca,0x7c00900,0x10e30c00,0x114a3dcc,0x7c00300, -0xfce30000,0x114a3eca,0x7000400,0xc9200c02,0x114a3fc1,0x6800004,0xf9200000,0x114a3fca,0x7c00d00,0xfe530c00,0x114a42cc,0x4000000,0x4e00000,0x114a42cc,0x4000000,0xc8e0000f, -0x114a44cc,0x4000000,0xc8e00002,0x114a44cc,0x4000000,0xc8e00003,0x114a45cc,0x4000000,0xc8e00002,0x114a45cc,0x4000000,0xc8e0000d,0x11505113,0x24000000,0x14810000,0x11505113, -0x24000000,0x15410000,0x1180090a,0x2802400,0x18962460,0x11800c27,0x2802100,0xfc962460,0x11800c27,0x2802500,0xfc962460,0x11800f32,0x2802400,0x8962460,0x11800f3f,0x2802400, -0x8962460,0x11820700,0x2802400,0xfc962460,0x11820700,0x2802500,0xfc962460,0x118a3dcd,0x2802400,0x10962460,0x118a3eca,0x2802400,0xfc962460,0x11c00904,0x2802400,0x8962460, -0x11c00908,0x2802400,0x18962460,0x11c00c2c,0x6800000,0xfd329800,0x11c00c30,0xc000010,0x4b48000,0x11c00f78,0x6800000,0xfd329800,0x11c0107d,0x6800000,0xfd329800,0x11c01181, -0x6800000,0xfd329800,0x11c01285,0x6800000,0xfd329800,0x11c01489,0x4000000,0x4200000,0x11c01489,0x6800000,0xfd329800,0x11c0168d,0x6800000,0xfd329800,0x11d05117,0x7c00100, -0xc8230408,0x20000067,0x1000,0,0x20000b13,0x2802400,0x20962460,0x20000b13,0x2802500,0x20962460,0x20001b27,0x2802100,0xc8962461,0x20001b27,0x2802100,0xfc962460, -0x20001b27,0x2802400,0x10962460,0x20001b27,0x2802400,0x20962460,0x20001b27,0x2802400,0xfc962460,0x20001b27,0x2802500,0xfc962460,0x20001b27,0x2806400,0xfc962460,0x20001b27, -0x2902100,0xc0962462,0x20001b27,0x4000000,0x4200000,0x20001b27,0x4000000,0x4400000,0x20001b27,0x4000000,0x4500000,0x20001b27,0x4000000,0x4810000,0x20001b27,0x4000000, -0x4b00000,0x20001b27,0x4000000,0x5410000,0x20001b27,0x4000000,0xc8c0000b,0x20001b27,0x4000000,0xf8400000,0x20001b27,0x4000010,0x4b00000,0x20001b27,0x4000010,0x4c00000, -0x20001b27,0x6800000,0xfd329800,0x20001b27,0x6800100,0xfc462540,0x20001b27,0x6800400,0xfc962540,0x20001b27,0x7c00100,0xc8230401,0x20001b27,0x7c00100,0xfc230400,0x20002619, -0x7c00100,0xc8220401,0x20002a00,0x4000000,0x5600000,0x20004b67,0,0x1900000,0x20004c67,0,0x1900000,0x20004d67,0,0x1900000,0x20006d67,0x1000, -0,0x20006e67,0x1000,0,0x20026d67,0,0,0x20026e67,0,0,0x200a4a12,0x7c00100,0xfdf304c1,0x200a4a12,0x7c00100,0xfe0304e1, -0x21005600,0x4000000,0x4700000,0x21022a00,0x4000000,0x5600000,0x30000419,0x7c00100,0x8220400,0x30000419,0x7c00100,0x8250400,0x30000419,0x7c00100,0x20220400,0x30000419, -0x7c00100,0x20250400,0x30000419,0x7c00100,0xfc220401,0x30000419,0x7c00100,0xfc250401,0x30000519,0x7c00100,0x10220400,0x30000600,0x4000400,0x4200400,0x30000600,0x7c00500, -0x10230400,0x30000600,0x7c00500,0xfc230400,0x30000605,0x4000400,0x4200400,0x3000080e,0x7c00100,0x8220400,0x3000080e,0x7c00100,0x10220400,0x30000908,0x2000,0xc962460, -0x30000908,0x7c00100,0xfc220400,0x30000908,0x7c00100,0xfc220401,0x30000908,0x7c00100,0xfc250400,0x30000908,0x7c00100,0xfc250401,0x30000a03,0x4000006,0xf8400400,0x30000c02, -0x4000000,0xf8200000,0x30000c02,0x7c00100,0xfc230400,0x30000d22,0x2802100,0x40962460,0x30000d22,0x2802400,0x50962460,0x30000d22,0x2802500,0x40962460,0x30000d22,0x4000000, -0x44200000,0x30000d22,0x4000010,0x44200000,0x30000d22,0x7c00100,0x40230400,0x30000d22,0xc000010,0x44248000,0x30000d22,0x80000000,0x44218560,0x30000e25,0x2802500,0xfc962460, -0x30000e25,0x7c00100,0xfc230400,0x30001821,0x2802100,0x30962460,0x30001821,0x2802100,0xfc962460,0x30001821,0x2806400,0xfc962460,0x30001821,0x4000000,0x4200000,0x30001821, -0x6800100,0x30962540,0x30001821,0x6800100,0xfc962540,0x30001821,0x6800100,0xfc962541,0x30001821,0x7c00100,0x30230400,0x30001821,0x7c00100,0xfc230400,0x30001b27,0x2802100, -0xfc962460,0x30001b27,0x2802400,0xfc962460,0x30001b27,0x4000000,0x4200000,0x30001b27,0x4000000,0x4400000,0x30001b27,0x7c00100,0xfc230400,0x30001c1c,0x2802100,0xfd862460, -0x30001c1c,0x2802400,0xfd862460,0x30001c1c,0x2806400,0xfd862460,0x30001c1c,0x4000000,0x4200000,0x30001c1c,0x6800100,0xfd862400,0x30001c1c,0x6800100,0xfd862540,0x30001c1c, -0x7c00100,0xfd830000,0x30001c1c,0x7c00100,0xfd830001,0x30001c1c,0xc000010,0x4448000,0x30001f0b,0x4000000,0x4200000,0x30001f0b,0x4000010,0x4200000,0x30001f0b,0x4000010, -0x4400000,0x30001f0b,0x6800000,0x8200000,0x30001f0b,0x7c00100,0xfc230400,0x30001f0b,0xc000010,0x4248000,0x30002006,0x7c00100,0x40250400,0x30002128,0x4000000,0x44200000, -0x30002128,0x7c00100,0x40230400,0x30002128,0xc000010,0x44248000,0x3000221d,0x4000000,0x84810000,0x3000221d,0x4000000,0x85410000,0x3000221d,0x4000001,0x84445800,0x3000221d, -0x7c00100,0x80230400,0x30002300,0x4000010,0x4400000,0x30002320,0x7c00100,0x80230400,0x30002417,0x2802100,0xfd862460,0x30002417,0x2802400,0x9862460,0x30002417,0x2802400, -0x11862460,0x30002417,0x2802400,0x19862460,0x30002417,0x2802400,0xfd862460,0x30002417,0x2806400,0xfd862460,0x30002417,0x2882000,0xc5862460,0x30002417,0x4000000,0x4200000, -0x30002417,0x4000000,0x5600000,0x30002417,0x4000000,0xc400000,0x30002417,0x4000010,0x4400000,0x30002417,0x4000010,0x5200000,0x30002417,0x6800000,0xfd329800,0x30002417, -0x6800100,0xfd862540,0x30002417,0x7c00100,0x9830000,0x30002417,0x7c00100,0xfd830000,0x30002417,0x7d00100,0xc1830000,0x30002417,0xc000010,0x4448000,0x3000251b,0x80000, -0xc4c18820,0x3000251b,0x2802100,0xa0962460,0x3000251b,0x3c02100,0x80962460,0x3000251b,0x4000000,0x84200000,0x3000251b,0x4000006,0x84500000,0x3000251b,0x4000010,0x84400000, -0x3000251b,0x4000010,0x84b70000,0x3000251b,0x4000800,0x84200000,0x3000251b,0x6800000,0x81329800,0x3000251b,0x7c00100,0x80230400,0x3000251b,0x7c00900,0x80230400,0x3000251b, -0xc000010,0x84b48000,0x3000251b,0x12882000,0xc4962460,0x30002800,0x24000000,0x4200000,0x30002800,0x2c000010,0xc9248002,0x30002a00,0x4000000,0x5600000,0x30002b01,0x2000, -0x14962460,0x30002c00,0x4000000,0x4200000,0x30002c00,0x7c00100,0xc8220405,0x30002d19,0x7c00100,0x18250400,0x30002e00,0x24000000,0x4200000,0x30003000,0x24000000,0x4200000, -0x30003100,0x24000000,0x4200000,0x30003600,0x24000000,0x4200000,0x30003700,0x24000000,0x4200000,0x3000392e,0x24000000,0x14200000,0x30005013,0x7c00100,0xca633801,0x30005600, -0,0x4918820,0x30020600,0x4000400,0x4500400,0x30020701,0x2802400,0x10962460,0x30020701,0x2802400,0x10c62460,0x300a3a11,0x4020000,0x4e00000,0x300a3a11,0x4020000, -0xc8e00002,0x300a3b11,0x4020000,0xc8e00002,0x300a3c00,0x4008000,0x4e00000,0x300a3c00,0x4010000,0x4e00000,0x300a3d11,0x7c00300,0xc8e30002,0x300a4305,0x7c00100,0xfce30400, -0x300a4611,0x7c40300,0xfce30000,0x300a4829,0x7c00100,0x40e30400,0x300a4829,0x7c00900,0x41230400,0x300a4929,0x4000000,0x44e00000,0x3040259a,0x4000010,0x84400000,0x3040259a, -0x4000010,0x84b70000,0x3040259a,0xc000010,0x84b48000,0x304028bc,0x4000001,0xc8c41c0b,0x304a3dcc,0x4000000,0x4e00000,0x30800c27,0x2802100,0xfc962460,0x30c01c92,0x6800000, -0xfd329800,0x3100080e,0x7c00120,0xc8220402,0x3100080e,0x7c00120,0xc8250402,0x31005167,0x1000,0,0x3100581e,0x4000000,0x84200000,0x3100581e,0x7c00100,0x80230400, -0x3100590d,0x7c00100,0x80230400,0x31005a09,0x7c00100,0x80220400,0x31005a09,0x7c00100,0x80250400,0x31005b00,0x4000000,0x14200000,0x31005c00,0x80000,0xc4918820,0x31005c00, -0x2802000,0x10962460,0x31005c00,0x2802400,0x10962460,0x31005c00,0x4000000,0x14200000,0x31005c00,0x4000000,0xc8200001,0x31005c00,0x6800000,0x10962540,0x31005c00,0x6800400, -0x10962540,0x31005c01,0x2802400,0x10962460,0x31005d00,0x4000020,0xc8200005,0x31005d00,0x6800020,0xc9329805,0x31005d00,0x7c00120,0xc8220405,0x31005d00,0x7c00120,0xc8250405, -0x31006000,0x82000,0xc4962460,0x31006000,0x180000,0xc0918820,0x310a5e11,0x7c40300,0xfce30000,0x310a5f11,0x7c00300,0xc8e30001,0x32000419,0x7c00100,0x20250400,0x3200080e, -0x4000020,0x4200000,0x3200080e,0x7c00100,0x8220400,0x3200080e,0x7c00100,0x8250400,0x32000908,0x7c00100,0xfc220400,0x32000908,0x7c00100,0xfc250400,0x32000c02,0x7c00100, -0x8230400,0x32000e25,0x7c00100,0xfc230400,0x32001d0c,0x7c00100,0xfc230400,0x32002800,0x80000,0xc5e18820,0x32002800,0x80020,0xc4218820,0x32002800,0x4000001,0xc8445802, -0x32002800,0x24000000,0x4200000,0x32002800,0x24000000,0xc9500002,0x32002800,0x24000020,0x4200000,0x32002800,0x2c000010,0xc9248002,0x32002919,0x7c00100,0xc822040f,0x32002a00, -0x4000000,0x5600000,0x32002b01,0x2000,0x14962460,0x32002b01,0x2802000,0x10962460,0x32002b01,0x2802020,0x10962460,0x32002c00,0x4000000,0x4200000,0x32002c00,0x4000020, -0x4200000,0x32002c00,0x4000020,0xc8200005,0x32002c00,0x7c00120,0xc8220405,0x32002c00,0x7c00120,0xc8250405,0x32002e00,0x24000020,0x4200000,0x32002f00,0x24000020,0x4200000, -0x32003000,0x24000000,0x4200000,0x32003000,0x24000020,0x4200000,0x32003500,0x24000000,0x4200000,0x32003600,0x24000020,0x4200000,0x32003700,0x24000000,0x4100000,0x32003700, -0x24000000,0x4200000,0x32003800,0x24000000,0x4810000,0x32003800,0x24000000,0x5410000,0x32005102,0x4000000,0xc9500008,0x32005502,0x7c00100,0x10230400,0x32006108,0x7c00100, -0x8220400,0x32006108,0x7c00100,0x8250400,0x3200622a,0x2802100,0x80962460,0x3200622a,0x2806400,0x80962460,0x3200622a,0x7c00100,0x80230400,0x3200632b,0x2802100,0x80962460, -0x3200632b,0x6804000,0x80962540,0x3200632b,0x7c00100,0x80230400,0x3200642c,0x2802100,0x80962460,0x3200642c,0x7c00100,0x80230400,0x3200652d,0x2802100,0x80962460,0x3200652d, -0x7c00100,0x80230400,0x32006600,0x24000020,0x4200000,0x32006700,0x24000020,0x4200000,0x32006800,0x24000020,0x4200000,0x32006900,0x24000020,0x4200000,0x32006900,0x24000020, -0x4810000,0x32006900,0x24000020,0x5410000,0x32006a00,0x24000020,0x4200000,0x32006a00,0x24000020,0xc8200001,0x32006a00,0x24000020,0xc8200002,0x32020701,0x2882000,0xc4c62460, -0x32023300,0x4000000,0x14100000,0x32026c01,0x12882000,0xc4962460,0x32065700,0x4000000,0xc8810011,0x32065700,0x4000000,0xc9410011,0x32086600,0x24000020,0x4810000,0x32086600, -0x24000020,0x5410000,0x32086900,0x24000020,0x4810000,0x32086900,0x24000020,0x5410000,0x320a3600,0x24000020,0x4200000,0x320a3d11,0x7c00100,0x11230400,0x320a3e14,0x7c00100, -0xc8e30010,0x320a3e14,0x7c00100,0xfe530000,0x320a3f16,0x7c00100,0xc8e30c10,0x320a4400,0x4000000,0xc8e00003,0x320a4929,0x4000000,0x44e00000,0x320a4f11,0x7c00300,0xc8e30001, -0x320a6b16,0x7c00100,0xa530c00,0x32406396,0xc000010,0x84448000,0x324a3dcf,0x4000000,0x4e00000,0x324a3dcf,0x7c00100,0x11230400,0x324a3fca,0x4000002,0xf9200c00,0x324a53c7, -0x24000000,0x14e00000,0x32820701,0x2802000,0x8962460,0x40000419,0x7c00100,0x10220400,0x40000419,0x7c00100,0x20220400,0x40000519,0x7c00100,0x10220400,0x40000600,0x4000400, -0x4200400,0x4000080e,0x7c00100,0x8220400,0x4000080e,0x7c00100,0x8250400,0x4000080e,0x7c00100,0xc8250402,0x40000c02,0x2802100,0x20962460,0x40000c02,0x2802400,0x20962460, -0x40000c02,0x2802500,0x20962460,0x40000c02,0x4000000,0x4200000,0x40000c02,0x4000000,0x5071400,0x40000c02,0x7c00100,0xfc230400,0x40000c02,0x80000000,0x5329960,0x40000d22, -0x7c00100,0x40230400,0x40000f0a,0x7c00100,0xfc230400,0x40001004,0x7c00100,0xfc230400,0x40001110,0x2802100,0xfc962460,0x40001110,0x6800100,0xfc962540,0x4000120f,0x2802100, -0xfc962460,0x4000120f,0x4000000,0x5600000,0x4000120f,0x7c00100,0xfc230400,0x4000131f,0x7c00100,0xfc230400,0x40001423,0x4000000,0x4200000,0x40001423,0x4000000,0x5600000, -0x40001615,0x2802400,0xfc962460,0x40001615,0x7c00100,0xfc230400,0x40002417,0x2802400,0x19862460,0x40002417,0x4000000,0x4200000,0x40002800,0x6800000,0x20201c00,0x40002800, -0x24000002,0x4200000,0x40002c00,0x4000000,0xc8200002,0x40003000,0x24000000,0x4200000,0x40003000,0x24000020,0x4200000,0x40003700,0x24000000,0x4200000,0x40005a09,0x7c00100, -0x80220400,0x40005a09,0x7c00100,0x80250400,0x40005d00,0x7c00120,0xc8220405,0x40006f30,0x2802100,0x40962460,0x40006f30,0x2802400,0x40962460,0x40006f30,0x4000000,0x44200000, -0x40006f30,0x6800000,0x41329800,0x40006f30,0x6800100,0x40962540,0x40006f30,0x7c00100,0x40230400,0x40006f30,0xc000010,0x44b48000,0x40007034,0x7c00100,0x41830000,0x40007117, -0x4000000,0x4200000,0x40007208,0x7c00100,0x10220400,0x4000720e,0x7c00100,0x10220400,0x4000720e,0x7c00500,0xc822040e,0x4000720e,0x7c00500,0xc822040f,0x40007219,0x7c00100, -0x10220400,0x40007219,0x7c00500,0x10220400,0x40007219,0x7c00500,0xc822040e,0x40007219,0x7c00500,0xc822040f,0x40007300,0x24000000,0x4200000,0x40007400,0x4000000,0x14200000, -0x40007531,0x7c00100,0x80230400,0x40007631,0x7c00100,0x80230400,0x40007835,0x4000010,0x84400000,0x40007835,0x7c00100,0x80230400,0x40007933,0x7c00100,0x80230400,0x40007a32, -0x6800000,0x81329800,0x40007a32,0x7c00100,0x80230400,0x40007b2f,0x7c00100,0x80230400,0x40007c00,0x4000000,0x14200000,0x40020701,0x2802400,0x10962460,0x40020701,0x2802400, -0x10c62460,0x40023300,0x4000000,0x14200000,0x40027d01,0x12882000,0xc4962460,0x400a3700,0x24000000,0x4200000,0x400a3700,0x24000000,0x4e00000,0x400a4400,0x4000000,0xc8e0000d, -0x400a4412,0x4000000,0xc8e00002,0x400a4412,0x4000000,0xc8e00003,0x400a4500,0x4000000,0xc8e0000d,0x400a5300,0x4000000,0xc8810010,0x400a5300,0x4000000,0xc9410010,0x40507719, -0x4000000,0x84200000,0x4050771c,0x4000000,0x84400000,0x4050771f,0x4000000,0x84200000,0x4050771f,0x4000000,0x84400000,0x40c01489,0x4000000,0x4200000,0x40d05117,0x4000000, -0x14200000,0x41000419,0x7c00100,0x20220400,0x41000419,0x7c00100,0x20250400,0x4100080e,0x7c00100,0xfc220400,0x4100080e,0x7c00100,0xfc250400,0x41000908,0x7c00100,0xfc220400, -0x41000908,0x7c00100,0xfc250400,0x41000b13,0x2802000,0x28962460,0x41000b13,0x2802100,0x28962460,0x41000b13,0x2802100,0x30962460,0x41000b13,0x4000000,0xcb00000,0x41000c02, -0x2802100,0x20962460,0x41000c02,0x4000000,0x5500000,0x41000c02,0xc000010,0x4b48000,0x41000f0a,0x7c00100,0xfc230400,0x41001004,0x7c00100,0xfc230400,0x41001423,0x7c00100, -0xfc230400,0x41001b27,0x4000000,0x4500000,0x41001d0c,0x7c00100,0xc822040f,0x41001d0c,0x7c00100,0xfc230400,0x41001f0b,0x2802400,0xfc962460,0x41001f0b,0x4000000,0x4200000, -0x41001f0b,0x7c00100,0xfc230400,0x41002800,0x24000000,0x4200000,0x41002800,0x24000000,0xc200000,0x41002800,0x24000000,0xc400000,0x41002919,0x7c00100,0xc822040e,0x41002a00, -0x4000000,0x5600000,0x41002b01,0x2802020,0x10962460,0x41002c00,0x4000000,0x4200000,0x41002c00,0x7c00120,0xc8220405,0x41003000,0x24000000,0x4200000,0x41003700,0x24000000, -0x4200000,0x41003700,0x24000000,0x4e00000,0x41005d00,0x7c00120,0xc8220405,0x41006600,0x24000020,0x4200000,0x41006600,0x24000020,0x4810000,0x41006600,0x24000020,0x5410000, -0x41007208,0x7c00100,0xc822040f,0x41007219,0x7c00100,0x10220400,0x41007300,0x24000000,0x4200000,0x41007e0e,0x2802000,0x18962460,0x41007e0e,0x4000000,0xc200000,0x41007f0e, -0x4000000,0x4200000,0x41007f0e,0x7c00100,0x8230400,0x41008002,0x7c00100,0xfc230400,0x41008137,0x2802100,0x80962460,0x41008137,0x4000000,0x84200000,0x41008137,0x6800100, -0x80962540,0x41008137,0x7c00100,0x80230400,0x41008301,0x2802000,0x18962460,0x41008407,0x4000000,0x84200000,0x41008407,0x4000000,0x84400000,0x41008407,0x4000000,0x84b00000, -0x41008407,0x7c00100,0x80220400,0x41008407,0x7c00100,0x80250400,0x4100850b,0x7c00100,0xfc230400,0x4100860b,0x4000000,0x4200000,0x4100860b,0x7c00100,0xfc230400,0x4100870c, -0x7c00100,0x8220400,0x41008838,0x7c00100,0x80220400,0x41008838,0x7c00100,0x80250400,0x41008939,0x2802000,0x80962460,0x41008939,0x2802100,0x80962460,0x41008939,0x2806000, -0x80962460,0x41008939,0x4000000,0x84200000,0x41008939,0x4000000,0x84400000,0x41008939,0x7c00100,0x80230400,0x41008939,0xc000010,0x84448000,0x41008a00,0x4000400,0x14200400, -0x41008b3b,0x4000000,0x45800000,0x41008b3b,0x6800000,0x41329800,0x41008b3b,0x7c00100,0x41830000,0x41008b3b,0x7e00100,0x41830000,0x41008c3d,0x4000010,0x84400000,0x41008c3d, -0x7c00100,0x80230400,0x41008d0e,0x7c00100,0xc822040f,0x41008d19,0x7c00100,0x10220400,0x41008d19,0x7c00100,0xc822040f,0x41008e00,0x24000000,0x5710000,0x41008e00,0x24000000, -0xc200000,0x41008e00,0x24000000,0xc400000,0x41008e00,0x24000000,0x1d710000,0x41008e00,0x24000006,0x4400000,0x41008f3a,0x2802100,0x40962460,0x41008f3a,0x2806000,0x40962460, -0x41008f3a,0x4000000,0x44200000,0x41008f3a,0x6800100,0x40962540,0x41008f3a,0x7c00100,0x40230400,0x4100903c,0x7c00100,0x40230400,0x4100903c,0x7c00100,0xc823040f,0x41020701, -0x2802000,0x10962460,0x41020701,0x2802000,0x10c62460,0x41020701,0x2802000,0x20962460,0x410a3700,0x24000000,0x4200000,0x410a3700,0x24000000,0x4e00000,0x410a4412,0x4000000, -0xc8e00003,0x410a4711,0x7c40300,0xfce30000,0x410a4f11,0x7c00300,0xc8e30001,0x410a9100,0x4000000,0xc8800010,0x410a9100,0x4000000,0xc8810010,0x410a9100,0x4000000,0xc8870010, -0x410a9100,0x4000000,0xc8b00010,0x410a9100,0x4000000,0xc8f00010,0x410a9100,0x4000000,0xc9001410,0x410a9100,0x4000000,0xc9071010,0x410a9100,0x4000000,0xc9071410,0x410a9100, -0x4000000,0xc9410010,0x41408ad2,0x4000400,0xc200000,0x414a82cc,0x4000000,0x4e00000,0x41808300,0x2802000,0x18962460,0x41c01489,0x6800000,0xfd329800,0x50000419,0x7c00100, -0x20220400,0x50000419,0x7c00100,0x20250400,0x5000080e,0x7c00100,0xfc220400,0x50000908,0x7c00100,0xfc220400,0x50000908,0x7c00100,0xfc250400,0x50000b13,0x2802500,0x20962460, -0x50000f0a,0x7c00100,0xfc230400,0x50001615,0x2802100,0xfc962460,0x50001615,0x7c00100,0xfc230400,0x50002b01,0x2802020,0x10962460,0x50002c00,0x4000000,0x4200000,0x50002c19, -0x7c00100,0x8220400,0x50002d19,0x7c00100,0x8220400,0x50003000,0x24000000,0x4200000,0x50003000,0x24000020,0x4200000,0x50003700,0x24000000,0x4200000,0x50005d00,0x7c00120, -0xc8220405,0x50005d00,0x7c00120,0xc8250405,0x50006108,0x7c00100,0xfc220400,0x50006108,0x7c00100,0xfc250400,0x50006600,0x24000020,0x4200000,0x50007300,0x24000000,0x4200000, -0x50008301,0x2802400,0x10962460,0x50008a00,0x7c00500,0xfc230400,0x50009257,0x2802400,0x40962460,0x50009257,0x4000000,0x44200000,0x50009257,0x4000010,0x45071400,0x50009257, -0x6800000,0x41329800,0x50009257,0x7c00100,0x40230400,0x50009257,0x7c00100,0x48230400,0x50009257,0x7c00500,0x40230400,0x50009257,0x7c00900,0x48230400,0x50009257,0xc000010, -0x44b48000,0x5000933e,0x2802100,0x40962460,0x5000933e,0x2802400,0x40962460,0x5000933e,0x2802400,0x50962460,0x5000933e,0x4000000,0x44400000,0x5000933e,0x4000000,0x44e00000, -0x5000933e,0x4000010,0x44400000,0x5000933e,0x6800000,0x40e29800,0x5000933e,0x6800100,0x40962540,0x5000933e,0x6800100,0x40962541,0x5000933e,0x6804400,0x42f62540,0x5000933e, -0x7c00100,0x42b30400,0x5000933e,0x7c00100,0x42b30401,0x5000933e,0xc000010,0x44448000,0x50009419,0x7c00100,0x8220400,0x50009419,0x7c00100,0x8250400,0x50009419,0x7c00100, -0x10220400,0x50009419,0x7c00100,0x10250400,0x50009419,0x7c00100,0x20220400,0x50009419,0x7c00100,0x20250400,0x50009500,0x4000400,0x4200400,0x5000965a,0x4000000,0x84500000, -0x5000965a,0x7c00100,0x80230400,0x5000965a,0xc000010,0x84b48000,0x5000975b,0x4000000,0x84200000,0x5000975b,0x4000010,0x84400000,0x5000975b,0x7c00100,0x80230400,0x50009865, -0x7c00100,0x80230400,0x50009965,0x4000010,0x84400000,0x50009965,0x7c00100,0x80230400,0x50409acc,0x4000000,0x4200000,0x5100080e,0x7c00100,0x8220400,0x5100080e,0x7c00100, -0x8250400,0x5100080e,0x7c00100,0x10250400,0x51000c02,0x2802100,0x20962460,0x51000c02,0x4000000,0x5500000,0x51000c02,0x4000020,0x4200000,0x51000c02,0x7c00100,0xfc230400, -0x51000f0a,0x7c00100,0xfc230400,0x51000f0a,0x7c00500,0xfc230400,0x51001110,0x2802100,0x20962460,0x5100131f,0x2802100,0x20962460,0x51001423,0x7c00100,0xfc230400,0x51001524, -0x2802100,0x20962460,0x51001524,0x4000000,0x4200000,0x51001524,0x7c00100,0x8230400,0x51001524,0x7c00100,0xfc230400,0x5100171a,0x2802100,0x20962460,0x5100171a,0x4000000, -0x4200000,0x5100171a,0x4000000,0x5500000,0x5100171a,0x7c00100,0xfc230400,0x51001b27,0x4000000,0x4200000,0x51001b27,0x4000000,0x4400000,0x51001b27,0x4000000,0x4500000, -0x51001b27,0x7c00100,0xfc230400,0x51001c1c,0x2802100,0xfd862460,0x51001c1c,0x2802500,0xfd862460,0x51001c1c,0x2806400,0xfd862460,0x51001c1c,0x4000000,0x5800000,0x51001c1c, -0x6800000,0xfd329800,0x51001c1c,0x6800100,0xfd862400,0x51001c1c,0x6800100,0xfd862540,0x51001c1c,0x6800500,0xfd862400,0x51001c1c,0x7c00100,0xfd830000,0x5100251b,0x7c00100, -0x80230400,0x51002619,0x7c00100,0x10220400,0x51002619,0x7c00100,0x10250400,0x51002619,0x7c00100,0xfc250400,0x51002800,0x80020,0xc4218820,0x51002c00,0x4000000,0xc200000, -0x51002d19,0x7c00100,0x8230400,0x51003700,0x24000000,0x4200000,0x51003700,0x24000000,0x4e00000,0x51005201,0x2802400,0x10962460,0x51005c00,0x4000000,0x14200000,0x51006108, -0x7c00100,0xfc220400,0x51006108,0x7c00100,0xfc250400,0x51006600,0x24000020,0x4200000,0x51006600,0x24000020,0x4810000,0x51006600,0x24000020,0x5410000,0x51007300,0x24000000, -0x4200000,0x51007300,0x24000020,0x4200000,0x51008002,0x7c00100,0xfc230400,0x51008301,0x2802000,0x10962460,0x51008301,0x2802000,0x18962460,0x51008301,0x2802400,0x10962460, -0x51008301,0x2802400,0x10c62460,0x51008301,0x2802400,0x18962460,0x51008a00,0x7c00500,0xfc230400,0x51008e00,0x24000000,0x4200000,0x51008e00,0x24000000,0x4400000,0x51008e00, -0x24000000,0x4810000,0x51008e00,0x24000000,0x5400000,0x51008e00,0x24000000,0x5410000,0x51008e00,0x24000000,0x5710000,0x51008e00,0x24000000,0xc400000,0x51008e00,0x24000002, -0x4200000,0x51008e00,0x24000500,0xc230400,0x51008e00,0x2c000010,0xcb48000,0x51009419,0x7c00100,0x8220400,0x51009419,0x7c00100,0x8250400,0x51009419,0x7c00100,0x10220400, -0x51009419,0x7c00100,0xc822040e,0x51009419,0x7c00100,0xc822040f,0x51009500,0x4000400,0x4200400,0x51009500,0x7c00500,0xfc230400,0x51009519,0x7c00100,0x8220400,0x51009519, -0x7c00100,0x8230400,0x51009519,0x7c00100,0x8250400,0x51009519,0x7c00100,0x18220400,0x51009519,0x7c00100,0x18250400,0x51009519,0x7c00100,0x20220400,0x51009519,0x7c00100, -0x20250400,0x51009519,0x7c00100,0xc822040f,0x51009b71,0x2802100,0x40962460,0x51009b71,0x6800000,0x41329800,0x51009b71,0x6800100,0x40962540,0x51009b71,0x6804400,0x40962540, -0x51009b71,0x7c00100,0x40230400,0x51009c52,0x2802100,0x40962460,0x51009c52,0x2802400,0x40962460,0x51009c52,0x2802d00,0x40962460,0x51009c52,0x4000010,0x44400000,0x51009c52, -0x6800000,0x41329800,0x51009c52,0x6800100,0x40962540,0x51009c52,0x7c00100,0x40230400,0x51009c52,0xc000010,0x44448000,0x51009d6d,0x6800000,0x41329800,0x51009d6d,0x7c00100, -0x40230400,0x51009d6d,0x7c00500,0x40230400,0x51009d6d,0x7c00d00,0x40230400,0x51009d6d,0xc000010,0x44448000,0x51009e08,0x2802100,0x8962460,0x51009f63,0x4000010,0x44400000, -0x51009f63,0x6800000,0x41329800,0x51009f63,0x7c00100,0x40230400,0x51009f63,0x7c00100,0x48230400,0x51009f63,0x7c00900,0x40230400,0x51009f63,0xc000010,0x44448000,0x51009f63, -0xc000010,0x44b48000,0x5100a008,0x2000,0xc962460,0x5100a008,0x2802400,0x20962460,0x5100a008,0x4000000,0x4200000,0x5100a008,0x4000000,0xc200000,0x5100a008,0x7c00100, -0x8220400,0x5100a008,0x7c00100,0x8230400,0x5100a008,0x7c00100,0x8250400,0x5100a008,0x7c00500,0xfc230400,0x5100a16f,0x2806400,0x40962460,0x5100a16f,0x6800000,0x41329800, -0x5100a16f,0x6800100,0x40962540,0x5100a16f,0x7c00100,0x40230400,0x5100a16f,0xc000010,0x44448000,0x5100a24f,0x2802100,0x40962460,0x5100a24f,0x2802400,0x40962460,0x5100a24f, -0x6800000,0x41329800,0x5100a24f,0x7c00100,0x40230400,0x5100a24f,0xc000010,0x44448000,0x5100a36e,0x2802100,0x80962460,0x5100a36e,0x4000000,0x84200000,0x5100a36e,0x6800100, -0x80962540,0x5100a36e,0x6804400,0x80962540,0x5100a36e,0x7c00100,0x80230400,0x5100a442,0x2802100,0x40962460,0x5100a442,0x4000000,0x44e00000,0x5100a442,0x6800000,0x40e29800, -0x5100a442,0x6800100,0x40962540,0x5100a442,0x7c00100,0x40430400,0x5100a442,0x7c00100,0x42d30400,0x5100a442,0xc000010,0x44448000,0x5100a500,0x4000000,0x4200000,0x5100a600, -0x4000000,0xc200000,0x5100a601,0x2802000,0x8962460,0x5100a76b,0x7c00100,0x80230400,0x5100a868,0x7c00100,0x80230400,0x5100a96c,0x4000000,0x84200000,0x5100a96c,0x7c00100, -0x80230400,0x5100aa00,0x4000000,0x4e00000,0x5100ab00,0x4000000,0x4e00000,0x51086600,0x24000020,0x4810000,0x51086600,0x24000020,0x5410000,0x510a4005,0x7c00100,0xfce30400, -0x510a4711,0x7c40300,0xfce30000,0x510a7300,0x24000000,0x4200000,0x510aaa00,0x4000000,0x4e00000,0x514a82cc,0x4000000,0x4e00000,0x5150a20e,0x4000400,0x4400000,0x51802bbe, -0x2802000,0x10962460,0x51c00908,0x2802400,0x18962460,0x51c0a008,0x2802400,0x20962460,0x52000f0a,0x2802100,0x20962460,0x52000f0a,0x6800100,0x8962540,0x52000f0a,0x7c00100, -0xfc230400,0x52001004,0x4000000,0x5600000,0x52001b00,0x4000000,0x4200000,0x52001c1c,0x2802100,0xfd862460,0x52001c1c,0x6800100,0xfd862400,0x52001c1c,0x6800500,0xfd862400, -0x52001e12,0x7c00100,0xa230500,0x52001e12,0x7c00100,0xa330520,0x52002128,0x4000002,0x44400000,0x52002128,0x7c00100,0x40230400,0x52002a00,0x4000000,0x5500000,0x52002a00, -0x4000000,0x5600000,0x52002d00,0x4000000,0xc8200006,0x52003000,0x24000000,0x4200000,0x52006108,0x7c00100,0xfc220400,0x52006108,0x7c00100,0xfc250400,0x52008301,0x2802400, -0x10962460,0x52008407,0x2802400,0x80962460,0x52008407,0x2802400,0x90962460,0x52008407,0x7c00100,0x80220400,0x52008407,0x7c00100,0x80250400,0x52008b3b,0x6800000,0x41800000, -0x52008b3b,0x7c00100,0x41830000,0x52008e00,0x24000000,0xc400000,0x52009419,0x7c00100,0x8250400,0x5200975b,0x4000000,0x84200000,0x5200ac7e,0x2802000,0x80962460,0x5200ac7e, -0x2802100,0x80962460,0x5200ac7e,0x2802400,0x80962460,0x5200ac7e,0x4000010,0x84200000,0x5200ac7e,0x7c00100,0x80230400,0x5200ac7e,0xc000010,0x84248000,0x5200ad28,0x7c00100, -0x40230400,0x5200ae6a,0x2802100,0x41862460,0x5200ae6a,0x2802400,0x40962460,0x5200ae6a,0x2802400,0x41862460,0x5200ae6a,0x2806000,0x41862460,0x5200ae6a,0x4000000,0x45800000, -0x5200ae6a,0x6800000,0x41329800,0x5200ae6a,0x6800100,0x41862400,0x5200ae6a,0x6800100,0x41862540,0x5200ae6a,0x7c00100,0x41830000,0x5200ae6a,0x7c00900,0x41830000,0x5200ae6a, -0xc000010,0x45848000,0x5200b083,0x4000010,0x44400000,0x5200b083,0x7c00100,0x40230400,0x5200b083,0xc000010,0x44448000,0x5200b182,0x2802400,0x40962460,0x5200b182,0x4000000, -0x44200000,0x5200b182,0x4000010,0x44400000,0x5200b182,0x7c00100,0x40230400,0x5200b182,0xc000010,0x44448000,0x5200b30a,0x2802400,0x8962460,0x5200b30a,0x4000000,0xc200000, -0x5200b30a,0x7c00100,0x8230400,0x5200b54e,0x2802100,0x40962460,0x5200b54e,0x2802400,0x40962460,0x5200b54e,0x4000000,0x44e00000,0x5200b54e,0x4000010,0x44400000,0x5200b54e, -0x6800000,0x40e29800,0x5200b54e,0x6800100,0x40962540,0x5200b54e,0x6804400,0x42f62540,0x5200b54e,0x7c00100,0x42b30400,0x5200b54e,0xc000010,0x44448000,0x5200b61c,0x4000000, -0x5800000,0x5200b61c,0x6800500,0xfd862400,0x5200b61c,0x7c00100,0xfd830000,0x5200b61c,0x7c00900,0xfd830000,0x5200b77f,0x2802100,0x41862460,0x5200b77f,0x2802400,0x41862460, -0x5200b77f,0x4000000,0x45800000,0x5200b77f,0x4000010,0x45800000,0x5200b77f,0x7c00100,0x41830000,0x5200b77f,0x7c00500,0x41830000,0x5200b77f,0x7c00900,0x41830000,0x5200b77f, -0x7e00100,0x41830000,0x5200b873,0x2802100,0x40962460,0x5200b873,0x2806400,0x40962460,0x5200b873,0x6800000,0x41329800,0x5200b873,0x6800100,0x40962540,0x5200b873,0x6800400, -0x40962540,0x5200b873,0x7c00100,0x40230400,0x5200b873,0xc000010,0x44448000,0x5200b912,0x7c00100,0xa230500,0x5200b912,0x7c00100,0xa330520,0x5200ba74,0x4000000,0x84200000, -0x5200ba74,0x4000010,0x84400000,0x5200ba74,0x7c00100,0x80230400,0x5200bb85,0x4000000,0x84200000,0x5200bb85,0x7c00100,0x80230400,0x5200bc75,0x4000000,0x84400000,0x5200bc75, -0x4000010,0x84400000,0x5200bc75,0x7c00100,0x80230400,0x5200bd7d,0x4000000,0x84200000,0x5200bd7d,0x7c00100,0x80230400,0x5200be7a,0x4000000,0x84200000,0x5200be7a,0x7c00100, -0x80230400,0x5200bf58,0x7c00100,0x80230400,0x5200c002,0x4000000,0x4200000,0x5200c178,0x2802100,0x80962460,0x5200c178,0x2802400,0x80962460,0x5200c178,0x2806400,0x80962460, -0x5200c178,0x4000000,0x84200000,0x5200c178,0x6800100,0x80962540,0x5200c178,0x7c00100,0x80230400,0x5200c178,0x7c00100,0x80230401,0x5200c178,0xc000010,0x84448000,0x5200c178, -0x80000000,0x85329960,0x5200c247,0x7c00100,0x80230400,0x5200c247,0x7c00100,0x80830400,0x5200c247,0x7c00100,0x81430400,0x5200c300,0x4000000,0xc8200003,0x52022d00,0x4000000, -0xc8100006,0x52023700,0x24000000,0x4100000,0x52023700,0x24000000,0x4e00000,0x52023700,0x24000000,0x6800000,0x52024400,0x4000000,0x4100000,0x52027300,0x24000000,0x4100000, -0x5202c300,0x4000000,0x4100000,0x5202c300,0x4000000,0xc8100002,0x5202c300,0x4000000,0xc8100003,0x5202c300,0x4000000,0xc810000d,0x5202c300,0x4000100,0x4150400,0x5202c300, -0x4000100,0xc815040d,0x520a1e12,0x7c00100,0xa130480,0x520a3700,0x24000000,0x4e00000,0x520a3800,0x24000000,0x4100000,0x520a4711,0x7c40300,0xfce30000,0x520a4f11,0x7c00300, -0xc8e30001,0x520a7300,0x24000000,0x4100000,0x520ab412,0x7c00100,0xa130480,0x520ac400,0x4000000,0xc8e00002,0x520ac400,0x4000000,0xc8e0000d,0x520ac414,0x4000000,0xc8e0000d, -0x520ac511,0x7c40300,0xfce30000,0x5240af9c,0x7c00100,0x8230400,0x5240afa1,0x4000400,0xc200000,0x5240afa3,0x6800400,0x8962540,0x5240afa3,0x7c00100,0x8230400,0x5240afad, -0x7c00100,0x8230400,0x5240afaf,0x7c00100,0x8230400,0x5240b2d4,0x4000000,0x4200000,0x5240b2e3,0x4000000,0x4200000,0x5240b2f1,0x4000000,0x4200000,0x5240b2fc,0x4000000, -0x5500000,0x524a44cc,0x4000000,0xc8e00003,0x5250b511,0x7c00900,0x60430400,0x5280af9c,0x2802400,0x8962460,0x5280af9d,0x2802400,0x8962460,0x5280afa3,0x2802400,0x8962460, -0x5280afa5,0x2802400,0x8962460,0x5280afa7,0x2802400,0x8962460,0x52d0b308,0x2802400,0x8962460,0x52d0b30c,0x7c00100,0x8230400,0x60000c02,0x2802100,0x20962460,0x60000c02, -0x7c00100,0xfc230400,0x60000f0a,0x2802100,0xfc962460,0x60000f0a,0x6800100,0xfc962540,0x60000f0a,0x7c00100,0xfc230400,0x6000131f,0x4000000,0x4200000,0x6000171a,0x7c00100, -0xfc230400,0x6000171a,0x7c00100,0xfc230560,0x60001b27,0x2802100,0xfc962460,0x60001b27,0x4000000,0x4c00000,0x60001b27,0x7c00100,0xfc230400,0x60001f0b,0x2802400,0xfc962460, -0x60002919,0x7c00100,0xc822040e,0x60002a00,0x4000000,0x5600000,0x60003000,0x24000000,0x4200000,0x60003000,0x24000000,0x4e00000,0x60003700,0x24000000,0x4200000,0x60003800, -0x24000000,0x5710000,0x60005102,0x4000000,0x14200000,0x60006108,0x7c00100,0xfc220400,0x60006108,0x7c00100,0xfc250400,0x60006600,0x24000020,0x4200000,0x60008301,0x2802400, -0x10c62460,0x6000903c,0x2806000,0x40962460,0x6000903c,0x4000000,0x44400000,0x60009519,0x7c00100,0x8220400,0x60009519,0x7c00100,0x8250400,0x60009519,0x7c00100,0x10220400, -0x60009519,0x7c00100,0xfc250400,0x6000a008,0x7c00100,0x8220400,0x6000a008,0x7c00100,0x8250400,0x6000c300,0x4000000,0x6703580,0x6000c654,0x2802000,0x40962460,0x6000c654, -0x4000010,0x44200000,0x6000c654,0x7c00100,0x40230400,0x6000c73f,0x2802000,0x40962460,0x6000c73f,0x2802100,0x40962460,0x6000c73f,0x4000000,0x44200000,0x6000c73f,0x6800100, -0x40962540,0x6000c73f,0x6804000,0x42e62540,0x6000c73f,0x7c00100,0x42d30400,0x6000c80b,0x7c00100,0xfc230400,0x6000c941,0x2802100,0x80962460,0x6000c941,0x2806400,0x82f62460, -0x6000c941,0x4000000,0x84e00000,0x6000c941,0x4000010,0x84e00000,0x6000c941,0x6800000,0x82d29800,0x6000c941,0x6800100,0x80962540,0x6000c941,0x7c00100,0x82b30400,0x6000c941, -0x7c00100,0x82c30400,0x6000c941,0xc000010,0x84448000,0x6000ca82,0x7c00100,0x40230400,0x6000cc00,0x4000000,0x4e00000,0x6000d000,0x4000000,0x4200000,0x6002c300,0x4000000, -0x4100000,0x6002c300,0x4000000,0xc810000d,0x6002c300,0x4000100,0x4150400,0x6002c300,0x4000100,0xc815040d,0x600a3000,0x24000000,0x4200000,0x600a3000,0x24000000,0x4e00000, -0x600a3700,0x24000000,0x4200000,0x600a3800,0x24000000,0x4200000,0x600a3800,0x24000000,0x6800000,0x600a4305,0x7c00100,0xfce30400,0x600ac300,0x4000000,0x4100000,0x600ac400, -0x4000000,0xc8e0000d,0x600acb14,0x7c00100,0x8e30000,0x600acb16,0x7c00100,0x8e30c00,0x600acc00,0x4000000,0x4e00000,0x600acd00,0x4000000,0x4200000,0x600acd00,0x4000000, -0x4e00000,0x600acd00,0x4000000,0x6800000,0x600ace00,0x4000000,0x4e00000,0x600ace00,0x4000000,0x6800000,0x600acf00,0x4000000,0x4e00000,0x600acf00,0x4000000,0x6800000, -0x600ad111,0x7c40300,0xfce30000,0x604ac4cc,0x4000000,0xc8e00003,0x61000a03,0x4000000,0x5600000,0x61000c02,0x80000000,0x5329960,0x6100120f,0x4000000,0x4200000,0x61001a18, -0x7c00100,0xfd830000,0x61001d0c,0x7c00100,0xfc230400,0x61001d0c,0x7c00100,0xfc250400,0x61006600,0x24000020,0x4200000,0x61008407,0x7c00100,0x80220400,0x61008407,0x7c00100, -0x80250400,0x6100870c,0x7c00100,0xfc220400,0x61008e00,0x24000000,0x4200000,0x61008e00,0x24000000,0x4400000,0x61008e00,0x24000000,0xc200000,0x61008e00,0x24000002,0x4300000, -0x6100903c,0x7c00100,0x40230400,0x61009519,0x7c00100,0xfc220400,0x61009519,0x7c00100,0xfc250400,0x61009519,0x7c00500,0xc822040f,0x61009b71,0x2802100,0x40962460,0x61009b71, -0x2806400,0x40962460,0x61009b71,0x7c00100,0x40230400,0x6100a008,0x2802100,0x8962460,0x6100c300,0x4000000,0xc820000f,0x6100cd00,0x4000000,0x4200000,0x6100d202,0x2802400, -0x20962460,0x6100d202,0x2802500,0x20962460,0x6100d202,0x7c00100,0xfc230400,0x6100d302,0x4000020,0x4200000,0x6100d302,0x7c00120,0xc8230405,0x6100d476,0x2802100,0x40962460, -0x6100d476,0x2802100,0x40962461,0x6100d476,0x2806400,0x40962460,0x6100d476,0x4000000,0x44400000,0x6100d476,0x6800000,0x41329800,0x6100d476,0x6800100,0x40962540,0x6100d476, -0x7c00100,0x40230400,0x6100d476,0xc000010,0x44448000,0x6100d573,0x2802100,0x40962460,0x6100d573,0x2806400,0x40962460,0x6100d573,0x6800100,0x40962540,0x6100d573,0x7c00100, -0x40230400,0x6100d573,0x7c00900,0x40230400,0x6100d573,0xc000010,0x44448000,0x6100d68d,0x7c00100,0x80230400,0x6100d756,0x7c00100,0x80230400,0x6100d85c,0x2802500,0x40962460, -0x6100d85c,0x6800100,0x40962540,0x6100d85c,0x7c00100,0x40230400,0x6100d85c,0x7c00500,0x40230400,0x6100d997,0x2802100,0x80962460,0x6100d997,0x4000000,0x84200000,0x6100d997, -0x4000000,0x84400000,0x6100d997,0x6800000,0x81329800,0x6100d997,0x6800100,0x80962540,0x6100d997,0x6804400,0x80962540,0x6100d997,0x7c00100,0x80230400,0x6100d997,0x7c00100, -0x80230560,0x6100d997,0xc000010,0x84448000,0x6100da98,0x6800000,0x81329800,0x6100da98,0x7c00100,0x80230400,0x6100db71,0x4000000,0x44200000,0x6100dc99,0x2802100,0x80962460, -0x6100dc99,0x2802400,0x80962460,0x6100dc99,0x6800000,0x81329800,0x6100dc99,0x6800100,0x80962540,0x6100dc99,0x6804400,0x80962540,0x6100dc99,0x7c00100,0x80230400,0x610a4711, -0x7c40300,0xfce30000,0x610a4f11,0x7c00300,0xc8e30001,0x610ace00,0x4000000,0x4e00000,0x6140afa1,0x7c00100,0x8230400,0x6140afa3,0x7c00100,0x8230400,0x6180af9e,0x2802400, -0x8962460,0x62002a00,0x4000000,0x5600000,0x63002800,0x80000,0xc4918820,0x63c00c15,0x80000,0xc4918820,0x7000080e,0x7c00100,0x8250400,0x70000a03,0x4000000,0x4200000, -0x70000c00,0x80000000,0x5329960,0x70000f0a,0x7c00100,0x8230400,0x70001004,0x7c00100,0x8230400,0x70001524,0x2802100,0x8962460,0x70001524,0x7c00100,0x8230400,0x70001615, -0x2802100,0x8962460,0x7000171a,0x2802100,0x8962460,0x70001821,0x6800000,0x9329800,0x70002320,0x7c00100,0x80230400,0x70002a00,0x4000000,0x5500000,0x70002a00,0x4000000, -0x5600000,0x70003000,0x24000000,0x4200000,0x70003800,0x24000000,0x4e00000,0x70005201,0x2802400,0x10962460,0x7000581e,0x7c00100,0x80230400,0x70006108,0x7c00100,0x8220400, -0x70006108,0x7c00100,0x8250400,0x70006108,0x7c00100,0xfc220400,0x70006108,0x7c00100,0xfc250400,0x70006f30,0x7c00100,0x40230400,0x70007300,0x24000000,0x4200000,0x70007f0e, -0x4000000,0x4200000,0x70008301,0x2802100,0x10962460,0x70008301,0x2802400,0x10962460,0x70008e00,0x24000000,0x4200000,0x70008e00,0x24000000,0x4400000,0x70008e00,0x24000002, -0x4400000,0x70008e00,0x24000008,0x5410000,0x70008e00,0x24000010,0x4400000,0x70008e00,0x2c000010,0x4448000,0x70009519,0x7c00100,0x8220400,0x70009519,0x7c00100,0x8230400, -0x70009519,0x7c00100,0x8250400,0x70009865,0x7c00100,0x80230400,0x70009965,0x4000010,0x84400000,0x70009965,0x7c00100,0x80230400,0x7000a008,0x7c00100,0x8220400,0x7000a008, -0x7c00100,0x8250400,0x7000a008,0x7c00500,0xc822040f,0x7000a50e,0x4000000,0x4200000,0x7000b61c,0x2802500,0xfd862460,0x7000b61c,0x6800500,0xfd862400,0x7000b61c,0x7c00100, -0xfd830000,0x7000c300,0x4000000,0x4100000,0x7000c941,0x2806000,0x80c62460,0x7000cc00,0x4000000,0x4e00000,0x7000cd00,0x4000000,0x4200000,0x7000cd00,0x4000000,0x4e00000, -0x7000cd00,0x4000000,0x6800000,0x7000cf00,0x4000000,0x4e00000,0x7000d202,0x2802100,0x20962460,0x7000d202,0x7c00100,0x8230400,0x7000d202,0x7c00100,0xfc230400,0x7000d997, -0x7c00100,0x80230400,0x7000d997,0xc000010,0x84248000,0x7000dd86,0x2802400,0x80962460,0x7000dd86,0x7c00100,0x80230400,0x7000dd86,0xc000010,0x84448000,0x7000de9f,0x4000000, -0x84200000,0x7000de9f,0x7c00100,0x80230400,0x7000e001,0x2400,0x4962460,0x7000e001,0x2802400,0x8962460,0x7000e187,0x2802000,0x80962460,0x7000e187,0x2802100,0x80962460, -0x7000e187,0x4000000,0x84200000,0x7000e187,0x7c00100,0x80230400,0x7000e187,0xc000010,0x84448000,0x7000e288,0x7c00100,0x80230400,0x7000e300,0x4000000,0x4200000,0x7000e489, -0x2802100,0x80962460,0x7000e489,0x2802400,0x80962460,0x7000e489,0x6800100,0x80962540,0x7000e489,0x6800100,0x80962541,0x7000e489,0x6804400,0x82f62540,0x7000e489,0x7c00100, -0x80430400,0x7000e489,0x7c00100,0x82b30400,0x7000e489,0x7c00100,0x82d30400,0x7000e489,0x7c00900,0x80430400,0x7000e59d,0x2802100,0x80962460,0x7000e59d,0x2802400,0x80962460, -0x7000e59d,0x4000000,0x84200000,0x7000e59d,0x4000010,0x84200000,0x7000e59d,0x6800100,0x80962540,0x7000e59d,0x6804400,0x80962540,0x7000e59d,0x7c00100,0x80230400,0x7000e59d, -0xc000010,0x84448000,0x7000e691,0x2802100,0x80962460,0x7000e691,0x2802400,0x80962460,0x7000e691,0x2806400,0x80962460,0x7000e691,0x6800000,0x81329800,0x7000e691,0x6800100, -0x80962540,0x7000e691,0x7c00100,0x80230400,0x7000e700,0x4000400,0x4200400,0x7000e70e,0x7c00100,0x8220400,0x7000e719,0x7c00100,0x8220400,0x7000e719,0x7c00500,0xc822040f, -0x7000e853,0x7c00100,0x80230400,0x7000e9a0,0x2802400,0x80962460,0x7000e9a0,0x4000000,0x84200000,0x7000e9a0,0x4000000,0x84500000,0x7000e9a0,0x7c00100,0x80230400,0x7000ea79, -0x2802400,0x80962460,0x7000ea79,0x4000000,0x84200000,0x7000ea79,0x4000000,0x84f00000,0x7000ea79,0x4000010,0x84400000,0x7000ea79,0x7c00100,0x80230400,0x7000eb8c,0x2802400, -0x80962460,0x7000eb8c,0x4000000,0x84200000,0x7000eb8c,0x7c00100,0x80230400,0x7000eca3,0x2802100,0x80962460,0x7000eca3,0x2806400,0x80962460,0x7000eca3,0x4000000,0x84200000, -0x7000eca3,0x6800000,0x81329800,0x7000eca3,0x6800100,0x80962540,0x7000eca3,0x7c00100,0x80230400,0x7000eca3,0xc000010,0x84448000,0x7000ed95,0x6800000,0xa1329800,0x7000ed95, -0x7c00100,0xa0230400,0x7000ed95,0xc000010,0x84448000,0x7000ee1c,0x2802500,0x9862460,0x7000ee1c,0x6800000,0xfd329800,0x7000ee1c,0x7c00100,0x9830000,0x7000ee1c,0x7c00100, -0xfd830000,0x7000ee1c,0x7c00900,0x9830000,0x7000ef8f,0x4000000,0x84200000,0x7000ef8f,0x7c00100,0x80230400,0x7000f08e,0x4000000,0x84200000,0x7000f08e,0x7c00100,0x80230400, -0x7000f159,0x2802100,0x80962460,0x7000f159,0x7c00100,0x80230400,0x7000f200,0x4000000,0x4200000,0x7000f200,0x4000000,0x5200000,0x7000f200,0x4000000,0x5710000,0x7000f34b, -0x2802400,0x80962460,0x7000f34b,0x4000000,0x84200000,0x7000f34b,0x4000010,0x84400000,0x7000f34b,0x6800000,0x81329800,0x7000f34b,0x7c00100,0x80230400,0x7000f34b,0x7c00900, -0x80230400,0x7000f34b,0xc000010,0x84448000,0x7000f490,0x4000000,0x84200000,0x7000f490,0x7c00100,0x80230400,0x7000f5a5,0x7c00100,0x80230400,0x7000f67b,0x4000000,0x84200000, -0x7000f67b,0x4000010,0x84200000,0x7000f67b,0x7c00100,0x80230400,0x7000f8a6,0x2802100,0x80962460,0x7000f8a6,0x2802400,0x80962460,0x7000f8a6,0x2806400,0x80962460,0x7000f8a6, -0x4000000,0x84500000,0x7000f8a6,0x4000010,0x84b00000,0x7000f8a6,0x4000800,0x84200000,0x7000f8a6,0x6800100,0x80962540,0x7000f8a6,0x6800100,0x80962541,0x7000f8a6,0x7c00100, -0x80230400,0x7000f8a6,0xc000010,0x84448000,0x7000f921,0x4000000,0x4200000,0x7000fa00,0x4000000,0x4200000,0x7000fb9e,0x2802100,0x80962460,0x7000fb9e,0x2802400,0x80962460, -0x7000fb9e,0x2806400,0x80962460,0x7000fb9e,0x4000000,0x84200000,0x7000fb9e,0x6800000,0x81329800,0x7000fb9e,0x6800100,0x80962540,0x7000fb9e,0x6800100,0x80962541,0x7000fb9e, -0x7c00100,0x80230400,0x7000fc92,0x4000000,0x84200000,0x7000fc92,0x6800000,0x81329800,0x7000fc92,0x7c00100,0x80220400,0x7000fc92,0x7c00100,0x80230400,0x7000fc92,0x7c00100, -0x80250400,0x700acd00,0x4000000,0x4e00000,0x700acd00,0x4000000,0x6800000,0x700ace00,0x4000000,0x4e00000,0x700acf00,0x4000000,0x4e00000,0x700acf00,0x4000000,0x6800000, -0x7050df21,0x4000000,0xc200000,0x7050f729,0x80000,0xc4918820,0x7080afa1,0x2802400,0x8962460,0x7090df21,0x2802400,0x8962460,0x70d0e427,0x2802100,0xfc962460,0x70d0e427, -0x2802400,0xfc962460,0x70d0e427,0x6800100,0xfc962540,0x70d0ea25,0x4000010,0x84400000,0x8000120f,0x7c00100,0x20230400,0x80001524,0x7c00100,0x20230400,0x8000171a,0x7c00100, -0x8230400,0x80002006,0x7c00100,0x40220400,0x80002006,0x7c00100,0x40250400,0x80002a00,0x4000000,0x5500000,0x80002d00,0x4000000,0x24200000,0x80005208,0x2802400,0x30962460, -0x80005c00,0x4000000,0x34200000,0x80007300,0x24000000,0x24200000,0x80009519,0x7c00100,0x20220400,0x80009519,0x7c00100,0x20230400,0x80009519,0x7c00100,0x20250400,0x80009865, -0x7c00100,0x80230400,0x8000a008,0x2802100,0x28962460,0x8000b30a,0x4000000,0x2c500000,0x8000b30a,0x7c00100,0x28230400,0x8000cd00,0x4000000,0x24e00000,0x8000d202,0x2802500, -0x20962460,0x8000d202,0x7c00100,0x20230400,0x8000d68d,0x4000000,0x84200000,0x8000d997,0x2802000,0x80962460,0x8000d997,0x2802400,0x80962460,0x8000d997,0x4000000,0x84400000, -0x8000d997,0x4000000,0x84500000,0x8000d997,0x7c00100,0x80230400,0x8000d997,0xc000010,0x84448000,0x8000e489,0x2802100,0x80962460,0x8000e489,0x7c00100,0x82d30400,0x8000e719, -0x7c00100,0x20220400,0x8000f8a6,0x2802100,0x80962460,0x8000f8a6,0x7c00100,0x80230400,0x8000f8a6,0xc000010,0x84448000,0x8000fda1,0x2802100,0x81862460,0x8000fda1,0x2806400, -0x81862460,0x8000fda1,0x4000000,0x85800000,0x8000fda1,0x6800000,0x81329800,0x8000fda1,0x6800100,0x81862400,0x8000fda1,0x6800100,0x81862540,0x8000fda1,0x7c00100,0x81830000, -0x8000fda1,0xc000010,0x84448000,0x8000fe9c,0x7c00100,0x80230400,0x8000fe9c,0x7c00100,0x80830400,0x8000fe9c,0x7c00100,0x81430400,0x8000ff06,0x7c00100,0x40220400,0x80010165, -0x7c00100,0x80230400,0x800102a2,0x4000000,0x84200000,0x800102a2,0x7c00100,0x80230400,0x800103a4,0x7c00100,0x80230400,0x800103a4,0xc000010,0x84448000,0x8001044c,0x4000000, -0x84200000,0x8001044c,0x7c00100,0x80220400,0x8001044c,0x7c00100,0x80250400,0x80010670,0x2802000,0x80962460,0x80010670,0x4000000,0x84200000,0x80010670,0x4000010,0x84400000, -0x80010670,0xc000010,0x84448000,0x800a4711,0x7c40300,0xfce30000,0x800acd00,0x4000000,0x4e00000,0x800acd00,0x4000000,0x6902460,0x800ace00,0x4000000,0x4e00000,0x800acf00, -0x4000000,0x4e00000,0x800b0011,0x7c40300,0xfce30000,0x800b0500,0x4000000,0x4e00000,0x800b0500,0x4000000,0x6800000,0x90001615,0x7c00100,0xfc230400,0x9000171a,0x4000000, -0x4200000,0x9000171a,0x7c00100,0xfc230400,0x90003000,0x24000000,0x4200000,0x90007f0e,0x4000000,0x4200000,0x90008301,0x2802400,0x10962460,0x90008e00,0x24000000,0x4400000, -0x90009519,0x7c00100,0x10250400,0x9000a16f,0x2802100,0x40962460,0x9000d200,0x80000000,0x5329960,0x9000d202,0x2802000,0x20962460,0x9000d202,0x2802100,0x20962460,0x9000d202, -0x7c00100,0xfc230400,0x9000e59d,0x2802100,0x80962460,0x90010500,0x4000000,0x4e00000,0x900107a7,0x2802100,0x40962460,0x900107a7,0x2802400,0x40962460,0x900107a7,0x2802c00, -0x40962460,0x900107a7,0x4000000,0x45400000,0x900107a7,0x6800000,0x41329800,0x900107a7,0x7c00100,0x40220400,0x900107a7,0x7c00100,0x40250400,0x900108a8,0x2802100,0x80962460, -0x900108a8,0x2806400,0x80962460,0x900108a8,0x4000000,0x84200000,0x900108a8,0x4000000,0x84400000,0x900108a8,0x4000010,0x84400000,0x900108a8,0x6800000,0x81329800,0x900108a8, -0x6800100,0x80962540,0x900108a8,0x7c00100,0x80230400,0x900108a8,0xc000010,0x84448000,0x90010908,0x7c00100,0x8220400,0x90010a38,0x2802100,0x80962460,0x90010ca9,0x2802100, -0x80962460,0x90010ca9,0x4000000,0x84500000,0x90010ca9,0x4000010,0x84b00000,0x90010ca9,0x6800100,0x80962540,0x90010ca9,0x7c00100,0x80230400,0x90010d1b,0x4000000,0x84500000, -0x90010eaa,0x2802100,0x40962460,0x90010eaa,0x2802400,0x40962460,0x90010eaa,0x2806400,0x40962460,0x90010eaa,0x4000000,0x44200000,0x90010eaa,0x4000000,0x44400000,0x90010eaa, -0x4000010,0x44400000,0x90010eaa,0x6800000,0x41329800,0x90010eaa,0x6800100,0x40962540,0x90010eaa,0x7c00100,0x40230400,0x90010eaa,0xc000010,0x44448000,0x90010fab,0x7c00100, -0x40220400,0x90010fab,0x7c00100,0x40250400,0x9002c300,0x4000000,0x4100000,0x900ac400,0x4000000,0xc8e0000d,0x900acd00,0x4000000,0x4e00000,0x900acd00,0x4000000,0x6800000, -0x900acf00,0x4000000,0x4e00000,0x900b0500,0x4000000,0x4e00000,0x900b0500,0x4000000,0x6800000,0x900b0b9a,0x7c00900,0x81230400,0x900b109a,0x7c00300,0x80e30000,0x900b119a, -0x7c00300,0x80e30000,0x90408e06,0x24000000,0x4400000,0xa0001004,0x4000000,0x4200000,0xa0001004,0x7c00100,0x8230400,0xa000120f,0x2802100,0xfc962460,0xa000120f,0x2802400, -0xfc962460,0xa000171a,0x2802100,0xfc962460,0xa000171a,0x2806400,0x8962460,0xa0002a00,0x4000000,0x5600000,0xa0003000,0x24000000,0x4200000,0xa000581e,0x7c00100,0x80230400, -0xa0007300,0x24000000,0x4200000,0xa0008301,0x2802400,0x10962460,0xa0008e00,0x24000000,0x4400000,0xa000cf00,0x4000000,0x4e00000,0xa0010500,0x4000000,0x4200000,0xa00114af, -0x2802100,0x80962460,0xa00114af,0x2802400,0x80962460,0xa00114af,0x2806400,0x80962460,0xa00114af,0x6800000,0x81329800,0xa00114af,0x7c00100,0x80230400,0xa00114af,0x7c00100, -0x80230560,0xa00116b0,0x2802100,0x80962460,0xa00116b0,0x2802800,0x80962460,0xa00116b0,0x2806400,0x80962460,0xa00116b0,0x4000000,0x84400000,0xa00116b0,0x4000000,0x84500000, -0xa00116b0,0x4000010,0x84400000,0xa00116b0,0x6800100,0x80962540,0xa00116b0,0x7c00100,0x80230400,0xa00116b0,0x7c00100,0x80230560,0xa00116b0,0xc000010,0x84448000,0xa0011722, -0x7c00100,0x40230400,0xa00118b1,0x2802000,0x80962460,0xa00118b1,0x2802100,0x80962460,0xa00118b1,0x2806400,0x80962460,0xa00118b1,0x4000000,0x84200000,0xa00118b1,0x4000000, -0x84400000,0xa00118b1,0x4000000,0x84500000,0xa00118b1,0x6800100,0x80962540,0xa00118b1,0x7c00100,0x80230400,0xa00118b1,0x7c00100,0x80230560,0xa00118b1,0xc000010,0x84448000, -0xa00a4005,0x7c00100,0x8e30400,0xa00a4711,0x7c40300,0xfce30000,0xa00ac400,0x4000000,0x4e00000,0xa00acb14,0x7c00100,0x8e30000,0xa00acf00,0x4000000,0x4e00000,0xa00b0500, -0x4000000,0x4e00000,0xa00b0500,0x4000000,0x6800000,0xa00b0b96,0x7c00900,0x81230400,0xa00b1211,0x7c40300,0xfce30000,0xa00b1314,0x7c00100,0x8e30000,0xa00b1596,0x7c00300, -0x80e30000,0xa040afb9,0x6800400,0x8962540,0xa08083ba,0x2802400,0x10962460,0xb0000a03,0x7c00100,0x10220400,0xb0000b13,0x7c00100,0xfe633800,0xb0001004,0x2802000,0xfc962460, -0xb0001110,0x4000000,0x4200000,0xb0001524,0x2802100,0xfc962460,0xb0001615,0x4000000,0x4500000,0xb000251b,0x7c00100,0x80230400,0xb0007300,0x24000000,0x4200000,0xb0008939, -0x4000000,0x84200000,0xb0008939,0x7c00100,0x80230400,0xb0008e00,0x24000000,0x4200000,0xb0008e00,0x24000000,0x4400000,0xb0008e00,0x24000010,0x4400000,0xb0009257,0x2802000, -0x40962460,0xb0009257,0x4000000,0x45600000,0xb0009519,0x7c00100,0x10220400,0xb0009519,0x7c00100,0x20220400,0xb0009519,0x7c00100,0x20250400,0xb0009a00,0x4000000,0x4200000, -0xb000b30a,0x2802100,0x8962460,0xb000b30a,0x7c00100,0x8230400,0xb000c178,0x80000000,0x85329960,0xb000c300,0x4000000,0x4200000,0xb000d202,0x2802000,0x20962460,0xb000d476, -0x6800100,0x40962540,0xb000d476,0x7c00100,0x40230400,0xb000e300,0x4000000,0x4e00000,0xb000fda1,0x7c00100,0x81830000,0xb0010eaa,0x2802000,0x40962460,0xb00116b0,0x7c00100, -0x80230400,0xb0011900,0x4000000,0x4e00000,0xb0011ab2,0x2802100,0x80962460,0xb0011ab2,0x2802400,0x80962460,0xb0011ab2,0x2806400,0x80962460,0xb0011ab2,0x4000000,0x84200000, -0xb0011ab2,0x6800100,0x80962540,0xb0011ab2,0x7c00100,0x80230400,0xb0011b0c,0x7c00100,0xfc230400,0xb0011cb3,0x2802100,0x40962460,0xb0011cb3,0x2806400,0x40962460,0xb0011cb3, -0x6800000,0x41329800,0xb0011cb3,0x6800100,0x40962540,0xb0011cb3,0x7c00100,0x40230400,0xb0011db6,0x2802500,0x40962460,0xb0011db6,0x6800000,0x41329800,0xb0011db6,0x7c00100, -0x40230400,0xb0011db6,0x7c00500,0x40230400,0xb0011e00,0x4000000,0x4200000,0xb0011e00,0x4000000,0x5500000,0xb0011fb4,0x2802100,0x80962460,0xb0011fb4,0x6800100,0x80962540, -0xb0011fb4,0x7c00100,0x80430400,0xb0011fb4,0x7c00100,0x82d30400,0xb0011fb4,0xc000010,0x84448000,0xb0012000,0x4000000,0x4200000,0xb00121b5,0x4000000,0x84200000,0xb00121b5, -0x4000010,0x84400000,0xb00121b5,0x7c00100,0x80220400,0xb00121b5,0x7c00100,0x80250400,0xb00121b5,0xc000010,0x84448000,0xb00122b8,0x4000000,0x84200000,0xb00122b8,0x7c00100, -0x80230400,0xb00123b7,0x2802400,0x80962460,0xb00123b7,0x4000000,0x84200000,0xb00123b7,0x7c00100,0x80230400,0xb00123b7,0xc000010,0x84248000,0xb00a4005,0x7c00100,0xfce30400, -0xb00a4711,0x7c40300,0xfce30000,0xb00acf00,0x4000000,0x4e00000,0xb00b0500,0x4000000,0x4e00000,0xb00b0500,0x4000000,0x6800000,0xb00b109a,0x7c00300,0x80e30000,0xb080e487, -0x2802000,0xfc962460,0xc0001524,0x4000000,0x4500000,0xc0001a18,0x2806400,0xfd862460,0xc0001a18,0x7c00100,0xfd830000,0xc0007300,0x24000000,0x4200000,0xc0008e00,0x24000010, -0x4400000,0xc0009519,0x7c00100,0x10220400,0xc0009519,0x7c00100,0x10250400,0xc0009519,0x7c00100,0xfc220400,0xc0009519,0x7c00100,0xfc250400,0xc000c300,0x4000000,0xc820000f, -0xc000d85c,0x2802100,0x40962460,0xc000d85c,0x6800100,0x40962540,0xc000d85c,0x7c00100,0x40230400,0xc000dc99,0x7c00100,0x80230400,0xc000e719,0x7c00100,0xfc220400,0xc00107a7, -0x7c00100,0x40230400,0xc0010eaa,0x7c00100,0x40230400,0xc00116b0,0x7c00100,0x80230560,0xc0011900,0x4000000,0x4200000,0xc0012447,0,0x84818820,0xc0012447,0, -0x84c18820,0xc0012447,0,0x85418820,0xc00125b9,0x7c00100,0x80230400,0xc00126bb,0x2802100,0x80962460,0xc00126bb,0x2806400,0x80962460,0xc00126bb,0x4000000,0x84500000, -0xc00126bb,0x6800100,0x80962540,0xc00126bb,0x7c00100,0x80230400,0xc00127ba,0x2802400,0x40962460,0xc00127ba,0x4000000,0x44200000,0xc00127ba,0x6800000,0x41329800,0xc00127ba, -0x7c00100,0x40230400,0xc00127ba,0x7c00900,0x40230400,0xc0012800,0x4000000,0x4200000,0xc0012b23,0x4000000,0x4200000,0xc0012b23,0x4000000,0x4400000,0xc0012b23,0x4000000, -0x5500000,0xc0012cbc,0x2802400,0x40962460,0xc0012cbc,0x4000000,0x45600000,0xc0012cbc,0x6800000,0x41329800,0xc0012cbc,0x7c00100,0x40230400,0xc00acf00,0x4000000,0x4e00000, -0xc00ae300,0x4000000,0x4e00000,0xc00b0500,0x4000000,0x4e00000,0xc00b0500,0x4000000,0x6800000,0xc00b0b11,0x4000000,0x5200000,0xc00b0b11,0x7c00900,0x9230400,0xc00b109a, -0x7c00300,0x80e30000,0xc00b2914,0x7c00100,0xfe530000,0xc00b2916,0x7c00100,0xfe530c00,0xc00b2a00,0x4000000,0x4e00000,0xc040af5e,0x7c00100,0x80230400,0xc0c12b89,0x4000000, -0x4200000,0xc14a44cc,0x4000000,0xc8e0000d,0xd000131f,0x2802c00,0xfc962460,0xd000171a,0x7c00100,0x18230400,0xd0001821,0x2802100,0x10962460,0xd0007300,0x24000000,0x4200000, -0xd0008e00,0x24000000,0x4200000,0xd0008f3a,0x2806000,0x40962460,0xd0009519,0x7c00100,0x8220400,0xd0009519,0x7c00100,0x8250400,0xd0009519,0x7c00100,0xfc220400,0xd0009519, -0x7c00100,0xfc250400,0xd000a500,0x4000000,0x4200000,0xd000c300,0x4000000,0x4e00000,0xd000d202,0x7c00100,0xfc230400,0xd000d476,0x7c00100,0x40230400,0xd000d997,0x2802100, -0x80962460,0xd000d997,0x6800100,0x80962540,0xd000e001,0x2802100,0x10962460,0xd000e700,0x4000400,0x4200000,0xd000e719,0x7c00100,0x10220400,0xd000e719,0x7c00500,0xc822040f, -0xd000fa00,0x4000000,0x4e00000,0xd0010eaa,0x4000010,0x44400000,0xd0010eaa,0x7c00100,0x40230400,0xd0012dbd,0x4000000,0x84200000,0xd0012dbd,0x7c00100,0x80230400,0xd0012fbe, -0x2802100,0x80962460,0xd0012fbe,0x2802400,0x80962460,0xd0012fbe,0x2806400,0x82f62460,0xd0012fbe,0x4000000,0x84400000,0xd0012fbe,0x6800000,0x80e29800,0xd0012fbe,0x6800100, -0x80962540,0xd0012fbe,0x6800100,0x80962541,0xd0012fbe,0x6804400,0x80962540,0xd0012fbe,0x7c00100,0x82b30400,0xd0012fbe,0x7c00100,0x82c30560,0xd0012fbe,0xc000010,0x84448000, -0xd0013183,0x7c00100,0x40230400,0xd0013200,0x4000000,0x4200000,0xd0013200,0x6800000,0xc9329805,0xd00134c0,0x2802100,0x80962460,0xd00134c0,0x4000002,0x84400000,0xd00134c0, -0x7c00100,0x80230400,0xd00a4305,0x7c00100,0xfce30400,0xd00a4611,0x7c40300,0xfce30000,0xd00a4711,0x7c40300,0xfce30000,0xd00a5e11,0x7c40300,0xfce30000,0xd00acf00,0x4000000, -0x4e00000,0xd00b0500,0x4000000,0x4e00000,0xd00b0500,0x4000000,0x6800000,0xd00b0b11,0x6800500,0xfc962540,0xd00b0bbf,0x2802200,0x80c62460,0xd00b119a,0x7c00300,0x80e30000, -0xd00b2a00,0x4000000,0x4e00000,0xd00b2e11,0x7c40300,0xfce30000,0xd00b30bf,0x7c00300,0x80230000,0xd00b339a,0x7c00300,0x80e30000,0xe0000c02,0xc000010,0x4b48000,0xe0001524, -0x2802400,0xfc962460,0xe0001524,0x7c00100,0xfc230400,0xe0001615,0x7c00100,0xfc230400,0xe000251b,0x12882000,0xc4962460,0xe0002a00,0x4000000,0x5500000,0xe0005102,0x4000000, -0x14200000,0xe0005c00,0x4000000,0x14200000,0xe000622a,0x6804400,0x80962540,0xe000622a,0x7c00100,0x80230400,0xe0008838,0x7c00100,0x80220400,0xe0008838,0x7c00100,0x80250400, -0xe0008e00,0x24000000,0x4810000,0xe0008e00,0x24000000,0x5410000,0xe0008e00,0x24000002,0x4400000,0xe0008e00,0x2c000010,0x4b48000,0xe000933e,0x7c00100,0x42b30400,0xe000933e, -0xc000010,0x44448000,0xe0009519,0x7c00100,0xc822040f,0xe0009519,0x7c00100,0xfc220400,0xe0009519,0x7c00100,0xfc250400,0xe000c178,0x2802100,0x80962460,0xe000c941,0x2802100, -0x80962460,0xe000c941,0x2806400,0x80962460,0xe000c941,0x7c00100,0x82b30400,0xe000d202,0x2802400,0x20962460,0xe000d202,0x7c00100,0xfc230400,0xe000d202,0x7c00500,0xfc230400, -0xe000dc99,0x4000000,0x84200000,0xe000e001,0x2802100,0x20962460,0xe000e001,0x2802400,0x20962460,0xe000fda1,0x7c00100,0x81830000,0xe0013502,0x2802400,0x20962460,0xe0013502, -0x4000000,0x4200000,0xe0013502,0x7c00100,0xfc230400,0xe0013502,0x80000000,0x5329960,0xe00136c1,0x4000000,0x84200000,0xe00136c1,0x7c00100,0x80230400,0xe001370b,0x7c00100, -0xfc230400,0xe0013919,0x7c00500,0x20220400,0xe0013919,0x7c00500,0xc822040f,0xe0013919,0x7c00d00,0xc823040f,0xe0013a19,0x7c00100,0xfc220400,0xe0013a19,0x7c00100,0xfc230400, -0xe0013bc2,0x2802400,0x80962460,0xe0013bc2,0x7c00100,0x80230400,0xe0013bc2,0xc000010,0x84248000,0xe0013cc3,0x6800000,0x81329800,0xe0013cc3,0x7c00100,0x80230400,0xe0013dc4, -0x2802400,0x80962460,0xe0013dc4,0x7c00100,0x80230400,0xe0013e28,0x7c00100,0x40230400,0xe0013fc5,0x7c00100,0x80220400,0xe0013fc5,0x7c00100,0x80250400,0xe0014000,0x4000000, -0x14200000,0xe0014001,0x2802400,0x10962460,0xe00a4711,0x7c40300,0xfce30000,0xe00a5e11,0x7c40300,0xfce30000,0xe00ac511,0x7c40300,0xfce30000,0xe00acf00,0x4000000,0x4e00000, -0xe00ae300,0x4000000,0x4e00000,0xe00b0500,0x4000000,0x4e00000,0xe00b1314,0x7c00100,0xfce30000,0xe00b1316,0x7c00100,0xfce30c00,0xe00b2a00,0x4000000,0x4e00000,0xe00b2a00, -0x4000000,0x6800000,0xe00b3816,0x7c00500,0x20230c00,0xe0808328,0x2802400,0x50962460,0xf0001615,0x6800100,0xfc962540,0xf0001a18,0x2802000,0xfd862460,0xf000c247,0x7c00100, -0x81430400,0xf000d000,0x4000000,0x4e00000,0xf000e300,0x4000000,0x4e00000,0xf000e59d,0x2802100,0x80962460,0xf000e59d,0x7c00100,0x80230400,0xf0012447,0,0x84818820, -0xf0012447,0,0x84c18820,0xf0012447,0,0x85418820,0xf0012447,0x2802000,0x80962460,0xf0012447,0x2802400,0x80962460,0xf0012447,0x7c00100,0x80230400,0xf0013a19, -0x7c00100,0xfc220400,0xf0014102,0x2802400,0x20962460,0xf0014308,0x2802100,0xfc962460,0xf0014308,0x7c00500,0xc822040e,0xf0014308,0x7c00500,0xc822040f,0xf001440a,0x4000000, -0x4500000,0xf0014500,0x4000000,0x4200000,0xf00146c6,0x2802100,0x80962460,0xf00146c6,0x2806000,0x82f62460,0xf00146c6,0x4000000,0x84e00000,0xf00146c6,0x6800000,0x82d29800, -0xf00146c6,0x6800100,0x80962540,0xf00146c6,0x6804000,0x80962540,0xf00146c6,0x7c00100,0x82b30400,0xf00146c6,0x7c00100,0x82c30560,0xf00146c6,0xc000010,0x84448000,0xf00147c7, -0x2802000,0x80962460,0xf00147c7,0x6800000,0x81329800,0xf00147c7,0x7c00100,0x80230400,0xf00ac511,0x7c40300,0xfce30000,0xf00acf00,0x4000000,0x4e00000,0xf00b2914,0x7c00100, -0xfe530000,0xf00b2916,0x7c00100,0xfe530c00,0xf00b2a00,0x4000000,0x4e00000,0xf00b2a00,0x4000000,0x6800000,0xf00b4211,0x7c40300,0xfce30000,0xf10a3c00,0x4000000,0x4e00000, -0xf10a3c00,0x4008000,0x4e00000,0xf10a8200,0x4008000,0x4e00000,0xf10b4811,0x7c40300,0xfce30000}; +static const uint32_t propsVectors[6426]={ +0x67,0,0,0x67,0,0xe00000,0x67,0,0x1600000,0x67,0x80000,0x20,0x67,0x20000000,0,0x5067, +0,0xe00000,0x5000000,0,0x900020,0x5000000,0x80000,0xc4918820,0x5000000,0x80000,0xc5c18020,0x5000000,0x80000,0xc5e18820,0x5000000,0x180000, +0xc0918820,0x5000000,0x4000000,0x4100000,0x5000000,0x4000000,0x4200000,0x5000000,0x4000000,0x5500000,0x5000000,0x4000000,0x5600000,0x5000000,0x4000000,0xc200000, +0x5000000,0x4000000,0xc8100003,0x5000000,0x4000000,0xc8100006,0x5000000,0x4000000,0xc8200002,0x5000000,0x4000000,0xc8200006,0x5000000,0x4000000,0xc820000e,0x5000000, +0x4000000,0xc820000f,0x5000000,0x4000000,0xc9600002,0x5000000,0x4000001,0xc8445801,0x5000000,0x4000001,0xc8445802,0x5000000,0x4000001,0xc8c4000b,0x5000000,0x4000010, +0xc9071401,0x5000000,0x4000020,0x4200000,0x5000000,0x4000020,0xc820000e,0x5000000,0x4000020,0xc820000f,0x5000000,0x4000020,0xc881000e,0x5000000,0x4000020,0xc881000f, +0x5000000,0x4000020,0xc941000e,0x5000000,0x4000020,0xc941000f,0x5000000,0x4000022,0xc820000e,0x5000000,0x4000022,0xc820000f,0x5000000,0x4000400,0x4200400,0x5000000, +0x4000400,0xc8200001,0x5000000,0x4000400,0xc8200002,0x5000000,0x6800000,0x10201c00,0x5000000,0x6800010,0xc8201001,0x5000000,0x6800020,0x10201c00,0x5000000,0x7c00000, +0x10200000,0x5000000,0x7c00020,0x10200000,0x5000000,0x7c00100,0xc8220402,0x5000000,0x7c00120,0xc8220405,0x5000000,0x7c00120,0xc8230402,0x5000000,0x7c00120,0xc8250402, +0x5000000,0x7c00120,0xc8250405,0x5000000,0x7c00500,0x10220400,0x5000000,0x7c00500,0x10230400,0x5000000,0x7c00500,0x10530400,0x5000000,0x7c00500,0xfc230400,0x5000000, +0x7c00d00,0x10230400,0x5000000,0x24000000,0x4100000,0x5000000,0x24000000,0x4200000,0x5000000,0x24000000,0x4810000,0x5000000,0x24000000,0x4b00000,0x5000000,0x24000000, +0x4e00000,0x5000000,0x24000000,0x5410000,0x5000000,0x24000000,0x5500000,0x5000000,0x24000000,0x5710000,0x5000000,0x24000000,0x6800000,0x5000000,0x24000000,0xc8200002, +0x5000000,0x24000000,0xc9500002,0x5000000,0x24000002,0x4400000,0x5000000,0x24000006,0xc8c0000b,0x5000000,0x24000008,0x5410000,0x5000000,0x24000008,0x5710000,0x5000000, +0x24000020,0x4200000,0x5000000,0x24000020,0x4200001,0x5000000,0x24000020,0x4810000,0x5000000,0x24000020,0x4f00000,0x5000000,0x24000020,0x5001400,0x5000000,0x24000020, +0x5410000,0x5000000,0x24000020,0x5600000,0x5000000,0x24000020,0xc8200002,0x5000000,0x24000020,0xc9500002,0x5000000,0x24000022,0x5600000,0x5000000,0x2c000010,0x5248000, +0x5000000,0x2c000010,0xc9248002,0x5000000,0x40000001,0x4440020,0x5000000,0x40000001,0x463b020,0x5000000,0x40000001,0x4643020,0x5000000,0x40000001,0x4a5a040,0x5000000, +0x40000001,0x516a8a0,0x5000000,0x40000001,0x5d3b020,0x5000000,0x40080000,0xc4918820,0x5000000,0x80000000,0x5329960,0x5000001,0x2882000,0xc4962460,0x5000002,0x4000000, +0x4200000,0x5000002,0x4000000,0x5329400,0x5000002,0x4000000,0x5329800,0x5000002,0x4000000,0x5500000,0x5000002,0x6800000,0xfd329800,0x5000002,0x7000100,0xc8230408, +0x5000002,0x7c00100,0x8230400,0x5000002,0x7c00100,0xc8230402,0x5000002,0x7c00100,0xc8230404,0x5000002,0x7c00100,0xc8230407,0x5000002,0x7c00100,0xc8230408,0x5000002, +0x7c00100,0xc8230409,0x5000002,0x7c00100,0xfc230400,0x5000002,0x7c00100,0xfc230401,0x5000002,0x7c00500,0xfc230400,0x5000002,0x7d00100,0xc0230400,0x5000003,0x4000000, +0x4200400,0x5000003,0x4000000,0x4201000,0x5000003,0x4000000,0x4270000,0x5000003,0x7c00100,0xc8220402,0x5000003,0x7c00100,0xfc220400,0x5000003,0x7c00100,0xfc250400, +0x5000003,0x7c00500,0xfc230400,0x5000004,0x4000000,0x4200000,0x5000004,0x4000000,0x5500000,0x5000004,0x6800100,0xfc962540,0x5000004,0x6800100,0xfc962541,0x5000004, +0x7c00100,0xfc230400,0x5000007,0x7c00100,0x80220400,0x5000007,0x7c00100,0x80250400,0x5000008,0x4000000,0xc200000,0x5000008,0x7c00100,0x8220400,0x5000008,0x7c00100, +0x8220401,0x5000008,0x7c00100,0x8250400,0x5000008,0x7c00100,0x8250401,0x5000008,0x7c00100,0xfc220400,0x5000008,0x7c00100,0xfc220401,0x5000008,0x7c00100,0xfc250400, +0x5000008,0x7c00100,0xfc250401,0x500000a,0x4000000,0x4200000,0x500000a,0x6800100,0xfc962540,0x500000a,0x7c00100,0xfc230400,0x500000c,0x7c00100,0x8230400,0x500000c, +0x7c00100,0x8250400,0x500000c,0x7c00100,0xfc230400,0x500000e,0x4000400,0xc8200001,0x500000e,0x4000400,0xc8200002,0x500000e,0x4000400,0xc8500001,0x500000e,0x7000500, +0xc8220402,0x500000e,0x7c00100,0x8250400,0x500000e,0x7c00100,0x18220400,0x500000e,0x7c00100,0xc8220401,0x500000e,0x7c00100,0xc8220402,0x500000e,0x7c00100,0xc8250401, +0x500000e,0x7c00100,0xfc220400,0x500000e,0x7c00100,0xfc220401,0x500000e,0x7c00100,0xfc250401,0x500000e,0x7c00120,0xc8220402,0x500000e,0x7c00120,0xc8250402,0x500000f, +0x6800100,0xfc962540,0x500000f,0x7c00100,0xfc230400,0x5000010,0x6800100,0xfc962540,0x5000010,0x7c00100,0xc8230401,0x5000010,0x7c00100,0xfc230400,0x5000012,0x7c00100, +0xa230500,0x5000012,0x7c00100,0xa330520,0x5000012,0x7c80100,0xc6330520,0x5000013,0x4000000,0x4200000,0x5000013,0x4000000,0xf8201000,0x5000013,0x4000000,0xf8230400, +0x5000013,0x4000002,0x4400000,0x5000013,0x4000010,0x4200000,0x5000013,0x4000020,0xc8200005,0x5000013,0x7c00100,0xca633801,0x5000013,0x7c00100,0xca633802,0x5000013, +0x7c00100,0xca633805,0x5000013,0x7c00100,0xfe633800,0x5000015,0x6800100,0xfc962540,0x5000015,0x7c00100,0x8230400,0x5000015,0x7c00100,0xfc230400,0x5000018,0x6800000, +0xfd329800,0x5000018,0x7800100,0xc9830142,0x5000018,0x7c00100,0xc9830002,0x5000018,0x7c00100,0xfd830000,0x5000018,0x7c00900,0xfd830000,0x5000018,0x7e00100,0xfd830000, +0x5000019,0x7c00100,0x8220400,0x5000019,0x7c00100,0x8250400,0x5000019,0x7c00100,0x10220400,0x5000019,0x7c00100,0x10230400,0x5000019,0x7c00100,0x18220400,0x5000019, +0x7c00100,0x18230400,0x5000019,0x7c00100,0x20220400,0x5000019,0x7c00100,0x20250400,0x5000019,0x7c00100,0x30220400,0x5000019,0x7c00100,0xc8220402,0x5000019,0x7c00100, +0xc8250401,0x5000019,0x7c00100,0xc8250402,0x5000019,0x7c00100,0xfc220400,0x5000019,0x7c00100,0xfc220401,0x5000019,0x7c00100,0xfc250400,0x5000019,0x7c00100,0xfc250401, +0x5000019,0x7c00500,0xc822040f,0x500001a,0x6800000,0xfd329800,0x500001a,0x6800100,0xfc962540,0x500001a,0x6800100,0xfc962541,0x500001a,0x7c00100,0xfc230400,0x500001f, +0x4000000,0x4200000,0x500001f,0x6800000,0xfd329800,0x500001f,0x6800100,0xfc962540,0x500001f,0x6800100,0xfc962541,0x500001f,0x7c00100,0xfc230400,0x5000023,0x6800100, +0xfc962540,0x5000023,0x6800100,0xfc962541,0x5000023,0x7c00100,0xfc230400,0x5000023,0x7c00100,0xfc230401,0x5000024,0x6800000,0xfd329800,0x5000024,0x6800100,0xfc962540, +0x5000024,0x7c00100,0xfc230400,0x5000026,0x4000000,0x4200000,0x5000026,0x4000010,0x4400000,0x5000026,0x6800000,0xfd329800,0x5000026,0x7800100,0xc9830142,0x5000026, +0x7c00100,0xfd830000,0x5000026,0x7c00900,0xfd830000,0x5000026,0x7e00100,0xfd830000,0x5000067,0x1000,0,0x5000410,0x7c00500,0xfc230400,0x500041b,0x4000400, +0x4200400,0x500048e,0x7c00500,0xc8230401,0x50004a1,0x4000010,0x4b00000,0x50004a1,0x4000010,0x5071400,0x50004ad,0xc000010,0x4b48000,0x50004b5,0x7c00900,0x8230400, +0x50004e2,0xc000010,0x4448000,0x50004f7,0xc000010,0x4448000,0x500052f,0x4000000,0x4200000,0x500059b,0x4000000,0x4e00000,0x50005f8,0x24000000,0x14810000,0x50005f8, +0x24000000,0x15410000,0x5000c90,0x4000400,0xf8200000,0x5000c9f,0xc000010,0x5049400,0x5000cc3,0x6800000,0xfd329800,0x5000cc7,0xc000010,0x4b48000,0x5000d12,0x6800000, +0xfd329800,0x5000d17,0x6800000,0xfd329800,0x5000d1b,0x6800000,0xfd329800,0x5000d1f,0x6800000,0xfd329800,0x5000d23,0x4000000,0x4200000,0x5000d23,0x6800000,0xfd329800, +0x5000d28,0x6800000,0xfd329800,0x5000dfc,0x7c00100,0xc8230408,0x5001000,0x80004,0xc4418820,0x5001000,0x4000000,0x4100000,0x5001000,0x4000000,0xc8100002,0x5001000, +0x4000000,0xc8100003,0x5001000,0x4000000,0xc8100006,0x5001000,0x4000000,0xc810000e,0x5001000,0x4000000,0xc810000f,0x5001000,0x4000000,0xc9500002,0x5001000,0x4000000, +0xc9600002,0x5001000,0x4000100,0xc8120403,0x5001000,0x4000100,0xc8150403,0x5001000,0x4000400,0x4200400,0x5001000,0x4000400,0xc8100002,0x5001000,0x4000400,0xc8500002, +0x5001000,0x7c00120,0xc8120405,0x5001000,0x7c00d00,0x10130400,0x5001000,0x24000000,0x4100000,0x5001000,0x24000000,0x4200000,0x5001000,0x24000000,0x4e00000,0x5001000, +0x24000000,0x5400000,0x5001000,0x24000000,0x5500000,0x5001000,0x24000000,0x5600000,0x5001000,0x24000000,0xc8200002,0x5001000,0x24000000,0xc8f00002,0x5001000,0x24000000, +0xf8401000,0x5001000,0x24000002,0x4100000,0x5001000,0x24000002,0x4370000,0x5001000,0x24000002,0x4470000,0x5001000,0x24000006,0xf8400000,0x5001000,0x24000008,0x5710000, +0x5001000,0x24000008,0x5712c00,0x5001000,0x24000008,0xf9712c00,0x5001000,0x24000020,0x4100000,0x5001000,0x24000020,0x4100001,0x5001000,0x24000020,0x5500000,0x5001000, +0x24000020,0x5600000,0x5001000,0x24000020,0xc8100002,0x5001000,0x24000020,0xc9500002,0x5001000,0x2c000010,0xc8f0ac02,0x5001008,0x7c00100,0xfc220400,0x5001008,0x7c00100, +0xfc220401,0x5001008,0x7c00100,0xfc250400,0x5001008,0x7c00100,0xfc250401,0x500100e,0x7c00100,0xc8250401,0x500100e,0x7c00100,0xfc220400,0x500100e,0x7c00100,0xfc250400, +0x5001019,0x7c00100,0x10220400,0x5001019,0x7c00100,0xc8120402,0x5001019,0x7c00100,0xc812040f,0x5001019,0x7c00100,0xc8150401,0x5001019,0x7c00100,0xc8150402,0x5001019, +0x7c00100,0xc8220402,0x5001019,0x7c00100,0xc8250402,0x5001019,0x7c00100,0xfc220400,0x5001019,0x7c00100,0xfc220401,0x5001019,0x7c00100,0xfc250400,0x5001019,0x7d00100, +0xc0220402,0x5001067,0,0,0x5001400,0x6800c00,0xf8101000,0x5001417,0x4000400,0xc8100002,0x5001417,0x7c00500,0x10130400,0x5001419,0x7c00500,0x10130400, +0x5002000,0x4000000,0x5600000,0x5002000,0x4000000,0xc820000a,0x5002000,0x4000020,0xc820000a,0x5002012,0x7c00100,0xc8e3040a,0x5002012,0x7c80100,0xc4e3040a,0x5002016, +0x7c00100,0xc8e30c0a,0x5002016,0x7c00100,0xca530c0a,0x5002581,0x4000008,0xc881000a,0x5002581,0x4000008,0xc941000a,0x5002581,0x4000010,0xc887000a,0x5002581,0x6800004, +0xc920000a,0x5002581,0xc000010,0xc884800a,0x5002599,0x7c00d00,0xca530c0a,0x5003000,0x4000000,0xc8810011,0x5003000,0x4000000,0xc8e00011,0x5003000,0x4000000,0xc9410011, +0x5003000,0x4000000,0xc9500011,0x5003000,0x4000000,0xc9600011,0x5003000,0x4000001,0xc8445811,0x5003000,0x4000006,0xc8e70011,0x5003000,0x4000008,0xc8e00011,0x5003000, +0x4000008,0xc8e02c11,0x5003000,0x4000010,0xc8871411,0x5003000,0x4000010,0xc9271011,0x5003000,0x4000010,0xc9271411,0x5003000,0x4000020,0xc8e00011,0x5003000,0x4000400, +0xc8e00011,0x5003000,0x4000420,0xc8e00011,0x5003000,0x6800000,0xc8e01c11,0x5003000,0x6800040,0xc8e29811,0x5003000,0xc000010,0xc880ac11,0x5003000,0xc000010,0xc8b48011, +0x5003019,0x7c00100,0xc8e20411,0x5003019,0x7c00100,0xc8e50411,0x5003019,0x7c00140,0xc8e20411,0x5003019,0x7c00140,0xc8e50411,0x5004000,0x4000400,0xc8200002,0x5004000, +0x6800000,0xfc201c00,0x5004000,0x68000c0,0xfd329800,0x5004000,0x24000000,0x4200000,0x5004000,0x24000000,0x4810000,0x5004000,0x24000000,0x5410000,0x5004000,0x24000000, +0x5500000,0x5004000,0x24000000,0x5600000,0x5004000,0x24000000,0x5b00000,0x5004000,0x24000000,0x6410000,0x5004000,0x24000006,0xf8d70000,0x5004000,0x24000008,0x5714000, +0x5004000,0x24000008,0xf9713c00,0x5004000,0x24000010,0x5071400,0x5004000,0x24000010,0xf9071000,0x5004000,0x24000020,0x4200000,0x5004000,0x24000020,0x4400000,0x5004000, +0x24000020,0x5600000,0x5004000,0x24000400,0x4200000,0x5004000,0x24000420,0x4200000,0x5004000,0x2c000010,0x4b48000,0x5004000,0x2c000010,0xf900ac00,0x5004000,0x44000001, +0x5a45800,0x5004019,0x7c00100,0xfc220400,0x5004019,0x7c00100,0xfc250400,0x5004019,0x7c001c0,0xfc220400,0x5004019,0x7c001c0,0xfc250400,0x5005000,0x4000000,0x4e00000, +0x5005000,0x4000000,0x14e00000,0x5005000,0x4000000,0xc881000c,0x5005000,0x4000000,0xc8810010,0x5005000,0x4000000,0xc8e00002,0x5005000,0x4000000,0xc8e0000c,0x5005000, +0x4000000,0xc8e0000d,0x5005000,0x4000000,0xc8e00010,0x5005000,0x4000000,0xc941000c,0x5005000,0x4000000,0xc9410010,0x5005000,0x4000000,0xc950000c,0x5005000,0x4000000, +0xc960000c,0x5005000,0x4000002,0xc8e7000c,0x5005000,0x4000002,0xc8e70010,0x5005000,0x4000008,0xc8810010,0x5005000,0x4000008,0xc9410010,0x5005000,0x4000010,0xc887140c, +0x5005000,0x4000010,0xc8e7000c,0x5005000,0x4000010,0xc927100c,0x5005000,0x4000010,0xc927140c,0x5005000,0x4000020,0xc8e0000c,0x5005000,0x4000026,0xc8e7000c,0x5005000, +0x6800000,0xc8e01c02,0x5005000,0x6800000,0xc8e01c10,0x5005000,0xc000010,0xc880ac0c,0x5005000,0xc000010,0xc8b4800c,0x5005000,0x24000000,0x4200000,0x5005000,0x24000000, +0x4e00000,0x5005000,0x24100000,0xc0810001,0x5005000,0x24100000,0xc1410001,0x5005005,0x7c00100,0xfce30400,0x5005011,0x7c00300,0x10e30000,0x5005011,0x7c00300,0xc8e30001, +0x5005011,0x7c00300,0xfce30000,0x5005011,0x7c00900,0xfd230400,0x5005011,0x7c40300,0xfce30000,0x5005012,0x4000000,0xc8e00002,0x5005012,0x4000000,0xc8e00003,0x5005012, +0x7c00100,0xa130480,0x5005012,0x7c00100,0xc8e30402,0x5005012,0x7c80100,0xc4e30402,0x5005012,0x7c80100,0xc6130480,0x5005014,0x7c00100,0xfce30000,0x5005014,0x7c00100, +0xfce30001,0x5005014,0x7c00100,0xfe530000,0x5005014,0x7c00900,0xfd230000,0x5005014,0x7c00900,0xfd230001,0x5005016,0x4000000,0xc8e00c03,0x5005016,0x4000000,0xc8e00c0d, +0x5005016,0x7c00100,0xfce30c00,0x5005016,0x7c00100,0xfce30c01,0x5005016,0x7c00100,0xfe530c00,0x5005016,0x7c00900,0xfd230c00,0x5005016,0x7c00900,0xfd230c01,0x5005581, +0x6800004,0xf9200000,0x5005581,0x24000000,0x4810000,0x5005581,0x24000000,0x5410000,0x5005581,0x24000008,0x4810000,0x5005581,0x24000008,0x5410000,0x5005587,0x24000010, +0x4870000,0x500558e,0x2c000010,0x4848000,0x5005596,0x4000000,0x4e00000,0x5005596,0x24000000,0x4e00000,0x5005596,0x24000002,0x4e00000,0x5005596,0x24000002,0x5200000, +0x5005596,0x24000008,0x4810000,0x5005596,0x24000008,0x5410000,0x5005596,0x24000008,0xc810000,0x5005599,0x7000400,0xc9200c02,0x5005599,0x7c00900,0x10930c00,0x5005599, +0x7c00900,0x10e30c00,0x5005599,0x7c00d00,0xfe530c00,0x500559b,0x4000000,0x4e00000,0x500559b,0x4000000,0xc8e00002,0x500559b,0x4000000,0xc8e00003,0x500559b,0x4000000, +0xc8e0000d,0x500559b,0x4000000,0xc8e0000f,0x500559b,0x7c00300,0xfce30000,0x500559c,0x24000000,0x4810000,0x500559c,0x24000000,0x5410000,0x50055a4,0x24000000,0x4810000, +0x50055a4,0x24000000,0x5410000,0x5008004,0x7c00100,0xc8230401,0x5008004,0x7c00100,0xfc230400,0x500800a,0x7c00100,0xc8230401,0x500800a,0x7c00100,0xfc230400,0x500800a, +0x7c00100,0xfc230401,0x500800f,0x7c00100,0xfc230400,0x500801a,0x7c00100,0xfc230400,0x500801f,0x7c00100,0xc8230401,0x500801f,0x7c00100,0xfc230400,0x5008024,0x7c00100, +0xfc230400,0x5010001,0x2000,0x14962460,0x5010001,0x2802020,0x10962460,0x5010001,0x2802400,0x10962460,0x5010001,0x2802400,0x10c62460,0x5010001,0x2880000,0xc6a65620, +0x5010002,0x2802100,0x20962460,0x5010002,0x2802400,0x20962460,0x5010004,0x2802100,0xfc962460,0x5010004,0x2802400,0xfc962460,0x501000a,0x2802100,0xfc962460,0x501000a, +0x2802400,0xfc962460,0x501000f,0x2802100,0xfc962460,0x501000f,0x2802400,0xfc962460,0x5010010,0x2802100,0xfc962460,0x5010010,0x2802400,0xfc962460,0x5010010,0x2802900, +0xfc962460,0x5010010,0x2806400,0xfc962460,0x5010013,0x2802500,0x20962460,0x5010013,0x2802500,0x30962460,0x5010013,0x2802500,0xfc962460,0x5010015,0x2802100,0xfc962460, +0x5010015,0x2802100,0xfc962461,0x5010015,0x2806400,0xfc962460,0x5010018,0x2802100,0xfd862460,0x5010018,0x2802400,0xfd862460,0x501001a,0x2802100,0xfc962460,0x501001f, +0x2802100,0xfc962460,0x501001f,0x2802400,0xfc962460,0x5010023,0x2802100,0xfc962460,0x5010023,0x2806400,0xfc962460,0x5010024,0x2802100,0xfc962460,0x5010024,0x2802100, +0xfc962461,0x5010026,0x2802100,0xfd862460,0x5010026,0x2802400,0xfd862460,0x5010026,0x2806500,0xfd862460,0x501089a,0x2802400,0x18962460,0x50108be,0x2802100,0xfc962460, +0x50108be,0x2802500,0xfc962460,0x50108c9,0x2802400,0x8962460,0x50108d6,0x2802400,0x8962460,0x5010c94,0x2802400,0x8962460,0x5010c98,0x2802400,0x18962460,0x5011001, +0x2802400,0x10962460,0x5011001,0x2802400,0x10c62460,0x5011001,0x2802400,0x20962460,0x5011001,0x2802400,0xc8962461,0x5011001,0x2802400,0xfc962460,0x501181d,0x2802400, +0xfc962460,0x5011825,0x2802400,0xfc962460,0x501182d,0x2802400,0xfc962460,0x501182f,0x2802400,0xfc962460,0x5011831,0x2802400,0xfc962460,0x5011836,0x2802400,0xfc962460, +0x5011841,0x2802400,0x20962460,0x5011847,0x2802400,0xfc962460,0x501184b,0x2802400,0xfc962460,0x5011854,0x2802400,0xfc962460,0x501185e,0x2802400,0xfc962460,0x5011861, +0x2802400,0xfc962460,0x5011865,0x2802400,0xfc962460,0x5011868,0x2802400,0x20962460,0x5011868,0x2802400,0xfc962460,0x501186a,0x2802400,0x10962460,0x501186c,0x2802400, +0xfc962460,0x501186f,0x2802400,0xfc962460,0x5011873,0x2802400,0x10962460,0x5011873,0x2802400,0xfc962460,0x5011875,0x2802400,0xfc962460,0x501187a,0x2802400,0xfc962460, +0x501187e,0x2802400,0xfc962460,0x5011881,0x2802400,0xfc962460,0x5011884,0x2802400,0xfc962460,0x501188a,0x2802400,0xfc962460,0x501188a,0x2802500,0xfc962460,0x5012599, +0x3802500,0xc926246a,0x5015012,0x2802400,0x18962460,0x5015999,0x2802400,0xfc962460,0x50159ad,0x2802400,0x10962460,0x5018004,0x2806400,0xfc962460,0x501800a,0x2806400, +0xfc962460,0x501800f,0x2806400,0xfc962460,0x501801a,0x2806400,0xfc962460,0x501801f,0x2806400,0xfc962460,0x5018024,0x2806400,0xfc962460,0x8000000,0x4000000,0x5600000, +0x8000019,0x7c00100,0xc8220401,0x8000027,0x4000000,0x4200000,0x8000027,0x4000000,0x4400000,0x8000027,0x4000000,0x4500000,0x8000027,0x4000000,0x4810000,0x8000027, +0x4000000,0x4b00000,0x8000027,0x4000000,0x5410000,0x8000027,0x4000000,0xc8c0000b,0x8000027,0x4000000,0xf8400000,0x8000027,0x4000010,0x4b00000,0x8000027,0x4000010, +0x4c00000,0x8000027,0x6800000,0xfd329800,0x8000027,0x6800100,0xfc462540,0x8000027,0x6800400,0xfc962540,0x8000027,0x7c00100,0xc8230401,0x8000027,0x7c00100,0xfc230400, +0x8000067,0,0x1900000,0x8000067,0x1000,0,0x8001067,0,0,0x8005012,0x7c00100,0xfdf304c1,0x8005012,0x7c00100,0xfe0304e1,0x8010013, +0x2802400,0x20962460,0x8010013,0x2802500,0x20962460,0x8010027,0x2802100,0xc8962461,0x8010027,0x2802100,0xfc962460,0x8010027,0x2802400,0x10962460,0x8010027,0x2802400, +0x20962460,0x8010027,0x2802400,0xfc962460,0x8010027,0x2802500,0xfc962460,0x8010027,0x2806400,0xfc962460,0x8010027,0x2902100,0xc0962462,0x9000000,0x4000000,0x4700000, +0x9001000,0x4000000,0x5600000,0xc000000,0,0x4918820,0xc000000,0x4000000,0x4200000,0xc000000,0x4000000,0x5600000,0xc000000,0x4000400,0x4200400,0xc000000, +0x7c00100,0xc8220405,0xc000000,0x7c00500,0x10230400,0xc000000,0x7c00500,0xfc230400,0xc000000,0x24000000,0x4200000,0xc000000,0x2c000010,0xc9248002,0xc000002,0x4000000, +0xf8200000,0xc000002,0x7c00100,0xfc230400,0xc000003,0x4000006,0xf8400400,0xc000005,0x4000400,0x4200400,0xc000006,0x7c00100,0x40250400,0xc000008,0x7c00100,0xfc220400, +0xc000008,0x7c00100,0xfc220401,0xc000008,0x7c00100,0xfc250400,0xc000008,0x7c00100,0xfc250401,0xc00000b,0x4000000,0x4200000,0xc00000b,0x4000010,0x4200000,0xc00000b, +0x4000010,0x4400000,0xc00000b,0x6800000,0x8200000,0xc00000b,0x7c00100,0xfc230400,0xc00000b,0xc000010,0x4248000,0xc00000e,0x7c00100,0x8220400,0xc00000e,0x7c00100, +0x10220400,0xc000013,0x7c00100,0xca633801,0xc000017,0x4000000,0x4200000,0xc000017,0x4000000,0x5600000,0xc000017,0x4000000,0xc400000,0xc000017,0x4000010,0x4400000, +0xc000017,0x4000010,0x5200000,0xc000017,0x6800000,0xfd329800,0xc000017,0x6800100,0xfd862540,0xc000017,0x7c00100,0x9830000,0xc000017,0x7c00100,0xfd830000,0xc000017, +0x7d00100,0xc1830000,0xc000017,0xc000010,0x4448000,0xc000019,0x7c00100,0x8220400,0xc000019,0x7c00100,0x8250400,0xc000019,0x7c00100,0x10220400,0xc000019,0x7c00100, +0x18250400,0xc000019,0x7c00100,0x20220400,0xc000019,0x7c00100,0x20250400,0xc000019,0x7c00100,0xfc220401,0xc000019,0x7c00100,0xfc250401,0xc00001b,0x80000,0xc4c18820, +0xc00001b,0x4000000,0x84200000,0xc00001b,0x4000006,0x84500000,0xc00001b,0x4000010,0x84400000,0xc00001b,0x4000010,0x84b70000,0xc00001b,0x4000800,0x84200000,0xc00001b, +0x6800000,0x81329800,0xc00001b,0x7c00100,0x80230400,0xc00001b,0x7c00900,0x80230400,0xc00001b,0xc000010,0x84b48000,0xc00001c,0x4000000,0x4200000,0xc00001c,0x6800100, +0xfd862400,0xc00001c,0x6800100,0xfd862540,0xc00001c,0x7c00100,0xfd830000,0xc00001c,0x7c00100,0xfd830001,0xc00001c,0xc000010,0x4448000,0xc00001d,0x4000000,0x84810000, +0xc00001d,0x4000000,0x85410000,0xc00001d,0x4000001,0x84445800,0xc00001d,0x7c00100,0x80230400,0xc000020,0x7c00100,0x80230400,0xc000021,0x4000000,0x4200000,0xc000021, +0x6800100,0x30962540,0xc000021,0x6800100,0xfc962540,0xc000021,0x6800100,0xfc962541,0xc000021,0x7c00100,0x30230400,0xc000021,0x7c00100,0xfc230400,0xc000022,0x4000000, +0x44200000,0xc000022,0x4000010,0x44200000,0xc000022,0x7c00100,0x40230400,0xc000022,0xc000010,0x44248000,0xc000022,0x80000000,0x44218560,0xc000025,0x7c00100,0xfc230400, +0xc000027,0x4000000,0x4200000,0xc000027,0x4000000,0x4400000,0xc000027,0x7c00100,0xfc230400,0xc000028,0x4000000,0x44200000,0xc000028,0x7c00100,0x40230400,0xc000028, +0xc000010,0x44248000,0xc00002e,0x24000000,0x14200000,0xc000532,0x4000010,0x84400000,0xc000537,0x4000010,0x84400000,0xc000537,0x4000010,0x84b70000,0xc000537,0xc000010, +0x84b48000,0xc00055f,0x4000001,0xc8c41c0b,0xc000d2d,0x6800000,0xfd329800,0xc001000,0x4000400,0x4500400,0xc005005,0x7c00100,0xfce30400,0xc005011,0x4020000,0x4e00000, +0xc005011,0x4020000,0xc8e00002,0xc005011,0x7c00300,0xc8e30002,0xc005011,0x7c40300,0xfce30000,0xc005029,0x4000000,0x44e00000,0xc005029,0x7c00100,0x40e30400,0xc005029, +0x7c00900,0x41230400,0xc00557f,0x4008000,0x4e00000,0xc00557f,0x4010000,0x4e00000,0xc00559b,0x4000000,0x4e00000,0xc010001,0x2000,0x14962460,0xc010008,0x2000, +0xc962460,0xc010017,0x2802100,0xfd862460,0xc010017,0x2802400,0x9862460,0xc010017,0x2802400,0x11862460,0xc010017,0x2802400,0x19862460,0xc010017,0x2802400,0xfd862460, +0xc010017,0x2806400,0xfd862460,0xc010017,0x2882000,0xc5862460,0xc01001b,0x2802100,0xa0962460,0xc01001b,0x3c02100,0x80962460,0xc01001b,0x12882000,0xc4962460,0xc01001c, +0x2802100,0xfd862460,0xc01001c,0x2802400,0xfd862460,0xc01001c,0x2806400,0xfd862460,0xc010021,0x2802100,0x30962460,0xc010021,0x2802100,0xfc962460,0xc010021,0x2806400, +0xfc962460,0xc010022,0x2802100,0x40962460,0xc010022,0x2802400,0x50962460,0xc010022,0x2802500,0x40962460,0xc010025,0x2802500,0xfc962460,0xc010027,0x2802100,0xfc962460, +0xc010027,0x2802400,0xfc962460,0xc0108be,0x2802100,0xfc962460,0xc011001,0x2802400,0x10962460,0xc011001,0x2802400,0x10c62460,0xd000000,0x80000,0xc4918820,0xd000000, +0x180000,0xc0918820,0xd000000,0x4000000,0x14200000,0xd000000,0x4000000,0xc8200001,0xd000000,0x4000020,0xc8200005,0xd000000,0x6800020,0xc9329805,0xd000000,0x7c00120, +0xc8220405,0xd000000,0x7c00120,0xc8250405,0xd000009,0x7c00100,0x80220400,0xd000009,0x7c00100,0x80250400,0xd00000d,0x7c00100,0x80230400,0xd00000e,0x7c00120,0xc8220402, +0xd00000e,0x7c00120,0xc8250402,0xd00001e,0x4000000,0x84200000,0xd00001e,0x7c00100,0x80230400,0xd000067,0x1000,0,0xd005011,0x7c00300,0xc8e30001,0xd005011, +0x7c40300,0xfce30000,0xd010000,0x82000,0xc4962460,0xd010000,0x2802000,0x10962460,0xd010000,0x2802400,0x10962460,0xd010001,0x2802400,0x10962460,0xe000000,0x80000, +0xc5e18820,0xe000000,0x80020,0xc4218820,0xe000000,0x4000000,0x4200000,0xe000000,0x4000000,0x5600000,0xe000000,0x4000001,0xc8445802,0xe000000,0x4000020,0x4200000, +0xe000000,0x4000020,0xc8200005,0xe000000,0x7c00120,0xc8220405,0xe000000,0x7c00120,0xc8250405,0xe000000,0x24000000,0x4100000,0xe000000,0x24000000,0x4200000,0xe000000, +0x24000000,0x4810000,0xe000000,0x24000000,0x5410000,0xe000000,0x24000000,0xc9500002,0xe000000,0x24000020,0x4200000,0xe000000,0x24000020,0x4810000,0xe000000,0x24000020, +0x5410000,0xe000000,0x24000020,0xc8200001,0xe000000,0x24000020,0xc8200002,0xe000000,0x2c000010,0xc9248002,0xe000002,0x4000000,0xc9500008,0xe000002,0x7c00100,0x8230400, +0xe000002,0x7c00100,0x10230400,0xe000008,0x7c00100,0x8220400,0xe000008,0x7c00100,0x8250400,0xe000008,0x7c00100,0xfc220400,0xe000008,0x7c00100,0xfc250400,0xe00000c, +0x7c00100,0xfc230400,0xe00000e,0x4000020,0x4200000,0xe00000e,0x7c00100,0x8220400,0xe00000e,0x7c00100,0x8250400,0xe000019,0x7c00100,0x20250400,0xe000019,0x7c00100, +0xc822040f,0xe000025,0x7c00100,0xfc230400,0xe00002a,0x7c00100,0x80230400,0xe00002b,0x7c00100,0x80230400,0xe00002c,0x7c00100,0x80230400,0xe00002d,0x7c00100,0x80230400, +0xe000533,0xc000010,0x84448000,0xe000562,0x24000000,0x4200000,0xe001000,0x4000000,0x14100000,0xe003000,0x4000000,0xc8810011,0xe003000,0x4000000,0xc9410011,0xe004000, +0x24000020,0x4810000,0xe004000,0x24000020,0x5410000,0xe005000,0x4000000,0xc8e00003,0xe005000,0x24000020,0x4200000,0xe005011,0x7c00100,0x11230400,0xe005011,0x7c00300, +0xc8e30001,0xe005014,0x7c00100,0xc8e30010,0xe005014,0x7c00100,0xfe530000,0xe005016,0x7c00100,0xa530c00,0xe005016,0x7c00100,0xc8e30c10,0xe005029,0x4000000,0x44e00000, +0xe005596,0x24000000,0x14e00000,0xe005599,0x4000002,0xf9200c00,0xe0055af,0x4000000,0x4e00000,0xe0055af,0x7c00100,0x11230400,0xe010001,0x2000,0x14962460,0xe010001, +0x2802000,0x10962460,0xe010001,0x2802020,0x10962460,0xe01002a,0x2802100,0x80962460,0xe01002a,0x2806400,0x80962460,0xe01002b,0x2802100,0x80962460,0xe01002b,0x2806400, +0x80962460,0xe01002c,0x2802100,0x80962460,0xe01002d,0x2802100,0x80962460,0xe011001,0x2882000,0xc4c62460,0xe011001,0x12882000,0xc4962460,0xe011818,0x2802100,0x8962460, +0x10000000,0x4000000,0xc8200002,0x10000000,0x4000400,0x4200400,0x10000000,0x6800000,0x20201c00,0x10000000,0x7c00120,0xc8220405,0x10000000,0x24000000,0x4200000,0x10000000, +0x24000002,0x4200000,0x10000000,0x24000020,0x4200000,0x10000002,0x4000000,0x4200000,0x10000002,0x4000000,0x5071400,0x10000002,0x7c00100,0xfc230400,0x10000002,0x80000000, +0x5329960,0x10000004,0x7c00100,0xfc230400,0x10000008,0x7c00100,0x10220400,0x10000009,0x7c00100,0x80220400,0x10000009,0x7c00100,0x80250400,0x1000000a,0x7c00100,0xfc230400, +0x1000000e,0x7c00100,0x8220400,0x1000000e,0x7c00100,0x8250400,0x1000000e,0x7c00100,0x10220400,0x1000000e,0x7c00100,0xc8250402,0x1000000e,0x7c00500,0xc822040e,0x1000000e, +0x7c00500,0xc822040f,0x1000000f,0x4000000,0x5600000,0x1000000f,0x7c00100,0xfc230400,0x10000010,0x6800100,0xfc962540,0x10000015,0x7c00100,0xfc230400,0x10000017,0x4000000, +0x4200000,0x10000019,0x7c00100,0x10220400,0x10000019,0x7c00100,0x20220400,0x10000019,0x7c00500,0x10220400,0x10000019,0x7c00500,0xc822040e,0x10000019,0x7c00500,0xc822040f, +0x10000022,0x7c00100,0x40230400,0x10000023,0x4000000,0x4200000,0x10000023,0x4000000,0x5600000,0x1000002f,0x7c00100,0x80230400,0x10000030,0x4000000,0x44200000,0x10000030, +0x6800000,0x41329800,0x10000030,0x6800100,0x40962540,0x10000030,0x7c00100,0x40230400,0x10000030,0xc000010,0x44b48000,0x10000031,0x7c00100,0x80230400,0x10000032,0x6800000, +0x81329800,0x10000032,0x7c00100,0x80230400,0x10000033,0x7c00100,0x80230400,0x10000034,0x7c00100,0x41830000,0x10000035,0x4000010,0x84400000,0x10000035,0x7c00100,0x80230400, +0x100005fe,0x4000000,0x84200000,0x10000601,0x4000000,0x84400000,0x10000604,0x4000000,0x84200000,0x10000604,0x4000000,0x84400000,0x10000d23,0x4000000,0x4200000,0x10000dfc, +0x4000000,0x14200000,0x10001000,0x4000000,0x14200000,0x10005000,0x4000000,0x14200000,0x10005000,0x4000000,0xc8810010,0x10005000,0x4000000,0xc8e0000d,0x10005000,0x4000000, +0xc9410010,0x10005000,0x24000000,0x4200000,0x10005000,0x24000000,0x4e00000,0x10005012,0x4000000,0xc8e00002,0x10005012,0x4000000,0xc8e00003,0x1000801f,0x7c00100,0xfc230400, +0x10010002,0x2802100,0x20962460,0x10010002,0x2802400,0x20962460,0x10010002,0x2802500,0x20962460,0x1001000f,0x2802100,0xfc962460,0x10010010,0x2802100,0xfc962460,0x10010015, +0x2802400,0xfc962460,0x10010017,0x2802400,0x19862460,0x10010030,0x2802100,0x40962460,0x10010030,0x2802400,0x40962460,0x10011001,0x2802400,0x10962460,0x10011001,0x2802400, +0x10c62460,0x10011001,0x12882000,0xc4962460,0x1001188b,0x2802400,0x10c62460,0x11000000,0x4000000,0x4200000,0x11000000,0x4000000,0x5600000,0x11000000,0x4000400,0x14200400, +0x11000000,0x7c00120,0xc8220405,0x11000000,0x24000000,0x4200000,0x11000000,0x24000000,0x4e00000,0x11000000,0x24000000,0x5710000,0x11000000,0x24000000,0xc200000,0x11000000, +0x24000000,0xc400000,0x11000000,0x24000000,0x1d710000,0x11000000,0x24000020,0x4200000,0x11000000,0x24000020,0x4810000,0x11000000,0x24000020,0x5410000,0x11000002,0x4000000, +0x5500000,0x11000002,0x7c00100,0xfc230400,0x11000002,0xc000010,0x4b48000,0x11000004,0x7c00100,0xfc230400,0x11000007,0x4000000,0x84200000,0x11000007,0x4000000,0x84400000, +0x11000007,0x4000000,0x84b00000,0x11000007,0x7c00100,0x80220400,0x11000007,0x7c00100,0x80250400,0x11000007,0xc000010,0x84448000,0x11000007,0xc000010,0x84b48000,0x11000008, +0x7c00100,0xc822040f,0x11000008,0x7c00100,0xfc220400,0x11000008,0x7c00100,0xfc250400,0x1100000b,0x4000000,0x4200000,0x1100000b,0x7c00100,0xfc230400,0x1100000c,0x7c00100, +0x8220400,0x1100000c,0x7c00100,0xc822040f,0x1100000c,0x7c00100,0xfc230400,0x1100000e,0x4000000,0x4200000,0x1100000e,0x4000000,0xc200000,0x1100000e,0x7c00100,0x8230400, +0x1100000e,0x7c00100,0xc822040f,0x1100000e,0x7c00100,0xfc220400,0x1100000e,0x7c00100,0xfc250400,0x11000013,0x4000000,0xcb00000,0x11000019,0x7c00100,0x10220400,0x11000019, +0x7c00100,0x20220400,0x11000019,0x7c00100,0x20250400,0x11000019,0x7c00100,0xc822040e,0x11000019,0x7c00100,0xc822040f,0x11000023,0x7c00100,0xfc230400,0x11000027,0x4000000, +0x4500000,0x11000037,0x4000000,0x84200000,0x11000037,0x6800100,0x80962540,0x11000037,0x7c00100,0x80230400,0x11000038,0x7c00100,0x80220400,0x11000038,0x7c00100,0x80250400, +0x11000039,0x4000000,0x84200000,0x11000039,0x4000000,0x84400000,0x11000039,0x7c00100,0x80230400,0x11000039,0xc000010,0x84448000,0x1100003a,0x4000000,0x44200000,0x1100003a, +0x6800100,0x40962540,0x1100003a,0x7c00100,0x40230400,0x1100003b,0x4000000,0x45800000,0x1100003b,0x6800000,0x41329800,0x1100003b,0x7c00100,0x41830000,0x1100003b,0x7e00100, +0x41830000,0x1100003c,0x7c00100,0x40230400,0x1100003c,0x7c00100,0xc823040f,0x1100003d,0x4000010,0x84400000,0x1100003d,0x7c00100,0x80230400,0x11000564,0x24000000,0xc400000, +0x1100056a,0x24000000,0xc400000,0x11000571,0x24000006,0x4400000,0x110005b2,0x4000400,0xc200000,0x11000d23,0x6800000,0xfd329800,0x11005000,0x4000000,0xc8810010,0x11005000, +0x4000000,0xc8870010,0x11005000,0x4000000,0xc8f00010,0x11005000,0x4000000,0xc9270010,0x11005000,0x4000000,0xc9271010,0x11005000,0x4000000,0xc9410010,0x11005000,0xc000010, +0xc8848010,0x11005000,0xc000010,0xc8b48010,0x11005000,0x24000000,0x4200000,0x11005000,0x24000000,0x4e00000,0x11005011,0x7c00300,0xc8e30001,0x11005011,0x7c40300,0xfce30000, +0x11005012,0x4000000,0xc8e00003,0x1100559b,0x4000000,0x4e00000,0x1100800a,0x7c00100,0xfc230400,0x11010001,0x2802000,0x18962460,0x11010001,0x2802020,0x10962460,0x11010002, +0x2802100,0x20962460,0x1101000b,0x2802400,0xfc962460,0x1101000e,0x2802000,0x18962460,0x11010013,0x2802000,0x28962460,0x11010013,0x2802100,0x28962460,0x11010013,0x2802100, +0x30962460,0x11010037,0x2802100,0x80962460,0x11010039,0x2802100,0x80962460,0x11010039,0x2802400,0x80962460,0x11010039,0x2806400,0x80962460,0x1101003a,0x2802100,0x40962460, +0x1101003a,0x2806400,0x40962460,0x1101088a,0x2802000,0x18962460,0x11011001,0x2802000,0x10962460,0x11011001,0x2802000,0x10c62460,0x11011863,0x2802000,0x20962460,0x14000000, +0x4000000,0x4200000,0x14000000,0x4000400,0x4200400,0x14000000,0x7c00120,0xc8220405,0x14000000,0x7c00120,0xc8250405,0x14000000,0x7c00500,0xfc230400,0x14000000,0x24000000, +0x4200000,0x14000000,0x24000020,0x4200000,0x14000008,0x7c00100,0xfc220400,0x14000008,0x7c00100,0xfc250400,0x1400000e,0x7c00100,0xfc220400,0x14000015,0x7c00100,0xfc230400, +0x14000019,0x7c00100,0x8220400,0x14000019,0x7c00100,0x8250400,0x14000019,0x7c00100,0x10220400,0x14000019,0x7c00100,0x10250400,0x14000019,0x7c00100,0x20220400,0x14000019, +0x7c00100,0x20250400,0x1400003e,0x4000000,0x44400000,0x1400003e,0x4000000,0x44e00000,0x1400003e,0x4000010,0x44400000,0x1400003e,0x6800000,0x42d29800,0x1400003e,0x6800100, +0x40962540,0x1400003e,0x6800100,0x40962541,0x1400003e,0x7c00100,0x42b30400,0x1400003e,0x7c00100,0x42b30401,0x1400003e,0xc000010,0x44448000,0x14000057,0x4000000,0x44200000, +0x14000057,0x4000010,0x45071400,0x14000057,0x6800000,0x41329800,0x14000057,0x7c00100,0x40230400,0x14000057,0x7c00100,0x48230400,0x14000057,0x7c00500,0x40230400,0x14000057, +0x7c00900,0x48230400,0x14000057,0xc000010,0x44b48000,0x1400005a,0x4000000,0x84500000,0x1400005a,0x7c00100,0x80230400,0x1400005a,0xc000010,0x84b48000,0x1400005b,0x4000000, +0x84200000,0x1400005b,0x4000010,0x84400000,0x1400005b,0x7c00100,0x80230400,0x14000065,0x4000010,0x84400000,0x14000065,0x7c00100,0x80230400,0x1400559b,0x4000000,0x4200000, +0x1400800a,0x7c00100,0xfc230400,0x14010001,0x2802020,0x10962460,0x14010001,0x2802400,0x10962460,0x14010013,0x2802500,0x20962460,0x14010015,0x2802100,0xfc962460,0x1401003e, +0x2802100,0x40962460,0x1401003e,0x2802100,0x40962461,0x1401003e,0x2802400,0x40962460,0x1401003e,0x2802400,0x50962460,0x1401003e,0x2806400,0x42f62460,0x14010057,0x2802400, +0x40962460,0x15000000,0x80020,0xc4218820,0x15000000,0x4000000,0x4200000,0x15000000,0x4000000,0x4e00000,0x15000000,0x4000000,0xc200000,0x15000000,0x4000000,0x14200000, +0x15000000,0x4000400,0x4200400,0x15000000,0x7c00500,0xfc230400,0x15000000,0x24000000,0x4200000,0x15000000,0x24000000,0x4400000,0x15000000,0x24000000,0x4810000,0x15000000, +0x24000000,0x4e00000,0x15000000,0x24000000,0x5400000,0x15000000,0x24000000,0x5410000,0x15000000,0x24000000,0x5710000,0x15000000,0x24000000,0xc400000,0x15000000,0x24000002, +0x4200000,0x15000000,0x24000020,0x4200000,0x15000000,0x24000020,0x4810000,0x15000000,0x24000020,0x5410000,0x15000000,0x24000500,0xc230400,0x15000000,0x2c000010,0xcb48000, +0x15000002,0x4000000,0x5500000,0x15000002,0x4000020,0x4200000,0x15000002,0x7c00100,0xfc230400,0x15000008,0x4000000,0x4200000,0x15000008,0x4000000,0xc200000,0x15000008, +0x7c00100,0x8220400,0x15000008,0x7c00100,0x8230400,0x15000008,0x7c00100,0x8250400,0x15000008,0x7c00100,0xfc220400,0x15000008,0x7c00100,0xfc250400,0x15000008,0x7c00500, +0xfc230400,0x1500000a,0x7c00100,0xfc230400,0x1500000a,0x7c00500,0xfc230400,0x1500000e,0x7c00100,0x8220400,0x1500000e,0x7c00100,0x8250400,0x1500000e,0x7c00100,0x10250400, +0x15000019,0x7c00100,0x8220400,0x15000019,0x7c00100,0x8230400,0x15000019,0x7c00100,0x8250400,0x15000019,0x7c00100,0x10220400,0x15000019,0x7c00100,0x10250400,0x15000019, +0x7c00100,0x18220400,0x15000019,0x7c00100,0x18250400,0x15000019,0x7c00100,0x20220400,0x15000019,0x7c00100,0x20250400,0x15000019,0x7c00100,0xc822040e,0x15000019,0x7c00100, +0xc822040f,0x15000019,0x7c00100,0xfc250400,0x1500001a,0x4000000,0x4200000,0x1500001a,0x4000000,0x5500000,0x1500001a,0x7c00100,0xfc230400,0x1500001b,0x7c00100,0x80230400, +0x1500001c,0x4000000,0x5800000,0x1500001c,0x6800000,0xfd329800,0x1500001c,0x6800100,0xfd862400,0x1500001c,0x6800100,0xfd862540,0x1500001c,0x6800500,0xfd862400,0x1500001c, +0x7c00100,0xfd830000,0x15000023,0x7c00100,0xfc230400,0x15000024,0x4000000,0x4200000,0x15000024,0x7c00100,0xfc230400,0x15000027,0x4000000,0x4200000,0x15000027,0x4000000, +0x4400000,0x15000027,0x4000000,0x4500000,0x15000027,0x7c00100,0xfc230400,0x15000042,0x4000000,0x44e00000,0x15000042,0x6800000,0x42d29800,0x15000042,0x6800100,0x40962540, +0x15000042,0x7c00100,0x40430400,0x15000042,0x7c00100,0x42d30400,0x15000042,0xc000010,0x44448000,0x1500004f,0x6800000,0x41329800,0x1500004f,0x7c00100,0x40230400,0x1500004f, +0xc000010,0x44448000,0x15000052,0x4000010,0x44400000,0x15000052,0x6800000,0x41329800,0x15000052,0x6800100,0x40962540,0x15000052,0x7c00100,0x40230400,0x15000052,0xc000010, +0x44448000,0x15000063,0x4000010,0x44400000,0x15000063,0x6800000,0x41329800,0x15000063,0x7c00100,0x40230400,0x15000063,0x7c00100,0x48230400,0x15000063,0x7c00900,0x40230400, +0x15000063,0xc000010,0x44448000,0x15000063,0xc000010,0x44b48000,0x15000068,0x7c00100,0x80230400,0x1500006b,0x7c00100,0x80230400,0x1500006c,0x4000000,0x84200000,0x1500006c, +0x7c00100,0x80230400,0x1500006d,0x6800000,0x41329800,0x1500006d,0x7c00100,0x40230400,0x1500006d,0x7c00500,0x40230400,0x1500006d,0x7c00d00,0x40230400,0x1500006d,0xc000010, +0x44448000,0x1500006e,0x4000000,0x84200000,0x1500006e,0x6800100,0x80962540,0x1500006e,0x7c00100,0x80230400,0x1500006f,0x6800000,0x41329800,0x1500006f,0x6800100,0x40962540, +0x1500006f,0x7c00100,0x40230400,0x1500006f,0xc000010,0x44448000,0x15000071,0x6800000,0x41329800,0x15000071,0x6800100,0x40962540,0x15000071,0x7c00100,0x40230400,0x15000573, +0x24000000,0x84400000,0x150005f3,0x4000400,0x4400000,0x15004000,0x24000020,0x4810000,0x15004000,0x24000020,0x5410000,0x15005000,0x4000000,0x4e00000,0x15005000,0x24000000, +0x4200000,0x15005005,0x7c00100,0xfce30400,0x15005011,0x7c40300,0xfce30000,0x1500559b,0x4000000,0x4e00000,0x15008024,0x7c00100,0x8230400,0x15010001,0x2802000,0x8962460, +0x15010001,0x2802000,0x10962460,0x15010001,0x2802000,0x18962460,0x15010001,0x2802100,0x18962460,0x15010001,0x2802400,0x10962460,0x15010001,0x2802400,0x10c62460,0x15010001, +0x2802400,0x18962460,0x15010002,0x2802100,0x20962460,0x15010008,0x2000,0xc962460,0x15010008,0x2802100,0x8962460,0x15010008,0x2802400,0x20962460,0x15010010,0x2802100, +0x20962460,0x1501001a,0x2802100,0x20962460,0x1501001c,0x2802100,0xfd862460,0x1501001c,0x2802500,0xfd862460,0x1501001c,0x2806400,0xfd862460,0x1501001f,0x2802100,0x20962460, +0x15010024,0x2802100,0x20962460,0x15010042,0x2802100,0x40962460,0x1501004f,0x2802100,0x40962460,0x1501004f,0x2802400,0x40962460,0x15010052,0x2802100,0x40962460,0x15010052, +0x2802400,0x40962460,0x15010052,0x2802d00,0x40962460,0x1501006e,0x2802100,0x80962460,0x1501006e,0x2806400,0x80962460,0x1501006f,0x2806400,0x40962460,0x15010071,0x2802100, +0x40962460,0x15010071,0x2806400,0x40962460,0x1501096e,0x2802000,0x10962460,0x15010c98,0x2802400,0x18962460,0x15010c98,0x2802400,0x20962460,0x16000000,0x4000000,0x4200000, +0x16000000,0x4000000,0x5500000,0x16000000,0x4000000,0x5600000,0x16000000,0x4000000,0xc8100006,0x16000000,0x4000000,0xc8200003,0x16000000,0x24000000,0x4200000,0x16000002, +0x4000000,0x4200000,0x16000004,0x4000000,0x5600000,0x16000007,0x7c00100,0x80220400,0x16000007,0x7c00100,0x80250400,0x16000008,0x7c00100,0xfc220400,0x16000008,0x7c00100, +0xfc250400,0x1600000a,0x4000000,0xc200000,0x1600000a,0x6800100,0x8962540,0x1600000a,0x7c00100,0x8230400,0x16000012,0x7c00100,0xa230500,0x16000012,0x7c00100,0xa330520, +0x16000019,0x7c00100,0x8250400,0x1600001c,0x4000000,0x5800000,0x1600001c,0x6800100,0xfd862400,0x1600001c,0x6800500,0xfd862400,0x1600001c,0x7c00100,0xfd830000,0x1600001c, +0x7c00900,0xfd830000,0x16000028,0x4000002,0x44400000,0x16000028,0x7c00100,0x40230400,0x1600003b,0x6800000,0x41329800,0x1600003b,0x7c00100,0x41830000,0x16000047,0x7c00100, +0x80230400,0x16000047,0x7c00100,0x80830400,0x16000047,0x7c00100,0x81430400,0x1600004e,0x4000000,0x44e00000,0x1600004e,0x4000010,0x44400000,0x1600004e,0x6800000,0x42d29800, +0x1600004e,0x6800100,0x40962540,0x1600004e,0x7c00100,0x42b30400,0x1600004e,0xc000010,0x44448000,0x16000058,0x7c00100,0x80230400,0x1600005b,0x4000000,0x84200000,0x1600006a, +0x4000000,0x45800000,0x1600006a,0x6800000,0x41329800,0x1600006a,0x6800100,0x41862400,0x1600006a,0x6800100,0x41862540,0x1600006a,0x7c00100,0x41830000,0x1600006a,0x7c00900, +0x41830000,0x1600006a,0xc000010,0x45848000,0x16000073,0x6800000,0x41329800,0x16000073,0x6800100,0x40962540,0x16000073,0x6800400,0x40962540,0x16000073,0x7c00100,0x40230400, +0x16000073,0xc000010,0x44448000,0x16000074,0x4000000,0x84200000,0x16000074,0x4000010,0x84400000,0x16000074,0x7c00100,0x80230400,0x16000075,0x4000000,0x84400000,0x16000075, +0x4000010,0x84400000,0x16000075,0x7c00100,0x80230400,0x16000078,0x4000000,0x84200000,0x16000078,0x6800100,0x80962540,0x16000078,0x7c00100,0x80230400,0x16000078,0x7c00100, +0x80230401,0x16000078,0xc000010,0x84448000,0x16000078,0x80000000,0x85329960,0x1600007a,0x4000000,0x84200000,0x1600007a,0x7c00100,0x80230400,0x1600007d,0x4000000,0x84200000, +0x1600007d,0x7c00100,0x80230400,0x1600007e,0x4000000,0x84200000,0x1600007e,0x4000010,0x84200000,0x1600007e,0x7c00100,0x80230400,0x1600007e,0xc000010,0x84248000,0x1600007f, +0x4000000,0x45800000,0x1600007f,0x4000010,0x45800000,0x1600007f,0x7c00100,0x41830000,0x1600007f,0x7c00500,0x41830000,0x1600007f,0x7c00900,0x41830000,0x1600007f,0x7e00100, +0x41830000,0x16000082,0x4000000,0x44200000,0x16000082,0x4000010,0x44400000,0x16000082,0x7c00100,0x40230400,0x16000082,0xc000010,0x44448000,0x16000083,0x4000010,0x44400000, +0x16000083,0x7c00100,0x40230400,0x16000083,0xc000010,0x44448000,0x16000085,0x4000000,0x84200000,0x16000085,0x7c00100,0x80230400,0x16000539,0x7c00100,0x8230400,0x1600053b, +0x4000400,0xc200000,0x1600053e,0x6800400,0x8962540,0x1600053e,0x7c00100,0x8230400,0x16000548,0x7c00100,0x8230400,0x1600054a,0x7c00100,0x8230400,0x16000575,0x24000000, +0xc400000,0x160005b4,0x4000000,0x4200000,0x160005c4,0x4000000,0x4200000,0x160005d3,0x4000000,0x4200000,0x160005de,0x4000000,0x5500000,0x160005f6,0x7c00900,0x60430400, +0x16000df1,0x7c00100,0x8230400,0x16001000,0x4000000,0x4100000,0x16001000,0x4000000,0xc8100002,0x16001000,0x4000000,0xc8100003,0x16001000,0x4000000,0xc8100006,0x16001000, +0x4000000,0xc810000d,0x16001000,0x4000100,0x4150400,0x16001000,0x4000100,0xc815040d,0x16001000,0x24000000,0x4100000,0x16001000,0x24000000,0x4e00000,0x16001000,0x24000000, +0x6800000,0x16005000,0x4000000,0xc8e00002,0x16005000,0x4000000,0xc8e0000d,0x16005000,0x24000000,0x4100000,0x16005000,0x24000000,0x4e00000,0x16005011,0x7c00300,0xc8e30001, +0x16005011,0x7c40300,0xfce30000,0x16005012,0x7c00100,0xa130480,0x16005014,0x4000000,0xc8e0000d,0x1600559b,0x4000000,0xc8e00003,0x1600800a,0x7c00100,0xfc230400,0x16010001, +0x2802400,0x10962460,0x16010007,0x2802400,0x80962460,0x16010007,0x2802400,0x90962460,0x1601000a,0x2802100,0x20962460,0x1601000a,0x2802400,0x8962460,0x1601001c,0x2802100, +0xfd862460,0x1601004e,0x2802100,0x40962460,0x1601004e,0x2802400,0x40962460,0x1601004e,0x2806400,0x42f62460,0x1601006a,0x2802100,0x41862460,0x1601006a,0x2802400,0x40962460, +0x1601006a,0x2802400,0x41862460,0x1601006a,0x2806400,0x41862460,0x16010073,0x2802100,0x40962460,0x16010073,0x2806400,0x40962460,0x16010078,0x2802100,0x80962460,0x16010078, +0x2802400,0x80962460,0x16010078,0x2806400,0x80962460,0x1601007e,0x2802000,0x80962460,0x1601007e,0x2802100,0x80962460,0x1601007e,0x2802400,0x80962460,0x1601007f,0x2802100, +0x41862460,0x1601007f,0x2802400,0x41862460,0x16010082,0x2802400,0x40962460,0x16010939,0x2802400,0x8962460,0x1601093a,0x2802400,0x8962460,0x1601093e,0x2802400,0x8962460, +0x16010940,0x2802400,0x8962460,0x16010942,0x2802400,0x8962460,0x16010ded,0x2802400,0x8962460,0x18000000,0x4000000,0x4200000,0x18000000,0x4000000,0x4e00000,0x18000000, +0x4000000,0x5600000,0x18000000,0x4000000,0x6703580,0x18000000,0x24000000,0x4200000,0x18000000,0x24000000,0x4e00000,0x18000000,0x24000000,0x5710000,0x18000000,0x24000020, +0x4200000,0x18000002,0x4000000,0x14200000,0x18000002,0x7c00100,0xfc230400,0x18000008,0x7c00100,0x8220400,0x18000008,0x7c00100,0x8250400,0x18000008,0x7c00100,0xfc220400, +0x18000008,0x7c00100,0xfc250400,0x1800000a,0x6800100,0xfc962540,0x1800000a,0x7c00100,0xfc230400,0x1800000b,0x7c00100,0xfc230400,0x18000019,0x7c00100,0x8220400,0x18000019, +0x7c00100,0x8250400,0x18000019,0x7c00100,0x10220400,0x18000019,0x7c00100,0xc822040e,0x18000019,0x7c00100,0xfc250400,0x1800001a,0x7c00100,0xfc230560,0x1800001f,0x4000000, +0x4200000,0x18000027,0x4000000,0x4c00000,0x18000027,0x7c00100,0xfc230400,0x1800003c,0x4000000,0x44400000,0x1800003f,0x4000000,0x44200000,0x1800003f,0x6800100,0x40962540, +0x1800003f,0x7c00100,0x42d30400,0x18000041,0x4000000,0x84e00000,0x18000041,0x4000010,0x84e00000,0x18000041,0x6800000,0x82d29800,0x18000041,0x6800100,0x80962540,0x18000041, +0x7c00100,0x82b30400,0x18000041,0x7c00100,0x82c30400,0x18000041,0xc000010,0x84448000,0x18000054,0x4000010,0x44200000,0x18000054,0x7c00100,0x40230400,0x18000082,0x7c00100, +0x40230400,0x18001000,0x4000000,0x4100000,0x18001000,0x4000000,0xc810000d,0x18001000,0x4000100,0x4150400,0x18001000,0x4000100,0xc815040d,0x18005000,0x4000000,0x4100000, +0x18005000,0x4000000,0x4200000,0x18005000,0x4000000,0x4e00000,0x18005000,0x4000000,0x6800000,0x18005000,0x4000000,0xc8e0000d,0x18005000,0x24000000,0x4200000,0x18005000, +0x24000000,0x4e00000,0x18005000,0x24000000,0x6800000,0x18005005,0x7c00100,0xfce30400,0x18005011,0x7c40300,0xfce30000,0x18005014,0x7c00100,0x8e30000,0x18005016,0x7c00100, +0x8e30c00,0x1800559b,0x4000000,0xc8e00003,0x1800801a,0x7c00100,0xfc230400,0x18010001,0x2802400,0x10c62460,0x18010002,0x2802100,0x20962460,0x1801000a,0x2802100,0xfc962460, +0x1801000b,0x2802400,0xfc962460,0x18010027,0x2802100,0xfc962460,0x1801003c,0x2806000,0x40962460,0x1801003f,0x2802100,0x40962460,0x1801003f,0x2802400,0x40962460,0x1801003f, +0x2806400,0x42e62460,0x18010041,0x2802100,0x80962460,0x18010041,0x2806400,0x82f62460,0x18010054,0x2802000,0x40962460,0x19000000,0x4000000,0x4200000,0x19000000,0x4000000, +0xc820000f,0x19000000,0x24000000,0x4200000,0x19000000,0x24000000,0x4400000,0x19000000,0x24000000,0xc200000,0x19000000,0x24000002,0x4300000,0x19000000,0x24000020,0x4200000, +0x19000002,0x4000020,0x4200000,0x19000002,0x7c00100,0xfc230400,0x19000002,0x7c00120,0xc8230405,0x19000002,0x80000000,0x5329960,0x19000003,0x4000000,0x5600000,0x19000007, +0x7c00100,0x80220400,0x19000007,0x7c00100,0x80250400,0x1900000c,0x7c00100,0xfc220400,0x1900000c,0x7c00100,0xfc230400,0x1900000c,0x7c00100,0xfc250400,0x1900000f,0x4000000, +0x4200000,0x19000018,0x7c00100,0xfd830000,0x19000019,0x7c00100,0xfc220400,0x19000019,0x7c00100,0xfc250400,0x19000019,0x7c00500,0xc822040f,0x1900003c,0x7c00100,0x40230400, +0x19000056,0x7c00100,0x80230400,0x1900005c,0x6800100,0x40962540,0x1900005c,0x7c00100,0x40230400,0x1900005c,0x7c00500,0x40230400,0x19000071,0x4000000,0x44200000,0x19000071, +0x7c00100,0x40230400,0x19000073,0x6800100,0x40962540,0x19000073,0x7c00100,0x40230400,0x19000073,0x7c00900,0x40230400,0x19000073,0xc000010,0x44448000,0x19000076,0x4000000, +0x44400000,0x19000076,0x6800000,0x41329800,0x19000076,0x6800100,0x40962540,0x19000076,0x7c00100,0x40230400,0x19000076,0xc000010,0x44448000,0x1900008d,0x7c00100,0x80230400, +0x19000097,0x4000000,0x84200000,0x19000097,0x4000000,0x84400000,0x19000097,0x6800000,0x81329800,0x19000097,0x6800100,0x80962540,0x19000097,0x7c00100,0x80230400,0x19000097, +0x7c00100,0x80230560,0x19000097,0xc000010,0x84448000,0x19000098,0x6800000,0x81329800,0x19000098,0x7c00100,0x80230400,0x19000099,0x6800000,0x81329800,0x19000099,0x6800100, +0x80962540,0x19000099,0x7c00100,0x80230400,0x1900053e,0x7c00100,0x8230400,0x19000555,0x7c00100,0x8230400,0x19005000,0x4000000,0x4e00000,0x19005011,0x7c00300,0xc8e30001, +0x19005011,0x7c40300,0xfce30000,0x19010002,0x2802400,0x20962460,0x19010002,0x2802500,0x20962460,0x19010008,0x2802100,0x8962460,0x1901005c,0x2802500,0x40962460,0x19010071, +0x2802100,0x40962460,0x19010071,0x2806400,0x40962460,0x19010073,0x2802100,0x40962460,0x19010073,0x2806400,0x40962460,0x19010076,0x2802100,0x40962460,0x19010076,0x2802100, +0x40962461,0x19010076,0x2806400,0x40962460,0x19010097,0x2802100,0x80962460,0x19010097,0x2806400,0x80962460,0x19010099,0x2802100,0x80962460,0x19010099,0x2802400,0x80962460, +0x19010099,0x2806400,0x80962460,0x19010957,0x2802400,0x8962460,0x1a000000,0x4000000,0x5600000,0x1b000000,0x80000,0xc4918820,0x1b000cab,0x80000,0xc4918820,0x1c000000, +0x4000000,0x4100000,0x1c000000,0x4000000,0x4200000,0x1c000000,0x4000000,0x4e00000,0x1c000000,0x4000000,0x5200000,0x1c000000,0x4000000,0x5500000,0x1c000000,0x4000000, +0x5600000,0x1c000000,0x4000000,0x5710000,0x1c000000,0x4000000,0x6800000,0x1c000000,0x4000400,0x4200400,0x1c000000,0x24000000,0x4200000,0x1c000000,0x24000000,0x4400000, +0x1c000000,0x24000000,0x4e00000,0x1c000000,0x24000002,0x4400000,0x1c000000,0x24000008,0x5410000,0x1c000000,0x80000000,0x5329960,0x1c000002,0x7c00100,0x8230400,0x1c000002, +0x7c00100,0xfc230400,0x1c000003,0x4000000,0x4200000,0x1c000004,0x7c00100,0x8230400,0x1c000008,0x7c00100,0x8220400,0x1c000008,0x7c00100,0x8250400,0x1c000008,0x7c00100, +0xfc220400,0x1c000008,0x7c00100,0xfc250400,0x1c000008,0x7c00500,0xc822040f,0x1c00000e,0x4000000,0x4200000,0x1c00000e,0x7c00100,0x8220400,0x1c00000e,0x7c00100,0x8250400, +0x1c000019,0x7c00100,0x8220400,0x1c000019,0x7c00100,0x8230400,0x1c000019,0x7c00100,0x8250400,0x1c000019,0x7c00500,0xc822040f,0x1c00001c,0x6800000,0xfd329800,0x1c00001c, +0x6800500,0xfd862400,0x1c00001c,0x7c00100,0x9830000,0x1c00001c,0x7c00100,0xfd830000,0x1c00001c,0x7c00900,0x9830000,0x1c00001e,0x7c00100,0x80230400,0x1c000020,0x7c00100, +0x80230400,0x1c000021,0x4000000,0x4200000,0x1c000021,0x6800000,0x9329800,0x1c000030,0x7c00100,0x40230400,0x1c00004b,0x4000000,0x84200000,0x1c00004b,0x4000010,0x84400000, +0x1c00004b,0x6800000,0x81329800,0x1c00004b,0x7c00100,0x80230400,0x1c00004b,0x7c00900,0x80230400,0x1c00004b,0xc000010,0x84448000,0x1c000053,0x7c00100,0x80230400,0x1c000059, +0x7c00100,0x80230400,0x1c000065,0x4000010,0x84400000,0x1c000065,0x7c00100,0x80230400,0x1c000079,0x4000000,0x84200000,0x1c000079,0x4000000,0x84f00000,0x1c000079,0x4000010, +0x84400000,0x1c000079,0x7c00100,0x80230400,0x1c00007b,0x4000000,0x84200000,0x1c00007b,0x4000010,0x84200000,0x1c00007b,0x7c00100,0x80230400,0x1c000086,0x7c00100,0x80230400, +0x1c000086,0xc000010,0x84448000,0x1c000087,0x4000000,0x84200000,0x1c000087,0x7c00100,0x80230400,0x1c000087,0xc000010,0x84448000,0x1c000088,0x7c00100,0x80230400,0x1c000089, +0x6800100,0x80962540,0x1c000089,0x6800100,0x80962541,0x1c000089,0x7c00100,0x80430400,0x1c000089,0x7c00100,0x82b30400,0x1c000089,0x7c00100,0x82d30400,0x1c000089,0x7c00900, +0x80430400,0x1c00008c,0x4000000,0x84200000,0x1c00008c,0x7c00100,0x80230400,0x1c00008e,0x4000000,0x84200000,0x1c00008e,0x7c00100,0x80230400,0x1c00008f,0x4000000,0x84200000, +0x1c00008f,0x7c00100,0x80230400,0x1c000090,0x4000000,0x84200000,0x1c000090,0x7c00100,0x80230400,0x1c000091,0x6800000,0x81329800,0x1c000091,0x6800100,0x80962540,0x1c000091, +0x7c00100,0x80230400,0x1c000092,0x4000000,0x84200000,0x1c000092,0x6800000,0x81329800,0x1c000092,0x7c00100,0x80220400,0x1c000092,0x7c00100,0x80230400,0x1c000092,0x7c00100, +0x80250400,0x1c000095,0x6800000,0xa1329800,0x1c000095,0x7c00100,0xa0230400,0x1c000095,0xc000010,0x84448000,0x1c000097,0x7c00100,0x80230400,0x1c000097,0xc000010,0x84248000, +0x1c00009d,0x4000000,0x84200000,0x1c00009d,0x4000010,0x84200000,0x1c00009d,0x6800100,0x80962540,0x1c00009d,0x7c00100,0x80230400,0x1c00009d,0xc000010,0x84448000,0x1c00009e, +0x4000000,0x84200000,0x1c00009e,0x6800000,0x81329800,0x1c00009e,0x6800100,0x80962540,0x1c00009e,0x6800100,0x80962541,0x1c00009e,0x7c00100,0x80230400,0x1c00009f,0x4000000, +0x84200000,0x1c00009f,0x7c00100,0x80230400,0x1c0000a0,0x4000000,0x84200000,0x1c0000a0,0x4000000,0x84500000,0x1c0000a0,0x7c00100,0x80230400,0x1c0000a3,0x4000000,0x84200000, +0x1c0000a3,0x6800000,0x81329800,0x1c0000a3,0x6800100,0x80962540,0x1c0000a3,0x7c00100,0x80230400,0x1c0000a3,0xc000010,0x84448000,0x1c0000a5,0x7c00100,0x80230400,0x1c0000a6, +0x4000000,0x84500000,0x1c0000a6,0x4000010,0x84b00000,0x1c0000a6,0x4000800,0x84200000,0x1c0000a6,0x6800100,0x80962540,0x1c0000a6,0x6800100,0x80962541,0x1c0000a6,0x7c00100, +0x80230400,0x1c0000a6,0xc000010,0x84448000,0x1c00045d,0x80000,0xc4918820,0x1c00045d,0x2c000010,0x84448000,0x1c00057c,0x24000010,0x4400000,0x1c000606,0x4000000,0xc200000, +0x1c000e0a,0x4000010,0x84400000,0x1c000e0c,0x6800100,0xfc962540,0x1c005000,0x4000000,0x4e00000,0x1c005000,0x4000000,0x6800000,0x1c00800a,0x7c00100,0x8230400,0x1c008024, +0x7c00100,0x8230400,0x1c010001,0x2400,0x4962460,0x1c010001,0x2802100,0x10962460,0x1c010001,0x2802400,0x8962460,0x1c010001,0x2802400,0x10962460,0x1c010001,0x2802400, +0x10c62460,0x1c010002,0x2802100,0x20962460,0x1c010015,0x2802100,0x8962460,0x1c01001a,0x2802100,0x8962460,0x1c01001c,0x2802500,0x9862460,0x1c01001c,0x2802500,0xfd862460, +0x1c010024,0x2802100,0x8962460,0x1c010041,0x2806000,0x80c62460,0x1c01004b,0x2802400,0x80962460,0x1c010059,0x2802100,0x80962460,0x1c010079,0x2802400,0x80962460,0x1c010086, +0x2802400,0x80962460,0x1c010087,0x2802000,0x80962460,0x1c010087,0x2802100,0x80962460,0x1c010089,0x2802100,0x80962460,0x1c010089,0x2802400,0x80962460,0x1c010089,0x2806400, +0x82f62460,0x1c01008c,0x2802400,0x80962460,0x1c010091,0x2802100,0x80962460,0x1c010091,0x2802400,0x80962460,0x1c010091,0x2806400,0x80962460,0x1c01009d,0x2802100,0x80962460, +0x1c01009d,0x2802400,0x80962460,0x1c01009d,0x2802900,0x80962460,0x1c01009d,0x2806400,0x80962460,0x1c01009e,0x2802100,0x80962460,0x1c01009e,0x2802400,0x80962460,0x1c01009e, +0x2806400,0x80962460,0x1c0100a0,0x2802400,0x80962460,0x1c0100a3,0x2802100,0x80962460,0x1c0100a3,0x2806400,0x80962460,0x1c0100a6,0x2802100,0x80962460,0x1c0100a6,0x2802400, +0x80962460,0x1c0100a6,0x2806400,0x80962460,0x1c010955,0x2802400,0x8962460,0x1c010a06,0x2802400,0x8962460,0x1c010e0c,0x2802100,0xfc962460,0x1c010e0c,0x2802400,0xfc962460, +0x20000000,0x4000000,0x5500000,0x20000000,0x4000000,0x24200000,0x20000000,0x4000000,0x24e00000,0x20000000,0x4000000,0x34200000,0x20000000,0x24000000,0x24200000,0x20000002, +0x7c00100,0x20230400,0x20000006,0x7c00100,0x40220400,0x20000006,0x7c00100,0x40250400,0x2000000a,0x4000000,0x2c500000,0x2000000a,0x7c00100,0x28230400,0x20000019,0x7c00100, +0x20220400,0x20000019,0x7c00100,0x20230400,0x20000019,0x7c00100,0x20250400,0x2000001a,0x7c00100,0x8230400,0x2000004c,0x4000000,0x84200000,0x2000004c,0x7c00100,0x80220400, +0x2000004c,0x7c00100,0x80250400,0x20000065,0x7c00100,0x80230400,0x20000070,0x4000000,0x84200000,0x20000070,0x4000010,0x84400000,0x20000070,0xc000010,0x84448000,0x20000089, +0x7c00100,0x82d30400,0x2000008d,0x4000000,0x84200000,0x20000097,0x4000000,0x84400000,0x20000097,0x4000000,0x84500000,0x20000097,0x7c00100,0x80230400,0x20000097,0xc000010, +0x84448000,0x2000009c,0x7c00100,0x80230400,0x2000009c,0x7c00100,0x80830400,0x2000009c,0x7c00100,0x81430400,0x200000a1,0x4000000,0x85800000,0x200000a1,0x6800000,0x81329800, +0x200000a1,0x6800100,0x81862400,0x200000a1,0x6800100,0x81862540,0x200000a1,0x7c00100,0x81830000,0x200000a1,0xc000010,0x84448000,0x200000a2,0x4000000,0x84200000,0x200000a2, +0x7c00100,0x80230400,0x200000a4,0x7c00100,0x80230400,0x200000a4,0xc000010,0x84448000,0x200000a6,0x7c00100,0x80230400,0x200000a6,0xc000010,0x84448000,0x20005000,0x4000000, +0x4e00000,0x20005000,0x4000000,0x6800000,0x20005011,0x7c40300,0xfce30000,0x2000800f,0x7c00100,0x20230400,0x20008024,0x7c00100,0x20230400,0x20010002,0x2802500,0x20962460, +0x20010008,0x2802100,0x28962460,0x20010008,0x2802400,0x30962460,0x20010008,0x2802400,0x30c62460,0x20010070,0x2802000,0x80962460,0x20010089,0x2802100,0x80962460,0x20010097, +0x2802000,0x80962460,0x20010097,0x2802400,0x80962460,0x200100a1,0x2802100,0x81862460,0x200100a1,0x2806400,0x81862460,0x200100a6,0x2802100,0x80962460,0x20015000,0x4000000, +0x6902460,0x24000000,0x4000000,0x4e00000,0x24000000,0x24000000,0x4200000,0x24000000,0x24000000,0x4400000,0x24000000,0x80000000,0x5329960,0x24000002,0x7c00100,0xfc230400, +0x24000008,0x7c00100,0x8220400,0x2400000e,0x4000000,0x4200000,0x24000015,0x7c00100,0xfc230400,0x24000019,0x7c00100,0x10250400,0x2400001a,0x4000000,0x4200000,0x2400001a, +0x7c00100,0xfc230400,0x2400001b,0x4000000,0x84500000,0x240000a7,0x4000000,0x45400000,0x240000a7,0x6800000,0x41329800,0x240000a7,0x7c00100,0x40220400,0x240000a7,0x7c00100, +0x40250400,0x240000a8,0x4000000,0x84200000,0x240000a8,0x4000000,0x84400000,0x240000a8,0x4000010,0x84400000,0x240000a8,0x6800000,0x81329800,0x240000a8,0x6800100,0x80962540, +0x240000a8,0x7c00100,0x80230400,0x240000a8,0xc000010,0x84448000,0x240000a9,0x4000000,0x84500000,0x240000a9,0x4000010,0x84b00000,0x240000a9,0x6800100,0x80962540,0x240000a9, +0x7c00100,0x80230400,0x240000aa,0x4000000,0x44200000,0x240000aa,0x4000000,0x44400000,0x240000aa,0x4000010,0x44400000,0x240000aa,0x6800000,0x41329800,0x240000aa,0x6800100, +0x40962540,0x240000aa,0x7c00100,0x40230400,0x240000aa,0xc000010,0x44448000,0x240000ab,0x7c00100,0x40220400,0x240000ab,0x7c00100,0x40250400,0x24000496,0x24000000,0x4400000, +0x24001000,0x4000000,0x4100000,0x24005000,0x4000000,0x4e00000,0x24005000,0x4000000,0x6800000,0x24005000,0x4000000,0xc8e0000d,0x2400509a,0x7c00300,0x80e30000,0x2400509a, +0x7c00900,0x81230400,0x24010001,0x2802400,0x10962460,0x24010002,0x2802000,0x20962460,0x24010002,0x2802100,0x20962460,0x24010038,0x2802100,0x80962460,0x2401006f,0x2802100, +0x40962460,0x2401009d,0x2802100,0x80962460,0x240100a7,0x2802100,0x40962460,0x240100a7,0x2802400,0x40962460,0x240100a7,0x2802c00,0x40962460,0x240100a8,0x2802100,0x80962460, +0x240100a8,0x2806400,0x80962460,0x240100a9,0x2802100,0x80962460,0x240100aa,0x2802100,0x40962460,0x240100aa,0x2802400,0x40962460,0x240100aa,0x2806400,0x40962460,0x28000000, +0x4000000,0x4200000,0x28000000,0x4000000,0x4e00000,0x28000000,0x4000000,0x5600000,0x28000000,0x24000000,0x4200000,0x28000000,0x24000000,0x4400000,0x28000004,0x4000000, +0x4200000,0x28000004,0x7c00100,0x8230400,0x2800001e,0x7c00100,0x80230400,0x28000022,0x7c00100,0x40230400,0x280000af,0x6800000,0x81329800,0x280000af,0x7c00100,0x80230400, +0x280000af,0x7c00100,0x80230560,0x280000b0,0x4000000,0x84400000,0x280000b0,0x4000000,0x84500000,0x280000b0,0x4000010,0x84400000,0x280000b0,0x6800100,0x80962540,0x280000b0, +0x7c00100,0x80230400,0x280000b0,0x7c00100,0x80230560,0x280000b0,0xc000010,0x84448000,0x280000b1,0x4000000,0x84200000,0x280000b1,0x4000000,0x84400000,0x280000b1,0x4000000, +0x84500000,0x280000b1,0x6800100,0x80962540,0x280000b1,0x7c00100,0x80230400,0x280000b1,0x7c00100,0x80230560,0x280000b1,0xc000010,0x84448000,0x2800055b,0x6800400,0x8962540, +0x28005000,0x4000000,0x4e00000,0x28005000,0x4000000,0x6800000,0x28005005,0x7c00100,0x8e30400,0x28005011,0x7c40300,0xfce30000,0x28005014,0x7c00100,0x8e30000,0x28005096, +0x7c00300,0x80e30000,0x28005096,0x7c00900,0x81230400,0x28010001,0x2802400,0x10962460,0x2801000f,0x2802100,0xfc962460,0x2801000f,0x2802400,0xfc962460,0x2801000f,0x2802900, +0xfc962460,0x2801001a,0x2802100,0xfc962460,0x2801001a,0x2806400,0x8962460,0x280100af,0x2802100,0x80962460,0x280100af,0x2802400,0x80962460,0x280100af,0x2806400,0x80962460, +0x280100b0,0x2802100,0x80962460,0x280100b0,0x2802800,0x80962460,0x280100b0,0x2806400,0x80962460,0x280100b1,0x2802000,0x80962460,0x280100b1,0x2802100,0x80962460,0x280100b1, +0x2806400,0x80962460,0x2801095c,0x2802400,0x10962460,0x2c000000,0x4000000,0x4200000,0x2c000000,0x4000000,0x4e00000,0x2c000000,0x4000000,0x5500000,0x2c000000,0x24000000, +0x4200000,0x2c000000,0x24000000,0x4400000,0x2c000000,0x24000010,0x4400000,0x2c000003,0x7c00100,0x10220400,0x2c00000a,0x7c00100,0x8230400,0x2c00000c,0x7c00100,0xfc230400, +0x2c000010,0x4000000,0x4200000,0x2c000013,0x7c00100,0xfe633800,0x2c000015,0x4000000,0x4500000,0x2c000019,0x7c00100,0x10220400,0x2c000019,0x7c00100,0x20220400,0x2c000019, +0x7c00100,0x20250400,0x2c00001b,0x7c00100,0x80230400,0x2c000039,0x4000000,0x84200000,0x2c000039,0x7c00100,0x80230400,0x2c000057,0x4000000,0x45600000,0x2c000076,0x6800100, +0x40962540,0x2c000076,0x7c00100,0x40230400,0x2c000078,0x80000000,0x85329960,0x2c0000a1,0x7c00100,0x81830000,0x2c0000b0,0x7c00100,0x80230400,0x2c0000b2,0x4000000,0x84200000, +0x2c0000b2,0x6800100,0x80962540,0x2c0000b2,0x7c00100,0x80230400,0x2c0000b3,0x6800000,0x41329800,0x2c0000b3,0x6800100,0x40962540,0x2c0000b3,0x7c00100,0x40230400,0x2c0000b4, +0x6800100,0x80962540,0x2c0000b4,0x7c00100,0x80430400,0x2c0000b4,0x7c00100,0x82d30400,0x2c0000b4,0xc000010,0x84448000,0x2c0000b5,0x4000000,0x84200000,0x2c0000b5,0x4000010, +0x84400000,0x2c0000b5,0x7c00100,0x80220400,0x2c0000b5,0x7c00100,0x80250400,0x2c0000b5,0xc000010,0x84448000,0x2c0000b6,0x6800000,0x41329800,0x2c0000b6,0x7c00100,0x40230400, +0x2c0000b6,0x7c00500,0x40230400,0x2c0000b7,0x4000000,0x84200000,0x2c0000b7,0x7c00100,0x80230400,0x2c0000b7,0xc000010,0x84248000,0x2c0000b8,0x4000000,0x84200000,0x2c0000b8, +0x7c00100,0x80230400,0x2c005000,0x4000000,0x4200000,0x2c005000,0x4000000,0x4e00000,0x2c005000,0x4000000,0x6800000,0x2c005005,0x7c00100,0xfce30400,0x2c005011,0x7c40300, +0xfce30000,0x2c00509a,0x7c00300,0x80e30000,0x2c010002,0x2802000,0x20962460,0x2c010004,0x2802000,0xfc962460,0x2c01000a,0x2802100,0x8962460,0x2c010024,0x2802100,0xfc962460, +0x2c010057,0x2802000,0x40962460,0x2c0100aa,0x2802000,0x40962460,0x2c0100b2,0x2802100,0x80962460,0x2c0100b2,0x2802400,0x80962460,0x2c0100b2,0x2806400,0x80962460,0x2c0100b3, +0x2802100,0x40962460,0x2c0100b3,0x2806400,0x40962460,0x2c0100b4,0x2802100,0x80962460,0x2c0100b6,0x2802500,0x40962460,0x2c0100b7,0x2802400,0x80962460,0x2c010921,0x2802400, +0xfc962460,0x30000000,0x4000000,0x4200000,0x30000000,0x4000000,0xc820000f,0x30000000,0x24000000,0x4200000,0x30000000,0x24000010,0x4400000,0x30000018,0x7c00100,0xfd830000, +0x30000019,0x7c00100,0x10220400,0x30000019,0x7c00100,0x10250400,0x30000019,0x7c00100,0xfc220400,0x30000019,0x7c00100,0xfc250400,0x30000023,0x4000000,0x4200000,0x30000023, +0x4000000,0x4400000,0x30000023,0x4000000,0x5500000,0x30000024,0x4000000,0x4500000,0x30000047,0,0x84818820,0x30000047,0,0x84c18820,0x30000047,0, +0x85418820,0x3000005c,0x6800100,0x40962540,0x3000005c,0x7c00100,0x40230400,0x30000099,0x7c00100,0x80230400,0x300000a7,0x7c00100,0x40230400,0x300000aa,0x7c00100,0x40230400, +0x300000b0,0x7c00100,0x80230560,0x300000b9,0x7c00100,0x80230400,0x300000ba,0x4000000,0x44200000,0x300000ba,0x6800000,0x41329800,0x300000ba,0x7c00100,0x40230400,0x300000ba, +0x7c00900,0x40230400,0x300000bb,0x4000000,0x84500000,0x300000bb,0x6800100,0x80962540,0x300000bb,0x7c00100,0x80230400,0x300000bc,0x4000000,0x45600000,0x300000bc,0x6800000, +0x41329800,0x300000bc,0x7c00100,0x40230400,0x30000549,0x7c00100,0x80230400,0x30000d23,0x4000000,0x4200000,0x30005000,0x4000000,0x4e00000,0x30005000,0x4000000,0x6800000, +0x30005011,0x4000000,0x5200000,0x30005011,0x7c00900,0x9230400,0x30005014,0x7c00100,0xfe530000,0x30005016,0x7c00100,0xfe530c00,0x3000509a,0x7c00300,0x80e30000,0x30010018, +0x2806400,0xfd862460,0x3001005c,0x2802100,0x40962460,0x300100ba,0x2802400,0x40962460,0x300100bb,0x2802100,0x80962460,0x300100bb,0x2806400,0x80962460,0x300100bc,0x2802400, +0x40962460,0x3100559b,0x4000000,0xc8e0000d,0x34000000,0x4000000,0x4200000,0x34000000,0x4000400,0x4200000,0x34000000,0x6800000,0xc9329805,0x34000000,0x24000000,0x4200000, +0x34000002,0x7c00100,0xfc230400,0x34000019,0x7c00100,0x8220400,0x34000019,0x7c00100,0x8250400,0x34000019,0x7c00100,0x10220400,0x34000019,0x7c00100,0xfc220400,0x34000019, +0x7c00100,0xfc250400,0x34000019,0x7c00500,0xc822040f,0x3400001a,0x7c00100,0x18230400,0x34000076,0x7c00100,0x40230400,0x34000083,0x7c00100,0x40230400,0x34000097,0x6800100, +0x80962540,0x340000aa,0x4000010,0x44400000,0x340000aa,0x7c00100,0x40230400,0x340000bd,0x4000000,0x84200000,0x340000bd,0x7c00100,0x80230400,0x340000be,0x4000000,0x84400000, +0x340000be,0x6800000,0x82d29800,0x340000be,0x6800100,0x80962540,0x340000be,0x6800100,0x80962541,0x340000be,0x7c00100,0x82b30400,0x340000be,0x7c00100,0x82c30560,0x340000be, +0xc000010,0x84448000,0x340000c0,0x4000002,0x84400000,0x340000c0,0x7c00100,0x80230400,0x34005000,0x4000000,0x4e00000,0x34005000,0x4000000,0x6800000,0x34005005,0x7c00100, +0xfce30400,0x34005011,0x7c40300,0xfce30000,0x3400509a,0x7c00300,0x80e30000,0x340050bf,0x7c00300,0x80230000,0x34010001,0x2802100,0x10962460,0x3401001f,0x2802c00,0xfc962460, +0x34010021,0x2802100,0x10962460,0x3401003a,0x2806400,0x40962460,0x34010097,0x2802100,0x80962460,0x340100be,0x2802100,0x80962460,0x340100be,0x2802400,0x80962460,0x340100be, +0x2806400,0x80962460,0x340100be,0x2806400,0x82f62460,0x340100c0,0x2802100,0x80962460,0x34015011,0x2802500,0xfc962460,0x340150bf,0x2802200,0x80c62460,0x38000000,0x4000000, +0x5500000,0x38000000,0x4000000,0x14200000,0x38000000,0x24000000,0x5410000,0x38000000,0x24000000,0x6410000,0x38000000,0x24000002,0x4400000,0x38000000,0x2c000010,0x4b48000, +0x38000002,0x4000000,0x4200000,0x38000002,0x4000000,0x14200000,0x38000002,0x7c00100,0xfc230400,0x38000002,0x7c00500,0xfc230400,0x38000002,0xc000010,0x4b48000,0x38000002, +0x80000000,0x5329960,0x3800000b,0x7c00100,0xfc230400,0x38000015,0x7c00100,0xfc230400,0x38000019,0x7c00100,0xc822040f,0x38000019,0x7c00100,0xfc220400,0x38000019,0x7c00100, +0xfc230400,0x38000019,0x7c00100,0xfc250400,0x38000019,0x7c00500,0x20220400,0x38000019,0x7c00500,0xc822040f,0x38000019,0x7c00d00,0xc823040f,0x38000024,0x7c00100,0xfc230400, +0x38000028,0x7c00100,0x40230400,0x3800002a,0x7c00100,0x80230400,0x38000038,0x7c00100,0x80220400,0x38000038,0x7c00100,0x80250400,0x3800003e,0x7c00100,0x42b30400,0x3800003e, +0xc000010,0x44448000,0x38000041,0x7c00100,0x82b30400,0x38000099,0x4000000,0x84200000,0x380000a1,0x7c00100,0x81830000,0x380000c1,0x4000000,0x84200000,0x380000c1,0x7c00100, +0x80230400,0x380000c2,0x7c00100,0x80230400,0x380000c2,0xc000010,0x84248000,0x380000c3,0x6800000,0x81329800,0x380000c3,0x7c00100,0x80230400,0x380000c4,0x7c00100,0x80230400, +0x380000c5,0x7c00100,0x80220400,0x380000c5,0x7c00100,0x80250400,0x38005000,0x4000000,0x4e00000,0x38005000,0x4000000,0x6800000,0x38005011,0x7c40300,0xfce30000,0x38005014, +0x7c00100,0xfce30000,0x38005016,0x7c00100,0xfce30c00,0x38005016,0x7c00500,0x20230c00,0x38010001,0x2802100,0x20962460,0x38010001,0x2802400,0x10962460,0x38010001,0x2802400, +0x20962460,0x38010002,0x2802400,0x20962460,0x3801001b,0x12882000,0xc4962460,0x38010024,0x2802400,0xfc962460,0x3801002a,0x2806400,0x80962460,0x38010041,0x2802100,0x80962460, +0x38010041,0x2806400,0x80962460,0x38010078,0x2802100,0x80962460,0x380100c2,0x2802400,0x80962460,0x380100c4,0x2802400,0x80962460,0x38010874,0x2802400,0x50962460,0x3c000000, +0x4000000,0x4200000,0x3c000000,0x4000000,0x4e00000,0x3c000008,0x7c00500,0xc822040e,0x3c000008,0x7c00500,0xc822040f,0x3c00000a,0x4000000,0x4500000,0x3c000015,0x6800100, +0xfc962540,0x3c000019,0x7c00100,0xfc220400,0x3c000047,0,0x84818820,0x3c000047,0,0x84c18820,0x3c000047,0,0x85418820,0x3c000047,0x7c00100,0x80230400, +0x3c000047,0x7c00100,0x81430400,0x3c00009d,0x7c00100,0x80230400,0x3c0000c6,0x4000000,0x84e00000,0x3c0000c6,0x6800000,0x82d29800,0x3c0000c6,0x6800100,0x80962540,0x3c0000c6, +0x7c00100,0x82b30400,0x3c0000c6,0x7c00100,0x82c30560,0x3c0000c6,0xc000010,0x84448000,0x3c0000c7,0x6800000,0x81329800,0x3c0000c7,0x7c00100,0x80230400,0x3c005000,0x4000000, +0x4e00000,0x3c005000,0x4000000,0x6800000,0x3c005011,0x7c40300,0xfce30000,0x3c005014,0x7c00100,0xfe530000,0x3c005016,0x7c00100,0xfe530c00,0x3c010002,0x2802400,0x20962460, +0x3c010008,0x2802100,0xfc962460,0x3c010018,0x2802000,0xfd862460,0x3c010047,0x2802000,0x80962460,0x3c010047,0x2802400,0x80962460,0x3c01009d,0x2802100,0x80962460,0x3c0100c6, +0x2802100,0x80962460,0x3c0100c6,0x2806400,0x80962460,0x3c0100c6,0x2806400,0x82f62460,0x3c0100c7,0x2802000,0x80962460,0x3d005011,0x7c40300,0xfce30000,0x3d00557f,0x4000000, +0x4e00000,0x3d00557f,0x4008000,0x4e00000,0x40000000,0x4000000,0x4200000,0x40000000,0x4000000,0xc8200005,0x40000000,0x6800000,0xc9329805,0x40000000,0x24000000,0x4200000, +0x40000002,0x7c00100,0x20230400,0x40000008,0x7c00100,0x20220400,0x40000008,0x7c00100,0x20250400,0x40000019,0x7c00100,0x20220400,0x40000019,0x7c00100,0x20250400,0x4000001c, +0x6800000,0x21329800,0x4000003e,0xc000010,0x44448000,0x40000047,0x7c00100,0x80230400,0x400000c9,0x4000002,0x84400000,0x400000c9,0x4000020,0x84200000,0x400000c9,0x6800000, +0x81329800,0x400000c9,0x7c00100,0x80220400,0x400000c9,0x7c00100,0x80230400,0x400000c9,0x7c00100,0x80250400,0x400000c9,0x7c00900,0x80230400,0x400000c9,0x7c00d00,0x80230400, +0x400000ca,0x6800000,0x82d29800,0x400000ca,0x6800100,0x80962540,0x400000ca,0x7c00100,0x82d30400,0x400000cb,0x4000000,0x84200000,0x400000cb,0x6800000,0x81329800,0x400000cb, +0x7c00100,0x80230400,0x400000cb,0x7c00100,0x80230520,0x400000cb,0x7c00100,0x80230521,0x400000cb,0x7c00500,0x80230400,0x400000cb,0xc000010,0x84448000,0x400000cc,0x4000000, +0x84200000,0x400000cc,0x6800000,0x81329800,0x400000cc,0x7c00100,0x80230400,0x400000cd,0x4000000,0x84200000,0x400000cd,0x6800000,0x81329800,0x400000cd,0x7c00100,0x80230400, +0x400000ce,0x7c00100,0x80230400,0x400000ce,0x7c00100,0x80230401,0x400000cf,0x4000000,0x84e00000,0x400000cf,0x6800100,0x80962540,0x400000cf,0x7c00100,0x80e30400,0x400000cf, +0x7c00100,0x82b30400,0x400000cf,0x7c00100,0x82c30560,0x400000cf,0x7c00100,0x82d30400,0x400000cf,0x7c00100,0x82d30401,0x400000cf,0x7c00d00,0x80e30400,0x400000cf,0xc000010, +0x84e48000,0x40005000,0x4000000,0x4e00000,0x400050bf,0x7c00300,0x80230000,0x4000559b,0x4000000,0x4e00000,0x40010002,0x2802100,0x20962460,0x400100c6,0x2802400,0x80962460, +0x400100c9,0x2802400,0x80962460,0x400100c9,0x2802500,0x80962460,0x400100c9,0x2802c00,0x80962460,0x400100ca,0x2802100,0x80962460,0x400100ca,0x2802100,0x80962461,0x400100ca, +0x2806400,0x80962460,0x400100cc,0x2802400,0x80962460,0x400100cc,0x2802c00,0x80962460,0x400100cf,0x2802100,0x80962460,0x400100cf,0x2802100,0x80962461,0x400100cf,0x2802400, +0x80962460,0x400100cf,0x2802c00,0x80962460,0x400100cf,0x2806400,0x80962460,0x400100cf,0x2806400,0x82f62460}; -static const int32_t countPropsVectors=7497; +static const int32_t countPropsVectors=6426; static const int32_t propsVectorsColumns=3; -static const uint16_t scriptExtensions[298]={ -0x800e,0x8019,8,0x8059,8,2,8,0x8038,8,6,8,0x8019,2,0x22,0x25,0x57, -0xb6,0x80c0,2,0x22,0x8025,2,0x12,2,0x22,0x25,0x57,0xa7,0xb6,0x80c0,2,0x22, -0x54,0x79,0x7b,0xa7,0xb6,0xb7,0x80c2,2,0x8022,2,0x25,0x80c0,2,0x29,2,0x80b6, -2,0x2e,4,0xa,0xf,0x10,0x15,0x19,0x1a,0x1f,0x23,0x24,0x89,0x97,0x809e,4, -0xa,0xf,0x10,0x15,0x19,0x1a,0x1f,0x23,0x24,0x89,0x809e,4,0xa,0xf,0x10,0x15, -0x1a,0x1f,0x21,0x23,0x24,0x3a,0x89,0x91,0x99,0x9e,0xa0,0xaf,0xb2,0xb3,0x80bb,4, -0xa,0xf,0x10,0x15,0x1a,0x1f,0x21,0x23,0x24,0x30,0x3a,0x89,0x91,0x99,0x9e,0xa0, -0xaf,0xb2,0xb3,0x80bb,0xa,0x78,0xa0,0x80b2,0xa,0x74,4,0x3a,0x8076,4,0x7a,0x10, -0x80a4,0x10,0x7f,0xf,0x809d,0xf,0x83,0x23,0x8089,0x23,0x87,0x15,0x80bb,0x15,0x8b,0x1c, -0x34,0x8076,0x1c,0x8f,0xc,0x8019,0x2a,0x2b,0x2c,0x802d,0x1b,0x805a,0x800a,4,0xa,0x15, -0x8089,0xa,0x8089,4,0x800a,0xa,0x8097,0xa,0x15,0x1a,0x1f,0x23,0x8024,0xa,0x80bb,4, -0xa,0x15,0x1a,0x1f,0x21,0x24,0x89,0x9e,0x80bb,0x8004,8,0x8022,0x19,0x801b,0xa,0x19, -0x8089,5,0x11,0x12,0x14,0x16,0x8029,5,0x11,0x12,0x14,0x8016,0x8011,5,0x8011,0x11, +static const uint16_t scriptExtensions[526]={ +7,0xc,0xd,0xe,0x11,0x19,0x33,0x38,0x59,0x68,0x6c,0x75,0x87,0x88,0xa0,0x80b3, +4,8,0xa,0x19,0x26,0x83,0x80c4,5,0x8019,0x19,0x8083,0x19,0x8026,6,7,8, +0xe,0x19,0x34,0x59,0x80cd,6,8,0xe,0x19,0x34,0xab,0xcd,0x80ce,6,8,0x19, +0x803c,0x19,0x22,0x26,0x38,0x80cd,6,7,8,0xd,0xe,0x19,0x22,0x3c,0x9f,0xab, +0x80ce,7,0xd,0x16,0x19,0x38,0x8088,8,0xe,0x19,0x8059,7,0x13,0x19,0x22,0x34, +0x3c,0x59,0x87,0x80ce,3,8,0xd,0xe,0x13,0x19,0x22,0x34,0x59,0x8087,0x19,0x22, +0x8087,6,8,0x19,0x80ab,6,0x19,0x8034,0x19,0x80cd,0xb,0x8019,8,0x19,0x80ce,0xe, +0x19,0x59,0x80ce,0x19,0x8022,6,0x16,0x19,0x22,0x8087,6,0x19,0x22,0x8087,0x19,0x22, +0x80cd,6,0x19,0x8022,6,0xd,0x19,0x26,0x9f,0x80cd,0x800e,0x19,0x9f,0x80ce,7,0x800e, +0xe,0x8e,8,0x8059,8,0x92,8,0x8038,8,0x96,8,0x8019,3,0xc,0x8038,3, +0x9c,2,0x22,0x25,0x57,0xb6,0xc0,0x80c9,2,0x22,0x8025,2,0xa8,2,0x22,0x25, +0x57,0xa7,0xb6,0xc0,0x80c9,2,0x22,0x54,0x79,0x7b,0xa7,0xb6,0xb7,0x80c2,2,0x8022, +2,0x25,0x80c0,2,0xc0,2,0x80b6,2,0xc5,4,0xa,0xf,0x10,0x15,0x19,0x1a, +0x1f,0x23,0x24,0x89,0x97,0x809e,4,0xa,0xf,0x10,0x15,0x19,0x1a,0x1f,0x23,0x24, +0x89,0x809e,4,0xa,0xf,0x10,0x15,0x1a,0x1f,0x21,0x23,0x24,0x3a,0x89,0x91,0x99, +0x9e,0xa0,0xaf,0xb2,0xb3,0xbb,0x80cc,4,0xa,0xf,0x10,0x15,0x1a,0x1f,0x21,0x23, +0x24,0x30,0x3a,0x89,0x91,0x99,0x9e,0xa0,0xaf,0xb2,0xb3,0xbb,0xca,0x80cc,0xa,0x78, +0xa0,0x80b2,0xa,0x10e,4,0x3a,0x8076,4,0x114,0x10,0x80a4,0x10,0x119,0xf,0x809d,0xf, +0x11d,0x23,0x8089,0x23,0x121,0x15,0xbb,0x80cf,0x15,0x125,0x1c,0x34,0x8076,0x1c,0x12a,0xc, +0x19,0x8038,0x8020,0x2a,0x2b,0x2c,0x802d,0x1b,0x805a,0x800a,4,0xa,0x15,0x8089,4,0x800a, +0xa,0x8097,0xa,0x15,0x1a,0x1f,0x23,0x8024,0xa,0x80bb,4,0xa,0x15,0x1a,0x1f,0x21, +0x24,0x89,0x9e,0xbb,0x80cf,0xa,0x8089,0xa,0x15,0x89,0x80cf,0x8004,8,0x19,0x8022,0x19, +0x1b,0x805a,2,0x80a7,0xc,0x38,0x4c,0x58,0x68,0x806b,0xe,0x4c,0x56,0x8068,0xa,0x19, +0x8089,7,0x8019,0x58,0x8075,0xc,0x4c,0x68,0x6c,0x75,0x78,0x807e,2,0x4c,0x80a7,0x11, +0x809a,5,0x11,0x12,0x14,0x16,0x8029,5,0x11,0x12,0x14,0x16,0x1b,0x8029,5,0x11, +0x12,0x14,0x16,0x1b,0x29,0x805a,5,0x11,0x12,0x14,0x8016,0x8011,5,0x11,0x12,0x14, +0x16,0x1b,0x27,0x8029,5,0x11,0x12,0x14,0x16,0x1b,0x27,0x29,0x8083,5,0x8011,0x11, 0x14,0x8016,0x11,0x8019,0xa,0xf,0x10,0x15,0x1a,0x78,0x91,0x97,0x99,0x9d,0x9e,0xa0, -0xa3,0xb2,0x80bb,0xa,0xf,0x10,0x15,0x78,0x91,0x97,0x99,0x9d,0x9e,0xa0,0xa3,0xb2, -0x80bb,0xa,0xf,0x10,0x78,0x91,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xf,0x10,0x78, -0x91,0x97,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xa3,0xa,0x8023,0xa,0x10a,0x19,0x1c, -0x804f,0x37,0x804e,2,0x8057,2,0x8025,2,0x115,0x2f,0x31,0x8053,0x2f,0x31,0x80c1,0x2f, -0x8031,2,0x8007,0x79,0x80c2,0x79,0x123,0x89,0x87,0x8087}; +0xa3,0xb2,0xbb,0x80cf,0xa,0xf,0x10,0x15,0x78,0x91,0x97,0x99,0x9d,0x9e,0xa0,0xa3, +0xb2,0xbb,0x80cf,0xa,0xf,0x10,0x78,0x91,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xf, +0x10,0x78,0x91,0x97,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,4,0xa,0x80cf,0xa,0x1ea,0xa, +0x8023,0xa,0x1ef,0x19,0x1c,0x804f,0x37,0x804e,2,0x8057,2,0x8025,2,0x1fa,0x2f,0x31, +0x8053,0x2f,0x31,0x80c1,0x2f,0x8031,2,0x8007,0x79,0x80c2,0x79,0x208,0x89,0x121}; + +static const uint16_t block_trieIndex[817]={ +0,0x40,0x80,0xc0,0x100,0x140,0x180,0x1c0,0x200,0x240,0x280,0x2c0,0x300,0x340,0x340,0x340, +0x340,0x340,0x340,0x364,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384, +0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x3c4,0x3fb,0x43b,0x47b,0x47b,0x47b,0x47b,0x47b, +0x47b,0x47b,0x47b,0x47b,0x47b,0x480,0x4c0,0x500,0x540,0x540,0x540,0x540,0x540,0x540,0x570,0x5a5, +0x2df,0x2f9,0x2f9,0x309,0x329,0,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80,0x90,0xa0, +0xb0,0xc0,0xd0,0xe0,0xf0,0x100,0x110,0x120,0x130,0x140,0x150,0x160,0x170,0x180,0x190,0x1a0, +0x1b0,0x1c0,0x1d0,0x1e0,0x1f0,0x200,0x210,0x220,0x230,0x240,0x250,0x260,0x270,0x280,0x290,0x2a0, +0x2b0,0x2c0,0x2d0,0x2e0,0x2f0,0x300,0x310,0x320,0x330,0x340,0x350,0x360,0x370,0x340,0x350,0x360, +0x370,0x340,0x350,0x360,0x370,0x364,0x374,0x384,0x394,0x384,0x394,0x3a4,0x3b4,0x384,0x394,0x3a4, +0x3b4,0x384,0x394,0x3a4,0x3b4,0x384,0x394,0x3a4,0x3b4,0x384,0x394,0x3a4,0x3b4,0x384,0x394,0x3a4, +0x3b4,0x384,0x394,0x3a4,0x3b4,0x384,0x394,0x3a4,0x3b4,0x3c4,0x3d4,0x3e4,0x3f4,0x3fb,0x40b,0x41b, +0x42b,0x43b,0x44b,0x45b,0x46b,0x47b,0x48b,0x49b,0x4ab,0x47b,0x48b,0x49b,0x4ab,0x47b,0x48b,0x49b, +0x4ab,0x47b,0x48b,0x49b,0x4ab,0x47b,0x48b,0x49b,0x4ab,0x480,0x490,0x4a0,0x4b0,0x4c0,0x4d0,0x4e0, +0x4f0,0x500,0x510,0x520,0x530,0x540,0x550,0x560,0x570,0x540,0x550,0x560,0x570,0x540,0x550,0x560, +0x570,0x540,0x550,0x560,0x570,0x540,0x550,0x560,0x570,0x540,0x550,0x560,0x570,0x570,0x580,0x590, +0x5a0,0x5a5,0x5b5,0x5c5,0x5d5,0x5e5,0x5f5,0x605,0x615,0x625,0x635,0x645,0x64d,0x65d,0x66d,0x67d, +0x68d,0x69d,0x6ad,0x6b7,0x6c7,0x6d7,0x6e7,0x6f7,0x707,0x717,0x725,0x735,0x745,0x755,0x765,0x775, +0x785,0x795,0x7a5,0x7b0,0x7c0,0x7d0,0x7d0,0x7d0,0x7d0,0x7e0,0x7eb,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0, +0x7f0,0x7f0,0x7f0,0x7f0,0x7f7,0x807,0x807,0x807,0x807,0x814,0x81a,0x81a,0x81a,0x81a,0x81a,0x81a, +0x81a,0x81a,0x81a,0x81a,0x81a,0x82a,0x82a,0x832,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0, +0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0, +0x7f0,0x842,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x852,0x852,0x85e,0x86e,0x7f0,0x87a,0x886,0x896, +0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6,0x8a6, +0x8b6,0x8b6,0x8b6,0x8c6,0x8c6,0x8d6,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0, +0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x8de,0x8ee,0x8fe,0x905,0x7f0,0x7f0,0x7f0,0x7f0, +0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x915,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0, +0x7f0,0x7f0,0x925,0x925,0x929,0x939,0x949,0x959,0x969,0x979,0x989,0x989,0x989,0x989,0x999,0x999, +0x99e,0x7f0,0x7f0,0x7f0,0x7f0,0x9ae,0x9be,0x9ce,0x9d5,0x7f0,0x9e5,0x9f5,0x7f0,0xa05,0xa15,0xa25, +0x7f0,0x7f0,0xa2e,0xa3e,0xa4e,0x7f0,0xa5e,0xa6e,0xa7e,0xa8e,0xa8e,0xa8e,0xa9e,0xaae,0xabe,0xace, +0xade,0xaee,0x7f0,0x7f0,0x7f0,0x7f0,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe, +0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe, +0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xb00,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10, +0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb1c,0xb2a,0xb2c,0xb2c,0xb2c,0xb2c,0xb2c,0xb2c,0xb2c, +0xb2c,0xb2c,0xb2c,0xb2c,0xb2c,0xb2c,0xb2c,0xb31,0xb3c,0xb3c,0xb3c,0xb3c,0xb3c,0xb3c,0xb3c,0xb3c, +0xb3c,0xb3c,0xb3c,0xb3c,0xb3c,0xb3c,0xb3c,0xb3c,0xb3c,0xb3d,0xb4c,0xb4c,0xb56,0x7f0,0x7f0,0x7f0, +0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0xb66,0xb66,0xb74,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0xb84,0xb84, +0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84,0xb84, +0xb84,0xb8f,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb94,0xb99,0x7f0, +0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0, +0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0xba9, +0xbb9,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0, +0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0x7f0,0xbc9, +0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9, +0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbc9,0xbd9, +0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, +0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0x45, +0x65,0x79,0x89,0x89,0xa9,0xb5,0xd5,0xf5,0x115,0x131,0x150,0x168,0x179,0x196,0x1b6,0x1d6, +0x1d6,0x1d6,0x1d6,0x1d6,0x1f0,0x209,0x21e,0x23e,0x25b,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f, +0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f, +0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f,0x27f,0x25f,0x25f,0x25f,0x25f,0x25f,0x25f, +0x25f,0x29f,0x29f,0x29f,0x29f,0x29f,0x29f,0x29f,0x29f,0x2bf,0x2bf,0x2bf,0x2bf,0x2bf,0x2bf,0x2bf, +0x2bf +}; + +static const uint16_t block_trieData[3051]={ +1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2, +3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4, +4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6, +7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8, +9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, +0x61,0x61,0x61,0xa,0xa,0xa,0xa,0xa,0xa,0xb,0xb,0xb,0xb,0xb,0xb,0xb, +0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc, +0xd,0xd,0xd,0xd,0xd,0x80,0x80,0x80,0xe,0xe,0xe,0xe,0x92,0x92,0x92,0x92, +0xac,0xac,0xac,0xac,0xc6,0xc6,0x117,0x135,0x135,0x135,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2, +0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, +0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, +0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d, +0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, +0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f, +0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x86,0x86,0x20,0x20,0x20,0x20,0x20,0x20, +0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, +0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, +0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22,0x22,0x23,0x23,0x23,0x23,0x23,0x23, +0x62,0x62,0x63,0x63,0x64,0x64,0x65,0x65,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, +0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0xad,0xad,0xad,0xad,0xad, +0x6f,0x6f,0x6f,0x6f,0x6f,0x70,0x70,0x70,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x71,0x71, +0x81,0x81,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xe0,0xe0,0xe0,0xe0,0xe0, +0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x9b,0x9b,0x9b,0x9b,0xc7,0xc7,0xc7,0xc7, +0x9c,0x9c,0x9c,0x9c,0x9c,0x9d,0x9d,0x9d,0x109,0x11b,0x11b,0x11b,0xdb,0xaf,0xaf,0xaf, +0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x8d,0x8d,0x8d,0x8d,0x83,0x83,0x83,0x83, +0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26, +0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27, +0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x29,0x29,0x29,0x2a,0x2a,0x2a,0x2b,0x2b,0x2b, +0x2c,0x2c,0x2c,0x2c,0x2c,0x2d,0x2d,0x2d,0x2d,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e, +0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f, +0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, +0x31,0x31,0x31,0x31,0x32,0x32,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, +0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x35,0x35,0x36,0x36,0x36,0x36,0x36,0x36, +0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37, +0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x66,0x66,0x66,0x67, +0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, +0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69, +0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a, +0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73, +0x88,0x88,0x88,0x88,0x88,0x88,0x94,0x94,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, +0x87,0x87,0x87,0x90,0x90,0x90,0x90,0x90,0x85,0x85,0x85,0x85,0x85,0x85,0x9e,0x9e, +0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a, +0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0,0x3c, +0x3d,0x3d,0x3d,0x3d,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, +0x40,0x40,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x42,0x43,0x43,0x82,0x82,0x82,0x6b, +0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, +0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45, +0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46, +0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46, +0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46, +0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46, +0x74,0x74,0x74,0x74,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, +0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, +0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, +0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, +0x47,0x47,0x47,0x47,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48, +0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48, +0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48, +0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48, +0x48,0x48,0x48,0x48,0x49,0x49,0x49,0x49,0xb0,0xb0,0xb0,0x9f,0x9f,0x9f,0x9f,0x9f, +0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0xa0, +0xa0,0xa0,0xa0,0xa0,0xa0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x8a,0x8a,0x95,0x95,0x95, +0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x8f,0x8f,0x8f,0xb2,0x96, +0x96,0x96,0x96,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xb3,0xb3,0xa2,0xa2,0xa2,0xa3,0xa3, +0xa3,0xb4,0xb4,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xee,0xee,0xa4,0xa4,0xa4,0xa4,0xa4, +0xa4,0xb6,0xb6,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xd5,0xd5,0xc8,0xc8,0xc8,0xe7,0xe7, +0xe7,0xe7,0xff,0xff,0xff,0xff,0xff,0xb8,0xb8,0xb8,0xb8,0x4a,0x4a,0x4a,0x4a,0x4a, +0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, +0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, +0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, +0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0xb9,0xb9,0xb9,0xb9,0xb9, +0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b, +0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b, +0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b, +0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, +0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, +0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, +0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, +0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, +0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f, +0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f, +0x50,0x50,0x50,0x50,0x50,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51, +0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51, +0x51,0x51,0x51,0x51,0x51,0x6c,0x91,0x52,0x53,0x53,0x54,0x54,0x55,0x55,0x55,0x55, +0x55,0x55,0x55,0x55,0x55,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57, +0x57,0x57,0x57,0x57,0x56,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x76,0x76,0x76, +0x76,0x76,0x76,0x76,0x76,0x77,0x77,0x77,0x77,0x7f,0x7f,0x7f,0x7f,0x7f,0xa5,0xa5, +0xa5,0xa5,0xa6,0xa6,0xa6,0,0,0,0,0,0,0,0,0xa7,0xa7,0xa8, +0xa8,0xa8,0xa8,0xdf,0xdf,0x58,0x58,0x58,0x59,0x59,0xf1,0xf1,0xf1,0x78,0x78,0x8c, +0x8c,0x8c,0x8c,0,0,0x5a,0x5a,0x5a,0x5a,0x5a,0x79,0x79,0x79,0x7a,0x7a,0x7a, +0x10f,0x10f,0x10f,0x10f,0x10f,0xe2,0xe2,0xe2,0xde,0xde,0xde,0xde,0x13f,0x13f,0x13f,0x13f, +0x13f,0x151,0x151,0x151,0x151,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8, +0xe8,0xe8,0xe8,0xe8,0xe8,0x139,0x139,0x139,0x139,0,0,0,0,0x7b,0x7b,0x7b, +0x7b,0xba,0xba,0xf4,0xf4,0xef,0xef,0xef,0,0,0,0x102,0x102,0x97,0x97,0xa9, +0xa9,0,0,0,0,0xd7,0xd7,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0x89,0x89,0x89, +0x89,0x89,0x89,0xbb,0xbb,0xf0,0xf0,0,0,0xea,0xea,0xea,0xea,0xbc,0xbc,0xbc, +0xbc,0xbd,0xbd,0xbe,0xbe,0xf6,0xf6,0xf6,0,0,0,0,0,0xbf,0xbf,0xbf, +0xbf,0xbf,0,0,0,0x104,0x104,0x104,0x104,0x104,0x104,0x104,0x104,0x11d,0x11d,0x11d, +0x11d,0x14a,0x14a,0x14a,0x14a,0x14a,0,0,0,0,0,0,0,0xc0,0xc0,0x134, +0x134,0x134,0x134,0x141,0x141,0x141,0x141,0x122,0x122,0x122,0x123,0x123,0x123,0x123,0x13b,0x13b, +0x13b,0x13b,0x12d,0x12d,0x12d,0x125,0x125,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc1, +0xc1,0xc1,0xc1,0xc1,0xda,0xda,0xda,0xd4,0xd4,0xd4,0xd4,0xd4,0xe9,0xe9,0xe9,0xd9, +0xd9,0xd9,0xd9,0xd9,0xd9,0xf9,0xf9,0xe5,0xe5,0xe5,0xe5,0xe5,0,0,0,0x103, +0x103,0x103,0xe6,0xe6,0xe6,0xe6,0xe6,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0x152, +0x152,0x152,0x152,0x152,0x152,0x152,0x152,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0xfb, +0xfb,0xfb,0xfb,0xfb,0xfb,0,0,0,0,0,0,0,0,0xf8,0xf8,0xf8, +0xf8,0xf8,0xf8,0xf8,0xf8,0xec,0xec,0xec,0xec,0xec,0xec,0x10d,0x10d,0xdc,0xdc,0xdc, +0xdc,0xdc,0x14d,0x14d,0x14d,0xfd,0xfd,0xfd,0xfd,0xfd,0,0,0,0,0,0, +0,0,0,0,0,0x11a,0x11a,0x11a,0x11a,0x11a,0,0,0,0,0,0xfc, +0xfc,0xfc,0xfc,0xfc,0xfc,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0,0,0,0,0x126, +0x126,0x126,0x126,0x126,0x126,0x118,0x118,0x118,0x118,0x118,0x116,0x116,0x116,0x116,0x116,0x116, +0x13e,0xf5,0xf5,0xf5,0xf5,0x144,0x144,0x144,0x144,0x144,0x144,0,0,0,0,0, +0,0x14f,0x14f,0x14f,0x14f,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x10c,0x10c,0x10c,0x10c, +0x10c,0,0,0,0,0x114,0x114,0x114,0x114,0x114,0x114,0x11c,0x11c,0x11c,0x11c,0x11c, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x11f,0x11f, +0x146,0x146,0x146,0x146,0x146,0x146,0,0,0,0,0,0x131,0x12b,0x12b,0x12b,0x12b, +0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98, +0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x101,0x101,0x101,0x101,0x101,0x101,0x101,0x101, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x136,0x136,0x136,0x136,0x136,0x136,0x136,0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0xc2, +0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0x124,0x124,0x124,0x149,0x149,0x149,0x149,0x149,0x149, +0x149,0x149,0x149,0x149,0x149,0x149,0x149,0x149,0x149,0x149,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe, +0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0,0,0,0,0,0, +0,0,0x14b,0x14b,0x14b,0x14b,0,0,0,0,0,0,0,0,0,0, +0,0,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca, +0xca,0xca,0xed,0xed,0xed,0x13c,0x13c,0x13c,0x13c,0x13c,0x13c,0xdd,0xdd,0xdd,0xf3,0xf3, +0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0,0,0,0,0,0,0,0x14c,0x14c, +0x14c,0x14c,0,0,0,0,0,0,0,0,0x121,0x121,0x121,0x121,0x121,0x121, +0,0,0,0,0,0,0xd8,0xd8,0xd8,0xd8,0xd8,0xd8,0xd8,0xd8,0xd8,0xd8, +0,0,0,0,0x10b,0x10b,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110, +0x110,0x110,0x110,0x110,0x110,0x110,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111, +0x111,0x111,0x111,0x111,0x111,0x111,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130, +0x130,0x130,0x130,0x130,0x130,0x130,0x133,0x133,0x133,0x133,0x133,0x133,0x133,0x133,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x138,0xcb,0xcb, +0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0x113,0x113, +0x113,0x129,0x129,0x129,0x129,0x115,0x115,0x115,0x115,0x115,0x115,0x115,0x115,0x115,0x115,0x115, +0x115,0x115,0x115,0x115,0x115,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xf7, +0,0,0,0,0,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150, +0x150,0x150,0x150,0x150,0x150,0,0,0,0,0x140,0x140,0x140,0x140,0x140,0x140,0x140, +0x140,0x140,0x140,0x140,0x140,0x140,0,0,0,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b, +0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c, +0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x7e,0x7e,0x7e,0x7e,0x7e,0,0, +0,0,0,0,0,0x145,0x145,0x120,0x120,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x9a, +0x9a,0,0,0,0,0,0,0,0,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d, +0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x106,0x106,0x106,0x106,0x106,0x106,0x106, +0x106,0x106,0x106,0x106,0x106,0x106,0x106,0x106,0x106,0,0,0,0,0,0x13a,0x13a, +0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x13a,0x10a,0x10a, +0x10a,0x143,0x143,0x143,0x143,0x143,0x143,0,0,0,0,0,0,0,0x127,0x127, +0x127,0x127,0x127,0,0,0,0,0,0,0,0,0,0,0,0x13d,0x13d, +0x13d,0x12c,0x12c,0x12c,0x12c,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x147,0x147,0x147,0,0,0,0,0,0,0,0,0,0,0, +0,0,0x14e,0x14e,0x14e,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0x137,0x137,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb,0xeb, +0xeb,0xeb,0xeb,0,0,0x107,0x107,0x107,0x107,0x107,0x107,0,0,0,0,0, +0,0,0,0,0,0x11e,0x11e,0x11e,0x11e,0x11e,0,0,0,0,0x128,0x128, +0x128,0x128,0x128,0,0,0,0,0,0,0,0,0,0,0,0xd3,0xd3, +0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xaa,0xaa, +0xaa,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xc3,0xc3, +0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc4,0xc4, +0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xcd,0xcd, +0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xce,0xce, +0xce,0xce,0xce,0xf2,0xf2,0xf2,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xd0,0xd0, +0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xe3,0xe3,0xe3,0xe3,0xe3,0xe3,0xe3,0xe3,0xfa,0xfa, +0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0xfa,0x105,0x105, +0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x119,0x119, +0x119,0x119,0x119,0x119,0x119,0x12a,0x12a,0x12a,0x12a,0x12a,0x12a,0x12a,0x12a,0x12a,0x132,0x132, +0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x5e,0x5e, +0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0,0, +0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5, +0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0x100,0x100,0x100,0x100, +0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x112,0x112,0x112,0x112, +0x112,0x112,0x112,0x112,0x112,0x112,0x112,0x112,0x112,0x112,0x112,0x112,0x148,0x148,0x148,0x148, +0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0,0,0,0, +0,0,0,0,0,0,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, +0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0x12e,0x12e,0x12e,0x12e,0x12e,0x12e,0x12e,0x12e,0x12e,0x12e,0x12e,0x12e, +0x12e,0x12e,0x12e,0x12e,0x142,0x142,0x142,0x142,0x142,0x142,0x142,0x142,0x142,0x142,0x142,0x142, +0x142,0x142,0x142,0x142,0,0,0,0,0,0x60,0x60,0x60,0x60,0x60,0x60,0x60, +0x60,0,0,0,0,0,0,0,0,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d, +0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d, +0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, +0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0,0 +}; + +static const UCPTrie block_trie={ + block_trieIndex, + { block_trieData }, + 817, 3051, + 0x11000, 0x11, + 1, 0, + 0, 0, + 0x25f, 0x7f0, + 0x0, +}; -static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2d4e,0x2d4e,0x2d4e,0x2d4e,0x6d5a,3,0x8aa3,0x8b38,0x8b38,0x8b38,0xb48c8,0x2f75a31,0,0,0,0}; +static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2e8e,0x2e8e,0x2e8e,0x2e8e,0x6db4,3,0x86ce,0x87d5,0x8f67,0x8f67,0x50cf,0x2f75a31,0x152,0,0,0}; #endif // INCLUDED_FROM_UCHAR_C diff --git a/deps/icu-small/source/common/ucharstrie.cpp b/deps/icu-small/source/common/ucharstrie.cpp index ba9cea7ba39025..4c48323c91766e 100644 --- a/deps/icu-small/source/common/ucharstrie.cpp +++ b/deps/icu-small/source/common/ucharstrie.cpp @@ -297,7 +297,7 @@ UCharsTrie::findUniqueValueFromBranch(const char16_t *pos, int32_t length, ++pos; // ignore a comparison unit // handle its value int32_t node=*pos++; - UBool isFinal=(UBool)(node>>15); + UBool isFinal = static_cast<UBool>(node >> 15); node&=0x7fff; int32_t value=readValue(pos, node); pos=skipValue(pos, node); @@ -339,7 +339,7 @@ UCharsTrie::findUniqueValue(const char16_t *pos, UBool haveUniqueValue, int32_t pos+=node-kMinLinearMatch+1; // Ignore the match units. node=*pos++; } else { - UBool isFinal=(UBool)(node>>15); + UBool isFinal = static_cast<UBool>(node >> 15); int32_t value; if(isFinal) { value=readValue(pos, node&0x7fff); diff --git a/deps/icu-small/source/common/ucharstriebuilder.cpp b/deps/icu-small/source/common/ucharstriebuilder.cpp index 95b32711a8e2e7..bf3216bd1bc0b1 100644 --- a/deps/icu-small/source/common/ucharstriebuilder.cpp +++ b/deps/icu-small/source/common/ucharstriebuilder.cpp @@ -75,7 +75,7 @@ UCharsTrieElement::setTo(const UnicodeString &s, int32_t val, return; } stringOffset=strings.length(); - strings.append((char16_t)length); + strings.append(static_cast<char16_t>(length)); value=val; strings.append(s); } @@ -186,7 +186,7 @@ UCharsTrieBuilder::buildUChars(UStringTrieBuildOption buildOption, UErrorCode &e errorCode=U_MEMORY_ALLOCATION_ERROR; return; } - uprv_sortArray(elements, elementsLength, (int32_t)sizeof(UCharsTrieElement), + uprv_sortArray(elements, elementsLength, static_cast<int32_t>(sizeof(UCharsTrieElement)), compareElementStrings, &strings, false, // need not be a stable sort &errorCode); @@ -351,7 +351,7 @@ UCharsTrieBuilder::write(int32_t unit) { int32_t newLength=ucharsLength+1; if(ensureCapacity(newLength)) { ucharsLength=newLength; - uchars[ucharsCapacity-ucharsLength]=(char16_t)unit; + uchars[ucharsCapacity - ucharsLength] = static_cast<char16_t>(unit); } return ucharsLength; } @@ -379,19 +379,19 @@ UCharsTrieBuilder::writeValueAndFinal(int32_t i, UBool isFinal) { char16_t intUnits[3]; int32_t length; if(i<0 || i>UCharsTrie::kMaxTwoUnitValue) { - intUnits[0]=(char16_t)(UCharsTrie::kThreeUnitValueLead); - intUnits[1]=(char16_t)((uint32_t)i>>16); - intUnits[2]=(char16_t)i; + intUnits[0] = static_cast<char16_t>(UCharsTrie::kThreeUnitValueLead); + intUnits[1] = static_cast<char16_t>(static_cast<uint32_t>(i) >> 16); + intUnits[2] = static_cast<char16_t>(i); length=3; // } else if(i<=UCharsTrie::kMaxOneUnitValue) { // intUnits[0]=(char16_t)(i); // length=1; } else { - intUnits[0]=(char16_t)(UCharsTrie::kMinTwoUnitValueLead+(i>>16)); - intUnits[1]=(char16_t)i; + intUnits[0] = static_cast<char16_t>(UCharsTrie::kMinTwoUnitValueLead + (i >> 16)); + intUnits[1] = static_cast<char16_t>(i); length=2; } - intUnits[0]=(char16_t)(intUnits[0]|(isFinal<<15)); + intUnits[0] = static_cast<char16_t>(intUnits[0] | (isFinal << 15)); return write(intUnits, length); } @@ -403,19 +403,19 @@ UCharsTrieBuilder::writeValueAndType(UBool hasValue, int32_t value, int32_t node char16_t intUnits[3]; int32_t length; if(value<0 || value>UCharsTrie::kMaxTwoUnitNodeValue) { - intUnits[0]=(char16_t)(UCharsTrie::kThreeUnitNodeValueLead); - intUnits[1]=(char16_t)((uint32_t)value>>16); - intUnits[2]=(char16_t)value; + intUnits[0] = static_cast<char16_t>(UCharsTrie::kThreeUnitNodeValueLead); + intUnits[1] = static_cast<char16_t>(static_cast<uint32_t>(value) >> 16); + intUnits[2] = static_cast<char16_t>(value); length=3; } else if(value<=UCharsTrie::kMaxOneUnitNodeValue) { - intUnits[0]=(char16_t)((value+1)<<6); + intUnits[0] = static_cast<char16_t>((value + 1) << 6); length=1; } else { - intUnits[0]=(char16_t)(UCharsTrie::kMinTwoUnitNodeValueLead+((value>>10)&0x7fc0)); - intUnits[1]=(char16_t)value; + intUnits[0] = static_cast<char16_t>(UCharsTrie::kMinTwoUnitNodeValueLead + ((value >> 10) & 0x7fc0)); + intUnits[1] = static_cast<char16_t>(value); length=2; } - intUnits[0]|=(char16_t)node; + intUnits[0] |= static_cast<char16_t>(node); return write(intUnits, length); } @@ -429,14 +429,14 @@ UCharsTrieBuilder::writeDeltaTo(int32_t jumpTarget) { char16_t intUnits[3]; int32_t length; if(i<=UCharsTrie::kMaxTwoUnitDelta) { - intUnits[0]=(char16_t)(UCharsTrie::kMinTwoUnitDeltaLead+(i>>16)); + intUnits[0] = static_cast<char16_t>(UCharsTrie::kMinTwoUnitDeltaLead + (i >> 16)); length=1; } else { - intUnits[0]=(char16_t)(UCharsTrie::kThreeUnitDeltaLead); - intUnits[1]=(char16_t)(i>>16); + intUnits[0] = static_cast<char16_t>(UCharsTrie::kThreeUnitDeltaLead); + intUnits[1] = static_cast<char16_t>(i >> 16); length=2; } - intUnits[length++]=(char16_t)i; + intUnits[length++] = static_cast<char16_t>(i); return write(intUnits, length); } diff --git a/deps/icu-small/source/common/ucharstrieiterator.cpp b/deps/icu-small/source/common/ucharstrieiterator.cpp index 176aed68259cb5..8a212b8b36daad 100644 --- a/deps/icu-small/source/common/ucharstrieiterator.cpp +++ b/deps/icu-small/source/common/ucharstrieiterator.cpp @@ -114,7 +114,7 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) { pos=uchars_+stack_->elementAti(stackSize-2); stack_->setSize(stackSize-2); str_.truncate(length&0xffff); - length=(int32_t)((uint32_t)length>>16); + length = static_cast<int32_t>(static_cast<uint32_t>(length) >> 16); if(length>1) { pos=branchNext(pos, length, errorCode); if(pos==nullptr) { @@ -138,7 +138,7 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) { skipValue_=false; } else { // Deliver value for the string so far. - UBool isFinal=(UBool)(node>>15); + UBool isFinal = static_cast<UBool>(node >> 15); if(isFinal) { value_=readValue(pos, node&0x7fff); } else { @@ -187,7 +187,7 @@ UCharsTrie::Iterator::branchNext(const char16_t *pos, int32_t length, UErrorCode while(length>kMaxBranchLinearSubNodeLength) { ++pos; // ignore the comparison unit // Push state for the greater-or-equal edge. - stack_->addElement((int32_t)(skipDelta(pos)-uchars_), errorCode); + stack_->addElement(static_cast<int32_t>(skipDelta(pos) - uchars_), errorCode); stack_->addElement(((length-(length>>1))<<16)|str_.length(), errorCode); // Follow the less-than edge. length>>=1; @@ -197,10 +197,10 @@ UCharsTrie::Iterator::branchNext(const char16_t *pos, int32_t length, UErrorCode // Read the first (key, value) pair. char16_t trieUnit=*pos++; int32_t node=*pos++; - UBool isFinal=(UBool)(node>>15); + UBool isFinal = static_cast<UBool>(node >> 15); int32_t value=readValue(pos, node&=0x7fff); pos=skipValue(pos, node); - stack_->addElement((int32_t)(pos-uchars_), errorCode); + stack_->addElement(static_cast<int32_t>(pos - uchars_), errorCode); stack_->addElement(((length-1)<<16)|str_.length(), errorCode); str_.append(trieUnit); if(isFinal) { diff --git a/deps/icu-small/source/common/uchriter.cpp b/deps/icu-small/source/common/uchriter.cpp index c8b86e5d4df3f5..903eb46c3b34d9 100644 --- a/deps/icu-small/source/common/uchriter.cpp +++ b/deps/icu-small/source/common/uchriter.cpp @@ -172,7 +172,7 @@ UCharCharacterIterator::nextPostInc() { UBool UCharCharacterIterator::hasNext() { - return (UBool)(pos < end ? true : false); + return pos < end; } char16_t @@ -186,7 +186,7 @@ UCharCharacterIterator::previous() { UBool UCharCharacterIterator::hasPrevious() { - return (UBool)(pos > begin ? true : false); + return pos > begin; } UChar32 diff --git a/deps/icu-small/source/common/ucmndata.cpp b/deps/icu-small/source/common/ucmndata.cpp index 69575d4e830a16..45717ffd712a33 100644 --- a/deps/icu-small/source/common/ucmndata.cpp +++ b/deps/icu-small/source/common/ucmndata.cpp @@ -108,8 +108,8 @@ strcmpAfterPrefix(const char *s1, const char *s2, int32_t *pPrefixLength) { s1+=pl; s2+=pl; for(;;) { - int32_t c1=(uint8_t)*s1++; - int32_t c2=(uint8_t)*s2++; + int32_t c1 = static_cast<uint8_t>(*s1++); + int32_t c2 = static_cast<uint8_t>(*s2++); cmp=c1-c2; if(cmp!=0 || c1==0) { /* different or done */ break; @@ -271,7 +271,7 @@ offsetTOCLookupFn(const UDataMemory *pData, static uint32_t U_CALLCONV pointerTOCEntryCount(const UDataMemory *pData) { const PointerTOC *toc = (PointerTOC *)pData->toc; - return (uint32_t)((toc != nullptr) ? (toc->count) : 0); + return toc != nullptr ? toc->count : 0; } static const DataHeader * U_CALLCONV pointerTOCLookupFn(const UDataMemory *pData, diff --git a/deps/icu-small/source/common/ucnv.cpp b/deps/icu-small/source/common/ucnv.cpp index 34a5a203d09dfb..c66200b793231b 100644 --- a/deps/icu-small/source/common/ucnv.cpp +++ b/deps/icu-small/source/common/ucnv.cpp @@ -916,7 +916,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { * s<sourceLimit before converterSawEndOfInput is checked */ converterSawEndOfInput= - (UBool)(U_SUCCESS(*err) && + static_cast<UBool>(U_SUCCESS(*err) && pArgs->flush && pArgs->source==pArgs->sourceLimit && cnv->fromUChar32==0); } else { @@ -941,7 +941,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { for(;;) { /* update offsets if we write any */ if(offsets!=nullptr) { - int32_t length=(int32_t)(pArgs->target-t); + int32_t length = static_cast<int32_t>(pArgs->target - t); if(length>0) { _updateOffsets(offsets, length, sourceIndex, errorInputLength); @@ -956,7 +956,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { } if(sourceIndex>=0) { - sourceIndex+=(int32_t)(pArgs->source-s); + sourceIndex += static_cast<int32_t>(pArgs->source - s); } } @@ -1066,10 +1066,10 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { U_ASSERT(cnv->preFromULength==0); - length=(int32_t)(pArgs->sourceLimit-pArgs->source); + length = static_cast<int32_t>(pArgs->sourceLimit - pArgs->source); if(length>0) { u_memcpy(cnv->preFromU, pArgs->source, length); - cnv->preFromULength=(int8_t)-length; + cnv->preFromULength = static_cast<int8_t>(-length); } pArgs->source=realSource; @@ -1089,7 +1089,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { codePoint=cnv->fromUChar32; errorInputLength=0; U16_APPEND_UNSAFE(cnv->invalidUCharBuffer, errorInputLength, codePoint); - cnv->invalidUCharLength=(int8_t)errorInputLength; + cnv->invalidUCharLength = static_cast<int8_t>(errorInputLength); /* set the converter state to deal with the next character */ cnv->fromUChar32=0; @@ -1134,7 +1134,7 @@ ucnv_outputOverflowFromUnicode(UConverter *cnv, offsets=nullptr; } - overflow=(char *)cnv->charErrorBuffer; + overflow = reinterpret_cast<char*>(cnv->charErrorBuffer); length=cnv->charErrorBufferLength; i=0; while(i<length) { @@ -1146,7 +1146,7 @@ ucnv_outputOverflowFromUnicode(UConverter *cnv, overflow[j++]=overflow[i++]; } while(i<length); - cnv->charErrorBufferLength=(int8_t)j; + cnv->charErrorBufferLength = static_cast<int8_t>(j); *target=t; if(offsets!=nullptr) { *pOffsets=offsets; @@ -1361,7 +1361,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { * s<sourceLimit before converterSawEndOfInput is checked */ converterSawEndOfInput= - (UBool)(U_SUCCESS(*err) && + static_cast<UBool>(U_SUCCESS(*err) && pArgs->flush && pArgs->source==pArgs->sourceLimit && cnv->toULength==0); } else { @@ -1386,7 +1386,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { for(;;) { /* update offsets if we write any */ if(offsets!=nullptr) { - int32_t length=(int32_t)(pArgs->target-t); + int32_t length = static_cast<int32_t>(pArgs->target - t); if(length>0) { _updateOffsets(offsets, length, sourceIndex, errorInputLength); @@ -1401,7 +1401,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { } if(sourceIndex>=0) { - sourceIndex+=(int32_t)(pArgs->source-s); + sourceIndex += static_cast<int32_t>(pArgs->source - s); } } @@ -1513,10 +1513,10 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { U_ASSERT(cnv->preToULength==0); - length=(int32_t)(pArgs->sourceLimit-pArgs->source); + length = static_cast<int32_t>(pArgs->sourceLimit - pArgs->source); if(length>0) { uprv_memcpy(cnv->preToU, pArgs->source, length); - cnv->preToULength=(int8_t)-length; + cnv->preToULength = static_cast<int8_t>(-length); } pArgs->source=realSource; @@ -1592,7 +1592,7 @@ ucnv_outputOverflowToUnicode(UConverter *cnv, overflow[j++]=overflow[i++]; } while(i<length); - cnv->UCharErrorBufferLength=(int8_t)j; + cnv->UCharErrorBufferLength = static_cast<int8_t>(j); *target=t; if(offsets!=nullptr) { *pOffsets=offsets; @@ -2437,7 +2437,7 @@ ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter, false, true, pErrorCode); - targetLength=(int32_t)(myTarget-target); + targetLength = static_cast<int32_t>(myTarget - target); } /* @@ -2460,7 +2460,7 @@ ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter, false, true, pErrorCode); - targetLength+=(int32_t)(myTarget-targetBuffer); + targetLength += static_cast<int32_t>(myTarget - targetBuffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); /* done with preflighting, set warnings and errors as appropriate */ @@ -2684,7 +2684,7 @@ ucnv_fixFileSeparator(const UConverter *cnv, U_CAPI UBool U_EXPORT2 ucnv_isAmbiguous(const UConverter *cnv) { - return (UBool)(ucnv_getAmbiguous(cnv)!=nullptr); + return ucnv_getAmbiguous(cnv)!=nullptr; } U_CAPI void U_EXPORT2 diff --git a/deps/icu-small/source/common/ucnv2022.cpp b/deps/icu-small/source/common/ucnv2022.cpp index 5989c1b405a789..7572ce477afdaf 100644 --- a/deps/icu-small/source/common/ucnv2022.cpp +++ b/deps/icu-small/source/common/ucnv2022.cpp @@ -436,10 +436,10 @@ fromUWriteUInt8(UConverter *cnv, int32_t sourceIndex, UErrorCode *pErrorCode) { - char *targetChars = (char *)*target; + char* targetChars = reinterpret_cast<char*>(*target); ucnv_fromUWriteBytes(cnv, bytes, length, &targetChars, targetLimit, offsets, sourceIndex, pErrorCode); - *target = (uint8_t*)targetChars; + *target = reinterpret_cast<uint8_t*>(targetChars); } @@ -484,7 +484,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ if(cnv->extraInfo != nullptr) { UConverterNamePieces stackPieces; UConverterLoadArgs stackArgs=UCNV_LOAD_ARGS_INITIALIZER; - UConverterDataISO2022 *myConverterData=(UConverterDataISO2022 *) cnv->extraInfo; + UConverterDataISO2022* myConverterData = static_cast<UConverterDataISO2022*>(cnv->extraInfo); uint32_t version; stackArgs.onlyTestIsLoadable = pArgs->onlyTestIsLoadable; @@ -528,12 +528,12 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ } /* set the function pointers to appropriate functions */ - cnv->sharedData=(UConverterSharedData*)(&_ISO2022JPData); + cnv->sharedData = const_cast<UConverterSharedData*>(&_ISO2022JPData); uprv_strcpy(myConverterData->locale,"ja"); (void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=ja,version="); size_t len = uprv_strlen(myConverterData->name); - myConverterData->name[len]=(char)(myConverterData->version+(int)'0'); + myConverterData->name[len] = static_cast<char>(myConverterData->version + static_cast<int>('0')); myConverterData->name[len+1]='\0'; } #if !UCONFIG_ONLY_HTML_CONVERSION @@ -579,7 +579,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ setInitialStateFromUnicodeKR(cnv, myConverterData); /* set the function pointers to appropriate functions */ - cnv->sharedData=(UConverterSharedData*)&_ISO2022KRData; + cnv->sharedData = const_cast<UConverterSharedData*>(&_ISO2022KRData); uprv_strcpy(myConverterData->locale,"ko"); } } @@ -606,7 +606,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ /* set the function pointers to appropriate functions */ - cnv->sharedData=(UConverterSharedData*)&_ISO2022CNData; + cnv->sharedData = const_cast<UConverterSharedData*>(&_ISO2022CNData); uprv_strcpy(myConverterData->locale,"cn"); if (version==0){ @@ -655,7 +655,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ static void U_CALLCONV _ISO2022Close(UConverter *converter) { - UConverterDataISO2022* myData =(UConverterDataISO2022 *) (converter->extraInfo); + UConverterDataISO2022* myData = static_cast<UConverterDataISO2022*>(converter->extraInfo); UConverterSharedData **array = myData->myConverterArray; int32_t i; @@ -678,7 +678,7 @@ _ISO2022Close(UConverter *converter) { static void U_CALLCONV _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) { - UConverterDataISO2022 *myConverterData=(UConverterDataISO2022 *) (converter->extraInfo); + UConverterDataISO2022* myConverterData = static_cast<UConverterDataISO2022*>(converter->extraInfo); if(choice<=UCNV_RESET_TO_UNICODE) { uprv_memset(&myConverterData->toU2022State, 0, sizeof(ISO2022State)); myConverterData->key = 0; @@ -784,7 +784,7 @@ getKey_2022(char c,int32_t* key,int32_t* offset){ int32_t hi = MAX_STATES_2022; int32_t oldmid=0; - togo = normalize_esq_chars_2022[(uint8_t)c]; + togo = normalize_esq_chars_2022[static_cast<uint8_t>(c)]; if(togo == 0) { /* not a valid character anywhere in an escape sequence */ *key = 0; @@ -809,7 +809,7 @@ getKey_2022(char c,int32_t* key,int32_t* offset){ else /*we found it*/{ *key = togo; *offset = mid; - return (UCNV_TableStates_2022)escSeqStateTable_Value_2022[mid]; + return static_cast<UCNV_TableStates_2022>(escSeqStateTable_Value_2022[mid]); } oldmid = mid; @@ -829,7 +829,7 @@ changeState_2022(UConverter* _this, Variant2022 var, UErrorCode* err){ UCNV_TableStates_2022 value; - UConverterDataISO2022* myData2022 = ((UConverterDataISO2022*)_this->extraInfo); + UConverterDataISO2022* myData2022 = static_cast<UConverterDataISO2022*>(_this->extraInfo); uint32_t key = myData2022->key; int32_t offset = 0; int8_t initialToULength = _this->toULength; @@ -838,8 +838,8 @@ changeState_2022(UConverter* _this, value = VALID_NON_TERMINAL_2022; while (*source < sourceLimit) { c = *(*source)++; - _this->toUBytes[_this->toULength++]=(uint8_t)c; - value = getKey_2022(c,(int32_t *) &key, &offset); + _this->toUBytes[_this->toULength++] = static_cast<uint8_t>(c); + value = getKey_2022(c, reinterpret_cast<int32_t*>(&key), &offset); switch (value){ @@ -910,7 +910,7 @@ changeState_2022(UConverter* _this, #endif case ISO_2022_JP: { - StateEnum tempState=(StateEnum)nextStateToUnicodeJP[offset]; + StateEnum tempState = static_cast<StateEnum>(nextStateToUnicodeJP[offset]); switch(tempState) { case INVALID_STATE: *err = U_UNSUPPORTED_ESCAPE_SEQUENCE; @@ -933,7 +933,7 @@ changeState_2022(UConverter* _this, *err = U_UNSUPPORTED_ESCAPE_SEQUENCE; } else { /* G2 charset for SS2 */ - myData2022->toU2022State.cs[2]=(int8_t)tempState; + myData2022->toU2022State.cs[2] = static_cast<int8_t>(tempState); } break; default: @@ -941,7 +941,7 @@ changeState_2022(UConverter* _this, *err = U_UNSUPPORTED_ESCAPE_SEQUENCE; } else { /* G0 charset */ - myData2022->toU2022State.cs[0]=(int8_t)tempState; + myData2022->toU2022State.cs[0] = static_cast<int8_t>(tempState); } break; } @@ -950,7 +950,7 @@ changeState_2022(UConverter* _this, #if !UCONFIG_ONLY_HTML_CONVERSION case ISO_2022_CN: { - StateEnum tempState=(StateEnum)nextStateToUnicodeCN[offset]; + StateEnum tempState = static_cast<StateEnum>(nextStateToUnicodeCN[offset]); switch(tempState) { case INVALID_STATE: *err = U_UNSUPPORTED_ESCAPE_SEQUENCE; @@ -986,17 +986,17 @@ changeState_2022(UConverter* _this, case GB2312_1: U_FALLTHROUGH; case CNS_11643_1: - myData2022->toU2022State.cs[1]=(int8_t)tempState; + myData2022->toU2022State.cs[1] = static_cast<int8_t>(tempState); break; case CNS_11643_2: - myData2022->toU2022State.cs[2]=(int8_t)tempState; + myData2022->toU2022State.cs[2] = static_cast<int8_t>(tempState); break; default: /* other CNS 11643 planes */ if(myData2022->version==0) { *err = U_UNSUPPORTED_ESCAPE_SEQUENCE; } else { - myData2022->toU2022State.cs[3]=(int8_t)tempState; + myData2022->toU2022State.cs[3] = static_cast<int8_t>(tempState); } break; } @@ -1039,7 +1039,7 @@ changeState_2022(UConverter* _this, *source-=backOutDistance; } else { /* Back out bytes from the previous buffer: Need to replay them. */ - _this->preToULength=(int8_t)(bytesFromThisBuffer-backOutDistance); + _this->preToULength = static_cast<int8_t>(bytesFromThisBuffer - backOutDistance); /* same as -(initialToULength-1) */ /* preToULength is negative! */ uprv_memcpy(_this->preToU, _this->toUBytes+1, -_this->preToULength); @@ -1145,7 +1145,7 @@ MBCS_FROM_UCHAR32_ISO2022(UConverterSharedData* sharedData, } } else /* outputType==MBCS_OUTPUT_3 */ { p=MBCS_POINTER_3_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c); - myValue=((uint32_t)*p<<16)|((uint32_t)p[1]<<8)|p[2]; + myValue = (static_cast<uint32_t>(*p) << 16) | (static_cast<uint32_t>(p[1]) << 8) | p[2]; if(myValue<=0xff) { length=1; } else if(myValue<=0xffff) { @@ -1201,7 +1201,7 @@ MBCS_SINGLE_FROM_UCHAR32(UConverterSharedData* sharedData, /* get the byte for the output */ value=MBCS_SINGLE_RESULT_FROM_U(table, (uint16_t *)sharedData->mbcs.fromUnicodeBytes, c); /* is this code point assigned, or do we use fallbacks? */ - *retval=(uint32_t)(value&0xff); + *retval = static_cast<uint32_t>(value & 0xff); if(value>=0xf00) { return 1; /* roundtrip */ } else if(useFallback ? value>=0x800 : value>=0xc00) { @@ -1219,8 +1219,8 @@ MBCS_SINGLE_FROM_UCHAR32(UConverterSharedData* sharedData, */ static inline uint32_t _2022FromGR94DBCS(uint32_t value) { - if( (uint16_t)(value - 0xa1a1) <= (0xfefe - 0xa1a1) && - (uint8_t)(value - 0xa1) <= (0xfe - 0xa1) + if (static_cast<uint16_t>(value - 0xa1a1) <= (0xfefe - 0xa1a1) && + static_cast<uint8_t>(value - 0xa1) <= (0xfe - 0xa1) ) { return value - 0x8080; /* shift down to 21..7e byte range */ } else { @@ -1368,12 +1368,12 @@ toUnicodeCallback(UConverter *cnv, const uint32_t sourceChar, const uint32_t targetUniChar, UErrorCode* err){ if(sourceChar>0xff){ - cnv->toUBytes[0] = (uint8_t)(sourceChar>>8); - cnv->toUBytes[1] = (uint8_t)sourceChar; + cnv->toUBytes[0] = static_cast<uint8_t>(sourceChar >> 8); + cnv->toUBytes[1] = static_cast<uint8_t>(sourceChar); cnv->toULength = 2; } else{ - cnv->toUBytes[0] =(char) sourceChar; + cnv->toUBytes[0] = static_cast<char>(sourceChar); cnv->toULength = 1; } @@ -1527,7 +1527,7 @@ _2022FromSJIS(uint32_t value) { return 0; /* beyond JIS X 0208 */ } - trail = (uint8_t)value; + trail = static_cast<uint8_t>(value); value &= 0xff00; /* lead byte */ if(value <= 0x9f00) { @@ -1569,7 +1569,7 @@ _2022ToSJIS(uint8_t c1, uint8_t c2, char bytes[2]) { c2 = 0; /* invalid */ } } else { - if((uint8_t)(c2-0x21) <= ((0x7e)-0x21)) { + if (static_cast<uint8_t>(c2 - 0x21) <= ((0x7e) - 0x21)) { c2 += 0x7e; } else { c2 = 0; /* invalid */ @@ -1583,8 +1583,8 @@ _2022ToSJIS(uint8_t c1, uint8_t c2, char bytes[2]) { } else { c1 = 0; /* invalid */ } - bytes[0] = (char)c1; - bytes[1] = (char)c2; + bytes[0] = static_cast<char>(c1); + bytes[1] = static_cast<char>(c2); } /* @@ -1665,8 +1665,8 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args UConverter *cnv = args->converter; UConverterDataISO2022 *converterData; ISO2022State *pFromU2022State; - uint8_t *target = (uint8_t *) args->target; - const uint8_t *targetLimit = (const uint8_t *) args->targetLimit; + uint8_t* target = reinterpret_cast<uint8_t*>(args->target); + const uint8_t* targetLimit = reinterpret_cast<const uint8_t*>(args->targetLimit); const char16_t* source = args->source; const char16_t* sourceLimit = args->sourceLimit; int32_t* offsets = args->offsets; @@ -1682,7 +1682,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args int8_t cs, g; /* set up the state */ - converterData = (UConverterDataISO2022*)cnv->extraInfo; + converterData = static_cast<UConverterDataISO2022*>(cnv->extraInfo); pFromU2022State = &converterData->fromU2022State; choiceCount = 0; @@ -1703,7 +1703,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /*look ahead to find the trail surrogate*/ if(source < sourceLimit) { /* test the following code unit */ - char16_t trail=(char16_t) *source; + char16_t trail = *source; if(U16_IS_TRAIL(trail)) { source++; sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail); @@ -1753,7 +1753,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /* JIS7/8: try single-byte half-width Katakana before JISX208 */ if(converterData->version == 3 || converterData->version == 4) { - choices[choiceCount++] = (int8_t)HWKANA_7BIT; + choices[choiceCount++] = static_cast<int8_t>(HWKANA_7BIT); } /* Do not try single-byte half-width Katakana for other versions. */ csm &= ~CSM(HWKANA_7BIT); @@ -1770,7 +1770,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /* try all the other possible charsets */ for(i = 0; i < UPRV_LENGTHOF(jpCharsetPref); ++i) { - cs = (int8_t)jpCharsetPref[i]; + cs = static_cast<int8_t>(jpCharsetPref[i]); if(CSM(cs) & csm) { choices[choiceCount++] = cs; csm &= ~CSM(cs); @@ -1800,7 +1800,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args switch(cs0) { case ASCII: if(sourceChar <= 0x7f) { - targetValue = (uint32_t)sourceChar; + targetValue = static_cast<uint32_t>(sourceChar); len = 1; cs = cs0; g = 0; @@ -1808,31 +1808,31 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args break; case ISO8859_1: if(GR96_START <= sourceChar && sourceChar <= GR96_END) { - targetValue = (uint32_t)sourceChar - 0x80; + targetValue = static_cast<uint32_t>(sourceChar) - 0x80; len = 1; cs = cs0; g = 2; } break; case HWKANA_7BIT: - if((uint32_t)(sourceChar - HWKANA_START) <= (HWKANA_END - HWKANA_START)) { + if (static_cast<uint32_t>(sourceChar - HWKANA_START) <= (HWKANA_END - HWKANA_START)) { if(converterData->version==3) { /* JIS7: use G1 (SO) */ /* Shift U+FF61..U+FF9F to bytes 21..5F. */ - targetValue = (uint32_t)(sourceChar - (HWKANA_START - 0x21)); + targetValue = static_cast<uint32_t>(sourceChar - (HWKANA_START - 0x21)); len = 1; pFromU2022State->cs[1] = cs = cs0; /* do not output an escape sequence */ g = 1; } else if(converterData->version==4) { /* JIS8: use 8-bit bytes with any single-byte charset, see escape sequence output below */ /* Shift U+FF61..U+FF9F to bytes A1..DF. */ - targetValue = (uint32_t)(sourceChar - (HWKANA_START - 0xa1)); + targetValue = static_cast<uint32_t>(sourceChar - (HWKANA_START - 0xa1)); len = 1; cs = pFromU2022State->cs[0]; if(IS_JP_DBCS(cs)) { /* switch from a DBCS charset to JISX201 */ - cs = (int8_t)JISX201; + cs = static_cast<int8_t>(JISX201); } /* else stay in the current G0 charset */ g = 0; @@ -1867,7 +1867,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args useFallback = false; } } else if(len == 0 && useFallback && - (uint32_t)(sourceChar - HWKANA_START) <= (HWKANA_END - HWKANA_START)) { + static_cast<uint32_t>(sourceChar - HWKANA_START) <= (HWKANA_END - HWKANA_START)) { targetValue = hwkana_fb[sourceChar - HWKANA_START]; len = -2; cs = cs0; @@ -1958,10 +1958,10 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /* write the output bytes */ if(len == 1) { - buffer[outLen++] = (char)targetValue; + buffer[outLen++] = static_cast<char>(targetValue); } else /* len == 2 */ { - buffer[outLen++] = (char)(targetValue >> 8); - buffer[outLen++] = (char)targetValue; + buffer[outLen++] = static_cast<char>(targetValue >> 8); + buffer[outLen++] = static_cast<char>(targetValue); } } else { /* @@ -1983,13 +1983,13 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args if(outLen == 1) { *target++ = buffer[0]; if(offsets) { - *offsets++ = (int32_t)(source - args->source - 1); /* -1: known to be ASCII */ + *offsets++ = static_cast<int32_t>(source - args->source - 1); /* -1: known to be ASCII */ } } else if(outLen == 2 && (target + 2) <= targetLimit) { *target++ = buffer[0]; *target++ = buffer[1]; if(offsets) { - int32_t sourceIndex = (int32_t)(source - args->source - U16_LENGTH(sourceChar)); + int32_t sourceIndex = static_cast<int32_t>(source - args->source - U16_LENGTH(sourceChar)); *offsets++ = sourceIndex; *offsets++ = sourceIndex; } @@ -1997,8 +1997,8 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args fromUWriteUInt8( cnv, buffer, outLen, - &target, (const char *)targetLimit, - &offsets, (int32_t)(source - args->source - U16_LENGTH(sourceChar)), + &target, reinterpret_cast<const char*>(targetLimit), + &offsets, static_cast<int32_t>(source - args->source - U16_LENGTH(sourceChar)), err); if(U_FAILURE(*err)) { break; @@ -2039,7 +2039,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args int32_t escLen = escSeqCharsLen[ASCII]; uprv_memcpy(buffer + outLen, escSeqChars[ASCII], escLen); outLen += escLen; - pFromU2022State->cs[0] = (int8_t)ASCII; + pFromU2022State->cs[0] = static_cast<int8_t>(ASCII); } /* get the source index of the last input character */ @@ -2050,7 +2050,7 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args * this code gives an incorrect result for the rare case of an unmatched * trail surrogate that is alone in the last buffer of the text stream */ - sourceIndex=(int32_t)(source-args->source); + sourceIndex = static_cast<int32_t>(source - args->source); if(sourceIndex>0) { --sourceIndex; if( U16_IS_TRAIL(args->source[sourceIndex]) && @@ -2065,14 +2065,14 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args fromUWriteUInt8( cnv, buffer, outLen, - &target, (const char *)targetLimit, + &target, reinterpret_cast<const char*>(targetLimit), &offsets, sourceIndex, err); } /*save the state and return */ args->source = source; - args->target = (char*)target; + args->target = reinterpret_cast<char*>(target); } /*************** to unicode *******************/ @@ -2081,7 +2081,7 @@ static void U_CALLCONV UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCode* err){ char tempBuf[2]; - const char *mySource = (char *) args->source; + const char* mySource = const_cast<char*>(args->source); char16_t *myTarget = args->target; const char *mySourceLimit = args->sourceLimit; uint32_t targetUniChar = 0x0000; @@ -2091,7 +2091,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, ISO2022State *pToU2022State; StateEnum cs; - myData=(UConverterDataISO2022*)(args->converter->extraInfo); + myData = static_cast<UConverterDataISO2022*>(args->converter->extraInfo); pToU2022State = &myData->toU2022State; if(myData->key != 0) { @@ -2101,7 +2101,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, /* continue with a partial double-byte character */ mySourceChar = args->converter->toUBytes[0]; args->converter->toULength = 0; - cs = (StateEnum)pToU2022State->cs[pToU2022State->g]; + cs = static_cast<StateEnum>(pToU2022State->cs[pToU2022State->g]); targetUniChar = missingCharMarker; goto getTrailByte; } @@ -2112,7 +2112,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, if(myTarget < args->targetLimit){ - mySourceChar= (unsigned char) *mySource++; + mySourceChar = static_cast<unsigned char>(*mySource++); switch(mySourceChar) { case UCNV_SI: @@ -2128,7 +2128,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, case UCNV_SO: if(myData->version==3) { /* JIS7: switch to G1 half-width Katakana */ - pToU2022State->cs[1] = (int8_t)HWKANA_7BIT; + pToU2022State->cs[1] = static_cast<int8_t>(HWKANA_7BIT); pToU2022State->g=1; continue; } else { @@ -2151,7 +2151,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, if(myData->version==0 && myData->key==0 && U_SUCCESS(*err) && myData->isEmptySegment) { *err = U_ILLEGAL_ESCAPE_SEQUENCE; args->converter->toUCallbackReason = UCNV_IRREGULAR; - args->converter->toULength = (int8_t)(toULengthBefore + (mySource - mySourceBefore)); + args->converter->toULength = static_cast<int8_t>(toULengthBefore + (mySource - mySourceBefore)); } } @@ -2173,8 +2173,9 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, case CR: case LF: /* automatically reset to single-byte mode */ - if((StateEnum)pToU2022State->cs[0] != ASCII && (StateEnum)pToU2022State->cs[0] != JISX201) { - pToU2022State->cs[0] = (int8_t)ASCII; + if (static_cast<StateEnum>(pToU2022State->cs[0]) != ASCII && + static_cast<StateEnum>(pToU2022State->cs[0]) != JISX201) { + pToU2022State->cs[0] = static_cast<int8_t>(ASCII); } pToU2022State->cs[2] = 0; pToU2022State->g = 0; @@ -2182,8 +2183,8 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, default: /* convert one or two bytes */ myData->isEmptySegment = false; - cs = (StateEnum)pToU2022State->cs[pToU2022State->g]; - if( (uint8_t)(mySourceChar - 0xa1) <= (0xdf - 0xa1) && myData->version==4 && + cs = static_cast<StateEnum>(pToU2022State->cs[pToU2022State->g]); + if (static_cast<uint8_t>(mySourceChar - 0xa1) <= (0xdf - 0xa1) && myData->version == 4 && !IS_JP_DBCS(cs) ) { /* 8-bit halfwidth katakana in any single-byte mode for JIS8 */ @@ -2223,7 +2224,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, } break; case HWKANA_7BIT: - if((uint8_t)(mySourceChar - 0x21) <= (0x5f - 0x21)) { + if (static_cast<uint8_t>(mySourceChar - 0x21) <= (0x5f - 0x21)) { /* 7-bit halfwidth Katakana */ targetUniChar = mySourceChar + (HWKANA_START - 0x21); } @@ -2234,7 +2235,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, int leadIsOk, trailIsOk; uint8_t trailByte; getTrailByte: - trailByte = (uint8_t)*mySource; + trailByte = static_cast<uint8_t>(*mySource); /* * Ticket 5691: consistent illegal sequences: * - We include at least the first byte in the illegal sequence. @@ -2245,13 +2246,13 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, * an ESC/SO/SI, we report only the first byte as the illegal sequence. * Otherwise we convert or report the pair of bytes. */ - leadIsOk = (uint8_t)(mySourceChar - 0x21) <= (0x7e - 0x21); - trailIsOk = (uint8_t)(trailByte - 0x21) <= (0x7e - 0x21); + leadIsOk = static_cast<uint8_t>(mySourceChar - 0x21) <= (0x7e - 0x21); + trailIsOk = static_cast<uint8_t>(trailByte - 0x21) <= (0x7e - 0x21); if (leadIsOk && trailIsOk) { ++mySource; tmpSourceChar = (mySourceChar << 8) | trailByte; if(cs == JISX208) { - _2022ToSJIS((uint8_t)mySourceChar, trailByte, tempBuf); + _2022ToSJIS(static_cast<uint8_t>(mySourceChar), trailByte, tempBuf); mySourceChar = tmpSourceChar; } else { /* Copy before we modify tmpSourceChar so toUnicodeCallback() sees the correct bytes. */ @@ -2259,8 +2260,8 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, if (cs == KSC5601) { tmpSourceChar += 0x8080; /* = _2022ToGR94DBCS(tmpSourceChar) */ } - tempBuf[0] = (char)(tmpSourceChar >> 8); - tempBuf[1] = (char)(tmpSourceChar); + tempBuf[0] = static_cast<char>(tmpSourceChar >> 8); + tempBuf[1] = static_cast<char>(tmpSourceChar); } targetUniChar = ucnv_MBCSSimpleGetNextUChar(myData->myConverterArray[cs], tempBuf, 2, false); } else if (!(trailIsOk || IS_2022_CONTROL(trailByte))) { @@ -2270,7 +2271,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, mySourceChar = 0x10000 | (mySourceChar << 8) | trailByte; } } else { - args->converter->toUBytes[0] = (uint8_t)mySourceChar; + args->converter->toUBytes[0] = static_cast<uint8_t>(mySourceChar); args->converter->toULength = 1; goto endloop; } @@ -2279,27 +2280,27 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, } /* End of outer switch */ if(targetUniChar < (missingCharMarker-1/*0xfffe*/)){ if(args->offsets){ - args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); + args->offsets[myTarget - args->target] = static_cast<int32_t>(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); } - *(myTarget++)=(char16_t)targetUniChar; + *(myTarget++) = static_cast<char16_t>(targetUniChar); } else if(targetUniChar > missingCharMarker){ /* disassemble the surrogate pair and write to output*/ targetUniChar-=0x0010000; - *myTarget = (char16_t)(0xd800+(char16_t)(targetUniChar>>10)); + *myTarget = static_cast<char16_t>(0xd800 + static_cast<char16_t>(targetUniChar >> 10)); if(args->offsets){ - args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); + args->offsets[myTarget - args->target] = static_cast<int32_t>(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); } ++myTarget; if(myTarget< args->targetLimit){ - *myTarget = (char16_t)(0xdc00+(char16_t)(targetUniChar&0x3ff)); + *myTarget = static_cast<char16_t>(0xdc00 + static_cast<char16_t>(targetUniChar & 0x3ff)); if(args->offsets){ - args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); + args->offsets[myTarget - args->target] = static_cast<int32_t>(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); } ++myTarget; }else{ args->converter->UCharErrorBuffer[args->converter->UCharErrorBufferLength++]= - (char16_t)(0xdc00+(char16_t)(targetUniChar&0x3ff)); + static_cast<char16_t>(0xdc00 + static_cast<char16_t>(targetUniChar & 0x3ff)); } } @@ -2333,7 +2334,7 @@ static void U_CALLCONV UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterFromUnicodeArgs* args, UErrorCode* err){ UConverter* saveConv = args->converter; - UConverterDataISO2022 *myConverterData=(UConverterDataISO2022*)saveConv->extraInfo; + UConverterDataISO2022* myConverterData = static_cast<UConverterDataISO2022*>(saveConv->extraInfo); args->converter=myConverterData->currentConverter; myConverterData->currentConverter->fromUChar32 = saveConv->fromUChar32; @@ -2358,8 +2359,8 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args const char16_t *source = args->source; const char16_t *sourceLimit = args->sourceLimit; - unsigned char *target = (unsigned char *) args->target; - unsigned char *targetLimit = (unsigned char *) args->targetLimit; + unsigned char *target = reinterpret_cast<unsigned char*>(args->target); + unsigned char *targetLimit = reinterpret_cast<unsigned char*>(const_cast<char*>(args->targetLimit)); int32_t* offsets = args->offsets; uint32_t targetByteUnit = 0x0000; UChar32 sourceChar = 0x0000; @@ -2370,7 +2371,7 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args UBool useFallback; int32_t length =0; - converterData=(UConverterDataISO2022*)args->converter->extraInfo; + converterData = static_cast<UConverterDataISO2022*>(args->converter->extraInfo); /* if the version is 1 then the user is requesting * conversion with ibm-25546 pass the arguments to * MBCS converter and return @@ -2383,10 +2384,10 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /* initialize data */ sharedData = converterData->currentConverter->sharedData; useFallback = args->converter->useFallback; - isTargetByteDBCS=(UBool)args->converter->fromUnicodeStatus; + isTargetByteDBCS = static_cast<UBool>(args->converter->fromUnicodeStatus); oldIsTargetByteDBCS = isTargetByteDBCS; - isTargetByteDBCS = (UBool) args->converter->fromUnicodeStatus; + isTargetByteDBCS = static_cast<UBool>(args->converter->fromUnicodeStatus); if((sourceChar = args->converter->fromUChar32)!=0 && target <targetLimit) { goto getTrail; } @@ -2414,15 +2415,15 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args if( length > 2 || length==0 || (length == 1 && targetByteUnit > 0x7f) || (length == 2 && - ((uint16_t)(targetByteUnit - 0xa1a1) > (0xfefe - 0xa1a1) || - (uint8_t)(targetByteUnit - 0xa1) > (0xfe - 0xa1))) + (static_cast<uint16_t>(targetByteUnit - 0xa1a1) > (0xfefe - 0xa1a1) || + static_cast<uint8_t>(targetByteUnit - 0xa1) > (0xfe - 0xa1))) ) { targetByteUnit=missingCharMarker; } if (targetByteUnit != missingCharMarker){ oldIsTargetByteDBCS = isTargetByteDBCS; - isTargetByteDBCS = (UBool)(targetByteUnit>0x00FF); + isTargetByteDBCS = static_cast<UBool>(targetByteUnit > 0x00FF); /* append the shift sequence */ if (oldIsTargetByteDBCS != isTargetByteDBCS ){ @@ -2431,38 +2432,38 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args else *target++ = UCNV_SI; if(offsets) - *(offsets++) = (int32_t)(source - args->source-1); + *(offsets++) = static_cast<int32_t>(source - args->source - 1); } /* write the targetUniChar to target */ if(targetByteUnit <= 0x00FF){ if( target < targetLimit){ - *(target++) = (unsigned char) targetByteUnit; + *(target++) = static_cast<unsigned char>(targetByteUnit); if(offsets){ - *(offsets++) = (int32_t)(source - args->source-1); + *(offsets++) = static_cast<int32_t>(source - args->source - 1); } }else{ - args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = (unsigned char) (targetByteUnit); + args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = static_cast<unsigned char>(targetByteUnit); *err = U_BUFFER_OVERFLOW_ERROR; } }else{ if(target < targetLimit){ - *(target++) =(unsigned char) ((targetByteUnit>>8) -0x80); + *(target++) = static_cast<unsigned char>((targetByteUnit >> 8) - 0x80); if(offsets){ - *(offsets++) = (int32_t)(source - args->source-1); + *(offsets++) = static_cast<int32_t>(source - args->source - 1); } if(target < targetLimit){ - *(target++) =(unsigned char) (targetByteUnit -0x80); + *(target++) = static_cast<unsigned char>(targetByteUnit - 0x80); if(offsets){ - *(offsets++) = (int32_t)(source - args->source-1); + *(offsets++) = static_cast<int32_t>(source - args->source - 1); } }else{ - args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = (unsigned char) (targetByteUnit -0x80); + args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = static_cast<unsigned char>(targetByteUnit - 0x80); *err = U_BUFFER_OVERFLOW_ERROR; } }else{ - args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = (unsigned char) ((targetByteUnit>>8) -0x80); - args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = (unsigned char) (targetByteUnit-0x80); + args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = static_cast<unsigned char>((targetByteUnit >> 8) - 0x80); + args->converter->charErrorBuffer[args->converter->charErrorBufferLength++] = static_cast<unsigned char>(targetByteUnit - 0x80); *err = U_BUFFER_OVERFLOW_ERROR; } } @@ -2480,7 +2481,7 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /*look ahead to find the trail surrogate*/ if(source < sourceLimit) { /* test the following code unit */ - char16_t trail=(char16_t) *source; + char16_t trail = *source; if(U16_IS_TRAIL(trail)) { source++; sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail); @@ -2544,7 +2545,7 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args * this code gives an incorrect result for the rare case of an unmatched * trail surrogate that is alone in the last buffer of the text stream */ - sourceIndex=(int32_t)(source-args->source); + sourceIndex = static_cast<int32_t>(source - args->source); if(sourceIndex>0) { --sourceIndex; if( U16_IS_TRAIL(args->source[sourceIndex]) && @@ -2559,15 +2560,15 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args fromUWriteUInt8( args->converter, SHIFT_IN_STR, 1, - &target, (const char *)targetLimit, + &target, reinterpret_cast<const char*>(targetLimit), &offsets, sourceIndex, err); } /*save the state and return */ args->source = source; - args->target = (char*)target; - args->converter->fromUnicodeStatus = (uint32_t)isTargetByteDBCS; + args->target = reinterpret_cast<char*>(target); + args->converter->fromUnicodeStatus = static_cast<uint32_t>(isTargetByteDBCS); } /************************ To Unicode ***************************************/ @@ -2576,7 +2577,7 @@ static void U_CALLCONV UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterToUnicodeArgs *args, UErrorCode* err){ char const* sourceStart; - UConverterDataISO2022* myData=(UConverterDataISO2022*)(args->converter->extraInfo); + UConverterDataISO2022* myData = static_cast<UConverterDataISO2022*>(args->converter->extraInfo); UConverterToUnicodeArgs subArgs; int32_t minArgsSize; @@ -2585,11 +2586,11 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterToUnicodeArgs *args if(args->size<sizeof(UConverterToUnicodeArgs)) { minArgsSize = args->size; } else { - minArgsSize = (int32_t)sizeof(UConverterToUnicodeArgs); + minArgsSize = static_cast<int32_t>(sizeof(UConverterToUnicodeArgs)); } uprv_memcpy(&subArgs, args, minArgsSize); - subArgs.size = (uint16_t)minArgsSize; + subArgs.size = static_cast<uint16_t>(minArgsSize); subArgs.converter = myData->currentConverter; /* remember the original start of the input for offsets */ @@ -2628,7 +2629,7 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterToUnicodeArgs *args /* update offsets to base them on the actual start of the input */ int32_t *offsets = args->offsets; char16_t *target = args->target; - int32_t delta = (int32_t)(args->source - sourceStart); + int32_t delta = static_cast<int32_t>(args->source - sourceStart); while(target < subArgs.target) { if(*offsets >= 0) { *offsets += delta; @@ -2674,7 +2675,7 @@ static void U_CALLCONV UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCode* err){ char tempBuf[2]; - const char *mySource = ( char *) args->source; + const char* mySource = const_cast<char*>(args->source); char16_t *myTarget = args->target; const char *mySourceLimit = args->sourceLimit; UChar32 targetUniChar = 0x0000; @@ -2683,7 +2684,7 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UConverterSharedData* sharedData ; UBool useFallback; - myData=(UConverterDataISO2022*)(args->converter->extraInfo); + myData = static_cast<UConverterDataISO2022*>(args->converter->extraInfo); if(myData->version==1){ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(args,err); return; @@ -2707,7 +2708,7 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, if(myTarget < args->targetLimit){ - mySourceChar= (unsigned char) *mySource++; + mySourceChar = static_cast<unsigned char>(*mySource++); if(mySourceChar==UCNV_SI){ myData->toU2022State.g = 0; @@ -2715,7 +2716,7 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, myData->isEmptySegment = false; /* we are handling it, reset to avoid future spurious errors */ *err = U_ILLEGAL_ESCAPE_SEQUENCE; args->converter->toUCallbackReason = UCNV_IRREGULAR; - args->converter->toUBytes[0] = (uint8_t)mySourceChar; + args->converter->toUBytes[0] = static_cast<uint8_t>(mySourceChar); args->converter->toULength = 1; args->target = myTarget; args->source = mySource; @@ -2749,7 +2750,7 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, uint8_t trailByte; getTrailByte: targetUniChar = missingCharMarker; - trailByte = (uint8_t)*mySource; + trailByte = static_cast<uint8_t>(*mySource); /* * Ticket 5691: consistent illegal sequences: * - We include at least the first byte in the illegal sequence. @@ -2760,12 +2761,12 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, * an ESC/SO/SI, we report only the first byte as the illegal sequence. * Otherwise we convert or report the pair of bytes. */ - leadIsOk = (uint8_t)(mySourceChar - 0x21) <= (0x7e - 0x21); - trailIsOk = (uint8_t)(trailByte - 0x21) <= (0x7e - 0x21); + leadIsOk = static_cast<uint8_t>(mySourceChar - 0x21) <= (0x7e - 0x21); + trailIsOk = static_cast<uint8_t>(trailByte - 0x21) <= (0x7e - 0x21); if (leadIsOk && trailIsOk) { ++mySource; - tempBuf[0] = (char)(mySourceChar + 0x80); - tempBuf[1] = (char)(trailByte + 0x80); + tempBuf[0] = static_cast<char>(mySourceChar + 0x80); + tempBuf[1] = static_cast<char>(trailByte + 0x80); targetUniChar = ucnv_MBCSSimpleGetNextUChar(sharedData, tempBuf, 2, useFallback); mySourceChar = (mySourceChar << 8) | trailByte; } else if (!(trailIsOk || IS_2022_CONTROL(trailByte))) { @@ -2775,7 +2776,7 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, mySourceChar = static_cast<char16_t>(0x10000 | (mySourceChar << 8) | trailByte); } } else { - args->converter->toUBytes[0] = (uint8_t)mySourceChar; + args->converter->toUBytes[0] = static_cast<uint8_t>(mySourceChar); args->converter->toULength = 1; break; } @@ -2787,9 +2788,9 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, } if(targetUniChar < 0xfffe){ if(args->offsets) { - args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); + args->offsets[myTarget - args->target] = static_cast<int32_t>(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); } - *(myTarget++)=(char16_t)targetUniChar; + *(myTarget++) = static_cast<char16_t>(targetUniChar); } else { /* Call the callback function*/ @@ -2917,8 +2918,8 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args UConverter *cnv = args->converter; UConverterDataISO2022 *converterData; ISO2022State *pFromU2022State; - uint8_t *target = (uint8_t *) args->target; - const uint8_t *targetLimit = (const uint8_t *) args->targetLimit; + uint8_t* target = reinterpret_cast<uint8_t*>(args->target); + const uint8_t* targetLimit = reinterpret_cast<const uint8_t*>(args->targetLimit); const char16_t* source = args->source; const char16_t* sourceLimit = args->sourceLimit; int32_t* offsets = args->offsets; @@ -2931,7 +2932,7 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args UBool useFallback; /* set up the state */ - converterData = (UConverterDataISO2022*)cnv->extraInfo; + converterData = static_cast<UConverterDataISO2022*>(cnv->extraInfo); pFromU2022State = &converterData->fromU2022State; choiceCount = 0; @@ -2952,7 +2953,7 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /*look ahead to find the trail surrogate*/ if(source < sourceLimit) { /* test the following code unit */ - char16_t trail=(char16_t) *source; + char16_t trail = *source; if(U16_IS_TRAIL(trail)) { source++; sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail); @@ -2992,11 +2993,11 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /* US-ASCII */ if(pFromU2022State->g == 0) { - buffer[0] = (char)sourceChar; + buffer[0] = static_cast<char>(sourceChar); len = 1; } else { buffer[0] = UCNV_SI; - buffer[1] = (char)sourceChar; + buffer[1] = static_cast<char>(sourceChar); len = 2; pFromU2022State->g = 0; choiceCount = 0; @@ -3026,9 +3027,9 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /* try the other SO/G1 converter; a CNS_11643_1 lookup may result in any plane */ if(choices[0] == GB2312_1) { - choices[1] = (int8_t)CNS_11643_1; + choices[1] = static_cast<int8_t>(CNS_11643_1); } else { - choices[1] = (int8_t)GB2312_1; + choices[1] = static_cast<int8_t>(GB2312_1); } choiceCount = 2; @@ -3038,23 +3039,23 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args /* try one of the other converters */ switch(choices[0]) { case GB2312_1: - choices[1] = (int8_t)CNS_11643_1; - choices[2] = (int8_t)ISO_IR_165; + choices[1] = static_cast<int8_t>(CNS_11643_1); + choices[2] = static_cast<int8_t>(ISO_IR_165); break; case ISO_IR_165: - choices[1] = (int8_t)GB2312_1; - choices[2] = (int8_t)CNS_11643_1; + choices[1] = static_cast<int8_t>(GB2312_1); + choices[2] = static_cast<int8_t>(CNS_11643_1); break; default: /* CNS_11643_x */ - choices[1] = (int8_t)GB2312_1; - choices[2] = (int8_t)ISO_IR_165; + choices[1] = static_cast<int8_t>(GB2312_1); + choices[2] = static_cast<int8_t>(ISO_IR_165); break; } choiceCount = 3; } else { - choices[0] = (int8_t)CNS_11643_1; - choices[1] = (int8_t)GB2312_1; + choices[0] = static_cast<int8_t>(CNS_11643_1); + choices[1] = static_cast<int8_t>(GB2312_1); } } @@ -3087,7 +3088,7 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args MBCS_OUTPUT_3); if(len2 == 3 || (len2 == -3 && len == 0)) { targetValue = value; - cs = (int8_t)(CNS_11643_0 + (value >> 16) - 0x80); + cs = static_cast<int8_t>(CNS_11643_0 + (value >> 16) - 0x80); if(len2 >= 0) { len = 2; } else { @@ -3165,8 +3166,8 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args } /* write the two output bytes */ - buffer[len++] = (char)(targetValue >> 8); - buffer[len++] = (char)targetValue; + buffer[len++] = static_cast<char>(targetValue >> 8); + buffer[len++] = static_cast<char>(targetValue); } else { /* if we cannot find the character after checking all codepages * then this is an error @@ -3181,13 +3182,13 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args if(len == 1) { *target++ = buffer[0]; if(offsets) { - *offsets++ = (int32_t)(source - args->source - 1); /* -1: known to be ASCII */ + *offsets++ = static_cast<int32_t>(source - args->source - 1); /* -1: known to be ASCII */ } } else if(len == 2 && (target + 2) <= targetLimit) { *target++ = buffer[0]; *target++ = buffer[1]; if(offsets) { - int32_t sourceIndex = (int32_t)(source - args->source - U16_LENGTH(sourceChar)); + int32_t sourceIndex = static_cast<int32_t>(source - args->source - U16_LENGTH(sourceChar)); *offsets++ = sourceIndex; *offsets++ = sourceIndex; } @@ -3195,8 +3196,8 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args fromUWriteUInt8( cnv, buffer, len, - &target, (const char *)targetLimit, - &offsets, (int32_t)(source - args->source - U16_LENGTH(sourceChar)), + &target, reinterpret_cast<const char*>(targetLimit), + &offsets, static_cast<int32_t>(source - args->source - U16_LENGTH(sourceChar)), err); if(U_FAILURE(*err)) { break; @@ -3237,7 +3238,7 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args * this code gives an incorrect result for the rare case of an unmatched * trail surrogate that is alone in the last buffer of the text stream */ - sourceIndex=(int32_t)(source-args->source); + sourceIndex = static_cast<int32_t>(source - args->source); if(sourceIndex>0) { --sourceIndex; if( U16_IS_TRAIL(args->source[sourceIndex]) && @@ -3252,14 +3253,14 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args fromUWriteUInt8( cnv, SHIFT_IN_STR, 1, - &target, (const char *)targetLimit, + &target, reinterpret_cast<const char*>(targetLimit), &offsets, sourceIndex, err); } /*save the state and return */ args->source = source; - args->target = (char*)target; + args->target = reinterpret_cast<char*>(target); } @@ -3267,7 +3268,7 @@ static void U_CALLCONV UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCode* err){ char tempBuf[3]; - const char *mySource = (char *) args->source; + const char* mySource = const_cast<char*>(args->source); char16_t *myTarget = args->target; const char *mySourceLimit = args->sourceLimit; uint32_t targetUniChar = 0x0000; @@ -3275,7 +3276,7 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UConverterDataISO2022* myData; ISO2022State *pToU2022State; - myData=(UConverterDataISO2022*)(args->converter->extraInfo); + myData = static_cast<UConverterDataISO2022*>(args->converter->extraInfo); pToU2022State = &myData->toU2022State; if(myData->key != 0) { @@ -3295,7 +3296,7 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, if(myTarget < args->targetLimit){ - mySourceChar= (unsigned char) *mySource++; + mySourceChar = static_cast<unsigned char>(*mySource++); switch(mySourceChar){ case UCNV_SI: @@ -3337,7 +3338,7 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, if(myData->key==0 && U_SUCCESS(*err) && myData->isEmptySegment) { *err = U_ILLEGAL_ESCAPE_SEQUENCE; args->converter->toUCallbackReason = UCNV_IRREGULAR; - args->converter->toULength = (int8_t)(toULengthBefore + (mySource - mySourceBefore)); + args->converter->toULength = static_cast<int8_t>(toULengthBefore + (mySource - mySourceBefore)); } } @@ -3367,7 +3368,7 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, int leadIsOk, trailIsOk; uint8_t trailByte; getTrailByte: - trailByte = (uint8_t)*mySource; + trailByte = static_cast<uint8_t>(*mySource); /* * Ticket 5691: consistent illegal sequences: * - We include at least the first byte in the illegal sequence. @@ -3378,23 +3379,23 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, * an ESC/SO/SI, we report only the first byte as the illegal sequence. * Otherwise we convert or report the pair of bytes. */ - leadIsOk = (uint8_t)(mySourceChar - 0x21) <= (0x7e - 0x21); - trailIsOk = (uint8_t)(trailByte - 0x21) <= (0x7e - 0x21); + leadIsOk = static_cast<uint8_t>(mySourceChar - 0x21) <= (0x7e - 0x21); + trailIsOk = static_cast<uint8_t>(trailByte - 0x21) <= (0x7e - 0x21); if (leadIsOk && trailIsOk) { ++mySource; - tempState = (StateEnum)pToU2022State->cs[pToU2022State->g]; + tempState = static_cast<StateEnum>(pToU2022State->cs[pToU2022State->g]); if(tempState >= CNS_11643_0) { cnv = myData->myConverterArray[CNS_11643]; - tempBuf[0] = (char) (0x80+(tempState-CNS_11643_0)); - tempBuf[1] = (char) (mySourceChar); - tempBuf[2] = (char) trailByte; + tempBuf[0] = static_cast<char>(0x80 + (tempState - CNS_11643_0)); + tempBuf[1] = static_cast<char>(mySourceChar); + tempBuf[2] = static_cast<char>(trailByte); tempBufLen = 3; }else{ U_ASSERT(tempState<UCNV_2022_MAX_CONVERTERS); cnv = myData->myConverterArray[tempState]; - tempBuf[0] = (char) (mySourceChar); - tempBuf[1] = (char) trailByte; + tempBuf[0] = static_cast<char>(mySourceChar); + tempBuf[1] = static_cast<char>(trailByte); tempBufLen = 2; } targetUniChar = ucnv_MBCSSimpleGetNextUChar(cnv, tempBuf, tempBufLen, false); @@ -3410,41 +3411,41 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, pToU2022State->g=pToU2022State->prevG; } } else { - args->converter->toUBytes[0] = (uint8_t)mySourceChar; + args->converter->toUBytes[0] = static_cast<uint8_t>(mySourceChar); args->converter->toULength = 1; goto endloop; } } else{ if(mySourceChar <= 0x7f) { - targetUniChar = (char16_t) mySourceChar; + targetUniChar = static_cast<char16_t>(mySourceChar); } } break; } if(targetUniChar < (missingCharMarker-1/*0xfffe*/)){ if(args->offsets){ - args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); + args->offsets[myTarget - args->target] = static_cast<int32_t>(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); } - *(myTarget++)=(char16_t)targetUniChar; + *(myTarget++) = static_cast<char16_t>(targetUniChar); } else if(targetUniChar > missingCharMarker){ /* disassemble the surrogate pair and write to output*/ targetUniChar-=0x0010000; - *myTarget = (char16_t)(0xd800+(char16_t)(targetUniChar>>10)); + *myTarget = static_cast<char16_t>(0xd800 + static_cast<char16_t>(targetUniChar >> 10)); if(args->offsets){ - args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); + args->offsets[myTarget - args->target] = static_cast<int32_t>(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); } ++myTarget; if(myTarget< args->targetLimit){ - *myTarget = (char16_t)(0xdc00+(char16_t)(targetUniChar&0x3ff)); + *myTarget = static_cast<char16_t>(0xdc00 + static_cast<char16_t>(targetUniChar & 0x3ff)); if(args->offsets){ - args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); + args->offsets[myTarget - args->target] = static_cast<int32_t>(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2)); } ++myTarget; }else{ args->converter->UCharErrorBuffer[args->converter->UCharErrorBufferLength++]= - (char16_t)(0xdc00+(char16_t)(targetUniChar&0x3ff)); + static_cast<char16_t>(0xdc00 + static_cast<char16_t>(targetUniChar & 0x3ff)); } } @@ -3468,13 +3469,13 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, static void U_CALLCONV _ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err) { UConverter *cnv = args->converter; - UConverterDataISO2022 *myConverterData=(UConverterDataISO2022 *) cnv->extraInfo; + UConverterDataISO2022* myConverterData = static_cast<UConverterDataISO2022*>(cnv->extraInfo); ISO2022State *pFromU2022State=&myConverterData->fromU2022State; char *p, *subchar; char buffer[8]; int32_t length; - subchar=(char *)cnv->subChars; + subchar = reinterpret_cast<char*>(cnv->subChars); length=cnv->subCharLen; /* assume length==1 for most variants */ p = buffer; @@ -3492,7 +3493,7 @@ _ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorC cs = pFromU2022State->cs[0]; if(cs != ASCII && cs != JISX201) { /* not in ASCII or JIS X 0201: switch to ASCII */ - pFromU2022State->cs[0] = (int8_t)ASCII; + pFromU2022State->cs[0] = static_cast<int8_t>(ASCII); *p++ = '\x1b'; *p++ = '\x28'; *p++ = '\x42'; @@ -3534,8 +3535,8 @@ _ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorC int8_t currentSubCharLen = myConverterData->currentConverter->subCharLen; /* set our substitution string into the subconverter */ - myConverterData->currentConverter->subChars = (uint8_t *)subchar; - myConverterData->currentConverter->subCharLen = (int8_t)length; + myConverterData->currentConverter->subChars = reinterpret_cast<uint8_t*>(subchar); + myConverterData->currentConverter->subCharLen = static_cast<int8_t>(length); /* let the subconverter write the subchar, set/retrieve fromUChar32 state */ args->converter = myConverterData->currentConverter; @@ -3565,7 +3566,7 @@ _ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorC break; } ucnv_cbFromUWriteBytes(args, - buffer, (int32_t)(p - buffer), + buffer, static_cast<int32_t>(p - buffer), offsetIndex, err); } @@ -3656,7 +3657,7 @@ _ISO_2022_GetUnicodeSet(const UConverter *cnv, } #endif - cnvData = (UConverterDataISO2022*)cnv->extraInfo; + cnvData = static_cast<UConverterDataISO2022*>(cnv->extraInfo); /* open a set and initialize it with code points that are algorithmically round-tripped */ switch(cnvData->locale[0]){ diff --git a/deps/icu-small/source/common/ucnv_bld.cpp b/deps/icu-small/source/common/ucnv_bld.cpp index 564b645bed7648..1e768ae22411de 100644 --- a/deps/icu-small/source/common/ucnv_bld.cpp +++ b/deps/icu-small/source/common/ucnv_bld.cpp @@ -231,7 +231,7 @@ static void ucnv_flushAvailableConverterCache() { gAvailableConverterCount = 0; if (gAvailableConverters) { - uprv_free((char **)gAvailableConverters); + uprv_free(const_cast<char**>(gAvailableConverters)); gAvailableConverters = nullptr; } gAvailableConvertersInitOnce.reset(); @@ -270,7 +270,7 @@ static UBool U_CALLCONV isCnvAcceptable(void * /*context*/, const char * /*type*/, const char * /*name*/, const UDataInfo *pInfo) { - return (UBool)( + return pInfo->size>=20 && pInfo->isBigEndian==U_IS_BIG_ENDIAN && pInfo->charsetFamily==U_CHARSET_FAMILY && @@ -279,7 +279,7 @@ isCnvAcceptable(void * /*context*/, pInfo->dataFormat[1]==0x6e && pInfo->dataFormat[2]==0x76 && pInfo->dataFormat[3]==0x74 && - pInfo->formatVersion[0]==6); /* Everything will be version 6 */ + pInfo->formatVersion[0]==6; /* Everything will be version 6 */ } /** @@ -289,15 +289,15 @@ static UConverterSharedData* ucnv_data_unFlattenClone(UConverterLoadArgs *pArgs, UDataMemory *pData, UErrorCode *status) { /* UDataInfo info; -- necessary only if some converters have different formatVersion */ - const uint8_t *raw = (const uint8_t *)udata_getMemory(pData); - const UConverterStaticData *source = (const UConverterStaticData *) raw; + const uint8_t* raw = static_cast<const uint8_t*>(udata_getMemory(pData)); + const UConverterStaticData* source = reinterpret_cast<const UConverterStaticData*>(raw); UConverterSharedData *data; - UConverterType type = (UConverterType)source->conversionType; + UConverterType type = static_cast<UConverterType>(source->conversionType); if(U_FAILURE(*status)) return nullptr; - if( (uint16_t)type >= UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES || + if (static_cast<uint16_t>(type) >= UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES || converterData[type] == nullptr || !converterData[type]->isReferenceCounted || converterData[type]->referenceCounter != 1 || @@ -307,7 +307,7 @@ ucnv_data_unFlattenClone(UConverterLoadArgs *pArgs, UDataMemory *pData, UErrorCo return nullptr; } - data = (UConverterSharedData *)uprv_malloc(sizeof(UConverterSharedData)); + data = static_cast<UConverterSharedData*>(uprv_malloc(sizeof(UConverterSharedData))); if(data == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -397,7 +397,7 @@ getAlgorithmicTypeFromName(const char *realName) lastMid = UINT32_MAX; for (;;) { - mid = (uint32_t)((start + limit) / 2); + mid = (start + limit) / 2; if (lastMid == mid) { /* Have we moved? */ break; /* We haven't moved, and it wasn't found. */ } @@ -491,7 +491,7 @@ ucnv_getSharedConverterData(const char *name) { UConverterSharedData *rc; - rc = (UConverterSharedData*)uhash_get(SHARED_DATA_HASHTABLE, name); + rc = static_cast<UConverterSharedData*>(uhash_get(SHARED_DATA_HASHTABLE, name)); UCNV_DEBUG_LOG("get",name,rc); return rc; } @@ -682,8 +682,8 @@ parseConverterOptions(const char *inName, if(c==0) { pArgs->options=(pPieces->options&=~UCNV_OPTION_VERSION); return; - } else if((uint8_t)(c-'0')<10) { - pArgs->options=pPieces->options=(pPieces->options&~UCNV_OPTION_VERSION)|(uint32_t)(c-'0'); + } else if (static_cast<uint8_t>(c - '0') < 10) { + pArgs->options = pPieces->options = (pPieces->options & ~UCNV_OPTION_VERSION) | static_cast<uint32_t>(c - '0'); ++inName; } } else if(uprv_strncmp(inName, "swaplfnl", 8)==0) { @@ -909,7 +909,7 @@ ucnv_createAlgorithmicConverter(UConverter *myUConverter, stackArgs.options = options; stackArgs.locale=locale; cnv = ucnv_createConverterFromSharedData( - myUConverter, (UConverterSharedData *)sharedData, + myUConverter, const_cast<UConverterSharedData*>(sharedData), &stackArgs, err); UTRACE_EXIT_PTR_STATUS(cnv, *err); @@ -1112,7 +1112,7 @@ static void U_CALLCONV initAvailableConvertersList(UErrorCode &errCode) { } /* We can't have more than "*converterTable" converters to open */ - gAvailableConverters = (const char **) uprv_malloc(allConverterCount * sizeof(char*)); + gAvailableConverters = static_cast<const char**>(uprv_malloc(allConverterCount * sizeof(char*))); if (!gAvailableConverters) { errCode = U_MEMORY_ALLOCATION_ERROR; return; @@ -1440,7 +1440,7 @@ ucnv_swap(const UDataSwapper *ds, MBCS_OPT_UNKNOWN_INCOMPATIBLE_MASK)==0 ) { mbcsHeaderLength=mbcsHeader.options&MBCS_OPT_LENGTH_MASK; - noFromU=(UBool)((mbcsHeader.options&MBCS_OPT_NO_FROM_U)!=0); + noFromU = (mbcsHeader.options & MBCS_OPT_NO_FROM_U) != 0; } else { udata_printError(ds, "ucnv_swap(): unsupported _MBCSHeader.version %d.%d\n", inMBCSHeader->version[0], inMBCSHeader->version[1]); diff --git a/deps/icu-small/source/common/ucnv_ct.cpp b/deps/icu-small/source/common/ucnv_ct.cpp index 46f30e5ece6d8c..aa0a6a1169b421 100644 --- a/deps/icu-small/source/common/ucnv_ct.cpp +++ b/deps/icu-small/source/common/ucnv_ct.cpp @@ -368,7 +368,7 @@ UConverter_fromUnicode_CompoundText_OFFSETS(UConverterFromUnicodeArgs* args, UEr /*look ahead to find the trail surrogate*/ if(source < sourceLimit) { /* test the following code unit */ - char16_t trail=(char16_t) *source; + char16_t trail = *source; if(U16_IS_TRAIL(trail)) { source++; sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail); diff --git a/deps/icu-small/source/common/ucnv_ext.cpp b/deps/icu-small/source/common/ucnv_ext.cpp index 10d00a62c2ce06..1f12d05b265e61 100644 --- a/deps/icu-small/source/common/ucnv_ext.cpp +++ b/deps/icu-small/source/common/ucnv_ext.cpp @@ -41,8 +41,8 @@ ucnv_extFindToU(const uint32_t *toUSection, int32_t length, uint8_t byte) { int32_t i, start, limit; /* check the input byte against the lowest and highest section bytes */ - start=(int32_t)UCNV_EXT_TO_U_GET_BYTE(toUSection[0]); - limit=(int32_t)UCNV_EXT_TO_U_GET_BYTE(toUSection[length-1]); + start = static_cast<int32_t>(UCNV_EXT_TO_U_GET_BYTE(toUSection[0])); + limit = static_cast<int32_t>(UCNV_EXT_TO_U_GET_BYTE(toUSection[length - 1])); if(byte<start || limit<byte) { return 0; /* the byte is out of range */ } @@ -180,9 +180,9 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState, /* match pre[] then src[] */ if(i<preLength) { - b=(uint8_t)pre[i++]; + b = static_cast<uint8_t>(pre[i++]); } else if(j<srcLength) { - b=(uint8_t)src[j++]; + b = static_cast<uint8_t>(src[j++]); } else { /* all input consumed, partial match */ if(flush || (length=(i+j))>UCNV_EXT_MAX_BYTES) { @@ -206,7 +206,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState, } else { if(UCNV_EXT_TO_U_IS_PARTIAL(value)) { /* partial match, continue */ - idx=(int32_t)UCNV_EXT_TO_U_GET_PARTIAL_INDEX(value); + idx = static_cast<int32_t>(UCNV_EXT_TO_U_GET_PARTIAL_INDEX(value)); } else { if( (UCNV_EXT_TO_U_IS_ROUNDTRIP(value) || TO_U_USE_FALLBACK(useFallback)) && @@ -572,7 +572,7 @@ ucnv_extMatchFromU(const int32_t *cx, if(UCNV_EXT_TO_U_IS_PARTIAL(value)) { /* partial match, enter the loop below */ - idx=(int32_t)UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value); + idx = static_cast<int32_t>(UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value)); /* initialize */ fromUTableUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, char16_t); @@ -627,7 +627,7 @@ ucnv_extMatchFromU(const int32_t *cx, value=fromUSectionValues[idx]; if(UCNV_EXT_FROM_U_IS_PARTIAL(value)) { /* partial match, continue */ - idx=(int32_t)UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value); + idx = static_cast<int32_t>(UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value)); } else { if(extFromUUseMapping(useFallback, value, firstCP)) { /* full match, stop with result */ @@ -679,7 +679,7 @@ ucnv_extWriteFromU(UConverter *cnv, const int32_t *cx, int32_t length, prevLength; length=UCNV_EXT_FROM_U_GET_LENGTH(value); - value=(uint32_t)UCNV_EXT_FROM_U_GET_DATA(value); + value = UCNV_EXT_FROM_U_GET_DATA(value); /* output the result */ if(length<=UCNV_EXT_FROM_U_MAX_DIRECT_LENGTH) { @@ -692,13 +692,13 @@ ucnv_extWriteFromU(UConverter *cnv, const int32_t *cx, uint8_t *p=buffer+1; /* reserve buffer[0] for shiftByte below */ switch(length) { case 3: - *p++=(uint8_t)(value>>16); + *p++ = static_cast<uint8_t>(value >> 16); U_FALLTHROUGH; case 2: - *p++=(uint8_t)(value>>8); + *p++ = static_cast<uint8_t>(value >> 8); U_FALLTHROUGH; case 1: - *p++=(uint8_t)value; + *p++ = static_cast<uint8_t>(value); U_FALLTHROUGH; default: break; /* will never occur */ @@ -716,11 +716,11 @@ ucnv_extWriteFromU(UConverter *cnv, const int32_t *cx, if(prevLength>1 && length==1) { /* change from double-byte mode to single-byte */ - shiftByte=(uint8_t)UCNV_SI; + shiftByte = static_cast<uint8_t>(UCNV_SI); cnv->fromUnicodeStatus=1; } else if(prevLength==1 && length>1) { /* change from single-byte mode to double-byte */ - shiftByte=(uint8_t)UCNV_SO; + shiftByte = static_cast<uint8_t>(UCNV_SO); cnv->fromUnicodeStatus=2; } else { shiftByte=0; @@ -737,7 +737,7 @@ ucnv_extWriteFromU(UConverter *cnv, const int32_t *cx, } } - ucnv_fromUWriteBytes(cnv, (const char *)result, length, + ucnv_fromUWriteBytes(cnv, reinterpret_cast<const char*>(result), length, target, targetLimit, offsets, srcIndex, pErrorCode); @@ -830,7 +830,7 @@ ucnv_extSimpleMatchFromU(const int32_t *cx, isRoundtrip=UCNV_EXT_FROM_U_IS_ROUNDTRIP(value); length=UCNV_EXT_FROM_U_GET_LENGTH(value); - value=(uint32_t)UCNV_EXT_FROM_U_GET_DATA(value); + value = UCNV_EXT_FROM_U_GET_DATA(value); if(length<=UCNV_EXT_FROM_U_MAX_DIRECT_LENGTH) { *pValue=value; @@ -1018,7 +1018,7 @@ ucnv_extGetUnicodeSetString(const UConverterSharedData *sharedData, ucnv_extGetUnicodeSetString( sharedData, cx, sa, which, minLength, firstCP, s, length+1, - (int32_t)UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value), + static_cast<int32_t>(UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value)), pErrorCode); } else if(extSetUseMapping(which, minLength, value)) { sa->addString(sa->set, s, length+1); diff --git a/deps/icu-small/source/common/ucnv_io.cpp b/deps/icu-small/source/common/ucnv_io.cpp index 48bb5be42bd59f..7207de397eb1a6 100644 --- a/deps/icu-small/source/common/ucnv_io.cpp +++ b/deps/icu-small/source/common/ucnv_io.cpp @@ -205,7 +205,7 @@ static UBool U_CALLCONV isAcceptable(void * /*context*/, const char * /*type*/, const char * /*name*/, const UDataInfo *pInfo) { - return (UBool)( + return pInfo->size>=20 && pInfo->isBigEndian==U_IS_BIG_ENDIAN && pInfo->charsetFamily==U_CHARSET_FAMILY && @@ -213,7 +213,7 @@ isAcceptable(void * /*context*/, pInfo->dataFormat[1]==0x76 && pInfo->dataFormat[2]==0x41 && pInfo->dataFormat[3]==0x6c && - pInfo->formatVersion[0]==3); + pInfo->formatVersion[0]==3; } static UBool U_CALLCONV ucnv_io_cleanup() @@ -244,8 +244,8 @@ static void U_CALLCONV initAliasData(UErrorCode &errCode) { return; } - sectionSizes = (const uint32_t *)udata_getMemory(data); - table = (const uint16_t *)sectionSizes; + sectionSizes = static_cast<const uint32_t*>(udata_getMemory(data)); + table = reinterpret_cast<const uint16_t*>(sectionSizes); tableStart = sectionSizes[0]; if (tableStart < minTocLength) { @@ -289,10 +289,10 @@ static void U_CALLCONV initAliasData(UErrorCode &errCode) { currOffset += gMainTable.taggedAliasListsSize; if (gMainTable.optionTableSize > 0 - && ((const UConverterAliasOptions *)(table + currOffset))->stringNormalizationType < UCNV_IO_NORM_TYPE_COUNT) + && reinterpret_cast<const UConverterAliasOptions*>(table + currOffset)->stringNormalizationType < UCNV_IO_NORM_TYPE_COUNT) { /* Faster table */ - gMainTable.optionTable = (const UConverterAliasOptions *)(table + currOffset); + gMainTable.optionTable = reinterpret_cast<const UConverterAliasOptions*>(table + currOffset); } else { /* Smaller table, or I can't handle this normalization mode! @@ -321,7 +321,7 @@ isAlias(const char *alias, UErrorCode *pErrorCode) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return false; } - return (UBool)(*alias!=0); + return *alias != 0; } static uint32_t getTagNumber(const char *tagname) { @@ -574,7 +574,7 @@ findConverter(const char *alias, UBool *containsOption, UErrorCode *pErrorCode) lastMid = UINT32_MAX; for (;;) { - mid = (uint32_t)((start + limit) / 2); + mid = (start + limit) / 2; if (lastMid == mid) { /* Have we moved? */ break; /* We haven't moved, and it wasn't found. */ } @@ -601,8 +601,8 @@ findConverter(const char *alias, UBool *containsOption, UErrorCode *pErrorCode) /* State whether the canonical converter name contains an option. This information is contained in this list in order to maintain backward & forward compatibility. */ if (containsOption) { - UBool containsCnvOptionInfo = (UBool)gMainTable.optionTable->containsCnvOptionInfo; - *containsOption = (UBool)((containsCnvOptionInfo + UBool containsCnvOptionInfo = static_cast<UBool>(gMainTable.optionTable->containsCnvOptionInfo); + *containsOption = static_cast<UBool>((containsCnvOptionInfo && ((gMainTable.untaggedConvArray[mid] & UCNV_CONTAINS_OPTION_BIT) != 0)) || !containsCnvOptionInfo); } @@ -939,7 +939,7 @@ static uint16_t ucnv_io_countStandards(UErrorCode *pErrorCode) { if (haveAliasData(pErrorCode)) { /* Don't include the empty list */ - return (uint16_t)(gMainTable.tagListSize - UCNV_NUM_HIDDEN_TAGS); + return static_cast<uint16_t>(gMainTable.tagListSize - UCNV_NUM_HIDDEN_TAGS); } return 0; @@ -1130,8 +1130,9 @@ io_compareRows(const void *context, const void *left, const void *right) { TempAliasTable *tempTable=(TempAliasTable *)context; const char *chars=tempTable->chars; - return (int32_t)uprv_strcmp(tempTable->stripForCompare(strippedLeft, chars+2*((const TempRow *)left)->strIndex), - tempTable->stripForCompare(strippedRight, chars+2*((const TempRow *)right)->strIndex)); + return static_cast<int32_t>(uprv_strcmp( + tempTable->stripForCompare(strippedLeft, chars + 2 * static_cast<const TempRow*>(left)->strIndex), + tempTable->stripForCompare(strippedRight, chars + 2 * static_cast<const TempRow*>(right)->strIndex))); } U_CAPI int32_t U_EXPORT2 diff --git a/deps/icu-small/source/common/ucnv_lmb.cpp b/deps/icu-small/source/common/ucnv_lmb.cpp index ab14a119efb8e8..bbcf2d579aad85 100644 --- a/deps/icu-small/source/common/ucnv_lmb.cpp +++ b/deps/icu-small/source/common/ucnv_lmb.cpp @@ -633,7 +633,7 @@ _LMBCSOpenWorker(UConverter* _this, UErrorCode* err, ulmbcs_byte_t OptGroup) { - UConverterDataLMBCS * extraInfo = (UConverterDataLMBCS*)uprv_malloc (sizeof (UConverterDataLMBCS)); + UConverterDataLMBCS* extraInfo = static_cast<UConverterDataLMBCS*>(uprv_malloc(sizeof(UConverterDataLMBCS))); _this->extraInfo = extraInfo; if(extraInfo != nullptr) { diff --git a/deps/icu-small/source/common/ucnv_u16.cpp b/deps/icu-small/source/common/ucnv_u16.cpp index c3bcfef50cb5c3..a5963e1202cb2f 100644 --- a/deps/icu-small/source/common/ucnv_u16.cpp +++ b/deps/icu-small/source/common/ucnv_u16.cpp @@ -236,10 +236,10 @@ _UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* output length bytes with overflow (length>targetCapacity>0) */ ucnv_fromUWriteBytes(cnv, overflow, length, - (char **)&target, pArgs->targetLimit, + &target, pArgs->targetLimit, &offsets, sourceIndex, pErrorCode); - targetCapacity=(uint32_t)(pArgs->targetLimit-(char *)target); + targetCapacity = static_cast<uint32_t>(pArgs->targetLimit - target); } if(U_SUCCESS(*pErrorCode) && source<pArgs->sourceLimit && targetCapacity==0) { @@ -248,7 +248,7 @@ _UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* write back the updated pointers */ pArgs->source=source; - pArgs->target=(char *)target; + pArgs->target = target; pArgs->offsets=offsets; } @@ -840,7 +840,7 @@ _UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, &target, pArgs->targetLimit, &offsets, sourceIndex, pErrorCode); - targetCapacity=(uint32_t)(pArgs->targetLimit-(char *)target); + targetCapacity = static_cast<uint32_t>(pArgs->targetLimit - target); } if(U_SUCCESS(*pErrorCode) && source<pArgs->sourceLimit && targetCapacity==0) { diff --git a/deps/icu-small/source/common/ucnv_u8.cpp b/deps/icu-small/source/common/ucnv_u8.cpp index cf3bb22a02a7f7..cca6e603ae3232 100644 --- a/deps/icu-small/source/common/ucnv_u8.cpp +++ b/deps/icu-small/source/common/ucnv_u8.cpp @@ -49,8 +49,8 @@ U_CFUNC void ucnv_fromUnicode_UTF8_OFFSETS_LOGIC(UConverterFromUnicodeArgs *args #define MAXIMUM_UCS2 0x0000FFFF static const uint32_t offsetsFromUTF8[5] = {0, - (uint32_t) 0x00000000, (uint32_t) 0x00003080, (uint32_t) 0x000E2080, - (uint32_t) 0x03C82080 + static_cast<uint32_t>(0x00000000), static_cast<uint32_t>(0x00003080), + static_cast<uint32_t>(0x000E2080), static_cast<uint32_t>(0x03C82080) }; static UBool hasCESU8Data(const UConverter *cnv) @@ -58,7 +58,7 @@ static UBool hasCESU8Data(const UConverter *cnv) #if UCONFIG_ONLY_HTML_CONVERSION return false; #else - return (UBool)(cnv->sharedData == &_CESU8Data); + return cnv->sharedData == &_CESU8Data; #endif } U_CDECL_BEGIN @@ -571,7 +571,7 @@ static UChar32 U_CALLCONV ucnv_getNextUChar_UTF8(UConverterToUnicodeArgs *args, return 0xffff; } - myByte = (uint8_t)*(source++); + myByte = *(source++); if (U8_IS_SINGLE(myByte)) { args->source = (const char *)source; diff --git a/deps/icu-small/source/common/ucnvbocu.cpp b/deps/icu-small/source/common/ucnvbocu.cpp index 3b736aa1e90818..5c9bb3ac456aef 100644 --- a/deps/icu-small/source/common/ucnvbocu.cpp +++ b/deps/icu-small/source/common/ucnvbocu.cpp @@ -338,7 +338,7 @@ packDiff(int32_t diff) { */ result|=BOCU1_TRAIL_TO_BYTE(diff)<<16; - result|=((uint32_t)BOCU1_START_POS_4)<<24; + result |= static_cast<uint32_t>(BOCU1_START_POS_4) << 24; } } else { /* two- to four-byte negative differences */ @@ -405,13 +405,13 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, cnv=pArgs->converter; source=pArgs->source; sourceLimit=pArgs->sourceLimit; - target=(uint8_t *)pArgs->target; - targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target); + target = reinterpret_cast<uint8_t*>(pArgs->target); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target); offsets=pArgs->offsets; /* get the converter state from UConverter */ c=cnv->fromUChar32; - prev=(int32_t)cnv->fromUnicodeStatus; + prev = static_cast<int32_t>(cnv->fromUnicodeStatus); if(prev==0) { prev=BOCU1_ASCII_PREV; } @@ -428,7 +428,7 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, fastSingle: /* fast loop for single-byte differences */ /* use only one loop counter variable, targetCapacity, not also source */ - diff=(int32_t)(sourceLimit-source); + diff = static_cast<int32_t>(sourceLimit - source); if(targetCapacity>diff) { targetCapacity=diff; } @@ -437,7 +437,7 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, if(c!=0x20) { prev=BOCU1_ASCII_PREV; } - *target++=(uint8_t)c; + *target++ = static_cast<uint8_t>(c); *offsets++=nextSourceIndex++; ++source; --targetCapacity; @@ -445,7 +445,7 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, diff=c-prev; if(DIFF_IS_SINGLE(diff)) { prev=BOCU1_SIMPLE_PREV(c); - *target++=(uint8_t)PACK_SINGLE_DIFF(diff); + *target++ = static_cast<uint8_t>(PACK_SINGLE_DIFF(diff)); *offsets++=nextSourceIndex++; ++source; --targetCapacity; @@ -455,7 +455,7 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, } } /* restore real values */ - targetCapacity=(int32_t)((const uint8_t *)pArgs->targetLimit-target); + targetCapacity = static_cast<int32_t>(reinterpret_cast<const uint8_t*>(pArgs->targetLimit) - target); sourceIndex=nextSourceIndex; /* wrong if offsets==nullptr but does not matter */ /* regular loop for all cases */ @@ -473,7 +473,7 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, if(c!=0x20) { prev=BOCU1_ASCII_PREV; } - *target++=(uint8_t)c; + *target++ = static_cast<uint8_t>(c); *offsets++=sourceIndex; --targetCapacity; @@ -510,7 +510,7 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, diff=c-prev; prev=BOCU1_PREV(c); if(DIFF_IS_SINGLE(diff)) { - *target++=(uint8_t)PACK_SINGLE_DIFF(diff); + *target++ = static_cast<uint8_t>(PACK_SINGLE_DIFF(diff)); *offsets++=sourceIndex; --targetCapacity; sourceIndex=nextSourceIndex; @@ -531,8 +531,8 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m); diff+=BOCU1_START_NEG_2; } - *target++=(uint8_t)diff; - *target++=(uint8_t)BOCU1_TRAIL_TO_BYTE(m); + *target++ = static_cast<uint8_t>(diff); + *target++ = static_cast<uint8_t>(BOCU1_TRAIL_TO_BYTE(m)); *offsets++=sourceIndex; *offsets++=sourceIndex; targetCapacity-=2; @@ -549,18 +549,18 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, switch(length) { /* each branch falls through to the next one */ case 4: - *target++=(uint8_t)(diff>>24); + *target++ = static_cast<uint8_t>(diff >> 24); *offsets++=sourceIndex; U_FALLTHROUGH; case 3: - *target++=(uint8_t)(diff>>16); + *target++ = static_cast<uint8_t>(diff >> 16); *offsets++=sourceIndex; U_FALLTHROUGH; case 2: - *target++=(uint8_t)(diff>>8); + *target++ = static_cast<uint8_t>(diff >> 8); *offsets++=sourceIndex; /* case 1: handled above */ - *target++=(uint8_t)diff; + *target++ = static_cast<uint8_t>(diff); *offsets++=sourceIndex; U_FALLTHROUGH; default: @@ -584,34 +584,34 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, switch(length) { /* each branch falls through to the next one */ case 3: - *charErrorBuffer++=(uint8_t)(diff>>16); + *charErrorBuffer++ = static_cast<uint8_t>(diff >> 16); U_FALLTHROUGH; case 2: - *charErrorBuffer++=(uint8_t)(diff>>8); + *charErrorBuffer++ = static_cast<uint8_t>(diff >> 8); U_FALLTHROUGH; case 1: - *charErrorBuffer=(uint8_t)diff; + *charErrorBuffer = static_cast<uint8_t>(diff); U_FALLTHROUGH; default: /* will never occur */ break; } - cnv->charErrorBufferLength=(int8_t)length; + cnv->charErrorBufferLength = static_cast<int8_t>(length); /* now output what fits into the regular target */ diff>>=8*length; /* length was reduced by targetCapacity */ switch(targetCapacity) { /* each branch falls through to the next one */ case 3: - *target++=(uint8_t)(diff>>16); + *target++ = static_cast<uint8_t>(diff >> 16); *offsets++=sourceIndex; U_FALLTHROUGH; case 2: - *target++=(uint8_t)(diff>>8); + *target++ = static_cast<uint8_t>(diff >> 8); *offsets++=sourceIndex; U_FALLTHROUGH; case 1: - *target++=(uint8_t)diff; + *target++ = static_cast<uint8_t>(diff); *offsets++=sourceIndex; U_FALLTHROUGH; default: @@ -634,11 +634,11 @@ _Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* set the converter state back into UConverter */ cnv->fromUChar32= c<0 ? -c : 0; - cnv->fromUnicodeStatus=(uint32_t)prev; + cnv->fromUnicodeStatus = static_cast<uint32_t>(prev); /* write back the updated pointers */ pArgs->source=source; - pArgs->target=(char *)target; + pArgs->target = reinterpret_cast<char*>(target); pArgs->offsets=offsets; } @@ -663,12 +663,12 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, cnv=pArgs->converter; source=pArgs->source; sourceLimit=pArgs->sourceLimit; - target=(uint8_t *)pArgs->target; - targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target); + target = reinterpret_cast<uint8_t*>(pArgs->target); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target); /* get the converter state from UConverter */ c=cnv->fromUChar32; - prev=(int32_t)cnv->fromUnicodeStatus; + prev = static_cast<int32_t>(cnv->fromUnicodeStatus); if(prev==0) { prev=BOCU1_ASCII_PREV; } @@ -681,7 +681,7 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, fastSingle: /* fast loop for single-byte differences */ /* use only one loop counter variable, targetCapacity, not also source */ - diff=(int32_t)(sourceLimit-source); + diff = static_cast<int32_t>(sourceLimit - source); if(targetCapacity>diff) { targetCapacity=diff; } @@ -690,12 +690,12 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, if(c!=0x20) { prev=BOCU1_ASCII_PREV; } - *target++=(uint8_t)c; + *target++ = static_cast<uint8_t>(c); } else { diff=c-prev; if(DIFF_IS_SINGLE(diff)) { prev=BOCU1_SIMPLE_PREV(c); - *target++=(uint8_t)PACK_SINGLE_DIFF(diff); + *target++ = static_cast<uint8_t>(PACK_SINGLE_DIFF(diff)); } else { break; } @@ -704,7 +704,7 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, --targetCapacity; } /* restore real values */ - targetCapacity=(int32_t)((const uint8_t *)pArgs->targetLimit-target); + targetCapacity = static_cast<int32_t>(reinterpret_cast<const uint8_t*>(pArgs->targetLimit) - target); /* regular loop for all cases */ while(source<sourceLimit) { @@ -720,7 +720,7 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, if(c!=0x20) { prev=BOCU1_ASCII_PREV; } - *target++=(uint8_t)c; + *target++ = static_cast<uint8_t>(c); --targetCapacity; continue; } @@ -753,7 +753,7 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, diff=c-prev; prev=BOCU1_PREV(c); if(DIFF_IS_SINGLE(diff)) { - *target++=(uint8_t)PACK_SINGLE_DIFF(diff); + *target++ = static_cast<uint8_t>(PACK_SINGLE_DIFF(diff)); --targetCapacity; if(c<0x3000) { goto fastSingle; @@ -772,8 +772,8 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m); diff+=BOCU1_START_NEG_2; } - *target++=(uint8_t)diff; - *target++=(uint8_t)BOCU1_TRAIL_TO_BYTE(m); + *target++ = static_cast<uint8_t>(diff); + *target++ = static_cast<uint8_t>(BOCU1_TRAIL_TO_BYTE(m)); targetCapacity-=2; } else { int32_t length; /* will be 2..4 */ @@ -787,14 +787,14 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, switch(length) { /* each branch falls through to the next one */ case 4: - *target++=(uint8_t)(diff>>24); + *target++ = static_cast<uint8_t>(diff >> 24); U_FALLTHROUGH; case 3: - *target++=(uint8_t)(diff>>16); + *target++ = static_cast<uint8_t>(diff >> 16); /* case 2: handled above */ - *target++=(uint8_t)(diff>>8); + *target++ = static_cast<uint8_t>(diff >> 8); /* case 1: handled above */ - *target++=(uint8_t)diff; + *target++ = static_cast<uint8_t>(diff); U_FALLTHROUGH; default: /* will never occur */ @@ -816,32 +816,32 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, switch(length) { /* each branch falls through to the next one */ case 3: - *charErrorBuffer++=(uint8_t)(diff>>16); + *charErrorBuffer++ = static_cast<uint8_t>(diff >> 16); U_FALLTHROUGH; case 2: - *charErrorBuffer++=(uint8_t)(diff>>8); + *charErrorBuffer++ = static_cast<uint8_t>(diff >> 8); U_FALLTHROUGH; case 1: - *charErrorBuffer=(uint8_t)diff; + *charErrorBuffer = static_cast<uint8_t>(diff); U_FALLTHROUGH; default: /* will never occur */ break; } - cnv->charErrorBufferLength=(int8_t)length; + cnv->charErrorBufferLength = static_cast<int8_t>(length); /* now output what fits into the regular target */ diff>>=8*length; /* length was reduced by targetCapacity */ switch(targetCapacity) { /* each branch falls through to the next one */ case 3: - *target++=(uint8_t)(diff>>16); + *target++ = static_cast<uint8_t>(diff >> 16); U_FALLTHROUGH; case 2: - *target++=(uint8_t)(diff>>8); + *target++ = static_cast<uint8_t>(diff >> 8); U_FALLTHROUGH; case 1: - *target++=(uint8_t)diff; + *target++ = static_cast<uint8_t>(diff); U_FALLTHROUGH; default: /* will never occur */ @@ -863,11 +863,11 @@ _Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs, /* set the converter state back into UConverter */ cnv->fromUChar32= c<0 ? -c : 0; - cnv->fromUnicodeStatus=(uint32_t)prev; + cnv->fromUnicodeStatus = static_cast<uint32_t>(prev); /* write back the updated pointers */ pArgs->source=source; - pArgs->target=(char *)target; + pArgs->target = reinterpret_cast<char*>(target); } /* BOCU-1-to-Unicode conversion functions ----------------------------------- */ @@ -887,11 +887,11 @@ decodeBocu1LeadByte(int32_t b) { /* positive difference */ if(b<BOCU1_START_POS_3) { /* two bytes */ - diff=((int32_t)b-BOCU1_START_POS_2)*BOCU1_TRAIL_COUNT+BOCU1_REACH_POS_1+1; + diff = (b - BOCU1_START_POS_2) * BOCU1_TRAIL_COUNT + BOCU1_REACH_POS_1 + 1; count=1; } else if(b<BOCU1_START_POS_4) { /* three bytes */ - diff=((int32_t)b-BOCU1_START_POS_3)*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT+BOCU1_REACH_POS_2+1; + diff = (b - BOCU1_START_POS_3) * BOCU1_TRAIL_COUNT * BOCU1_TRAIL_COUNT + BOCU1_REACH_POS_2 + 1; count=2; } else { /* four bytes */ @@ -902,11 +902,11 @@ decodeBocu1LeadByte(int32_t b) { /* negative difference */ if(b>=BOCU1_START_NEG_3) { /* two bytes */ - diff=((int32_t)b-BOCU1_START_NEG_2)*BOCU1_TRAIL_COUNT+BOCU1_REACH_NEG_1; + diff = (b - BOCU1_START_NEG_2) * BOCU1_TRAIL_COUNT + BOCU1_REACH_NEG_1; count=1; } else if(b>BOCU1_MIN) { /* three bytes */ - diff=((int32_t)b-BOCU1_START_NEG_3)*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT+BOCU1_REACH_NEG_2; + diff = (b - BOCU1_START_NEG_3) * BOCU1_TRAIL_COUNT * BOCU1_TRAIL_COUNT + BOCU1_REACH_NEG_2; count=2; } else { /* four bytes */ @@ -916,7 +916,7 @@ decodeBocu1LeadByte(int32_t b) { } /* return the state for decoding the trail byte(s) */ - return ((uint32_t)diff<<2)|count; + return (static_cast<uint32_t>(diff) << 2) | count; } /** @@ -970,14 +970,14 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, /* set up the local pointers */ cnv=pArgs->converter; - source=(const uint8_t *)pArgs->source; - sourceLimit=(const uint8_t *)pArgs->sourceLimit; + source = reinterpret_cast<const uint8_t*>(pArgs->source); + sourceLimit = reinterpret_cast<const uint8_t*>(pArgs->sourceLimit); target=pArgs->target; targetLimit=pArgs->targetLimit; offsets=pArgs->offsets; /* get the converter state from UConverter */ - prev=(int32_t)cnv->toUnicodeStatus; + prev = static_cast<int32_t>(cnv->toUnicodeStatus); if(prev==0) { prev=BOCU1_ASCII_PREV; } @@ -1000,8 +1000,8 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, fastSingle: /* fast loop for single-byte differences */ /* use count as the only loop counter variable */ - diff=(int32_t)(sourceLimit-source); - count=(int32_t)(pArgs->targetLimit-target); + diff = static_cast<int32_t>(sourceLimit - source); + count = static_cast<int32_t>(pArgs->targetLimit - target); if(count>diff) { count=diff; } @@ -1009,7 +1009,7 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, if(BOCU1_START_NEG_2<=(c=*source) && c<BOCU1_START_POS_2) { c=prev+(c-BOCU1_MIDDLE); if(c<0x3000) { - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); *offsets++=nextSourceIndex++; prev=BOCU1_SIMPLE_PREV(c); } else { @@ -1019,7 +1019,7 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, if(c!=0x20) { prev=BOCU1_ASCII_PREV; } - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); *offsets++=nextSourceIndex++; } else { break; @@ -1043,7 +1043,7 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, /* Write a code point directly from a single-byte difference. */ c=prev+(c-BOCU1_MIDDLE); if(c<0x3000) { - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); *offsets++=sourceIndex; prev=BOCU1_SIMPLE_PREV(c); sourceIndex=nextSourceIndex; @@ -1057,22 +1057,22 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, if(c!=0x20) { prev=BOCU1_ASCII_PREV; } - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); *offsets++=sourceIndex; sourceIndex=nextSourceIndex; continue; } else if(BOCU1_START_NEG_3<=c && c<BOCU1_START_POS_3 && source<sourceLimit) { /* Optimize two-byte case. */ if(c>=BOCU1_MIDDLE) { - diff=((int32_t)c-BOCU1_START_POS_2)*BOCU1_TRAIL_COUNT+BOCU1_REACH_POS_1+1; + diff = (c - BOCU1_START_POS_2) * BOCU1_TRAIL_COUNT + BOCU1_REACH_POS_1 + 1; } else { - diff=((int32_t)c-BOCU1_START_NEG_2)*BOCU1_TRAIL_COUNT+BOCU1_REACH_NEG_1; + diff = (c - BOCU1_START_NEG_2) * BOCU1_TRAIL_COUNT + BOCU1_REACH_NEG_1; } /* trail byte */ ++nextSourceIndex; c=decodeBocu1TrailByte(1, *source++); - if(c<0 || (uint32_t)(c=prev+diff+c)>0x10ffff) { + if (c < 0 || static_cast<uint32_t>(c = prev + diff + c) > 0x10ffff) { bytes[0]=source[-2]; bytes[1]=source[-1]; byteIndex=2; @@ -1090,7 +1090,7 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, * with the partial difference value from the lead byte and * with the number of trail bytes. */ - bytes[0]=(uint8_t)c; + bytes[0] = static_cast<uint8_t>(c); byteIndex=1; diff=decodeBocu1LeadByte(c); @@ -1116,7 +1116,7 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, /* final trail byte, deliver a code point */ byteIndex=0; c=prev+diff; - if((uint32_t)c>0x10ffff) { + if (static_cast<uint32_t>(c) > 0x10ffff) { *pErrorCode=U_ILLEGAL_CHAR_FOUND; goto endloop; } @@ -1128,7 +1128,7 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, /* calculate the next prev and output c */ prev=BOCU1_PREV(c); if(c<=0xffff) { - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); *offsets++=sourceIndex; } else { /* output surrogate pair */ @@ -1156,13 +1156,13 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, cnv->mode=0; } else { /* set the converter state back into UConverter */ - cnv->toUnicodeStatus=(uint32_t)prev; - cnv->mode=(int32_t)((uint32_t)diff<<2)|count; + cnv->toUnicodeStatus = static_cast<uint32_t>(prev); + cnv->mode = static_cast<int32_t>(static_cast<uint32_t>(diff) << 2) | count; } cnv->toULength=byteIndex; /* write back the updated pointers */ - pArgs->source=(const char *)source; + pArgs->source = reinterpret_cast<const char*>(source); pArgs->target=target; pArgs->offsets=offsets; } @@ -1189,13 +1189,13 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, /* set up the local pointers */ cnv=pArgs->converter; - source=(const uint8_t *)pArgs->source; - sourceLimit=(const uint8_t *)pArgs->sourceLimit; + source = reinterpret_cast<const uint8_t*>(pArgs->source); + sourceLimit = reinterpret_cast<const uint8_t*>(pArgs->sourceLimit); target=pArgs->target; targetLimit=pArgs->targetLimit; /* get the converter state from UConverter */ - prev=(int32_t)cnv->toUnicodeStatus; + prev = static_cast<int32_t>(cnv->toUnicodeStatus); if(prev==0) { prev=BOCU1_ASCII_PREV; } @@ -1214,8 +1214,8 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, fastSingle: /* fast loop for single-byte differences */ /* use count as the only loop counter variable */ - diff=(int32_t)(sourceLimit-source); - count=(int32_t)(pArgs->targetLimit-target); + diff = static_cast<int32_t>(sourceLimit - source); + count = static_cast<int32_t>(pArgs->targetLimit - target); if(count>diff) { count=diff; } @@ -1223,7 +1223,7 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, if(BOCU1_START_NEG_2<=(c=*source) && c<BOCU1_START_POS_2) { c=prev+(c-BOCU1_MIDDLE); if(c<0x3000) { - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); prev=BOCU1_SIMPLE_PREV(c); } else { break; @@ -1232,7 +1232,7 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, if(c!=0x20) { prev=BOCU1_ASCII_PREV; } - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); } else { break; } @@ -1253,7 +1253,7 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, /* Write a code point directly from a single-byte difference. */ c=prev+(c-BOCU1_MIDDLE); if(c<0x3000) { - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); prev=BOCU1_SIMPLE_PREV(c); goto fastSingle; } @@ -1265,19 +1265,19 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, if(c!=0x20) { prev=BOCU1_ASCII_PREV; } - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); continue; } else if(BOCU1_START_NEG_3<=c && c<BOCU1_START_POS_3 && source<sourceLimit) { /* Optimize two-byte case. */ if(c>=BOCU1_MIDDLE) { - diff=((int32_t)c-BOCU1_START_POS_2)*BOCU1_TRAIL_COUNT+BOCU1_REACH_POS_1+1; + diff = (c - BOCU1_START_POS_2) * BOCU1_TRAIL_COUNT + BOCU1_REACH_POS_1 + 1; } else { - diff=((int32_t)c-BOCU1_START_NEG_2)*BOCU1_TRAIL_COUNT+BOCU1_REACH_NEG_1; + diff = (c - BOCU1_START_NEG_2) * BOCU1_TRAIL_COUNT + BOCU1_REACH_NEG_1; } /* trail byte */ c=decodeBocu1TrailByte(1, *source++); - if(c<0 || (uint32_t)(c=prev+diff+c)>0x10ffff) { + if (c < 0 || static_cast<uint32_t>(c = prev + diff + c) > 0x10ffff) { bytes[0]=source[-2]; bytes[1]=source[-1]; byteIndex=2; @@ -1294,7 +1294,7 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, * with the partial difference value from the lead byte and * with the number of trail bytes. */ - bytes[0]=(uint8_t)c; + bytes[0] = static_cast<uint8_t>(c); byteIndex=1; diff=decodeBocu1LeadByte(c); @@ -1319,7 +1319,7 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, /* final trail byte, deliver a code point */ byteIndex=0; c=prev+diff; - if((uint32_t)c>0x10ffff) { + if (static_cast<uint32_t>(c) > 0x10ffff) { *pErrorCode=U_ILLEGAL_CHAR_FOUND; goto endloop; } @@ -1331,7 +1331,7 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, /* calculate the next prev and output c */ prev=BOCU1_PREV(c); if(c<=0xffff) { - *target++=(char16_t)c; + *target++ = static_cast<char16_t>(c); } else { /* output surrogate pair */ *target++=U16_LEAD(c); @@ -1354,13 +1354,13 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs, cnv->mode=0; } else { /* set the converter state back into UConverter */ - cnv->toUnicodeStatus=(uint32_t)prev; - cnv->mode=((uint32_t)diff<<2)|count; + cnv->toUnicodeStatus = static_cast<uint32_t>(prev); + cnv->mode = (static_cast<uint32_t>(diff) << 2) | count; } cnv->toULength=byteIndex; /* write back the updated pointers */ - pArgs->source=(const char *)source; + pArgs->source = reinterpret_cast<const char*>(source); pArgs->target=target; } diff --git a/deps/icu-small/source/common/ucnvhz.cpp b/deps/icu-small/source/common/ucnvhz.cpp index fa0f2b40ea7178..aea5da65c1f430 100644 --- a/deps/icu-small/source/common/ucnvhz.cpp +++ b/deps/icu-small/source/common/ucnvhz.cpp @@ -345,7 +345,7 @@ UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args, uint32_t targetUniChar = 0x0000; UChar32 mySourceChar = 0x0000; UConverterDataHZ *myConverterData=(UConverterDataHZ*)args->converter->extraInfo; - UBool isTargetUCharDBCS = (UBool) myConverterData->isTargetUCharDBCS; + UBool isTargetUCharDBCS = myConverterData->isTargetUCharDBCS; UBool oldIsTargetUCharDBCS; int len =0; const char* escSeq=nullptr; @@ -363,7 +363,7 @@ UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args, targetUniChar = missingCharMarker; if (myTargetIndex < targetLength){ - mySourceChar = (char16_t) mySource[mySourceIndex++]; + mySourceChar = mySource[mySourceIndex++]; oldIsTargetUCharDBCS = isTargetUCharDBCS; @@ -389,7 +389,7 @@ UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args, } } if (targetUniChar != missingCharMarker){ - myConverterData->isTargetUCharDBCS = isTargetUCharDBCS = (UBool)(targetUniChar>0x00FF); + myConverterData->isTargetUCharDBCS = isTargetUCharDBCS = targetUniChar > 0x00FF; if(oldIsTargetUCharDBCS != isTargetUCharDBCS || !myConverterData->isEscapeAppended ){ /*Shifting from a double byte to single byte mode*/ if(!isTargetUCharDBCS){ diff --git a/deps/icu-small/source/common/ucnvisci.cpp b/deps/icu-small/source/common/ucnvisci.cpp index c14dbaa08c6660..c5f5832dcfcc3e 100644 --- a/deps/icu-small/source/common/ucnvisci.cpp +++ b/deps/icu-small/source/common/ucnvisci.cpp @@ -174,7 +174,7 @@ isPNJConsonant(UChar32 c) { if (c < 0xa00 || 0xa50 <= c) { return false; } else { - return (UBool)(pnjMap[c - 0xa00] & 1); + return pnjMap[c - 0xa00] & 1; } } @@ -183,7 +183,7 @@ isPNJBindiTippi(UChar32 c) { if (c < 0xa00 || 0xa50 <= c) { return false; } else { - return (UBool)(pnjMap[c - 0xa00] >> 1); + return pnjMap[c - 0xa00] >> 1; } } U_CDECL_BEGIN @@ -1484,7 +1484,7 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo */ *err = U_INVALID_CHAR_FOUND; CALLBACK: - args->converter->toUBytes[0] = (uint8_t) sourceChar; + args->converter->toUBytes[0] = sourceChar; args->converter->toULength = 1; break; } diff --git a/deps/icu-small/source/common/ucnvlat1.cpp b/deps/icu-small/source/common/ucnvlat1.cpp index 09206885269d5f..09473ef16cb9e4 100644 --- a/deps/icu-small/source/common/ucnvlat1.cpp +++ b/deps/icu-small/source/common/ucnvlat1.cpp @@ -381,7 +381,7 @@ ucnv_Latin1FromUTF8(UConverterFromUnicodeArgs *pFromUArgs, b=*source++; if(U8_IS_SINGLE(b)) { /* convert ASCII */ - *target++=(uint8_t)b; + *target++ = b; --targetCapacity; } else if( /* handle U+0080..U+00FF inline */ b>=0xc2 && b<=0xc3 && diff --git a/deps/icu-small/source/common/ucnvmbcs.cpp b/deps/icu-small/source/common/ucnvmbcs.cpp index d760603980026a..f5507043bf35be 100644 --- a/deps/icu-small/source/common/ucnvmbcs.cpp +++ b/deps/icu-small/source/common/ucnvmbcs.cpp @@ -665,7 +665,7 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[], if(!enumToU( mbcsTable, stateProps, nextState, offset+MBCS_ENTRY_TRANSITION_OFFSET(entry), - value|(uint32_t)b, + value | static_cast<uint32_t>(b), callback, context, pErrorCode)) { return false; @@ -683,7 +683,7 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[], action=MBCS_ENTRY_FINAL_ACTION(entry); if(action==MBCS_STATE_VALID_DIRECT_16) { /* output BMP code point */ - c=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + c = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); } else if(action==MBCS_STATE_VALID_16) { int32_t finalOffset=offset+MBCS_ENTRY_FINAL_VALUE_16(entry); c=unicodeCodeUnits[finalOffset]; @@ -708,7 +708,7 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[], } } else if(action==MBCS_STATE_VALID_DIRECT_20) { /* output supplementary code point */ - c=(UChar32)(MBCS_ENTRY_FINAL_VALUE(entry)+0x10000); + c = static_cast<UChar32>(MBCS_ENTRY_FINAL_VALUE(entry) + 0x10000); } else { c=U_SENTINEL; } @@ -718,7 +718,7 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[], } if(((++b)&0x1f)==0) { if(anyCodePoints>=0) { - if(!callback(context, value|(uint32_t)(b-0x20), codePoints)) { + if (!callback(context, value | static_cast<uint32_t>(b - 0x20), codePoints)) { return false; } anyCodePoints=-1; @@ -760,7 +760,7 @@ getStateProp(const int32_t (*stateTable)[256], int8_t stateProps[], int state) { return stateProps[state]; } } - stateProps[state]|=(int8_t)((min>>5)<<3); + stateProps[state] |= static_cast<int8_t>((min >> 5) << 3); /* find last non-ignorable state */ for(max=0xff; min<max; --max) { @@ -777,7 +777,7 @@ getStateProp(const int32_t (*stateTable)[256], int8_t stateProps[], int state) { break; } } - stateProps[state]|=(int8_t)(max>>5); + stateProps[state] |= static_cast<int8_t>(max >> 5); /* recurse further and collect direct-state information */ while(min<=max) { @@ -924,7 +924,7 @@ ucnv_MBCSGetFilteredUnicodeSetForUnicode(const UConverterSharedData *sharedData, bytes=mbcsTable->fromUnicodeBytes; - useFallback=(UBool)(which==UCNV_ROUNDTRIP_AND_FALLBACK_SET); + useFallback = which == UCNV_ROUNDTRIP_AND_FALLBACK_SET; switch(mbcsTable->outputType) { case MBCS_OUTPUT_3: @@ -1117,7 +1117,7 @@ _extFromU(UConverter *cnv, const UConverterSharedData *sharedData, ucnv_extInitialMatchFromU( cnv, cx, cp, source, sourceLimit, - (char **)target, (char *)targetLimit, + reinterpret_cast<char**>(target), reinterpret_cast<const char*>(targetLimit), offsets, sourceIndex, flush, pErrorCode) @@ -1132,7 +1132,7 @@ _extFromU(UConverter *cnv, const UConverterSharedData *sharedData, range=gb18030Ranges[0]; for(i=0; i<UPRV_LENGTHOF(gb18030Ranges); range+=4, ++i) { - if(range[0]<=(uint32_t)cp && (uint32_t)cp<=range[1]) { + if (range[0] <= static_cast<uint32_t>(cp) && static_cast<uint32_t>(cp) <= range[1]) { /* found the Unicode code point, output the four-byte sequence for it */ uint32_t linear; char bytes[4]; @@ -1141,17 +1141,17 @@ _extFromU(UConverter *cnv, const UConverterSharedData *sharedData, linear=range[2]-LINEAR_18030_BASE; /* add the offset from the beginning of the range */ - linear+=((uint32_t)cp-range[0]); + linear += (static_cast<uint32_t>(cp) - range[0]); /* turn this into a four-byte sequence */ - bytes[3]=(char)(0x30+linear%10); linear/=10; - bytes[2]=(char)(0x81+linear%126); linear/=126; - bytes[1]=(char)(0x30+linear%10); linear/=10; - bytes[0]=(char)(0x81+linear); + bytes[3] = static_cast<char>(0x30 + linear % 10); linear /= 10; + bytes[2] = static_cast<char>(0x81 + linear % 126); linear /= 126; + bytes[1] = static_cast<char>(0x30 + linear % 10); linear /= 10; + bytes[0] = static_cast<char>(0x81 + linear); /* output this sequence */ ucnv_fromUWriteBytes(cnv, - bytes, 4, (char **)target, (char *)targetLimit, + bytes, 4, reinterpret_cast<char**>(target), reinterpret_cast<const char*>(targetLimit), offsets, sourceIndex, pErrorCode); return 0; } @@ -1181,7 +1181,7 @@ _extToU(UConverter *cnv, const UConverterSharedData *sharedData, if( (cx=sharedData->mbcs.extIndexes)!=nullptr && ucnv_extInitialMatchToU( cnv, cx, - length, (const char **)source, (const char *)sourceLimit, + length, reinterpret_cast<const char**>(source), reinterpret_cast<const char*>(sourceLimit), target, targetLimit, offsets, sourceIndex, flush, @@ -1273,7 +1273,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { table=mbcsTable->fromUnicodeTable; bytes=mbcsTable->fromUnicodeBytes; - results=(const uint16_t *)bytes; + results = reinterpret_cast<const uint16_t*>(bytes); /* * Check that this is an EBCDIC table with SBCS portion - @@ -1348,21 +1348,21 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { mbcsTable->countStates*1024+ sizeofFromUBytes+ UCNV_MAX_CONVERTER_NAME_LENGTH+20; - p=(uint8_t *)uprv_malloc(size); + p = static_cast<uint8_t*>(uprv_malloc(size)); if(p==nullptr) { *pErrorCode=U_MEMORY_ALLOCATION_ERROR; return false; } /* copy and modify the to-Unicode state table */ - newStateTable=(int32_t (*)[256])p; + newStateTable = reinterpret_cast<int32_t(*)[256]>(p); uprv_memcpy(newStateTable, mbcsTable->stateTable, mbcsTable->countStates*1024); newStateTable[0][EBCDIC_LF]=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL); newStateTable[0][EBCDIC_NL]=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF); /* copy and modify the from-Unicode result table */ - newResults=(uint16_t *)newStateTable[mbcsTable->countStates]; + newResults = reinterpret_cast<uint16_t*>(newStateTable[mbcsTable->countStates]); uprv_memcpy(newResults, bytes, sizeofFromUBytes); /* conveniently, the table access macros work on the left side of expressions */ @@ -1378,7 +1378,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { } /* set the canonical converter name */ - name=(char *)newResults+sizeofFromUBytes; + name = reinterpret_cast<char*>(newResults) + sizeofFromUBytes; uprv_strcpy(name, sharedData->staticData->name); uprv_strcat(name, UCNV_SWAP_LFNL_OPTION_STRING); @@ -1386,7 +1386,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { icu::umtx_lock(nullptr); if(mbcsTable->swapLFNLStateTable==nullptr) { mbcsTable->swapLFNLStateTable=newStateTable; - mbcsTable->swapLFNLFromUnicodeBytes=(uint8_t *)newResults; + mbcsTable->swapLFNLFromUnicodeBytes = reinterpret_cast<uint8_t*>(newResults); mbcsTable->swapLFNLName=name; newStateTable=nullptr; @@ -1413,7 +1413,7 @@ writeStage3Roundtrip(const void *context, uint32_t value, UChar32 codePoints[32] int32_t i, st3; table=mbcsTable->fromUnicodeTable; - bytes=(uint8_t *)mbcsTable->fromUnicodeBytes; + bytes = const_cast<uint8_t*>(mbcsTable->fromUnicodeBytes); /* for EUC outputTypes, modify the value like genmbcs.c's transformEUC() */ switch(mbcsTable->outputType) { @@ -1454,23 +1454,23 @@ writeStage3Roundtrip(const void *context, uint32_t value, UChar32 codePoints[32] /* locate the stage 2 & 3 data */ stage2=((uint32_t *)table)+table[c>>10]+((c>>4)&0x3f); p=bytes; - st3=(int32_t)(uint16_t)*stage2*16+(c&0xf); + st3 = static_cast<int32_t>(static_cast<uint16_t>(*stage2)) * 16 + (c & 0xf); /* write the codepage bytes into stage 3 */ switch(mbcsTable->outputType) { case MBCS_OUTPUT_3: case MBCS_OUTPUT_4_EUC: p+=st3*3; - p[0]=(uint8_t)(value>>16); - p[1]=(uint8_t)(value>>8); - p[2]=(uint8_t)value; + p[0] = static_cast<uint8_t>(value >> 16); + p[1] = static_cast<uint8_t>(value >> 8); + p[2] = static_cast<uint8_t>(value); break; case MBCS_OUTPUT_4: - ((uint32_t *)p)[st3]=value; + reinterpret_cast<uint32_t*>(p)[st3] = value; break; default: /* 2 bytes per character */ - ((uint16_t *)p)[st3]=(uint16_t)value; + reinterpret_cast<uint16_t*>(p)[st3] = static_cast<uint16_t>(value); break; } @@ -1488,7 +1488,7 @@ reconstituteData(UConverterMBCSTable *mbcsTable, uint16_t *stage1; uint32_t *stage2; uint32_t dataLength=stage1Length*2+fullStage2Length*4+mbcsTable->fromUBytesLength; - mbcsTable->reconstitutedData=(uint8_t *)uprv_malloc(dataLength); + mbcsTable->reconstitutedData = static_cast<uint8_t*>(uprv_malloc(dataLength)); if(mbcsTable->reconstitutedData==nullptr) { *pErrorCode=U_MEMORY_ALLOCATION_ERROR; return; @@ -1496,29 +1496,29 @@ reconstituteData(UConverterMBCSTable *mbcsTable, uprv_memset(mbcsTable->reconstitutedData, 0, dataLength); /* copy existing data and reroute the pointers */ - stage1=(uint16_t *)mbcsTable->reconstitutedData; + stage1 = reinterpret_cast<uint16_t*>(mbcsTable->reconstitutedData); uprv_memcpy(stage1, mbcsTable->fromUnicodeTable, stage1Length*2); - stage2=(uint32_t *)(stage1+stage1Length); + stage2 = reinterpret_cast<uint32_t*>(stage1 + stage1Length); uprv_memcpy(stage2+(fullStage2Length-stage2Length), mbcsTable->fromUnicodeTable+stage1Length, stage2Length*4); mbcsTable->fromUnicodeTable=stage1; - mbcsTable->fromUnicodeBytes=(uint8_t *)(stage2+fullStage2Length); + mbcsTable->fromUnicodeBytes = reinterpret_cast<uint8_t*>(stage2 + fullStage2Length); /* indexes into stage 2 count from the bottom of the fromUnicodeTable */ - stage2=(uint32_t *)stage1; + stage2 = reinterpret_cast<uint32_t*>(stage1); /* reconstitute the initial part of stage 2 from the mbcsIndex */ { - int32_t stageUTF8Length=((int32_t)mbcsTable->maxFastUChar+1)>>6; + int32_t stageUTF8Length = (static_cast<int32_t>(mbcsTable->maxFastUChar) + 1) >> 6; int32_t stageUTF8Index=0; int32_t st1, st2, st3, i; for(st1=0; stageUTF8Index<stageUTF8Length; ++st1) { st2=stage1[st1]; - if(st2!=(int32_t)stage1Length/2) { + if (st2 != static_cast<int32_t>(stage1Length) / 2) { /* each stage 2 block has 64 entries corresponding to 16 entries in the mbcsIndex */ for(i=0; i<16; ++i) { st3=mbcsTable->mbcsIndex[stageUTF8Index++]; @@ -1568,13 +1568,13 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, } else if(header->version[0]==5 && header->version[1]>=3 && (header->options&MBCS_OPT_UNKNOWN_INCOMPATIBLE_MASK)==0) { headerLength=header->options&MBCS_OPT_LENGTH_MASK; - noFromU=(UBool)((header->options&MBCS_OPT_NO_FROM_U)!=0); + noFromU = static_cast<UBool>((header->options & MBCS_OPT_NO_FROM_U) != 0); } else { *pErrorCode=U_INVALID_TABLE_FORMAT; return; } - mbcsTable->outputType=(uint8_t)header->flags; + mbcsTable->outputType = static_cast<uint8_t>(header->flags); if(noFromU && mbcsTable->outputType==MBCS_OUTPUT_1) { *pErrorCode=U_INVALID_TABLE_FORMAT; return; @@ -1583,7 +1583,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, /* extension data, header version 4.2 and higher */ offset=header->flags>>8; if(offset!=0) { - mbcsTable->extIndexes=(const int32_t *)(raw+offset); + mbcsTable->extIndexes = reinterpret_cast<const int32_t*>(raw + offset); } if(mbcsTable->outputType==MBCS_OUTPUT_EXT_ONLY) { @@ -1606,7 +1606,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, } /* load the base table */ - baseName=(const char *)header+headerLength*4; + baseName = reinterpret_cast<const char*>(header) + headerLength * 4; if(0==uprv_strcmp(baseName, sharedData->staticData->name)) { /* forbid loading this same extension-only file */ *pErrorCode=U_INVALID_TABLE_FORMAT; @@ -1685,7 +1685,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, MBCS_ENTRY_FINAL_ACTION(entry)==MBCS_STATE_CHANGE_ONLY && MBCS_ENTRY_FINAL_STATE(entry)!=0 ) { - mbcsTable->dbcsOnlyState=(uint8_t)MBCS_ENTRY_FINAL_STATE(entry); + mbcsTable->dbcsOnlyState = static_cast<uint8_t>(MBCS_ENTRY_FINAL_STATE(entry)); mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY; } @@ -1702,7 +1702,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, /* allocate a new state table and copy the base state table contents */ count=mbcsTable->countStates; - newStateTable=(int32_t (*)[256])uprv_malloc((count+1)*1024); + newStateTable = static_cast<int32_t(*)[256]>(uprv_malloc((count + 1) * 1024)); if(newStateTable==nullptr) { ucnv_unload(baseSharedData); *pErrorCode=U_MEMORY_ALLOCATION_ERROR; @@ -1725,7 +1725,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, state[i]=MBCS_ENTRY_FINAL(0, MBCS_STATE_ILLEGAL, 0); } mbcsTable->stateTable=(const int32_t (*)[256])newStateTable; - mbcsTable->countStates=(uint8_t)(count+1); + mbcsTable->countStates = static_cast<uint8_t>(count + 1); mbcsTable->stateTableOwned=true; mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY; @@ -1766,14 +1766,14 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, return; } - mbcsTable->countStates=(uint8_t)header->countStates; + mbcsTable->countStates = static_cast<uint8_t>(header->countStates); mbcsTable->countToUFallbacks=header->countToUFallbacks; - mbcsTable->stateTable=(const int32_t (*)[256])(raw+headerLength*4); - mbcsTable->toUFallbacks=(const _MBCSToUFallback *)(mbcsTable->stateTable+header->countStates); - mbcsTable->unicodeCodeUnits=(const uint16_t *)(raw+header->offsetToUCodeUnits); + mbcsTable->stateTable = reinterpret_cast<const int32_t(*)[256]>(raw + headerLength * 4); + mbcsTable->toUFallbacks = reinterpret_cast<const _MBCSToUFallback*>(mbcsTable->stateTable + header->countStates); + mbcsTable->unicodeCodeUnits = reinterpret_cast<const uint16_t*>(raw + header->offsetToUCodeUnits); - mbcsTable->fromUnicodeTable=(const uint16_t *)(raw+header->offsetFromUTable); - mbcsTable->fromUnicodeBytes=(const uint8_t *)(raw+header->offsetFromUBytes); + mbcsTable->fromUnicodeTable = reinterpret_cast<const uint16_t*>(raw + header->offsetFromUTable); + mbcsTable->fromUnicodeBytes = raw + header->offsetFromUBytes; mbcsTable->fromUBytesLength=header->fromUBytesLength; /* @@ -1784,7 +1784,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, udata_getInfo((UDataMemory *)sharedData->dataMemory, &info); if(info.formatVersion[0]>6 || (info.formatVersion[0]==6 && info.formatVersion[1]>=1)) { /* mask off possible future extensions to be safe */ - mbcsTable->unicodeMask=(uint8_t)(sharedData->staticData->unicodeMask&3); + mbcsTable->unicodeMask = static_cast<uint8_t>(sharedData->staticData->unicodeMask & 3); } else { /* for older versions, assume worst case: contains anything possible (prevent over-optimizations) */ mbcsTable->unicodeMask=UCNV_HAS_SUPPLEMENTARY|UCNV_HAS_SURROGATES; @@ -1825,10 +1825,10 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, * The .cnv file is prebuilt with an additional stage table with indexes * to each block. */ - mbcsTable->mbcsIndex=(const uint16_t *) - (mbcsTable->fromUnicodeBytes+ + mbcsTable->mbcsIndex = reinterpret_cast<const uint16_t*>( + mbcsTable->fromUnicodeBytes + (noFromU ? 0 : mbcsTable->fromUBytesLength)); - mbcsTable->maxFastUChar=(((char16_t)header->version[2])<<8)|0xff; + mbcsTable->maxFastUChar = (static_cast<char16_t>(header->version[2]) << 8) | 0xff; } } @@ -1839,7 +1839,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, for(i=0; i<0x80; ++i) { if(mbcsTable->stateTable[0][i]!=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, i)) { - asciiRoundtrips&=~((uint32_t)1<<(i>>2)); + asciiRoundtrips &= ~(static_cast<uint32_t>(1) << (i >> 2)); } } mbcsTable->asciiRoundtrips=asciiRoundtrips; @@ -1958,7 +1958,7 @@ ucnv_MBCSOpen(UConverter *cnv, extIndexes=mbcsTable->extIndexes; if(extIndexes!=nullptr) { - maxBytesPerUChar=(int8_t)UCNV_GET_MAX_BYTES_PER_UCHAR(extIndexes); + maxBytesPerUChar = static_cast<int8_t>(UCNV_GET_MAX_BYTES_PER_UCHAR(extIndexes)); if(outputType==MBCS_OUTPUT_2_SISO) { ++maxBytesPerUChar; /* SO + multiple DBCS */ } @@ -2048,8 +2048,8 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, /* set up the local pointers */ cnv=pArgs->converter; - source=(const uint8_t *)pArgs->source; - sourceLimit=(const uint8_t *)pArgs->sourceLimit; + source = reinterpret_cast<const uint8_t*>(pArgs->source); + sourceLimit = reinterpret_cast<const uint8_t*>(pArgs->sourceLimit); target=pArgs->target; targetLimit=pArgs->targetLimit; offsets=pArgs->offsets; @@ -2085,7 +2085,7 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, /* test the most common case first */ if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) { /* output BMP code point */ - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); if(offsets!=nullptr) { *offsets++=sourceIndex; } @@ -2099,17 +2099,17 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, * An if-else-if chain provides more reliable performance for * the most common cases compared to a switch. */ - action=(uint8_t)(MBCS_ENTRY_FINAL_ACTION(entry)); + action = static_cast<uint8_t>(MBCS_ENTRY_FINAL_ACTION(entry)); if(action==MBCS_STATE_VALID_DIRECT_20 || (action==MBCS_STATE_FALLBACK_DIRECT_20 && UCNV_TO_U_USE_FALLBACK(cnv)) ) { entry=MBCS_ENTRY_FINAL_VALUE(entry); /* output surrogate pair */ - *target++=(char16_t)(0xd800|(char16_t)(entry>>10)); + *target++ = static_cast<char16_t>(0xd800 | static_cast<char16_t>(entry >> 10)); if(offsets!=nullptr) { *offsets++=sourceIndex; } - c=(char16_t)(0xdc00|(char16_t)(entry&0x3ff)); + c = static_cast<char16_t>(0xdc00 | static_cast<char16_t>(entry & 0x3ff)); if(target<targetLimit) { *target++=c; if(offsets!=nullptr) { @@ -2128,7 +2128,7 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, } else if(action==MBCS_STATE_FALLBACK_DIRECT_16) { if(UCNV_TO_U_USE_FALLBACK(cnv)) { /* output BMP code point */ - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); if(offsets!=nullptr) { *offsets++=sourceIndex; } @@ -2152,7 +2152,7 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, break; } else /* unassigned sequences indicated with byteIndex>0 */ { /* try an extension mapping */ - pArgs->source=(const char *)source; + pArgs->source = reinterpret_cast<const char*>(source); cnv->toUBytes[0]=*(source-1); cnv->toULength=_extToU(cnv, cnv->sharedData, 1, &source, sourceLimit, @@ -2160,7 +2160,7 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, &offsets, sourceIndex, pArgs->flush, pErrorCode); - sourceIndex+=1+(int32_t)(source-(const uint8_t *)pArgs->source); + sourceIndex += 1 + static_cast<int32_t>(source - reinterpret_cast<const uint8_t*>(pArgs->source)); if(U_FAILURE(*pErrorCode)) { /* not mappable or buffer overflow */ @@ -2170,7 +2170,7 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, } /* write back the updated pointers */ - pArgs->source=(const char *)source; + pArgs->source = reinterpret_cast<const char*>(source); pArgs->target=target; pArgs->offsets=offsets; } @@ -2199,10 +2199,10 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, /* set up the local pointers */ cnv=pArgs->converter; - source=(const uint8_t *)pArgs->source; - sourceLimit=(const uint8_t *)pArgs->sourceLimit; + source = reinterpret_cast<const uint8_t*>(pArgs->source); + sourceLimit = reinterpret_cast<const uint8_t*>(pArgs->sourceLimit); target=pArgs->target; - targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target); offsets=pArgs->offsets; if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) { @@ -2219,7 +2219,7 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter * for the minimum of the sourceLength and targetCapacity */ - length=(int32_t)(sourceLimit-source); + length = static_cast<int32_t>(sourceLimit - source); if(length<targetCapacity) { targetCapacity=length; } @@ -2234,37 +2234,37 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, loops=count=targetCapacity>>4; do { oredEntries=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); oredEntries|=entry=stateTable[0][*source++]; - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); /* were all 16 entries really valid? */ if(!MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(oredEntries)) { @@ -2310,7 +2310,7 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, /* test the most common case first */ if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) { /* output BMP code point */ - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); --targetCapacity; continue; } @@ -2319,11 +2319,11 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, * An if-else-if chain provides more reliable performance for * the most common cases compared to a switch. */ - action=(uint8_t)(MBCS_ENTRY_FINAL_ACTION(entry)); + action = static_cast<uint8_t>(MBCS_ENTRY_FINAL_ACTION(entry)); if(action==MBCS_STATE_FALLBACK_DIRECT_16) { if(UCNV_TO_U_USE_FALLBACK(cnv)) { /* output BMP code point */ - *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + *target++ = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); --targetCapacity; continue; } @@ -2339,7 +2339,7 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, /* set offsets since the start or the last extension */ if(offsets!=nullptr) { - int32_t count=(int32_t)(source-lastSource); + int32_t count = static_cast<int32_t>(source - lastSource); /* predecrement: do not set the offset for the callback-causing character */ while(--count>0) { @@ -2361,7 +2361,7 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, &offsets, sourceIndex, pArgs->flush, pErrorCode); - sourceIndex+=1+(int32_t)(source-lastSource); + sourceIndex += 1 + static_cast<int32_t>(source - lastSource); if(U_FAILURE(*pErrorCode)) { /* not mappable or buffer overflow */ @@ -2369,8 +2369,8 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, } /* recalculate the targetCapacity after an extension mapping */ - targetCapacity=(int32_t)(pArgs->targetLimit-target); - length=(int32_t)(sourceLimit-source); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - target); + length = static_cast<int32_t>(sourceLimit - source); if(length<targetCapacity) { targetCapacity=length; } @@ -2397,7 +2397,7 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs, } /* write back the updated pointers */ - pArgs->source=(const char *)source; + pArgs->source = reinterpret_cast<const char*>(source); pArgs->target=target; pArgs->offsets=offsets; } @@ -2432,7 +2432,7 @@ hasValidTrailBytes(const int32_t (*stateTable)[256], uint8_t state) { for(b=0; b<=0xff; ++b) { entry=row[b]; if( MBCS_ENTRY_IS_TRANSITION(entry) && - hasValidTrailBytes(stateTable, (uint8_t)MBCS_ENTRY_TRANSITION_STATE(entry)) + hasValidTrailBytes(stateTable, static_cast<uint8_t>(MBCS_ENTRY_TRANSITION_STATE(entry))) ) { return true; } @@ -2450,9 +2450,9 @@ isSingleOrLead(const int32_t (*stateTable)[256], uint8_t state, UBool isDBCSOnly const int32_t *row=stateTable[state]; int32_t entry=row[b]; if(MBCS_ENTRY_IS_TRANSITION(entry)) { /* lead byte */ - return hasValidTrailBytes(stateTable, (uint8_t)MBCS_ENTRY_TRANSITION_STATE(entry)); + return hasValidTrailBytes(stateTable, static_cast<uint8_t>(MBCS_ENTRY_TRANSITION_STATE(entry))); } else { - uint8_t action=(uint8_t)(MBCS_ENTRY_FINAL_ACTION(entry)); + uint8_t action = static_cast<uint8_t>(MBCS_ENTRY_FINAL_ACTION(entry)); if(action==MBCS_STATE_CHANGE_ONLY && isDBCSOnly) { return false; /* SI/SO are illegal for DBCS-only conversion */ } else { @@ -2823,7 +2823,7 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, * - If any of the non-initial bytes could be the start of a character, * we stop the illegal sequence before the first one of those. */ - UBool isDBCSOnly=(UBool)(cnv->sharedData->mbcs.dbcsOnlyState!=0); + UBool isDBCSOnly = cnv->sharedData->mbcs.dbcsOnlyState != 0; int8_t i; for(i=1; i<byteIndex && !isSingleOrLead(stateTable, state, isDBCSOnly, bytes[i]); @@ -2890,8 +2890,8 @@ ucnv_MBCSSingleGetNextUChar(UConverterToUnicodeArgs *pArgs, /* set up the local pointers */ cnv=pArgs->converter; - source=(const uint8_t *)pArgs->source; - sourceLimit=(const uint8_t *)pArgs->sourceLimit; + source = reinterpret_cast<const uint8_t*>(pArgs->source); + sourceLimit = reinterpret_cast<const uint8_t*>(pArgs->sourceLimit); if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) { stateTable=(const int32_t (*)[256])cnv->sharedData->mbcs.swapLFNLStateTable; } else { @@ -2904,27 +2904,27 @@ ucnv_MBCSSingleGetNextUChar(UConverterToUnicodeArgs *pArgs, /* MBCS_ENTRY_IS_FINAL(entry) */ /* write back the updated pointer early so that we can return directly */ - pArgs->source=(const char *)source; + pArgs->source = reinterpret_cast<const char*>(source); if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) { /* output BMP code point */ - return (char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + return static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); } /* * An if-else-if chain provides more reliable performance for * the most common cases compared to a switch. */ - action=(uint8_t)(MBCS_ENTRY_FINAL_ACTION(entry)); + action = static_cast<uint8_t>(MBCS_ENTRY_FINAL_ACTION(entry)); if( action==MBCS_STATE_VALID_DIRECT_20 || (action==MBCS_STATE_FALLBACK_DIRECT_20 && UCNV_TO_U_USE_FALLBACK(cnv)) ) { /* output supplementary code point */ - return (UChar32)(MBCS_ENTRY_FINAL_VALUE(entry)+0x10000); + return static_cast<UChar32>(MBCS_ENTRY_FINAL_VALUE(entry) + 0x10000); } else if(action==MBCS_STATE_FALLBACK_DIRECT_16) { if(UCNV_TO_U_USE_FALLBACK(cnv)) { /* output BMP code point */ - return (char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + return static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); } } else if(action==MBCS_STATE_UNASSIGNED) { /* just fall through */ @@ -2941,7 +2941,7 @@ ucnv_MBCSSingleGetNextUChar(UConverterToUnicodeArgs *pArgs, break; } else /* unassigned sequence */ { /* defer to the generic implementation */ - pArgs->source=(const char *)source-1; + pArgs->source = reinterpret_cast<const char*>(source) - 1; return UCNV_GET_NEXT_UCHAR_USE_TO_U; } } @@ -2999,8 +2999,8 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, } /* set up the local pointers */ - source=lastSource=(const uint8_t *)pArgs->source; - sourceLimit=(const uint8_t *)pArgs->sourceLimit; + source = lastSource = reinterpret_cast<const uint8_t*>(pArgs->source); + sourceLimit = reinterpret_cast<const uint8_t*>(pArgs->sourceLimit); if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) { stateTable=(const int32_t (*)[256])cnv->sharedData->mbcs.swapLFNLStateTable; @@ -3017,7 +3017,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, * then load the DBCS state from the MBCS data * (dbcsOnlyState==0 if it is not a DBCS-only converter) */ - if((state=(uint8_t)(cnv->mode))==0) { + if ((state = static_cast<uint8_t>(cnv->mode)) == 0) { state=cnv->sharedData->mbcs.dbcsOnlyState; } @@ -3026,7 +3026,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, while(source<sourceLimit) { entry=stateTable[state][*source++]; if(MBCS_ENTRY_IS_TRANSITION(entry)) { - state=(uint8_t)MBCS_ENTRY_TRANSITION_STATE(entry); + state = static_cast<uint8_t>(MBCS_ENTRY_TRANSITION_STATE(entry)); offset+=MBCS_ENTRY_TRANSITION_OFFSET(entry); /* optimization for 1/2-byte input and BMP output */ @@ -3036,7 +3036,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, (c=unicodeCodeUnits[offset+MBCS_ENTRY_FINAL_VALUE_16(entry)])<0xfffe ) { ++source; - state=(uint8_t)MBCS_ENTRY_FINAL_STATE(entry); /* typically 0 */ + state = static_cast<uint8_t>(MBCS_ENTRY_FINAL_STATE(entry)); /* typically 0 */ /* output BMP code point */ break; } @@ -3045,16 +3045,16 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, cnv->mode=state; /* set the next state early so that we can reuse the entry variable */ - state=(uint8_t)MBCS_ENTRY_FINAL_STATE(entry); /* typically 0 */ + state = static_cast<uint8_t>(MBCS_ENTRY_FINAL_STATE(entry)); /* typically 0 */ /* * An if-else-if chain provides more reliable performance for * the most common cases compared to a switch. */ - action=(uint8_t)(MBCS_ENTRY_FINAL_ACTION(entry)); + action = static_cast<uint8_t>(MBCS_ENTRY_FINAL_ACTION(entry)); if(action==MBCS_STATE_VALID_DIRECT_16) { /* output BMP code point */ - c=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + c = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); break; } else if(action==MBCS_STATE_VALID_16) { offset+=MBCS_ENTRY_FINAL_VALUE_16(entry); @@ -3092,7 +3092,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, (action==MBCS_STATE_FALLBACK_DIRECT_20 && UCNV_TO_U_USE_FALLBACK(cnv)) ) { /* output supplementary code point */ - c=(UChar32)(MBCS_ENTRY_FINAL_VALUE(entry)+0x10000); + c = static_cast<UChar32>(MBCS_ENTRY_FINAL_VALUE(entry) + 0x10000); break; } else if(action==MBCS_STATE_CHANGE_ONLY) { /* @@ -3104,7 +3104,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, */ if(cnv->sharedData->mbcs.dbcsOnlyState!=0) { /* SI/SO are illegal for DBCS-only conversion */ - state=(uint8_t)(cnv->mode); /* restore the previous state */ + state = static_cast<uint8_t>(cnv->mode); /* restore the previous state */ /* callback(illegal) */ *pErrorCode=U_ILLEGAL_CHAR_FOUND; @@ -3112,7 +3112,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, } else if(action==MBCS_STATE_FALLBACK_DIRECT_16) { if(UCNV_TO_U_USE_FALLBACK(cnv)) { /* output BMP code point */ - c=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry); + c = static_cast<char16_t>(MBCS_ENTRY_FINAL_VALUE_16(entry)); break; } } else if(action==MBCS_STATE_UNASSIGNED) { @@ -3137,7 +3137,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, /* defer to the generic implementation */ cnv->toUnicodeStatus=0; cnv->mode=state; - pArgs->source=(const char *)lastSource; + pArgs->source = reinterpret_cast<const char*>(lastSource); return UCNV_GET_NEXT_UCHAR_USE_TO_U; } } @@ -3147,7 +3147,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, if(U_SUCCESS(*pErrorCode) && source==sourceLimit && lastSource<source) { /* incomplete character byte sequence */ uint8_t *bytes=cnv->toUBytes; - cnv->toULength=(int8_t)(source-lastSource); + cnv->toULength = static_cast<int8_t>(source - lastSource); do { *bytes++=*lastSource++; } while(lastSource<source); @@ -3160,7 +3160,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, * - If any of the non-initial bytes could be the start of a character, * we stop the illegal sequence before the first one of those. */ - UBool isDBCSOnly=(UBool)(cnv->sharedData->mbcs.dbcsOnlyState!=0); + UBool isDBCSOnly = static_cast<UBool>(cnv->sharedData->mbcs.dbcsOnlyState != 0); uint8_t *bytes=cnv->toUBytes; *bytes++=*lastSource++; /* first byte */ if(lastSource==source) { @@ -3188,7 +3188,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs, cnv->mode=state; /* write back the updated pointer */ - pArgs->source=(const char *)source; + pArgs->source = reinterpret_cast<const char*>(source); return c; } @@ -3431,8 +3431,8 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* set up the local pointers */ source=pArgs->source; sourceLimit=pArgs->sourceLimit; - target=(uint8_t *)pArgs->target; - targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target); + target = reinterpret_cast<uint8_t*>(pArgs->target); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target); offsets=pArgs->offsets; table=cnv->sharedData->mbcs.fromUnicodeTable; @@ -3474,7 +3474,7 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, c=*source++; ++nextSourceIndex; if(c<=0x7f && IS_ASCII_ROUNDTRIP(c, asciiRoundtrips)) { - *target++=(uint8_t)c; + *target++ = static_cast<uint8_t>(c); if(offsets!=nullptr) { *offsets++=sourceIndex; sourceIndex=nextSourceIndex; @@ -3562,7 +3562,7 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, &offsets, sourceIndex, pArgs->flush, pErrorCode); - nextSourceIndex+=(int32_t)(source-pArgs->source); + nextSourceIndex += static_cast<int32_t>(source - pArgs->source); if(U_FAILURE(*pErrorCode)) { /* not mappable or buffer overflow */ @@ -3571,7 +3571,7 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* a mapping was written to the target, continue */ /* recalculate the targetCapacity after an extension mapping */ - targetCapacity=(int32_t)(pArgs->targetLimit-(char *)target); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - reinterpret_cast<char*>(target)); /* normal end of conversion: prepare for a new character */ sourceIndex=nextSourceIndex; @@ -3584,15 +3584,15 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* from the first if in the loop we know that targetCapacity>0 */ if(value<=0xff) { /* this is easy because we know that there is enough space */ - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); if(offsets!=nullptr) { *offsets++=sourceIndex; } --targetCapacity; } else /* length==2 */ { - *target++=(uint8_t)(value>>8); + *target++ = static_cast<uint8_t>(value >> 8); if(2<=targetCapacity) { - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); if(offsets!=nullptr) { *offsets++=sourceIndex; *offsets++=sourceIndex; @@ -3602,7 +3602,7 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, if(offsets!=nullptr) { *offsets++=sourceIndex; } - cnv->charErrorBuffer[0]=(char)value; + cnv->charErrorBuffer[0] = static_cast<char>(value); cnv->charErrorBufferLength=1; /* target overflow */ @@ -3629,7 +3629,7 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* write back the updated pointers */ pArgs->source=source; - pArgs->target=(char *)target; + pArgs->target = reinterpret_cast<char*>(target); pArgs->offsets=offsets; } @@ -3657,13 +3657,13 @@ ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, cnv=pArgs->converter; source=pArgs->source; sourceLimit=pArgs->sourceLimit; - target=(uint8_t *)pArgs->target; - targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target); + target = reinterpret_cast<uint8_t*>(pArgs->target); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target); offsets=pArgs->offsets; table=cnv->sharedData->mbcs.fromUnicodeTable; if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) { - results=(uint16_t *)cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes; + results = reinterpret_cast<uint16_t*>(cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes); } else { results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes; } @@ -3675,7 +3675,7 @@ ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* use only roundtrips and fallbacks from private-use characters */ minValue=0xc00; } - hasSupplementary=(UBool)(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY); + hasSupplementary = static_cast<UBool>(cnv->sharedData->mbcs.unicodeMask & UCNV_HAS_SUPPLEMENTARY); /* get the converter state from UConverter */ c=cnv->fromUChar32; @@ -3749,7 +3749,7 @@ ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* assigned, write the output character bytes from value and length */ /* length==1 */ /* this is easy because we know that there is enough space */ - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); if(offsets!=nullptr) { *offsets++=sourceIndex; } @@ -3768,7 +3768,7 @@ ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, &offsets, sourceIndex, pArgs->flush, pErrorCode); - nextSourceIndex+=(int32_t)(source-pArgs->source); + nextSourceIndex += static_cast<int32_t>(source - pArgs->source); if(U_FAILURE(*pErrorCode)) { /* not mappable or buffer overflow */ @@ -3777,7 +3777,7 @@ ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* a mapping was written to the target, continue */ /* recalculate the targetCapacity after an extension mapping */ - targetCapacity=(int32_t)(pArgs->targetLimit-(char *)target); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - reinterpret_cast<char*>(target)); /* normal end of conversion: prepare for a new character */ sourceIndex=nextSourceIndex; @@ -3795,7 +3795,7 @@ ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, /* write back the updated pointers */ pArgs->source=source; - pArgs->target=(char *)target; + pArgs->target = reinterpret_cast<char*>(target); pArgs->offsets=offsets; } @@ -3833,13 +3833,13 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs, cnv=pArgs->converter; source=pArgs->source; sourceLimit=pArgs->sourceLimit; - target=(uint8_t *)pArgs->target; - targetCapacity=(int32_t)(pArgs->targetLimit-pArgs->target); + target = reinterpret_cast<uint8_t*>(pArgs->target); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - pArgs->target); offsets=pArgs->offsets; table=cnv->sharedData->mbcs.fromUnicodeTable; if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) { - results=(uint16_t *)cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes; + results = reinterpret_cast<uint16_t*>(cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes); } else { results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes; } @@ -3864,7 +3864,7 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs, * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter * for the minimum of the sourceLength and targetCapacity */ - length=(int32_t)(sourceLimit-source); + length = static_cast<int32_t>(sourceLimit - source); if(length<targetCapacity) { targetCapacity=length; } @@ -3937,7 +3937,7 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs, */ /* convert the Unicode code point in c into codepage bytes */ if(c<=0x7f && IS_ASCII_ROUNDTRIP(c, asciiRoundtrips)) { - *target++=(uint8_t)c; + *target++ = static_cast<uint8_t>(c); --targetCapacity; c=0; continue; @@ -3948,7 +3948,7 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs, /* assigned, write the output character bytes from value and length */ /* length==1 */ /* this is easy because we know that there is enough space */ - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); --targetCapacity; /* normal end of conversion: prepare for a new character */ @@ -3993,7 +3993,7 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs, /* set offsets since the start or the last extension */ if(offsets!=nullptr) { - int32_t count=(int32_t)(source-lastSource); + int32_t count = static_cast<int32_t>(source - lastSource); /* do not set the offset for this character */ count-=length; @@ -4009,11 +4009,11 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs, lastSource=source; c=_extFromU(cnv, cnv->sharedData, c, &source, sourceLimit, - &target, (const uint8_t *)(pArgs->targetLimit), + &target, reinterpret_cast<const uint8_t*>(pArgs->targetLimit), &offsets, sourceIndex, pArgs->flush, pErrorCode); - sourceIndex+=length+(int32_t)(source-lastSource); + sourceIndex += length + static_cast<int32_t>(source - lastSource); lastSource=source; if(U_FAILURE(*pErrorCode)) { @@ -4023,8 +4023,8 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs, /* a mapping was written to the target, continue */ /* recalculate the targetCapacity after an extension mapping */ - targetCapacity=(int32_t)(pArgs->targetLimit-(char *)target); - length=(int32_t)(sourceLimit-source); + targetCapacity = static_cast<int32_t>(pArgs->targetLimit - reinterpret_cast<char*>(target)); + length = static_cast<int32_t>(sourceLimit - source); if(length<targetCapacity) { targetCapacity=length; } @@ -4063,7 +4063,7 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs, /* write back the updated pointers */ pArgs->source=source; - pArgs->target=(char *)target; + pArgs->target = reinterpret_cast<char*>(target); pArgs->offsets=offsets; } @@ -4777,14 +4777,14 @@ ucnv_MBCSFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, ) { /* EBCDIC_STATEFUL ending with DBCS: emit an SI to return the output stream to SBCS */ if(targetCapacity>0) { - *target++=(uint8_t)siBytes[0]; + *target++ = siBytes[0]; if (siLength == 2) { if (targetCapacity<2) { - cnv->charErrorBuffer[0]=(uint8_t)siBytes[1]; + cnv->charErrorBuffer[0] = siBytes[1]; cnv->charErrorBufferLength=1; *pErrorCode=U_BUFFER_OVERFLOW_ERROR; } else { - *target++=(uint8_t)siBytes[1]; + *target++ = siBytes[1]; } } if(offsets!=nullptr) { @@ -4793,9 +4793,9 @@ ucnv_MBCSFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, } } else { /* target is full */ - cnv->charErrorBuffer[0]=(uint8_t)siBytes[0]; + cnv->charErrorBuffer[0] = siBytes[0]; if (siLength == 2) { - cnv->charErrorBuffer[1]=(uint8_t)siBytes[1]; + cnv->charErrorBuffer[1] = siBytes[1]; } cnv->charErrorBufferLength=siLength; *pErrorCode=U_BUFFER_OVERFLOW_ERROR; @@ -5042,13 +5042,13 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, cnv=pFromUArgs->converter; source=(uint8_t *)pToUArgs->source; sourceLimit=(uint8_t *)pToUArgs->sourceLimit; - target=(uint8_t *)pFromUArgs->target; - targetCapacity=(int32_t)(pFromUArgs->targetLimit-pFromUArgs->target); + target = reinterpret_cast<uint8_t*>(pFromUArgs->target); + targetCapacity = static_cast<int32_t>(pFromUArgs->targetLimit - pFromUArgs->target); table=cnv->sharedData->mbcs.fromUnicodeTable; sbcsIndex=cnv->sharedData->mbcs.sbcsIndex; if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) { - results=(uint16_t *)cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes; + results = reinterpret_cast<uint16_t*>(cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes); } else { results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes; } @@ -5061,13 +5061,13 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, /* use only roundtrips and fallbacks from private-use characters */ minValue=0xc00; } - hasSupplementary=(UBool)(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY); + hasSupplementary = static_cast<UBool>(cnv->sharedData->mbcs.unicodeMask & UCNV_HAS_SUPPLEMENTARY); /* get the converter state from the UTF-8 UConverter */ if(utf8->toULength > 0) { toULength=oldToULength=utf8->toULength; - toULimit=(int8_t)utf8->mode; - c=(UChar32)utf8->toUnicodeStatus; + toULimit = static_cast<int8_t>(utf8->mode); + c = static_cast<UChar32>(utf8->toUnicodeStatus); } else { toULength=oldToULength=toULimit=0; c = 0; @@ -5080,7 +5080,7 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, { // Do not go back into the bytes that will be read for finishing a partial // sequence from the previous buffer. - int32_t length=(int32_t)(sourceLimit-source) - (toULimit-oldToULength); + int32_t length = static_cast<int32_t>(sourceLimit - source) - (toULimit - oldToULength); if(length>0) { uint8_t b1=*(sourceLimit-1); if(U8_IS_SINGLE(b1)) { @@ -5130,7 +5130,7 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, if(U8_IS_SINGLE(b)) { /* convert ASCII */ if(IS_ASCII_ROUNDTRIP(b, asciiRoundtrips)) { - *target++=(uint8_t)b; + *target++ = b; --targetCapacity; continue; } else { @@ -5141,13 +5141,13 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, if(b<0xe0) { if( /* handle U+0080..U+07FF inline */ b>=0xc2 && - (t1=(uint8_t)(*source-0x80)) <= 0x3f + (t1 = static_cast<uint8_t>(*source - 0x80)) <= 0x3f ) { c=b&0x1f; ++source; value=SBCS_RESULT_FROM_UTF8(sbcsIndex, results, c, t1); if(value>=minValue) { - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); --targetCapacity; continue; } else { @@ -5158,14 +5158,14 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, } } else if(b==0xe0) { if( /* handle U+0800..U+0FFF inline */ - (t1=(uint8_t)(source[0]-0x80)) <= 0x3f && t1 >= 0x20 && - (t2=(uint8_t)(source[1]-0x80)) <= 0x3f + (t1 = static_cast<uint8_t>(source[0] - 0x80)) <= 0x3f && t1 >= 0x20 && + (t2 = static_cast<uint8_t>(source[1] - 0x80)) <= 0x3f ) { c=t1; source+=2; value=SBCS_RESULT_FROM_UTF8(sbcsIndex, results, c, t2); if(value>=minValue) { - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); --targetCapacity; continue; } else { @@ -5212,7 +5212,7 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, utf8->toULength=toULength; utf8->mode=toULimit; pToUArgs->source=(char *)source; - pFromUArgs->target=(char *)target; + pFromUArgs->target = reinterpret_cast<char*>(target); return; } } @@ -5238,7 +5238,7 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, } utf8->toULength=toULength; pToUArgs->source=(char *)source; - pFromUArgs->target=(char *)target; + pFromUArgs->target = reinterpret_cast<char*>(target); *pErrorCode=U_ILLEGAL_CHAR_FOUND; return; } @@ -5247,7 +5247,7 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, if(value>=minValue) { /* output the mapping for c */ - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); --targetCapacity; } else { /* value<minValue means c is unassigned (unmappable) */ @@ -5283,7 +5283,7 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, /* a mapping was written to the target, continue */ /* recalculate the targetCapacity after an extension mapping */ - targetCapacity=(int32_t)(pFromUArgs->targetLimit-(char *)target); + targetCapacity = static_cast<int32_t>(pFromUArgs->targetLimit - reinterpret_cast<char*>(target)); } } } else { @@ -5315,7 +5315,7 @@ ucnv_SBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, /* write back the updated pointers */ pToUArgs->source=(char *)source; - pFromUArgs->target=(char *)target; + pFromUArgs->target = reinterpret_cast<char*>(target); } static void U_CALLCONV @@ -5345,25 +5345,25 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, cnv=pFromUArgs->converter; source=(uint8_t *)pToUArgs->source; sourceLimit=(uint8_t *)pToUArgs->sourceLimit; - target=(uint8_t *)pFromUArgs->target; - targetCapacity=(int32_t)(pFromUArgs->targetLimit-pFromUArgs->target); + target = reinterpret_cast<uint8_t*>(pFromUArgs->target); + targetCapacity = static_cast<int32_t>(pFromUArgs->targetLimit - pFromUArgs->target); table=cnv->sharedData->mbcs.fromUnicodeTable; mbcsIndex=cnv->sharedData->mbcs.mbcsIndex; if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) { - results=(uint16_t *)cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes; + results = reinterpret_cast<uint16_t*>(cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes); } else { results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes; } asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips; - hasSupplementary=(UBool)(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY); + hasSupplementary = static_cast<UBool>(cnv->sharedData->mbcs.unicodeMask & UCNV_HAS_SUPPLEMENTARY); /* get the converter state from the UTF-8 UConverter */ if(utf8->toULength > 0) { toULength=oldToULength=utf8->toULength; - toULimit=(int8_t)utf8->mode; - c=(UChar32)utf8->toUnicodeStatus; + toULimit = static_cast<int8_t>(utf8->mode); + c = static_cast<UChar32>(utf8->toUnicodeStatus); } else { toULength=oldToULength=toULimit=0; c = 0; @@ -5376,7 +5376,7 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, { // Do not go back into the bytes that will be read for finishing a partial // sequence from the previous buffer. - int32_t length=(int32_t)(sourceLimit-source) - (toULimit-oldToULength); + int32_t length = static_cast<int32_t>(sourceLimit - source) - (toULimit - oldToULength); if(length>0) { uint8_t b1=*(sourceLimit-1); if(U8_IS_SINGLE(b1)) { @@ -5423,7 +5423,7 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, if( /* handle U+0800..U+D7FF inline */ b<=0xed && // do not assume maxFastUChar>0xd7ff U8_IS_VALID_LEAD3_AND_T1(b, t1=source[0]) && - (t2=(uint8_t)(source[1]-0x80)) <= 0x3f + (t2 = static_cast<uint8_t>(source[1] - 0x80)) <= 0x3f ) { c=((b&0xf)<<6)|(t1&0x3f); source+=2; @@ -5438,7 +5438,7 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, } else { if( /* handle U+0080..U+07FF inline */ b>=0xc2 && - (t1=(uint8_t)(*source-0x80)) <= 0x3f + (t1 = static_cast<uint8_t>(*source - 0x80)) <= 0x3f ) { c=b&0x1f; ++source; @@ -5486,7 +5486,7 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, utf8->toULength=toULength; utf8->mode=toULimit; pToUArgs->source=(char *)source; - pFromUArgs->target=(char *)target; + pFromUArgs->target = reinterpret_cast<char*>(target); return; } } @@ -5512,7 +5512,7 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, } utf8->toULength=toULength; pToUArgs->source=(char *)source; - pFromUArgs->target=(char *)target; + pFromUArgs->target = reinterpret_cast<char*>(target); *pErrorCode=U_ILLEGAL_CHAR_FOUND; return; } @@ -5534,15 +5534,15 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, /* from the first if in the loop we know that targetCapacity>0 */ if(value<=0xff) { /* this is easy because we know that there is enough space */ - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); --targetCapacity; } else /* length==2 */ { - *target++=(uint8_t)(value>>8); + *target++ = static_cast<uint8_t>(value >> 8); if(2<=targetCapacity) { - *target++=(uint8_t)value; + *target++ = static_cast<uint8_t>(value); targetCapacity-=2; } else { - cnv->charErrorBuffer[0]=(char)value; + cnv->charErrorBuffer[0] = static_cast<char>(value); cnv->charErrorBufferLength=1; /* target overflow */ @@ -5586,7 +5586,7 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, /* a mapping was written to the target, continue */ /* recalculate the targetCapacity after an extension mapping */ - targetCapacity=(int32_t)(pFromUArgs->targetLimit-(char *)target); + targetCapacity = static_cast<int32_t>(pFromUArgs->targetLimit - reinterpret_cast<char*>(target)); continue; } } @@ -5619,7 +5619,7 @@ ucnv_DBCSFromUTF8(UConverterFromUnicodeArgs *pFromUArgs, /* write back the updated pointers */ pToUArgs->source=(char *)source; - pFromUArgs->target=(char *)target; + pFromUArgs->target = reinterpret_cast<char*>(target); } /* miscellaneous ------------------------------------------------------------ */ @@ -5634,7 +5634,7 @@ ucnv_MBCSGetStarters(const UConverter* cnv, state0=cnv->sharedData->mbcs.stateTable[cnv->sharedData->mbcs.dbcsOnlyState]; for(i=0; i<256; ++i) { /* all bytes that cause a state transition from state 0 are lead bytes */ - starters[i]= (UBool)MBCS_ENTRY_IS_TRANSITION(state0[i]); + starters[i] = static_cast<UBool>(MBCS_ENTRY_IS_TRANSITION(state0[i])); } } @@ -5644,7 +5644,7 @@ ucnv_MBCSGetStarters(const UConverter* cnv, */ U_CFUNC UBool ucnv_MBCSIsLeadByte(UConverterSharedData *sharedData, char byte) { - return (UBool)MBCS_ENTRY_IS_TRANSITION(sharedData->mbcs.stateTable[0][(uint8_t)byte]); + return MBCS_ENTRY_IS_TRANSITION(sharedData->mbcs.stateTable[0][(uint8_t)byte]); } static void U_CALLCONV @@ -5663,11 +5663,11 @@ ucnv_MBCSWriteSub(UConverterFromUnicodeArgs *pArgs, (cnv->invalidUCharBuffer[0]<=0xff)) ) { /* select subChar1 if it is set (not 0) and the unmappable Unicode code point is up to U+00ff (IBM MBCS behavior) */ - subchar=(char *)&cnv->subChar1; + subchar = reinterpret_cast<char*>(&cnv->subChar1); length=1; } else { /* select subChar in all other cases */ - subchar=(char *)cnv->subChars; + subchar = reinterpret_cast<char*>(cnv->subChars); length=cnv->subCharLen; } @@ -5701,7 +5701,7 @@ ucnv_MBCSWriteSub(UConverterFromUnicodeArgs *pArgs, return; } subchar=buffer; - length=(int32_t)(p-buffer); + length = static_cast<int32_t>(p - buffer); } ucnv_cbFromUWriteBytes(pArgs, subchar, length, offsetIndex, pErrorCode); diff --git a/deps/icu-small/source/common/ucnvscsu.cpp b/deps/icu-small/source/common/ucnvscsu.cpp index e6f8660df40433..5412136a346a9e 100644 --- a/deps/icu-small/source/common/ucnvscsu.cpp +++ b/deps/icu-small/source/common/ucnvscsu.cpp @@ -883,8 +883,8 @@ static int8_t getWindow(const uint32_t offsets[8], uint32_t c) { int i; for(i=0; i<8; ++i) { - if((uint32_t)(c-offsets[i])<=0x7f) { - return (int8_t)(i); + if (c - offsets[i] <= 0x7f) { + return static_cast<int8_t>(i); } } return -1; @@ -893,9 +893,9 @@ getWindow(const uint32_t offsets[8], uint32_t c) { /* is the character in the dynamic window starting at the offset, or in the direct-encoded range? */ static UBool isInOffsetWindowOrDirect(uint32_t offset, uint32_t c) { - return (UBool)(c<=offset+0x7f && + return c<=offset+0x7f && (c>=offset || (c<=0x7f && - (c>=0x20 || (1UL<<c)&0x2601)))); + (c>=0x20 || (1UL<<c)&0x2601))); /* binary 0010 0110 0000 0001, check for b==0xd || b==0xa || b==9 || b==0 */ } @@ -963,7 +963,7 @@ getDynamicOffset(uint32_t c, uint32_t *pOffset) { int i; for(i=0; i<7; ++i) { - if((uint32_t)(c-fixedOffsets[i])<=0x7f) { + if (c - fixedOffsets[i] <= 0x7f) { *pOffset=fixedOffsets[i]; return 0xf9+i; } @@ -973,16 +973,16 @@ getDynamicOffset(uint32_t c, uint32_t *pOffset) { /* No dynamic window for US-ASCII. */ return -1; } else if(c<0x3400 || - (uint32_t)(c-0x10000)<(0x14000-0x10000) || - (uint32_t)(c-0x1d000)<=(0x1ffff-0x1d000) + c - 0x10000 < 0x14000 - 0x10000 || + c - 0x1d000 <= 0x1ffff - 0x1d000 ) { /* This character is in a code range for a "small", i.e., reasonably windowable, script. */ *pOffset=c&0x7fffff80; - return (int)(c>>7); + return static_cast<int>(c >> 7); } else if(0xe000<=c && c!=0xfeff && c<0xfff0) { /* For these characters we need to take the gapOffset into account. */ *pOffset=c&0x7fffff80; - return (int)((c-gapOffset)>>7); + return static_cast<int>((c - gapOffset) >> 7); } else { return -1; } @@ -1208,8 +1208,8 @@ _SCSUFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, c=((uint32_t)(SD0+dynamicWindow)<<16)|((uint32_t)code<<8)|(c-currentOffset)|0x80; length=3; goto outputBytes; - } else if((uint32_t)(c-0x3400)<(0xd800-0x3400) && - (source>=sourceLimit || (uint32_t)(*source-0x3400)<(0xd800-0x3400)) + } else if ((c - 0x3400) < (0xd800 - 0x3400) && + (source >= sourceLimit || (uint32_t)(*source - 0x3400) < (0xd800 - 0x3400)) ) { /* * this character is not compressible (a BMP ideograph or similar); @@ -1248,7 +1248,7 @@ _SCSUFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, c=*source++; ++nextSourceIndex; - if((uint32_t)(c-0x3400)<(0xd800-0x3400)) { + if ((c - 0x3400) < (0xd800 - 0x3400)) { /* not compressible, write character directly */ if(targetCapacity>=2) { *target++=(uint8_t)(c>>8); @@ -1262,10 +1262,10 @@ _SCSUFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs, length=2; goto outputBytes; } - } else if((uint32_t)(c-0x3400)>=(0xf300-0x3400) /* c<0x3400 || c>=0xf300 */) { + } else if (c - 0x3400 >= 0xf300 - 0x3400 /* c<0x3400 || c>=0xf300 */) { /* compress BMP character if the following one is not an uncompressible ideograph */ if(!(source<sourceLimit && (uint32_t)(*source-0x3400)<(0xd800-0x3400))) { - if(((uint32_t)(c-0x30)<10 || (uint32_t)(c-0x61)<26 || (uint32_t)(c-0x41)<26)) { + if (c - 0x30 < 10 || c - 0x61 < 26 || c - 0x41 < 26) { /* ASCII digit or letter */ isSingleByteMode=true; c|=((uint32_t)(UC0+dynamicWindow)<<8)|c; @@ -1691,8 +1691,8 @@ _SCSUFromUnicode(UConverterFromUnicodeArgs *pArgs, c=((uint32_t)(SD0+dynamicWindow)<<16)|((uint32_t)code<<8)|(c-currentOffset)|0x80; length=3; goto outputBytes; - } else if((uint32_t)(c-0x3400)<(0xd800-0x3400) && - (source>=sourceLimit || (uint32_t)(*source-0x3400)<(0xd800-0x3400)) + } else if (c - 0x3400 < 0xd800 - 0x3400 && + (source >= sourceLimit || static_cast<uint32_t>(*source - 0x3400) < 0xd800 - 0x3400) ) { /* * this character is not compressible (a BMP ideograph or similar); @@ -1729,7 +1729,7 @@ _SCSUFromUnicode(UConverterFromUnicodeArgs *pArgs, } c=*source++; - if((uint32_t)(c-0x3400)<(0xd800-0x3400)) { + if (c - 0x3400 < 0xd800 - 0x3400) { /* not compressible, write character directly */ if(targetCapacity>=2) { *target++=(uint8_t)(c>>8); @@ -1739,10 +1739,10 @@ _SCSUFromUnicode(UConverterFromUnicodeArgs *pArgs, length=2; goto outputBytes; } - } else if((uint32_t)(c-0x3400)>=(0xf300-0x3400) /* c<0x3400 || c>=0xf300 */) { + } else if (c - 0x3400 >= 0xf300 - 0x3400 /* c<0x3400 || c>=0xf300 */) { /* compress BMP character if the following one is not an uncompressible ideograph */ if(!(source<sourceLimit && (uint32_t)(*source-0x3400)<(0xd800-0x3400))) { - if(((uint32_t)(c-0x30)<10 || (uint32_t)(c-0x61)<26 || (uint32_t)(c-0x41)<26)) { + if (c - 0x30 < 10 || c - 0x61 < 26 || c - 0x41 < 26) { /* ASCII digit or letter */ isSingleByteMode=true; c|=((uint32_t)(UC0+dynamicWindow)<<8)|c; diff --git a/deps/icu-small/source/common/ucnvsel.cpp b/deps/icu-small/source/common/ucnvsel.cpp index a286646395b30f..01d9c7e0c210ca 100644 --- a/deps/icu-small/source/common/ucnvsel.cpp +++ b/deps/icu-small/source/common/ucnvsel.cpp @@ -377,7 +377,7 @@ ucnvsel_swap(const UDataSwapper *ds, } /* check data format and format version */ - const UDataInfo *pInfo = (const UDataInfo *)((const char *)inData + 4); + const UDataInfo* pInfo = reinterpret_cast<const UDataInfo*>(static_cast<const char*>(inData) + 4); if(!( pInfo->dataFormat[0] == 0x43 && /* dataFormat="CSel" */ pInfo->dataFormat[1] == 0x53 && @@ -407,11 +407,11 @@ ucnvsel_swap(const UDataSwapper *ds, } } - const uint8_t *inBytes = (const uint8_t *)inData + headerSize; - uint8_t *outBytes = (uint8_t *)outData + headerSize; + const uint8_t* inBytes = static_cast<const uint8_t*>(inData) + headerSize; + uint8_t* outBytes = static_cast<uint8_t*>(outData) + headerSize; /* read the indexes */ - const int32_t *inIndexes = (const int32_t *)inBytes; + const int32_t* inIndexes = reinterpret_cast<const int32_t*>(inBytes); int32_t indexes[16]; int32_t i; for(i = 0; i < 16; ++i) { diff --git a/deps/icu-small/source/common/ucol_swp.cpp b/deps/icu-small/source/common/ucol_swp.cpp index b5894a1feff883..ea72bb8b8d1107 100644 --- a/deps/icu-small/source/common/ucol_swp.cpp +++ b/deps/icu-small/source/common/ucol_swp.cpp @@ -108,11 +108,11 @@ swapFormatVersion3(const UDataSwapper *ds, return 0; } - inBytes=(const uint8_t *)inData; - outBytes=(uint8_t *)outData; + inBytes = static_cast<const uint8_t*>(inData); + outBytes = static_cast<uint8_t*>(outData); - inHeader=(const UCATableHeader *)inData; - outHeader=(UCATableHeader *)outData; + inHeader = static_cast<const UCATableHeader*>(inData); + outHeader = static_cast<UCATableHeader*>(outData); /* * The collation binary must contain at least the UCATableHeader, @@ -175,7 +175,7 @@ swapFormatVersion3(const UDataSwapper *ds, header.leadByteToScript= ds->readUInt32(inHeader->leadByteToScript); /* swap the 32-bit integers in the header */ - ds->swapArray32(ds, inHeader, (int32_t)((const char *)&inHeader->jamoSpecial-(const char *)inHeader), + ds->swapArray32(ds, inHeader, static_cast<int32_t>(reinterpret_cast<const char*>(&inHeader->jamoSpecial) - reinterpret_cast<const char*>(inHeader)), outHeader, pErrorCode); ds->swapArray32(ds, &(inHeader->scriptToLeadByte), sizeof(header.scriptToLeadByte) + sizeof(header.leadByteToScript), &(outHeader->scriptToLeadByte), pErrorCode); @@ -198,7 +198,7 @@ swapFormatVersion3(const UDataSwapper *ds, /* no contractions: expansions bounded by the main trie */ count=header.mappingPosition-header.expansion; } - ds->swapArray32(ds, inBytes+header.expansion, (int32_t)count, + ds->swapArray32(ds, inBytes + header.expansion, static_cast<int32_t>(count), outBytes+header.expansion, pErrorCode); } @@ -216,7 +216,7 @@ swapFormatVersion3(const UDataSwapper *ds, /* swap the main trie */ if(header.mappingPosition!=0) { count=header.endExpansionCE-header.mappingPosition; - utrie_swap(ds, inBytes+header.mappingPosition, (int32_t)count, + utrie_swap(ds, inBytes + header.mappingPosition, static_cast<int32_t>(count), outBytes+header.mappingPosition, pErrorCode); } @@ -241,7 +241,7 @@ swapFormatVersion3(const UDataSwapper *ds, /* swap UCA contractions */ if(header.contractionUCACombosSize!=0) { count=header.contractionUCACombosSize*inHeader->contractionUCACombosWidth*U_SIZEOF_UCHAR; - ds->swapArray16(ds, inBytes+header.contractionUCACombos, (int32_t)count, + ds->swapArray16(ds, inBytes + header.contractionUCACombos, static_cast<int32_t>(count), outBytes+header.contractionUCACombos, pErrorCode); } @@ -306,10 +306,10 @@ swapFormatVersion4(const UDataSwapper *ds, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return 0; } - const uint8_t *inBytes=(const uint8_t *)inData; - uint8_t *outBytes=(uint8_t *)outData; + const uint8_t* inBytes = static_cast<const uint8_t*>(inData); + uint8_t* outBytes = static_cast<uint8_t*>(outData); - const int32_t *inIndexes=(const int32_t *)inBytes; + const int32_t* inIndexes = reinterpret_cast<const int32_t*>(inBytes); int32_t indexes[IX_TOTAL_SIZE+1]; // Need at least IX_INDEXES_LENGTH and IX_OPTIONS. diff --git a/deps/icu-small/source/common/ucptrie.cpp b/deps/icu-small/source/common/ucptrie.cpp index 0004160a238b0e..3e4b6a606e5eba 100644 --- a/deps/icu-small/source/common/ucptrie.cpp +++ b/deps/icu-small/source/common/ucptrie.cpp @@ -258,11 +258,11 @@ inline uint32_t maybeFilterValue(uint32_t value, uint32_t trieNullValue, uint32_ UChar32 getRange(const void *t, UChar32 start, UCPMapValueFilter *filter, const void *context, uint32_t *pValue) { - if ((uint32_t)start > MAX_UNICODE) { + if (static_cast<uint32_t>(start) > MAX_UNICODE) { return U_SENTINEL; } const UCPTrie *trie = reinterpret_cast<const UCPTrie *>(t); - UCPTrieValueWidth valueWidth = (UCPTrieValueWidth)trie->valueWidth; + UCPTrieValueWidth valueWidth = static_cast<UCPTrieValueWidth>(trie->valueWidth); if (start >= trie->highStart) { if (pValue != nullptr) { int32_t di = trie->dataLength - UCPTRIE_HIGH_VALUE_NEG_DATA_OFFSET; @@ -304,7 +304,7 @@ UChar32 getRange(const void *t, UChar32 start, i1 += UCPTRIE_SMALL_INDEX_LENGTH; } i3Block = trie->index[ - (int32_t)trie->index[i1] + ((c >> UCPTRIE_SHIFT_2) & UCPTRIE_INDEX_2_MASK)]; + static_cast<int32_t>(trie->index[i1]) + ((c >> UCPTRIE_SHIFT_2) & UCPTRIE_INDEX_2_MASK)]; if (i3Block == prevI3Block && (c - start) >= UCPTRIE_CP_PER_INDEX_2_ENTRY) { // The index-3 block is the same as the previous one, and filled with value. U_ASSERT((c & (UCPTRIE_CP_PER_INDEX_2_ENTRY - 1)) == 0); @@ -341,7 +341,7 @@ UChar32 getRange(const void *t, UChar32 start, // 18-bit indexes stored in groups of 9 entries per 8 indexes. int32_t group = (i3Block & 0x7fff) + (i3 & ~7) + (i3 >> 3); int32_t gi = i3 & 7; - block = ((int32_t)index[group++] << (2 + (2 * gi))) & 0x30000; + block = (static_cast<int32_t>(index[group++]) << (2 + (2 * gi))) & 0x30000; block |= index[group + gi]; } if (block == prevBlock && (c - start) >= dataBlockLength) { diff --git a/deps/icu-small/source/common/ucurr.cpp b/deps/icu-small/source/common/ucurr.cpp index dbad1e5014796e..b74a80a676afc5 100644 --- a/deps/icu-small/source/common/ucurr.cpp +++ b/deps/icu-small/source/common/ucurr.cpp @@ -130,7 +130,7 @@ class EquivIterator : public icu::UMemory { const icu::UnicodeString * EquivIterator::next() { - const icu::UnicodeString* _next = (const icu::UnicodeString*) _hash.get(*_current); + const icu::UnicodeString* _next = static_cast<const icu::UnicodeString*>(_hash.get(*_current)); if (_next == nullptr) { U_ASSERT(_current == _start); return nullptr; @@ -260,7 +260,7 @@ currSymbolsEquiv_cleanup() */ static void U_CALLCONV deleteIsoCodeEntry(void *obj) { - IsoCodeEntry *entry = (IsoCodeEntry*)obj; + IsoCodeEntry* entry = static_cast<IsoCodeEntry*>(obj); uprv_free(entry); } @@ -269,7 +269,7 @@ deleteIsoCodeEntry(void *obj) { */ static void U_CALLCONV deleteUnicode(void *obj) { - icu::UnicodeString *entry = (icu::UnicodeString*)obj; + icu::UnicodeString* entry = static_cast<icu::UnicodeString*>(obj); delete entry; } @@ -306,10 +306,9 @@ _findMetaData(const char16_t* currency, UErrorCode& ec) { // move out of the root locale file later; if it does, update this // code.] UResourceBundle* currencyData = ures_openDirect(U_ICUDATA_CURR, CURRENCY_DATA, &ec); - UResourceBundle* currencyMeta = ures_getByKey(currencyData, CURRENCY_META, currencyData, &ec); + LocalUResourceBundlePointer currencyMeta(ures_getByKey(currencyData, CURRENCY_META, currencyData, &ec)); if (U_FAILURE(ec)) { - ures_close(currencyMeta); // Config/build error; return hard-coded defaults return LAST_RESORT_DATA; } @@ -317,32 +316,25 @@ _findMetaData(const char16_t* currency, UErrorCode& ec) { // Look up our currency, or if that's not available, then DEFAULT char buf[ISO_CURRENCY_CODE_LENGTH+1]; UErrorCode ec2 = U_ZERO_ERROR; // local error code: soft failure - UResourceBundle* rb = ures_getByKey(currencyMeta, myUCharsToChars(buf, currency), nullptr, &ec2); + LocalUResourceBundlePointer rb(ures_getByKey(currencyMeta.getAlias(), myUCharsToChars(buf, currency), nullptr, &ec2)); if (U_FAILURE(ec2)) { - ures_close(rb); - rb = ures_getByKey(currencyMeta,DEFAULT_META, nullptr, &ec); + rb.adoptInstead(ures_getByKey(currencyMeta.getAlias(),DEFAULT_META, nullptr, &ec)); if (U_FAILURE(ec)) { - ures_close(currencyMeta); - ures_close(rb); // Config/build error; return hard-coded defaults return LAST_RESORT_DATA; } } int32_t len; - const int32_t *data = ures_getIntVector(rb, &len, &ec); + const int32_t *data = ures_getIntVector(rb.getAlias(), &len, &ec); if (U_FAILURE(ec) || len != 4) { // Config/build error; return hard-coded defaults if (U_SUCCESS(ec)) { ec = U_INVALID_FORMAT_ERROR; } - ures_close(currencyMeta); - ures_close(rb); return LAST_RESORT_DATA; } - ures_close(currencyMeta); - ures_close(rb); return data; } @@ -380,8 +372,8 @@ struct CReg : public icu::UMemory { CReg(const char16_t* _iso, const char* _id) : next(nullptr) { - int32_t len = (int32_t)uprv_strlen(_id); - if (len > (int32_t)(sizeof(id)-1)) { + int32_t len = static_cast<int32_t>(uprv_strlen(_id)); + if (len > static_cast<int32_t>(sizeof(id) - 1)) { len = (sizeof(id)-1); } uprv_strncpy(id, _id, len); @@ -565,14 +557,14 @@ ucurr_forLocale(const char* locale, localStatus = U_ZERO_ERROR; UResourceBundle *rb = ures_openDirect(U_ICUDATA_CURR, CURRENCY_DATA, &localStatus); UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus); - UResourceBundle *countryArray = ures_getByKey(rb, id.data(), cm, &localStatus); + LocalUResourceBundlePointer countryArray(ures_getByKey(rb, id.data(), cm, &localStatus)); // https://unicode-org.atlassian.net/browse/ICU-21997 // Prefer to use currencies that are legal tender. if (U_SUCCESS(localStatus)) { - int32_t arrayLength = ures_getSize(countryArray); + int32_t arrayLength = ures_getSize(countryArray.getAlias()); for (int32_t i = 0; i < arrayLength; ++i) { LocalUResourceBundlePointer currencyReq( - ures_getByIndex(countryArray, i, nullptr, &localStatus)); + ures_getByIndex(countryArray.getAlias(), i, nullptr, &localStatus)); // The currency is legal tender if it is *not* marked with tender{"false"}. UErrorCode tenderStatus = localStatus; const char16_t *tender = @@ -592,7 +584,6 @@ ucurr_forLocale(const char* locale, localStatus = U_MISSING_RESOURCE_ERROR; } } - ures_close(countryArray); } if ((U_FAILURE(localStatus)) && strchr(id.data(), '_') != nullptr) { @@ -805,21 +796,19 @@ ucurr_getPluralName(const char16_t* currency, rb = ures_getByKey(rb, CURRENCYPLURALS, rb, &ec2); // Fetch resource with multi-level resource inheritance fallback - rb = ures_getByKeyWithFallback(rb, buf, rb, &ec2); + LocalUResourceBundlePointer curr(ures_getByKeyWithFallback(rb, buf, rb, &ec2)); - s = ures_getStringByKeyWithFallback(rb, pluralCount, len, &ec2); + s = ures_getStringByKeyWithFallback(curr.getAlias(), pluralCount, len, &ec2); if (U_FAILURE(ec2)) { // fall back to "other" ec2 = U_ZERO_ERROR; - s = ures_getStringByKeyWithFallback(rb, "other", len, &ec2); + s = ures_getStringByKeyWithFallback(curr.getAlias(), "other", len, &ec2); if (U_FAILURE(ec2)) { - ures_close(rb); // fall back to long name in Currencies return ucurr_getName(currency, locale, UCURR_LONG_NAME, isChoiceFormat, len, ec); } } - ures_close(rb); // If we've succeeded we're done. Otherwise, try to fallback. // If that fails (because we are already at root) then exit. @@ -866,8 +855,8 @@ typedef struct { // Comparison function used in quick sort. static int U_CALLCONV currencyNameComparator(const void* a, const void* b) { - const CurrencyNameStruct* currName_1 = (const CurrencyNameStruct*)a; - const CurrencyNameStruct* currName_2 = (const CurrencyNameStruct*)b; + const CurrencyNameStruct* currName_1 = static_cast<const CurrencyNameStruct*>(a); + const CurrencyNameStruct* currName_2 = static_cast<const CurrencyNameStruct*>(b); for (int32_t i = 0; i < MIN(currName_1->currencyNameLen, currName_2->currencyNameLen); ++i) { @@ -911,34 +900,29 @@ getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_ for (;;) { UErrorCode ec2 = U_ZERO_ERROR; // TODO: ures_openDirect? - UResourceBundle* rb = ures_open(U_ICUDATA_CURR, locale.data(), &ec2); - UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, nullptr, &ec2); - int32_t n = ures_getSize(curr); + LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_CURR, locale.data(), &ec2)); + LocalUResourceBundlePointer curr(ures_getByKey(rb.getAlias(), CURRENCIES, nullptr, &ec2)); + int32_t n = ures_getSize(curr.getAlias()); for (int32_t i=0; i<n; ++i) { - UResourceBundle* names = ures_getByIndex(curr, i, nullptr, &ec2); + LocalUResourceBundlePointer names(ures_getByIndex(curr.getAlias(), i, nullptr, &ec2)); int32_t len; - s = ures_getStringByIndex(names, UCURR_SYMBOL_NAME, &len, &ec2); + s = ures_getStringByIndex(names.getAlias(), UCURR_SYMBOL_NAME, &len, &ec2); ++(*total_currency_symbol_count); // currency symbol if (currencySymbolsEquiv != nullptr) { *total_currency_symbol_count += countEquivalent(*currencySymbolsEquiv, UnicodeString(true, s, len)); } ++(*total_currency_symbol_count); // iso code ++(*total_currency_name_count); // long name - ures_close(names); } // currency plurals UErrorCode ec3 = U_ZERO_ERROR; - UResourceBundle* curr_p = ures_getByKey(rb, CURRENCYPLURALS, nullptr, &ec3); - n = ures_getSize(curr_p); + LocalUResourceBundlePointer curr_p(ures_getByKey(rb.getAlias(), CURRENCYPLURALS, nullptr, &ec3)); + n = ures_getSize(curr_p.getAlias()); for (int32_t i=0; i<n; ++i) { - UResourceBundle* names = ures_getByIndex(curr_p, i, nullptr, &ec3); - *total_currency_name_count += ures_getSize(names); - ures_close(names); + LocalUResourceBundlePointer names(ures_getByIndex(curr_p.getAlias(), i, nullptr, &ec3)); + *total_currency_name_count += ures_getSize(names.getAlias()); } - ures_close(curr_p); - ures_close(curr); - ures_close(rb); if (!fallback(locale)) { break; @@ -953,7 +937,10 @@ toUpperCase(const char16_t* source, int32_t len, const char* locale) { int32_t destLen = u_strToUpper(dest, 0, source, len, locale, &ec); ec = U_ZERO_ERROR; - dest = (char16_t*)uprv_malloc(sizeof(char16_t) * MAX(destLen, len)); + dest = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * MAX(destLen, len))); + if (dest == nullptr) { + return nullptr; + } u_strToUpper(dest, destLen, source, len, locale, &ec); if (U_FAILURE(ec)) { u_memcpy(dest, source, len); @@ -962,6 +949,7 @@ toUpperCase(const char16_t* source, int32_t len, const char* locale) { } +static void deleteCurrencyNames(CurrencyNameStruct* currencyNames, int32_t count); // Collect all available currency names associated with the given locale // (enable fallback chain). // Read currenc names defined in resource bundle "Currencies" and @@ -975,6 +963,11 @@ collectCurrencyNames(const char* locale, CurrencyNameStruct** currencySymbols, int32_t* total_currency_symbol_count, UErrorCode& ec) { + if (U_FAILURE(ec)) { + *currencyNames = *currencySymbols = nullptr; + *total_currency_name_count = *total_currency_symbol_count = 0; + return; + } U_NAMESPACE_USE const icu::Hashtable *currencySymbolsEquiv = getCurrSymbolsEquiv(); // Look up the Currencies resource for the given locale. @@ -983,21 +976,32 @@ collectCurrencyNames(const char* locale, CharString loc = ulocimp_getName(locale, ec2); if (U_FAILURE(ec2)) { ec = U_ILLEGAL_ARGUMENT_ERROR; + *currencyNames = *currencySymbols = nullptr; + *total_currency_name_count = *total_currency_symbol_count = 0; + return; } // Get maximum currency name count first. getCurrencyNameCount(loc.data(), total_currency_name_count, total_currency_symbol_count); - *currencyNames = (CurrencyNameStruct*)uprv_malloc - (sizeof(CurrencyNameStruct) * (*total_currency_name_count)); - *currencySymbols = (CurrencyNameStruct*)uprv_malloc - (sizeof(CurrencyNameStruct) * (*total_currency_symbol_count)); - - if(currencyNames == nullptr || currencySymbols == nullptr) { - ec = U_MEMORY_ALLOCATION_ERROR; + *currencyNames = static_cast<CurrencyNameStruct*>( + uprv_malloc(sizeof(CurrencyNameStruct) * (*total_currency_name_count))); + if(*currencyNames == nullptr) { + *currencySymbols = nullptr; + *total_currency_name_count = *total_currency_symbol_count = 0; + ec = U_MEMORY_ALLOCATION_ERROR; + return; } + *currencySymbols = static_cast<CurrencyNameStruct*>( + uprv_malloc(sizeof(CurrencyNameStruct) * (*total_currency_symbol_count))); - if (U_FAILURE(ec)) return; + if(*currencySymbols == nullptr) { + uprv_free(*currencyNames); + *currencyNames = nullptr; + *total_currency_name_count = *total_currency_symbol_count = 0; + ec = U_MEMORY_ALLOCATION_ERROR; + return; + } const char16_t* s = nullptr; // currency name char* iso = nullptr; // currency ISO code @@ -1009,113 +1013,91 @@ collectCurrencyNames(const char* locale, UErrorCode ec4 = U_ZERO_ERROR; // Using hash to remove duplicates caused by locale fallback - UHashtable* currencyIsoCodes = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &ec3); - UHashtable* currencyPluralIsoCodes = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &ec4); + LocalUHashtablePointer currencyIsoCodes(uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &ec3)); + LocalUHashtablePointer currencyPluralIsoCodes(uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &ec4)); for (int32_t localeLevel = 0; ; ++localeLevel) { ec2 = U_ZERO_ERROR; // TODO: ures_openDirect - UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc.data(), &ec2); - UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, nullptr, &ec2); - int32_t n = ures_getSize(curr); + LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_CURR, loc.data(), &ec2)); + LocalUResourceBundlePointer curr(ures_getByKey(rb.getAlias(), CURRENCIES, nullptr, &ec2)); + int32_t n = ures_getSize(curr.getAlias()); for (int32_t i=0; i<n; ++i) { - UResourceBundle* names = ures_getByIndex(curr, i, nullptr, &ec2); + LocalUResourceBundlePointer names(ures_getByIndex(curr.getAlias(), i, nullptr, &ec2)); int32_t len; - s = ures_getStringByIndex(names, UCURR_SYMBOL_NAME, &len, &ec2); + s = ures_getStringByIndex(names.getAlias(), UCURR_SYMBOL_NAME, &len, &ec2); // TODO: uhash_put wont change key/value? - iso = (char*)ures_getKey(names); - if (localeLevel == 0) { - uhash_put(currencyIsoCodes, iso, iso, &ec3); - } else { - if (uhash_get(currencyIsoCodes, iso) != nullptr) { - ures_close(names); - continue; - } else { - uhash_put(currencyIsoCodes, iso, iso, &ec3); - } + iso = const_cast<char*>(ures_getKey(names.getAlias())); + if (localeLevel != 0 && uhash_get(currencyIsoCodes.getAlias(), iso) != nullptr) { + continue; } + uhash_put(currencyIsoCodes.getAlias(), iso, iso, &ec3); // Add currency symbol. - (*currencySymbols)[*total_currency_symbol_count].IsoCode = iso; - (*currencySymbols)[*total_currency_symbol_count].currencyName = (char16_t*)s; - (*currencySymbols)[*total_currency_symbol_count].flag = 0; - (*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = len; + (*currencySymbols)[(*total_currency_symbol_count)++] = {iso, const_cast<char16_t*>(s), len, 0}; + // Add equivalent symbols if (currencySymbolsEquiv != nullptr) { UnicodeString str(true, s, len); icu::EquivIterator iter(*currencySymbolsEquiv, str); const UnicodeString *symbol; while ((symbol = iter.next()) != nullptr) { - (*currencySymbols)[*total_currency_symbol_count].IsoCode = iso; - (*currencySymbols)[*total_currency_symbol_count].currencyName = - const_cast<char16_t*>(symbol->getBuffer()); - (*currencySymbols)[*total_currency_symbol_count].flag = 0; - (*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = symbol->length(); + (*currencySymbols)[(*total_currency_symbol_count)++] + = {iso, const_cast<char16_t*>(symbol->getBuffer()), symbol->length(), 0}; } } // Add currency long name. - s = ures_getStringByIndex(names, UCURR_LONG_NAME, &len, &ec2); - (*currencyNames)[*total_currency_name_count].IsoCode = iso; + s = ures_getStringByIndex(names.getAlias(), UCURR_LONG_NAME, &len, &ec2); char16_t* upperName = toUpperCase(s, len, locale); - (*currencyNames)[*total_currency_name_count].currencyName = upperName; - (*currencyNames)[*total_currency_name_count].flag = NEED_TO_BE_DELETED; - (*currencyNames)[(*total_currency_name_count)++].currencyNameLen = len; + if (upperName == nullptr) { + ec = U_MEMORY_ALLOCATION_ERROR; + goto error; + } + (*currencyNames)[(*total_currency_name_count)++] = {iso, upperName, len, NEED_TO_BE_DELETED}; // put (iso, 3, and iso) in to array // Add currency ISO code. - (*currencySymbols)[*total_currency_symbol_count].IsoCode = iso; - (*currencySymbols)[*total_currency_symbol_count].currencyName = (char16_t*)uprv_malloc(sizeof(char16_t)*3); + char16_t* isoCode = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * 3)); + if (isoCode == nullptr) { + ec = U_MEMORY_ALLOCATION_ERROR; + goto error; + } // Must convert iso[] into Unicode - u_charsToUChars(iso, (*currencySymbols)[*total_currency_symbol_count].currencyName, 3); - (*currencySymbols)[*total_currency_symbol_count].flag = NEED_TO_BE_DELETED; - (*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = 3; - - ures_close(names); + u_charsToUChars(iso, isoCode, 3); + (*currencySymbols)[(*total_currency_symbol_count)++] = {iso, isoCode, 3, NEED_TO_BE_DELETED}; } // currency plurals UErrorCode ec5 = U_ZERO_ERROR; - UResourceBundle* curr_p = ures_getByKey(rb, CURRENCYPLURALS, nullptr, &ec5); - n = ures_getSize(curr_p); + LocalUResourceBundlePointer curr_p(ures_getByKey(rb.getAlias(), CURRENCYPLURALS, nullptr, &ec5)); + n = ures_getSize(curr_p.getAlias()); for (int32_t i=0; i<n; ++i) { - UResourceBundle* names = ures_getByIndex(curr_p, i, nullptr, &ec5); - iso = (char*)ures_getKey(names); + LocalUResourceBundlePointer names(ures_getByIndex(curr_p.getAlias(), i, nullptr, &ec5)); + iso = const_cast<char*>(ures_getKey(names.getAlias())); // Using hash to remove duplicated ISO codes in fallback chain. - if (localeLevel == 0) { - uhash_put(currencyPluralIsoCodes, iso, iso, &ec4); - } else { - if (uhash_get(currencyPluralIsoCodes, iso) != nullptr) { - ures_close(names); - continue; - } else { - uhash_put(currencyPluralIsoCodes, iso, iso, &ec4); - } + if (localeLevel != 0 && uhash_get(currencyPluralIsoCodes.getAlias(), iso) != nullptr) { + continue; } - int32_t num = ures_getSize(names); + uhash_put(currencyPluralIsoCodes.getAlias(), iso, iso, &ec4); + int32_t num = ures_getSize(names.getAlias()); int32_t len; for (int32_t j = 0; j < num; ++j) { // TODO: remove duplicates between singular name and // currency long name? - s = ures_getStringByIndex(names, j, &len, &ec5); - (*currencyNames)[*total_currency_name_count].IsoCode = iso; + s = ures_getStringByIndex(names.getAlias(), j, &len, &ec5); char16_t* upperName = toUpperCase(s, len, locale); - (*currencyNames)[*total_currency_name_count].currencyName = upperName; - (*currencyNames)[*total_currency_name_count].flag = NEED_TO_BE_DELETED; - (*currencyNames)[(*total_currency_name_count)++].currencyNameLen = len; + if (upperName == nullptr) { + ec = U_MEMORY_ALLOCATION_ERROR; + goto error; + } + (*currencyNames)[(*total_currency_name_count)++] = {iso, upperName, len, NEED_TO_BE_DELETED}; } - ures_close(names); } - ures_close(curr_p); - ures_close(curr); - ures_close(rb); if (!fallback(loc)) { break; } } - uhash_close(currencyIsoCodes); - uhash_close(currencyPluralIsoCodes); - // quick sort the struct qsort(*currencyNames, *total_currency_name_count, sizeof(CurrencyNameStruct), currencyNameComparator); @@ -1147,11 +1129,17 @@ collectCurrencyNames(const char* locale, // fail on hashtable errors if (U_FAILURE(ec3)) { ec = ec3; - return; - } - if (U_FAILURE(ec4)) { + } else if (U_FAILURE(ec4)) { ec = ec4; - return; + } + + error: + // clean up if we got error + if (U_FAILURE(ec)) { + deleteCurrencyNames(*currencyNames, *total_currency_name_count); + deleteCurrencyNames(*currencySymbols, *total_currency_symbol_count); + *currencyNames = *currencySymbols = nullptr; + *total_currency_name_count = *total_currency_symbol_count = 0; } } @@ -1485,7 +1473,13 @@ getCacheEntry(const char* locale, UErrorCode& ec) { deleteCacheEntry(cacheEntry); } } - cacheEntry = (CurrencyNameCacheEntry*)uprv_malloc(sizeof(CurrencyNameCacheEntry)); + cacheEntry = static_cast<CurrencyNameCacheEntry*>(uprv_malloc(sizeof(CurrencyNameCacheEntry))); + if (cacheEntry == nullptr) { + deleteCurrencyNames(currencyNames, total_currency_name_count); + deleteCurrencyNames(currencySymbols, total_currency_symbol_count); + ec = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } currCache[currentCacheEntryIndex] = cacheEntry; uprv_strcpy(cacheEntry->locale, locale); cacheEntry->currencyNames = currencyNames; @@ -2030,6 +2024,7 @@ static const struct CurrencyList { {"ZRN", UCURR_COMMON|UCURR_DEPRECATED}, {"ZRZ", UCURR_COMMON|UCURR_DEPRECATED}, {"ZWD", UCURR_COMMON|UCURR_DEPRECATED}, + {"ZWG", UCURR_COMMON|UCURR_NON_DEPRECATED}, {"ZWL", UCURR_COMMON|UCURR_DEPRECATED}, {"ZWR", UCURR_COMMON|UCURR_DEPRECATED}, { nullptr, 0 } // Leave here to denote the end of the list. @@ -2095,18 +2090,18 @@ ucurr_createCurrencyList(UHashtable *isoCodes, UErrorCode* status){ // Look up the CurrencyMap element in the root bundle. UResourceBundle *rb = ures_openDirect(U_ICUDATA_CURR, CURRENCY_DATA, &localStatus); - UResourceBundle *currencyMapArray = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus); + LocalUResourceBundlePointer currencyMapArray(ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus)); if (U_SUCCESS(localStatus)) { - // process each entry in currency map - for (int32_t i=0; i<ures_getSize(currencyMapArray); i++) { + // process each entry in currency map + for (int32_t i=0; i<ures_getSize(currencyMapArray.getAlias()); i++) { // get the currency resource - UResourceBundle *currencyArray = ures_getByIndex(currencyMapArray, i, nullptr, &localStatus); - // process each currency + LocalUResourceBundlePointer currencyArray(ures_getByIndex(currencyMapArray.getAlias(), i, nullptr, &localStatus)); + // process each currency if (U_SUCCESS(localStatus)) { - for (int32_t j=0; j<ures_getSize(currencyArray); j++) { + for (int32_t j=0; j<ures_getSize(currencyArray.getAlias()); j++) { // get the currency resource - UResourceBundle *currencyRes = ures_getByIndex(currencyArray, j, nullptr, &localStatus); + LocalUResourceBundlePointer currencyRes(ures_getByIndex(currencyArray.getAlias(), j, nullptr, &localStatus)); IsoCodeEntry *entry = (IsoCodeEntry*)uprv_malloc(sizeof(IsoCodeEntry)); if (entry == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -2115,41 +2110,36 @@ ucurr_createCurrencyList(UHashtable *isoCodes, UErrorCode* status){ // get the ISO code int32_t isoLength = 0; - UResourceBundle *idRes = ures_getByKey(currencyRes, "id", nullptr, &localStatus); - if (idRes == nullptr) { + LocalUResourceBundlePointer idRes(ures_getByKey(currencyRes.getAlias(), "id", nullptr, &localStatus)); + if (idRes.isNull()) { continue; } - const char16_t *isoCode = ures_getString(idRes, &isoLength, &localStatus); + const char16_t *isoCode = ures_getString(idRes.getAlias(), &isoLength, &localStatus); // get from date UDate fromDate = U_DATE_MIN; - UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", nullptr, &localStatus); + LocalUResourceBundlePointer fromRes(ures_getByKey(currencyRes.getAlias(), "from", nullptr, &localStatus)); if (U_SUCCESS(localStatus)) { int32_t fromLength = 0; - const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus); + const int32_t *fromArray = ures_getIntVector(fromRes.getAlias(), &fromLength, &localStatus); int64_t currDate64 = ((uint64_t)fromArray[0]) << 32; currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF)); fromDate = (UDate)currDate64; } - ures_close(fromRes); // get to date UDate toDate = U_DATE_MAX; localStatus = U_ZERO_ERROR; - UResourceBundle *toRes = ures_getByKey(currencyRes, "to", nullptr, &localStatus); + LocalUResourceBundlePointer toRes(ures_getByKey(currencyRes.getAlias(), "to", nullptr, &localStatus)); if (U_SUCCESS(localStatus)) { int32_t toLength = 0; - const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus); + const int32_t *toArray = ures_getIntVector(toRes.getAlias(), &toLength, &localStatus); int64_t currDate64 = (uint64_t)toArray[0] << 32; currDate64 |= ((int64_t)toArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF)); toDate = (UDate)currDate64; } - ures_close(toRes); - - ures_close(idRes); - ures_close(currencyRes); entry->isoCode = isoCode; entry->from = fromDate; @@ -2161,13 +2151,10 @@ ucurr_createCurrencyList(UHashtable *isoCodes, UErrorCode* status){ } else { *status = localStatus; } - ures_close(currencyArray); } } else { *status = localStatus; } - - ures_close(currencyMapArray); } static const UEnumeration gEnumCurrencyList = { @@ -2186,19 +2173,18 @@ static void U_CALLCONV initIsoCodes(UErrorCode &status) { U_ASSERT(gIsoCodes == nullptr); ucln_common_registerCleanup(UCLN_COMMON_CURRENCY, currency_cleanup); - UHashtable *isoCodes = uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status); + LocalUHashtablePointer isoCodes(uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status)); if (U_FAILURE(status)) { return; } - uhash_setValueDeleter(isoCodes, deleteIsoCodeEntry); + uhash_setValueDeleter(isoCodes.getAlias(), deleteIsoCodeEntry); - ucurr_createCurrencyList(isoCodes, &status); + ucurr_createCurrencyList(isoCodes.getAlias(), &status); if (U_FAILURE(status)) { - uhash_close(isoCodes); return; } - gIsoCodes = isoCodes; // Note: gIsoCodes is const. Once set up here it is never altered, - // and read only access is safe without synchronization. + gIsoCodes = isoCodes.orphan(); // Note: gIsoCodes is const. Once set up here it is never altered, + // and read only access is safe without synchronization. } static void populateCurrSymbolsEquiv(icu::Hashtable *hash, UErrorCode &status) { @@ -2320,30 +2306,30 @@ ucurr_countCurrencies(const char* locale, UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus); // Using the id derived from the local, get the currency data - UResourceBundle *countryArray = ures_getByKey(rb, id.data(), cm, &localStatus); + LocalUResourceBundlePointer countryArray(ures_getByKey(rb, id.data(), cm, &localStatus)); // process each currency to see which one is valid for the given date if (U_SUCCESS(localStatus)) { - for (int32_t i=0; i<ures_getSize(countryArray); i++) + for (int32_t i=0; i<ures_getSize(countryArray.getAlias()); i++) { // get the currency resource - UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, nullptr, &localStatus); + LocalUResourceBundlePointer currencyRes(ures_getByIndex(countryArray.getAlias(), i, nullptr, &localStatus)); // get the from date int32_t fromLength = 0; - UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", nullptr, &localStatus); - const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus); + LocalUResourceBundlePointer fromRes(ures_getByKey(currencyRes.getAlias(), "from", nullptr, &localStatus)); + const int32_t *fromArray = ures_getIntVector(fromRes.getAlias(), &fromLength, &localStatus); int64_t currDate64 = (int64_t)((uint64_t)(fromArray[0]) << 32); currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF)); UDate fromDate = (UDate)currDate64; - if (ures_getSize(currencyRes)> 2) + if (ures_getSize(currencyRes.getAlias())> 2) { int32_t toLength = 0; - UResourceBundle *toRes = ures_getByKey(currencyRes, "to", nullptr, &localStatus); - const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus); + LocalUResourceBundlePointer toRes(ures_getByKey(currencyRes.getAlias(), "to", nullptr, &localStatus)); + const int32_t *toArray = ures_getIntVector(toRes.getAlias(), &toLength, &localStatus); currDate64 = (int64_t)toArray[0] << 32; currDate64 |= ((int64_t)toArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF)); @@ -2353,8 +2339,6 @@ ucurr_countCurrencies(const char* locale, { currCount++; } - - ures_close(toRes); } else { @@ -2363,16 +2347,9 @@ ucurr_countCurrencies(const char* locale, currCount++; } } - - // close open resources - ures_close(currencyRes); - ures_close(fromRes); - } // end For loop } // end if (U_SUCCESS(localStatus)) - ures_close(countryArray); - // Check for errors if (*ec == U_ZERO_ERROR || localStatus != U_ZERO_ERROR) { @@ -2386,7 +2363,6 @@ ucurr_countCurrencies(const char* locale, // no errors return currCount; } - } // If we got here, either error code is invalid or @@ -2433,39 +2409,38 @@ ucurr_forLocaleAndDate(const char* locale, UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus); // Using the id derived from the local, get the currency data - UResourceBundle *countryArray = ures_getByKey(rb, id.data(), cm, &localStatus); + LocalUResourceBundlePointer countryArray(ures_getByKey(rb, id.data(), cm, &localStatus)); // process each currency to see which one is valid for the given date bool matchFound = false; if (U_SUCCESS(localStatus)) { - if ((index <= 0) || (index> ures_getSize(countryArray))) + if ((index <= 0) || (index> ures_getSize(countryArray.getAlias()))) { // requested index is out of bounds - ures_close(countryArray); return 0; } - for (int32_t i=0; i<ures_getSize(countryArray); i++) + for (int32_t i=0; i<ures_getSize(countryArray.getAlias()); i++) { // get the currency resource - UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, nullptr, &localStatus); - s = ures_getStringByKey(currencyRes, "id", &resLen, &localStatus); + LocalUResourceBundlePointer currencyRes(ures_getByIndex(countryArray.getAlias(), i, nullptr, &localStatus)); + s = ures_getStringByKey(currencyRes.getAlias(), "id", &resLen, &localStatus); // get the from date int32_t fromLength = 0; - UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", nullptr, &localStatus); - const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus); + LocalUResourceBundlePointer fromRes(ures_getByKey(currencyRes.getAlias(), "from", nullptr, &localStatus)); + const int32_t *fromArray = ures_getIntVector(fromRes.getAlias(), &fromLength, &localStatus); int64_t currDate64 = (int64_t)((uint64_t)fromArray[0] << 32); currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF)); UDate fromDate = (UDate)currDate64; - if (ures_getSize(currencyRes)> 2) + if (ures_getSize(currencyRes.getAlias()) > 2) { int32_t toLength = 0; - UResourceBundle *toRes = ures_getByKey(currencyRes, "to", nullptr, &localStatus); - const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus); + LocalUResourceBundlePointer toRes(ures_getByKey(currencyRes.getAlias(), "to", nullptr, &localStatus)); + const int32_t *toArray = ures_getIntVector(toRes.getAlias(), &toLength, &localStatus); currDate64 = (int64_t)toArray[0] << 32; currDate64 |= ((int64_t)toArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF)); @@ -2479,8 +2454,6 @@ ucurr_forLocaleAndDate(const char* locale, matchFound = true; } } - - ures_close(toRes); } else { @@ -2493,11 +2466,6 @@ ucurr_forLocaleAndDate(const char* locale, } } } - - // close open resources - ures_close(currencyRes); - ures_close(fromRes); - // check for loop exit if (matchFound) { @@ -2507,8 +2475,6 @@ ucurr_forLocaleAndDate(const char* locale, } // end For loop } - ures_close(countryArray); - // Check for errors if (*ec == U_ZERO_ERROR || localStatus != U_ZERO_ERROR) { @@ -2578,20 +2544,16 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, memcpy(en, &defaultKeywordValues, sizeof(UEnumeration)); en->context = values; - UResourceBundle *bundle = ures_openDirect(U_ICUDATA_CURR, "supplementalData", status); - ures_getByKey(bundle, "CurrencyMap", bundle, status); - UResourceBundle bundlekey, regbndl, curbndl, to; - ures_initStackObject(&bundlekey); - ures_initStackObject(®bndl); - ures_initStackObject(&curbndl); - ures_initStackObject(&to); + UResourceBundle* rb = ures_openDirect(U_ICUDATA_CURR, "supplementalData", status); + LocalUResourceBundlePointer bundle(ures_getByKey(rb, "CurrencyMap", rb, status)); + StackUResourceBundle bundlekey, regbndl, curbndl, to; - while (U_SUCCESS(*status) && ures_hasNext(bundle)) { - ures_getNextResource(bundle, &bundlekey, status); + while (U_SUCCESS(*status) && ures_hasNext(bundle.getAlias())) { + ures_getNextResource(bundle.getAlias(), bundlekey.getAlias(), status); if (U_FAILURE(*status)) { break; } - const char *region = ures_getKey(&bundlekey); + const char *region = ures_getKey(bundlekey.getAlias()); UBool isPrefRegion = prefRegion == region; if (!isPrefRegion && commonlyUsed) { // With commonlyUsed=true, we do not put @@ -2599,29 +2561,29 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, // result list. continue; } - ures_getByKey(bundle, region, ®bndl, status); + ures_getByKey(bundle.getAlias(), region, regbndl.getAlias(), status); if (U_FAILURE(*status)) { break; } - while (U_SUCCESS(*status) && ures_hasNext(®bndl)) { - ures_getNextResource(®bndl, &curbndl, status); - if (ures_getType(&curbndl) != URES_TABLE) { + while (U_SUCCESS(*status) && ures_hasNext(regbndl.getAlias())) { + ures_getNextResource(regbndl.getAlias(), curbndl.getAlias(), status); + if (ures_getType(curbndl.getAlias()) != URES_TABLE) { // Currently, an empty ARRAY is mixed in. continue; } char *curID = (char *)uprv_malloc(sizeof(char) * ULOC_KEYWORDS_CAPACITY); - int32_t curIDLength = ULOC_KEYWORDS_CAPACITY; if (curID == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; break; } + int32_t curIDLength = ULOC_KEYWORDS_CAPACITY; #if U_CHARSET_FAMILY==U_ASCII_FAMILY - ures_getUTF8StringByKey(&curbndl, "id", curID, &curIDLength, true, status); + ures_getUTF8StringByKey(curbndl.getAlias(), "id", curID, &curIDLength, true, status); /* optimize - use the utf-8 string */ #else { - const char16_t* defString = ures_getStringByKey(&curbndl, "id", &curIDLength, status); + const char16_t* defString = ures_getStringByKey(curbndl.getAlias(), "id", &curIDLength, status); if(U_SUCCESS(*status)) { if(curIDLength+1 > ULOC_KEYWORDS_CAPACITY) { *status = U_BUFFER_OVERFLOW_ERROR; @@ -2636,7 +2598,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, break; } UBool hasTo = false; - ures_getByKey(&curbndl, "to", &to, status); + ures_getByKey(curbndl.getAlias(), "to", to.getAlias(), status); if (U_FAILURE(*status)) { // Do nothing here... *status = U_ZERO_ERROR; @@ -2669,6 +2631,10 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, while ((value = (char *)ulist_getNext(otherValues)) != nullptr) { if (!ulist_containsString(values, value, (int32_t)uprv_strlen(value))) { char *tmpValue = (char *)uprv_malloc(sizeof(char) * ULOC_KEYWORDS_CAPACITY); + if (tmpValue == nullptr) { + *status = U_MEMORY_ALLOCATION_ERROR; + break; + } uprv_memcpy(tmpValue, value, uprv_strlen(value) + 1); ulist_addItemEndList(values, tmpValue, true, status); if (U_FAILURE(*status)) { @@ -2677,7 +2643,6 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, } } } - ulist_resetList((UList *)(en->context)); } else { ulist_deleteList(values); @@ -2685,14 +2650,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, values = nullptr; en = nullptr; } - ures_close(&to); - ures_close(&curbndl); - ures_close(®bndl); - ures_close(&bundlekey); - ures_close(bundle); - ulist_deleteList(otherValues); - return en; } @@ -2703,19 +2661,18 @@ ucurr_getNumericCode(const char16_t* currency) { if (currency && u_strlen(currency) == ISO_CURRENCY_CODE_LENGTH) { UErrorCode status = U_ZERO_ERROR; - UResourceBundle *bundle = ures_openDirect(nullptr, "currencyNumericCodes", &status); - ures_getByKey(bundle, "codeMap", bundle, &status); + UResourceBundle* bundle = ures_openDirect(nullptr, "currencyNumericCodes", &status); + LocalUResourceBundlePointer codeMap(ures_getByKey(bundle, "codeMap", bundle, &status)); if (U_SUCCESS(status)) { char alphaCode[ISO_CURRENCY_CODE_LENGTH+1]; myUCharsToChars(alphaCode, currency); T_CString_toUpperCase(alphaCode); - ures_getByKey(bundle, alphaCode, bundle, &status); - int tmpCode = ures_getInt(bundle, &status); + ures_getByKey(codeMap.getAlias(), alphaCode, codeMap.getAlias(), &status); + int tmpCode = ures_getInt(codeMap.getAlias(), &status); if (U_SUCCESS(status)) { code = tmpCode; } } - ures_close(bundle); } return code; } diff --git a/deps/icu-small/source/common/udata.cpp b/deps/icu-small/source/common/udata.cpp index 4c2ba57303a088..68b62272901b43 100644 --- a/deps/icu-small/source/common/udata.cpp +++ b/deps/icu-small/source/common/udata.cpp @@ -274,7 +274,7 @@ typedef struct DataCacheElement { * here for each entry. */ static void U_CALLCONV DataCacheElement_deleter(void *pDCEl) { - DataCacheElement *p = (DataCacheElement *)pDCEl; + DataCacheElement* p = static_cast<DataCacheElement*>(pDCEl); udata_close(p->item); /* unmaps storage */ uprv_free(p->name); /* delete the hash key string. */ uprv_free(pDCEl); /* delete 'this' */ @@ -316,7 +316,7 @@ static UDataMemory *udata_findCachedData(const char *path, UErrorCode &err) baseName = findBasename(path); /* Cache remembers only the base name, not the full path. */ umtx_lock(nullptr); - el = (DataCacheElement *)uhash_get(htable, baseName); + el = static_cast<DataCacheElement*>(uhash_get(htable, baseName)); umtx_unlock(nullptr); if (el != nullptr) { retVal = el->item; @@ -344,7 +344,7 @@ static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UEr /* Create a new DataCacheElement - the thingy we store in the hash table - * and copy the supplied path and UDataMemoryItems into it. */ - newElement = (DataCacheElement *)uprv_malloc(sizeof(DataCacheElement)); + newElement = static_cast<DataCacheElement*>(uprv_malloc(sizeof(DataCacheElement))); if (newElement == nullptr) { *pErr = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -357,8 +357,8 @@ static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UEr UDatamemory_assign(newElement->item, item); baseName = findBasename(path); - nameLen = (int32_t)uprv_strlen(baseName); - newElement->name = (char *)uprv_malloc(nameLen+1); + nameLen = static_cast<int32_t>(uprv_strlen(baseName)); + newElement->name = static_cast<char*>(uprv_malloc(nameLen + 1)); if (newElement->name == nullptr) { *pErr = U_MEMORY_ALLOCATION_ERROR; uprv_free(newElement->item); @@ -370,7 +370,7 @@ static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UEr /* Stick the new DataCacheElement into the hash table. */ umtx_lock(nullptr); - oldValue = (DataCacheElement *)uhash_get(htable, path); + oldValue = static_cast<DataCacheElement*>(uhash_get(htable, path)); if (oldValue != nullptr) { subErr = U_USING_DEFAULT_WARNING; } @@ -469,13 +469,13 @@ UDataPathIterator::UDataPathIterator(const char *inPath, const char *pkg, /** Item **/ basename = findBasename(item); - basenameLen = (int32_t)uprv_strlen(basename); + basenameLen = static_cast<int32_t>(uprv_strlen(basename)); /** Item path **/ if(basename == item) { nextPath = path; } else { - itemPath.append(item, (int32_t)(basename-item), *pErrorCode); + itemPath.append(item, static_cast<int32_t>(basename - item), *pErrorCode); nextPath = itemPath.data(); } #ifdef UDATA_DEBUG @@ -531,16 +531,16 @@ const char *UDataPathIterator::next(UErrorCode *pErrorCode) if(nextPath == itemPath.data()) { /* we were processing item's path. */ nextPath = path; /* start with regular path next tm. */ - pathLen = (int32_t)uprv_strlen(currentPath); + pathLen = static_cast<int32_t>(uprv_strlen(currentPath)); } else { /* fix up next for next time */ nextPath = uprv_strchr(currentPath, U_PATH_SEP_CHAR); if(nextPath == nullptr) { /* segment: entire path */ - pathLen = (int32_t)uprv_strlen(currentPath); + pathLen = static_cast<int32_t>(uprv_strlen(currentPath)); } else { /* segment: until next segment */ - pathLen = (int32_t)(nextPath - currentPath); + pathLen = static_cast<int32_t>(nextPath - currentPath); /* skip divider */ nextPath ++; } @@ -777,17 +777,6 @@ openCommonData(const char *path, /* Path from OpenChoice? */ return nullptr; } -#if defined(OS390_STUBDATA) && defined(OS390BATCH) - if (!UDataMemory_isLoaded(&tData)) { - char ourPathBuffer[1024]; - /* One more chance, for extendCommonData() */ - uprv_strncpy(ourPathBuffer, path, 1019); - ourPathBuffer[1019]=0; - uprv_strcat(ourPathBuffer, ".dat"); - uprv_mapFile(&tData, ourPathBuffer, pErrorCode); - } -#endif - if (U_FAILURE(*pErrorCode)) { return nullptr; } @@ -1231,7 +1220,7 @@ doOpenChoice(const char *path, const char *type, const char *name, if(isICUData) { pkgName.append(U_ICUDATA_NAME, *pErrorCode); } else { - pkgName.append(path, (int32_t)(treeChar-path), *pErrorCode); + pkgName.append(path, static_cast<int32_t>(treeChar - path), *pErrorCode); if (first == nullptr) { /* This user data has no path, but there is a tree name. diff --git a/deps/icu-small/source/common/udataswp.cpp b/deps/icu-small/source/common/udataswp.cpp index 0f194f47e89248..09adf9510ce114 100644 --- a/deps/icu-small/source/common/udataswp.cpp +++ b/deps/icu-small/source/common/udataswp.cpp @@ -47,12 +47,12 @@ uprv_swapArray16(const UDataSwapper *ds, } /* setup and swapping */ - p=(const uint16_t *)inData; - q=(uint16_t *)outData; + p = static_cast<const uint16_t*>(inData); + q = static_cast<uint16_t*>(outData); count=length/2; while(count>0) { x=*p++; - *q++=(uint16_t)((x<<8)|(x>>8)); + *q++ = static_cast<uint16_t>((x << 8) | (x >> 8)); --count; } @@ -95,12 +95,12 @@ uprv_swapArray32(const UDataSwapper *ds, } /* setup and swapping */ - p=(const uint32_t *)inData; - q=(uint32_t *)outData; + p = static_cast<const uint32_t*>(inData); + q = static_cast<uint32_t*>(outData); count=length/4; while(count>0) { x=*p++; - *q++=(uint32_t)((x<<24)|((x<<8)&0xff0000)|((x>>8)&0xff00)|(x>>24)); + *q++ = (x << 24) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) | (x >> 24); --count; } @@ -142,8 +142,8 @@ uprv_swapArray64(const UDataSwapper *ds, } /* setup and swapping */ - p=(const uint64_t *)inData; - q=(uint64_t *)outData; + p = static_cast<const uint64_t*>(inData); + q = static_cast<uint64_t*>(outData); count=length/8; while(count>0) { uint64_t x=*p++; @@ -176,7 +176,7 @@ uprv_copyArray64(const UDataSwapper *ds, static uint16_t U_CALLCONV uprv_readSwapUInt16(uint16_t x) { - return (uint16_t)((x<<8)|(x>>8)); + return static_cast<uint16_t>((x << 8) | (x >> 8)); } static uint16_t U_CALLCONV @@ -186,7 +186,7 @@ uprv_readDirectUInt16(uint16_t x) { static uint32_t U_CALLCONV uprv_readSwapUInt32(uint32_t x) { - return (uint32_t)((x<<24)|((x<<8)&0xff0000)|((x>>8)&0xff00)|(x>>24)); + return (x << 24) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) | (x >> 24); } static uint32_t U_CALLCONV @@ -196,7 +196,7 @@ uprv_readDirectUInt32(uint32_t x) { static void U_CALLCONV uprv_writeSwapUInt16(uint16_t *p, uint16_t x) { - *p=(uint16_t)((x<<8)|(x>>8)); + *p = static_cast<uint16_t>((x << 8) | (x >> 8)); } static void U_CALLCONV @@ -206,7 +206,7 @@ uprv_writeDirectUInt16(uint16_t *p, uint16_t x) { static void U_CALLCONV uprv_writeSwapUInt32(uint32_t *p, uint32_t x) { - *p=(uint32_t)((x<<24)|((x<<8)&0xff0000)|((x>>8)&0xff00)|(x>>24)); + *p = (x << 24) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) | (x >> 24); } static void U_CALLCONV diff --git a/deps/icu-small/source/common/uenum.cpp b/deps/icu-small/source/common/uenum.cpp index 7aab58c44c7fdf..b4a5071ae7bc9f 100644 --- a/deps/icu-small/source/common/uenum.cpp +++ b/deps/icu-small/source/common/uenum.cpp @@ -34,14 +34,14 @@ static const int32_t PAD = 8; static void* _getBuffer(UEnumeration* en, int32_t capacity) { if (en->baseContext != nullptr) { - if (((_UEnumBuffer*) en->baseContext)->len < capacity) { + if (static_cast<_UEnumBuffer*>(en->baseContext)->len < capacity) { capacity += PAD; en->baseContext = uprv_realloc(en->baseContext, sizeof(int32_t) + capacity); if (en->baseContext == nullptr) { return nullptr; } - ((_UEnumBuffer*) en->baseContext)->len = capacity; + static_cast<_UEnumBuffer*>(en->baseContext)->len = capacity; } } else { capacity += PAD; @@ -49,10 +49,10 @@ static void* _getBuffer(UEnumeration* en, int32_t capacity) { if (en->baseContext == nullptr) { return nullptr; } - ((_UEnumBuffer*) en->baseContext)->len = capacity; + static_cast<_UEnumBuffer*>(en->baseContext)->len = capacity; } - return (void*) & ((_UEnumBuffer*) en->baseContext)->data; + return static_cast<void*>(&static_cast<_UEnumBuffer*>(en->baseContext)->data); } U_CAPI void U_EXPORT2 diff --git a/deps/icu-small/source/common/uhash.cpp b/deps/icu-small/source/common/uhash.cpp index 4d92dfa93fe1cd..02dc3d04789737 100644 --- a/deps/icu-small/source/common/uhash.cpp +++ b/deps/icu-small/source/common/uhash.cpp @@ -12,6 +12,8 @@ ****************************************************************************** */ +#include <string_view> + #include "uhash.h" #include "unicode/ustring.h" #include "cstring.h" @@ -224,8 +226,8 @@ _uhash_allocate(UHashtable *hash, hash->primeIndex = static_cast<int8_t>(primeIndex); hash->length = PRIMES[primeIndex]; - p = hash->elements = (UHashElement*) - uprv_malloc(sizeof(UHashElement) * hash->length); + p = hash->elements = static_cast<UHashElement*>( + uprv_malloc(sizeof(UHashElement) * hash->length)); if (hash->elements == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -244,8 +246,8 @@ _uhash_allocate(UHashtable *hash, } hash->count = 0; - hash->lowWaterMark = (int32_t)(hash->length * hash->lowWaterRatio); - hash->highWaterMark = (int32_t)(hash->length * hash->highWaterRatio); + hash->lowWaterMark = static_cast<int32_t>(hash->length * hash->lowWaterRatio); + hash->highWaterMark = static_cast<int32_t>(hash->length * hash->highWaterRatio); } static UHashtable* @@ -287,7 +289,7 @@ _uhash_create(UHashFunction *keyHash, if (U_FAILURE(*status)) return nullptr; - result = (UHashtable*) uprv_malloc(sizeof(UHashtable)); + result = static_cast<UHashtable*>(uprv_malloc(sizeof(UHashtable))); if (result == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -944,6 +946,12 @@ uhash_hashIChars(const UHashTok key) { return s == nullptr ? 0 : ustr_hashICharsN(s, static_cast<int32_t>(uprv_strlen(s))); } +U_CAPI int32_t U_EXPORT2 +uhash_hashIStringView(const UHashTok key) { + const std::string_view* s = static_cast<std::string_view*>(key.pointer); + return s == nullptr ? 0 : ustr_hashICharsN(s->data(), static_cast<int32_t>(s->size())); +} + U_CAPI UBool U_EXPORT2 uhash_equals(const UHashtable* hash1, const UHashtable* hash2){ int32_t count1, count2, pos, i; @@ -1014,7 +1022,7 @@ uhash_compareUChars(const UHashTok key1, const UHashTok key2) { ++p1; ++p2; } - return (UBool)(*p1 == *p2); + return *p1 == *p2; } U_CAPI UBool U_EXPORT2 @@ -1031,7 +1039,7 @@ uhash_compareChars(const UHashTok key1, const UHashTok key2) { ++p1; ++p2; } - return (UBool)(*p1 == *p2); + return *p1 == *p2; } U_CAPI UBool U_EXPORT2 @@ -1048,7 +1056,30 @@ uhash_compareIChars(const UHashTok key1, const UHashTok key2) { ++p1; ++p2; } - return (UBool)(*p1 == *p2); + return *p1 == *p2; +} + +U_CAPI UBool U_EXPORT2 +uhash_compareIStringView(const UHashTok key1, const UHashTok key2) { + const std::string_view* p1 = static_cast<std::string_view*>(key1.pointer); + const std::string_view* p2 = static_cast<std::string_view*>(key2.pointer); + if (p1 == p2) { + return true; + } + if (p1 == nullptr || p2 == nullptr) { + return false; + } + const std::string_view& v1 = *p1; + const std::string_view& v2 = *p2; + if (v1.size() != v2.size()) { + return false; + } + for (size_t i = 0; i < v1.size(); ++i) { + if (uprv_tolower(v1[i]) != uprv_tolower(v2[i])) { + return false; + } + } + return true; } /******************************************************************** @@ -1062,5 +1093,5 @@ uhash_hashLong(const UHashTok key) { U_CAPI UBool U_EXPORT2 uhash_compareLong(const UHashTok key1, const UHashTok key2) { - return (UBool)(key1.integer == key2.integer); + return key1.integer == key2.integer; } diff --git a/deps/icu-small/source/common/uhash.h b/deps/icu-small/source/common/uhash.h index 2ce296f0ec7c36..d381670b87b8b2 100644 --- a/deps/icu-small/source/common/uhash.h +++ b/deps/icu-small/source/common/uhash.h @@ -694,6 +694,15 @@ uhash_hashChars(const UHashTok key); U_CAPI int32_t U_EXPORT2 uhash_hashIChars(const UHashTok key); +/** + * Generate a case-insensitive hash code for a std::string_view. + * Use together with uhash_compareIStringView. + * @param key A pointer to the std::string_view to hash. + * @return A hash code for the key. + */ +U_CAPI int32_t U_EXPORT2 +uhash_hashIStringView(const UHashTok key); + /** * Comparator for null-terminated UChar* strings. Use together with * uhash_hashUChars. @@ -724,6 +733,16 @@ uhash_compareChars(const UHashTok key1, const UHashTok key2); U_CAPI UBool U_EXPORT2 uhash_compareIChars(const UHashTok key1, const UHashTok key2); +/** + * Case-insensitive comparator for std::string_view. + * Use together with uhash_hashIStringView. + * @param key1 A pointer to the std::string_view for comparison + * @param key2 A pointer to the std::string_view for comparison + * @return true if key1 and key2 are equal, return false otherwise. + */ +U_CAPI UBool U_EXPORT2 +uhash_compareIStringView(const UHashTok key1, const UHashTok key2); + /******************************************************************** * UnicodeString Support Functions ********************************************************************/ diff --git a/deps/icu-small/source/common/uidna.cpp b/deps/icu-small/source/common/uidna.cpp index 949d128f93c533..48b3d0eb7060bd 100644 --- a/deps/icu-small/source/common/uidna.cpp +++ b/deps/icu-small/source/common/uidna.cpp @@ -107,7 +107,7 @@ compareCaseInsensitiveASCII(const char16_t* s1, int32_t s1Len, /* Case-insensitive comparison */ if(c1!=c2) { - rc=(int32_t)toASCIILower(c1)-(int32_t)toASCIILower(c2); + rc = static_cast<int32_t>(toASCIILower(c1)) - static_cast<int32_t>(toASCIILower(c2)); if(rc!=0) { lengthResult=rc; break; @@ -219,7 +219,7 @@ _internal_toASCII(const char16_t* src, int32_t srcLength, int32_t j=0; //get the options - UBool useSTD3ASCIIRules = (UBool)((options & UIDNA_USE_STD3_RULES) != 0); + UBool useSTD3ASCIIRules = static_cast<UBool>((options & UIDNA_USE_STD3_RULES) != 0); int32_t failPos = -1; @@ -228,7 +228,7 @@ _internal_toASCII(const char16_t* src, int32_t srcLength, } if(srcLength > b1Capacity){ - b1 = (char16_t*) uprv_malloc(srcLength * U_SIZEOF_UCHAR); + b1 = static_cast<char16_t*>(uprv_malloc(srcLength * U_SIZEOF_UCHAR)); if(b1==nullptr){ *status = U_MEMORY_ALLOCATION_ERROR; goto CLEANUP; @@ -256,7 +256,7 @@ _internal_toASCII(const char16_t* src, int32_t srcLength, if(b1 != b1Stack){ uprv_free(b1); } - b1 = (char16_t*) uprv_malloc(b1Len * U_SIZEOF_UCHAR); + b1 = static_cast<char16_t*>(uprv_malloc(b1Len * U_SIZEOF_UCHAR)); if(b1==nullptr){ *status = U_MEMORY_ALLOCATION_ERROR; goto CLEANUP; @@ -338,7 +338,7 @@ _internal_toASCII(const char16_t* src, int32_t srcLength, if(*status == U_BUFFER_OVERFLOW_ERROR){ // redo processing of string /* we do not have enough room so grow the buffer*/ - b2 = (char16_t*) uprv_malloc(b2Len * U_SIZEOF_UCHAR); + b2 = static_cast<char16_t*>(uprv_malloc(b2Len * U_SIZEOF_UCHAR)); if(b2 == nullptr){ *status = U_MEMORY_ALLOCATION_ERROR; goto CLEANUP; @@ -458,7 +458,7 @@ _internal_toUnicode(const char16_t* src, int32_t srcLength, if(*status == U_BUFFER_OVERFLOW_ERROR){ // redo processing of string /* we do not have enough room so grow the buffer*/ - b1 = (char16_t*) uprv_malloc(b1Len * U_SIZEOF_UCHAR); + b1 = static_cast<char16_t*>(uprv_malloc(b1Len * U_SIZEOF_UCHAR)); if(b1==nullptr){ *status = U_MEMORY_ALLOCATION_ERROR; goto CLEANUP; @@ -475,7 +475,7 @@ _internal_toUnicode(const char16_t* src, int32_t srcLength, }else{ //just point src to b1 - b1 = (char16_t*) src; + b1 = const_cast<char16_t*>(src); b1Len = srcLength; } @@ -498,7 +498,7 @@ _internal_toUnicode(const char16_t* src, int32_t srcLength, if(*status == U_BUFFER_OVERFLOW_ERROR){ // redo processing of string /* we do not have enough room so grow the buffer*/ - b2 = (char16_t*) uprv_malloc(b2Len * U_SIZEOF_UCHAR); + b2 = static_cast<char16_t*>(uprv_malloc(b2Len * U_SIZEOF_UCHAR)); if(b2==nullptr){ *status = U_MEMORY_ALLOCATION_ERROR; goto CLEANUP; @@ -516,7 +516,7 @@ _internal_toUnicode(const char16_t* src, int32_t srcLength, if(*status == U_BUFFER_OVERFLOW_ERROR){ // redo processing of string /* we do not have enough room so grow the buffer*/ - b3 = (char16_t*) uprv_malloc(b3Len * U_SIZEOF_UCHAR); + b3 = static_cast<char16_t*>(uprv_malloc(b3Len * U_SIZEOF_UCHAR)); if(b3==nullptr){ *status = U_MEMORY_ALLOCATION_ERROR; goto CLEANUP; @@ -585,6 +585,9 @@ _internal_toUnicode(const char16_t* src, int32_t srcLength, if(b2 != b2Stack){ uprv_free(b2); } + if(b3 != b3Stack){ + uprv_free(b3); + } uprv_free(caseFlags); // The RFC states that @@ -689,9 +692,9 @@ uidna_IDNToASCII( const char16_t *src, int32_t srcLength, } //initialize pointers - char16_t *delimiter = (char16_t*)src; - char16_t *labelStart = (char16_t*)src; - char16_t *currentDest = (char16_t*) dest; + char16_t* delimiter = const_cast<char16_t*>(src); + char16_t* labelStart = const_cast<char16_t*>(src); + char16_t* currentDest = dest; int32_t remainingLen = srcLength; int32_t remainingDestCapacity = destCapacity; int32_t labelLen = 0, labelReqLength = 0; @@ -782,9 +785,9 @@ uidna_IDNToUnicode( const char16_t* src, int32_t srcLength, } //initialize pointers - char16_t *delimiter = (char16_t*)src; - char16_t *labelStart = (char16_t*)src; - char16_t *currentDest = (char16_t*) dest; + char16_t* delimiter = const_cast<char16_t*>(src); + char16_t* labelStart = const_cast<char16_t*>(src); + char16_t* currentDest = dest; int32_t remainingLen = srcLength; int32_t remainingDestCapacity = destCapacity; int32_t labelLen = 0, labelReqLength = 0; diff --git a/deps/icu-small/source/common/uinvchar.cpp b/deps/icu-small/source/common/uinvchar.cpp index 096a8e28d11758..2ffef7b580378e 100644 --- a/deps/icu-small/source/common/uinvchar.cpp +++ b/deps/icu-small/source/common/uinvchar.cpp @@ -446,7 +446,7 @@ uprv_copyEbcdic(const UDataSwapper *ds, return length; } -U_CFUNC UBool +U_CAPI UBool uprv_isEbcdicAtSign(char c) { static const uint8_t ebcdicAtSigns[] = { 0x7C, 0x44, 0x66, 0x80, 0xAC, 0xAE, 0xAF, 0xB5, 0xEC, 0xEF, 0x00 }; diff --git a/deps/icu-small/source/common/uinvchar.h b/deps/icu-small/source/common/uinvchar.h index 9b7a9bd114172e..3e031ccc5a65c2 100644 --- a/deps/icu-small/source/common/uinvchar.h +++ b/deps/icu-small/source/common/uinvchar.h @@ -120,7 +120,7 @@ U_NAMESPACE_END * EBCDIC machine won't be compiled the same way on other EBCDIC based machines. * @internal */ -U_CFUNC UBool +U_CAPI UBool uprv_isEbcdicAtSign(char c); /** diff --git a/deps/icu-small/source/common/uloc.cpp b/deps/icu-small/source/common/uloc.cpp index 88fe7eaadce8b4..51887c97c3e1e3 100644 --- a/deps/icu-small/source/common/uloc.cpp +++ b/deps/icu-small/source/common/uloc.cpp @@ -30,7 +30,9 @@ l = lang, C = ctry, M = charmap, V = variant */ +#include <algorithm> #include <optional> +#include <string_view> #include "unicode/bytestream.h" #include "unicode/errorcode.h" @@ -551,17 +553,17 @@ namespace { * @param status return status (keyword too long) * @return the keyword name */ -CharString locale_canonKeywordName(const char* keywordName, UErrorCode& status) +CharString locale_canonKeywordName(std::string_view keywordName, UErrorCode& status) { if (U_FAILURE(status)) { return {}; } CharString result; - for (; *keywordName != 0; keywordName++) { - if (!UPRV_ISALPHANUM(*keywordName)) { + for (char c : keywordName) { + if (!UPRV_ISALPHANUM(c)) { status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ return {}; } - result.append(uprv_tolower(*keywordName), status); + result.append(uprv_tolower(c), status); } if (result.isEmpty()) { status = U_ILLEGAL_ARGUMENT_ERROR; /* empty keyword name */ @@ -580,8 +582,8 @@ typedef struct { int32_t U_CALLCONV compareKeywordStructs(const void * /*context*/, const void *left, const void *right) { - const char* leftString = ((const KeywordStruct *)left)->keyword; - const char* rightString = ((const KeywordStruct *)right)->keyword; + const char* leftString = static_cast<const KeywordStruct*>(left)->keyword; + const char* rightString = static_cast<const KeywordStruct*>(right)->keyword; return uprv_strcmp(leftString, rightString); } @@ -686,10 +688,10 @@ ulocimp_getKeywords(const char* localeID, while(*(pos - i - 1) == ' ') { i++; } - keywordList[numKeywords].valueLen = (int32_t)(pos - equalSign - i); + keywordList[numKeywords].valueLen = static_cast<int32_t>(pos - equalSign - i); pos++; } else { - i = (int32_t)uprv_strlen(equalSign); + i = static_cast<int32_t>(uprv_strlen(equalSign)); while(i && equalSign[i-1] == ' ') { i--; } @@ -733,6 +735,11 @@ uloc_getKeywordValue(const char* localeID, char* buffer, int32_t bufferCapacity, UErrorCode* status) { + if (U_FAILURE(*status)) { return 0; } + if (keywordName == nullptr || *keywordName == '\0') { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } return ByteSinkUtil::viaByteSinkToTerminatedChars( buffer, bufferCapacity, [&](ByteSink& sink, UErrorCode& status) { @@ -743,7 +750,7 @@ uloc_getKeywordValue(const char* localeID, U_EXPORT CharString ulocimp_getKeywordValue(const char* localeID, - const char* keywordName, + std::string_view keywordName, UErrorCode& status) { return ByteSinkUtil::viaByteSinkToCharString( @@ -755,13 +762,13 @@ ulocimp_getKeywordValue(const char* localeID, U_EXPORT void ulocimp_getKeywordValue(const char* localeID, - const char* keywordName, + std::string_view keywordName, icu::ByteSink& sink, UErrorCode& status) { if (U_FAILURE(status)) { return; } - if (localeID == nullptr || keywordName == nullptr || keywordName[0] == 0) { + if (localeID == nullptr || keywordName.empty()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -865,6 +872,11 @@ uloc_setKeywordValue(const char* keywordName, { if (U_FAILURE(*status)) { return 0; } + if (keywordName == nullptr || *keywordName == 0) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + if (bufferCapacity <= 1) { *status = U_ILLEGAL_ARGUMENT_ERROR; return 0; @@ -883,7 +895,11 @@ uloc_setKeywordValue(const char* keywordName, CheckedArrayByteSink sink(keywords == nullptr ? buffer + bufLen : keywords, bufferCapacity - baseLen - 1); int32_t reslen = ulocimp_setKeywordValue( - keywords, keywordName, keywordValue, sink, *status); + keywords == nullptr ? std::string_view() : keywords, + keywordName, + keywordValue == nullptr ? std::string_view() : keywordValue, + sink, + *status); if (U_FAILURE(*status)) { return *status == U_BUFFER_OVERFLOW_ERROR ? reslen + baseLen : 0; @@ -898,24 +914,29 @@ uloc_setKeywordValue(const char* keywordName, } U_EXPORT void -ulocimp_setKeywordValue(const char* keywordName, - const char* keywordValue, +ulocimp_setKeywordValue(std::string_view keywordName, + std::string_view keywordValue, CharString& localeID, UErrorCode& status) { if (U_FAILURE(status)) { return; } - // This is safe because CharString::truncate() doesn't actually erase any - // data, but simply sets the position for where new data will be written. - const char* keywords = locale_getKeywordsStart(localeID.data()); - if (keywords != nullptr) localeID.truncate(keywords - localeID.data()); + std::string_view keywords; + if (const char* start = locale_getKeywordsStart(localeID.data()); start != nullptr) { + // This is safe because CharString::truncate() doesn't actually erase any + // data, but simply sets the position for where new data will be written. + int32_t size = start - localeID.data(); + keywords = localeID.toStringPiece(); + keywords.remove_prefix(size); + localeID.truncate(size); + } CharStringByteSink sink(&localeID); ulocimp_setKeywordValue(keywords, keywordName, keywordValue, sink, status); } U_EXPORT int32_t -ulocimp_setKeywordValue(const char* keywords, - const char* keywordName, - const char* keywordValue, +ulocimp_setKeywordValue(std::string_view keywords, + std::string_view keywordName, + std::string_view keywordValue, ByteSink& sink, UErrorCode& status) { @@ -924,9 +945,6 @@ ulocimp_setKeywordValue(const char* keywords, /* TODO: sorting. removal. */ int32_t needLen = 0; int32_t rc; - const char* nextSeparator = nullptr; - const char* nextEqualsign = nullptr; - const char* keywordStart = nullptr; CharString updatedKeysAndValues; bool handledInputKeyAndValue = false; char keyValuePrefix = '@'; @@ -934,7 +952,7 @@ ulocimp_setKeywordValue(const char* keywords, if (status == U_STRING_NOT_TERMINATED_WARNING) { status = U_ZERO_ERROR; } - if (keywordName == nullptr || keywordName[0] == 0) { + if (keywordName.empty()) { status = U_ILLEGAL_ARGUMENT_ERROR; return 0; } @@ -944,21 +962,19 @@ ulocimp_setKeywordValue(const char* keywords, } CharString canonKeywordValue; - if(keywordValue) { - while (*keywordValue != 0) { - if (!UPRV_ISALPHANUM(*keywordValue) && !UPRV_OK_VALUE_PUNCTUATION(*keywordValue)) { - status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed key value */ - return 0; - } - /* Should we force lowercase in value to set? */ - canonKeywordValue.append(*keywordValue++, status); + for (char c : keywordValue) { + if (!UPRV_ISALPHANUM(c) && !UPRV_OK_VALUE_PUNCTUATION(c)) { + status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed key value */ + return 0; } + /* Should we force lowercase in value to set? */ + canonKeywordValue.append(c, status); } if (U_FAILURE(status)) { return 0; } - if (keywords == nullptr || keywords[1] == '\0') { + if (keywords.size() <= 1) { if (canonKeywordValue.isEmpty()) { /* no keywords = nothing to remove */ U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING); return 0; @@ -984,23 +1000,20 @@ ulocimp_setKeywordValue(const char* keywords, return needLen; } /* end shortcut - no @ */ - keywordStart = keywords; /* search for keyword */ - while(keywordStart) { - const char* keyValueTail; - + for (size_t keywordStart = 0; keywordStart != std::string_view::npos;) { keywordStart++; /* skip @ or ; */ - nextEqualsign = uprv_strchr(keywordStart, '='); - if (!nextEqualsign) { + size_t nextEqualsign = keywords.find('=', keywordStart); + if (nextEqualsign == std::string_view::npos) { status = U_ILLEGAL_ARGUMENT_ERROR; /* key must have =value */ return 0; } /* strip leading & trailing spaces (TC decided to tolerate these) */ - while(*keywordStart == ' ') { + while (keywordStart < keywords.size() && keywords[keywordStart] == ' ') { keywordStart++; } - keyValueTail = nextEqualsign; - while (keyValueTail > keywordStart && *(keyValueTail-1) == ' ') { + size_t keyValueTail = nextEqualsign; + while (keyValueTail > keywordStart && keywords[keyValueTail - 1] == ' ') { keyValueTail--; } /* now keyValueTail points to first char after the keyName */ @@ -1011,26 +1024,26 @@ ulocimp_setKeywordValue(const char* keywords, } CharString localeKeywordName; while (keywordStart < keyValueTail) { - if (!UPRV_ISALPHANUM(*keywordStart)) { + if (!UPRV_ISALPHANUM(keywords[keywordStart])) { status = U_ILLEGAL_ARGUMENT_ERROR; /* malformed keyword name */ return 0; } - localeKeywordName.append(uprv_tolower(*keywordStart++), status); + localeKeywordName.append(uprv_tolower(keywords[keywordStart++]), status); } if (U_FAILURE(status)) { return 0; } - nextSeparator = uprv_strchr(nextEqualsign, ';'); + size_t nextSeparator = keywords.find(';', nextEqualsign); /* start processing the value part */ nextEqualsign++; /* skip '=' */ /* First strip leading & trailing spaces (TC decided to tolerate these) */ - while(*nextEqualsign == ' ') { + while (nextEqualsign < keywords.size() && keywords[nextEqualsign] == ' ') { nextEqualsign++; } - keyValueTail = (nextSeparator)? nextSeparator: nextEqualsign + uprv_strlen(nextEqualsign); - while(keyValueTail > nextEqualsign && *(keyValueTail-1) == ' ') { + keyValueTail = nextSeparator == std::string_view::npos ? keywords.size() : nextSeparator; + while (keyValueTail > nextEqualsign && keywords[keyValueTail - 1] == ' ') { keyValueTail--; } if (nextEqualsign == keyValueTail) { @@ -1065,9 +1078,10 @@ ulocimp_setKeywordValue(const char* keywords, keyValuePrefix = ';'; /* for any subsequent key-value pair */ updatedKeysAndValues.append(localeKeywordName, status); updatedKeysAndValues.append('=', status); - updatedKeysAndValues.append(nextEqualsign, static_cast<int32_t>(keyValueTail-nextEqualsign), status); + updatedKeysAndValues.append(keywords.data() + nextEqualsign, + static_cast<int32_t>(keyValueTail - nextEqualsign), status); } - if (!nextSeparator && !canonKeywordValue.isEmpty() && !handledInputKeyAndValue) { + if (nextSeparator == std::string_view::npos && !canonKeywordValue.isEmpty() && !handledInputKeyAndValue) { /* append new entry at the end, it sorts later than existing entries */ updatedKeysAndValues.append(keyValuePrefix, status); /* skip keyValuePrefix update, no subsequent key-value pair */ @@ -1091,7 +1105,7 @@ ulocimp_setKeywordValue(const char* keywords, /* if input key/value specified removal of a keyword not present in locale, or * there was an error in CharString.append, leave original locale alone. */ U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING); - return (int32_t)uprv_strlen(keywords); + return static_cast<int32_t>(keywords.size()); } needLen = updatedKeysAndValues.length(); @@ -1155,7 +1169,7 @@ std::optional<int16_t> _findIndex(const char* const* list, const char* key) while (pass++ < 2) { while (*list) { if (uprv_strcmp(key, *list) == 0) { - return (int16_t)(list - anchor); + return static_cast<int16_t>(list - anchor); } list++; } @@ -1241,7 +1255,7 @@ _getLanguage(const char* localeID, std::optional<int16_t> offset = _findIndex(LANGUAGES_3, buffer); if (offset.has_value()) { const char* const alias = LANGUAGES[*offset]; - sink->Append(alias, (int32_t)uprv_strlen(alias)); + sink->Append(alias, static_cast<int32_t>(uprv_strlen(alias))); return; } } @@ -1322,7 +1336,7 @@ _getRegion(const char* localeID, std::optional<int16_t> offset = _findIndex(COUNTRIES_3, buffer); if (offset.has_value()) { const char* const alias = COUNTRIES[*offset]; - sink->Append(alias, (int32_t)uprv_strlen(alias)); + sink->Append(alias, static_cast<int32_t>(uprv_strlen(alias))); return; } } @@ -1370,7 +1384,7 @@ _getVariant(const char* localeID, needSeparator = false; } if (sink != nullptr) { - char c = (char)uprv_toupper(localeID[index]); + char c = uprv_toupper(localeID[index]); if (c == '-') c = '_'; sink->Append(&c, 1); } @@ -1399,7 +1413,7 @@ _getVariant(const char* localeID, needSeparator = false; } if (sink != nullptr) { - char c = (char)uprv_toupper(localeID[index]); + char c = uprv_toupper(localeID[index]); if (c == '-' || c == ',') c = '_'; sink->Append(&c, 1); } @@ -1955,7 +1969,7 @@ ulocimp_getParent(const char* localeID, lastUnderscore=uprv_strrchr(localeID, '_'); if(lastUnderscore!=nullptr) { - i=(int32_t)(lastUnderscore-localeID); + i = static_cast<int32_t>(lastUnderscore - localeID); } else { i=0; } @@ -2218,7 +2232,7 @@ uloc_getLCID(const char* localeID) CharString collVal = ulocimp_getKeywordValue(localeID, "collation", status); if (U_SUCCESS(status) && !collVal.isEmpty()) { CharString tmpLocaleID = ulocimp_getBaseName(localeID, status); - ulocimp_setKeywordValue("collation", collVal.data(), tmpLocaleID, status); + ulocimp_setKeywordValue("collation", collVal.toStringPiece(), tmpLocaleID, status); if (U_SUCCESS(status)) { return uprv_convertToLCID(langID.data(), tmpLocaleID.data(), &status); } @@ -2285,8 +2299,17 @@ uloc_getISOCountries() U_CAPI const char* U_EXPORT2 uloc_toUnicodeLocaleKey(const char* keyword) { - const char* bcpKey = ulocimp_toBcpKey(keyword); - if (bcpKey == nullptr && ultag_isUnicodeLocaleKey(keyword, -1)) { + if (keyword == nullptr || *keyword == '\0') { return nullptr; } + std::optional<std::string_view> result = ulocimp_toBcpKeyWithFallback(keyword); + return result.has_value() ? result->data() : nullptr; // Known to be NUL terminated. +} + +U_EXPORT std::optional<std::string_view> +ulocimp_toBcpKeyWithFallback(std::string_view keyword) +{ + std::optional<std::string_view> bcpKey = ulocimp_toBcpKey(keyword); + if (!bcpKey.has_value() && + ultag_isUnicodeLocaleKey(keyword.data(), static_cast<int32_t>(keyword.size()))) { // unknown keyword, but syntax is fine.. return keyword; } @@ -2296,8 +2319,18 @@ uloc_toUnicodeLocaleKey(const char* keyword) U_CAPI const char* U_EXPORT2 uloc_toUnicodeLocaleType(const char* keyword, const char* value) { - const char* bcpType = ulocimp_toBcpType(keyword, value, nullptr, nullptr); - if (bcpType == nullptr && ultag_isUnicodeLocaleType(value, -1)) { + if (keyword == nullptr || *keyword == '\0' || + value == nullptr || *value == '\0') { return nullptr; } + std::optional<std::string_view> result = ulocimp_toBcpTypeWithFallback(keyword, value); + return result.has_value() ? result->data() : nullptr; // Known to be NUL terminated. +} + +U_EXPORT std::optional<std::string_view> +ulocimp_toBcpTypeWithFallback(std::string_view keyword, std::string_view value) +{ + std::optional<std::string_view> bcpType = ulocimp_toBcpType(keyword, value); + if (!bcpType.has_value() && + ultag_isUnicodeLocaleType(value.data(), static_cast<int32_t>(value.size()))) { // unknown keyword, but syntax is fine.. return value; } @@ -2307,37 +2340,28 @@ uloc_toUnicodeLocaleType(const char* keyword, const char* value) namespace { bool -isWellFormedLegacyKey(const char* legacyKey) +isWellFormedLegacyKey(std::string_view key) { - const char* p = legacyKey; - while (*p) { - if (!UPRV_ISALPHANUM(*p)) { - return false; - } - p++; - } - return true; + return std::all_of(key.begin(), key.end(), UPRV_ISALPHANUM); } bool -isWellFormedLegacyType(const char* legacyType) +isWellFormedLegacyType(std::string_view legacyType) { - const char* p = legacyType; int32_t alphaNumLen = 0; - while (*p) { - if (*p == '_' || *p == '/' || *p == '-') { + for (char c : legacyType) { + if (c == '_' || c == '/' || c == '-') { if (alphaNumLen == 0) { return false; } alphaNumLen = 0; - } else if (UPRV_ISALPHANUM(*p)) { + } else if (UPRV_ISALPHANUM(c)) { alphaNumLen++; } else { return false; } - p++; } - return (alphaNumLen != 0); + return alphaNumLen != 0; } } // namespace @@ -2345,8 +2369,16 @@ isWellFormedLegacyType(const char* legacyType) U_CAPI const char* U_EXPORT2 uloc_toLegacyKey(const char* keyword) { - const char* legacyKey = ulocimp_toLegacyKey(keyword); - if (legacyKey == nullptr) { + if (keyword == nullptr || *keyword == '\0') { return nullptr; } + std::optional<std::string_view> result = ulocimp_toLegacyKeyWithFallback(keyword); + return result.has_value() ? result->data() : nullptr; // Known to be NUL terminated. +} + +U_EXPORT std::optional<std::string_view> +ulocimp_toLegacyKeyWithFallback(std::string_view keyword) +{ + std::optional<std::string_view> legacyKey = ulocimp_toLegacyKey(keyword); + if (!legacyKey.has_value() && isWellFormedLegacyKey(keyword)) { // Checks if the specified locale key is well-formed with the legacy locale syntax. // // Note: @@ -2354,9 +2386,7 @@ uloc_toLegacyKey(const char* keyword) // * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier and // * http://www.unicode.org/reports/tr35/#Old_Locale_Extension_Syntax // Keys can only consist of [0-9a-zA-Z]. - if (isWellFormedLegacyKey(keyword)) { - return keyword; - } + return keyword; } return legacyKey; } @@ -2364,8 +2394,17 @@ uloc_toLegacyKey(const char* keyword) U_CAPI const char* U_EXPORT2 uloc_toLegacyType(const char* keyword, const char* value) { - const char* legacyType = ulocimp_toLegacyType(keyword, value, nullptr, nullptr); - if (legacyType == nullptr) { + if (keyword == nullptr || *keyword == '\0' || + value == nullptr || *value == '\0') { return nullptr; } + std::optional<std::string_view> result = ulocimp_toLegacyTypeWithFallback(keyword, value); + return result.has_value() ? result->data() : nullptr; // Known to be NUL terminated. +} + +U_EXPORT std::optional<std::string_view> +ulocimp_toLegacyTypeWithFallback(std::string_view keyword, std::string_view value) +{ + std::optional<std::string_view> legacyType = ulocimp_toLegacyType(keyword, value); + if (!legacyType.has_value() && isWellFormedLegacyType(value)) { // Checks if the specified locale type is well-formed with the legacy locale syntax. // // Note: @@ -2374,9 +2413,7 @@ uloc_toLegacyType(const char* keyword, const char* value) // * http://www.unicode.org/reports/tr35/#Old_Locale_Extension_Syntax // Values (types) can only consist of [0-9a-zA-Z], plus for legacy values // we allow [/_-+] in the middle (e.g. "Etc/GMT+1", "Asia/Tel_Aviv") - if (isWellFormedLegacyType(value)) { - return value; - } + return value; } return legacyType; } diff --git a/deps/icu-small/source/common/uloc_keytype.cpp b/deps/icu-small/source/common/uloc_keytype.cpp index 38694d4a185d81..9dc392126ef34d 100644 --- a/deps/icu-small/source/common/uloc_keytype.cpp +++ b/deps/icu-small/source/common/uloc_keytype.cpp @@ -7,6 +7,8 @@ ********************************************************************** */ #include <algorithm> +#include <optional> +#include <string_view> #include "unicode/utypes.h" #include "unicode/unistr.h" @@ -18,6 +20,7 @@ #include "uassert.h" #include "ucln_cmn.h" #include "uhash.h" +#include "ulocimp.h" #include "umutex.h" #include "uresimp.h" #include "uvector.h" @@ -35,20 +38,25 @@ typedef enum { } SpecialType; struct LocExtKeyData : public icu::UMemory { - const char* legacyId; - const char* bcpId; + std::string_view legacyId; + std::string_view bcpId; icu::LocalUHashtablePointer typeMap; uint32_t specialTypes; }; struct LocExtType : public icu::UMemory { - const char* legacyId; - const char* bcpId; + std::string_view legacyId; + std::string_view bcpId; +}; + +struct TypeAlias : public icu::UMemory { + std::string_view from; }; static icu::MemoryPool<icu::CharString>* gKeyTypeStringPool = nullptr; static icu::MemoryPool<LocExtKeyData>* gLocExtKeyDataEntries = nullptr; static icu::MemoryPool<LocExtType>* gLocExtTypeEntries = nullptr; +static icu::MemoryPool<TypeAlias>* gTypeAliasEntries = nullptr; U_CDECL_BEGIN @@ -65,6 +73,9 @@ uloc_key_type_cleanup() { delete gLocExtTypeEntries; gLocExtTypeEntries = nullptr; + delete gTypeAliasEntries; + gTypeAliasEntries = nullptr; + delete gKeyTypeStringPool; gKeyTypeStringPool = nullptr; @@ -81,7 +92,7 @@ initFromResourceBundle(UErrorCode& sts) { U_NAMESPACE_USE ucln_common_registerCleanup(UCLN_COMMON_LOCALE_KEY_TYPE, uloc_key_type_cleanup); - gLocExtKeyMap = uhash_open(uhash_hashIChars, uhash_compareIChars, nullptr, &sts); + gLocExtKeyMap = uhash_open(uhash_hashIStringView, uhash_compareIStringView, nullptr, &sts); LocalUResourceBundlePointer keyTypeDataRes(ures_openDirect(nullptr, "keyTypeData", &sts)); LocalUResourceBundlePointer keyMapRes(ures_getByKey(keyTypeDataRes.getAlias(), "keyMap", nullptr, &sts)); @@ -112,6 +123,11 @@ initFromResourceBundle(UErrorCode& sts) { sts = U_MEMORY_ALLOCATION_ERROR; return; } + gTypeAliasEntries = new icu::MemoryPool<TypeAlias>; + if (gTypeAliasEntries == nullptr) { + sts = U_MEMORY_ALLOCATION_ERROR; + return; + } // iterate through keyMap resource LocalUResourceBundlePointer keyMapEntry; @@ -144,7 +160,7 @@ initFromResourceBundle(UErrorCode& sts) { bool isTZ = uprv_strcmp(legacyKeyId, "timezone") == 0; - UHashtable* typeDataMap = uhash_open(uhash_hashIChars, uhash_compareIChars, nullptr, &sts); + UHashtable* typeDataMap = uhash_open(uhash_hashIStringView, uhash_compareIStringView, nullptr, &sts); if (U_FAILURE(sts)) { break; } @@ -253,10 +269,10 @@ initFromResourceBundle(UErrorCode& sts) { t->bcpId = bcpTypeId; t->legacyId = legacyTypeId; - uhash_put(typeDataMap, (void*)legacyTypeId, t, &sts); + uhash_put(typeDataMap, &t->legacyId, t, &sts); if (bcpTypeId != legacyTypeId) { // different type value - uhash_put(typeDataMap, (void*)bcpTypeId, t, &sts); + uhash_put(typeDataMap, &t->bcpId, t, &sts); } if (U_FAILURE(sts)) { break; @@ -275,8 +291,14 @@ initFromResourceBundle(UErrorCode& sts) { break; } // check if this is an alias of canonical legacy type - if (uprv_compareInvWithUChar(nullptr, legacyTypeId, -1, to, toLen) == 0) { + if (uprv_compareInvWithUChar( + nullptr, + t->legacyId.data(), + static_cast<int32_t>(t->legacyId.size()), + to, + toLen) == 0) { const char* from = ures_getKey(typeAliasDataEntry.getAlias()); + TypeAlias* alias = gTypeAliasEntries->create(TypeAlias{{}, from}); if (isTZ) { // replace colon with slash if necessary if (uprv_strchr(from, ':') != nullptr) { @@ -293,10 +315,10 @@ initFromResourceBundle(UErrorCode& sts) { fromBuf->data(), fromBuf->data() + fromBuf->length(), ':', '/'); - from = fromBuf->data(); + alias->from = fromBuf->toStringPiece(); } } - uhash_put(typeDataMap, (void*)from, t, &sts); + uhash_put(typeDataMap, &alias->from, t, &sts); } } if (U_FAILURE(sts)) { @@ -316,9 +338,15 @@ initFromResourceBundle(UErrorCode& sts) { break; } // check if this is an alias of bcp type - if (uprv_compareInvWithUChar(nullptr, bcpTypeId, -1, to, toLen) == 0) { + if (uprv_compareInvWithUChar( + nullptr, + t->bcpId.data(), + static_cast<int32_t>(t->bcpId.size()), + to, + toLen) == 0) { const char* from = ures_getKey(bcpTypeAliasDataEntry.getAlias()); - uhash_put(typeDataMap, (void*)from, t, &sts); + TypeAlias* alias = gTypeAliasEntries->create(TypeAlias{{}, from}); + uhash_put(typeDataMap, &alias->from, t, &sts); } } if (U_FAILURE(sts)) { @@ -341,10 +369,10 @@ initFromResourceBundle(UErrorCode& sts) { keyData->specialTypes = specialTypes; keyData->typeMap.adoptInstead(typeDataMap); - uhash_put(gLocExtKeyMap, (void*)legacyKeyId, keyData, &sts); + uhash_put(gLocExtKeyMap, &keyData->legacyId, keyData, &sts); if (legacyKeyId != bcpKeyId) { // different key value - uhash_put(gLocExtKeyMap, (void*)bcpKeyId, keyData, &sts); + uhash_put(gLocExtKeyMap, &keyData->bcpId, keyData, &sts); } if (U_FAILURE(sts)) { break; @@ -363,110 +391,96 @@ init() { } bool -isSpecialTypeCodepoints(const char* val) { +isSpecialTypeCodepoints(std::string_view val) { int32_t subtagLen = 0; - const char* p = val; - while (*p) { - if (*p == '-') { + for (char c : val) { + if (c == '-') { if (subtagLen < 4 || subtagLen > 6) { return false; } subtagLen = 0; - } else if ((*p >= '0' && *p <= '9') || - (*p >= 'A' && *p <= 'F') || // A-F/a-f are contiguous - (*p >= 'a' && *p <= 'f')) { // also in EBCDIC + } else if ((c >= '0' && c <= '9') || + (c >= 'A' && c <= 'F') || // A-F/a-f are contiguous + (c >= 'a' && c <= 'f')) { // also in EBCDIC subtagLen++; } else { return false; } - p++; } - return (subtagLen >= 4 && subtagLen <= 6); + return subtagLen >= 4 && subtagLen <= 6; } bool -isSpecialTypeReorderCode(const char* val) { +isSpecialTypeReorderCode(std::string_view val) { int32_t subtagLen = 0; - const char* p = val; - while (*p) { - if (*p == '-') { + for (char c : val) { + if (c == '-') { if (subtagLen < 3 || subtagLen > 8) { return false; } subtagLen = 0; - } else if (uprv_isASCIILetter(*p)) { + } else if (uprv_isASCIILetter(c)) { subtagLen++; } else { return false; } - p++; } - return (subtagLen >=3 && subtagLen <=8); + return subtagLen >= 3 && subtagLen <= 8; } bool -isSpecialTypeRgKeyValue(const char* val) { +isSpecialTypeRgKeyValue(std::string_view val) { int32_t subtagLen = 0; - const char* p = val; - while (*p) { - if ( (subtagLen < 2 && uprv_isASCIILetter(*p)) || - (subtagLen >= 2 && (*p == 'Z' || *p == 'z')) ) { + for (char c : val) { + if ((subtagLen < 2 && uprv_isASCIILetter(c)) || + (subtagLen >= 2 && (c == 'Z' || c == 'z'))) { subtagLen++; } else { return false; } - p++; } - return (subtagLen == 6); + return subtagLen == 6; } } // namespace -U_EXPORT const char* -ulocimp_toBcpKey(const char* key) { +U_EXPORT std::optional<std::string_view> +ulocimp_toBcpKey(std::string_view key) { if (!init()) { - return nullptr; + return std::nullopt; } - LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key); + LocExtKeyData* keyData = static_cast<LocExtKeyData*>(uhash_get(gLocExtKeyMap, &key)); if (keyData != nullptr) { return keyData->bcpId; } - return nullptr; + + return std::nullopt; } -U_EXPORT const char* -ulocimp_toLegacyKey(const char* key) { +U_EXPORT std::optional<std::string_view> +ulocimp_toLegacyKey(std::string_view key) { if (!init()) { - return nullptr; + return std::nullopt; } - LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key); + LocExtKeyData* keyData = static_cast<LocExtKeyData*>(uhash_get(gLocExtKeyMap, &key)); if (keyData != nullptr) { return keyData->legacyId; } - return nullptr; -} -U_EXPORT const char* -ulocimp_toBcpType(const char* key, const char* type, bool* isKnownKey, bool* isSpecialType) { - if (isKnownKey != nullptr) { - *isKnownKey = false; - } - if (isSpecialType != nullptr) { - *isSpecialType = false; - } + return std::nullopt; +} +U_EXPORT std::optional<std::string_view> +ulocimp_toBcpType(std::string_view key, std::string_view type) { if (!init()) { - return nullptr; + return std::nullopt; } - LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key); + LocExtKeyData* keyData = static_cast<LocExtKeyData*>(uhash_get(gLocExtKeyMap, &key)); if (keyData != nullptr) { - if (isKnownKey != nullptr) { - *isKnownKey = true; - } - LocExtType* t = (LocExtType*)uhash_get(keyData->typeMap.getAlias(), type); + LocExtType* t = static_cast<LocExtType*>(uhash_get(keyData->typeMap.getAlias(), &type)); if (t != nullptr) { return t->bcpId; } @@ -482,36 +496,24 @@ ulocimp_toBcpType(const char* key, const char* type, bool* isKnownKey, bool* isS matched = isSpecialTypeRgKeyValue(type); } if (matched) { - if (isSpecialType != nullptr) { - *isSpecialType = true; - } return type; } } } - return nullptr; -} + return std::nullopt; +} -U_EXPORT const char* -ulocimp_toLegacyType(const char* key, const char* type, bool* isKnownKey, bool* isSpecialType) { - if (isKnownKey != nullptr) { - *isKnownKey = false; - } - if (isSpecialType != nullptr) { - *isSpecialType = false; - } +U_EXPORT std::optional<std::string_view> +ulocimp_toLegacyType(std::string_view key, std::string_view type) { if (!init()) { - return nullptr; + return std::nullopt; } - LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key); + LocExtKeyData* keyData = static_cast<LocExtKeyData*>(uhash_get(gLocExtKeyMap, &key)); if (keyData != nullptr) { - if (isKnownKey != nullptr) { - *isKnownKey = true; - } - LocExtType* t = (LocExtType*)uhash_get(keyData->typeMap.getAlias(), type); + LocExtType* t = static_cast<LocExtType*>(uhash_get(keyData->typeMap.getAlias(), &type)); if (t != nullptr) { return t->legacyId; } @@ -527,12 +529,10 @@ ulocimp_toLegacyType(const char* key, const char* type, bool* isKnownKey, bool* matched = isSpecialTypeRgKeyValue(type); } if (matched) { - if (isSpecialType != nullptr) { - *isSpecialType = true; - } return type; } } } - return nullptr; + + return std::nullopt; } diff --git a/deps/icu-small/source/common/uloc_tag.cpp b/deps/icu-small/source/common/uloc_tag.cpp index f5ab0c36a627a1..7b3b1e73a37cf4 100644 --- a/deps/icu-small/source/common/uloc_tag.cpp +++ b/deps/icu-small/source/common/uloc_tag.cpp @@ -7,6 +7,8 @@ ********************************************************************** */ +#include <optional> +#include <string_view> #include <utility> #include "unicode/bytestream.h" @@ -415,7 +417,7 @@ _isAlphaNumericString(const char* s, int32_t len) { bool _isAlphaNumericStringLimitedLength(const char* s, int32_t len, int32_t min, int32_t max) { if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (len >= min && len <= max && _isAlphaNumericString(s, len)) { return true; @@ -433,7 +435,7 @@ ultag_isLanguageSubtag(const char* s, int32_t len) { * See ICU-20372 */ if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (len >= 2 && len <= 8 && _isAlphaString(s, len)) { return true; @@ -450,7 +452,7 @@ _isExtlangSubtag(const char* s, int32_t len) { * *2("-" 3ALPHA) ; permanently reserved */ if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (len == 3 && _isAlphaString(s, len)) { return true; @@ -466,7 +468,7 @@ ultag_isScriptSubtag(const char* s, int32_t len) { * script = 4ALPHA ; ISO 15924 code */ if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (len == 4 && _isAlphaString(s, len)) { return true; @@ -481,7 +483,7 @@ ultag_isRegionSubtag(const char* s, int32_t len) { * / 3DIGIT ; UN M.49 code */ if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (len == 2 && _isAlphaString(s, len)) { return true; @@ -501,7 +503,7 @@ _isVariantSubtag(const char* s, int32_t len) { * / (DIGIT 3alphanum) */ if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (_isAlphaNumericStringLimitedLength(s, len, 5, 8)) { return true; @@ -518,7 +520,7 @@ _isSepListOf(bool (*test)(const char*, int32_t), const char* s, int32_t len) { const char *pSubtag = nullptr; if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } while ((p - s) < len) { @@ -526,7 +528,7 @@ _isSepListOf(bool (*test)(const char*, int32_t), const char* s, int32_t len) { if (pSubtag == nullptr) { return false; } - if (!test(pSubtag, (int32_t)(p - pSubtag))) { + if (!test(pSubtag, static_cast<int32_t>(p - pSubtag))) { return false; } pSubtag = nullptr; @@ -538,7 +540,7 @@ _isSepListOf(bool (*test)(const char*, int32_t), const char* s, int32_t len) { if (pSubtag == nullptr) { return false; } - return test(pSubtag, (int32_t)(p - pSubtag)); + return test(pSubtag, static_cast<int32_t>(p - pSubtag)); } } // namespace @@ -572,7 +574,7 @@ _isExtensionSingleton(const char* s, int32_t len) { * / %x79-7A ; y - z */ if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (len == 1 && (ISALPHA(*s) || ISNUMERIC(*s)) && (uprv_tolower(*s) != PRIVATEUSE)) { return true; @@ -631,7 +633,7 @@ ultag_isUnicodeLocaleKey(const char* s, int32_t len) { * key = alphanum alpha ; */ if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (len == 2 && (ISALPHA(*s) || ISNUMERIC(*s)) && ISALPHA(s[1])) { return true; @@ -664,7 +666,7 @@ _isTKey(const char* s, int32_t len) * tkey = alpha digit ; */ if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } if (len == 2 && ISALPHA(*s) && ISNUMERIC(*(s + 1))) { return true; @@ -718,7 +720,7 @@ _isTransformedExtensionSubtag(int32_t& state, const char* s, int32_t len) if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } switch (state) { case kStart: @@ -822,7 +824,7 @@ _isStatefulSepListOf(bool (*test)(int32_t&, const char*, int32_t), const char* s int32_t subtagLen = 0; if (len < 0) { - len = (int32_t)uprv_strlen(s); + len = static_cast<int32_t>(uprv_strlen(s)); } for (p = s; len > 0; p++, len--) { @@ -966,8 +968,8 @@ _addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, bool lo /* special handling for locale to bcp conversion */ int32_t len, curlen; - len = (int32_t)uprv_strlen(ext->key); - curlen = (int32_t)uprv_strlen(cur->key); + len = static_cast<int32_t>(uprv_strlen(ext->key)); + curlen = static_cast<int32_t>(uprv_strlen(cur->key)); if (len == 1 && curlen == 1) { if (*(ext->key) == *(cur->key)) { @@ -1074,10 +1076,10 @@ _appendLanguageToLanguageTag(const char* localeID, icu::ByteSink& sink, bool str // ones in DEPRECATEDLANGS[]. Get out of loop on coming // across the 1st 3-letter subtag, if the input is a 2-letter code. // to avoid continuing to try when there's no match. - if (buf.length() < (int32_t)uprv_strlen(DEPRECATEDLANGS[i])) break; + if (buf.length() < static_cast<int32_t>(uprv_strlen(DEPRECATEDLANGS[i]))) break; if (uprv_compareInvCharsAsAscii(buf.data(), DEPRECATEDLANGS[i]) == 0) { const char* const resolved = DEPRECATEDLANGS[i + 1]; - sink.Append(resolved, (int32_t)uprv_strlen(resolved)); + sink.Append(resolved, static_cast<int32_t>(uprv_strlen(resolved))); return; } } @@ -1144,7 +1146,7 @@ _appendRegionToLanguageTag(const char* localeID, icu::ByteSink& sink, bool stric for (int32_t i = 0; i < UPRV_LENGTHOF(DEPRECATEDREGIONS); i += 2) { if (uprv_compareInvCharsAsAscii(buf.data(), DEPRECATEDREGIONS[i]) == 0) { const char* const resolved = DEPRECATEDREGIONS[i + 1]; - sink.Append(resolved, (int32_t)uprv_strlen(resolved)); + sink.Append(resolved, static_cast<int32_t>(uprv_strlen(resolved))); return; } } @@ -1208,7 +1210,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, bool str /* validate */ if (_isVariantSubtag(pVar, -1)) { - if (uprv_strcmp(pVar,POSIX_VALUE) || buf.length() != (int32_t)uprv_strlen(POSIX_VALUE)) { + if (uprv_strcmp(pVar, POSIX_VALUE) || buf.length() != static_cast<int32_t>(uprv_strlen(POSIX_VALUE))) { /* emit the variant to the list */ icu::LocalPointer<VariantListEntry> var(new VariantListEntry, status); if (U_FAILURE(status)) { @@ -1254,7 +1256,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, bool str VariantListEntry* var = varFirst; while (var != nullptr) { sink.Append("-", 1); - varLen = (int32_t)uprv_strlen(var->variant); + varLen = static_cast<int32_t>(uprv_strlen(var->variant)); sink.Append(var->variant, varLen); var = var->next; } @@ -1323,7 +1325,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, bool str continue; } - keylen = (int32_t)uprv_strlen(key); + keylen = static_cast<int32_t>(uprv_strlen(key)); isBcpUExt = (keylen > 1); /* special keyword used for representing Unicode locale attributes */ @@ -1374,27 +1376,28 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, bool str bcpValue = nullptr; } } else if (isBcpUExt) { - bcpKey = uloc_toUnicodeLocaleKey(key); - if (bcpKey == nullptr) { + std::optional<std::string_view> optBcpKey = ulocimp_toBcpKeyWithFallback(key); + if (!optBcpKey.has_value()) { if (strict) { status = U_ILLEGAL_ARGUMENT_ERROR; break; } continue; } + bcpKey = optBcpKey->data(); - /* we've checked buf is null-terminated above */ - bcpValue = uloc_toUnicodeLocaleType(key, buf.data()); - if (bcpValue == nullptr) { + std::optional<std::string_view> optBcpValue = + ulocimp_toBcpTypeWithFallback(key, buf.toStringPiece()); + if (!optBcpValue.has_value()) { if (strict) { status = U_ILLEGAL_ARGUMENT_ERROR; break; } continue; } - if (bcpValue == buf.data()) { + if (optBcpValue->data() == buf.data()) { /* - When uloc_toUnicodeLocaleType(key, buf) returns the + When ulocimp_toBcpTypeWithFallback(key, buf) returns the input value as is, the value is well-formed, but has no known mapping. This implementation normalizes the value to lower case @@ -1412,6 +1415,8 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, bool str T_CString_toLowerCase(extBuf->data()); bcpValue = extBuf->data(); + } else { + bcpValue = optBcpValue->data(); } } else { if (*key == PRIVATEUSE) { @@ -1669,33 +1674,28 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT const char *pKey = nullptr; /* LDML key */ const char *pType = nullptr; /* LDML type */ - char bcpKeyBuf[3]; /* BCP key length is always 2 for now */ - U_ASSERT(pBcpKey != nullptr); - if (bcpKeyLen >= (int32_t)sizeof(bcpKeyBuf)) { + /* BCP key length is always 2 for now */ + if (bcpKeyLen != 2) { /* the BCP key is invalid */ status = U_ILLEGAL_ARGUMENT_ERROR; return; } - U_ASSERT(bcpKeyLen <= 2); - - uprv_strncpy(bcpKeyBuf, pBcpKey, bcpKeyLen); - bcpKeyBuf[bcpKeyLen] = 0; /* u extension key to LDML key */ - pKey = uloc_toLegacyKey(bcpKeyBuf); - if (pKey == nullptr) { + std::optional<std::string_view> legacyKey = ulocimp_toLegacyKeyWithFallback( + {pBcpKey, static_cast<std::string_view::size_type>(bcpKeyLen)}); + if (!legacyKey.has_value()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - if (pKey == bcpKeyBuf) { + if (legacyKey->data() == pBcpKey) { /* The key returned by toLegacyKey points to the input buffer. We normalize the result key to lower case. */ - T_CString_toLowerCase(bcpKeyBuf); - icu::CharString* key = kwdBuf.create(bcpKeyBuf, bcpKeyLen, status); + icu::CharString* key = kwdBuf.create(pBcpKey, bcpKeyLen, status); if (key == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; @@ -1703,36 +1703,37 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT if (U_FAILURE(status)) { return; } + T_CString_toLowerCase(key->data()); pKey = key->data(); + } else { + pKey = legacyKey->data(); } if (pBcpType) { - icu::CharString bcpTypeBuf(pBcpType, bcpTypeLen, status); - if (U_FAILURE(status)) { - return; - } - /* BCP type to locale type */ - pType = uloc_toLegacyType(pKey, bcpTypeBuf.data()); - if (pType == nullptr) { + std::optional<std::string_view> legacyType = ulocimp_toLegacyTypeWithFallback( + pKey, {pBcpType, static_cast<std::string_view::size_type>(bcpTypeLen)}); + if (!legacyType.has_value()) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } - if (pType == bcpTypeBuf.data()) { + if (legacyType->data() == pBcpType) { /* The type returned by toLegacyType points to the input buffer. We normalize the result type to lower case. */ - /* normalize to lower case */ - T_CString_toLowerCase(bcpTypeBuf.data()); - if (icu::CharString* type = - kwdBuf.create(std::move(bcpTypeBuf), status)) { - if (U_FAILURE(status)) { return; } - pType = type->data(); - } else { + icu::CharString* type = kwdBuf.create(pBcpType, bcpTypeLen, status); + if (type == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } + if (U_FAILURE(status)) { + return; + } + T_CString_toLowerCase(type->data()); + pType = type->data(); + } else { + pType = legacyType->data(); } } else { /* typeless - default type value is "yes" */ @@ -1822,7 +1823,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode& status) if (U_SUCCESS(status)) { type = ultag_getPrivateUse(langtag); - if ((int32_t)uprv_strlen(type) > 0) { + if (static_cast<int32_t>(uprv_strlen(type)) > 0) { /* add private use as a keyword */ kwd = extPool.create(); if (kwd == nullptr) { @@ -1840,7 +1841,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode& status) /* If a POSIX variant was in the extensions, write it out before writing the keywords. */ if (U_SUCCESS(status) && posixVariant) { - len = (int32_t) uprv_strlen(_POSIX); + len = static_cast<int32_t>(uprv_strlen(_POSIX)); sink.Append(_POSIX, len); } @@ -1857,12 +1858,12 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode& status) } /* key */ - len = (int32_t)uprv_strlen(kwd->key); + len = static_cast<int32_t>(uprv_strlen(kwd->key)); sink.Append(kwd->key, len); sink.Append("=", 1); /* type */ - len = (int32_t)uprv_strlen(kwd->value); + len = static_cast<int32_t>(uprv_strlen(kwd->value)); sink.Append(kwd->value, len); kwd = kwd->next; @@ -1932,7 +1933,7 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, bool s firstValue = false; } - int32_t len = (int32_t)uprv_strlen(pPriv); + int32_t len = static_cast<int32_t>(uprv_strlen(pPriv)); sink.Append(pPriv, len); } } @@ -1994,11 +1995,11 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode& sta } if (tagLen < 0) { - tagLen = (int32_t)uprv_strlen(tag); + tagLen = static_cast<int32_t>(uprv_strlen(tag)); } /* copy the entire string */ - tagBuf = (char*)uprv_malloc(tagLen + 1); + tagBuf = static_cast<char*>(uprv_malloc(tagLen + 1)); if (tagBuf == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -2011,7 +2012,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode& sta /* create a ULanguageTag */ icu::LocalULanguageTagPointer t( - (ULanguageTag*)uprv_malloc(sizeof(ULanguageTag))); + static_cast<ULanguageTag*>(uprv_malloc(sizeof(ULanguageTag)))); if (t.isNull()) { uprv_free(tagBuf); status = U_MEMORY_ALLOCATION_ERROR; @@ -2050,7 +2051,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode& sta uprv_free(tagBuf); // Change t->buf after the free and before return to avoid the second double free in // the destructor of t when t is out of scope. - t->buf = tagBuf = (char*)uprv_malloc(newTagLength + 1); + t->buf = tagBuf = static_cast<char*>(uprv_malloc(newTagLength + 1)); if (tagBuf == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -2133,7 +2134,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode& sta } else { pNext = pSep + 1; } - subtagLen = (int32_t)(pSep - pSubtag); + subtagLen = static_cast<int32_t>(pSep - pSubtag); if (next & LANG) { if (ultag_isLanguageSubtag(pSubtag, subtagLen)) { @@ -2321,7 +2322,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode& sta } else { pNext = pSep + 1; } - subtagLen = (int32_t)(pSep - pSubtag); + subtagLen = static_cast<int32_t>(pSep - pSubtag); if (uprv_strncmp(pSubtag, PRIVUSE_VARIANT_PREFIX, uprv_strlen(PRIVUSE_VARIANT_PREFIX)) == 0) { *pSep = 0; @@ -2373,7 +2374,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode& sta } if (parsedLen != nullptr) { - *parsedLen = (int32_t)(pLastGoodPosition - t->buf + parsedLenDelta); + *parsedLen = static_cast<int32_t>(pLastGoodPosition - t->buf + parsedLenDelta); } return t.orphan(); @@ -2698,7 +2699,7 @@ ulocimp_forLanguageTag(const char* langtag, /* language */ subtag = ultag_getExtlangSize(lt.getAlias()) > 0 ? ultag_getExtlang(lt.getAlias(), 0) : ultag_getLanguage(lt.getAlias()); if (uprv_compareInvCharsAsAscii(subtag, LANG_UND) != 0) { - len = (int32_t)uprv_strlen(subtag); + len = static_cast<int32_t>(uprv_strlen(subtag)); if (len > 0) { sink.Append(subtag, len); isEmpty = false; @@ -2707,7 +2708,7 @@ ulocimp_forLanguageTag(const char* langtag, /* script */ subtag = ultag_getScript(lt.getAlias()); - len = (int32_t)uprv_strlen(subtag); + len = static_cast<int32_t>(uprv_strlen(subtag)); if (len > 0) { sink.Append("_", 1); isEmpty = false; @@ -2720,7 +2721,7 @@ ulocimp_forLanguageTag(const char* langtag, /* region */ subtag = ultag_getRegion(lt.getAlias()); - len = (int32_t)uprv_strlen(subtag); + len = static_cast<int32_t>(uprv_strlen(subtag)); if (len > 0) { sink.Append("_", 1); isEmpty = false; diff --git a/deps/icu-small/source/common/ulocale.cpp b/deps/icu-small/source/common/ulocale.cpp index aaa17954a393e0..f2f81bc97109bd 100644 --- a/deps/icu-small/source/common/ulocale.cpp +++ b/deps/icu-small/source/common/ulocale.cpp @@ -21,7 +21,10 @@ U_NAMESPACE_USE ULocale* ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err) { if (U_FAILURE(*err)) { return nullptr; } - CharString str(length < 0 ? StringPiece(localeID) : StringPiece(localeID, length), *err); + if (length < 0) { + return EXTERNAL(icu::Locale::createFromName(localeID).clone()); + } + CharString str(localeID, length, *err); // Make a NUL terminated copy. if (U_FAILURE(*err)) { return nullptr; } return EXTERNAL(icu::Locale::createFromName(str.data()).clone()); } diff --git a/deps/icu-small/source/common/ulocbuilder.cpp b/deps/icu-small/source/common/ulocbuilder.cpp index 3b466473624f45..b8b6ce8c186922 100644 --- a/deps/icu-small/source/common/ulocbuilder.cpp +++ b/deps/icu-small/source/common/ulocbuilder.cpp @@ -119,7 +119,7 @@ int32_t ulocbld_buildLocaleID(ULocaleBuilder* builder, } icu::Locale l = INTERNAL(builder)->build(*err); if (U_FAILURE(*err)) { return 0; } - int32_t length = (int32_t)(uprv_strlen(l.getName())); + int32_t length = static_cast<int32_t>(uprv_strlen(l.getName())); if (0 < length && length <= bufferCapacity) { uprv_memcpy(buffer, l.getName(), length); } diff --git a/deps/icu-small/source/common/ulocimp.h b/deps/icu-small/source/common/ulocimp.h index 7fb64062884c69..1887e2a849ab0e 100644 --- a/deps/icu-small/source/common/ulocimp.h +++ b/deps/icu-small/source/common/ulocimp.h @@ -11,6 +11,8 @@ #define ULOCIMP_H #include <cstddef> +#include <optional> +#include <string_view> #include "unicode/bytestream.h" #include "unicode/uloc.h" @@ -53,6 +55,18 @@ uloc_getCurrentCountryID(const char* oldID); U_CFUNC const char* uloc_getCurrentLanguageID(const char* oldID); +U_EXPORT std::optional<std::string_view> +ulocimp_toBcpKeyWithFallback(std::string_view keyword); + +U_EXPORT std::optional<std::string_view> +ulocimp_toBcpTypeWithFallback(std::string_view keyword, std::string_view value); + +U_EXPORT std::optional<std::string_view> +ulocimp_toLegacyKeyWithFallback(std::string_view keyword); + +U_EXPORT std::optional<std::string_view> +ulocimp_toLegacyTypeWithFallback(std::string_view keyword, std::string_view value); + U_EXPORT icu::CharString ulocimp_getKeywords(const char* localeID, char prev, @@ -95,12 +109,12 @@ ulocimp_canonicalize(const char* localeID, U_EXPORT icu::CharString ulocimp_getKeywordValue(const char* localeID, - const char* keywordName, + std::string_view keywordName, UErrorCode& status); U_EXPORT void ulocimp_getKeywordValue(const char* localeID, - const char* keywordName, + std::string_view keywordName, icu::ByteSink& sink, UErrorCode& status); @@ -117,15 +131,15 @@ U_EXPORT icu::CharString ulocimp_getVariant(const char* localeID, UErrorCode& status); U_EXPORT void -ulocimp_setKeywordValue(const char* keywordName, - const char* keywordValue, +ulocimp_setKeywordValue(std::string_view keywordName, + std::string_view keywordValue, icu::CharString& localeID, UErrorCode& status); U_EXPORT int32_t -ulocimp_setKeywordValue(const char* keywords, - const char* keywordName, - const char* keywordValue, +ulocimp_setKeywordValue(std::string_view keywords, + std::string_view keywordName, + std::string_view keywordValue, icu::ByteSink& sink, UErrorCode& status); @@ -391,17 +405,17 @@ ultag_isVariantSubtags(const char* s, int32_t len); const char* ultag_getTKeyStart(const char* localeID); -U_EXPORT const char* -ulocimp_toBcpKey(const char* key); +U_EXPORT std::optional<std::string_view> +ulocimp_toBcpKey(std::string_view key); -U_EXPORT const char* -ulocimp_toLegacyKey(const char* key); +U_EXPORT std::optional<std::string_view> +ulocimp_toLegacyKey(std::string_view key); -U_EXPORT const char* -ulocimp_toBcpType(const char* key, const char* type, bool* isKnownKey, bool* isSpecialType); +U_EXPORT std::optional<std::string_view> +ulocimp_toBcpType(std::string_view key, std::string_view type); -U_EXPORT const char* -ulocimp_toLegacyType(const char* key, const char* type, bool* isKnownKey, bool* isSpecialType); +U_EXPORT std::optional<std::string_view> +ulocimp_toLegacyType(std::string_view key, std::string_view type); /* Function for testing purpose */ U_EXPORT const char* const* @@ -411,4 +425,19 @@ ulocimp_getKnownCanonicalizedLocaleForTest(int32_t& length); U_EXPORT bool ulocimp_isCanonicalizedLocaleForTest(const char* localeName); +#ifdef __cplusplus +U_NAMESPACE_BEGIN +class U_COMMON_API RegionValidateMap : public UObject { + public: + RegionValidateMap(); + virtual ~RegionValidateMap(); + bool isSet(const char* region) const; + bool equals(const RegionValidateMap& that) const; + protected: + int32_t value(const char* region) const; + uint32_t map[22]; // 26x26/32 = 22; +}; +U_NAMESPACE_END +#endif /* __cplusplus */ + #endif diff --git a/deps/icu-small/source/common/umapfile.cpp b/deps/icu-small/source/common/umapfile.cpp index 8dddf0e78dcc5a..b58ac37f4d4593 100644 --- a/deps/icu-small/source/common/umapfile.cpp +++ b/deps/icu-small/source/common/umapfile.cpp @@ -63,7 +63,7 @@ typedef HANDLE MemoryMap; # define IS_MAP(map) ((map)!=nullptr) -#elif MAP_IMPLEMENTATION==MAP_POSIX || MAP_IMPLEMENTATION==MAP_390DLL +#elif MAP_IMPLEMENTATION==MAP_POSIX typedef size_t MemoryMap; # define IS_MAP(map) ((map)!=0) @@ -76,18 +76,6 @@ typedef HANDLE MemoryMap; # ifndef MAP_FAILED # define MAP_FAILED ((void*)-1) # endif - -# if MAP_IMPLEMENTATION==MAP_390DLL - /* No memory mapping for 390 batch mode. Fake it using dll loading. */ -# include <dll.h> -# include "cstring.h" -# include "cmemory.h" -# include "unicode/udata.h" -# define LIB_PREFIX "lib" -# define LIB_SUFFIX ".dll" - /* This is inconvenient until we figure out what to do with U_ICUDATA_NAME in utypes.h */ -# define U_ICUDATA_ENTRY_NAME "icudt" U_ICU_VERSION_SHORT U_LIB_SUFFIX_C_NAME_STRING "_dat" -# endif #elif MAP_IMPLEMENTATION==MAP_STDIO # include <stdio.h> # include "cmemory.h" @@ -339,192 +327,6 @@ typedef HANDLE MemoryMap; pData->pHeader = nullptr; } } - - -#elif MAP_IMPLEMENTATION==MAP_390DLL - /* 390 specific Library Loading. - * This is the only platform left that dynamically loads an ICU Data Library. - * All other platforms use .data files when dynamic loading is required, but - * this turn out to be awkward to support in 390 batch mode. - * - * The idea here is to hide the fact that 390 is using dll loading from the - * rest of ICU, and make it look like there is file loading happening. - * - */ - - static char *strcpy_returnEnd(char *dest, const char *src) - { - while((*dest=*src)!=0) { - ++dest; - ++src; - } - return dest; - } - - /*------------------------------------------------------------------------------ - * - * computeDirPath given a user-supplied path of an item to be opened, - * compute and return - * - the full directory path to be used - * when opening the file. - * - Pointer to null at end of above returned path - * - * Parameters: - * path: input path. Buffer is not altered. - * pathBuffer: Output buffer. Any contents are overwritten. - * - * Returns: - * Pointer to null termination in returned pathBuffer. - * - * TODO: This works the way ICU historically has, but the - * whole data fallback search path is so complicated that - * probably almost no one will ever really understand it, - * the potential for confusion is large. (It's not just - * this one function, but the whole scheme.) - * - *------------------------------------------------------------------------------*/ - static char *uprv_computeDirPath(const char *path, char *pathBuffer) - { - char *finalSlash; /* Ptr to last dir separator in input path, or null if none. */ - int32_t pathLen; /* Length of the returned directory path */ - - finalSlash = 0; - if (path != 0) { - finalSlash = uprv_strrchr(path, U_FILE_SEP_CHAR); - } - - *pathBuffer = 0; - if (finalSlash == 0) { - /* No user-supplied path. - * Copy the ICU_DATA path to the path buffer and return that*/ - const char *icuDataDir; - icuDataDir=u_getDataDirectory(); - if(icuDataDir!=nullptr && *icuDataDir!=0) { - return strcpy_returnEnd(pathBuffer, icuDataDir); - } else { - /* there is no icuDataDir either. Just return the empty pathBuffer. */ - return pathBuffer; - } - } - - /* User supplied path did contain a directory portion. - * Copy it to the output path buffer */ - pathLen = (int32_t)(finalSlash - path + 1); - uprv_memcpy(pathBuffer, path, pathLen); - *(pathBuffer+pathLen) = 0; - return pathBuffer+pathLen; - } - - -# define DATA_TYPE "dat" - - U_CFUNC UBool uprv_mapFile(UDataMemory *pData, const char *path, UErrorCode *status) { - const char *inBasename; - char *basename; - char pathBuffer[1024]; - const DataHeader *pHeader; - dllhandle *handle; - void *val=0; - - if (U_FAILURE(*status)) { - return false; - } - - inBasename=uprv_strrchr(path, U_FILE_SEP_CHAR); - if(inBasename==nullptr) { - inBasename = path; - } else { - inBasename++; - } - basename=uprv_computeDirPath(path, pathBuffer); - if(uprv_strcmp(inBasename, U_ICUDATA_NAME".dat") != 0) { - /* must mmap file... for build */ - int fd; - int length; - struct stat mystat; - void *data; - UDataMemory_init(pData); /* Clear the output struct. */ - - /* determine the length of the file */ - if(stat(path, &mystat)!=0 || mystat.st_size<=0) { - return false; - } - length=mystat.st_size; - - /* open the file */ - fd=open(path, O_RDONLY); - if(fd==-1) { - return false; - } - - /* get a view of the mapping */ - data=mmap(0, length, PROT_READ, MAP_PRIVATE, fd, 0); - close(fd); /* no longer needed */ - if(data==MAP_FAILED) { - // Possibly check the errorno value for ENOMEM, and report U_MEMORY_ALLOCATION_ERROR? - return false; - } - pData->map = (char *)data + length; - pData->pHeader=(const DataHeader *)data; - pData->mapAddr = data; - return true; - } - -# ifdef OS390BATCH - /* ### hack: we still need to get u_getDataDirectory() fixed - for OS/390 (batch mode - always return "//"? ) - and this here straightened out with LIB_PREFIX and LIB_SUFFIX (both empty?!) - This is probably due to the strange file system on OS/390. It's more like - a database with short entry names than a typical file system. */ - /* U_ICUDATA_NAME should always have the correct name */ - /* BUT FOR BATCH MODE IT IS AN EXCEPTION BECAUSE */ - /* THE FIRST THREE LETTERS ARE PREASSIGNED TO THE */ - /* PROJECT!!!!! */ - uprv_strcpy(pathBuffer, "IXMI" U_ICU_VERSION_SHORT "DA"); -# else - /* set up the library name */ - uprv_strcpy(basename, LIB_PREFIX U_LIBICUDATA_NAME U_ICU_VERSION_SHORT LIB_SUFFIX); -# endif - -# ifdef UDATA_DEBUG - fprintf(stderr, "dllload: %s ", pathBuffer); -# endif - - handle=dllload(pathBuffer); - -# ifdef UDATA_DEBUG - fprintf(stderr, " -> %08X\n", handle ); -# endif - - if(handle != nullptr) { - /* we have a data DLL - what kind of lookup do we need here? */ - /* try to find the Table of Contents */ - UDataMemory_init(pData); /* Clear the output struct. */ - val=dllqueryvar((dllhandle*)handle, U_ICUDATA_ENTRY_NAME); - if(val == 0) { - /* failed... so keep looking */ - return false; - } -# ifdef UDATA_DEBUG - fprintf(stderr, "dllqueryvar(%08X, %s) -> %08X\n", handle, U_ICUDATA_ENTRY_NAME, val); -# endif - - pData->pHeader=(const DataHeader *)val; - return true; - } else { - return false; /* no handle */ - } - } - - U_CFUNC void uprv_unmapFile(UDataMemory *pData) { - if(pData!=nullptr && pData->map!=nullptr) { - uprv_free(pData->map); - pData->map = nullptr; - pData->mapAddr = nullptr; - pData->pHeader = nullptr; - } - } - #else # error MAP_IMPLEMENTATION is set incorrectly #endif diff --git a/deps/icu-small/source/common/umapfile.h b/deps/icu-small/source/common/umapfile.h index 042e71374c1f59..bacd10e70d807b 100644 --- a/deps/icu-small/source/common/umapfile.h +++ b/deps/icu-small/source/common/umapfile.h @@ -37,19 +37,13 @@ U_CFUNC void uprv_unmapFile(UDataMemory *pData); #define MAP_WIN32 1 #define MAP_POSIX 2 #define MAP_STDIO 3 -#define MAP_390DLL 4 #if UCONFIG_NO_FILE_IO # define MAP_IMPLEMENTATION MAP_NONE #elif U_PLATFORM_USES_ONLY_WIN32_API # define MAP_IMPLEMENTATION MAP_WIN32 #elif U_HAVE_MMAP || U_PLATFORM == U_PF_OS390 -# if U_PLATFORM == U_PF_OS390 && defined (OS390_STUBDATA) - /* No memory mapping for 390 batch mode. Fake it using dll loading. */ -# define MAP_IMPLEMENTATION MAP_390DLL -# else -# define MAP_IMPLEMENTATION MAP_POSIX -# endif +# define MAP_IMPLEMENTATION MAP_POSIX #else /* unknown platform, no memory map implementation: use stdio.h and uprv_malloc() instead */ # define MAP_IMPLEMENTATION MAP_STDIO #endif diff --git a/deps/icu-small/source/common/umutablecptrie.cpp b/deps/icu-small/source/common/umutablecptrie.cpp index cdbe27080b491c..40ea57f1491928 100644 --- a/deps/icu-small/source/common/umutablecptrie.cpp +++ b/deps/icu-small/source/common/umutablecptrie.cpp @@ -45,10 +45,10 @@ constexpr uint8_t MIXED = 1; constexpr uint8_t SAME_AS = 2; /** Start with allocation of 16k data entries. */ -constexpr int32_t INITIAL_DATA_LENGTH = ((int32_t)1 << 14); +constexpr int32_t INITIAL_DATA_LENGTH = static_cast<int32_t>(1) << 14; /** Grow about 8x each time. */ -constexpr int32_t MEDIUM_DATA_LENGTH = ((int32_t)1 << 17); +constexpr int32_t MEDIUM_DATA_LENGTH = static_cast<int32_t>(1) << 17; /** * Maximum length of the build-time data array. @@ -135,8 +135,8 @@ MutableCodePointTrie::MutableCodePointTrie(uint32_t iniValue, uint32_t errValue, #endif { if (U_FAILURE(errorCode)) { return; } - index = (uint32_t *)uprv_malloc(BMP_I_LIMIT * 4); - data = (uint32_t *)uprv_malloc(INITIAL_DATA_LENGTH * 4); + index = static_cast<uint32_t*>(uprv_malloc(BMP_I_LIMIT * 4)); + data = static_cast<uint32_t*>(uprv_malloc(INITIAL_DATA_LENGTH * 4)); if (index == nullptr || data == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; return; @@ -157,8 +157,8 @@ MutableCodePointTrie::MutableCodePointTrie(const MutableCodePointTrie &other, UE { if (U_FAILURE(errorCode)) { return; } int32_t iCapacity = highStart <= BMP_LIMIT ? BMP_I_LIMIT : I_LIMIT; - index = (uint32_t *)uprv_malloc(iCapacity * 4); - data = (uint32_t *)uprv_malloc(other.dataCapacity * 4); + index = static_cast<uint32_t*>(uprv_malloc(iCapacity * 4)); + data = static_cast<uint32_t*>(uprv_malloc(other.dataCapacity * 4)); if (index == nullptr || data == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; return; @@ -268,7 +268,7 @@ void MutableCodePointTrie::clear() { } uint32_t MutableCodePointTrie::get(UChar32 c) const { - if ((uint32_t)c > MAX_UNICODE) { + if (static_cast<uint32_t>(c) > MAX_UNICODE) { return errorValue; } if (c >= highStart) { @@ -295,7 +295,7 @@ inline uint32_t maybeFilterValue(uint32_t value, uint32_t initialValue, uint32_t UChar32 MutableCodePointTrie::getRange( UChar32 start, UCPMapValueFilter *filter, const void *context, uint32_t *pValue) const { - if ((uint32_t)start > MAX_UNICODE) { + if (static_cast<uint32_t>(start) > MAX_UNICODE) { return U_SENTINEL; } if (start >= highStart) { @@ -387,7 +387,7 @@ bool MutableCodePointTrie::ensureHighStart(UChar32 c) { int32_t i = highStart >> UCPTRIE_SHIFT_3; int32_t iLimit = c >> UCPTRIE_SHIFT_3; if (iLimit > indexCapacity) { - uint32_t *newIndex = (uint32_t *)uprv_malloc(I_LIMIT * 4); + uint32_t* newIndex = static_cast<uint32_t*>(uprv_malloc(I_LIMIT * 4)); if (newIndex == nullptr) { return false; } uprv_memcpy(newIndex, index, i * 4); uprv_free(index); @@ -418,7 +418,7 @@ int32_t MutableCodePointTrie::allocDataBlock(int32_t blockLength) { // or the code writes more values than should be possible. return -1; } - uint32_t *newData = (uint32_t *)uprv_malloc(capacity * 4); + uint32_t* newData = static_cast<uint32_t*>(uprv_malloc(capacity * 4)); if (newData == nullptr) { return -1; } @@ -468,7 +468,7 @@ void MutableCodePointTrie::set(UChar32 c, uint32_t value, UErrorCode &errorCode) if (U_FAILURE(errorCode)) { return; } - if ((uint32_t)c > MAX_UNICODE) { + if (static_cast<uint32_t>(c) > MAX_UNICODE) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -495,7 +495,7 @@ void MutableCodePointTrie::setRange(UChar32 start, UChar32 end, uint32_t value, if (U_FAILURE(errorCode)) { return; } - if ((uint32_t)start > MAX_UNICODE || (uint32_t)end > MAX_UNICODE || start > end) { + if (static_cast<uint32_t>(start) > MAX_UNICODE || static_cast<uint32_t>(end) > MAX_UNICODE || start > end) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -792,7 +792,7 @@ class MixedBlocks { } if (newLength > capacity) { uprv_free(table); - table = (uint32_t *)uprv_malloc(newLength * 4); + table = static_cast<uint32_t*>(uprv_malloc(newLength * 4)); if (table == nullptr) { return false; } @@ -1207,8 +1207,8 @@ int32_t MutableCodePointTrie::compactIndex(int32_t fastILimit, MixedBlocks &mixe int32_t i3FirstNull = -1; for (int32_t i = 0, j = 0; i < fastILimit; ++j) { uint32_t i3 = index[i]; - fastIndex[j] = (uint16_t)i3; - if (i3 == (uint32_t)dataNullOffset) { + fastIndex[j] = static_cast<uint16_t>(i3); + if (i3 == static_cast<uint32_t>(dataNullOffset)) { if (i3FirstNull < 0) { i3FirstNull = j; } else if (index3NullOffset < 0 && @@ -1257,7 +1257,7 @@ int32_t MutableCodePointTrie::compactIndex(int32_t fastILimit, MixedBlocks &mixe do { uint32_t i3 = index[j]; oredI3 |= i3; - if (i3 != (uint32_t)dataNullOffset) { + if (i3 != static_cast<uint32_t>(dataNullOffset)) { isNull = false; } } while (++j < jLimit); @@ -1299,7 +1299,7 @@ int32_t MutableCodePointTrie::compactIndex(int32_t fastILimit, MixedBlocks &mixe // Index table: Fast index, index-1, index-3, index-2. // +1 for possible index table padding. int32_t index16Capacity = fastIndexLength + index1Length + index3Capacity + index2Capacity + 1; - index16 = (uint16_t *)uprv_malloc(index16Capacity * 2); + index16 = static_cast<uint16_t*>(uprv_malloc(index16Capacity * 2)); if (index16 == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; return 0; @@ -1531,7 +1531,7 @@ int32_t MutableCodePointTrie::compactTrie(int32_t fastILimit, UErrorCode &errorC errorCode = U_MEMORY_ALLOCATION_ERROR; return 0; } - uint32_t *newData = (uint32_t *)uprv_malloc(newDataCapacity * 4); + uint32_t* newData = static_cast<uint32_t*>(uprv_malloc(newDataCapacity * 4)); if (newData == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; return 0; @@ -1654,7 +1654,7 @@ UCPTrie *MutableCodePointTrie::build(UCPTrieType type, UCPTrieValueWidth valueWi length += sizeof(UCPTrie); U_ASSERT((length & 3) == 0); - uint8_t *bytes = (uint8_t *)uprv_malloc(length); + uint8_t* bytes = static_cast<uint8_t*>(uprv_malloc(length)); if (bytes == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; clear(); @@ -1679,13 +1679,13 @@ UCPTrie *MutableCodePointTrie::build(UCPTrieType type, UCPTrieValueWidth valueWi bytes += sizeof(UCPTrie); // Fill the index and data arrays. - uint16_t *dest16 = (uint16_t *)bytes; + uint16_t* dest16 = reinterpret_cast<uint16_t*>(bytes); trie->index = dest16; if (highStart <= fastLimit) { // Condense only the fast index from the mutable-trie index. for (int32_t i = 0, j = 0; j < indexLength; i += SMALL_DATA_BLOCKS_PER_BMP_BLOCK, ++j) { - *dest16++ = (uint16_t)index[i]; // dest16[j] + *dest16++ = static_cast<uint16_t>(index[i]); // dest16[j] } } else { uprv_memcpy(dest16, index16, indexLength * 2); @@ -1700,19 +1700,19 @@ UCPTrie *MutableCodePointTrie::build(UCPTrieType type, UCPTrieValueWidth valueWi // Write 16-bit data values. trie->data.ptr16 = dest16; for (int32_t i = dataLength; i > 0; --i) { - *dest16++ = (uint16_t)*p++; + *dest16++ = static_cast<uint16_t>(*p++); } break; case UCPTRIE_VALUE_BITS_32: // Write 32-bit data values. - trie->data.ptr32 = (uint32_t *)bytes; + trie->data.ptr32 = reinterpret_cast<uint32_t*>(bytes); uprv_memcpy(bytes, p, (size_t)dataLength * 4); break; case UCPTRIE_VALUE_BITS_8: // Write 8-bit data values. trie->data.ptr8 = bytes; for (int32_t i = dataLength; i > 0; --i) { - *bytes++ = (uint8_t)*p++; + *bytes++ = static_cast<uint8_t>(*p++); } break; default: diff --git a/deps/icu-small/source/common/unames.cpp b/deps/icu-small/source/common/unames.cpp index 1b3192bf25ef0d..71b2baff6c190c 100644 --- a/deps/icu-small/source/common/unames.cpp +++ b/deps/icu-small/source/common/unames.cpp @@ -180,7 +180,7 @@ static UBool U_CALLCONV isAcceptable(void * /*context*/, const char * /*type*/, const char * /*name*/, const UDataInfo *pInfo) { - return (UBool)( + return pInfo->size>=20 && pInfo->isBigEndian==U_IS_BIG_ENDIAN && pInfo->charsetFamily==U_CHARSET_FAMILY && @@ -188,7 +188,7 @@ isAcceptable(void * /*context*/, pInfo->dataFormat[1]==0x6e && pInfo->dataFormat[2]==0x61 && pInfo->dataFormat[3]==0x6d && - pInfo->formatVersion[0]==1); + pInfo->formatVersion[0]==1; } static void U_CALLCONV @@ -238,9 +238,9 @@ static uint16_t expandName(UCharNames *names, const uint8_t *name, uint16_t nameLength, UCharNameChoice nameChoice, char *buffer, uint16_t bufferLength) { - uint16_t *tokens=(uint16_t *)names+8; + uint16_t* tokens = reinterpret_cast<uint16_t*>(names) + 8; uint16_t token, tokenCount=*tokens++, bufferPos=0; - uint8_t *tokenStrings=(uint8_t *)names+names->tokenStringOffset; + uint8_t* tokenStrings = reinterpret_cast<uint8_t*>(names) + names->tokenStringOffset; uint8_t c; if(nameChoice!=U_UNICODE_CHAR_NAME && nameChoice!=U_EXTENDED_CHAR_NAME) { @@ -248,7 +248,7 @@ expandName(UCharNames *names, * skip the modern name if it is not requested _and_ * if the semicolon byte value is a character, not a token number */ - if((uint8_t)';'>=tokenCount || tokens[(uint8_t)';']==(uint16_t)(-1)) { + if (static_cast<uint8_t>(';') >= tokenCount || tokens[static_cast<uint8_t>(';')] == static_cast<uint16_t>(-1)) { int fieldIndex= nameChoice==U_ISO_COMMENT ? 2 : nameChoice; do { while(nameLength>0) { @@ -283,12 +283,12 @@ expandName(UCharNames *names, } } else { token=tokens[c]; - if(token==(uint16_t)(-2)) { + if (token == static_cast<uint16_t>(-2)) { /* this is a lead byte for a double-byte token */ token=tokens[c<<8|*name++]; --nameLength; } - if(token==(uint16_t)(-1)) { + if (token == static_cast<uint16_t>(-1)) { if(c!=';') { /* explicit letter */ WRITE_CHAR(buffer, bufferLength, bufferPos, c); @@ -297,7 +297,7 @@ expandName(UCharNames *names, extended names and there was no 2.0 name but there is a 1.0 name. */ if(!bufferPos && nameChoice == U_EXTENDED_CHAR_NAME) { - if ((uint8_t)';'>=tokenCount || tokens[(uint8_t)';']==(uint16_t)(-1)) { + if (static_cast<uint8_t>(';') >= tokenCount || tokens[static_cast<uint8_t>(';')] == static_cast<uint16_t>(-1)) { continue; } } @@ -331,9 +331,9 @@ static UBool compareName(UCharNames *names, const uint8_t *name, uint16_t nameLength, UCharNameChoice nameChoice, const char *otherName) { - uint16_t *tokens=(uint16_t *)names+8; + uint16_t* tokens = reinterpret_cast<uint16_t*>(names) + 8; uint16_t token, tokenCount=*tokens++; - uint8_t *tokenStrings=(uint8_t *)names+names->tokenStringOffset; + uint8_t* tokenStrings = reinterpret_cast<uint8_t*>(names) + names->tokenStringOffset; uint8_t c; const char *origOtherName = otherName; @@ -342,7 +342,7 @@ compareName(UCharNames *names, * skip the modern name if it is not requested _and_ * if the semicolon byte value is a character, not a token number */ - if((uint8_t)';'>=tokenCount || tokens[(uint8_t)';']==(uint16_t)(-1)) { + if (static_cast<uint8_t>(';') >= tokenCount || tokens[static_cast<uint8_t>(';')] == static_cast<uint16_t>(-1)) { int fieldIndex= nameChoice==U_ISO_COMMENT ? 2 : nameChoice; do { while(nameLength>0) { @@ -370,7 +370,7 @@ compareName(UCharNames *names, if(c>=tokenCount) { if(c!=';') { /* implicit letter */ - if((char)c!=*otherName++) { + if (static_cast<char>(c) != *otherName++) { return false; } } else { @@ -379,15 +379,15 @@ compareName(UCharNames *names, } } else { token=tokens[c]; - if(token==(uint16_t)(-2)) { + if (token == static_cast<uint16_t>(-2)) { /* this is a lead byte for a double-byte token */ token=tokens[c<<8|*name++]; --nameLength; } - if(token==(uint16_t)(-1)) { + if (token == static_cast<uint16_t>(-1)) { if(c!=';') { /* explicit letter */ - if((char)c!=*otherName++) { + if (static_cast<char>(c) != *otherName++) { return false; } } else { @@ -395,7 +395,7 @@ compareName(UCharNames *names, extended names and there was no 2.0 name but there is a 1.0 name. */ if(otherName == origOtherName && nameChoice == U_EXTENDED_CHAR_NAME) { - if ((uint8_t)';'>=tokenCount || tokens[(uint8_t)';']==(uint16_t)(-1)) { + if (static_cast<uint8_t>(';') >= tokenCount || tokens[static_cast<uint8_t>(';')] == static_cast<uint16_t>(-1)) { continue; } } @@ -406,7 +406,7 @@ compareName(UCharNames *names, /* write token word */ uint8_t *tokenString=tokenStrings+token; while((c=*tokenString++)!=0) { - if((char)c!=*otherName++) { + if (static_cast<char>(c) != *otherName++) { return false; } } @@ -415,7 +415,7 @@ compareName(UCharNames *names, } /* complete match? */ - return (UBool)(*otherName==0); + return *otherName == 0; } static uint8_t getCharCat(UChar32 cp) { @@ -462,7 +462,7 @@ static uint16_t getExtName(uint32_t code, char *buffer, uint16_t bufferLength) { if (ndigits < 4) ndigits = 4; for (cp = code, i = ndigits; (cp || i > 0) && bufferLength; cp >>= 4, bufferLength--) { - uint8_t v = (uint8_t)(cp & 0xf); + uint8_t v = static_cast<uint8_t>(cp & 0xf); buffer[--i] = (v < 10 ? '0' + v : 'A' + v - 10); } buffer += ndigits; @@ -482,14 +482,14 @@ static uint16_t getExtName(uint32_t code, char *buffer, uint16_t bufferLength) { static const uint16_t * getGroup(UCharNames *names, uint32_t code) { const uint16_t *groups=GET_GROUPS(names); - uint16_t groupMSB=(uint16_t)(code>>GROUP_SHIFT), + uint16_t groupMSB = static_cast<uint16_t>(code >> GROUP_SHIFT), start=0, limit=*groups++, number; /* binary search for the group of names that contains the one for code */ while(start<limit-1) { - number=(uint16_t)((start+limit)/2); + number = static_cast<uint16_t>((start + limit) / 2); if(groupMSB<groups[number*GROUP_LENGTH+GROUP_MSB]) { limit=number; } else { @@ -525,14 +525,14 @@ expandGroupLengths(const uint8_t *s, /* read even nibble - MSBs of lengthByte */ if(length>=12) { /* double-nibble length spread across two bytes */ - length=(uint16_t)(((length&0x3)<<4|lengthByte>>4)+12); + length = static_cast<uint16_t>(((length & 0x3) << 4 | lengthByte >> 4) + 12); lengthByte&=0xf; } else if((lengthByte /* &0xf0 */)>=0xc0) { /* double-nibble length spread across this one byte */ - length=(uint16_t)((lengthByte&0x3f)+12); + length = static_cast<uint16_t>((lengthByte & 0x3f) + 12); } else { /* single-nibble length in MSBs */ - length=(uint16_t)(lengthByte>>4); + length = static_cast<uint16_t>(lengthByte >> 4); lengthByte&=0xf; } @@ -568,7 +568,7 @@ expandGroupName(UCharNames *names, const uint16_t *group, uint16_t lineNumber, UCharNameChoice nameChoice, char *buffer, uint16_t bufferLength) { uint16_t offsets[LINES_PER_GROUP+2], lengths[LINES_PER_GROUP+2]; - const uint8_t *s=(uint8_t *)names+names->groupStringOffset+GET_GROUP_OFFSET(group); + const uint8_t* s = reinterpret_cast<uint8_t*>(names) + names->groupStringOffset + GET_GROUP_OFFSET(group); s=expandGroupLengths(s, offsets, lengths); return expandName(names, s+offsets[lineNumber], lengths[lineNumber], nameChoice, buffer, bufferLength); @@ -578,8 +578,8 @@ static uint16_t getName(UCharNames *names, uint32_t code, UCharNameChoice nameChoice, char *buffer, uint16_t bufferLength) { const uint16_t *group=getGroup(names, code); - if((uint16_t)(code>>GROUP_SHIFT)==group[GROUP_MSB]) { - return expandGroupName(names, group, (uint16_t)(code&GROUP_MASK), nameChoice, + if (static_cast<uint16_t>(code >> GROUP_SHIFT) == group[GROUP_MSB]) { + return expandGroupName(names, group, static_cast<uint16_t>(code & GROUP_MASK), nameChoice, buffer, bufferLength); } else { /* group not found */ @@ -601,7 +601,7 @@ enumGroupNames(UCharNames *names, const uint16_t *group, UEnumCharNamesFn *fn, void *context, UCharNameChoice nameChoice) { uint16_t offsets[LINES_PER_GROUP+2], lengths[LINES_PER_GROUP+2]; - const uint8_t *s=(uint8_t *)names+names->groupStringOffset+GET_GROUP_OFFSET(group); + const uint8_t* s = reinterpret_cast<uint8_t*>(names) + names->groupStringOffset + GET_GROUP_OFFSET(group); s=expandGroupLengths(s, offsets, lengths); if(fn!=DO_FIND_NAME) { @@ -622,10 +622,10 @@ enumGroupNames(UCharNames *names, const uint16_t *group, ++start; } } else { - const char *otherName=((FindName *)context)->otherName; + const char* otherName = static_cast<FindName*>(context)->otherName; while(start<=end) { if(compareName(names, s+offsets[start&GROUP_MASK], lengths[start&GROUP_MASK], nameChoice, otherName)) { - ((FindName *)context)->code=start; + static_cast<FindName*>(context)->code = start; return false; } ++start; @@ -671,15 +671,15 @@ enumNames(UCharNames *names, uint16_t startGroupMSB, endGroupMSB, groupCount; const uint16_t *group, *groupLimit; - startGroupMSB=(uint16_t)(start>>GROUP_SHIFT); - endGroupMSB=(uint16_t)((limit-1)>>GROUP_SHIFT); + startGroupMSB = static_cast<uint16_t>(start >> GROUP_SHIFT); + endGroupMSB = static_cast<uint16_t>((limit - 1) >> GROUP_SHIFT); /* find the group that contains start, or the highest before it */ group=getGroup(names, start); if(startGroupMSB<group[GROUP_MSB] && nameChoice==U_EXTENDED_CHAR_NAME) { /* enumerate synthetic names between start and the group start */ - UChar32 extLimit=((UChar32)group[GROUP_MSB]<<GROUP_SHIFT); + UChar32 extLimit = static_cast<UChar32>(group[GROUP_MSB]) << GROUP_SHIFT; if(extLimit>limit) { extLimit=limit; } @@ -703,7 +703,7 @@ enumNames(UCharNames *names, /* enumerate characters in the partial start group */ if((start&GROUP_MASK)!=0) { if(!enumGroupNames(names, group, - start, ((UChar32)startGroupMSB<<GROUP_SHIFT)+LINES_PER_GROUP-1, + start, (static_cast<UChar32>(startGroupMSB) << GROUP_SHIFT) + LINES_PER_GROUP - 1, fn, context, nameChoice)) { return false; } @@ -727,7 +727,7 @@ enumNames(UCharNames *names, /* enumerate entire groups between the start- and end-groups */ while(group<groupLimit && group[GROUP_MSB]<endGroupMSB) { const uint16_t *nextGroup; - start=(UChar32)group[GROUP_MSB]<<GROUP_SHIFT; + start = static_cast<UChar32>(group[GROUP_MSB]) << GROUP_SHIFT; if(!enumGroupNames(names, group, start, start+LINES_PER_GROUP-1, fn, context, nameChoice)) { return false; } @@ -790,14 +790,14 @@ writeFactorSuffix(const uint16_t *factors, uint16_t count, --count; for(i=count; i>0; --i) { factor=factors[i]; - indexes[i]=(uint16_t)(code%factor); + indexes[i] = static_cast<uint16_t>(code % factor); code/=factor; } /* * we don't need to calculate the last modulus because start<=code<=end * guarantees here that code<=factors[0] */ - indexes[0]=(uint16_t)code; + indexes[0] = static_cast<uint16_t>(code); /* write each element */ for(;;) { @@ -826,7 +826,7 @@ writeFactorSuffix(const uint16_t *factors, uint16_t count, } /* skip the rest of the strings for this factors[i] */ - factor=(uint16_t)(factors[i]-indexes[i]-1); + factor = static_cast<uint16_t>(factors[i] - indexes[i] - 1); while(factor>0) { while(*s++!=0) {} --factor; @@ -865,7 +865,7 @@ getAlgName(AlgorithmicRange *range, uint32_t code, UCharNameChoice nameChoice, switch(range->type) { case 0: { /* name = prefix hex-digits */ - const char *s=(const char *)(range+1); + const char* s = reinterpret_cast<const char*>(range + 1); char c; uint16_t i, count; @@ -885,7 +885,7 @@ getAlgName(AlgorithmicRange *range, uint32_t code, UCharNameChoice nameChoice, for(i=count; i>0;) { if(--i<bufferLength) { - c=(char)(code&0xf); + c = static_cast<char>(code & 0xf); if(c<10) { c+='0'; } else { @@ -902,9 +902,9 @@ getAlgName(AlgorithmicRange *range, uint32_t code, UCharNameChoice nameChoice, case 1: { /* name = prefix factorized-elements */ uint16_t indexes[8]; - const uint16_t *factors=(const uint16_t *)(range+1); + const uint16_t* factors = reinterpret_cast<const uint16_t*>(range + 1); uint16_t count=range->variant; - const char *s=(const char *)(factors+count); + const char* s = reinterpret_cast<const char*>(factors + count); char c; /* copy prefix */ @@ -950,7 +950,7 @@ enumAlgNames(AlgorithmicRange *range, char c; /* get the full name of the start character */ - length=getAlgName(range, (uint32_t)start, nameChoice, buffer, sizeof(buffer)); + length = getAlgName(range, static_cast<uint32_t>(start), nameChoice, buffer, sizeof(buffer)); if(length<=0) { return true; } @@ -973,7 +973,7 @@ enumAlgNames(AlgorithmicRange *range, for (;;) { c=*--s; if(('0'<=c && c<'9') || ('A'<=c && c<'F')) { - *s=(char)(c+1); + *s = static_cast<char>(c + 1); break; } else if(c=='9') { *s='A'; @@ -992,9 +992,9 @@ enumAlgNames(AlgorithmicRange *range, case 1: { uint16_t indexes[8]; const char *elementBases[8], *elements[8]; - const uint16_t *factors=(const uint16_t *)(range+1); + const uint16_t* factors = reinterpret_cast<const uint16_t*>(range + 1); uint16_t count=range->variant; - const char *s=(const char *)(factors+count); + const char* s = reinterpret_cast<const char*>(factors + count); char *suffix, *t; uint16_t prefixLength, i, idx; @@ -1011,10 +1011,10 @@ enumAlgNames(AlgorithmicRange *range, } /* append the suffix of the start character */ - length=(uint16_t)(prefixLength+writeFactorSuffix(factors, count, - s, (uint32_t)start-range->start, + length = static_cast<uint16_t>(prefixLength + writeFactorSuffix(factors, count, + s, static_cast<uint32_t>(start) - range->start, indexes, elementBases, elements, - suffix, (uint16_t)(sizeof(buffer)-prefixLength))); + suffix, static_cast<uint16_t>(sizeof(buffer) - prefixLength))); /* call the enumerator function with this first character */ if(!fn(context, start, nameChoice, buffer, length)) { @@ -1026,7 +1026,7 @@ enumAlgNames(AlgorithmicRange *range, /* increment the indexes in lexical order bound by the factors */ i=count; for (;;) { - idx=(uint16_t)(indexes[--i]+1); + idx = static_cast<uint16_t>(indexes[--i] + 1); if(idx<factors[i]) { /* skip one index and its element string */ indexes[i]=idx; @@ -1085,14 +1085,14 @@ findAlgName(AlgorithmicRange *range, UCharNameChoice nameChoice, const char *oth switch(range->type) { case 0: { /* name = prefix hex-digits */ - const char *s=(const char *)(range+1); + const char* s = reinterpret_cast<const char*>(range + 1); char c; uint16_t i, count; /* compare prefix */ while((c=*s++)!=0) { - if((char)c!=*otherName++) { + if (c != *otherName++) { return 0xffff; } } @@ -1112,7 +1112,7 @@ findAlgName(AlgorithmicRange *range, UCharNameChoice nameChoice, const char *oth } /* does it fit into the range? */ - if(*otherName==0 && range->start<=(uint32_t)code && (uint32_t)code<=range->end) { + if (*otherName == 0 && range->start <= static_cast<uint32_t>(code) && static_cast<uint32_t>(code) <= range->end) { return code; } break; @@ -1121,9 +1121,9 @@ findAlgName(AlgorithmicRange *range, UCharNameChoice nameChoice, const char *oth char buffer[64]; uint16_t indexes[8]; const char *elementBases[8], *elements[8]; - const uint16_t *factors=(const uint16_t *)(range+1); + const uint16_t* factors = reinterpret_cast<const uint16_t*>(range + 1); uint16_t count=range->variant; - const char *s=(const char *)(factors+count), *t; + const char *s = reinterpret_cast<const char*>(factors + count), *t; UChar32 start, limit; uint16_t i, idx; @@ -1133,13 +1133,13 @@ findAlgName(AlgorithmicRange *range, UCharNameChoice nameChoice, const char *oth /* compare prefix */ while((c=*s++)!=0) { - if((char)c!=*otherName++) { + if (c != *otherName++) { return 0xffff; } } - start=(UChar32)range->start; - limit=(UChar32)(range->end+1); + start = static_cast<UChar32>(range->start); + limit = static_cast<UChar32>(range->end + 1); /* initialize the suffix elements for enumeration; indexes should all be set to 0 */ writeFactorSuffix(factors, count, s, 0, @@ -1155,7 +1155,7 @@ findAlgName(AlgorithmicRange *range, UCharNameChoice nameChoice, const char *oth /* increment the indexes in lexical order bound by the factors */ i=count; for (;;) { - idx=(uint16_t)(indexes[--i]+1); + idx = static_cast<uint16_t>(indexes[--i] + 1); if(idx<factors[i]) { /* skip one index and its element string */ indexes[i]=idx; @@ -1220,27 +1220,27 @@ calcAlgNameSetsLengths(int32_t maxNameLength) { int32_t length; /* enumerate algorithmic ranges */ - p=(uint32_t *)((uint8_t *)uCharNames+uCharNames->algNamesOffset); + p = reinterpret_cast<uint32_t*>(reinterpret_cast<uint8_t*>(uCharNames) + uCharNames->algNamesOffset); rangeCount=*p; - range=(AlgorithmicRange *)(p+1); + range = reinterpret_cast<AlgorithmicRange*>(p + 1); while(rangeCount>0) { switch(range->type) { case 0: /* name = prefix + (range->variant times) hex-digits */ /* prefix */ - length=calcStringSetLength(gNameSet, (const char *)(range+1))+range->variant; + length = calcStringSetLength(gNameSet, reinterpret_cast<const char*>(range + 1)) + range->variant; if(length>maxNameLength) { maxNameLength=length; } break; case 1: { /* name = prefix factorized-elements */ - const uint16_t *factors=(const uint16_t *)(range+1); + const uint16_t* factors = reinterpret_cast<const uint16_t*>(range + 1); const char *s; int32_t i, count=range->variant, factor, factorLength, maxFactorLength; /* prefix length */ - s=(const char *)(factors+count); + s = reinterpret_cast<const char*>(factors + count); length=calcStringSetLength(gNameSet, s); s+=length+1; /* start of factor suffixes */ @@ -1267,7 +1267,7 @@ calcAlgNameSetsLengths(int32_t maxNameLength) { break; } - range=(AlgorithmicRange *)((uint8_t *)range+range->size); + range = reinterpret_cast<AlgorithmicRange*>(reinterpret_cast<uint8_t*>(range) + range->size); --rangeCount; } return maxNameLength; @@ -1301,19 +1301,19 @@ calcNameSetLength(const uint16_t *tokens, uint16_t tokenCount, const uint8_t *to int32_t length=0, tokenLength; uint16_t c, token; - while(line!=lineLimit && (c=*line++)!=(uint8_t)';') { + while (line != lineLimit && (c = *line++) != static_cast<uint8_t>(';')) { if(c>=tokenCount) { /* implicit letter */ SET_ADD(set, c); ++length; } else { token=tokens[c]; - if(token==(uint16_t)(-2)) { + if (token == static_cast<uint16_t>(-2)) { /* this is a lead byte for a double-byte token */ c=c<<8|*line++; token=tokens[c]; } - if(token==(uint16_t)(-1)) { + if (token == static_cast<uint16_t>(-1)) { /* explicit letter */ SET_ADD(set, c); ++length; @@ -1323,11 +1323,11 @@ calcNameSetLength(const uint16_t *tokens, uint16_t tokenCount, const uint8_t *to /* use cached token length */ tokenLength=tokenLengths[c]; if(tokenLength==0) { - tokenLength=calcStringSetLength(set, (const char *)tokenStrings+token); - tokenLengths[c]=(int8_t)tokenLength; + tokenLength = calcStringSetLength(set, reinterpret_cast<const char*>(tokenStrings) + token); + tokenLengths[c] = static_cast<int8_t>(tokenLength); } } else { - tokenLength=calcStringSetLength(set, (const char *)tokenStrings+token); + tokenLength = calcStringSetLength(set, reinterpret_cast<const char*>(tokenStrings) + token); } length+=tokenLength; } @@ -1342,9 +1342,9 @@ static void calcGroupNameSetsLengths(int32_t maxNameLength) { uint16_t offsets[LINES_PER_GROUP+2], lengths[LINES_PER_GROUP+2]; - uint16_t *tokens=(uint16_t *)uCharNames+8; + uint16_t* tokens = reinterpret_cast<uint16_t*>(uCharNames) + 8; uint16_t tokenCount=*tokens++; - uint8_t *tokenStrings=(uint8_t *)uCharNames+uCharNames->tokenStringOffset; + uint8_t* tokenStrings = reinterpret_cast<uint8_t*>(uCharNames) + uCharNames->tokenStringOffset; int8_t *tokenLengths; @@ -1353,7 +1353,7 @@ calcGroupNameSetsLengths(int32_t maxNameLength) { int32_t groupCount, lineNumber, length; - tokenLengths=(int8_t *)uprv_malloc(tokenCount); + tokenLengths = static_cast<int8_t*>(uprv_malloc(tokenCount)); if(tokenLengths!=nullptr) { uprv_memset(tokenLengths, 0, tokenCount); } @@ -1363,7 +1363,7 @@ calcGroupNameSetsLengths(int32_t maxNameLength) { /* enumerate all groups */ while(groupCount>0) { - s=(uint8_t *)uCharNames+uCharNames->groupStringOffset+GET_GROUP_OFFSET(group); + s = reinterpret_cast<uint8_t*>(uCharNames) + uCharNames->groupStringOffset + GET_GROUP_OFFSET(group); s=expandGroupLengths(s, offsets, lengths); /* enumerate all lines in each group */ @@ -1424,7 +1424,7 @@ calcNameSetsLengths(UErrorCode *pErrorCode) { } /* set hex digits, used in various names, and <>-, used in extended names */ - for(i=0; i<(int32_t)sizeof(extChars)-1; ++i) { + for (i = 0; i < static_cast<int32_t>(sizeof(extChars)) - 1; ++i) { SET_ADD(gNameSet, extChars[i]); } @@ -1732,7 +1732,7 @@ charSetToUSet(uint32_t cset[8], const USetAdder *sa) { length=0; for(i=0; i<256; ++i) { if(SET_CONTAINS(cset, i)) { - cs[length++]=(char)i; + cs[length++] = static_cast<char>(i); } } @@ -1785,7 +1785,7 @@ makeTokenMap(const UDataSwapper *ds, if(ds->inCharset==ds->outCharset) { /* Same charset family: identity permutation */ for(i=0; i<256; ++i) { - map[i]=(uint8_t)i; + map[i] = static_cast<uint8_t>(i); } } else { uprv_memset(map, 0, 256); @@ -1799,7 +1799,7 @@ makeTokenMap(const UDataSwapper *ds, for(i=1; i<tokenCount; ++i) { if(tokens[i]==-1) { /* convert the direct byte character */ - c1=(uint8_t)i; + c1 = static_cast<uint8_t>(i); ds->swapInvChars(ds, &c1, 1, &c2, pErrorCode); if(U_FAILURE(*pErrorCode)) { udata_printError(ds, "unames/makeTokenMap() finds variant character 0x%02x used (input charset family %d)\n", @@ -1821,7 +1821,7 @@ makeTokenMap(const UDataSwapper *ds, while(usedOutChar[j]) { ++j; } - map[i]=(uint8_t)j++; + map[i] = static_cast<uint8_t>(j++); } } diff --git a/deps/icu-small/source/common/unicode/brkiter.h b/deps/icu-small/source/common/unicode/brkiter.h index bd96629285bcd4..30c59c4a94ace1 100644 --- a/deps/icu-small/source/common/unicode/brkiter.h +++ b/deps/icu-small/source/common/unicode/brkiter.h @@ -219,7 +219,7 @@ class U_COMMON_API BreakIterator : public UObject { * boundaries have been returned. * @stable ICU 2.0 */ - DONE = (int32_t)-1 + DONE = static_cast<int32_t>(-1) }; /** diff --git a/deps/icu-small/source/common/unicode/bytestream.h b/deps/icu-small/source/common/unicode/bytestream.h index 997746e428040f..bea41461bc6473 100644 --- a/deps/icu-small/source/common/unicode/bytestream.h +++ b/deps/icu-small/source/common/unicode/bytestream.h @@ -281,7 +281,7 @@ class StringByteSink : public ByteSink { */ StringByteSink(StringClass* dest, int32_t initialAppendCapacity) : dest_(dest) { if (initialAppendCapacity > 0 && - (uint32_t)initialAppendCapacity > (dest->capacity() - dest->length())) { + static_cast<uint32_t>(initialAppendCapacity) > dest->capacity() - dest->length()) { dest->reserve(dest->length() + initialAppendCapacity); } } diff --git a/deps/icu-small/source/common/unicode/bytestrie.h b/deps/icu-small/source/common/unicode/bytestrie.h index 1719a6bb83edc9..c07dfada941ec2 100644 --- a/deps/icu-small/source/common/unicode/bytestrie.h +++ b/deps/icu-small/source/common/unicode/bytestrie.h @@ -109,7 +109,7 @@ class U_COMMON_API BytesTrie : public UMemory { */ uint64_t getState64() const { return (static_cast<uint64_t>(remainingMatchLength_ + 2) << kState64RemainingShift) | - (uint64_t)(pos_ - bytes_); + static_cast<uint64_t>(pos_ - bytes_); } /** @@ -439,7 +439,7 @@ class U_COMMON_API BytesTrie : public UMemory { } static inline UStringTrieResult valueResult(int32_t node) { - return (UStringTrieResult)(USTRINGTRIE_INTERMEDIATE_VALUE-(node&kValueIsFinal)); + return static_cast<UStringTrieResult>(USTRINGTRIE_INTERMEDIATE_VALUE - (node & kValueIsFinal)); } // Handles a branch node for both next(byte) and next(string). diff --git a/deps/icu-small/source/common/unicode/char16ptr.h b/deps/icu-small/source/common/unicode/char16ptr.h index de8182c7ada4c5..daf35cd43ba2d6 100644 --- a/deps/icu-small/source/common/unicode/char16ptr.h +++ b/deps/icu-small/source/common/unicode/char16ptr.h @@ -12,6 +12,7 @@ #if U_SHOW_CPLUSPLUS_API #include <cstddef> +#include <string_view> /** * \file @@ -306,6 +307,76 @@ inline OldUChar *toOldUCharPtr(char16_t *p) { return reinterpret_cast<OldUChar *>(p); } +#ifndef U_FORCE_HIDE_INTERNAL_API +/** + * Is T convertible to a std::u16string_view or some other 16-bit string view? + * @internal + */ +template<typename T> +constexpr bool ConvertibleToU16StringView = + std::is_convertible_v<T, std::u16string_view> +#if !U_CHAR16_IS_TYPEDEF && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 180000) + || std::is_convertible_v<T, std::basic_string_view<uint16_t>> +#endif +#if U_SIZEOF_WCHAR_T==2 + || std::is_convertible_v<T, std::wstring_view> +#endif + ; + +namespace internal { +/** + * Pass-through overload. + * @internal + */ +inline std::u16string_view toU16StringView(std::u16string_view sv) { return sv; } + +#if !U_CHAR16_IS_TYPEDEF && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 180000) +/** + * Basically undefined behavior but sometimes necessary conversion + * from std::basic_string_view<uint16_t> to std::u16string_view. + * @internal + */ +inline std::u16string_view toU16StringView(std::basic_string_view<uint16_t> sv) { + return { ConstChar16Ptr(sv.data()), sv.length() }; +} +#endif + +#if U_SIZEOF_WCHAR_T==2 +/** + * Basically undefined behavior but sometimes necessary conversion + * from std::wstring_view to std::u16string_view. + * @internal + */ +inline std::u16string_view toU16StringView(std::wstring_view sv) { + return { ConstChar16Ptr(sv.data()), sv.length() }; +} +#endif + +/** + * Pass-through overload. + * @internal + */ +template <typename T, + typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>> +inline std::u16string_view toU16StringViewNullable(const T& text) { + return toU16StringView(text); +} + +/** + * In case of nullptr, return an empty view. + * @internal + */ +template <typename T, + typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>, + typename = void> +inline std::u16string_view toU16StringViewNullable(const T& text) { + if (text == nullptr) return {}; // For backward compatibility. + return toU16StringView(text); +} + +} // internal +#endif // U_FORCE_HIDE_INTERNAL_API + U_NAMESPACE_END #endif /* U_SHOW_CPLUSPLUS_API */ diff --git a/deps/icu-small/source/common/unicode/docmain.h b/deps/icu-small/source/common/unicode/docmain.h index fa4dbbc052237c..676e868e7c44c3 100644 --- a/deps/icu-small/source/common/unicode/docmain.h +++ b/deps/icu-small/source/common/unicode/docmain.h @@ -138,6 +138,11 @@ * <td>icu::DateFormat</td> * </tr> * <tr> + * <td>Relative Date and Time Formatting</td> + * <td>ureldatefmt.h</td> + * <td>icu::RelativeDateTimeFormatter</td> + * </tr> + * <tr> * <td>Message Formatting</td> * <td>umsg.h</td> * <td>icu::MessageFormat</td> diff --git a/deps/icu-small/source/common/unicode/edits.h b/deps/icu-small/source/common/unicode/edits.h index dda9d3ca759cad..bc3c9438222dff 100644 --- a/deps/icu-small/source/common/unicode/edits.h +++ b/deps/icu-small/source/common/unicode/edits.h @@ -508,7 +508,7 @@ class U_COMMON_API Edits final : public UMemory { Edits ©Array(const Edits &other); Edits &moveArray(Edits &src) noexcept; - void setLastUnit(int32_t last) { array[length - 1] = (uint16_t)last; } + void setLastUnit(int32_t last) { array[length - 1] = static_cast<uint16_t>(last); } int32_t lastUnit() const { return length > 0 ? array[length - 1] : 0xffff; } void append(int32_t r); diff --git a/deps/icu-small/source/common/unicode/idna.h b/deps/icu-small/source/common/unicode/idna.h index 1c57205bae2ef4..1e36fa771f06cc 100644 --- a/deps/icu-small/source/common/unicode/idna.h +++ b/deps/icu-small/source/common/unicode/idna.h @@ -70,6 +70,7 @@ class U_COMMON_API IDNA : public UObject { * The worker functions use transitional processing, including deviation mappings, * unless UIDNA_NONTRANSITIONAL_TO_ASCII or UIDNA_NONTRANSITIONAL_TO_UNICODE * is used in which case the deviation characters are passed through without change. + * <b>Unicode 15.1 UTS #46 deprecated transitional processing.</b> * * Disallowed characters are mapped to U+FFFD. * @@ -82,6 +83,8 @@ class U_COMMON_API IDNA : public UObject { * letters, digits, hyphen (LDH) and dot/full stop are disallowed and mapped to U+FFFD. * * @param options Bit set to modify the processing and error checking. + * These should include UIDNA_DEFAULT, or + * UIDNA_NONTRANSITIONAL_TO_ASCII | UIDNA_NONTRANSITIONAL_TO_UNICODE. * See option bit set values in uidna.h. * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns diff --git a/deps/icu-small/source/common/unicode/locid.h b/deps/icu-small/source/common/unicode/locid.h index 60282d623dc9f0..e1afd598cf9bc9 100644 --- a/deps/icu-small/source/common/unicode/locid.h +++ b/deps/icu-small/source/common/unicode/locid.h @@ -727,7 +727,9 @@ class U_COMMON_API Locale : public UObject { * * @stable ICU 49 */ - void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status); + void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status) { + setKeywordValue(StringPiece{keywordName}, StringPiece{keywordValue}, status); + } /** * Sets or removes the value for a keyword. diff --git a/deps/icu-small/source/common/unicode/messagepattern.h b/deps/icu-small/source/common/unicode/messagepattern.h index 55b09bfbd4b5dc..db36ede7274c57 100644 --- a/deps/icu-small/source/common/unicode/messagepattern.h +++ b/deps/icu-small/source/common/unicode/messagepattern.h @@ -775,7 +775,7 @@ class U_COMMON_API MessagePattern : public UObject { UMessagePatternArgType getArgType() const { UMessagePatternPartType msgType=getType(); if(msgType ==UMSGPAT_PART_TYPE_ARG_START || msgType ==UMSGPAT_PART_TYPE_ARG_LIMIT) { - return (UMessagePatternArgType)value; + return static_cast<UMessagePatternArgType>(value); } else { return UMSGPAT_ARG_TYPE_NONE; } @@ -821,6 +821,7 @@ class U_COMMON_API MessagePattern : public UObject { static const int32_t MAX_LENGTH=0xffff; static const int32_t MAX_VALUE=0x7fff; + static const int32_t MAX_NESTED_LEVELS=0x03ff; // Some fields are not final because they are modified during pattern parsing. // After pattern parsing, the parts are effectively immutable. diff --git a/deps/icu-small/source/common/unicode/normalizer2.h b/deps/icu-small/source/common/unicode/normalizer2.h index 6856ff8720bfd6..01271623f3b9c8 100644 --- a/deps/icu-small/source/common/unicode/normalizer2.h +++ b/deps/icu-small/source/common/unicode/normalizer2.h @@ -163,7 +163,6 @@ class U_COMMON_API Normalizer2 : public UObject { static const Normalizer2 * getNFKCCasefoldInstance(UErrorCode &errorCode); -#ifndef U_HIDE_DRAFT_API /** * Returns a Normalizer2 instance for a variant of Unicode toNFKC_Casefold() normalization * which is equivalent to applying the NFKC_Simple_Casefold mappings and then NFC. @@ -176,11 +175,10 @@ class U_COMMON_API Normalizer2 : public UObject { * immediately. Check for U_FAILURE() on output or use with * function chaining. (See User Guide for details.) * @return the requested Normalizer2, if successful - * @draft ICU 74 + * @stable ICU 74 */ static const Normalizer2 * getNFKCSimpleCasefoldInstance(UErrorCode &errorCode); -#endif // U_HIDE_DRAFT_API /** * Returns a Normalizer2 instance which uses the specified data file diff --git a/deps/icu-small/source/common/unicode/platform.h b/deps/icu-small/source/common/unicode/platform.h index 7aca76c67db827..b2fcb21ef13023 100644 --- a/deps/icu-small/source/common/unicode/platform.h +++ b/deps/icu-small/source/common/unicode/platform.h @@ -132,6 +132,8 @@ #define U_PF_BROWSER_NATIVE_CLIENT 4020 /** Android is based on Linux. @internal */ #define U_PF_ANDROID 4050 +/** Haiku is a POSIX-ish platform. @internal */ +#define U_PF_HAIKU 4080 /** Fuchsia is a POSIX-ish platform. @internal */ #define U_PF_FUCHSIA 4100 /* Maximum value for Linux-based platform is 4499 */ @@ -154,6 +156,8 @@ # define U_PLATFORM U_PF_MINGW #elif defined(__CYGWIN__) # define U_PLATFORM U_PF_CYGWIN + /* Cygwin uchar.h doesn't exist until Cygwin 3.5. */ +# include <cygwin/version.h> #elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) # define U_PLATFORM U_PF_WINDOWS #elif defined(__ANDROID__) @@ -200,6 +204,8 @@ # define U_PLATFORM U_PF_OS390 #elif defined(__OS400__) || defined(__TOS_OS400__) # define U_PLATFORM U_PF_OS400 +#elif defined(__HAIKU__) +# define U_PLATFORM U_PF_HAIKU #elif defined(__EMSCRIPTEN__) # define U_PLATFORM U_PF_EMSCRIPTEN #else @@ -235,7 +241,7 @@ /** * \def U_PLATFORM_USES_ONLY_WIN32_API * Defines whether the platform uses only the Win32 API. - * Set to 1 for Windows/MSVC and MinGW but not Cygwin. + * Set to 1 for Windows/MSVC, ClangCL and MinGW but not Cygwin. * @internal */ #ifdef U_PLATFORM_USES_ONLY_WIN32_API @@ -250,7 +256,7 @@ /** * \def U_PLATFORM_HAS_WIN32_API * Defines whether the Win32 API is available on the platform. - * Set to 1 for Windows/MSVC, MinGW and Cygwin. + * Set to 1 for Windows/MSVC, ClangCL, MinGW and Cygwin. * @internal */ #ifdef U_PLATFORM_HAS_WIN32_API @@ -722,12 +728,16 @@ /* * Notes: * C++11 and C11 require support for UTF-16 literals - * Doesn't work on Mac C11 (see workaround in ptypes.h). + * Doesn't work on Mac C11 (see workaround in ptypes.h) + * or Cygwin less than 3.5. */ -# if defined(__cplusplus) || !U_PLATFORM_IS_DARWIN_BASED +# if defined(__cplusplus) # define U_HAVE_CHAR16_T 1 -# else +# elif U_PLATFORM_IS_DARWIN_BASED || (U_PLATFORM == U_PF_CYGWIN && CYGWIN_VERSION_DLL_MAJOR < 3005) # define U_HAVE_CHAR16_T 0 +# else + // conformant C11 +# define U_HAVE_CHAR16_T 1 # endif #endif @@ -735,7 +745,9 @@ * @{ * \def U_DECLARE_UTF16 * Do not use this macro because it is not defined on all platforms. - * Use the UNICODE_STRING or U_STRING_DECL macros instead. + * In C++, use std::u16string_view literals, see the UNICODE_STRING docs. + * In C, use u"UTF-16 literals". + * See also the public U_STRING_DECL macro. * @internal */ #ifdef U_DECLARE_UTF16 @@ -766,7 +778,7 @@ #elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \ UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__)) # define U_EXPORT __declspec(dllexport) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__open_xl__) # define U_EXPORT __attribute__((visibility("default"))) #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) @@ -805,7 +817,7 @@ */ #ifdef U_HIDDEN /* Use the predefined value. */ -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__open_xl__) # define U_HIDDEN __attribute__((visibility("hidden"))) #else # define U_HIDDEN diff --git a/deps/icu-small/source/common/unicode/simpleformatter.h b/deps/icu-small/source/common/unicode/simpleformatter.h index 33bdd6d48fc84c..62c75d08bbc0ff 100644 --- a/deps/icu-small/source/common/unicode/simpleformatter.h +++ b/deps/icu-small/source/common/unicode/simpleformatter.h @@ -63,7 +63,7 @@ class U_COMMON_API SimpleFormatter final : public UMemory { * Default constructor. * @stable ICU 57 */ - SimpleFormatter() : compiledPattern((char16_t)0) {} + SimpleFormatter() : compiledPattern(static_cast<char16_t>(0)) {} /** * Constructs a formatter from the pattern string. diff --git a/deps/icu-small/source/common/unicode/stringpiece.h b/deps/icu-small/source/common/unicode/stringpiece.h index 6f2a50eafca537..74919d7222db87 100644 --- a/deps/icu-small/source/common/unicode/stringpiece.h +++ b/deps/icu-small/source/common/unicode/stringpiece.h @@ -32,6 +32,7 @@ #if U_SHOW_CPLUSPLUS_API #include <cstddef> +#include <string_view> #include <type_traits> #include "unicode/uobject.h" @@ -176,6 +177,16 @@ class U_COMMON_API StringPiece : public UMemory { */ StringPiece(const StringPiece& x, int32_t pos, int32_t len); +#ifndef U_HIDE_INTERNAL_API + /** + * Converts to a std::string_view(). + * @internal + */ + inline operator std::string_view() const { + return {data(), static_cast<std::string_view::size_type>(size())}; + } +#endif // U_HIDE_INTERNAL_API + /** * Returns the string pointer. May be nullptr if it is empty. * diff --git a/deps/icu-small/source/common/unicode/stringtriebuilder.h b/deps/icu-small/source/common/unicode/stringtriebuilder.h index 429d7883f15cd8..62108dfe3ea1f7 100644 --- a/deps/icu-small/source/common/unicode/stringtriebuilder.h +++ b/deps/icu-small/source/common/unicode/stringtriebuilder.h @@ -346,7 +346,7 @@ class U_COMMON_API StringTrieBuilder : public UObject { virtual void write(StringTrieBuilder &builder) override; // Adds a unit with a final value. void add(int32_t c, int32_t value) { - units[length]=(char16_t)c; + units[length] = static_cast<char16_t>(c); equal[length]=nullptr; values[length]=value; ++length; @@ -354,7 +354,7 @@ class U_COMMON_API StringTrieBuilder : public UObject { } // Adds a unit which leads to another match node. void add(int32_t c, Node *node) { - units[length]=(char16_t)c; + units[length] = static_cast<char16_t>(c); equal[length]=node; values[length]=0; ++length; diff --git a/deps/icu-small/source/common/unicode/ucasemap.h b/deps/icu-small/source/common/unicode/ucasemap.h index d1c1b483ab337e..4b623e691071dd 100644 --- a/deps/icu-small/source/common/unicode/ucasemap.h +++ b/deps/icu-small/source/common/unicode/ucasemap.h @@ -202,8 +202,8 @@ ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode * * The titlecase break iterator can be provided to customize for arbitrary * styles, using rules and dictionaries beyond the standard iterators. - * The standard titlecase iterator for the root locale implements the - * algorithm of Unicode TR 21. + * If the break iterator passed in is null, the default Unicode algorithm + * will be used to determine the titlecase positions. * * This function uses only the setText(), first() and next() methods of the * provided break iterator. @@ -312,8 +312,8 @@ ucasemap_utf8ToUpper(const UCaseMap *csm, * * The titlecase break iterator can be provided to customize for arbitrary * styles, using rules and dictionaries beyond the standard iterators. - * The standard titlecase iterator for the root locale implements the - * algorithm of Unicode TR 21. + * If the break iterator passed in is null, the default Unicode algorithm + * will be used to determine the titlecase positions. * * This function uses only the setUText(), first(), next() and close() methods of the * provided break iterator. diff --git a/deps/icu-small/source/common/unicode/uchar.h b/deps/icu-small/source/common/unicode/uchar.h index 4572230d9fe229..0daa7dd2141cd0 100644 --- a/deps/icu-small/source/common/unicode/uchar.h +++ b/deps/icu-small/source/common/unicode/uchar.h @@ -54,14 +54,14 @@ U_CDECL_BEGIN /*==========================================================================*/ /** * Unicode version number, default for the current ICU version. - * The actual Unicode Character Database (UCD) data is stored in uprops.dat + * The actual Unicode Character Database (UCD) data is stored in uprops.icu * and may be generated from UCD files from a different Unicode version. * Call u_getUnicodeVersion to get the actual Unicode version of the data. * * @see u_getUnicodeVersion * @stable ICU 2.0 */ -#define U_UNICODE_VERSION "15.1" +#define U_UNICODE_VERSION "16.0" /** * \file @@ -533,33 +533,39 @@ typedef enum UProperty { * @stable ICU 70 */ UCHAR_RGI_EMOJI=71, -#ifndef U_HIDE_DRAFT_API /** * Binary property IDS_Unary_Operator. * For programmatic determination of Ideographic Description Sequences. * - * @draft ICU 74 + * @stable ICU 74 */ UCHAR_IDS_UNARY_OPERATOR=72, /** * Binary property ID_Compat_Math_Start. * Used in mathematical identifier profile in UAX #31. - * @draft ICU 74 + * @stable ICU 74 */ UCHAR_ID_COMPAT_MATH_START=73, /** * Binary property ID_Compat_Math_Continue. * Used in mathematical identifier profile in UAX #31. - * @draft ICU 74 + * @stable ICU 74 */ UCHAR_ID_COMPAT_MATH_CONTINUE=74, +#ifndef U_HIDE_DRAFT_API + /** + * Binary property Modifier_Combining_Mark. + * Used by the AMTRA algorithm in UAX #53. + * @draft ICU 76 + */ + UCHAR_MODIFIER_COMBINING_MARK=75, #endif // U_HIDE_DRAFT_API #ifndef U_HIDE_DEPRECATED_API /** * One more than the last constant for binary Unicode properties. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UCHAR_BINARY_LIMIT=75, + UCHAR_BINARY_LIMIT=76, #endif // U_HIDE_DEPRECATED_API /** Enumerated property Bidi_Class. @@ -677,13 +683,19 @@ typedef enum UProperty { * @draft ICU 75 */ UCHAR_IDENTIFIER_STATUS=0x1019, + /** + * Enumerated property Indic_Conjunct_Break. + * Used in the grapheme cluster break algorithm in UAX #29. + * @draft ICU 76 + */ + UCHAR_INDIC_CONJUNCT_BREAK=0x101A, #endif // U_HIDE_DRAFT_API #ifndef U_HIDE_DEPRECATED_API /** * One more than the last constant for enumerated/integer Unicode properties. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UCHAR_INT_LIMIT=0x101A, + UCHAR_INT_LIMIT=0x101B, #endif // U_HIDE_DEPRECATED_API /** Bitmask property General_Category_Mask. @@ -1952,6 +1964,29 @@ enum UBlockCode { /** @stable ICU 74 */ UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I = 328, /*[2EBF0]*/ + // New blocks in Unicode 16.0 + + /** @stable ICU 76 */ + UBLOCK_EGYPTIAN_HIEROGLYPHS_EXTENDED_A = 329, /*[13460]*/ + /** @stable ICU 76 */ + UBLOCK_GARAY = 330, /*[10D40]*/ + /** @stable ICU 76 */ + UBLOCK_GURUNG_KHEMA = 331, /*[16100]*/ + /** @stable ICU 76 */ + UBLOCK_KIRAT_RAI = 332, /*[16D40]*/ + /** @stable ICU 76 */ + UBLOCK_MYANMAR_EXTENDED_C = 333, /*[116D0]*/ + /** @stable ICU 76 */ + UBLOCK_OL_ONAL = 334, /*[1E5D0]*/ + /** @stable ICU 76 */ + UBLOCK_SUNUWAR = 335, /*[11BC0]*/ + /** @stable ICU 76 */ + UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING_SUPPLEMENT = 336, /*[1CC00]*/ + /** @stable ICU 76 */ + UBLOCK_TODHRI = 337, /*[105C0]*/ + /** @stable ICU 76 */ + UBLOCK_TULU_TIGALARI = 338, /*[11380]*/ + #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal UBlockCode value. @@ -1959,7 +1994,7 @@ enum UBlockCode { * * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UBLOCK_COUNT = 329, + UBLOCK_COUNT = 339, #endif // U_HIDE_DEPRECATED_API /** @stable ICU 2.0 */ @@ -2254,6 +2289,8 @@ typedef enum UJoiningGroup { U_JG_THIN_YEH, /**< @stable ICU 70 */ U_JG_VERTICAL_TAIL, /**< @stable ICU 70 */ + U_JG_KASHMIRI_YEH, /**< @stable ICU 76 */ + #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal UJoiningGroup value. @@ -2702,8 +2739,35 @@ typedef enum UIndicSyllabicCategory { U_INSC_VOWEL_DEPENDENT, /** @stable ICU 63 */ U_INSC_VOWEL_INDEPENDENT, + /** @stable ICU 76 */ + U_INSC_REORDERING_KILLER, } UIndicSyllabicCategory; +#ifndef U_HIDE_DRAFT_API +/** + * Indic Conjunct Break constants. + * + * @see UCHAR_INDIC_CONJUNCT_BREAK + * @draft ICU 76 + */ +typedef enum UIndicConjunctBreak { + /* + * Note: UIndicConjunctBreak constants are parsed by preparseucd.py. + * It matches lines like + * U_INCB_<Unicode Indic_Conjunct_Break value name> + */ + + /** @draft ICU 76 */ + U_INCB_NONE, + /** @draft ICU 76 */ + U_INCB_CONSONANT, + /** @draft ICU 76 */ + U_INCB_EXTEND, + /** @draft ICU 76 */ + U_INCB_LINKER, +} UIndicConjunctBreak; +#endif // U_HIDE_DRAFT_API + /** * Vertical Orientation constants. * diff --git a/deps/icu-small/source/common/unicode/ucharstrie.h b/deps/icu-small/source/common/unicode/ucharstrie.h index fa1b55616c6599..ca4b46947045af 100644 --- a/deps/icu-small/source/common/unicode/ucharstrie.h +++ b/deps/icu-small/source/common/unicode/ucharstrie.h @@ -107,7 +107,7 @@ class U_COMMON_API UCharsTrie : public UMemory { */ uint64_t getState64() const { return (static_cast<uint64_t>(remainingMatchLength_ + 2) << kState64RemainingShift) | - (uint64_t)(pos_ - uchars_); + static_cast<uint64_t>(pos_ - uchars_); } /** @@ -493,7 +493,7 @@ class U_COMMON_API UCharsTrie : public UMemory { } static inline UStringTrieResult valueResult(int32_t node) { - return (UStringTrieResult)(USTRINGTRIE_INTERMEDIATE_VALUE-(node>>15)); + return static_cast<UStringTrieResult>(USTRINGTRIE_INTERMEDIATE_VALUE - (node >> 15)); } // Handles a branch node for both next(uchar) and next(string). diff --git a/deps/icu-small/source/common/unicode/uidna.h b/deps/icu-small/source/common/unicode/uidna.h index 24a81ceaddf58d..362a2dcbe65a61 100644 --- a/deps/icu-small/source/common/unicode/uidna.h +++ b/deps/icu-small/source/common/unicode/uidna.h @@ -49,11 +49,19 @@ */ enum { /** - * Default options value: None of the other options are set. + * Default options value: UTS #46 nontransitional processing. * For use in static worker and factory methods. + * + * Since ICU 76, this is the same as + * UIDNA_NONTRANSITIONAL_TO_ASCII | UIDNA_NONTRANSITIONAL_TO_UNICODE, + * corresponding to Unicode 15.1 UTS #46 deprecating transitional processing. + * (These options are ignored by the IDNA2003 implementation.) + * + * Before ICU 76, this constant did not set any of the options. + * * @stable ICU 2.6 */ - UIDNA_DEFAULT=0, + UIDNA_DEFAULT=0x30, #ifndef U_HIDE_DEPRECATED_API /** * Option to allow unassigned code points in domain names and labels. @@ -91,19 +99,27 @@ enum { /** * IDNA option for nontransitional processing in ToASCII(). * For use in static worker and factory methods. + * * <p>By default, ToASCII() uses transitional processing. + * Unicode 15.1 UTS #46 deprecated transitional processing. + * * <p>This option is ignored by the IDNA2003 implementation. * (This is only relevant for compatibility of newer IDNA implementations with IDNA2003.) * @stable ICU 4.6 + * @see UIDNA_DEFAULT */ UIDNA_NONTRANSITIONAL_TO_ASCII=0x10, /** * IDNA option for nontransitional processing in ToUnicode(). * For use in static worker and factory methods. + * * <p>By default, ToUnicode() uses transitional processing. + * Unicode 15.1 UTS #46 deprecated transitional processing. + * * <p>This option is ignored by the IDNA2003 implementation. * (This is only relevant for compatibility of newer IDNA implementations with IDNA2003.) * @stable ICU 4.6 + * @see UIDNA_DEFAULT */ UIDNA_NONTRANSITIONAL_TO_UNICODE=0x20, /** @@ -134,6 +150,8 @@ typedef struct UIDNA UIDNA; /**< C typedef for struct UIDNA. @stable ICU 4.6 */ * For details about the UTS #46 implementation see the IDNA C++ class in idna.h. * * @param options Bit set to modify the processing and error checking. + * These should include UIDNA_DEFAULT, or + * UIDNA_NONTRANSITIONAL_TO_ASCII | UIDNA_NONTRANSITIONAL_TO_UNICODE. * See option bit set values in uidna.h. * @param pErrorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns diff --git a/deps/icu-small/source/common/unicode/ulocale.h b/deps/icu-small/source/common/unicode/ulocale.h index 33e92844bc1eea..1b3af3a5f26d62 100644 --- a/deps/icu-small/source/common/unicode/ulocale.h +++ b/deps/icu-small/source/common/unicode/ulocale.h @@ -13,16 +13,15 @@ * \brief C API: Locale ID functionality similar to C++ class Locale */ -#ifndef U_HIDE_DRAFT_API /** * Opaque C service object type for the locale API - * @draft ICU 74 + * @stable ICU 74 */ struct ULocale; /** * C typedef for struct ULocale. - * @draft ICU 74 + * @stable ICU 74 */ typedef struct ULocale ULocale; @@ -37,7 +36,7 @@ typedef struct ULocale ULocale; * @param err the error code * @return the locale. * - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI ULocale* U_EXPORT2 ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err); @@ -53,7 +52,7 @@ ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err); * @param err the error code * @return the locale. * - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI ULocale* U_EXPORT2 ulocale_openForLanguageTag(const char* tag, int32_t length, UErrorCode* err); @@ -62,7 +61,7 @@ ulocale_openForLanguageTag(const char* tag, int32_t length, UErrorCode* err); * Close the locale and destroy it's internal states. * * @param locale the locale - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocale_close(ULocale* locale); @@ -72,7 +71,7 @@ ulocale_close(ULocale* locale); * * @param locale the locale * @return the language code of the locale. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI const char* U_EXPORT2 ulocale_getLanguage(const ULocale* locale); @@ -82,7 +81,7 @@ ulocale_getLanguage(const ULocale* locale); * * @param locale the locale * @return A pointer to the script. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI const char* U_EXPORT2 ulocale_getScript(const ULocale* locale); @@ -92,7 +91,7 @@ ulocale_getScript(const ULocale* locale); * * @param locale the locale * @return A pointer to the region. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI const char* U_EXPORT2 ulocale_getRegion(const ULocale* locale); @@ -102,7 +101,7 @@ ulocale_getRegion(const ULocale* locale); * * @param locale the locale * @return A pointer to the variant. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI const char* U_EXPORT2 ulocale_getVariant(const ULocale* locale); @@ -115,7 +114,7 @@ ulocale_getVariant(const ULocale* locale); * * @param locale the locale * @return A pointer to "name". - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI const char* U_EXPORT2 ulocale_getLocaleID(const ULocale* locale); @@ -126,7 +125,7 @@ ulocale_getLocaleID(const ULocale* locale); * * @param locale the locale * @return A pointer to "base name". - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI const char* U_EXPORT2 ulocale_getBaseName(const ULocale* locale); @@ -136,7 +135,7 @@ ulocale_getBaseName(const ULocale* locale); * * @param locale the locale * @return false if it is a real locale, true if it is a bogus locale - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI bool U_EXPORT2 ulocale_isBogus(const ULocale* locale); @@ -148,7 +147,7 @@ ulocale_isBogus(const ULocale* locale); * @param err the error code * @return pointer to UEnumeration, or nullptr if there are no keywords. * Client must call uenum_close() to dispose the returned value. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI UEnumeration* U_EXPORT2 ulocale_getKeywords(const ULocale* locale, UErrorCode *err); @@ -160,7 +159,7 @@ ulocale_getKeywords(const ULocale* locale, UErrorCode *err); * @param err the error code * @return pointer to UEnumeration, or nullptr if there are no keywords. * Client must call uenum_close() to dispose the returned value. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI UEnumeration* U_EXPORT2 ulocale_getUnicodeKeywords(const ULocale* locale, UErrorCode *err); @@ -178,7 +177,7 @@ ulocale_getUnicodeKeywords(const ULocale* locale, UErrorCode *err); * @param valueBuffer The buffer to receive the value. * @param valueBufferCapacity The capacity of receiving valueBuffer. * @param err the error code - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI int32_t U_EXPORT2 ulocale_getKeywordValue( @@ -198,7 +197,7 @@ ulocale_getKeywordValue( * @param valueBuffer The buffer to receive the Unicode value. * @param valueBufferCapacity The capacity of receiving valueBuffer. * @param err the error code - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI int32_t U_EXPORT2 ulocale_getUnicodeKeywordValue( @@ -216,7 +215,7 @@ U_NAMESPACE_BEGIN * * @see LocalPointerBase * @see LocalPointer - * @draft ICU 74 + * @stable ICU 74 */ U_DEFINE_LOCAL_OPEN_POINTER(LocalULocalePointer, ULocale, ulocale_close); @@ -224,6 +223,4 @@ U_NAMESPACE_END #endif /* U_SHOW_CPLUSPLUS_API */ -#endif /* U_HIDE_DRAFT_API */ - #endif /*_ULOCALE */ diff --git a/deps/icu-small/source/common/unicode/ulocbuilder.h b/deps/icu-small/source/common/unicode/ulocbuilder.h index 9b147292f49e8d..ce61995bde6260 100644 --- a/deps/icu-small/source/common/unicode/ulocbuilder.h +++ b/deps/icu-small/source/common/unicode/ulocbuilder.h @@ -12,17 +12,15 @@ * \brief C API: Builder API for Locale */ -#ifndef U_HIDE_DRAFT_API - /** * Opaque C service object type for the locale builder API - * @draft ICU 74 + * @stable ICU 74 */ struct ULocaleBuilder; /** * C typedef for struct ULocaleBuilder. - * @draft ICU 74 + * @stable ICU 74 */ typedef struct ULocaleBuilder ULocaleBuilder; @@ -62,7 +60,7 @@ typedef struct ULocaleBuilder ULocaleBuilder; * UErrorCode, then track the error of the validation of the input parameter * into the internal UErrorCode. * - * @draft ICU 74 + * @stable ICU 74 */ /** @@ -71,7 +69,7 @@ typedef struct ULocaleBuilder ULocaleBuilder; * empty string. The created builder should be destroyed by calling * ulocbld_close(); * - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI ULocaleBuilder* U_EXPORT2 ulocbld_open(void); @@ -79,7 +77,7 @@ ulocbld_open(void); /** * Close the builder and destroy it's internal states. * @param builder the builder - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_close(ULocaleBuilder* builder); @@ -97,7 +95,7 @@ ulocbld_close(ULocaleBuilder* builder); * @param length the length of the locale; if negative, then the locale need to be * null terminated, * - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_setLocale(ULocaleBuilder* builder, const char* locale, int32_t length); @@ -113,7 +111,7 @@ ulocbld_setLocale(ULocaleBuilder* builder, const char* locale, int32_t length); * @param locale the locale, a ULocale* pointer. The builder adopts the locale * after the call and the client must not delete it. * - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_adoptULocale(ULocaleBuilder* builder, ULocale* locale); @@ -136,7 +134,7 @@ ulocbld_adoptULocale(ULocaleBuilder* builder, ULocale* locale); * the length is non-negative) * @param length the length of the tag; if negative, then the tag need to be * null terminated, - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_setLanguageTag(ULocaleBuilder* builder, const char* tag, int32_t length); @@ -156,7 +154,7 @@ ulocbld_setLanguageTag(ULocaleBuilder* builder, const char* tag, int32_t length) * the length is non-negative) * @param length the length of the language; if negative, then the language need to be * null terminated, - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_setLanguage(ULocaleBuilder* builder, const char* language, int32_t length); @@ -177,7 +175,7 @@ ulocbld_setLanguage(ULocaleBuilder* builder, const char* language, int32_t lengt * the length is non-negative) * @param length the length of the script; if negative, then the script need to be * null terminated, - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_setScript(ULocaleBuilder* builder, const char* script, int32_t length); @@ -201,7 +199,7 @@ ulocbld_setScript(ULocaleBuilder* builder, const char* script, int32_t length); * the length is non-negative) * @param length the length of the region; if negative, then the region need to be * null terminated, - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_setRegion(ULocaleBuilder* builder, const char* region, int32_t length); @@ -227,7 +225,7 @@ ulocbld_setRegion(ULocaleBuilder* builder, const char* region, int32_t length); * the length is non-negative) * @param length the length of the variant; if negative, then the variant need to be * null terminated, - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_setVariant(ULocaleBuilder* builder, const char* variant, int32_t length); @@ -253,7 +251,7 @@ ulocbld_setVariant(ULocaleBuilder* builder, const char* variant, int32_t length) * the length is non-negative) * @param length the length of the value; if negative, then the value need to be * null terminated, - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_setExtension(ULocaleBuilder* builder, char key, const char* value, int32_t length); @@ -282,7 +280,7 @@ ulocbld_setExtension(ULocaleBuilder* builder, char key, const char* value, int32 * @param typeLength the length of the type; if negative, then the type need to * be null terminated, * @return This builder. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_setUnicodeLocaleKeyword(ULocaleBuilder* builder, @@ -299,7 +297,7 @@ ulocbld_setUnicodeLocaleKeyword(ULocaleBuilder* builder, * terminated when the length is non-negative) * @param length the length of the attribute; if negative, then the attribute * need to be null terminated, - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_addUnicodeLocaleAttribute( @@ -318,7 +316,7 @@ ulocbld_addUnicodeLocaleAttribute( * terminated when the length is non-negative) * @param length the length of the attribute; if negative, then the attribute * need to be null terminated, - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_removeUnicodeLocaleAttribute( @@ -329,7 +327,7 @@ ulocbld_removeUnicodeLocaleAttribute( * <p>This method clears the internal UErrorCode. * * @param builder the builder - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_clear(ULocaleBuilder* builder); @@ -339,7 +337,7 @@ ulocbld_clear(ULocaleBuilder* builder); * Language, script, region and variant are unchanged. * * @param builder the builder - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI void U_EXPORT2 ulocbld_clearExtensions(ULocaleBuilder* builder); @@ -358,7 +356,7 @@ ulocbld_clearExtensions(ULocaleBuilder* builder); * @param localeCapacity the size of the locale buffer to store the locale id * @param err the error code * @return the length of the locale id in buffer - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI int32_t U_EXPORT2 ulocbld_buildLocaleID(ULocaleBuilder* builder, char* locale, @@ -377,7 +375,7 @@ ulocbld_buildLocaleID(ULocaleBuilder* builder, char* locale, * @param err the error code. * @return the locale, a ULocale* pointer. The created ULocale must be * destroyed by calling {@link ulocale_close}. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI ULocale* U_EXPORT2 ulocbld_buildULocale(ULocaleBuilder* builder, UErrorCode* err); @@ -397,7 +395,7 @@ ulocbld_buildULocale(ULocaleBuilder* builder, UErrorCode* err); * tag * @param err the error code * @return the length of the language tag in buffer - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI int32_t U_EXPORT2 ulocbld_buildLanguageTag(ULocaleBuilder* builder, char* language, @@ -412,7 +410,7 @@ ulocbld_buildLanguageTag(ULocaleBuilder* builder, char* language, * Unchanged if there is no such error or if outErrorCode * already contained an error. * @return true if U_FAILURE(*outErrorCode) - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI UBool U_EXPORT2 ulocbld_copyErrorTo(const ULocaleBuilder* builder, UErrorCode *outErrorCode); @@ -428,7 +426,7 @@ U_NAMESPACE_BEGIN * * @see LocalPointerBase * @see LocalPointer - * @draft ICU 74 + * @stable ICU 74 */ U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleBuilderPointer, ULocaleBuilder, ulocbld_close); @@ -436,6 +434,4 @@ U_NAMESPACE_END #endif /* U_SHOW_CPLUSPLUS_API */ -#endif /* U_HIDE_DRAFT_API */ - #endif // __ULOCBUILDER_H__ diff --git a/deps/icu-small/source/common/unicode/uniset.h b/deps/icu-small/source/common/unicode/uniset.h index 127e4ce063b364..d070fd631a22d9 100644 --- a/deps/icu-small/source/common/unicode/uniset.h +++ b/deps/icu-small/source/common/unicode/uniset.h @@ -313,7 +313,7 @@ class U_COMMON_API UnicodeSet final : public UnicodeFilter { char16_t *pat = nullptr; int32_t patLen = 0; - UVector* strings = nullptr; // maintained in sorted order + UVector* strings_ = nullptr; // maintained in sorted order UnicodeSetStringSpan *stringSpan = nullptr; /** @@ -1102,6 +1102,118 @@ class U_COMMON_API UnicodeSet final : public UnicodeFilter { */ UChar32 charAt(int32_t index) const; +#ifndef U_HIDE_DRAFT_API + /** + * Returns a C++ "range" for iterating over the code points of this set. + * + * \code + * UnicodeSet set(u"[abcçカ🚴]", errorCode); + * for (UChar32 c : set.codePoints()) { + * printf("set.codePoint U+%04lx\n", (long)c); + * } + * \endcode + * + * @return a "range" object for iterating over the code points of this set. + * @draft ICU 76 + * @see ranges + * @see strings + * @see begin + * @see end + */ + inline U_HEADER_NESTED_NAMESPACE::USetCodePoints codePoints() const { + return U_HEADER_NESTED_NAMESPACE::USetCodePoints(toUSet()); + } + + /** + * Returns a C++ "range" for iterating over the code point ranges of this set. + * + * \code + * UnicodeSet set(u"[abcçカ🚴]", errorCode); + * for (auto [start, end] : set.ranges()) { + * printf("set.range U+%04lx..U+%04lx\n", (long)start, (long)end); + * } + * for (auto range : set.ranges()) { + * for (UChar32 c : range) { + * printf("set.range.c U+%04lx\n", (long)c); + * } + * } + * \endcode + * + * @return a "range" object for iterating over the code point ranges of this set. + * @draft ICU 76 + * @see codePoints + * @see strings + * @see begin + * @see end + */ + inline U_HEADER_NESTED_NAMESPACE::USetRanges ranges() const { + return U_HEADER_NESTED_NAMESPACE::USetRanges(toUSet()); + } + + /** + * Returns a C++ "range" for iterating over the empty and multi-character strings of this set. + * Returns each string as a std::u16string_view without copying its contents. + * + * \code + * UnicodeSet set(u"[abcçカ🚴{}{abc}{de}]", errorCode); + * for (auto s : set.strings()) { + * UnicodeString us(s); + * std::string u8; + * printf("set.string length %ld \"%s\"\n", (long)s.length(), us.toUTF8String(u8).c_str()); + * } + * \endcode + * + * @return a "range" object for iterating over the strings of this set. + * @draft ICU 76 + * @see codePoints + * @see ranges + * @see begin + * @see end + */ + inline U_HEADER_NESTED_NAMESPACE::USetStrings strings() const { + return U_HEADER_NESTED_NAMESPACE::USetStrings(toUSet()); + } + + /** + * Returns a C++ iterator for iterating over all of the elements of this set. + * Convenient all-in one iteration, but creates a UnicodeString for each + * code point or string. + * (Similar to how Java UnicodeSet *is an* Iterable<String>.) + * + * Code points are returned first, then empty and multi-character strings. + * + * \code + * UnicodeSet set(u"[abcçカ🚴{}{abc}{de}]", errorCode); + * for (auto el : set) { + * std::string u8; + * printf("set.string length %ld \"%s\"\n", (long)el.length(), el.toUTF8String(u8).c_str()); + * } + * \endcode + * + * @return an all-elements iterator. + * @draft ICU 76 + * @see end + * @see codePoints + * @see ranges + * @see strings + */ + inline U_HEADER_NESTED_NAMESPACE::USetElementIterator begin() const { + return U_HEADER_NESTED_NAMESPACE::USetElements(toUSet()).begin(); + } + + /** + * @return an exclusive-end sentinel for iterating over all of the elements of this set. + * @draft ICU 76 + * @see begin + * @see codePoints + * @see ranges + * @see strings + */ + inline U_HEADER_NESTED_NAMESPACE::USetElementIterator end() const { + return U_HEADER_NESTED_NAMESPACE::USetElements(toUSet()).end(); + } +#endif // U_HIDE_DRAFT_API + /** * Adds the specified range to this set if it is not already * present. If this set already contains the specified range, @@ -1731,7 +1843,7 @@ inline bool UnicodeSet::operator!=(const UnicodeSet& o) const { } inline UBool UnicodeSet::isFrozen() const { - return (UBool)(bmpSet!=nullptr || stringSpan!=nullptr); + return bmpSet != nullptr || stringSpan != nullptr; } inline UBool UnicodeSet::containsSome(UChar32 start, UChar32 end) const { @@ -1747,7 +1859,7 @@ inline UBool UnicodeSet::containsSome(const UnicodeString& s) const { } inline UBool UnicodeSet::isBogus() const { - return (UBool)(fFlags & kIsBogus); + return fFlags & kIsBogus; } inline UnicodeSet *UnicodeSet::fromUSet(USet *uset) { diff --git a/deps/icu-small/source/common/unicode/unistr.h b/deps/icu-small/source/common/unicode/unistr.h index a41e6358facd7d..39d789fd6ef79e 100644 --- a/deps/icu-small/source/common/unicode/unistr.h +++ b/deps/icu-small/source/common/unicode/unistr.h @@ -33,6 +33,7 @@ #if U_SHOW_CPLUSPLUS_API #include <cstddef> +#include <string_view> #include "unicode/char16ptr.h" #include "unicode/rep.h" #include "unicode/std_string.h" @@ -97,16 +98,19 @@ class UnicodeStringAppendable; // unicode/appendable.h #define US_INV icu::UnicodeString::kInvariant /** - * Unicode String literals in C++. + * \def UNICODE_STRING + * Obsolete macro approximating UnicodeString literals. * - * Note: these macros are not recommended for new code. - * Prior to the availability of C++11 and u"unicode string literals", - * these macros were provided for portability and efficiency when + * Prior to the availability of C++11 and u"UTF-16 string literals", + * this macro was provided for portability and efficiency when * initializing UnicodeStrings from literals. * - * They work only for strings that contain "invariant characters", i.e., - * only latin letters, digits, and some punctuation. - * See utypes.h for details. + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode * * The string parameter must be a C string literal. * The length of the string, not including the terminating @@ -121,16 +125,12 @@ class UnicodeStringAppendable; // unicode/appendable.h /** * Unicode String literals in C++. - * Dependent on the platform properties, different UnicodeString - * constructors should be used to create a UnicodeString object from - * a string literal. - * The macros are defined for improved performance. - * They work only for strings that contain "invariant characters", i.e., - * only latin letters, digits, and some punctuation. - * See utypes.h for details. + * Obsolete macro approximating UnicodeString literals. + * See UNICODE_STRING. * * The string parameter must be a C string literal. * @stable ICU 2.0 + * @see UNICODE_STRING */ #define UNICODE_STRING_SIMPLE(cs) UNICODE_STRING(cs, -1) @@ -327,6 +327,30 @@ class U_COMMON_API UnicodeString : public Replaceable */ inline bool operator== (const UnicodeString& text) const; +#ifndef U_HIDE_DRAFT_API + /** + * Equality operator. Performs only bitwise comparison with `text` + * which is, or which is implicitly convertible to, + * a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view. + * + * For performance, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str = ...; + * if (str == u"literal") { ... } + * \endcode + * @param text The string view to compare to this string. + * @return true if `text` contains the same characters as this one, false otherwise. + * @draft ICU 76 + */ + template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>> + inline bool operator==(const S &text) const { + std::u16string_view sv(internal::toU16StringView(text)); + uint32_t len; // unsigned to avoid a compiler warning + return !isBogus() && (len = length()) == sv.length() && doEquals(sv.data(), len); + } +#endif // U_HIDE_DRAFT_API + /** * Inequality operator. Performs only bitwise comparison. * @param text The UnicodeString to compare to this one. @@ -336,6 +360,30 @@ class U_COMMON_API UnicodeString : public Replaceable */ inline bool operator!= (const UnicodeString& text) const; +#ifndef U_HIDE_DRAFT_API + /** + * Inequality operator. Performs only bitwise comparison with `text` + * which is, or which is implicitly convertible to, + * a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view. + * + * For performance, you can use std::u16string_view literals with compile-time + * length determination: + * \code + * #include <string_view> + * using namespace std::string_view_literals; + * UnicodeString str = ...; + * if (str != u"literal"sv) { ... } + * \endcode + * @param text The string view to compare to this string. + * @return false if `text` contains the same characters as this one, true otherwise. + * @draft ICU 76 + */ + template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>> + inline bool operator!=(const S &text) const { + return !operator==(text); + } +#endif // U_HIDE_DRAFT_API + /** * Greater than operator. Performs only bitwise comparison. * @param text The UnicodeString to compare to this one. @@ -1897,6 +1945,24 @@ class U_COMMON_API UnicodeString : public Replaceable */ UnicodeString &fastCopyFrom(const UnicodeString &src); +#ifndef U_HIDE_DRAFT_API + /** + * Assignment operator. Replaces the characters in this UnicodeString + * with a copy of the characters from the `src` + * which is, or which is implicitly convertible to, + * a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view. + * + * @param src The string view containing the characters to copy. + * @return a reference to this + * @draft ICU 76 + */ + template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>> + inline UnicodeString &operator=(const S &src) { + unBogus(); + return doReplace(0, length(), internal::toU16StringView(src)); + } +#endif // U_HIDE_DRAFT_API + /** * Move assignment operator; might leave src in bogus state. * This string will have the same contents and state that the source string had. @@ -2146,6 +2212,23 @@ class U_COMMON_API UnicodeString : public Replaceable */ inline UnicodeString& operator+= (const UnicodeString& srcText); +#ifndef U_HIDE_DRAFT_API + /** + * Append operator. Appends the characters in `src` + * which is, or which is implicitly convertible to, + * a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view, + * to the UnicodeString object. + * + * @param src the source for the new characters + * @return a reference to this + * @draft ICU 76 + */ + template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>> + inline UnicodeString& operator+=(const S &src) { + return doAppend(internal::toU16StringView(src)); + } +#endif // U_HIDE_DRAFT_API + /** * Append the characters * in `srcText` in the range @@ -2191,8 +2274,8 @@ class U_COMMON_API UnicodeString : public Replaceable int32_t srcLength); /** - * Append the characters in `srcChars` to the UnicodeString object - * at offset `start`. `srcChars` is not modified. + * Append the characters in `srcChars` to the UnicodeString object. + * `srcChars` is not modified. * @param srcChars the source for the new characters * @param srcLength the number of Unicode characters in `srcChars`; * can be -1 if `srcChars` is NUL-terminated @@ -2202,6 +2285,23 @@ class U_COMMON_API UnicodeString : public Replaceable inline UnicodeString& append(ConstChar16Ptr srcChars, int32_t srcLength); +#ifndef U_HIDE_DRAFT_API + /** + * Appends the characters in `src` + * which is, or which is implicitly convertible to, + * a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view, + * to the UnicodeString object. + * + * @param src the source for the new characters + * @return a reference to this + * @draft ICU 76 + */ + template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>> + inline UnicodeString& append(const S &src) { + return doAppend(internal::toU16StringView(src)); + } +#endif // U_HIDE_DRAFT_API + /** * Append the code unit `srcChar` to the UnicodeString object. * @param srcChar the code unit to append @@ -2556,7 +2656,7 @@ class U_COMMON_API UnicodeString : public Replaceable * @stable ICU 2.0 */ inline UnicodeString& remove(int32_t start, - int32_t length = (int32_t)INT32_MAX); + int32_t length = static_cast<int32_t>(INT32_MAX)); /** * Remove the characters in the range @@ -2567,7 +2667,7 @@ class U_COMMON_API UnicodeString : public Replaceable * @stable ICU 2.0 */ inline UnicodeString& removeBetween(int32_t start, - int32_t limit = (int32_t)INT32_MAX); + int32_t limit = static_cast<int32_t>(INT32_MAX)); /** * Retain only the characters in the range @@ -2693,8 +2793,8 @@ class U_COMMON_API UnicodeString : public Replaceable * styles, using rules and dictionaries beyond the standard iterators. * It may be more efficient to always provide an iterator to avoid * opening and closing one for each string. - * The standard titlecase iterator for the root locale implements the - * algorithm of Unicode TR 21. + * If the break iterator passed in is null, the default Unicode algorithm + * will be used to determine the titlecase positions. * * This function uses only the setText(), first() and next() methods of the * provided break iterator. @@ -2721,8 +2821,8 @@ class U_COMMON_API UnicodeString : public Replaceable * styles, using rules and dictionaries beyond the standard iterators. * It may be more efficient to always provide an iterator to avoid * opening and closing one for each string. - * The standard titlecase iterator for the root locale implements the - * algorithm of Unicode TR 21. + * If the break iterator passed in is null, the default Unicode algorithm + * will be used to determine the titlecase positions. * * This function uses only the setText(), first() and next() methods of the * provided break iterator. @@ -2750,8 +2850,8 @@ class U_COMMON_API UnicodeString : public Replaceable * styles, using rules and dictionaries beyond the standard iterators. * It may be more efficient to always provide an iterator to avoid * opening and closing one for each string. - * The standard titlecase iterator for the root locale implements the - * algorithm of Unicode TR 21. + * If the break iterator passed in is null, the default Unicode algorithm + * will be used to determine the titlecase positions. * * This function uses only the setText(), first() and next() methods of the * provided break iterator. @@ -2925,6 +3025,37 @@ class U_COMMON_API UnicodeString : public Replaceable */ const char16_t *getTerminatedBuffer(); +#ifndef U_HIDE_DRAFT_API + /** + * Converts to a std::u16string_view. + * + * @return a string view of the contents of this string + * @draft ICU 76 + */ + inline operator std::u16string_view() const { + return {getBuffer(), static_cast<std::u16string_view::size_type>(length())}; + } + +#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) + /** + * Converts to a std::wstring_view. + * + * Note: This should remain draft until C++ standard plans + * about char16_t vs. wchar_t become clearer. + * + * @return a string view of the contents of this string + * @draft ICU 76 + */ + inline operator std::wstring_view() const { + const char16_t *p = getBuffer(); +#ifdef U_ALIASING_BARRIER + U_ALIASING_BARRIER(p); +#endif + return { reinterpret_cast<const wchar_t *>(p), (std::wstring_view::size_type)length() }; + } +#endif // U_SIZEOF_WCHAR_T +#endif // U_HIDE_DRAFT_API + //======================================== // Constructors //======================================== @@ -2969,19 +3100,32 @@ class U_COMMON_API UnicodeString : public Replaceable */ UNISTR_FROM_CHAR_EXPLICIT UnicodeString(UChar32 ch); +#ifdef U_HIDE_DRAFT_API /** * char16_t* constructor. * * It is recommended to mark this constructor "explicit" by * `-DUNISTR_FROM_STRING_EXPLICIT=explicit` * on the compiler command line or similar. + * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode + * * @param text The characters to place in the UnicodeString. `text` * must be NUL (U+0000) terminated. * @stable ICU 2.0 */ - UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char16_t *text); + UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char16_t *text) : + UnicodeString(text, -1) {} +#endif // U_HIDE_DRAFT_API -#if !U_CHAR16_IS_TYPEDEF +#if !U_CHAR16_IS_TYPEDEF && \ + (defined(U_HIDE_DRAFT_API) || (defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 180000)) /** * uint16_t * constructor. * Delegates to UnicodeString(const char16_t *). @@ -2989,14 +3133,23 @@ class U_COMMON_API UnicodeString : public Replaceable * It is recommended to mark this constructor "explicit" by * `-DUNISTR_FROM_STRING_EXPLICIT=explicit` * on the compiler command line or similar. + * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode + * * @param text NUL-terminated UTF-16 string * @stable ICU 59 */ UNISTR_FROM_STRING_EXPLICIT UnicodeString(const uint16_t *text) : - UnicodeString(ConstChar16Ptr(text)) {} + UnicodeString(ConstChar16Ptr(text), -1) {} #endif -#if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) +#if defined(U_HIDE_DRAFT_API) && (U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN)) /** * wchar_t * constructor. * (Only defined if U_SIZEOF_WCHAR_T==2.) @@ -3005,11 +3158,20 @@ class U_COMMON_API UnicodeString : public Replaceable * It is recommended to mark this constructor "explicit" by * `-DUNISTR_FROM_STRING_EXPLICIT=explicit` * on the compiler command line or similar. + * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode + * * @param text NUL-terminated UTF-16 string * @stable ICU 59 */ UNISTR_FROM_STRING_EXPLICIT UnicodeString(const wchar_t *text) : - UnicodeString(ConstChar16Ptr(text)) {} + UnicodeString(ConstChar16Ptr(text), -1) {} #endif /** @@ -3026,6 +3188,15 @@ class U_COMMON_API UnicodeString : public Replaceable /** * char16_t* constructor. + * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode + * * @param text The characters to place in the UnicodeString. * @param textLength The number of Unicode characters in `text` * to copy. @@ -3038,6 +3209,15 @@ class U_COMMON_API UnicodeString : public Replaceable /** * uint16_t * constructor. * Delegates to UnicodeString(const char16_t *, int32_t). + * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode + * * @param text UTF-16 string * @param textLength string length * @stable ICU 59 @@ -3051,7 +3231,16 @@ class U_COMMON_API UnicodeString : public Replaceable * wchar_t * constructor. * (Only defined if U_SIZEOF_WCHAR_T==2.) * Delegates to UnicodeString(const char16_t *, int32_t). - * @param text NUL-terminated UTF-16 string + * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode + * + * @param text UTF-16 string * @param textLength string length * @stable ICU 59 */ @@ -3068,6 +3257,26 @@ class U_COMMON_API UnicodeString : public Replaceable */ inline UnicodeString(const std::nullptr_t text, int32_t textLength); +#ifndef U_HIDE_DRAFT_API + /** + * Constructor from `text` + * which is, or which is implicitly convertible to, + * a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view. + * The string is bogus if the string view is too long. + * + * If you need a UnicodeString but need not copy the string view contents, + * then you can call the UnicodeString::readOnlyAlias() function instead of this constructor. + * + * @param text UTF-16 string + * @draft ICU 76 + */ + template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>> + UNISTR_FROM_STRING_EXPLICIT UnicodeString(const S &text) { + fUnion.fFields.fLengthAndFlags = kShortString; + doAppend(internal::toU16StringViewNullable(text)); + } +#endif // U_HIDE_DRAFT_API + /** * Readonly-aliasing char16_t* constructor. * The text will be used for the UnicodeString object, but @@ -3082,6 +3291,14 @@ class U_COMMON_API UnicodeString : public Replaceable * When using fastCopyFrom(), the text will be aliased again, * so that both strings then alias the same readonly-text. * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString alias = UnicodeString::readOnlyAlias(u"literal"); + * if (str == u"other literal") { ... } + * \endcode + * * @param isTerminated specifies if `text` is `NUL`-terminated. * This must be true if `textLength==-1`. * @param text The characters to alias for the UnicodeString. @@ -3160,8 +3377,14 @@ class U_COMMON_API UnicodeString : public Replaceable * * For ASCII (really "invariant character") strings it is more efficient to use * the constructor that takes a US_INV (for its enum EInvariant). - * For ASCII (invariant-character) string literals, see UNICODE_STRING and - * UNICODE_STRING_SIMPLE. + * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode * * It is recommended to mark this constructor "explicit" by * `-DUNISTR_FROM_STRING_EXPLICIT=explicit` @@ -3169,8 +3392,6 @@ class U_COMMON_API UnicodeString : public Replaceable * @param codepageData an array of bytes, null-terminated, * in the platform's default codepage. * @stable ICU 2.0 - * @see UNICODE_STRING - * @see UNICODE_STRING_SIMPLE */ UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char *codepageData); @@ -3270,6 +3491,15 @@ class U_COMMON_API UnicodeString : public Replaceable * // use ustr ... * } * \endcode + * + * Note, for string literals: + * Since C++17 and ICU 76, you can use UTF-16 string literals with compile-time + * length determination: + * \code + * UnicodeString str(u"literal"); + * if (str == u"other literal") { ... } + * \endcode + * * @param src String using only invariant characters. * @param textLength Length of src, or -1 if NUL-terminated. * @param inv Signature-distinguishing parameter, use US_INV. @@ -3343,6 +3573,58 @@ class U_COMMON_API UnicodeString : public Replaceable */ virtual ~UnicodeString(); +#ifndef U_HIDE_DRAFT_API + /** + * Readonly-aliasing factory method. + * Aliases the same buffer as the input `text` + * which is, or which is implicitly convertible to, + * a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view. + * The string is bogus if the string view is too long. + * + * The text will be used for the UnicodeString object, but + * it will not be released when the UnicodeString is destroyed. + * This has copy-on-write semantics: + * When the string is modified, then the buffer is first copied into + * newly allocated memory. + * The aliased buffer is never modified. + * + * In an assignment to another UnicodeString, when using the copy constructor + * or the assignment operator, the text will be copied. + * When using fastCopyFrom(), the text will be aliased again, + * so that both strings then alias the same readonly-text. + * + * @param text The string view to alias for the UnicodeString. + * @draft ICU 76 + */ + template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>> + static inline UnicodeString readOnlyAlias(const S &text) { + return readOnlyAliasFromU16StringView(internal::toU16StringView(text)); + } + + /** + * Readonly-aliasing factory method. + * Aliases the same buffer as the input `text`. + * + * The text will be used for the UnicodeString object, but + * it will not be released when the UnicodeString is destroyed. + * This has copy-on-write semantics: + * When the string is modified, then the buffer is first copied into + * newly allocated memory. + * The aliased buffer is never modified. + * + * In an assignment to another UnicodeString, when using the copy constructor + * or the assignment operator, the text will be copied. + * When using fastCopyFrom(), the text will be aliased again, + * so that both strings then alias the same readonly-text. + * + * @param text The UnicodeString to alias. + * @draft ICU 76 + */ + static inline UnicodeString readOnlyAlias(const UnicodeString &text) { + return readOnlyAliasFromUnicodeString(text); + } +#endif // U_HIDE_DRAFT_API + /** * Create a UnicodeString from a UTF-8 string. * Illegal input is replaced with U+FFFD. Otherwise, errors result in a bogus string. @@ -3470,6 +3752,9 @@ class U_COMMON_API UnicodeString : public Replaceable virtual UChar32 getChar32At(int32_t offset) const override; private: + static UnicodeString readOnlyAliasFromU16StringView(std::u16string_view text); + static UnicodeString readOnlyAliasFromUnicodeString(const UnicodeString &text); + // For char* constructors. Could be made public. UnicodeString &setToUTF8(StringPiece utf8); // For extract(char*). @@ -3485,7 +3770,10 @@ class U_COMMON_API UnicodeString : public Replaceable * Internal string contents comparison, called by operator==. * Requires: this & text not bogus and have same lengths. */ - UBool doEquals(const UnicodeString &text, int32_t len) const; + inline UBool doEquals(const UnicodeString &text, int32_t len) const { + return doEquals(text.getArrayStart(), len); + } + UBool doEquals(const char16_t *text, int32_t len) const; inline UBool doEqualsSubstring(int32_t start, @@ -3580,9 +3868,11 @@ class U_COMMON_API UnicodeString : public Replaceable const char16_t *srcChars, int32_t srcStart, int32_t srcLength); + UnicodeString& doReplace(int32_t start, int32_t length, std::u16string_view src); UnicodeString& doAppend(const UnicodeString& src, int32_t srcStart, int32_t srcLength); UnicodeString& doAppend(const char16_t *srcChars, int32_t srcStart, int32_t srcLength); + UnicodeString& doAppend(std::u16string_view src); UnicodeString& doReverse(int32_t start, int32_t length); @@ -3711,7 +4001,7 @@ class U_COMMON_API UnicodeString : public Replaceable * Must be at least U16_MAX_LENGTH for the single-code point constructor to work. * @see UNISTR_OBJECT_SIZE */ - US_STACKBUF_SIZE=(int32_t)(UNISTR_OBJECT_SIZE-sizeof(void *)-2)/U_SIZEOF_UCHAR, + US_STACKBUF_SIZE = static_cast<int32_t>(UNISTR_OBJECT_SIZE - sizeof(void*) - 2) / U_SIZEOF_UCHAR, kInvalidUChar=0xffff, // U+FFFF returned by charAt(invalid index) kInvalidHashCode=0, // invalid hash code kEmptyHashCode=1, // hash code for empty string @@ -3802,7 +4092,7 @@ class U_COMMON_API UnicodeString : public Replaceable }; /** - * Create a new UnicodeString with the concatenation of two others. + * Creates a new UnicodeString from the concatenation of two others. * * @param s1 The first string to be copied to the new one. * @param s2 The second string to be copied to the new one, after s1. @@ -3812,6 +4102,29 @@ class U_COMMON_API UnicodeString : public Replaceable U_COMMON_API UnicodeString U_EXPORT2 operator+ (const UnicodeString &s1, const UnicodeString &s2); +#ifndef U_HIDE_DRAFT_API +/** + * Creates a new UnicodeString from the concatenation of a UnicodeString and `s2` + * which is, or which is implicitly convertible to, + * a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view. + * + * @param s1 The string to be copied to the new one. + * @param s2 The string view to be copied to the new string, after s1. + * @return UnicodeString(s1).append(s2) + * @draft ICU 76 + */ +template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>> +inline UnicodeString operator+(const UnicodeString &s1, const S &s2) { + return unistr_internalConcat(s1, internal::toU16StringView(s2)); +} +#endif // U_HIDE_DRAFT_API + +#ifndef U_FORCE_HIDE_INTERNAL_API +/** @internal */ +U_COMMON_API UnicodeString U_EXPORT2 +unistr_internalConcat(const UnicodeString &s1, std::u16string_view s2); +#endif + //======================================== // Inline members //======================================== @@ -3914,18 +4227,18 @@ UnicodeString::hashCode() const inline UBool UnicodeString::isBogus() const -{ return (UBool)(fUnion.fFields.fLengthAndFlags & kIsBogus); } +{ return fUnion.fFields.fLengthAndFlags & kIsBogus; } inline UBool UnicodeString::isWritable() const -{ return (UBool)!(fUnion.fFields.fLengthAndFlags&(kOpenGetBuffer|kIsBogus)); } +{ return !(fUnion.fFields.fLengthAndFlags & (kOpenGetBuffer | kIsBogus)); } inline UBool UnicodeString::isBufferWritable() const { - return (UBool)( + return !(fUnion.fFields.fLengthAndFlags&(kOpenGetBuffer|kIsBogus|kBufferIsReadonly)) && - (!(fUnion.fFields.fLengthAndFlags&kRefCounted) || refCount()==1)); + (!(fUnion.fFields.fLengthAndFlags&kRefCounted) || refCount()==1); } inline const char16_t * @@ -3950,7 +4263,7 @@ UnicodeString::doCompare(int32_t start, int32_t srcLength) const { if(srcText.isBogus()) { - return (int8_t)!isBogus(); // 0 if both are bogus, 1 otherwise + return static_cast<int8_t>(!isBogus()); // 0 if both are bogus, 1 otherwise } else { srcText.pinIndices(srcStart, srcLength); return doCompare(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); @@ -4057,7 +4370,7 @@ UnicodeString::doCompareCodePointOrder(int32_t start, int32_t srcLength) const { if(srcText.isBogus()) { - return (int8_t)!isBogus(); // 0 if both are bogus, 1 otherwise + return static_cast<int8_t>(!isBogus()); // 0 if both are bogus, 1 otherwise } else { srcText.pinIndices(srcStart, srcLength); return doCompareCodePointOrder(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); @@ -4119,7 +4432,7 @@ UnicodeString::doCaseCompare(int32_t start, uint32_t options) const { if(srcText.isBogus()) { - return (int8_t)!isBogus(); // 0 if both are bogus, 1 otherwise + return static_cast<int8_t>(!isBogus()); // 0 if both are bogus, 1 otherwise } else { srcText.pinIndices(srcStart, srcLength); return doCaseCompare(start, thisLength, srcText.getArrayStart(), srcStart, srcLength, options); @@ -4531,7 +4844,7 @@ UnicodeString::tempSubStringBetween(int32_t start, int32_t limit) const { inline char16_t UnicodeString::doCharAt(int32_t offset) const { - if((uint32_t)offset < (uint32_t)length()) { + if (static_cast<uint32_t>(offset) < static_cast<uint32_t>(length())) { return getArrayStart()[offset]; } else { return kInvalidUChar; @@ -4564,7 +4877,7 @@ inline void UnicodeString::setShortLength(int32_t len) { // requires 0 <= len <= kMaxShortLength fUnion.fFields.fLengthAndFlags = - (int16_t)((fUnion.fFields.fLengthAndFlags & kAllStorageFlags) | (len << kLengthShift)); + static_cast<int16_t>((fUnion.fFields.fLengthAndFlags & kAllStorageFlags) | (len << kLengthShift)); } inline void @@ -4758,7 +5071,7 @@ UnicodeString::truncate(int32_t targetLength) // truncate(0) of a bogus string makes the string empty and non-bogus unBogus(); return false; - } else if((uint32_t)targetLength < (uint32_t)length()) { + } else if (static_cast<uint32_t>(targetLength) < static_cast<uint32_t>(length())) { setLength(targetLength); return true; } else { diff --git a/deps/icu-small/source/common/unicode/unorm2.h b/deps/icu-small/source/common/unicode/unorm2.h index 3844041f1704da..48f614d74fbfb7 100644 --- a/deps/icu-small/source/common/unicode/unorm2.h +++ b/deps/icu-small/source/common/unicode/unorm2.h @@ -197,7 +197,6 @@ unorm2_getNFKDInstance(UErrorCode *pErrorCode); U_CAPI const UNormalizer2 * U_EXPORT2 unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); -#ifndef U_HIDE_DRAFT_API /** * Returns a UNormalizer2 instance for a variant of Unicode toNFKC_Casefold() normalization * which is equivalent to applying the NFKC_Simple_Casefold mappings and then NFC. @@ -210,11 +209,10 @@ unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); * immediately. Check for U_FAILURE() on output or use with * function chaining. (See User Guide for details.) * @return the requested Normalizer2, if successful - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI const UNormalizer2 * U_EXPORT2 unorm2_getNFKCSimpleCasefoldInstance(UErrorCode *pErrorCode); -#endif // U_HIDE_DRAFT_API /** * Returns a UNormalizer2 instance which uses the specified data file diff --git a/deps/icu-small/source/common/unicode/urename.h b/deps/icu-small/source/common/unicode/urename.h index c94592ec034864..e39c779e81ef3d 100644 --- a/deps/icu-small/source/common/unicode/urename.h +++ b/deps/icu-small/source/common/unicode/urename.h @@ -490,6 +490,7 @@ #define ubiditransform_close U_ICU_ENTRY_POINT_RENAME(ubiditransform_close) #define ubiditransform_open U_ICU_ENTRY_POINT_RENAME(ubiditransform_open) #define ubiditransform_transform U_ICU_ENTRY_POINT_RENAME(ubiditransform_transform) +#define ublock_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(ublock_addPropertyStarts) #define ublock_getCode U_ICU_ENTRY_POINT_RENAME(ublock_getCode) #define ubrk_clone U_ICU_ENTRY_POINT_RENAME(ubrk_clone) #define ubrk_close U_ICU_ENTRY_POINT_RENAME(ubrk_close) @@ -991,6 +992,7 @@ #define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareCaselessUnicodeString) #define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) #define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) +#define uhash_compareIStringView U_ICU_ENTRY_POINT_RENAME(uhash_compareIStringView) #define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) #define uhash_compareScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_compareScriptSet) #define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) @@ -1008,6 +1010,7 @@ #define uhash_hashCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashCaselessUnicodeString) #define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars) #define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars) +#define uhash_hashIStringView U_ICU_ENTRY_POINT_RENAME(uhash_hashIStringView) #define uhash_hashLong U_ICU_ENTRY_POINT_RENAME(uhash_hashLong) #define uhash_hashScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_hashScriptSet) #define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars) @@ -1209,10 +1212,14 @@ #define ulocimp_minimizeSubtags U_ICU_ENTRY_POINT_RENAME(ulocimp_minimizeSubtags) #define ulocimp_setKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocimp_setKeywordValue) #define ulocimp_toBcpKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpKey) +#define ulocimp_toBcpKeyWithFallback U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpKeyWithFallback) #define ulocimp_toBcpType U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpType) +#define ulocimp_toBcpTypeWithFallback U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpTypeWithFallback) #define ulocimp_toLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_toLanguageTag) #define ulocimp_toLegacyKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyKey) +#define ulocimp_toLegacyKeyWithFallback U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyKeyWithFallback) #define ulocimp_toLegacyType U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyType) +#define ulocimp_toLegacyTypeWithFallback U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyTypeWithFallback) #define ultag_getTKeyStart U_ICU_ENTRY_POINT_RENAME(ultag_getTKeyStart) #define ultag_isExtensionSubtags U_ICU_ENTRY_POINT_RENAME(ultag_isExtensionSubtags) #define ultag_isLanguageSubtag U_ICU_ENTRY_POINT_RENAME(ultag_isLanguageSubtag) @@ -1773,6 +1780,8 @@ #define uset_getSerializedRange U_ICU_ENTRY_POINT_RENAME(uset_getSerializedRange) #define uset_getSerializedRangeCount U_ICU_ENTRY_POINT_RENAME(uset_getSerializedRangeCount) #define uset_getSerializedSet U_ICU_ENTRY_POINT_RENAME(uset_getSerializedSet) +#define uset_getString U_ICU_ENTRY_POINT_RENAME(uset_getString) +#define uset_getStringCount U_ICU_ENTRY_POINT_RENAME(uset_getStringCount) #define uset_hasStrings U_ICU_ENTRY_POINT_RENAME(uset_hasStrings) #define uset_indexOf U_ICU_ENTRY_POINT_RENAME(uset_indexOf) #define uset_isEmpty U_ICU_ENTRY_POINT_RENAME(uset_isEmpty) @@ -1811,7 +1820,6 @@ #define usnum_setMinimumIntegerDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMinimumIntegerDigits) #define usnum_setSign U_ICU_ENTRY_POINT_RENAME(usnum_setSign) #define usnum_setToInt64 U_ICU_ENTRY_POINT_RENAME(usnum_setToInt64) -#define usnum_truncateStart U_ICU_ENTRY_POINT_RENAME(usnum_truncateStart) #define usnumf_close U_ICU_ENTRY_POINT_RENAME(usnumf_close) #define usnumf_format U_ICU_ENTRY_POINT_RENAME(usnumf_format) #define usnumf_formatInt64 U_ICU_ENTRY_POINT_RENAME(usnumf_formatInt64) diff --git a/deps/icu-small/source/common/unicode/uscript.h b/deps/icu-small/source/common/unicode/uscript.h index 2c9cee1bfa44ba..d983c40901fb91 100644 --- a/deps/icu-small/source/common/unicode/uscript.h +++ b/deps/icu-small/source/common/unicode/uscript.h @@ -503,6 +503,21 @@ typedef enum UScriptCode { /** @stable ICU 75 */ USCRIPT_ARABIC_NASTALIQ = 200, /* Aran */ + /** @stable ICU 76 */ + USCRIPT_GARAY = 201, /* Gara */ + /** @stable ICU 76 */ + USCRIPT_GURUNG_KHEMA = 202, /* Gukh */ + /** @stable ICU 76 */ + USCRIPT_KIRAT_RAI = 203, /* Krai */ + /** @stable ICU 76 */ + USCRIPT_OL_ONAL = 204, /* Onao */ + /** @stable ICU 76 */ + USCRIPT_SUNUWAR = 205, /* Sunu */ + /** @stable ICU 76 */ + USCRIPT_TODHRI = 206, /* Todr */ + /** @stable ICU 76 */ + USCRIPT_TULU_TIGALARI = 207, /* Tutg */ + #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal UScriptCode value. @@ -510,7 +525,7 @@ typedef enum UScriptCode { * * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - USCRIPT_CODE_LIMIT = 201 + USCRIPT_CODE_LIMIT = 208 #endif // U_HIDE_DEPRECATED_API } UScriptCode; diff --git a/deps/icu-small/source/common/unicode/uset.h b/deps/icu-small/source/common/unicode/uset.h index cce95ce92120dd..c8f9b5592df2ea 100644 --- a/deps/icu-small/source/common/unicode/uset.h +++ b/deps/icu-small/source/common/unicode/uset.h @@ -33,7 +33,10 @@ #include "unicode/uchar.h" #if U_SHOW_CPLUSPLUS_API +#include <string_view> +#include "unicode/char16ptr.h" #include "unicode/localpointer.h" +#include "unicode/unistr.h" #endif // U_SHOW_CPLUSPLUS_API #ifndef USET_DEFINED @@ -955,7 +958,7 @@ uset_charAt(const USet* set, int32_t charIndex); /** * Returns the number of characters and strings contained in this set. - * The last (uset_getItemCount() - uset_getRangeCount()) items are strings. + * The last uset_getStringCount() == (uset_getItemCount() - uset_getRangeCount()) items are strings. * * This is slower than uset_getRangeCount() and uset_getItemCount() because * it counts the code points of all ranges. @@ -965,6 +968,8 @@ uset_charAt(const USet* set, int32_t charIndex); * contained in set * @stable ICU 2.4 * @see uset_getRangeCount + * @see uset_getStringCount + * @see uset_getItemCount */ U_CAPI int32_t U_EXPORT2 uset_size(const USet* set); @@ -975,11 +980,42 @@ uset_size(const USet* set); * @stable ICU 70 * @see uset_getItemCount * @see uset_getItem + * @see uset_getStringCount * @see uset_size */ U_CAPI int32_t U_EXPORT2 uset_getRangeCount(const USet *set); +#ifndef U_HIDE_DRAFT_API + +/** + * @param set the set + * @return the number of strings in this set. + * @draft ICU 76 + * @see uset_getRangeCount + * @see uset_getItemCount + * @see uset_size + */ +U_CAPI int32_t U_EXPORT2 +uset_getStringCount(const USet *set); + +/** + * Returns the index-th string (empty or multi-character) in the set. + * The string may not be NUL-terminated. + * The output length must be used, and the caller must not read more than that many UChars. + * + * @param set the set + * @param index the string index, 0 .. uset_getStringCount() - 1 + * @param pLength the output string length; must not be NULL + * @return the pointer to the string; NULL if the index is out of range or pLength is NULL + * @draft ICU 76 + * @see uset_getStringCount + */ +U_CAPI const UChar* U_EXPORT2 +uset_getString(const USet *set, int32_t index, int32_t *pLength); + +#endif // U_HIDE_DRAFT_API + /** * Returns the number of items in this set. An item is either a range * of characters or a single multicharacter string. @@ -987,6 +1023,8 @@ uset_getRangeCount(const USet *set); * @return a non-negative integer counting the character ranges * and/or strings contained in set * @stable ICU 2.4 + * @see uset_getRangeCount + * @see uset_getStringCount */ U_CAPI int32_t U_EXPORT2 uset_getItemCount(const USet* set); @@ -1001,6 +1039,7 @@ uset_getItemCount(const USet* set); * If <code>itemIndex</code> is at least uset_getRangeCount() and less than uset_getItemCount(), then * this function copies the string into <code>str[strCapacity]</code> and * returns the length of the string (0 for the empty string). + * See uset_getString() for a function that does not copy the string contents. * * If <code>itemIndex</code> is out of range, then this function returns -1. * @@ -1018,6 +1057,7 @@ uset_getItemCount(const USet* set); * @return the length of the string (0 or >= 2), or 0 if the item is a range, * or -1 if the itemIndex is out of range * @stable ICU 2.4 + * @see uset_getString */ U_CAPI int32_t U_EXPORT2 uset_getItem(const USet* set, int32_t itemIndex, @@ -1285,4 +1325,574 @@ U_CAPI UBool U_EXPORT2 uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, UChar32* pStart, UChar32* pEnd); -#endif +#if U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API +#ifndef U_HIDE_DRAFT_API + +namespace U_HEADER_ONLY_NAMESPACE { + +// Note: Not U_COMMON_API, and not a subclass of UMemory, because this is a header-only class, +// not intended to be used via export from the ICU DLL. + +/** + * Iterator returned by USetCodePoints. + * @draft ICU 76 + */ +class USetCodePointIterator { +public: + /** @draft ICU 76 */ + USetCodePointIterator(const USetCodePointIterator &other) = default; + + /** @draft ICU 76 */ + bool operator==(const USetCodePointIterator &other) const { + // No need to compare rangeCount & end given private constructor + // and assuming we don't compare iterators across the set being modified. + // And comparing rangeIndex is redundant with comparing c. + // We might even skip comparing uset. + // Unless we want operator==() to be "correct" for more than iteration. + return uset == other.uset && c == other.c; + } + + /** @draft ICU 76 */ + bool operator!=(const USetCodePointIterator &other) const { return !operator==(other); } + + /** @draft ICU 76 */ + UChar32 operator*() const { return c; } + + /** + * Pre-increment. + * @draft ICU 76 + */ + USetCodePointIterator &operator++() { + if (c < end) { + ++c; + } else if (rangeIndex < rangeCount) { + UErrorCode errorCode = U_ZERO_ERROR; + int32_t result = uset_getItem(uset, rangeIndex, &c, &end, nullptr, 0, &errorCode); + if (U_SUCCESS(errorCode) && result == 0) { + ++rangeIndex; + } else { + c = end = U_SENTINEL; + } + } else { + c = end = U_SENTINEL; + } + return *this; + } + + /** + * Post-increment. + * @draft ICU 76 + */ + USetCodePointIterator operator++(int) { + USetCodePointIterator result(*this); + operator++(); + return result; + } + +private: + friend class USetCodePoints; + + USetCodePointIterator(const USet *uset, int32_t rangeIndex, int32_t rangeCount) + : uset(uset), rangeIndex(rangeIndex), rangeCount(rangeCount), + c(U_SENTINEL), end(U_SENTINEL) { + // Fetch the first range. + operator++(); + } + + const USet *uset; + int32_t rangeIndex; + int32_t rangeCount; + UChar32 c, end; +}; + +/** + * C++ "range" for iterating over the code points of a USet. + * + * \code + * using U_HEADER_NESTED_NAMESPACE::USetCodePoints; + * LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴]", -1, &errorCode)); + * for (UChar32 c : USetCodePoints(uset.getAlias())) { + * printf("uset.codePoint U+%04lx\n", (long)c); + * } + * \endcode + * + * C++ UnicodeSet has member functions for iteration, including codePoints(). + * + * @draft ICU 76 + * @see USetRanges + * @see USetStrings + * @see USetElements + */ +class USetCodePoints { +public: + /** + * Constructs a C++ "range" object over the code points of the USet. + * @draft ICU 76 + */ + USetCodePoints(const USet *uset) : uset(uset), rangeCount(uset_getRangeCount(uset)) {} + + /** @draft ICU 76 */ + USetCodePoints(const USetCodePoints &other) = default; + + /** @draft ICU 76 */ + USetCodePointIterator begin() const { + return USetCodePointIterator(uset, 0, rangeCount); + } + + /** @draft ICU 76 */ + USetCodePointIterator end() const { + return USetCodePointIterator(uset, rangeCount, rangeCount); + } + +private: + const USet *uset; + int32_t rangeCount; +}; + +/** + * A contiguous range of code points in a USet/UnicodeSet. + * Returned by USetRangeIterator which is returned by USetRanges. + * Both the rangeStart and rangeEnd are in the range. + * (end() returns an iterator corresponding to rangeEnd+1.) + * @draft ICU 76 + */ +struct CodePointRange { + /** @draft ICU 76 */ + struct iterator { + /** @draft ICU 76 */ + iterator(UChar32 c) : c(c) {} + + /** @draft ICU 76 */ + bool operator==(const iterator &other) const { return c == other.c; } + /** @draft ICU 76 */ + bool operator!=(const iterator &other) const { return !operator==(other); } + + /** @draft ICU 76 */ + UChar32 operator*() const { return c; } + + /** + * Pre-increment. + * @draft ICU 76 + */ + iterator &operator++() { + ++c; + return *this; + } + + /** + * Post-increment. + * @draft ICU 76 + */ + iterator operator++(int) { + return c++; + } + + /** + * The current code point in the range. + * @draft ICU 76 + */ + UChar32 c; + }; + + /** @draft ICU 76 */ + CodePointRange(UChar32 start, UChar32 end) : rangeStart(start), rangeEnd(end) {} + /** @draft ICU 76 */ + CodePointRange(const CodePointRange &other) = default; + /** @draft ICU 76 */ + size_t size() const { return (rangeEnd + 1) - rangeStart; } + /** @draft ICU 76 */ + iterator begin() const { return rangeStart; } + /** @draft ICU 76 */ + iterator end() const { return rangeEnd + 1; } + + /** + * Start of a USet/UnicodeSet range of code points. + * @draft ICU 76 + */ + UChar32 rangeStart; + /** + * Inclusive end of a USet/UnicodeSet range of code points. + * @draft ICU 76 + */ + UChar32 rangeEnd; +}; + +/** + * Iterator returned by USetRanges. + * @draft ICU 76 + */ +class USetRangeIterator { +public: + /** @draft ICU 76 */ + USetRangeIterator(const USetRangeIterator &other) = default; + + /** @draft ICU 76 */ + bool operator==(const USetRangeIterator &other) const { + // No need to compare rangeCount given private constructor + // and assuming we don't compare iterators across the set being modified. + // We might even skip comparing uset. + // Unless we want operator==() to be "correct" for more than iteration. + return uset == other.uset && rangeIndex == other.rangeIndex; + } + + /** @draft ICU 76 */ + bool operator!=(const USetRangeIterator &other) const { return !operator==(other); } + + /** @draft ICU 76 */ + CodePointRange operator*() const { + if (rangeIndex < rangeCount) { + UChar32 start, end; + UErrorCode errorCode = U_ZERO_ERROR; + int32_t result = uset_getItem(uset, rangeIndex, &start, &end, nullptr, 0, &errorCode); + if (U_SUCCESS(errorCode) && result == 0) { + return CodePointRange(start, end); + } + } + return CodePointRange(U_SENTINEL, U_SENTINEL); + } + + /** + * Pre-increment. + * @draft ICU 76 + */ + USetRangeIterator &operator++() { + ++rangeIndex; + return *this; + } + + /** + * Post-increment. + * @draft ICU 76 + */ + USetRangeIterator operator++(int) { + USetRangeIterator result(*this); + ++rangeIndex; + return result; + } + +private: + friend class USetRanges; + + USetRangeIterator(const USet *uset, int32_t rangeIndex, int32_t rangeCount) + : uset(uset), rangeIndex(rangeIndex), rangeCount(rangeCount) {} + + const USet *uset; + int32_t rangeIndex; + int32_t rangeCount; +}; + +/** + * C++ "range" for iterating over the code point ranges of a USet. + * + * \code + * using U_HEADER_NESTED_NAMESPACE::USetRanges; + * LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴]", -1, &errorCode)); + * for (auto [start, end] : USetRanges(uset.getAlias())) { + * printf("uset.range U+%04lx..U+%04lx\n", (long)start, (long)end); + * } + * for (auto range : USetRanges(uset.getAlias())) { + * for (UChar32 c : range) { + * printf("uset.range.c U+%04lx\n", (long)c); + * } + * } + * \endcode + * + * C++ UnicodeSet has member functions for iteration, including ranges(). + * + * @draft ICU 76 + * @see USetCodePoints + * @see USetStrings + * @see USetElements + */ +class USetRanges { +public: + /** + * Constructs a C++ "range" object over the code point ranges of the USet. + * @draft ICU 76 + */ + USetRanges(const USet *uset) : uset(uset), rangeCount(uset_getRangeCount(uset)) {} + + /** @draft ICU 76 */ + USetRanges(const USetRanges &other) = default; + + /** @draft ICU 76 */ + USetRangeIterator begin() const { + return USetRangeIterator(uset, 0, rangeCount); + } + + /** @draft ICU 76 */ + USetRangeIterator end() const { + return USetRangeIterator(uset, rangeCount, rangeCount); + } + +private: + const USet *uset; + int32_t rangeCount; +}; + +/** + * Iterator returned by USetStrings. + * @draft ICU 76 + */ +class USetStringIterator { +public: + /** @draft ICU 76 */ + USetStringIterator(const USetStringIterator &other) = default; + + /** @draft ICU 76 */ + bool operator==(const USetStringIterator &other) const { + // No need to compare count given private constructor + // and assuming we don't compare iterators across the set being modified. + // We might even skip comparing uset. + // Unless we want operator==() to be "correct" for more than iteration. + return uset == other.uset && index == other.index; + } + + /** @draft ICU 76 */ + bool operator!=(const USetStringIterator &other) const { return !operator==(other); } + + /** @draft ICU 76 */ + std::u16string_view operator*() const { + if (index < count) { + int32_t length; + const UChar *uchars = uset_getString(uset, index, &length); + // assert uchars != nullptr; + return {ConstChar16Ptr(uchars), static_cast<uint32_t>(length)}; + } + return {}; + } + + /** + * Pre-increment. + * @draft ICU 76 + */ + USetStringIterator &operator++() { + ++index; + return *this; + } + + /** + * Post-increment. + * @draft ICU 76 + */ + USetStringIterator operator++(int) { + USetStringIterator result(*this); + ++index; + return result; + } + +private: + friend class USetStrings; + + USetStringIterator(const USet *uset, int32_t index, int32_t count) + : uset(uset), index(index), count(count) {} + + const USet *uset; + int32_t index; + int32_t count; +}; + +/** + * C++ "range" for iterating over the empty and multi-character strings of a USet. + * + * \code + * using U_HEADER_NESTED_NAMESPACE::USetStrings; + * LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴{}{abc}{de}]", -1, &errorCode)); + * for (auto s : USetStrings(uset.getAlias())) { + * UnicodeString us(s); + * std::string u8; + * printf("uset.string length %ld \"%s\"\n", (long)s.length(), us.toUTF8String(u8).c_str()); + * } + * \endcode + * + * C++ UnicodeSet has member functions for iteration, including strings(). + * + * @draft ICU 76 + * @see USetCodePoints + * @see USetRanges + * @see USetElements + */ +class USetStrings { +public: + /** + * Constructs a C++ "range" object over the strings of the USet. + * @draft ICU 76 + */ + USetStrings(const USet *uset) : uset(uset), count(uset_getStringCount(uset)) {} + + /** @draft ICU 76 */ + USetStrings(const USetStrings &other) = default; + + /** @draft ICU 76 */ + USetStringIterator begin() const { + return USetStringIterator(uset, 0, count); + } + + /** @draft ICU 76 */ + USetStringIterator end() const { + return USetStringIterator(uset, count, count); + } + +private: + const USet *uset; + int32_t count; +}; + +/** + * Iterator returned by USetElements. + * @draft ICU 76 + */ +class USetElementIterator { +public: + /** @draft ICU 76 */ + USetElementIterator(const USetElementIterator &other) = default; + + /** @draft ICU 76 */ + bool operator==(const USetElementIterator &other) const { + // No need to compare rangeCount & end given private constructor + // and assuming we don't compare iterators across the set being modified. + // We might even skip comparing uset. + // Unless we want operator==() to be "correct" for more than iteration. + return uset == other.uset && c == other.c && index == other.index; + } + + /** @draft ICU 76 */ + bool operator!=(const USetElementIterator &other) const { return !operator==(other); } + + /** @draft ICU 76 */ + UnicodeString operator*() const { + if (c >= 0) { + return UnicodeString(c); + } else if (index < totalCount) { + int32_t length; + const UChar *uchars = uset_getString(uset, index - rangeCount, &length); + // assert uchars != nullptr; + return UnicodeString(uchars, length); + } else { + return UnicodeString(); + } + } + + /** + * Pre-increment. + * @draft ICU 76 + */ + USetElementIterator &operator++() { + if (c < end) { + ++c; + } else if (index < rangeCount) { + UErrorCode errorCode = U_ZERO_ERROR; + int32_t result = uset_getItem(uset, index, &c, &end, nullptr, 0, &errorCode); + if (U_SUCCESS(errorCode) && result == 0) { + ++index; + } else { + c = end = U_SENTINEL; + } + } else if (c >= 0) { + // assert index == rangeCount; + // Switch from the last range to the first string. + c = end = U_SENTINEL; + } else { + ++index; + } + return *this; + } + + /** + * Post-increment. + * @draft ICU 76 + */ + USetElementIterator operator++(int) { + USetElementIterator result(*this); + operator++(); + return result; + } + +private: + friend class USetElements; + + USetElementIterator(const USet *uset, int32_t index, int32_t rangeCount, int32_t totalCount) + : uset(uset), index(index), rangeCount(rangeCount), totalCount(totalCount), + c(U_SENTINEL), end(U_SENTINEL) { + if (index < rangeCount) { + // Fetch the first range. + operator++(); + } + // Otherwise don't move beyond the (index - rangeCount)-th string. + } + + const USet *uset; + int32_t index; + /** Number of UnicodeSet/USet code point ranges. */ + int32_t rangeCount; + /** + * Number of code point ranges plus number of strings. + * index starts from 0, counts ranges while less than rangeCount, + * then counts strings while at least rangeCount and less than totalCount. + * + * Note that totalCount is the same as uset_getItemCount(), but usually + * smaller than the number of elements returned by this iterator + * because we return each code point of each range. + */ + int32_t totalCount; + UChar32 c, end; +}; + +/** + * A C++ "range" for iterating over all of the elements of a USet. + * Convenient all-in one iteration, but creates a UnicodeString for each + * code point or string. + * + * Code points are returned first, then empty and multi-character strings. + * + * \code + * using U_HEADER_NESTED_NAMESPACE::USetElements; + * LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴{}{abc}{de}]", -1, &errorCode)); + * for (auto el : USetElements(uset.getAlias())) { + * std::string u8; + * printf("uset.string length %ld \"%s\"\n", (long)el.length(), el.toUTF8String(u8).c_str()); + * } + * \endcode + * + * C++ UnicodeSet has member functions for iteration, including begin() and end(). + * + * @return an all-elements iterator. + * @draft ICU 76 + * @see USetCodePoints + * @see USetRanges + * @see USetStrings + */ +class USetElements { +public: + /** + * Constructs a C++ "range" object over all of the elements of the USet. + * @draft ICU 76 + */ + USetElements(const USet *uset) + : uset(uset), rangeCount(uset_getRangeCount(uset)), + stringCount(uset_getStringCount(uset)) {} + + /** @draft ICU 76 */ + USetElements(const USetElements &other) = default; + + /** @draft ICU 76 */ + USetElementIterator begin() const { + return USetElementIterator(uset, 0, rangeCount, rangeCount + stringCount); + } + + /** @draft ICU 76 */ + USetElementIterator end() const { + return USetElementIterator(uset, rangeCount + stringCount, rangeCount, rangeCount + stringCount); + } + +private: + const USet *uset; + int32_t rangeCount, stringCount; +}; + +} // namespace U_HEADER_ONLY_NAMESPACE + +#endif // U_HIDE_DRAFT_API +#endif // U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API + +#endif // __USET_H__ diff --git a/deps/icu-small/source/common/unicode/ustring.h b/deps/icu-small/source/common/unicode/ustring.h index 03c697c7228442..a3d08254d69584 100644 --- a/deps/icu-small/source/common/unicode/ustring.h +++ b/deps/icu-small/source/common/unicode/ustring.h @@ -1107,8 +1107,8 @@ u_strToLower(UChar *dest, int32_t destCapacity, * styles, using rules and dictionaries beyond the standard iterators. * It may be more efficient to always provide an iterator to avoid * opening and closing one for each string. - * The standard titlecase iterator for the root locale implements the - * algorithm of Unicode TR 21. + * If the break iterator passed in is null, the default Unicode algorithm + * will be used to determine the titlecase positions. * * This function uses only the setText(), first() and next() methods of the * provided break iterator. diff --git a/deps/icu-small/source/common/unicode/utypes.h b/deps/icu-small/source/common/unicode/utypes.h index 6c7cc5134588ea..0151ebd4701576 100644 --- a/deps/icu-small/source/common/unicode/utypes.h +++ b/deps/icu-small/source/common/unicode/utypes.h @@ -54,22 +54,37 @@ * integer and other types. */ +/** @{ API visibility control */ /** * \def U_SHOW_CPLUSPLUS_API + * When defined to 1 (=default) and compiled with a C++ compiler, both C and C++ APIs are visible. + * Otherwise, only C APIs are visible; this is for C++ users who want to + * restrict their usage to binary stable C APIs exported by ICU DLLs. + * @internal + */ +/** + * \def U_SHOW_CPLUSPLUS_HEADER_API + * When defined to 1 (=default) and compiled with a C++ compiler, C++ header-only APIs are visible. + * This is for C++ users who restrict their usage to binary stable C APIs exported by ICU DLLs + * (U_SHOW_CPLUSPLUS_API=0) + * but who still want to use C++ header-only APIs which do not rely on ICU DLL exports. * @internal */ #ifdef __cplusplus # ifndef U_SHOW_CPLUSPLUS_API # define U_SHOW_CPLUSPLUS_API 1 # endif +# ifndef U_SHOW_CPLUSPLUS_HEADER_API +# define U_SHOW_CPLUSPLUS_HEADER_API 1 +# endif #else # undef U_SHOW_CPLUSPLUS_API # define U_SHOW_CPLUSPLUS_API 0 +# undef U_SHOW_CPLUSPLUS_HEADER_API +# define U_SHOW_CPLUSPLUS_HEADER_API 0 #endif -/** @{ API visibility control */ - /** * \def U_HIDE_DRAFT_API * Define this to 1 to request that draft API be "hidden" @@ -582,14 +597,13 @@ typedef enum UErrorCode { U_MF_MISSING_SELECTOR_ANNOTATION_ERROR, /**< A selector expression evaluates to an unannotated operand. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ U_MF_DUPLICATE_DECLARATION_ERROR, /**< The same variable is declared in more than one .local or .input declaration. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ U_MF_OPERAND_MISMATCH_ERROR, /**< An operand provided to a function does not have the required form for that function @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ - U_MF_UNSUPPORTED_STATEMENT_ERROR, /**< A message includes a reserved statement. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ - U_MF_UNSUPPORTED_EXPRESSION_ERROR, /**< A message includes syntax reserved for future standardization or private implementation use. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */ + U_MF_DUPLICATE_VARIANT_ERROR, /**< A message includes a variant with the same key list as another variant. @internal ICU 76 technology preview @deprecated This API is for technology preview only. */ #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal formatting API error code. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - U_FMT_PARSE_ERROR_LIMIT = 0x10121, + U_FMT_PARSE_ERROR_LIMIT = 0x10120, #endif // U_HIDE_DEPRECATED_API /* @@ -713,13 +727,13 @@ typedef enum UErrorCode { * @stable ICU 2.0 */ static - inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); } + inline UBool U_SUCCESS(UErrorCode code) { return code <= U_ZERO_ERROR; } /** * Does the error code indicate a failure? * @stable ICU 2.0 */ static - inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); } + inline UBool U_FAILURE(UErrorCode code) { return code > U_ZERO_ERROR; } #else /** * Does the error code indicate success? diff --git a/deps/icu-small/source/common/unicode/uvernum.h b/deps/icu-small/source/common/unicode/uvernum.h index eb7c50f385605e..a3cb882623be86 100644 --- a/deps/icu-small/source/common/unicode/uvernum.h +++ b/deps/icu-small/source/common/unicode/uvernum.h @@ -53,7 +53,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION_MAJOR_NUM 75 +#define U_ICU_VERSION_MAJOR_NUM 76 /** The current ICU minor version as an integer. * This value will change in the subsequent releases of ICU @@ -79,7 +79,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ -#define U_ICU_VERSION_SUFFIX _75 +#define U_ICU_VERSION_SUFFIX _76 /** * \def U_DEF2_ICU_ENTRY_POINT_RENAME @@ -132,7 +132,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION "75.1" +#define U_ICU_VERSION "76.1" /** * The current ICU library major version number as a string, for library name suffixes. @@ -145,13 +145,13 @@ * * @stable ICU 2.6 */ -#define U_ICU_VERSION_SHORT "75" +#define U_ICU_VERSION_SHORT "76" #ifndef U_HIDE_INTERNAL_API /** Data version in ICU4C. * @internal ICU 4.4 Internal Use Only **/ -#define U_ICU_DATA_VERSION "75.1" +#define U_ICU_DATA_VERSION "76.1" #endif /* U_HIDE_INTERNAL_API */ /*=========================================================================== diff --git a/deps/icu-small/source/common/unicode/uversion.h b/deps/icu-small/source/common/unicode/uversion.h index 113568df8c127d..25d73a3aeb5449 100644 --- a/deps/icu-small/source/common/unicode/uversion.h +++ b/deps/icu-small/source/common/unicode/uversion.h @@ -124,6 +124,49 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; # if U_USING_ICU_NAMESPACE U_NAMESPACE_USE # endif + +#ifndef U_HIDE_DRAFT_API +/** + * \def U_HEADER_NESTED_NAMESPACE + * Nested namespace used inside U_ICU_NAMESPACE for header-only APIs. + * Different when used inside ICU to prevent public use of internal instantiations: + * "header" when compiling calling code; "internal" when compiling ICU library code. + * + * When compiling for Windows, where DLL exports of APIs are explicit, + * this is always "header". Header-only types are not marked for export, + * which on Windows already avoids callers linking with library instantiations. + * + * @draft ICU 76 + * @see U_HEADER_ONLY_NAMESPACE + */ + +/** + * \def U_HEADER_ONLY_NAMESPACE + * Namespace used for header-only APIs. + * Different when used inside ICU to prevent public use of internal instantiations. + * "U_ICU_NAMESPACE::header" or "U_ICU_NAMESPACE::internal", + * see U_HEADER_NESTED_NAMESPACE for details. + * + * @draft ICU 76 + */ + +// The first test is the same as for defining U_EXPORT for Windows. +#if defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \ + UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__)) +# define U_HEADER_NESTED_NAMESPACE header +#elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \ + defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \ + defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION) +# define U_HEADER_NESTED_NAMESPACE internal +#else +# define U_HEADER_NESTED_NAMESPACE header +#endif + +#define U_HEADER_ONLY_NAMESPACE U_ICU_NAMESPACE::U_HEADER_NESTED_NAMESPACE + +namespace U_HEADER_ONLY_NAMESPACE {} +#endif // U_HIDE_DRAFT_API + #endif /* __cplusplus */ /*===========================================================================*/ diff --git a/deps/icu-small/source/common/unifiedcache.cpp b/deps/icu-small/source/common/unifiedcache.cpp index 1284c03813eb85..68af4e04c1b438 100644 --- a/deps/icu-small/source/common/unifiedcache.cpp +++ b/deps/icu-small/source/common/unifiedcache.cpp @@ -47,20 +47,20 @@ U_NAMESPACE_BEGIN int32_t U_EXPORT2 ucache_hashKeys(const UHashTok key) { - const CacheKeyBase *ckey = (const CacheKeyBase *) key.pointer; + const CacheKeyBase* ckey = static_cast<const CacheKeyBase*>(key.pointer); return ckey->hashCode(); } UBool U_EXPORT2 ucache_compareKeys(const UHashTok key1, const UHashTok key2) { - const CacheKeyBase *p1 = (const CacheKeyBase *) key1.pointer; - const CacheKeyBase *p2 = (const CacheKeyBase *) key2.pointer; + const CacheKeyBase* p1 = static_cast<const CacheKeyBase*>(key1.pointer); + const CacheKeyBase* p2 = static_cast<const CacheKeyBase*>(key2.pointer); return *p1 == *p2; } void U_EXPORT2 ucache_deleteKey(void *obj) { - CacheKeyBase *p = (CacheKeyBase *) obj; + CacheKeyBase* p = static_cast<CacheKeyBase*>(obj); delete p; } @@ -253,7 +253,7 @@ UBool UnifiedCache::_flush(UBool all) const { } if (all || _isEvictable(element)) { const SharedObject *sharedObject = - (const SharedObject *) element->value.pointer; + static_cast<const SharedObject*>(element->value.pointer); U_ASSERT(sharedObject->cachePtr == this); uhash_removeElement(fHashtable, element); removeSoftRef(sharedObject); // Deletes the sharedObject when softRefCount goes to zero. @@ -269,7 +269,7 @@ int32_t UnifiedCache::_computeCountOfItemsToEvict() const { int32_t unusedLimitByPercentage = fNumValuesInUse * fMaxPercentageOfInUse / 100; int32_t unusedLimit = std::max(unusedLimitByPercentage, fMaxUnused); - int32_t countOfItemsToEvict = std::max(0, evictableItems - unusedLimit); + int32_t countOfItemsToEvict = std::max<int32_t>(0, evictableItems - unusedLimit); return countOfItemsToEvict; } @@ -285,7 +285,7 @@ void UnifiedCache::_runEvictionSlice() const { } if (_isEvictable(element)) { const SharedObject *sharedObject = - (const SharedObject *) element->value.pointer; + static_cast<const SharedObject*>(element->value.pointer); uhash_removeElement(fHashtable, element); removeSoftRef(sharedObject); // Deletes sharedObject when SoftRefCount goes to zero. ++fAutoEvictedCount; @@ -416,8 +416,8 @@ void UnifiedCache::_put( const SharedObject *value, const UErrorCode status) const { U_ASSERT(_inProgress(element)); - const CacheKeyBase *theKey = (const CacheKeyBase *) element->key.pointer; - const SharedObject *oldValue = (const SharedObject *) element->value.pointer; + const CacheKeyBase* theKey = static_cast<const CacheKeyBase*>(element->key.pointer); + const SharedObject* oldValue = static_cast<const SharedObject*>(element->value.pointer); theKey->fCreationStatus = status; if (value->softRefCount == 0) { _registerPrimary(theKey, value); @@ -437,7 +437,7 @@ void UnifiedCache::_fetch( const UHashElement *element, const SharedObject *&value, UErrorCode &status) const { - const CacheKeyBase *theKey = (const CacheKeyBase *) element->key.pointer; + const CacheKeyBase* theKey = static_cast<const CacheKeyBase*>(element->key.pointer); status = theKey->fCreationStatus; // Since we have the cache lock, calling regular SharedObject add/removeRef @@ -465,9 +465,8 @@ UBool UnifiedCache::_inProgress( UBool UnifiedCache::_isEvictable(const UHashElement *element) const { - const CacheKeyBase *theKey = (const CacheKeyBase *) element->key.pointer; - const SharedObject *theValue = - (const SharedObject *) element->value.pointer; + const CacheKeyBase* theKey = static_cast<const CacheKeyBase*>(element->key.pointer); + const SharedObject* theValue = static_cast<const SharedObject*>(element->value.pointer); // Entries that are under construction are never evictable if (_inProgress(theValue, theKey->fCreationStatus)) { diff --git a/deps/icu-small/source/common/uniset.cpp b/deps/icu-small/source/common/uniset.cpp index 71f57fc12d466d..2d6610cb355d10 100644 --- a/deps/icu-small/source/common/uniset.cpp +++ b/deps/icu-small/source/common/uniset.cpp @@ -108,25 +108,25 @@ static inline void _dbgdt(UnicodeSet* set) { //---------------------------------------------------------------- static void U_CALLCONV cloneUnicodeString(UElement *dst, UElement *src) { - dst->pointer = new UnicodeString(*(UnicodeString*)src->pointer); + dst->pointer = new UnicodeString(*static_cast<UnicodeString*>(src->pointer)); } static int32_t U_CALLCONV compareUnicodeString(UElement t1, UElement t2) { - const UnicodeString &a = *(const UnicodeString*)t1.pointer; - const UnicodeString &b = *(const UnicodeString*)t2.pointer; + const UnicodeString& a = *static_cast<const UnicodeString*>(t1.pointer); + const UnicodeString& b = *static_cast<const UnicodeString*>(t2.pointer); return a.compare(b); } UBool UnicodeSet::hasStrings() const { - return strings != nullptr && !strings->isEmpty(); + return strings_ != nullptr && !strings_->isEmpty(); } int32_t UnicodeSet::stringsSize() const { - return strings == nullptr ? 0 : strings->size(); + return strings_ == nullptr ? 0 : strings_->size(); } UBool UnicodeSet::stringsContains(const UnicodeString &s) const { - return strings != nullptr && strings->contains((void*) &s); + return strings_ != nullptr && strings_->contains((void*) &s); } //---------------------------------------------------------------- @@ -171,7 +171,7 @@ UnicodeSet::UnicodeSet(const UnicodeSet& o, UBool /* asThawed */) : UnicodeFilte if (o.hasStrings()) { UErrorCode status = U_ZERO_ERROR; if (!allocateStrings(status) || - (strings->assign(*o.strings, cloneUnicodeString, status), U_FAILURE(status))) { + (strings_->assign(*o.strings_, cloneUnicodeString, status), U_FAILURE(status))) { setToBogus(); return; } @@ -195,7 +195,7 @@ UnicodeSet::~UnicodeSet() { if (buffer != stackList) { uprv_free(buffer); } - delete strings; + delete strings_; delete stringSpan; releasePattern(); } @@ -233,16 +233,16 @@ UnicodeSet& UnicodeSet::copyFrom(const UnicodeSet& o, UBool asThawed) { } if (o.hasStrings()) { UErrorCode status = U_ZERO_ERROR; - if ((strings == nullptr && !allocateStrings(status)) || - (strings->assign(*o.strings, cloneUnicodeString, status), U_FAILURE(status))) { + if ((strings_ == nullptr && !allocateStrings(status)) || + (strings_->assign(*o.strings_, cloneUnicodeString, status), U_FAILURE(status))) { setToBogus(); return *this; } } else if (hasStrings()) { - strings->removeAllElements(); + strings_->removeAllElements(); } if (o.stringSpan != nullptr && !asThawed) { - stringSpan = new UnicodeSetStringSpan(*o.stringSpan, *strings); + stringSpan = new UnicodeSetStringSpan(*o.stringSpan, *strings_); if (stringSpan == nullptr) { // Check for memory allocation error. setToBogus(); return *this; @@ -284,7 +284,7 @@ bool UnicodeSet::operator==(const UnicodeSet& o) const { if (list[i] != o.list[i]) return false; } if (hasStrings() != o.hasStrings()) { return false; } - if (hasStrings() && *strings != *o.strings) return false; + if (hasStrings() && *strings_ != *o.strings_) return false; return true; } @@ -355,7 +355,7 @@ UBool UnicodeSet::contains(UChar32 c) const { return false; } int32_t i = findCodePoint(c); - return (UBool)(i & 1); // return true if odd + return i & 1; // return true if odd } /** @@ -430,7 +430,7 @@ UBool UnicodeSet::contains(const UnicodeString& s) const { if (cp < 0) { return stringsContains(s); } else { - return contains((UChar32) cp); + return contains(static_cast<UChar32>(cp)); } } @@ -450,7 +450,7 @@ UBool UnicodeSet::containsAll(const UnicodeSet& c) const { return false; } } - return !c.hasStrings() || (strings != nullptr && strings->containsAll(*c.strings)); + return !c.hasStrings() || (strings_ != nullptr && strings_->containsAll(*c.strings_)); } /** @@ -460,8 +460,7 @@ UBool UnicodeSet::containsAll(const UnicodeSet& c) const { * @return true if the test condition is met */ UBool UnicodeSet::containsAll(const UnicodeString& s) const { - return (UBool)(span(s.getBuffer(), s.length(), USET_SPAN_CONTAINED) == - s.length()); + return span(s.getBuffer(), s.length(), USET_SPAN_CONTAINED) == s.length(); } /** @@ -496,7 +495,7 @@ UBool UnicodeSet::containsNone(const UnicodeSet& c) const { return false; } } - return strings == nullptr || !c.hasStrings() || strings->containsNone(*c.strings); + return strings_ == nullptr || !c.hasStrings() || strings_->containsNone(*c.strings_); } /** @@ -506,8 +505,7 @@ UBool UnicodeSet::containsNone(const UnicodeSet& c) const { * @return true if the test condition is met */ UBool UnicodeSet::containsNone(const UnicodeString& s) const { - return (UBool)(span(s.getBuffer(), s.length(), USET_SPAN_NOT_CONTAINED) == - s.length()); + return span(s.getBuffer(), s.length(), USET_SPAN_NOT_CONTAINED) == s.length(); } /** @@ -538,8 +536,8 @@ UBool UnicodeSet::matchesIndexValue(uint8_t v) const { } } if (hasStrings()) { - for (i=0; i<strings->size(); ++i) { - const UnicodeString& s = *(const UnicodeString*)strings->elementAt(i); + for (i=0; i<strings_->size(); ++i) { + const UnicodeString& s = *static_cast<const UnicodeString*>(strings_->elementAt(i)); if (s.isEmpty()) { continue; // skip the empty string } @@ -588,8 +586,8 @@ UMatchDegree UnicodeSet::matches(const Replaceable& text, // return the longest match. int32_t highWaterLength = 0; - for (i=0; i<strings->size(); ++i) { - const UnicodeString& trial = *(const UnicodeString*)strings->elementAt(i); + for (i=0; i<strings_->size(); ++i) { + const UnicodeString& trial = *static_cast<const UnicodeString*>(strings_->elementAt(i)); if (trial.isEmpty()) { continue; // skip the empty string } @@ -731,12 +729,12 @@ UChar32 UnicodeSet::charAt(int32_t index) const { UChar32 start = list[i++]; int32_t count = list[i++] - start; if (index < count) { - return (UChar32)(start + index); + return static_cast<UChar32>(start + index); } index -= count; } } - return (UChar32)-1; + return static_cast<UChar32>(-1); } /** @@ -958,21 +956,21 @@ UnicodeSet& UnicodeSet::add(const UnicodeString& s) { releasePattern(); } } else { - add((UChar32)cp); + add(static_cast<UChar32>(cp)); } return *this; } /** - * Adds the given string, in order, to 'strings'. The given string - * must have been checked by the caller to not already be in 'strings'. + * Adds the given string, in order, to 'strings_'. The given string + * must have been checked by the caller to not already be in 'strings_'. */ void UnicodeSet::_add(const UnicodeString& s) { if (isFrozen() || isBogus()) { return; } UErrorCode ec = U_ZERO_ERROR; - if (strings == nullptr && !allocateStrings(ec)) { + if (strings_ == nullptr && !allocateStrings(ec)) { setToBogus(); return; } @@ -981,7 +979,7 @@ void UnicodeSet::_add(const UnicodeString& s) { setToBogus(); return; } - strings->sortedInsert(t, compareUnicodeString, ec); + strings_->sortedInsert(t, compareUnicodeString, ec); if (U_FAILURE(ec)) { setToBogus(); } @@ -1060,7 +1058,7 @@ UnicodeSet& UnicodeSet::removeAll(const UnicodeString& s) { UnicodeSet& UnicodeSet::removeAllStrings() { if (!isFrozen() && hasStrings()) { - strings->removeAllElements(); + strings_->removeAllElements(); releasePattern(); } return *this; @@ -1178,11 +1176,11 @@ UnicodeSet& UnicodeSet::remove(const UnicodeString& s) { if (isFrozen() || isBogus()) return *this; int32_t cp = getSingleCP(s); if (cp < 0) { - if (strings != nullptr && strings->removeElement((void*) &s)) { + if (strings_ != nullptr && strings_->removeElement((void*) &s)) { releasePattern(); } } else { - remove((UChar32)cp, (UChar32)cp); + remove(static_cast<UChar32>(cp), static_cast<UChar32>(cp)); } return *this; } @@ -1250,13 +1248,13 @@ UnicodeSet& UnicodeSet::complement(const UnicodeString& s) { int32_t cp = getSingleCP(s); if (cp < 0) { if (stringsContains(s)) { - strings->removeElement((void*) &s); + strings_->removeElement((void*) &s); } else { _add(s); } releasePattern(); } else { - complement((UChar32)cp, (UChar32)cp); + complement(static_cast<UChar32>(cp), static_cast<UChar32>(cp)); } return *this; } @@ -1277,9 +1275,9 @@ UnicodeSet& UnicodeSet::addAll(const UnicodeSet& c) { } // Add strings in order - if ( c.strings!=nullptr ) { - for (int32_t i=0; i<c.strings->size(); ++i) { - const UnicodeString* s = (const UnicodeString*)c.strings->elementAt(i); + if ( c.strings_!=nullptr ) { + for (int32_t i=0; i<c.strings_->size(); ++i) { + const UnicodeString* s = static_cast<const UnicodeString*>(c.strings_->elementAt(i)); if (!stringsContains(*s)) { _add(*s); } @@ -1304,9 +1302,9 @@ UnicodeSet& UnicodeSet::retainAll(const UnicodeSet& c) { retain(c.list, c.len, 0); if (hasStrings()) { if (!c.hasStrings()) { - strings->removeAllElements(); + strings_->removeAllElements(); } else { - strings->retainAll(*c.strings); + strings_->retainAll(*c.strings_); } } return *this; @@ -1327,7 +1325,7 @@ UnicodeSet& UnicodeSet::removeAll(const UnicodeSet& c) { } retain(c.list, c.len, 2); if (hasStrings() && c.hasStrings()) { - strings->removeAll(*c.strings); + strings_->removeAll(*c.strings_); } return *this; } @@ -1346,11 +1344,11 @@ UnicodeSet& UnicodeSet::complementAll(const UnicodeSet& c) { } exclusiveOr(c.list, c.len, 0); - if (c.strings != nullptr) { - for (int32_t i=0; i<c.strings->size(); ++i) { - void* e = c.strings->elementAt(i); - if (strings == nullptr || !strings->removeElement(e)) { - _add(*(const UnicodeString*)e); + if (c.strings_ != nullptr) { + for (int32_t i=0; i<c.strings_->size(); ++i) { + void* e = c.strings_->elementAt(i); + if (strings_ == nullptr || !strings_->removeElement(e)) { + _add(*static_cast<const UnicodeString*>(e)); } } } @@ -1368,8 +1366,8 @@ UnicodeSet& UnicodeSet::clear() { list[0] = UNICODESET_HIGH; len = 1; releasePattern(); - if (strings != nullptr) { - strings->removeAllElements(); + if (strings_ != nullptr) { + strings_->removeAllElements(); } // Remove bogus fFlags = 0; @@ -1407,7 +1405,7 @@ UChar32 UnicodeSet::getRangeEnd(int32_t index) const { } const UnicodeString* UnicodeSet::getString(int32_t index) const { - return (const UnicodeString*) strings->elementAt(index); + return static_cast<const UnicodeString*>(strings_->elementAt(index)); } /** @@ -1433,7 +1431,7 @@ UnicodeSet& UnicodeSet::compact() { capacity = INITIAL_CAPACITY; } else if ((len + 7) < capacity) { // If we have more than a little unused capacity, shrink it to len. - UChar32* temp = (UChar32*) uprv_realloc(list, sizeof(UChar32) * len); + UChar32* temp = static_cast<UChar32*>(uprv_realloc(list, sizeof(UChar32) * len)); if (temp) { list = temp; capacity = len; @@ -1441,9 +1439,9 @@ UnicodeSet& UnicodeSet::compact() { // else what the heck happened?! We allocated less memory! // Oh well. We'll keep our original array. } - if (strings != nullptr && strings->isEmpty()) { - delete strings; - strings = nullptr; + if (strings_ != nullptr && strings_->isEmpty()) { + delete strings_; + strings_ = nullptr; } return *this; } @@ -1492,8 +1490,8 @@ UnicodeSet::UnicodeSet(const uint16_t data[], int32_t dataLen, ESerialization se } // copy smp for(i=bmpLength;i<newLength;i++) { - list[i] = ((UChar32)data[headerSize+bmpLength+(i-bmpLength)*2+0] << 16) + - ((UChar32)data[headerSize+bmpLength+(i-bmpLength)*2+1]); + list[i] = (static_cast<UChar32>(data[headerSize + bmpLength + (i - bmpLength) * 2 + 0]) << 16) + + static_cast<UChar32>(data[headerSize + bmpLength + (i - bmpLength) * 2 + 1]); #ifdef DEBUG_SERIALIZE printf("<<32@%d+[%d] %lX\n", headerSize+bmpLength+i, i, list[i]); #endif @@ -1568,10 +1566,10 @@ int32_t UnicodeSet::serialize(uint16_t *dest, int32_t destCapacity, UErrorCode& #ifdef DEBUG_SERIALIZE printf("writeHdr\n"); #endif - *dest=(uint16_t)length; + *dest = static_cast<uint16_t>(length); if (length>bmpLength) { *dest|=0x8000; - *++dest=(uint16_t)bmpLength; + *++dest = static_cast<uint16_t>(bmpLength); } ++dest; @@ -1581,7 +1579,7 @@ int32_t UnicodeSet::serialize(uint16_t *dest, int32_t destCapacity, UErrorCode& #ifdef DEBUG_SERIALIZE printf("writebmp: %x\n", (int)*p); #endif - *dest++=(uint16_t)*p++; + *dest++ = static_cast<uint16_t>(*p++); } /* write the supplementary part of the array */ @@ -1589,8 +1587,8 @@ int32_t UnicodeSet::serialize(uint16_t *dest, int32_t destCapacity, UErrorCode& #ifdef DEBUG_SERIALIZE printf("write32: %x\n", (int)*p); #endif - *dest++=(uint16_t)(*p>>16); - *dest++=(uint16_t)*p++; + *dest++ = static_cast<uint16_t>(*p >> 16); + *dest++ = static_cast<uint16_t>(*p++); } } else { ec=U_BUFFER_OVERFLOW_ERROR; @@ -1609,15 +1607,15 @@ UBool UnicodeSet::allocateStrings(UErrorCode &status) { if (U_FAILURE(status)) { return false; } - strings = new UVector(uprv_deleteUObject, + strings_ = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, 1, status); - if (strings == nullptr) { // Check for memory allocation error. + if (strings_ == nullptr) { // Check for memory allocation error. status = U_MEMORY_ALLOCATION_ERROR; return false; } if (U_FAILURE(status)) { - delete strings; - strings = nullptr; + delete strings_; + strings_ = nullptr; return false; } return true; @@ -1646,7 +1644,7 @@ bool UnicodeSet::ensureCapacity(int32_t newLen) { return true; } int32_t newCapacity = nextCapacity(newLen); - UChar32* temp = (UChar32*) uprv_malloc(newCapacity * sizeof(UChar32)); + UChar32* temp = static_cast<UChar32*>(uprv_malloc(newCapacity * sizeof(UChar32))); if (temp == nullptr) { setToBogus(); // set the object to bogus state if an OOM failure occurred. return false; @@ -1669,7 +1667,7 @@ bool UnicodeSet::ensureBufferCapacity(int32_t newLen) { return true; } int32_t newCapacity = nextCapacity(newLen); - UChar32* temp = (UChar32*) uprv_malloc(newCapacity * sizeof(UChar32)); + UChar32* temp = static_cast<UChar32*>(uprv_malloc(newCapacity * sizeof(UChar32))); if (temp == nullptr) { setToBogus(); return false; @@ -2133,11 +2131,11 @@ UnicodeString& UnicodeSet::_generatePattern(UnicodeString& result, } } - if (strings != nullptr) { - for (int32_t i = 0; i<strings->size(); ++i) { + if (strings_ != nullptr) { + for (int32_t i = 0; i<strings_->size(); ++i) { result.append(u'{'); _appendToPat(result, - *(const UnicodeString*) strings->elementAt(i), + *static_cast<const UnicodeString*>(strings_->elementAt(i)), escapeUnprintable); result.append(u'}'); } @@ -2161,7 +2159,7 @@ void UnicodeSet::releasePattern() { */ void UnicodeSet::setPattern(const char16_t *newPat, int32_t newPatLen) { releasePattern(); - pat = (char16_t *)uprv_malloc((newPatLen + 1) * sizeof(char16_t)); + pat = static_cast<char16_t*>(uprv_malloc((newPatLen + 1) * sizeof(char16_t))); if (pat) { patLen = newPatLen; u_memcpy(pat, newPat, patLen); @@ -2177,7 +2175,7 @@ UnicodeSet *UnicodeSet::freeze() { // Optimize contains() and span() and similar functions. if (hasStrings()) { - stringSpan = new UnicodeSetStringSpan(*this, *strings, UnicodeSetStringSpan::ALL); + stringSpan = new UnicodeSetStringSpan(*this, *strings_, UnicodeSetStringSpan::ALL); if (stringSpan == nullptr) { setToBogus(); return this; @@ -2204,7 +2202,7 @@ UnicodeSet *UnicodeSet::freeze() { int32_t UnicodeSet::span(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const { if(length>0 && bmpSet!=nullptr) { - return (int32_t)(bmpSet->span(s, s+length, spanCondition)-s); + return static_cast<int32_t>(bmpSet->span(s, s + length, spanCondition) - s); } if(length<0) { length=u_strlen(s); @@ -2218,7 +2216,7 @@ int32_t UnicodeSet::span(const char16_t *s, int32_t length, USetSpanCondition sp uint32_t which= spanCondition==USET_SPAN_NOT_CONTAINED ? UnicodeSetStringSpan::FWD_UTF16_NOT_CONTAINED : UnicodeSetStringSpan::FWD_UTF16_CONTAINED; - UnicodeSetStringSpan strSpan(*this, *strings, which); + UnicodeSetStringSpan strSpan(*this, *strings_, which); if(strSpan.needsStringSpanUTF16()) { return strSpan.span(s, length, spanCondition); } @@ -2241,7 +2239,7 @@ int32_t UnicodeSet::span(const char16_t *s, int32_t length, USetSpanCondition sp int32_t UnicodeSet::spanBack(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const { if(length>0 && bmpSet!=nullptr) { - return (int32_t)(bmpSet->spanBack(s, s+length, spanCondition)-s); + return static_cast<int32_t>(bmpSet->spanBack(s, s + length, spanCondition) - s); } if(length<0) { length=u_strlen(s); @@ -2255,7 +2253,7 @@ int32_t UnicodeSet::spanBack(const char16_t *s, int32_t length, USetSpanConditio uint32_t which= spanCondition==USET_SPAN_NOT_CONTAINED ? UnicodeSetStringSpan::BACK_UTF16_NOT_CONTAINED : UnicodeSetStringSpan::BACK_UTF16_CONTAINED; - UnicodeSetStringSpan strSpan(*this, *strings, which); + UnicodeSetStringSpan strSpan(*this, *strings_, which); if(strSpan.needsStringSpanUTF16()) { return strSpan.spanBack(s, length, spanCondition); } @@ -2278,24 +2276,24 @@ int32_t UnicodeSet::spanBack(const char16_t *s, int32_t length, USetSpanConditio int32_t UnicodeSet::spanUTF8(const char *s, int32_t length, USetSpanCondition spanCondition) const { if(length>0 && bmpSet!=nullptr) { - const uint8_t *s0=(const uint8_t *)s; - return (int32_t)(bmpSet->spanUTF8(s0, length, spanCondition)-s0); + const uint8_t* s0 = reinterpret_cast<const uint8_t*>(s); + return static_cast<int32_t>(bmpSet->spanUTF8(s0, length, spanCondition) - s0); } if(length<0) { - length=(int32_t)uprv_strlen(s); + length = static_cast<int32_t>(uprv_strlen(s)); } if(length==0) { return 0; } if(stringSpan!=nullptr) { - return stringSpan->spanUTF8((const uint8_t *)s, length, spanCondition); + return stringSpan->spanUTF8(reinterpret_cast<const uint8_t*>(s), length, spanCondition); } else if(hasStrings()) { uint32_t which= spanCondition==USET_SPAN_NOT_CONTAINED ? UnicodeSetStringSpan::FWD_UTF8_NOT_CONTAINED : UnicodeSetStringSpan::FWD_UTF8_CONTAINED; - UnicodeSetStringSpan strSpan(*this, *strings, which); + UnicodeSetStringSpan strSpan(*this, *strings_, which); if(strSpan.needsStringSpanUTF8()) { - return strSpan.spanUTF8((const uint8_t *)s, length, spanCondition); + return strSpan.spanUTF8(reinterpret_cast<const uint8_t*>(s), length, spanCondition); } } @@ -2316,24 +2314,24 @@ int32_t UnicodeSet::spanUTF8(const char *s, int32_t length, USetSpanCondition sp int32_t UnicodeSet::spanBackUTF8(const char *s, int32_t length, USetSpanCondition spanCondition) const { if(length>0 && bmpSet!=nullptr) { - const uint8_t *s0=(const uint8_t *)s; + const uint8_t* s0 = reinterpret_cast<const uint8_t*>(s); return bmpSet->spanBackUTF8(s0, length, spanCondition); } if(length<0) { - length=(int32_t)uprv_strlen(s); + length = static_cast<int32_t>(uprv_strlen(s)); } if(length==0) { return 0; } if(stringSpan!=nullptr) { - return stringSpan->spanBackUTF8((const uint8_t *)s, length, spanCondition); + return stringSpan->spanBackUTF8(reinterpret_cast<const uint8_t*>(s), length, spanCondition); } else if(hasStrings()) { uint32_t which= spanCondition==USET_SPAN_NOT_CONTAINED ? UnicodeSetStringSpan::BACK_UTF8_NOT_CONTAINED : UnicodeSetStringSpan::BACK_UTF8_CONTAINED; - UnicodeSetStringSpan strSpan(*this, *strings, which); + UnicodeSetStringSpan strSpan(*this, *strings_, which); if(strSpan.needsStringSpanUTF8()) { - return strSpan.spanBackUTF8((const uint8_t *)s, length, spanCondition); + return strSpan.spanBackUTF8(reinterpret_cast<const uint8_t*>(s), length, spanCondition); } } diff --git a/deps/icu-small/source/common/uniset_closure.cpp b/deps/icu-small/source/common/uniset_closure.cpp index 173a5cbaaef661..ae777c5facdfe2 100644 --- a/deps/icu-small/source/common/uniset_closure.cpp +++ b/deps/icu-small/source/common/uniset_closure.cpp @@ -116,17 +116,17 @@ UnicodeSet& UnicodeSet::applyPattern(const UnicodeString& pattern, // Does not use uset.h to reduce code dependencies static void U_CALLCONV _set_add(USet *set, UChar32 c) { - ((UnicodeSet *)set)->add(c); + reinterpret_cast<UnicodeSet*>(set)->add(c); } static void U_CALLCONV _set_addRange(USet *set, UChar32 start, UChar32 end) { - ((UnicodeSet *)set)->add(start, end); + reinterpret_cast<UnicodeSet*>(set)->add(start, end); } static void U_CALLCONV _set_addString(USet *set, const char16_t *str, int32_t length) { - ((UnicodeSet *)set)->add(UnicodeString((UBool)(length<0), str, length)); + reinterpret_cast<UnicodeSet*>(set)->add(UnicodeString(static_cast<UBool>(length < 0), str, length)); } //---------------------------------------------------------------- @@ -143,7 +143,7 @@ addCaseMapping(UnicodeSet &set, int32_t result, const char16_t *full, UnicodeStr set.add(result); } else { // add a string case mapping from full with length result - str.setTo((UBool)false, full, result); + str.setTo(static_cast<UBool>(false), full, result); set.add(str); } } @@ -242,7 +242,7 @@ void UnicodeSet::closeOverCaseInsensitive(bool simple) { // therefore, start with no strings and add only those needed. // Do this before processing code points, because they may add strings. if (!simple && foldSet.hasStrings()) { - foldSet.strings->removeAllElements(); + foldSet.strings_->removeAllElements(); } USetAdder sa = { @@ -276,8 +276,8 @@ void UnicodeSet::closeOverCaseInsensitive(bool simple) { } if (hasStrings()) { UnicodeString str; - for (int32_t j=0; j<strings->size(); ++j) { - const UnicodeString *pStr = (const UnicodeString *) strings->elementAt(j); + for (int32_t j=0; j<strings_->size(); ++j) { + const UnicodeString* pStr = static_cast<const UnicodeString*>(strings_->elementAt(j)); if (simple) { if (scfString(*pStr, str)) { foldSet.remove(*pStr).add(str); @@ -334,8 +334,8 @@ void UnicodeSet::closeOverAddCaseMappings() { BreakIterator *bi = BreakIterator::createWordInstance(root, status); if (U_SUCCESS(status)) { #endif - for (int32_t j=0; j<strings->size(); ++j) { - const UnicodeString *pStr = (const UnicodeString *) strings->elementAt(j); + for (int32_t j=0; j<strings_->size(); ++j) { + const UnicodeString* pStr = static_cast<const UnicodeString*>(strings_->elementAt(j)); (str = *pStr).toLower(root); foldSet.add(str); #if !UCONFIG_NO_BREAK_ITERATION diff --git a/deps/icu-small/source/common/uniset_props.cpp b/deps/icu-small/source/common/uniset_props.cpp index e6f880c9f261bc..532b17f5063fe2 100644 --- a/deps/icu-small/source/common/uniset_props.cpp +++ b/deps/icu-small/source/common/uniset_props.cpp @@ -47,14 +47,17 @@ U_NAMESPACE_USE +namespace { + // Special property set IDs -static const char ANY[] = "ANY"; // [\u0000-\U0010FFFF] -static const char ASCII[] = "ASCII"; // [\u0000-\u007F] -static const char ASSIGNED[] = "Assigned"; // [:^Cn:] +constexpr char ANY[] = "ANY"; // [\u0000-\U0010FFFF] +constexpr char ASCII[] = "ASCII"; // [\u0000-\u007F] +constexpr char ASSIGNED[] = "Assigned"; // [:^Cn:] // Unicode name property alias -#define NAME_PROP "na" -#define NAME_PROP_LENGTH 2 +constexpr char16_t NAME_PROP[] = u"na"; + +} // namespace // Cached sets ------------------------------------------------------------- *** @@ -83,7 +86,7 @@ namespace { // Cache some sets for other services -------------------------------------- *** void U_CALLCONV createUni32Set(UErrorCode &errorCode) { U_ASSERT(uni32Singleton == nullptr); - uni32Singleton = new UnicodeSet(UNICODE_STRING_SIMPLE("[:age=3.2:]"), errorCode); + uni32Singleton = new UnicodeSet(UnicodeString(u"[:age=3.2:]"), errorCode); if(uni32Singleton==nullptr) { errorCode=U_MEMORY_ALLOCATION_ERROR; } else { @@ -209,7 +212,7 @@ UnicodeSet::applyPatternIgnoreSpace(const UnicodeString& pattern, */ UBool UnicodeSet::resemblesPattern(const UnicodeString& pattern, int32_t pos) { return ((pos+1) < pattern.length() && - pattern.charAt(pos) == (char16_t)91/*[*/) || + pattern.charAt(pos) == static_cast<char16_t>(91)/*[*/) || resemblesPropertyPattern(pattern, pos); } @@ -471,7 +474,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, case u'-': if (op == 0) { if (lastItem != 0) { - op = (char16_t) c; + op = static_cast<char16_t>(c); continue; } else { // Treat final trailing '-' as a literal @@ -490,7 +493,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, return; case u'&': if (lastItem == 2 && op == 0) { - op = (char16_t) c; + op = static_cast<char16_t>(c); continue; } // syntaxError(chars, "'&' not after set"); @@ -561,7 +564,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, } add(U_ETHER); usePat = true; - patLocal.append((char16_t) SymbolTable::SYMBOL_REF); + patLocal.append(static_cast<char16_t>(SymbolTable::SYMBOL_REF)); patLocal.append(u']'); mode = 2; continue; @@ -658,11 +661,11 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, namespace { UBool numericValueFilter(UChar32 ch, void* context) { - return u_getNumericValue(ch) == *(double*)context; + return u_getNumericValue(ch) == *static_cast<double*>(context); } UBool generalCategoryMaskFilter(UChar32 ch, void* context) { - int32_t value = *(int32_t*)context; + int32_t value = *static_cast<int32_t*>(context); return (U_GET_GC_MASK((UChar32) ch) & value) != 0; } @@ -670,7 +673,7 @@ UBool versionFilter(UChar32 ch, void* context) { static const UVersionInfo none = { 0, 0, 0, 0 }; UVersionInfo v; u_charAge(ch, v); - UVersionInfo* version = (UVersionInfo*)context; + UVersionInfo* version = static_cast<UVersionInfo*>(context); return uprv_memcmp(&v, &none, sizeof(v)) > 0 && uprv_memcmp(&v, version, sizeof(v)) <= 0; } @@ -680,16 +683,16 @@ typedef struct { } IntPropertyContext; UBool intPropertyFilter(UChar32 ch, void* context) { - IntPropertyContext* c = (IntPropertyContext*)context; - return u_getIntPropertyValue((UChar32) ch, c->prop) == c->value; + IntPropertyContext* c = static_cast<IntPropertyContext*>(context); + return u_getIntPropertyValue(ch, c->prop) == c->value; } UBool scriptExtensionsFilter(UChar32 ch, void* context) { - return uscript_hasScript(ch, *(UScriptCode*)context); + return uscript_hasScript(ch, *static_cast<UScriptCode*>(context)); } UBool idTypeFilter(UChar32 ch, void* context) { - return u_hasIDType(ch, *(UIdentifierType*)context); + return u_hasIDType(ch, *static_cast<UIdentifierType*>(context)); } } // namespace @@ -738,7 +741,7 @@ void UnicodeSet::applyFilter(UnicodeSet::Filter filter, } } if (startHasProperty >= 0) { - add((UChar32)startHasProperty, (UChar32)0x10FFFF); + add(startHasProperty, static_cast<UChar32>(0x10FFFF)); } if (isBogus() && U_SUCCESS(status)) { // We likely ran out of memory. AHHH! @@ -784,11 +787,11 @@ UnicodeSet::applyIntPropertyValue(UProperty prop, int32_t value, UErrorCode& ec) applyFilter(generalCategoryMaskFilter, &value, inclusions, ec); } else if (prop == UCHAR_SCRIPT_EXTENSIONS) { const UnicodeSet* inclusions = CharacterProperties::getInclusionsForProperty(prop, ec); - UScriptCode script = (UScriptCode)value; + UScriptCode script = static_cast<UScriptCode>(value); applyFilter(scriptExtensionsFilter, &script, inclusions, ec); } else if (prop == UCHAR_IDENTIFIER_TYPE) { const UnicodeSet* inclusions = CharacterProperties::getInclusionsForProperty(prop, ec); - UIdentifierType idType = (UIdentifierType)value; + UIdentifierType idType = static_cast<UIdentifierType>(value); applyFilter(idTypeFilter, &idType, inclusions, ec); } else if (0 <= prop && prop < UCHAR_BINARY_LIMIT) { if (value == 0 || value == 1) { @@ -862,7 +865,7 @@ UnicodeSet::applyPropertyAlias(const UnicodeString& prop, // We catch NaN here because comparing it with both 0 and 255 will be false // (as are all comparisons with NaN). if (*end != 0 || !(0 <= val && val <= 255) || - (v = (int32_t)val) != val) { + (v = static_cast<int32_t>(val)) != val) { // non-integral value or outside 0..255, or trailing junk FAIL(ec); } @@ -1105,7 +1108,7 @@ UnicodeSet& UnicodeSet::applyPropertyPattern(const UnicodeString& pattern, // support args of (UProperty, char*) then we can remove // NAME_PROP and make this a little more efficient. valueName = propName; - propName = UnicodeString(NAME_PROP, NAME_PROP_LENGTH, US_INV); + propName = NAME_PROP; } } diff --git a/deps/icu-small/source/common/unisetspan.cpp b/deps/icu-small/source/common/unisetspan.cpp index b7256d8fd1646d..209f0a86b54175 100644 --- a/deps/icu-small/source/common/unisetspan.cpp +++ b/deps/icu-small/source/common/unisetspan.cpp @@ -66,10 +66,10 @@ class OffsetList { // Only ever stack-allocated, does not need to inherit UMemo // Call exactly once if the list is to be used. void setMaxLength(int32_t maxLength) { - if(maxLength<=(int32_t)sizeof(staticList)) { - capacity=(int32_t)sizeof(staticList); + if (maxLength <= static_cast<int32_t>(sizeof(staticList))) { + capacity = static_cast<int32_t>(sizeof(staticList)); } else { - UBool *l=(UBool *)uprv_malloc(maxLength); + UBool* l = static_cast<UBool*>(uprv_malloc(maxLength)); if(l!=nullptr) { list=l; capacity=maxLength; @@ -84,7 +84,7 @@ class OffsetList { // Only ever stack-allocated, does not need to inherit UMemo } UBool isEmpty() const { - return (UBool)(length==0); + return length == 0; } // Reduce all stored offsets by delta, used when the current position @@ -183,7 +183,7 @@ static int32_t appendUTF8(const char16_t *s, int32_t length, uint8_t *t, int32_t capacity) { UErrorCode errorCode=U_ZERO_ERROR; int32_t length8=0; - u_strToUTF8((char *)t, capacity, &length8, s, length, &errorCode); + u_strToUTF8(reinterpret_cast<char*>(t), capacity, &length8, s, length, &errorCode); if(U_SUCCESS(errorCode)) { return length8; } else { @@ -196,7 +196,7 @@ appendUTF8(const char16_t *s, int32_t length, uint8_t *t, int32_t capacity) { static inline uint8_t makeSpanLengthByte(int32_t spanLength) { // 0xfe==UnicodeSetStringSpan::LONG_SPAN - return spanLength<0xfe ? (uint8_t)spanLength : (uint8_t)0xfe; + return spanLength < 0xfe ? static_cast<uint8_t>(spanLength) : static_cast<uint8_t>(0xfe); } // Construct for all variants of span(), or only for any one variant. @@ -208,7 +208,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, utf8Lengths(nullptr), spanLengths(nullptr), utf8(nullptr), utf8Length(0), maxLength16(0), maxLength8(0), - all((UBool)(which==ALL)) { + all(static_cast<UBool>(which == ALL)) { spanSet.retainAll(set); if(which&NOT_CONTAINED) { // Default to the same sets. @@ -228,7 +228,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, int32_t i, spanLength; UBool someRelevant=false; for(i=0; i<stringsLength; ++i) { - const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i); + const UnicodeString& string = *static_cast<const UnicodeString*>(strings.elementAt(i)); const char16_t *s16=string.getBuffer(); int32_t length16=string.length(); if (length16==0) { @@ -279,10 +279,10 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, allocSize+=stringsLength*4+utf8Length; } } - if(allocSize<=(int32_t)sizeof(staticLengths)) { + if (allocSize <= static_cast<int32_t>(sizeof(staticLengths))) { utf8Lengths=staticLengths; } else { - utf8Lengths=(int32_t *)uprv_malloc(allocSize); + utf8Lengths = static_cast<int32_t*>(uprv_malloc(allocSize)); if(utf8Lengths==nullptr) { maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return false. return; // Out of memory. @@ -291,7 +291,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, if(all) { // Store span lengths for all span() variants. - spanLengths=(uint8_t *)(utf8Lengths+stringsLength); + spanLengths = reinterpret_cast<uint8_t*>(utf8Lengths + stringsLength); spanBackLengths=spanLengths+stringsLength; spanUTF8Lengths=spanBackLengths+stringsLength; spanBackUTF8Lengths=spanUTF8Lengths+stringsLength; @@ -299,10 +299,10 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, } else { // Store span lengths for only one span() variant. if(which&UTF8) { - spanLengths=(uint8_t *)(utf8Lengths+stringsLength); + spanLengths = reinterpret_cast<uint8_t*>(utf8Lengths + stringsLength); utf8=spanLengths+stringsLength; } else { - spanLengths=(uint8_t *)utf8Lengths; + spanLengths = reinterpret_cast<uint8_t*>(utf8Lengths); } spanBackLengths=spanUTF8Lengths=spanBackUTF8Lengths=spanLengths; } @@ -311,7 +311,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, int32_t utf8Count=0; // Count UTF-8 bytes written so far. for(i=0; i<stringsLength; ++i) { - const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i); + const UnicodeString& string = *static_cast<const UnicodeString*>(strings.elementAt(i)); const char16_t *s16=string.getBuffer(); int32_t length16=string.length(); spanLength=spanSet.span(s16, length16, USET_SPAN_CONTAINED); @@ -334,15 +334,15 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, int32_t length8=appendUTF8(s16, length16, s8, utf8Length-utf8Count); utf8Count+=utf8Lengths[i]=length8; if(length8==0) { // Irrelevant for UTF-8 because not representable in UTF-8. - spanUTF8Lengths[i]=spanBackUTF8Lengths[i]=(uint8_t)ALL_CP_CONTAINED; + spanUTF8Lengths[i] = spanBackUTF8Lengths[i] = static_cast<uint8_t>(ALL_CP_CONTAINED); } else { // Relevant for UTF-8. if(which&CONTAINED) { if(which&FWD) { - spanLength=spanSet.spanUTF8((const char *)s8, length8, USET_SPAN_CONTAINED); + spanLength = spanSet.spanUTF8(reinterpret_cast<const char*>(s8), length8, USET_SPAN_CONTAINED); spanUTF8Lengths[i]=makeSpanLengthByte(spanLength); } if(which&BACK) { - spanLength=length8-spanSet.spanBackUTF8((const char *)s8, length8, USET_SPAN_CONTAINED); + spanLength = length8 - spanSet.spanBackUTF8(reinterpret_cast<const char*>(s8), length8, USET_SPAN_CONTAINED); spanBackUTF8Lengths[i]=makeSpanLengthByte(spanLength); } } else /* not CONTAINED, not all, but NOT_CONTAINED */ { @@ -378,10 +378,10 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, if(all) { spanLengths[i]=spanBackLengths[i]= spanUTF8Lengths[i]=spanBackUTF8Lengths[i]= - (uint8_t)ALL_CP_CONTAINED; + static_cast<uint8_t>(ALL_CP_CONTAINED); } else { // All spanXYZLengths pointers contain the same address. - spanLengths[i]=(uint8_t)ALL_CP_CONTAINED; + spanLengths[i] = static_cast<uint8_t>(ALL_CP_CONTAINED); } } } @@ -410,17 +410,17 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSetStringSpan &otherStri // UTF-8 lengths, 4 sets of span lengths, UTF-8 strings. int32_t stringsLength=strings.size(); int32_t allocSize=stringsLength*(4+1+1+1+1)+utf8Length; - if(allocSize<=(int32_t)sizeof(staticLengths)) { + if (allocSize <= static_cast<int32_t>(sizeof(staticLengths))) { utf8Lengths=staticLengths; } else { - utf8Lengths=(int32_t *)uprv_malloc(allocSize); + utf8Lengths = static_cast<int32_t*>(uprv_malloc(allocSize)); if(utf8Lengths==nullptr) { maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return false. return; // Out of memory. } } - spanLengths=(uint8_t *)(utf8Lengths+stringsLength); + spanLengths = reinterpret_cast<uint8_t*>(utf8Lengths + stringsLength); utf8=spanLengths+stringsLength*4; uprv_memcpy(utf8Lengths, otherStringSpan.utf8Lengths, allocSize); } @@ -658,7 +658,7 @@ int32_t UnicodeSetStringSpan::span(const char16_t *s, int32_t length, USetSpanCo if(overlap==ALL_CP_CONTAINED) { continue; // Irrelevant string. (Also the empty string.) } - const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i); + const UnicodeString& string = *static_cast<const UnicodeString*>(strings.elementAt(i)); const char16_t *s16=string.getBuffer(); int32_t length16=string.length(); U_ASSERT(length>0); @@ -698,7 +698,7 @@ int32_t UnicodeSetStringSpan::span(const char16_t *s, int32_t length, USetSpanCo // For longest match, we do need to try to match even an all-contained string // to find the match from the earliest start. - const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i); + const UnicodeString& string = *static_cast<const UnicodeString*>(strings.elementAt(i)); const char16_t *s16=string.getBuffer(); int32_t length16=string.length(); if (length16==0) { @@ -826,7 +826,7 @@ int32_t UnicodeSetStringSpan::spanBack(const char16_t *s, int32_t length, USetSp if(overlap==ALL_CP_CONTAINED) { continue; // Irrelevant string. (Also the empty string.) } - const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i); + const UnicodeString& string = *static_cast<const UnicodeString*>(strings.elementAt(i)); const char16_t *s16=string.getBuffer(); int32_t length16=string.length(); U_ASSERT(length>0); @@ -868,7 +868,7 @@ int32_t UnicodeSetStringSpan::spanBack(const char16_t *s, int32_t length, USetSp // For longest match, we do need to try to match even an all-contained string // to find the match from the latest end. - const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i); + const UnicodeString& string = *static_cast<const UnicodeString*>(strings.elementAt(i)); const char16_t *s16=string.getBuffer(); int32_t length16=string.length(); if (length16==0) { @@ -968,7 +968,7 @@ int32_t UnicodeSetStringSpan::spanUTF8(const uint8_t *s, int32_t length, USetSpa if(spanCondition==USET_SPAN_NOT_CONTAINED) { return spanNotUTF8(s, length); } - int32_t spanLength=spanSet.spanUTF8((const char *)s, length, USET_SPAN_CONTAINED); + int32_t spanLength = spanSet.spanUTF8(reinterpret_cast<const char*>(s), length, USET_SPAN_CONTAINED); if(spanLength==length) { return length; } @@ -1104,7 +1104,7 @@ int32_t UnicodeSetStringSpan::spanUTF8(const uint8_t *s, int32_t length, USetSpa if(offsets.isEmpty()) { // No more strings matched after a previous string match. // Try another code point span from after the last string match. - spanLength=spanSet.spanUTF8((const char *)s+pos, rest, USET_SPAN_CONTAINED); + spanLength = spanSet.spanUTF8(reinterpret_cast<const char*>(s) + pos, rest, USET_SPAN_CONTAINED); if( spanLength==rest || // Reached the end of the string, or spanLength==0 // neither strings nor span progressed. ) { @@ -1145,7 +1145,7 @@ int32_t UnicodeSetStringSpan::spanBackUTF8(const uint8_t *s, int32_t length, USe if(spanCondition==USET_SPAN_NOT_CONTAINED) { return spanNotBackUTF8(s, length); } - int32_t pos=spanSet.spanBackUTF8((const char *)s, length, USET_SPAN_CONTAINED); + int32_t pos = spanSet.spanBackUTF8(reinterpret_cast<const char*>(s), length, USET_SPAN_CONTAINED); if(pos==0) { return 0; } @@ -1284,7 +1284,7 @@ int32_t UnicodeSetStringSpan::spanBackUTF8(const uint8_t *s, int32_t length, USe // No more strings matched before a previous string match. // Try another code point span from before the last string match. int32_t oldPos=pos; - pos=spanSet.spanBackUTF8((const char *)s, oldPos, USET_SPAN_CONTAINED); + pos = spanSet.spanBackUTF8(reinterpret_cast<const char*>(s), oldPos, USET_SPAN_CONTAINED); spanLength=oldPos-pos; if( pos==0 || // Reached the start of the string, or spanLength==0 // neither strings nor span progressed. @@ -1371,7 +1371,7 @@ int32_t UnicodeSetStringSpan::spanNot(const char16_t *s, int32_t length) const { if(spanLengths[i]==ALL_CP_CONTAINED) { continue; // Irrelevant string. (Also the empty string.) } - const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i); + const UnicodeString& string = *static_cast<const UnicodeString*>(strings.elementAt(i)); const char16_t *s16=string.getBuffer(); int32_t length16=string.length(); U_ASSERT(length>0); @@ -1415,7 +1415,7 @@ int32_t UnicodeSetStringSpan::spanNotBack(const char16_t *s, int32_t length) con if(spanLengths[i]==ALL_CP_CONTAINED) { continue; // Irrelevant string. (Also the empty string.) } - const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i); + const UnicodeString& string = *static_cast<const UnicodeString*>(strings.elementAt(i)); const char16_t *s16=string.getBuffer(); int32_t length16=string.length(); U_ASSERT(length>0); @@ -1442,7 +1442,7 @@ int32_t UnicodeSetStringSpan::spanNotUTF8(const uint8_t *s, int32_t length) cons do { // Span until we find a code point from the set, // or a code point that starts or ends some string. - i=pSpanNotSet->spanUTF8((const char *)s+pos, rest, USET_SPAN_NOT_CONTAINED); + i = pSpanNotSet->spanUTF8(reinterpret_cast<const char*>(s) + pos, rest, USET_SPAN_NOT_CONTAINED); if(i==rest) { return length; // Reached the end of the string. } @@ -1487,7 +1487,7 @@ int32_t UnicodeSetStringSpan::spanNotBackUTF8(const uint8_t *s, int32_t length) do { // Span until we find a code point from the set, // or a code point that starts or ends some string. - pos=pSpanNotSet->spanBackUTF8((const char *)s, pos, USET_SPAN_NOT_CONTAINED); + pos = pSpanNotSet->spanBackUTF8(reinterpret_cast<const char*>(s), pos, USET_SPAN_NOT_CONTAINED); if(pos==0) { return 0; // Reached the start of the string. } diff --git a/deps/icu-small/source/common/unisetspan.h b/deps/icu-small/source/common/unisetspan.h index f1dc8e6f743a0d..482782ebf75eaa 100644 --- a/deps/icu-small/source/common/unisetspan.h +++ b/deps/icu-small/source/common/unisetspan.h @@ -141,11 +141,11 @@ class UnicodeSetStringSpan : public UMemory { }; UBool UnicodeSetStringSpan::needsStringSpanUTF16() { - return (UBool)(maxLength16!=0); + return maxLength16 != 0; } UBool UnicodeSetStringSpan::needsStringSpanUTF8() { - return (UBool)(maxLength8!=0); + return maxLength8 != 0; } UBool UnicodeSetStringSpan::contains(UChar32 c) const { diff --git a/deps/icu-small/source/common/unistr.cpp b/deps/icu-small/source/common/unistr.cpp index ce81138c2ca3f0..a720245772e637 100644 --- a/deps/icu-small/source/common/unistr.cpp +++ b/deps/icu-small/source/common/unistr.cpp @@ -20,6 +20,8 @@ ****************************************************************************** */ +#include <string_view> + #include "unicode/utypes.h" #include "unicode/appendable.h" #include "unicode/putil.h" @@ -107,12 +109,34 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UnicodeString) UnicodeString U_EXPORT2 operator+ (const UnicodeString &s1, const UnicodeString &s2) { - return - UnicodeString(s1.length()+s2.length()+1, (UChar32)0, 0). - append(s1). - append(s2); + int32_t sumLengths; + if (uprv_add32_overflow(s1.length(), s2.length(), &sumLengths)) { + UnicodeString bogus; + bogus.setToBogus(); + return bogus; + } + if (sumLengths != INT32_MAX) { + ++sumLengths; // space for a terminating NUL if we need one + } + return UnicodeString(sumLengths, static_cast<UChar32>(0), 0).append(s1).append(s2); +} + +U_COMMON_API UnicodeString U_EXPORT2 +unistr_internalConcat(const UnicodeString &s1, std::u16string_view s2) { + int32_t sumLengths; + if (s2.length() > INT32_MAX || + uprv_add32_overflow(s1.length(), static_cast<int32_t>(s2.length()), &sumLengths)) { + UnicodeString bogus; + bogus.setToBogus(); + return bogus; + } + if (sumLengths != INT32_MAX) { + ++sumLengths; // space for a terminating NUL if we need one + } + return UnicodeString(sumLengths, static_cast<UChar32>(0), 0).append(s1).append(s2); } + //======================================== // Reference Counting functions, put at top of file so that optimizing compilers // have a chance to automatically inline. @@ -120,23 +144,23 @@ operator+ (const UnicodeString &s1, const UnicodeString &s2) { void UnicodeString::addRef() { - umtx_atomic_inc((u_atomic_int32_t *)fUnion.fFields.fArray - 1); + umtx_atomic_inc(reinterpret_cast<u_atomic_int32_t*>(fUnion.fFields.fArray) - 1); } int32_t UnicodeString::removeRef() { - return umtx_atomic_dec((u_atomic_int32_t *)fUnion.fFields.fArray - 1); + return umtx_atomic_dec(reinterpret_cast<u_atomic_int32_t*>(fUnion.fFields.fArray) - 1); } int32_t UnicodeString::refCount() const { - return umtx_loadAcquire(*((u_atomic_int32_t *)fUnion.fFields.fArray - 1)); + return umtx_loadAcquire(*(reinterpret_cast<u_atomic_int32_t*>(fUnion.fFields.fArray) - 1)); } void UnicodeString::releaseArray() { if((fUnion.fFields.fLengthAndFlags & kRefCounted) && removeRef() == 0) { - uprv_free((int32_t *)fUnion.fFields.fArray - 1); + uprv_free(reinterpret_cast<int32_t*>(fUnion.fFields.fArray) - 1); } } @@ -150,7 +174,7 @@ UnicodeString::releaseArray() { UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count) { fUnion.fFields.fLengthAndFlags = 0; - if(count <= 0 || (uint32_t)c > 0x10ffff) { + if (count <= 0 || static_cast<uint32_t>(c) > 0x10ffff) { // just allocate and do not do anything else allocate(capacity); } else if(c <= 0xffff) { @@ -160,7 +184,7 @@ UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count) { } if(allocate(capacity)) { char16_t *array = getArrayStart(); - char16_t unit = (char16_t)c; + char16_t unit = static_cast<char16_t>(c); for(int32_t i = 0; i < length; ++i) { array[i] = unit; } @@ -206,11 +230,6 @@ UnicodeString::UnicodeString(UChar32 ch) { } } -UnicodeString::UnicodeString(const char16_t *text) { - fUnion.fFields.fLengthAndFlags = kShortString; - doAppend(text, 0, -1); -} - UnicodeString::UnicodeString(const char16_t *text, int32_t textLength) { fUnion.fFields.fLengthAndFlags = kShortString; @@ -256,7 +275,7 @@ UnicodeString::UnicodeString(char16_t *buff, while(p != limit && *p != 0) { ++p; } - buffLength = (int32_t)(p - buff); + buffLength = static_cast<int32_t>(p - buff); } setArray(buff, buffLength, buffCapacity); } @@ -268,7 +287,7 @@ UnicodeString::UnicodeString(const char *src, int32_t length, EInvariant) { // treat as an empty string } else { if(length<0) { - length=(int32_t)uprv_strlen(src); + length = static_cast<int32_t>(uprv_strlen(src)); } if(cloneArrayIfNeeded(length, length, false)) { u_charsToUChars(src, getArrayStart(), length); @@ -279,6 +298,26 @@ UnicodeString::UnicodeString(const char *src, int32_t length, EInvariant) { } } +UnicodeString UnicodeString::readOnlyAliasFromU16StringView(std::u16string_view text) { + UnicodeString result; + if (text.length() <= INT32_MAX) { + result.setTo(false, text.data(), static_cast<int32_t>(text.length())); + } else { + result.setToBogus(); + } + return result; +} + +UnicodeString UnicodeString::readOnlyAliasFromUnicodeString(const UnicodeString &text) { + UnicodeString result; + if (text.isBogus()) { + result.setToBogus(); + } else { + result.setTo(false, text.getBuffer(), text.length()); + } + return result; +} + #if U_CHARSET_IS_UTF8 UnicodeString::UnicodeString(const char *codepageData) { @@ -295,7 +334,7 @@ UnicodeString::UnicodeString(const char *codepageData, int32_t dataLength) { return; } if(dataLength == -1) { - dataLength = (int32_t)uprv_strlen(codepageData); + dataLength = static_cast<int32_t>(uprv_strlen(codepageData)); } setToUTF8(StringPiece(codepageData, dataLength)); } @@ -376,18 +415,18 @@ UnicodeString::allocate(int32_t capacity) { ++capacity; // for the NUL // Switch to size_t which is unsigned so that we can allocate up to 4GB. // Reference counter + UChars. - size_t numBytes = sizeof(int32_t) + (size_t)capacity * U_SIZEOF_UCHAR; + size_t numBytes = sizeof(int32_t) + static_cast<size_t>(capacity) * U_SIZEOF_UCHAR; // Round up to a multiple of 16. numBytes = (numBytes + 15) & ~15; - int32_t *array = (int32_t *) uprv_malloc(numBytes); + int32_t* array = static_cast<int32_t*>(uprv_malloc(numBytes)); if(array != nullptr) { // set initial refCount and point behind the refCount *array++ = 1; numBytes -= sizeof(int32_t); // have fArray point to the first char16_t - fUnion.fFields.fArray = (char16_t *)array; - fUnion.fFields.fCapacity = (int32_t)(numBytes / U_SIZEOF_UCHAR); + fUnion.fFields.fArray = reinterpret_cast<char16_t*>(array); + fUnion.fFields.fCapacity = static_cast<int32_t>(numBytes / U_SIZEOF_UCHAR); fUnion.fFields.fLengthAndFlags = kLongString; return true; } @@ -622,7 +661,7 @@ void UnicodeString::swap(UnicodeString &other) noexcept { //======================================== UnicodeString UnicodeString::unescape() const { - UnicodeString result(length(), (UChar32)0, (int32_t)0); // construct with capacity + UnicodeString result(length(), static_cast<UChar32>(0), static_cast<int32_t>(0)); // construct with capacity if (result.isBogus()) { return result; } @@ -656,10 +695,10 @@ UChar32 UnicodeString::unescapeAt(int32_t &offset) const { // Read-only implementation //======================================== UBool -UnicodeString::doEquals(const UnicodeString &text, int32_t len) const { - // Requires: this & text not bogus and have same lengths. +UnicodeString::doEquals(const char16_t *text, int32_t len) const { + // Requires: this not bogus and have same lengths. // Byte-wise comparison works for equality regardless of endianness. - return uprv_memcmp(getArrayStart(), text.getArrayStart(), len * U_SIZEOF_UCHAR) == 0; + return uprv_memcmp(getArrayStart(), text, len * U_SIZEOF_UCHAR) == 0; } UBool @@ -772,9 +811,9 @@ UnicodeString::doCompare( int32_t start, # else // little-endian: compare char16_t units do { - result = ((int32_t)*(chars++) - (int32_t)*(srcChars++)); + result = static_cast<int32_t>(*(chars++)) - static_cast<int32_t>(*(srcChars++)); if(result != 0) { - return (int8_t)(result >> 15 | 1); + return static_cast<int8_t>(result >> 15 | 1); } } while(--minLength > 0); # endif @@ -806,7 +845,7 @@ UnicodeString::doCompareCodePointOrder(int32_t start, int32_t diff = uprv_strCompare(getArrayStart() + start, length, (srcChars!=nullptr)?(srcChars + srcStart):nullptr, srcLength, false, true); /* translate the 32-bit result into an 8-bit one */ if(diff!=0) { - return (int8_t)(diff >> 15 | 1); + return static_cast<int8_t>(diff >> 15 | 1); } else { return 0; } @@ -831,7 +870,7 @@ UChar32 UnicodeString::char32At(int32_t offset) const { int32_t len = length(); - if((uint32_t)offset < (uint32_t)len) { + if (static_cast<uint32_t>(offset) < static_cast<uint32_t>(len)) { const char16_t *array = getArrayStart(); UChar32 c; U16_GET(array, 0, offset, len, c); @@ -843,7 +882,7 @@ UnicodeString::char32At(int32_t offset) const int32_t UnicodeString::getChar32Start(int32_t offset) const { - if((uint32_t)offset < (uint32_t)length()) { + if (static_cast<uint32_t>(offset) < static_cast<uint32_t>(length())) { const char16_t *array = getArrayStart(); U16_SET_CP_START(array, 0, offset); return offset; @@ -855,7 +894,7 @@ UnicodeString::getChar32Start(int32_t offset) const { int32_t UnicodeString::getChar32Limit(int32_t offset) const { int32_t len = length(); - if((uint32_t)offset < (uint32_t)len) { + if (static_cast<uint32_t>(offset) < static_cast<uint32_t>(len)) { const char16_t *array = getArrayStart(); U16_SET_CP_LIMIT(array, 0, offset, len); return offset; @@ -989,7 +1028,7 @@ UnicodeString::extract(int32_t start, int32_t len, if (/*dstSize < 0 || */(dstSize > 0 && target == nullptr)) { return 0; } - return toUTF8(start, len, target, dstSize <= 0x7fffffff ? (int32_t)dstSize : 0x7fffffff); + return toUTF8(start, len, target, dstSize <= 0x7fffffff ? static_cast<int32_t>(dstSize) : 0x7fffffff); } // else see unistr_cnv.cpp @@ -1013,7 +1052,7 @@ UnicodeString::toUTF8(ByteSink &sink) const { int32_t length16 = length(); if(length16 != 0) { char stackBuffer[1024]; - int32_t capacity = (int32_t)sizeof(stackBuffer); + int32_t capacity = static_cast<int32_t>(sizeof(stackBuffer)); UBool utf8IsOwned = false; char *utf8 = sink.GetAppendBuffer(length16 < capacity ? length16 : capacity, 3*length16, @@ -1027,7 +1066,7 @@ UnicodeString::toUTF8(ByteSink &sink) const { nullptr, // Don't care about number of substitutions. &errorCode); if(errorCode == U_BUFFER_OVERFLOW_ERROR) { - utf8 = (char *)uprv_malloc(length8); + utf8 = static_cast<char*>(uprv_malloc(length8)); if(utf8 != nullptr) { utf8IsOwned = true; errorCode = U_ZERO_ERROR; @@ -1089,7 +1128,7 @@ UnicodeString::indexOf(const char16_t *srcChars, if(match == nullptr) { return -1; } else { - return (int32_t)(match - array); + return static_cast<int32_t>(match - array); } } @@ -1107,7 +1146,7 @@ UnicodeString::doIndexOf(char16_t c, if(match == nullptr) { return -1; } else { - return (int32_t)(match - array); + return static_cast<int32_t>(match - array); } } @@ -1124,7 +1163,7 @@ UnicodeString::doIndexOf(UChar32 c, if(match == nullptr) { return -1; } else { - return (int32_t)(match - array); + return static_cast<int32_t>(match - array); } } @@ -1153,7 +1192,7 @@ UnicodeString::lastIndexOf(const char16_t *srcChars, if(match == nullptr) { return -1; } else { - return (int32_t)(match - array); + return static_cast<int32_t>(match - array); } } @@ -1175,7 +1214,7 @@ UnicodeString::doLastIndexOf(char16_t c, if(match == nullptr) { return -1; } else { - return (int32_t)(match - array); + return static_cast<int32_t>(match - array); } } @@ -1192,7 +1231,7 @@ UnicodeString::doLastIndexOf(UChar32 c, if(match == nullptr) { return -1; } else { - return (int32_t)(match - array); + return static_cast<int32_t>(match - array); } } @@ -1329,7 +1368,7 @@ UnicodeString::setTo(UBool isTerminated, textLength = u_strlen(text); } fUnion.fFields.fLengthAndFlags = kReadonlyAlias; - setArray((char16_t *)text, textLength, isTerminated ? textLength + 1 : textLength); + setArray(const_cast<char16_t*>(text), textLength, isTerminated ? textLength + 1 : textLength); return *this; } @@ -1359,7 +1398,7 @@ UnicodeString::setTo(char16_t *buffer, while(p != limit && *p != 0) { ++p; } - buffLength = (int32_t)(p - buffer); + buffLength = static_cast<int32_t>(p - buffer); } releaseArray(); @@ -1574,6 +1613,18 @@ UnicodeString::doReplace(int32_t start, return *this; } +UnicodeString& +UnicodeString::doReplace(int32_t start, int32_t length, std::u16string_view src) { + if (!isWritable()) { + return *this; + } + if (src.length() > INT32_MAX) { + setToBogus(); + return *this; + } + return doReplace(start, length, src.data(), 0, static_cast<int32_t>(src.length())); +} + // Versions of doReplace() only for append() variants. // doReplace() and doAppend() optimize for different cases. @@ -1662,6 +1713,18 @@ UnicodeString::doAppend(const char16_t *srcChars, int32_t srcStart, int32_t srcL return *this; } +UnicodeString& +UnicodeString::doAppend(std::u16string_view src) { + if (!isWritable() || src.empty()) { + return *this; + } + if (src.length() > INT32_MAX) { + setToBogus(); + return *this; + } + return doAppend(src.data(), 0, static_cast<int32_t>(src.length())); +} + /** * Replaceable API */ @@ -1680,7 +1743,7 @@ UnicodeString::copy(int32_t start, int32_t limit, int32_t dest) { if (limit <= start) { return; // Nothing to do; avoid bogus malloc call } - char16_t* text = (char16_t*) uprv_malloc( sizeof(char16_t) * (limit - start) ); + char16_t* text = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (limit - start))); // Check to make sure text is not null. if (text != nullptr) { extractBetween(start, limit, text, 0); @@ -1725,13 +1788,13 @@ UnicodeString::doReverse(int32_t start, int32_t length) { // Before the loop we know left<right because length>=2. do { - hasSupplementary |= (UBool)U16_IS_LEAD(swap = *left); - hasSupplementary |= (UBool)U16_IS_LEAD(*left++ = *right); + hasSupplementary |= static_cast<UBool>(U16_IS_LEAD(swap = *left)); + hasSupplementary |= static_cast<UBool>(U16_IS_LEAD(*left++ = *right)); *right-- = swap; } while(left < right); // Make sure to test the middle code unit of an odd-length string. // Redundant if the length is even. - hasSupplementary |= (UBool)U16_IS_LEAD(*left); + hasSupplementary |= static_cast<UBool>(U16_IS_LEAD(*left)); /* if there are supplementary code points in the reversed range, then re-swap their surrogates */ if(hasSupplementary) { @@ -1834,7 +1897,7 @@ UnicodeString::releaseBuffer(int32_t newLength) { while(p<limit && *p!=0) { ++p; } - newLength=(int32_t)(p-array); + newLength = static_cast<int32_t>(p - array); } else if(newLength>capacity) { newLength=capacity; } @@ -1928,7 +1991,7 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, // release the old array if(flags & kRefCounted) { // the array is refCounted; decrement and release if 0 - u_atomic_int32_t *pRefCount = ((u_atomic_int32_t *)oldArray - 1); + u_atomic_int32_t* pRefCount = reinterpret_cast<u_atomic_int32_t*>(oldArray) - 1; if(umtx_atomic_dec(pRefCount) == 0) { if (pBufferToDelete == nullptr) { // Note: cast to (void *) is needed with MSVC, where u_atomic_int32_t @@ -1937,7 +2000,7 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, uprv_free((void *)pRefCount); } else { // the caller requested to delete it himself - *pBufferToDelete = (int32_t *)pRefCount; + *pBufferToDelete = reinterpret_cast<int32_t*>(pRefCount); } } } diff --git a/deps/icu-small/source/common/unistr_case.cpp b/deps/icu-small/source/common/unistr_case.cpp index b04d957bdcc992..40ea6b2f4d6edf 100644 --- a/deps/icu-small/source/common/unistr_case.cpp +++ b/deps/icu-small/source/common/unistr_case.cpp @@ -72,7 +72,7 @@ UnicodeString::doCaseCompare(int32_t start, int32_t result=u_strcmpFold(chars, length, srcChars, srcLength, options|U_COMPARE_IGNORE_CASE, &errorCode); if(result!=0) { - return (int8_t)(result >> 24 | 1); + return static_cast<int8_t>(result >> 24 | 1); } } else { // get the srcLength if necessary @@ -80,7 +80,7 @@ UnicodeString::doCaseCompare(int32_t start, srcLength = u_strlen(srcChars + srcStart); } if(length != srcLength) { - return (int8_t)((length - srcLength) >> 24 | 1); + return static_cast<int8_t>((length - srcLength) >> 24 | 1); } } return 0; diff --git a/deps/icu-small/source/common/unistr_cnv.cpp b/deps/icu-small/source/common/unistr_cnv.cpp index e300a79ce5175f..bf52dd51188421 100644 --- a/deps/icu-small/source/common/unistr_cnv.cpp +++ b/deps/icu-small/source/common/unistr_cnv.cpp @@ -63,7 +63,7 @@ UnicodeString::UnicodeString(const char *codepageData, const char *codepage) { fUnion.fFields.fLengthAndFlags = kShortString; if (codepageData != nullptr) { - doCodepageCreate(codepageData, (int32_t)uprv_strlen(codepageData), codepage); + doCodepageCreate(codepageData, static_cast<int32_t>(uprv_strlen(codepageData)), codepage); } } @@ -89,7 +89,7 @@ UnicodeString::UnicodeString(const char *src, int32_t srcLength, } else { // get input length if(srcLength==-1) { - srcLength=(int32_t)uprv_strlen(src); + srcLength = static_cast<int32_t>(uprv_strlen(src)); } if(srcLength>0) { if (cnv != nullptr) { @@ -151,13 +151,13 @@ UnicodeString::extract(int32_t start, int32_t capacity; if(dstSize < 0x7fffffff) { // Assume that the capacity is real and a limit pointer won't wrap around. - capacity = (int32_t)dstSize; + capacity = static_cast<int32_t>(dstSize); } else { // Pin the capacity so that a limit pointer does not wrap around. - char *targetLimit = (char *)U_MAX_PTR(target); + char* targetLimit = static_cast<char*>(U_MAX_PTR(target)); // U_MAX_PTR(target) returns a targetLimit that is at most 0x7fffffff // greater than target and does not wrap around the top of the address space. - capacity = (int32_t)(targetLimit - target); + capacity = static_cast<int32_t>(targetLimit - target); } // create the converter @@ -267,7 +267,7 @@ UnicodeString::doExtract(int32_t start, int32_t length, destLimit=dest=nullptr; } else if(destCapacity==-1) { // Pin the limit to U_MAX_PTR if the "magic" destCapacity is used. - destLimit=(char*)U_MAX_PTR(dest); + destLimit = static_cast<char*>(U_MAX_PTR(dest)); // for NUL-termination, translate into highest int32_t destCapacity=0x7fffffff; } else { @@ -276,7 +276,7 @@ UnicodeString::doExtract(int32_t start, int32_t length, // perform the conversion ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, &errorCode); - length=(int32_t)(dest-originalDest); + length = static_cast<int32_t>(dest - originalDest); // if an overflow occurs, then get the preflighting length if(errorCode==U_BUFFER_OVERFLOW_ERROR) { @@ -287,7 +287,7 @@ UnicodeString::doExtract(int32_t start, int32_t length, dest=buffer; errorCode=U_ZERO_ERROR; ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, nullptr, true, &errorCode); - length+=(int32_t)(dest-buffer); + length += static_cast<int32_t>(dest - buffer); } while(errorCode==U_BUFFER_OVERFLOW_ERROR); } @@ -304,7 +304,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, return; } if(dataLength == -1) { - dataLength = (int32_t)uprv_strlen(codepageData); + dataLength = static_cast<int32_t>(uprv_strlen(codepageData)); } UErrorCode status = U_ZERO_ERROR; @@ -393,7 +393,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, &mySource, mySourceEnd, nullptr, true, &status); // update the conversion parameters - setLength((int32_t)(myTarget - array)); + setLength(static_cast<int32_t>(myTarget - array)); // allocate more space and copy data, if needed if(status == U_BUFFER_OVERFLOW_ERROR) { @@ -405,7 +405,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, // estimate the new size needed, larger than before // try 2 char16_t's per remaining source byte - arraySize = (int32_t)(length() + 2 * (mySourceEnd - mySource)); + arraySize = static_cast<int32_t>(length() + 2 * (mySourceEnd - mySource)); } else { break; } diff --git a/deps/icu-small/source/common/unormcmp.cpp b/deps/icu-small/source/common/unormcmp.cpp index 028b28643c66b1..fa8b85cea047b9 100644 --- a/deps/icu-small/source/common/unormcmp.cpp +++ b/deps/icu-small/source/common/unormcmp.cpp @@ -313,7 +313,7 @@ unorm_cmpEquivFold(const char16_t *s1, int32_t length1, */ if( level1==0 && (options&U_COMPARE_IGNORE_CASE) && - (length=ucase_toFullFolding((UChar32)cp1, &p, options))>=0 + (length = ucase_toFullFolding(cp1, &p, options)) >= 0 ) { /* cp1 case-folds to the code point "length" or to p[length] */ if(U_IS_SURROGATE(c1)) { @@ -358,7 +358,7 @@ unorm_cmpEquivFold(const char16_t *s1, int32_t length1, } if( level2==0 && (options&U_COMPARE_IGNORE_CASE) && - (length=ucase_toFullFolding((UChar32)cp2, &p, options))>=0 + (length = ucase_toFullFolding(cp2, &p, options)) >= 0 ) { /* cp2 case-folds to the code point "length" or to p[length] */ if(U_IS_SURROGATE(c2)) { @@ -403,7 +403,7 @@ unorm_cmpEquivFold(const char16_t *s1, int32_t length1, } if( level1<2 && (options&_COMPARE_EQUIV) && - nullptr != (p = nfcImpl->getDecomposition((UChar32)cp1, decomp1, length)) + nullptr != (p = nfcImpl->getDecomposition(cp1, decomp1, length)) ) { /* cp1 decomposes into p[length] */ if(U_IS_SURROGATE(c1)) { @@ -444,7 +444,7 @@ unorm_cmpEquivFold(const char16_t *s1, int32_t length1, } if( level2<2 && (options&_COMPARE_EQUIV) && - nullptr != (p = nfcImpl->getDecomposition((UChar32)cp2, decomp2, length)) + nullptr != (p = nfcImpl->getDecomposition(cp2, decomp2, length)) ) { /* cp2 decomposes into p[length] */ if(U_IS_SURROGATE(c2)) { diff --git a/deps/icu-small/source/common/uprops.cpp b/deps/icu-small/source/common/uprops.cpp index c87eeff3810ec5..817a1fac0c012b 100644 --- a/deps/icu-small/source/common/uprops.cpp +++ b/deps/icu-small/source/common/uprops.cpp @@ -100,8 +100,8 @@ void U_CALLCONV ulayout_load(UErrorCode &errorCode) { ulayout_isAcceptable, nullptr, &errorCode); if (U_FAILURE(errorCode)) { return; } - const uint8_t *inBytes = (const uint8_t *)udata_getMemory(gLayoutMemory); - const int32_t *inIndexes = (const int32_t *)inBytes; + const uint8_t* inBytes = static_cast<const uint8_t*>(udata_getMemory(gLayoutMemory)); + const int32_t* inIndexes = reinterpret_cast<const int32_t*>(inBytes); int32_t indexesLength = inIndexes[ULAYOUT_IX_INDEXES_LENGTH]; if (indexesLength < 12) { errorCode = U_INVALID_FORMAT_ERROR; // Not enough indexes. @@ -171,7 +171,7 @@ static UBool defaultContains(const BinaryProperty &prop, UChar32 c, UProperty /* } static UBool caseBinaryPropertyContains(const BinaryProperty &/*prop*/, UChar32 c, UProperty which) { - return static_cast<UBool>(ucase_hasBinaryProperty(c, which)); + return ucase_hasBinaryProperty(c, which); } static UBool isBidiControl(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { @@ -208,7 +208,7 @@ static UBool isNormInert(const BinaryProperty &, UChar32, UProperty) { static UBool isNormInert(const BinaryProperty &/*prop*/, UChar32 c, UProperty which) { UErrorCode errorCode=U_ZERO_ERROR; const Normalizer2 *norm2=Normalizer2Factory::getInstance( - (UNormalizationMode)(which-UCHAR_NFD_INERT+UNORM_NFD), errorCode); + static_cast<UNormalizationMode>(which - UCHAR_NFD_INERT + UNORM_NFD), errorCode); return U_SUCCESS(errorCode) && norm2->isInert(c); } #endif @@ -242,7 +242,7 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP if(c>=0) { /* single code point */ const char16_t *resultString; - return (UBool)(ucase_toFullFolding(c, &resultString, U_FOLD_CASE_DEFAULT)>=0); + return ucase_toFullFolding(c, &resultString, U_FOLD_CASE_DEFAULT) >= 0; } else { /* guess some large but stack-friendly capacity */ char16_t dest[2*UCASE_MAX_STRING_LENGTH]; @@ -250,9 +250,9 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP destLength=u_strFoldCase(dest, UPRV_LENGTHOF(dest), nfd.getBuffer(), nfd.length(), U_FOLD_CASE_DEFAULT, &errorCode); - return (UBool)(U_SUCCESS(errorCode) && + return U_SUCCESS(errorCode) && 0!=u_strCompare(nfd.getBuffer(), nfd.length(), - dest, destLength, false)); + dest, destLength, false); } } #endif @@ -359,6 +359,19 @@ static constexpr UChar32 ID_COMPAT_MATH_START[] = { 0x1D7C3 }; +/** Ranges (start/limit pairs) of Modifier_Combining_mark (only), from UCD PropList.txt. */ +static constexpr UChar32 MODIFIER_COMBINING_MARK[] = { + 0x0654, 0x0655 + 1, + 0x0658, 0x0658 + 1, // U+0658 + 0x06DC, 0x06DC + 1, // U+06DC + 0x06E3, 0x06E3 + 1, // U+06E3 + 0x06E7, 0x06E8 + 1, + 0x08CA, 0x08CB + 1, + 0x08CD, 0x08CF + 1, + 0x08D3, 0x08D3 + 1, // U+08D3 + 0x08F3, 0x08F3 + 1 // U+08F3 +}; + static UBool isIDCompatMathStart(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { if (c < ID_COMPAT_MATH_START[0]) { return false; } // fastpath for common scripts for (UChar32 startChar : ID_COMPAT_MATH_START) { @@ -375,6 +388,14 @@ static UBool isIDCompatMathContinue(const BinaryProperty &prop, UChar32 c, UProp return isIDCompatMathStart(prop, c, UCHAR_ID_COMPAT_MATH_START); } +static UBool isModifierCombiningMark(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { + for (int32_t i = 0; i < UPRV_LENGTHOF(MODIFIER_COMBINING_MARK); i += 2) { + if (c < MODIFIER_COMBINING_MARK[i]) { return false; } // below range start + if (c < MODIFIER_COMBINING_MARK[i + 1]) { return true; } // below range limit + } + return false; +} + static const BinaryProperty binProps[UCHAR_BINARY_LIMIT]={ /* * column and mask values for binary properties from u_getUnicodeProperties(). @@ -459,6 +480,7 @@ static const BinaryProperty binProps[UCHAR_BINARY_LIMIT]={ { UPROPS_SRC_IDSU, 0, isIDSUnaryOperator }, // UCHAR_IDS_UNARY_OPERATOR { UPROPS_SRC_ID_COMPAT_MATH, 0, isIDCompatMathStart }, // UCHAR_ID_COMPAT_MATH_START { UPROPS_SRC_ID_COMPAT_MATH, 0, isIDCompatMathContinue }, // UCHAR_ID_COMPAT_MATH_CONTINUE + { UPROPS_SRC_MCM, 0 , isModifierCombiningMark }, // UCHAR_MODIFIER_COMBINING_MARK }; U_CAPI UBool U_EXPORT2 @@ -521,7 +543,7 @@ struct IntProperty { static int32_t defaultGetValue(const IntProperty &prop, UChar32 c, UProperty /*which*/) { /* systematic, directly stored properties */ - return (int32_t)(u_getUnicodeProperties(c, prop.column)&prop.mask)>>prop.shift; + return static_cast<int32_t>(u_getUnicodeProperties(c, prop.column) & prop.mask) >> prop.shift; } static int32_t defaultGetMaxValue(const IntProperty &prop, UProperty /*which*/) { @@ -533,17 +555,25 @@ static int32_t getMaxValueFromShift(const IntProperty &prop, UProperty /*which*/ } static int32_t getBiDiClass(const IntProperty &/*prop*/, UChar32 c, UProperty /*which*/) { - return (int32_t)u_charDirection(c); + return static_cast<int32_t>(u_charDirection(c)); } static int32_t getBiDiPairedBracketType(const IntProperty &/*prop*/, UChar32 c, UProperty /*which*/) { - return (int32_t)ubidi_getPairedBracketType(c); + return static_cast<int32_t>(ubidi_getPairedBracketType(c)); } static int32_t biDiGetMaxValue(const IntProperty &/*prop*/, UProperty which) { return ubidi_getMaxValue(which); } +static int32_t getBlock(const IntProperty &/*prop*/, UChar32 c, UProperty /*which*/) { + return static_cast<int32_t>(ublock_getCode(c)); +} + +static int32_t blockGetMaxValue(const IntProperty &/*prop*/, UProperty /*which*/) { + return uprv_getMaxValues(UPROPS_MAX_VALUES_OTHER_INDEX) & UPROPS_MAX_BLOCK; +} + #if UCONFIG_NO_NORMALIZATION static int32_t getCombiningClass(const IntProperty &, UChar32, UProperty) { return 0; @@ -555,7 +585,7 @@ static int32_t getCombiningClass(const IntProperty &/*prop*/, UChar32 c, UProper #endif static int32_t getGeneralCategory(const IntProperty &/*prop*/, UChar32 c, UProperty /*which*/) { - return (int32_t)u_charType(c); + return static_cast<int32_t>(u_charType(c)); } static int32_t getJoiningGroup(const IntProperty &/*prop*/, UChar32 c, UProperty /*which*/) { @@ -567,23 +597,26 @@ static int32_t getJoiningType(const IntProperty &/*prop*/, UChar32 c, UProperty } static int32_t getNumericType(const IntProperty &/*prop*/, UChar32 c, UProperty /*which*/) { - int32_t ntv=(int32_t)GET_NUMERIC_TYPE_VALUE(u_getMainProperties(c)); + int32_t ntv = static_cast<int32_t>(GET_NUMERIC_TYPE_VALUE(u_getMainProperties(c))); return UPROPS_NTV_GET_TYPE(ntv); } static int32_t getScript(const IntProperty &/*prop*/, UChar32 c, UProperty /*which*/) { UErrorCode errorCode=U_ZERO_ERROR; - return (int32_t)uscript_getScript(c, &errorCode); + return static_cast<int32_t>(uscript_getScript(c, &errorCode)); } static int32_t scriptGetMaxValue(const IntProperty &/*prop*/, UProperty /*which*/) { - uint32_t scriptX=uprv_getMaxValues(0)&UPROPS_SCRIPT_X_MASK; - return uprops_mergeScriptCodeOrIndex(scriptX); + return uprv_getMaxValues(0)&UPROPS_MAX_SCRIPT; } /* * Map some of the Grapheme Cluster Break values to Hangul Syllable Types. - * Hangul_Syllable_Type is fully redundant with a subset of Grapheme_Cluster_Break. + * Hangul_Syllable_Type used to be fully redundant with a subset of Grapheme_Cluster_Break. + * + * Starting with Unicode 16, this is no longer true for HST=V vs. GCB=V in some cases: + * Some Kirat Rai vowels are given GCB=V for proper grapheme clustering, but + * they are of course not related to Hangul syllables. */ static const UHangulSyllableType gcbToHst[]={ U_HST_NOT_APPLICABLE, /* U_GCB_OTHER */ @@ -603,8 +636,13 @@ static const UHangulSyllableType gcbToHst[]={ }; static int32_t getHangulSyllableType(const IntProperty &/*prop*/, UChar32 c, UProperty /*which*/) { + // Ignore supplementary code points: They all have HST=NA. + // This is a simple way to handle the GCB!=hst cases since Unicode 16 (Kirat Rai vowels). + if(c>0xffff) { + return U_HST_NOT_APPLICABLE; + } /* see comments on gcbToHst[] above */ - int32_t gcb=(int32_t)(u_getUnicodeProperties(c, 2)&UPROPS_GCB_MASK)>>UPROPS_GCB_SHIFT; + int32_t gcb = static_cast<int32_t>(u_getUnicodeProperties(c, 2) & UPROPS_GCB_MASK) >> UPROPS_GCB_SHIFT; if(gcb<UPRV_LENGTHOF(gcbToHst)) { return gcbToHst[gcb]; } else { @@ -618,7 +656,7 @@ static int32_t getNormQuickCheck(const IntProperty &, UChar32, UProperty) { } #else static int32_t getNormQuickCheck(const IntProperty &/*prop*/, UChar32 c, UProperty which) { - return (int32_t)unorm_getQuickCheck(c, (UNormalizationMode)(which-UCHAR_NFD_QUICK_CHECK+UNORM_NFD)); + return static_cast<int32_t>(unorm_getQuickCheck(c, static_cast<UNormalizationMode>(which - UCHAR_NFD_QUICK_CHECK + UNORM_NFD))); } #endif @@ -683,25 +721,25 @@ static const IntProperty intProps[UCHAR_INT_LIMIT-UCHAR_INT_START]={ * For them, column is the UPropertySource value. */ { UPROPS_SRC_BIDI, 0, 0, getBiDiClass, biDiGetMaxValue }, - { 0, UPROPS_BLOCK_MASK, UPROPS_BLOCK_SHIFT, defaultGetValue, defaultGetMaxValue }, + { UPROPS_SRC_BLOCK, 0, 0, getBlock, blockGetMaxValue }, { UPROPS_SRC_NFC, 0, 0xff, getCombiningClass, getMaxValueFromShift }, { 2, UPROPS_DT_MASK, 0, defaultGetValue, defaultGetMaxValue }, { 0, UPROPS_EA_MASK, UPROPS_EA_SHIFT, defaultGetValue, defaultGetMaxValue }, - { UPROPS_SRC_CHAR, 0, (int32_t)U_CHAR_CATEGORY_COUNT-1,getGeneralCategory, getMaxValueFromShift }, + { UPROPS_SRC_CHAR, 0, static_cast<int32_t>(U_CHAR_CATEGORY_COUNT) - 1, getGeneralCategory, getMaxValueFromShift }, { UPROPS_SRC_BIDI, 0, 0, getJoiningGroup, biDiGetMaxValue }, { UPROPS_SRC_BIDI, 0, 0, getJoiningType, biDiGetMaxValue }, { 2, UPROPS_LB_MASK, UPROPS_LB_SHIFT, defaultGetValue, defaultGetMaxValue }, - { UPROPS_SRC_CHAR, 0, (int32_t)U_NT_COUNT-1, getNumericType, getMaxValueFromShift }, + { UPROPS_SRC_CHAR, 0, static_cast<int32_t>(U_NT_COUNT) - 1, getNumericType, getMaxValueFromShift }, { UPROPS_SRC_PROPSVEC, 0, 0, getScript, scriptGetMaxValue }, - { UPROPS_SRC_PROPSVEC, 0, (int32_t)U_HST_COUNT-1, getHangulSyllableType, getMaxValueFromShift }, + { UPROPS_SRC_PROPSVEC, 0, static_cast<int32_t>(U_HST_COUNT) - 1, getHangulSyllableType, getMaxValueFromShift }, // UCHAR_NFD_QUICK_CHECK: max=1=YES -- never "maybe", only "no" or "yes" - { UPROPS_SRC_NFC, 0, (int32_t)UNORM_YES, getNormQuickCheck, getMaxValueFromShift }, + { UPROPS_SRC_NFC, 0, static_cast<int32_t>(UNORM_YES), getNormQuickCheck, getMaxValueFromShift }, // UCHAR_NFKD_QUICK_CHECK: max=1=YES -- never "maybe", only "no" or "yes" - { UPROPS_SRC_NFKC, 0, (int32_t)UNORM_YES, getNormQuickCheck, getMaxValueFromShift }, + { UPROPS_SRC_NFKC, 0, static_cast<int32_t>(UNORM_YES), getNormQuickCheck, getMaxValueFromShift }, // UCHAR_NFC_QUICK_CHECK: max=2=MAYBE - { UPROPS_SRC_NFC, 0, (int32_t)UNORM_MAYBE, getNormQuickCheck, getMaxValueFromShift }, + { UPROPS_SRC_NFC, 0, static_cast<int32_t>(UNORM_MAYBE), getNormQuickCheck, getMaxValueFromShift }, // UCHAR_NFKC_QUICK_CHECK: max=2=MAYBE - { UPROPS_SRC_NFKC, 0, (int32_t)UNORM_MAYBE, getNormQuickCheck, getMaxValueFromShift }, + { UPROPS_SRC_NFKC, 0, static_cast<int32_t>(UNORM_MAYBE), getNormQuickCheck, getMaxValueFromShift }, { UPROPS_SRC_NFC, 0, 0xff, getLeadCombiningClass, getMaxValueFromShift }, { UPROPS_SRC_NFC, 0, 0xff, getTrailCombiningClass, getMaxValueFromShift }, { 2, UPROPS_GCB_MASK, UPROPS_GCB_SHIFT, defaultGetValue, defaultGetMaxValue }, @@ -711,7 +749,8 @@ static const IntProperty intProps[UCHAR_INT_LIMIT-UCHAR_INT_START]={ { UPROPS_SRC_INPC, 0, 0, getInPC, layoutGetMaxValue }, { UPROPS_SRC_INSC, 0, 0, getInSC, layoutGetMaxValue }, { UPROPS_SRC_VO, 0, 0, getVo, layoutGetMaxValue }, - { UPROPS_SRC_PROPSVEC, 0, (int32_t)U_ID_STATUS_ALLOWED, getIDStatusValue, getMaxValueFromShift }, + { UPROPS_SRC_PROPSVEC, 0, static_cast<int32_t>(U_ID_STATUS_ALLOWED), getIDStatusValue, getMaxValueFromShift }, + { 0, UPROPS_INCB_MASK, UPROPS_INCB_SHIFT,defaultGetValue, defaultGetMaxValue }, }; U_CAPI int32_t U_EXPORT2 @@ -829,6 +868,13 @@ uprops_addPropertyStarts(UPropertySource src, const USetAdder *sa, UErrorCode *p } return; } + if (src == UPROPS_SRC_MCM) { + // range limits + for (UChar32 c : MODIFIER_COMBINING_MARK) { + sa->add(sa->set, c); + } + return; + } if (!ulayout_ensureData(*pErrorCode)) { return; } const UCPTrie *trie; switch (src) { diff --git a/deps/icu-small/source/common/uprops.h b/deps/icu-small/source/common/uprops.h index 93120017f0fc67..022f64474a1bac 100644 --- a/deps/icu-small/source/common/uprops.h +++ b/deps/icu-small/source/common/uprops.h @@ -39,16 +39,18 @@ enum { UPROPS_SCRIPT_EXTENSIONS_INDEX, - UPROPS_RESERVED_INDEX_7, + UPROPS_BLOCK_TRIE_INDEX, UPROPS_RESERVED_INDEX_8, - /* size of the data file (number of 32-bit units after the header) */ + /** size of the data file (number of 32-bit units after the header) */ UPROPS_DATA_TOP_INDEX, - /* maximum values for code values in vector word 0 */ + /** maximum values for code values in vector word 0 */ UPROPS_MAX_VALUES_INDEX=10, - /* maximum values for code values in vector word 2 */ + /** maximum values for code values in vector word 2 */ UPROPS_MAX_VALUES_2_INDEX, + /** maximum values for other code values */ + UPROPS_MAX_VALUES_OTHER_INDEX, UPROPS_INDEX_COUNT=16 }; @@ -117,62 +119,57 @@ enum { /* number of properties vector words */ #define UPROPS_VECTOR_WORDS 3 -/* - * Properties in vector word 0 - * Bits - * 31..24 DerivedAge version major/minor one nibble each - * 23..22 3..1: Bits 21..20 & 7..0 = Script_Extensions index - * 3: Script value from Script_Extensions - * 2: Script=Inherited - * 1: Script=Common - * 0: Script=bits 21..20 & 7..0 - * 21..20 Bits 9..8 of the UScriptCode, or index to Script_Extensions - * 19..17 East Asian Width - * 16.. 8 UBlockCode - * 7.. 0 UScriptCode, or index to Script_Extensions - */ - -/* derived age: one nibble each for major and minor version numbers */ -#define UPROPS_AGE_MASK 0xff000000 -#define UPROPS_AGE_SHIFT 24 - -/* Script_Extensions: mask includes Script */ -#define UPROPS_SCRIPT_X_MASK 0x00f000ff -#define UPROPS_SCRIPT_X_SHIFT 22 - -// The UScriptCode or Script_Extensions index is split across two bit fields. -// (Starting with Unicode 13/ICU 66/2019 due to more varied Script_Extensions.) -// Shift the high bits right by 12 to assemble the full value. -#define UPROPS_SCRIPT_HIGH_MASK 0x00300000 -#define UPROPS_SCRIPT_HIGH_SHIFT 12 -#define UPROPS_MAX_SCRIPT 0x3ff - -#define UPROPS_EA_MASK 0x000e0000 -#define UPROPS_EA_SHIFT 17 - -#define UPROPS_BLOCK_MASK 0x0001ff00 -#define UPROPS_BLOCK_SHIFT 8 - -#define UPROPS_SCRIPT_LOW_MASK 0x000000ff - -/* UPROPS_SCRIPT_X_WITH_COMMON must be the lowest value that involves Script_Extensions. */ -#define UPROPS_SCRIPT_X_WITH_COMMON 0x400000 -#define UPROPS_SCRIPT_X_WITH_INHERITED 0x800000 -#define UPROPS_SCRIPT_X_WITH_OTHER 0xc00000 - #ifdef __cplusplus namespace { -inline uint32_t uprops_mergeScriptCodeOrIndex(uint32_t scriptX) { - return - ((scriptX & UPROPS_SCRIPT_HIGH_MASK) >> UPROPS_SCRIPT_HIGH_SHIFT) | - (scriptX & UPROPS_SCRIPT_LOW_MASK); -} - -} // namespace - -#endif // __cplusplus +// Properties in vector word 0 +// Bits +// 31..26 Age major version (major=0..63) +// 25..24 Age minor version (minor=0..3) +// 23..17 reserved +// 16..15 Indic Conjunct Break +// 14..12 East Asian Width +// 11..10 3..1: Bits 9..0 = Script_Extensions index +// 3: Script value from Script_Extensions +// 2: Script=Inherited +// 1: Script=Common +// 0: Script=bits 9..0 +// 9.. 0 UScriptCode, or index to Script_Extensions + +// *Note*: If we need more than the available bits for new properties, +// then we could move the Age property out of the properties vectors. +// For example, we could store the Age property in its own trie. +// In a small, 8-bit-value-width CodePointTrie, it would be larger than +// the amount of data that we would save in the properties vectors and their trie, +// but the size increase would be a small percentage of the total uprops.icu size. +// It would certainly be a much smaller increase than widening the properties vectors. +// The savings in the properties vectors+trie from pulling out the Age property +// are partly from mediocre correlation between Age and other property values. +// (Adding new characters to existing scripts tends to split property vectors where +// new characters are similar to old ones.) +// See https://github.com/unicode-org/icu/pull/3025 for details. + +inline constexpr uint32_t UPROPS_AGE_MASK = 0xff000000; +inline constexpr int32_t UPROPS_AGE_SHIFT = 24; + +inline constexpr uint8_t UPROPS_AGE_MAJOR_MAX = 63; +inline constexpr uint8_t UPROPS_AGE_MINOR_MAX = 3; + +inline constexpr uint32_t UPROPS_EA_MASK = 0x00007000; +inline constexpr int32_t UPROPS_EA_SHIFT = 12; + +inline constexpr uint32_t UPROPS_INCB_MASK = 0x00018000; +inline constexpr int32_t UPROPS_INCB_SHIFT = 15; + +/** Script_Extensions: mask includes Script */ +inline constexpr uint32_t UPROPS_SCRIPT_X_MASK = 0x00000fff; + +// UPROPS_SCRIPT_X_WITH_COMMON must be the lowest value that involves Script_Extensions. +inline constexpr uint32_t UPROPS_SCRIPT_X_WITH_OTHER = 0xc00; +inline constexpr uint32_t UPROPS_SCRIPT_X_WITH_INHERITED = 0x800; +inline constexpr uint32_t UPROPS_SCRIPT_X_WITH_COMMON = 0x400; +inline constexpr int32_t UPROPS_MAX_SCRIPT = 0x3ff; /* * Properties in vector word 1 @@ -234,8 +231,6 @@ enum { * 4.. 0 Decomposition Type */ -#ifdef __cplusplus - // https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type // The Identifier_Type maps each code point to a *set* of one or more values. // Some can be combined with others, some can only occur alone. @@ -296,6 +291,8 @@ inline constexpr uint8_t uprops_idTypeToEncoded[] = { UPROPS_ID_TYPE_RECOMMENDED }; +} // namespace + #endif // __cplusplus #define UPROPS_LB_MASK 0x03f00000 @@ -312,6 +309,17 @@ inline constexpr uint8_t uprops_idTypeToEncoded[] = { #define UPROPS_DT_MASK 0x0000001f +#ifdef __cplusplus + +namespace { + +// Bits 9..0 in UPROPS_MAX_VALUES_OTHER_INDEX +inline constexpr uint32_t UPROPS_MAX_BLOCK = 0x3ff; + +} // namespace + +#endif // __cplusplus + /** * Gets the main properties value for a code point. * Implemented in uchar.c for uprops.cpp. @@ -385,6 +393,8 @@ enum { ZWNBSP =0xfeff }; +// TODO: Move these two functions into a different header file (new unames.h?) so that uprops.h +// need not be C-compatible any more. /** * Get the maximum length of a (regular/1.0/extended) character name. * @return 0 if no character names available. @@ -438,6 +448,8 @@ enum UPropertySource { UPROPS_SRC_EMOJI, UPROPS_SRC_IDSU, UPROPS_SRC_ID_COMPAT_MATH, + UPROPS_SRC_BLOCK, + UPROPS_SRC_MCM, /** One more than the highest UPropertySource (UPROPS_SRC_) constant. */ UPROPS_SRC_COUNT }; @@ -469,6 +481,13 @@ upropsvec_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode); U_CFUNC void U_EXPORT2 uprops_addPropertyStarts(UPropertySource src, const USetAdder *sa, UErrorCode *pErrorCode); +#ifdef __cplusplus + +U_CFUNC void U_EXPORT2 +ublock_addPropertyStarts(const USetAdder *sa, UErrorCode &errorCode); + +#endif // __cplusplus + /** * Return a set of characters for property enumeration. * For each two consecutive characters (start, limit) in the set, @@ -481,6 +500,8 @@ uprops_addPropertyStarts(UPropertySource src, const USetAdder *sa, UErrorCode *p uprv_getInclusions(const USetAdder *sa, UErrorCode *pErrorCode); */ +// TODO: Move this into a different header file (udataswp.h? new unames.h?) so that uprops.h +// need not be C-compatible any more. /** * Swap the ICU Unicode character names file. See uchar.c. * @internal diff --git a/deps/icu-small/source/common/uresbund.cpp b/deps/icu-small/source/common/uresbund.cpp index ea4327b31489af..3a09cbf3bcaac6 100644 --- a/deps/icu-small/source/common/uresbund.cpp +++ b/deps/icu-small/source/common/uresbund.cpp @@ -56,7 +56,7 @@ static UMutex resbMutex; /* INTERNAL: hashes an entry */ static int32_t U_CALLCONV hashEntry(const UHashTok parm) { - UResourceDataEntry *b = (UResourceDataEntry *)parm.pointer; + UResourceDataEntry* b = static_cast<UResourceDataEntry*>(parm.pointer); UHashTok namekey, pathkey; namekey.pointer = b->fName; pathkey.pointer = b->fPath; @@ -65,15 +65,14 @@ static int32_t U_CALLCONV hashEntry(const UHashTok parm) { /* INTERNAL: compares two entries */ static UBool U_CALLCONV compareEntries(const UHashTok p1, const UHashTok p2) { - UResourceDataEntry *b1 = (UResourceDataEntry *)p1.pointer; - UResourceDataEntry *b2 = (UResourceDataEntry *)p2.pointer; + UResourceDataEntry* b1 = static_cast<UResourceDataEntry*>(p1.pointer); + UResourceDataEntry* b2 = static_cast<UResourceDataEntry*>(p2.pointer); UHashTok name1, name2, path1, path2; name1.pointer = b1->fName; name2.pointer = b2->fName; path1.pointer = b1->fPath; path2.pointer = b2->fPath; - return (UBool)(uhash_compareChars(name1, name2) && - uhash_compareChars(path1, path2)); + return uhash_compareChars(name1, name2) && uhash_compareChars(path1, path2); } @@ -403,7 +402,7 @@ static int32_t ures_flushCache() pos = UHASH_FIRST; while ((e = uhash_nextElement(cache, &pos)) != nullptr) { - resB = (UResourceDataEntry *) e->value.pointer; + resB = static_cast<UResourceDataEntry*>(e->value.pointer); /* Deletes only if reference counter == 0 * Don't worry about the children of this node. * Those will eventually get deleted too, if not already. @@ -488,15 +487,15 @@ static void initCache(UErrorCode *status) { /** INTERNAL: sets the name (locale) of the resource bundle to given name */ static void setEntryName(UResourceDataEntry *res, const char *name, UErrorCode *status) { - int32_t len = (int32_t)uprv_strlen(name); + int32_t len = static_cast<int32_t>(uprv_strlen(name)); if(res->fName != nullptr && res->fName != res->fNameBuffer) { uprv_free(res->fName); } - if (len < (int32_t)sizeof(res->fNameBuffer)) { + if (len < static_cast<int32_t>(sizeof(res->fNameBuffer))) { res->fName = res->fNameBuffer; } else { - res->fName = (char *)uprv_malloc(len+1); + res->fName = static_cast<char*>(uprv_malloc(len + 1)); } if(res->fName == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -535,18 +534,18 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE name = localeID; } - find.fName = (char *)name; - find.fPath = (char *)path; + find.fName = const_cast<char*>(name); + find.fPath = const_cast<char*>(path); /* calculate the hash value of the entry */ /*hashkey.pointer = (void *)&find;*/ /*hashValue = hashEntry(hashkey);*/ /* check to see if we already have this entry */ - r = (UResourceDataEntry *)uhash_get(cache, &find); + r = static_cast<UResourceDataEntry*>(uhash_get(cache, &find)); if(r == nullptr) { /* if the entry is not yet in the hash table, we'll try to construct a new one */ - r = (UResourceDataEntry *) uprv_malloc(sizeof(UResourceDataEntry)); + r = static_cast<UResourceDataEntry*>(uprv_malloc(sizeof(UResourceDataEntry))); if(r == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -562,7 +561,7 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE } if(path != nullptr) { - r->fPath = (char *)uprv_strdup(path); + r->fPath = uprv_strdup(path); if(r->fPath == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; uprv_free(r); @@ -589,7 +588,7 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE if (U_SUCCESS(*status)) { const int32_t *poolIndexes = r->fPool->fData.pRoot + 1; if(r->fData.pRoot[1 + URES_INDEX_POOL_CHECKSUM] == poolIndexes[URES_INDEX_POOL_CHECKSUM]) { - r->fData.poolBundleKeys = (const char *)(poolIndexes + (poolIndexes[URES_INDEX_LENGTH] & 0xff)); + r->fData.poolBundleKeys = reinterpret_cast<const char*>(poolIndexes + (poolIndexes[URES_INDEX_LENGTH] & 0xff)); r->fData.poolBundleStrings = r->fPool->fData.p16BitUnits; } else { r->fBogus = *status = U_INVALID_FORMAT_ERROR; @@ -615,7 +614,7 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE { UResourceDataEntry *oldR = nullptr; - if((oldR = (UResourceDataEntry *)uhash_get(cache, r)) == nullptr) { /* if the data is not cached */ + if ((oldR = static_cast<UResourceDataEntry*>(uhash_get(cache, r))) == nullptr) { /* if the data is not cached */ /* just insert it in the cache */ UErrorCode cacheStatus = U_ZERO_ERROR; uhash_put(cache, (void *)r, r, &cacheStatus); @@ -676,8 +675,8 @@ findFirstExisting(const char* path, char* name, const char* defaultLocale, UResO if (U_FAILURE(*status)) { return nullptr; } - *isDefault = (UBool)(uprv_strncmp(name, defaultLocale, uprv_strlen(name)) == 0); - hasRealData = (UBool)(r->fBogus == U_ZERO_ERROR); + *isDefault = static_cast<UBool>(uprv_strncmp(name, defaultLocale, uprv_strlen(name)) == 0); + hasRealData = static_cast<UBool>(r->fBogus == U_ZERO_ERROR); if(!hasRealData) { /* this entry is not real. We will discard it. */ /* However, the parent line for this entry is */ @@ -692,7 +691,7 @@ findFirstExisting(const char* path, char* name, const char* defaultLocale, UResO uprv_strcpy(name, r->fName); /* this is needed for supporting aliases */ } - *isRoot = (UBool)(uprv_strcmp(name, kRootLocaleName) == 0); + *isRoot = static_cast<UBool>(uprv_strcmp(name, kRootLocaleName) == 0); /*Fallback data stuff*/ if (!hasRealData) { @@ -1091,7 +1090,7 @@ static void ures_appendResPath(UResourceBundle *resB, const char* toAdd, int32_t resB->fResPathLen += lenToAdd; if(RES_BUFSIZE <= resB->fResPathLen+1) { if(resB->fResPath == resB->fResBuf) { - resB->fResPath = (char *)uprv_malloc((resB->fResPathLen+1)*sizeof(char)); + resB->fResPath = static_cast<char*>(uprv_malloc((resB->fResPathLen + 1) * sizeof(char))); /* Check that memory was allocated correctly. */ if (resB->fResPath == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -1099,7 +1098,7 @@ static void ures_appendResPath(UResourceBundle *resB, const char* toAdd, int32_t } uprv_strcpy(resB->fResPath, resB->fResBuf); } else { - char *temp = (char *)uprv_realloc(resB->fResPath, (resB->fResPathLen+1)*sizeof(char)); + char* temp = static_cast<char*>(uprv_realloc(resB->fResPath, (resB->fResPathLen + 1) * sizeof(char))); /* Check that memory was reallocated correctly. */ if (temp == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -1348,7 +1347,7 @@ UResourceBundle *getAliasTargetAsResourceBundle( // if the key path wasn't just a single resource ID, clear out // the bundle's key path and re-set it to be equal to keyPath. ures_freeResPath(resB); - ures_appendResPath(resB, keyPath, (int32_t)uprv_strlen(keyPath), status); + ures_appendResPath(resB, keyPath, static_cast<int32_t>(uprv_strlen(keyPath)), status); if(resB->fResPath[resB->fResPathLen-1] != RES_PATH_SEPARATOR) { ures_appendResPath(resB, RES_PATH_SEPARATOR_S, 1, status); } @@ -1407,7 +1406,7 @@ UResourceBundle *init_resb_result( validLocaleDataEntry, containerResPath, recursionDepth, resB, status); } if(resB == nullptr) { - resB = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle)); + resB = static_cast<UResourceBundle*>(uprv_malloc(sizeof(UResourceBundle))); if (resB == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -1449,7 +1448,7 @@ UResourceBundle *init_resb_result( resB, containerResPath, static_cast<int32_t>(uprv_strlen(containerResPath)), status); } if(key != nullptr) { - ures_appendResPath(resB, key, (int32_t)uprv_strlen(key), status); + ures_appendResPath(resB, key, static_cast<int32_t>(uprv_strlen(key)), status); if(resB->fResPath[resB->fResPathLen-1] != RES_PATH_SEPARATOR) { ures_appendResPath(resB, RES_PATH_SEPARATOR_S, 1, status); } @@ -1494,7 +1493,7 @@ UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle *origin if(original != nullptr) { if(r == nullptr) { isStackObject = false; - r = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle)); + r = static_cast<UResourceBundle*>(uprv_malloc(sizeof(UResourceBundle))); /* test for nullptr */ if (r == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -1730,7 +1729,7 @@ U_CAPI UBool U_EXPORT2 ures_hasNext(const UResourceBundle *resB) { if(resB == nullptr) { return false; } - return (UBool)(resB->fIndex < resB->fSize-1); + return resB->fIndex < resB->fSize-1; } U_CAPI const char16_t* U_EXPORT2 ures_getNextString(UResourceBundle *resB, int32_t* len, const char ** key, UErrorCode *status) { @@ -2064,7 +2063,7 @@ static Resource getTableItemByKeyPath(const ResourceData *pResData, Resource tab path.append(key, errorCode); if (U_FAILURE(errorCode)) { return RES_BOGUS; } char *pathPart = path.data(); /* Path from current resource to desired resource */ - UResType type = (UResType)RES_GET_TYPE(resource); /* the current resource type */ + UResType type = static_cast<UResType>(RES_GET_TYPE(resource)); /* the current resource type */ while (*pathPart && resource != RES_BOGUS && URES_IS_CONTAINER(type)) { char *nextPathPart = uprv_strchr(pathPart, RES_PATH_SEPARATOR); if (nextPathPart != nullptr) { @@ -2076,7 +2075,7 @@ static Resource getTableItemByKeyPath(const ResourceData *pResData, Resource tab int32_t t; const char *pathP = pathPart; resource = res_getTableItemByKey(pResData, resource, &t, &pathP); - type = (UResType)RES_GET_TYPE(resource); + type = static_cast<UResType>(RES_GET_TYPE(resource)); pathPart = nextPathPart; } if (*pathPart) { @@ -2737,7 +2736,7 @@ ures_openWithType(UResourceBundle *r, const char* path, const char* localeID, UBool isStackObject; if(r == nullptr) { - r = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle)); + r = static_cast<UResourceBundle*>(uprv_malloc(sizeof(UResourceBundle))); if(r == nullptr) { entryClose(entry); *status = U_MEMORY_ALLOCATION_ERROR; @@ -2924,7 +2923,7 @@ typedef struct ULocalesContext { static void U_CALLCONV ures_loc_closeLocales(UEnumeration *enumerator) { - ULocalesContext *ctx = (ULocalesContext *)enumerator->context; + ULocalesContext* ctx = static_cast<ULocalesContext*>(enumerator->context); ures_close(&ctx->curr); ures_close(&ctx->installed); uprv_free(ctx); @@ -2933,7 +2932,7 @@ ures_loc_closeLocales(UEnumeration *enumerator) { static int32_t U_CALLCONV ures_loc_countLocales(UEnumeration *en, UErrorCode * /*status*/) { - ULocalesContext *ctx = (ULocalesContext *)en->context; + ULocalesContext* ctx = static_cast<ULocalesContext*>(en->context); return ures_getSize(&ctx->installed); } @@ -3074,9 +3073,12 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, UErrorCode subStatus = U_ZERO_ERROR; int32_t length = 0; if(U_FAILURE(*status)) return 0; - CharString kwVal = ulocimp_getKeywordValue(locid, keyword, subStatus); - if(kwVal == DEFAULT_TAG) { - kwVal.clear(); + CharString kwVal; + if (keyword != nullptr && *keyword != '\0') { + kwVal = ulocimp_getKeywordValue(locid, keyword, subStatus); + if (kwVal == DEFAULT_TAG) { + kwVal.clear(); + } } CharString base = ulocimp_getBaseName(locid, subStatus); #if defined(URES_TREE_DEBUG) diff --git a/deps/icu-small/source/common/uresdata.cpp b/deps/icu-small/source/common/uresdata.cpp index c38e75c65b27b9..11faddf1ade990 100644 --- a/deps/icu-small/source/common/uresdata.cpp +++ b/deps/icu-small/source/common/uresdata.cpp @@ -140,7 +140,7 @@ isAcceptable(void *context, const char * /*type*/, const char * /*name*/, const UDataInfo *pInfo) { uprv_memcpy(context, pInfo->formatVersion, 4); - return (UBool)( + return pInfo->size>=20 && pInfo->isBigEndian==U_IS_BIG_ENDIAN && pInfo->charsetFamily==U_CHARSET_FAMILY && @@ -149,7 +149,7 @@ isAcceptable(void *context, pInfo->dataFormat[1]==0x65 && pInfo->dataFormat[2]==0x73 && pInfo->dataFormat[3]==0x42 && - (1<=pInfo->formatVersion[0] && pInfo->formatVersion[0]<=3)); + (1<=pInfo->formatVersion[0] && pInfo->formatVersion[0]<=3); } /* semi-public functions ---------------------------------------------------- */ @@ -161,8 +161,8 @@ res_init(ResourceData *pResData, UResType rootType; /* get the root resource */ - pResData->pRoot=(const int32_t *)inBytes; - pResData->rootRes=(Resource)*pResData->pRoot; + pResData->pRoot = static_cast<const int32_t*>(inBytes); + pResData->rootRes = static_cast<Resource>(*pResData->pRoot); pResData->p16BitUnits=&gEmpty16; /* formatVersion 1.1 must have a root item and at least 5 indexes */ @@ -173,7 +173,7 @@ res_init(ResourceData *pResData, } /* currently, we accept only resources that have a Table as their roots */ - rootType=(UResType)RES_GET_TYPE(pResData->rootRes); + rootType = static_cast<UResType>(RES_GET_TYPE(pResData->rootRes)); if(!URES_IS_TABLE(rootType)) { *errorCode=U_INVALID_FORMAT_ERROR; res_unload(pResData); @@ -207,15 +207,15 @@ res_init(ResourceData *pResData, // In version 2, bits 31..8 were reserved and always 0. // In version 3, they contain bits 23..0 of the poolStringIndexLimit. // Bits 27..24 are in indexes[URES_INDEX_ATTRIBUTES] bits 15..12. - pResData->poolStringIndexLimit=(int32_t)((uint32_t)indexes[URES_INDEX_LENGTH]>>8); + pResData->poolStringIndexLimit = static_cast<int32_t>(static_cast<uint32_t>(indexes[URES_INDEX_LENGTH]) >> 8); } if(indexLength>URES_INDEX_ATTRIBUTES) { int32_t att=indexes[URES_INDEX_ATTRIBUTES]; - pResData->noFallback=(UBool)(att&URES_ATT_NO_FALLBACK); - pResData->isPoolBundle=(UBool)((att&URES_ATT_IS_POOL_BUNDLE)!=0); - pResData->usesPoolBundle=(UBool)((att&URES_ATT_USES_POOL_BUNDLE)!=0); + pResData->noFallback = static_cast<UBool>(att & URES_ATT_NO_FALLBACK); + pResData->isPoolBundle = static_cast<UBool>((att & URES_ATT_IS_POOL_BUNDLE) != 0); + pResData->usesPoolBundle = static_cast<UBool>((att & URES_ATT_USES_POOL_BUNDLE) != 0); pResData->poolStringIndexLimit|=(att&0xf000)<<12; // bits 15..12 -> 27..24 - pResData->poolStringIndex16Limit=(int32_t)((uint32_t)att>>16); + pResData->poolStringIndex16Limit = static_cast<int32_t>(static_cast<uint32_t>(att) >> 16); } if((pResData->isPoolBundle || pResData->usesPoolBundle) && indexLength<=URES_INDEX_POOL_CHECKSUM) { *errorCode=U_INVALID_FORMAT_ERROR; @@ -225,7 +225,7 @@ res_init(ResourceData *pResData, if( indexLength>URES_INDEX_16BIT_TOP && indexes[URES_INDEX_16BIT_TOP]>indexes[URES_INDEX_KEYS_TOP] ) { - pResData->p16BitUnits=(const uint16_t *)(pResData->pRoot+indexes[URES_INDEX_KEYS_TOP]); + pResData->p16BitUnits = reinterpret_cast<const uint16_t*>(pResData->pRoot + indexes[URES_INDEX_KEYS_TOP]); } } @@ -361,14 +361,14 @@ UBool isNoInheritanceMarker(const ResourceData *pResData, Resource res) { } else if (res == offset) { const int32_t *p32=pResData->pRoot+res; int32_t length=*p32; - const char16_t *p=(const char16_t *)p32; + const char16_t* p = reinterpret_cast<const char16_t*>(p32); return length == 3 && p[2] == 0x2205 && p[3] == 0x2205 && p[4] == 0x2205; } else if (RES_GET_TYPE(res) == URES_STRING_V2) { const char16_t *p; - if((int32_t)offset<pResData->poolStringIndexLimit) { - p=(const char16_t *)pResData->poolBundleStrings+offset; + if (static_cast<int32_t>(offset) < pResData->poolStringIndexLimit) { + p = reinterpret_cast<const char16_t*>(pResData->poolBundleStrings) + offset; } else { - p=(const char16_t *)pResData->p16BitUnits+(offset-pResData->poolStringIndexLimit); + p = reinterpret_cast<const char16_t*>(pResData->p16BitUnits) + (offset - pResData->poolStringIndexLimit); } int32_t first=*p; if (first == 0x2205) { // implicit length @@ -580,7 +580,7 @@ ResourceArray ResourceDataValue::getArray(UErrorCode &errorCode) const { switch(RES_GET_TYPE(res)) { case URES_ARRAY: if (offset!=0) { // empty if offset==0 - items32 = (const Resource *)getData().pRoot+offset; + items32 = reinterpret_cast<const Resource*>(getData().pRoot) + offset; length = *items32++; } break; @@ -608,9 +608,9 @@ ResourceTable ResourceDataValue::getTable(UErrorCode &errorCode) const { switch(RES_GET_TYPE(res)) { case URES_TABLE: if (offset != 0) { // empty if offset==0 - keys16 = (const uint16_t *)(getData().pRoot+offset); + keys16 = reinterpret_cast<const uint16_t*>(getData().pRoot + offset); length = *keys16++; - items32 = (const Resource *)(keys16+length+(~length&1)); + items32 = reinterpret_cast<const Resource*>(keys16 + length + (~length & 1)); } break; case URES_TABLE16: @@ -622,7 +622,7 @@ ResourceTable ResourceDataValue::getTable(UErrorCode &errorCode) const { if (offset != 0) { // empty if offset==0 keys32 = getData().pRoot+offset; length = *keys32++; - items32 = (const Resource *)keys32 + length; + items32 = reinterpret_cast<const Resource*>(keys32) + length; } break; default: @@ -1019,9 +1019,9 @@ typedef struct Row { static int32_t U_CALLCONV ures_compareRows(const void *context, const void *left, const void *right) { - const char *keyChars=(const char *)context; - return (int32_t)uprv_strcmp(keyChars+((const Row *)left)->keyIndex, - keyChars+((const Row *)right)->keyIndex); + const char* keyChars = static_cast<const char*>(context); + return static_cast<int32_t>(uprv_strcmp(keyChars + static_cast<const Row*>(left)->keyIndex, + keyChars + static_cast<const Row*>(right)->keyIndex)); } typedef struct TempTable { @@ -1040,13 +1040,10 @@ enum { /* The table item key string is not locally available. */ static const char *const gUnknownKey=""; -/* resource table key for collation binaries: "%%CollationBin" */ -static const char16_t gCollationBinKey[]={ - 0x25, 0x25, - 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x69, 0x6e, - 0 -}; +#if !UCONFIG_NO_COLLATION +// resource table key for collation binaries +static const char16_t gCollationBinKey[]=u"%%CollationBin"; +#endif /* * swap one resource item @@ -1074,17 +1071,17 @@ ures_swapResource(const UDataSwapper *ds, } /* all other types use an offset to point to their data */ - offset=(int32_t)RES_GET_OFFSET(res); + offset = static_cast<int32_t>(RES_GET_OFFSET(res)); if(offset==0) { /* special offset indicating an empty item */ return; } - if(pTempTable->resFlags[offset>>5]&((uint32_t)1<<(offset&0x1f))) { + if (pTempTable->resFlags[offset >> 5] & (static_cast<uint32_t>(1) << (offset & 0x1f))) { /* we already swapped this resource item */ return; } else { /* mark it as swapped now */ - pTempTable->resFlags[offset>>5]|=((uint32_t)1<<(offset&0x1f)); + pTempTable->resFlags[offset >> 5] |= static_cast<uint32_t>(1) << (offset & 0x1f); } p=inBundle+offset; @@ -1095,14 +1092,14 @@ ures_swapResource(const UDataSwapper *ds, /* physically same value layout as string, fall through */ U_FALLTHROUGH; case URES_STRING: - count=udata_readInt32(ds, (int32_t)*p); + count = udata_readInt32(ds, static_cast<int32_t>(*p)); /* swap length */ ds->swapArray32(ds, p, 4, q, pErrorCode); /* swap each char16_t (the terminating NUL would not change) */ ds->swapArray16(ds, p+1, 2*count, q+1, pErrorCode); break; case URES_BINARY: - count=udata_readInt32(ds, (int32_t)*p); + count = udata_readInt32(ds, static_cast<int32_t>(*p)); /* swap length */ ds->swapArray32(ds, p, 4, q, pErrorCode); /* no need to swap or copy bytes - ures_swap() copied them all */ @@ -1135,8 +1132,8 @@ ures_swapResource(const UDataSwapper *ds, if(RES_GET_TYPE(res)==URES_TABLE) { /* get table item count */ - pKey16=(const uint16_t *)p; - qKey16=(uint16_t *)q; + pKey16 = reinterpret_cast<const uint16_t*>(p); + qKey16 = reinterpret_cast<uint16_t*>(q); count=ds->readUInt16(*pKey16); pKey32=qKey32=nullptr; @@ -1147,8 +1144,8 @@ ures_swapResource(const UDataSwapper *ds, offset+=((1+count)+1)/2; } else { /* get table item count */ - pKey32=(const int32_t *)p; - qKey32=(int32_t *)q; + pKey32 = reinterpret_cast<const int32_t*>(p); + qKey32 = reinterpret_cast<int32_t*>(q); count=udata_readInt32(ds, *pKey32); pKey16=qKey16=nullptr; @@ -1172,12 +1169,12 @@ ures_swapResource(const UDataSwapper *ds, if(pKey16!=nullptr) { int32_t keyOffset=ds->readUInt16(pKey16[i]); if(keyOffset<pTempTable->localKeyLimit) { - itemKey=(const char *)outBundle+keyOffset; + itemKey = reinterpret_cast<const char*>(outBundle) + keyOffset; } } else { int32_t keyOffset=udata_readInt32(ds, pKey32[i]); if(keyOffset>=0) { - itemKey=(const char *)outBundle+keyOffset; + itemKey = reinterpret_cast<const char*>(outBundle) + keyOffset; } } item=ds->readUInt32(p[i]); @@ -1243,7 +1240,7 @@ ures_swapResource(const UDataSwapper *ds, if(pKey16!=qKey16) { rKey16=qKey16; } else { - rKey16=(uint16_t *)pTempTable->resort; + rKey16 = reinterpret_cast<uint16_t*>(pTempTable->resort); } for(i=0; i<count; ++i) { oldIndex=pTempTable->rows[i].sortIndex; @@ -1277,7 +1274,7 @@ ures_swapResource(const UDataSwapper *ds, if(p!=q) { r=q; } else { - r=(Resource *)pTempTable->resort; + r = reinterpret_cast<Resource*>(pTempTable->resort); } for(i=0; i<count; ++i) { oldIndex=pTempTable->rows[i].sortIndex; @@ -1294,7 +1291,7 @@ ures_swapResource(const UDataSwapper *ds, Resource item; int32_t i; - count=udata_readInt32(ds, (int32_t)*p); + count = udata_readInt32(ds, static_cast<int32_t>(*p)); /* swap length */ ds->swapArray32(ds, p++, 4, q++, pErrorCode); @@ -1314,7 +1311,7 @@ ures_swapResource(const UDataSwapper *ds, } break; case URES_INT_VECTOR: - count=udata_readInt32(ds, (int32_t)*p); + count = udata_readInt32(ds, static_cast<int32_t>(*p)); /* swap length and each integer */ ds->swapArray32(ds, p, 4*(1+count), q, pErrorCode); break; @@ -1457,6 +1454,9 @@ ures_swap(const UDataSwapper *ds, outBundle+keysBottom, pErrorCode); if(U_FAILURE(*pErrorCode)) { udata_printError(ds, "ures_swap().udata_swapInvStringBlock(keys[%d]) failed\n", 4*(keysTop-keysBottom)); + if(tempTable.resFlags!=stackResFlags) { + uprv_free(tempTable.resFlags); + } return 0; } @@ -1465,6 +1465,9 @@ ures_swap(const UDataSwapper *ds, ds->swapArray16(ds, inBundle+keysTop, (resBottom-keysTop)*4, outBundle+keysTop, pErrorCode); if(U_FAILURE(*pErrorCode)) { udata_printError(ds, "ures_swap().swapArray16(16-bit units[%d]) failed\n", 2*(resBottom-keysTop)); + if(tempTable.resFlags!=stackResFlags) { + uprv_free(tempTable.resFlags); + } return 0; } } diff --git a/deps/icu-small/source/common/uscript.cpp b/deps/icu-small/source/common/uscript.cpp index 2e9012a982cd06..c48a28fd14345a 100644 --- a/deps/icu-small/source/common/uscript.cpp +++ b/deps/icu-small/source/common/uscript.cpp @@ -74,7 +74,7 @@ getCodesFromLocale(const char *locale, } // Explicit script code. if (!script.isEmpty()) { - UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script.data()); + UScriptCode scriptCode = static_cast<UScriptCode>(u_getPropertyValueEnum(UCHAR_SCRIPT, script.data())); if(scriptCode != USCRIPT_INVALID_CODE) { if(scriptCode == USCRIPT_SIMPLIFIED_HAN || scriptCode == USCRIPT_TRADITIONAL_HAN) { scriptCode = USCRIPT_HAN; diff --git a/deps/icu-small/source/common/uscript_props.cpp b/deps/icu-small/source/common/uscript_props.cpp index b26164408a42a4..8d36bd33930eec 100644 --- a/deps/icu-small/source/common/uscript_props.cpp +++ b/deps/icu-small/source/common/uscript_props.cpp @@ -244,6 +244,14 @@ const int32_t SCRIPT_PROPS[] = { 0x10582 | EXCLUSION | CASED, // Vith 0x11F1B | EXCLUSION | LB_LETTERS, // Kawi 0x1E4E6 | EXCLUSION, // Nagm + 0, + 0x10D5D | EXCLUSION | RTL | CASED, // Gara + 0x1611C | EXCLUSION, // Gukh + 0x16D45 | EXCLUSION, // Krai + 0x1E5D0 | EXCLUSION, // Onao + 0x11BC4 | EXCLUSION, // Sunu + 0x105C2 | EXCLUSION, // Todr + 0x11392 | EXCLUSION, // Tutg // End copy-paste from parsescriptmetadata.py }; diff --git a/deps/icu-small/source/common/uset.cpp b/deps/icu-small/source/common/uset.cpp index b2d0b91d4b6a46..29b8655ac965a4 100644 --- a/deps/icu-small/source/common/uset.cpp +++ b/deps/icu-small/source/common/uset.cpp @@ -21,6 +21,7 @@ */ #include "unicode/utypes.h" +#include "unicode/char16ptr.h" #include "unicode/uobject.h" #include "unicode/uset.h" #include "unicode/uniset.h" @@ -306,12 +307,32 @@ uset_getRangeCount(const USet *set) { return ((const UnicodeSet *)set)->UnicodeSet::getRangeCount(); } +U_CAPI int32_t U_EXPORT2 +uset_getStringCount(const USet *uset) { + const UnicodeSet &set = *(const UnicodeSet *)uset; + return USetAccess::getStringCount(set); +} + U_CAPI int32_t U_EXPORT2 uset_getItemCount(const USet* uset) { const UnicodeSet& set = *(const UnicodeSet*)uset; return set.getRangeCount() + USetAccess::getStringCount(set); } +U_CAPI const UChar* U_EXPORT2 +uset_getString(const USet *uset, int32_t index, int32_t *pLength) { + if (pLength == nullptr) { return nullptr; } + const UnicodeSet &set = *(const UnicodeSet *)uset; + int32_t count = USetAccess::getStringCount(set); + if (index < 0 || count <= index) { + *pLength = 0; + return nullptr; + } + const UnicodeString *s = USetAccess::getString(set, index); + *pLength = s->length(); + return toUCharPtr(s->getBuffer()); +} + U_CAPI int32_t U_EXPORT2 uset_getItem(const USet* uset, int32_t itemIndex, UChar32* start, UChar32* end, @@ -475,7 +496,7 @@ uset_serializedContains(const USerializedSet* set, UChar32 c) { } else { hi += 1; } - return (UBool)(hi&1); + return hi&1; } else { /* find c in the supplementary part */ uint16_t high=(uint16_t)(c>>16), low=(uint16_t)c; @@ -500,7 +521,7 @@ uset_serializedContains(const USerializedSet* set, UChar32 c) { hi += 2; } /* count pairs of 16-bit units even per BMP and check if the number of pairs is odd */ - return (UBool)(((hi+(base<<1))&2)!=0); + return ((hi+(base<<1))&2)!=0; } } diff --git a/deps/icu-small/source/common/usetiter.cpp b/deps/icu-small/source/common/usetiter.cpp index d24a15ab2df0fd..a79d1a26f10008 100644 --- a/deps/icu-small/source/common/usetiter.cpp +++ b/deps/icu-small/source/common/usetiter.cpp @@ -60,8 +60,8 @@ UBool UnicodeSetIterator::next() { } if (nextString >= stringCount) return false; - codepoint = (UChar32)IS_STRING; // signal that value is actually a string - string = (const UnicodeString*) set->strings->elementAt(nextString++); + codepoint = static_cast<UChar32>(IS_STRING); // signal that value is actually a string + string = static_cast<const UnicodeString*>(set->strings_->elementAt(nextString++)); return true; } @@ -93,8 +93,8 @@ UBool UnicodeSetIterator::nextRange() { } if (nextString >= stringCount) return false; - codepoint = (UChar32)IS_STRING; // signal that value is actually a string - string = (const UnicodeString*) set->strings->elementAt(nextString++); + codepoint = static_cast<UChar32>(IS_STRING); // signal that value is actually a string + string = static_cast<const UnicodeString*>(set->strings_->elementAt(nextString++)); return true; } @@ -135,12 +135,12 @@ void UnicodeSetIterator::loadRange(int32_t iRange) { const UnicodeString& UnicodeSetIterator::getString() { - if (string==nullptr && codepoint!=(UChar32)IS_STRING) { + if (string == nullptr && codepoint != static_cast<UChar32>(IS_STRING)) { if (cpString == nullptr) { cpString = new UnicodeString(); } if (cpString != nullptr) { - cpString->setTo((UChar32)codepoint); + cpString->setTo(codepoint); } string = cpString; } diff --git a/deps/icu-small/source/common/ushape.cpp b/deps/icu-small/source/common/ushape.cpp index d0ac95e0b23496..00125635cb2672 100644 --- a/deps/icu-small/source/common/ushape.cpp +++ b/deps/icu-small/source/common/ushape.cpp @@ -360,8 +360,8 @@ _shapeToArabicDigitsWithContext(char16_t *s, int32_t length, lastStrongWasAL=true; break; case U_EUROPEAN_NUMBER: /* EN */ - if(lastStrongWasAL && (uint32_t)(c-0x30)<10) { - s[i]=(char16_t)(digitBase+c); /* digitBase+(c-0x30) - digitBase was modified above */ + if (lastStrongWasAL && static_cast<uint32_t>(c - 0x30) < 10) { + s[i] = static_cast<char16_t>(digitBase + c); /* digitBase+(c-0x30) - digitBase was modified above */ } break; default : @@ -380,8 +380,8 @@ _shapeToArabicDigitsWithContext(char16_t *s, int32_t length, lastStrongWasAL=true; break; case U_EUROPEAN_NUMBER: /* EN */ - if(lastStrongWasAL && (uint32_t)(c-0x30)<10) { - s[i]=(char16_t)(digitBase+c); /* digitBase+(c-0x30) - digitBase was modified above */ + if (lastStrongWasAL && static_cast<uint32_t>(c - 0x30) < 10) { + s[i] = static_cast<char16_t>(digitBase + c); /* digitBase+(c-0x30) - digitBase was modified above */ } break; default : @@ -483,7 +483,7 @@ countSpaces(char16_t *dest, int32_t size, uint32_t /*options*/, int32_t *spacesC */ static inline int32_t isTashkeelChar(char16_t ch) { - return (int32_t)( ch>=0x064B && ch<= 0x0652 ); + return static_cast<int32_t>(ch >= 0x064B && ch <= 0x0652); } /* @@ -492,7 +492,7 @@ isTashkeelChar(char16_t ch) { */ static inline int32_t isTashkeelCharFE(char16_t ch) { - return (int32_t)( ch>=0xFE70 && ch<= 0xFE7F ); + return static_cast<int32_t>(ch >= 0xFE70 && ch <= 0xFE7F); } /* @@ -501,7 +501,7 @@ isTashkeelCharFE(char16_t ch) { */ static inline int32_t isAlefChar(char16_t ch) { - return (int32_t)( (ch==0x0622)||(ch==0x0623)||(ch==0x0625)||(ch==0x0627) ); + return static_cast<int32_t>(ch == 0x0622 || ch == 0x0623 || ch == 0x0625 || ch == 0x0627); } /* @@ -510,7 +510,7 @@ isAlefChar(char16_t ch) { */ static inline int32_t isLamAlefChar(char16_t ch) { - return (int32_t)((ch>=0xFEF5)&&(ch<=0xFEFC) ); + return static_cast<int32_t>(ch >= 0xFEF5 && ch <= 0xFEFC); } /*BIDI @@ -564,7 +564,7 @@ isSeenFamilyChar(char16_t ch){ */ static inline int32_t isAlefMaksouraChar(char16_t ch) { - return (int32_t)( (ch == 0xFEEF) || ( ch == 0xFEF0) || (ch == 0x0649)); + return static_cast<int32_t>(ch == 0xFEEF || ch == 0xFEF0 || ch == 0x0649); } /* @@ -747,7 +747,7 @@ handleGeneratedSpaces(char16_t *dest, int32_t sourceLength, } } - tempbuffer = (char16_t *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR); + tempbuffer = static_cast<char16_t*>(uprv_malloc((sourceLength + 1) * U_SIZEOF_UCHAR)); /* Test for nullptr */ if(tempbuffer == nullptr) { *pErrorCode = U_MEMORY_ALLOCATION_ERROR; @@ -905,7 +905,7 @@ expandCompositCharAtBegin(char16_t *dest, int32_t sourceLength, int32_t destSize int32_t countl = 0; char16_t *tempbuffer=nullptr; - tempbuffer = (char16_t *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR); + tempbuffer = static_cast<char16_t*>(uprv_malloc((sourceLength + 1) * U_SIZEOF_UCHAR)); /* Test for nullptr */ if(tempbuffer == nullptr) { @@ -967,7 +967,7 @@ expandCompositCharAtEnd(char16_t *dest, int32_t sourceLength, int32_t destSize,U int32_t inpsize = sourceLength; char16_t *tempbuffer=nullptr; - tempbuffer = (char16_t *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR); + tempbuffer = static_cast<char16_t*>(uprv_malloc((sourceLength + 1) * U_SIZEOF_UCHAR)); /* Test for nullptr */ if(tempbuffer == nullptr) { @@ -1154,7 +1154,7 @@ expandCompositChar(char16_t *dest, int32_t sourceLength, if (shapingMode == 1){ if ( (options&U_SHAPE_LAMALEF_MASK) == U_SHAPE_LAMALEF_RESIZE){ destSize = calculateSize(dest,sourceLength,destSize,options); - tempbuffer = (char16_t *)uprv_malloc((destSize+1)*U_SIZEOF_UCHAR); + tempbuffer = static_cast<char16_t*>(uprv_malloc((destSize + 1) * U_SIZEOF_UCHAR)); /* Test for nullptr */ if(tempbuffer == nullptr) { @@ -1326,9 +1326,9 @@ shapeUnicode(char16_t *dest, int32_t sourceLength, dest[i] = 0xFE70 + IrrelevantPos[(dest[i] - 0x064B)] + static_cast<char16_t>(Shape); } }else if ((currLink & APRESENT) > 0) { - dest[i] = (char16_t)(0xFB50 + (currLink >> 8) + Shape); + dest[i] = static_cast<char16_t>(0xFB50 + (currLink >> 8) + Shape); }else if ((currLink >> 8) > 0 && (currLink & IRRELEVANT) == 0) { - dest[i] = (char16_t)(0xFE70 + (currLink >> 8) + Shape); + dest[i] = static_cast<char16_t>(0xFE70 + (currLink >> 8) + Shape); } } } @@ -1709,13 +1709,13 @@ u_shapeArabic(const char16_t *source, int32_t sourceLength, case U_SHAPE_DIGITS_ALEN2AN_INIT_LR: _shapeToArabicDigitsWithContext(dest, destLength, digitBase, - (UBool)((options&U_SHAPE_TEXT_DIRECTION_MASK)==U_SHAPE_TEXT_DIRECTION_LOGICAL), + (options & U_SHAPE_TEXT_DIRECTION_MASK) == U_SHAPE_TEXT_DIRECTION_LOGICAL, false); break; case U_SHAPE_DIGITS_ALEN2AN_INIT_AL: _shapeToArabicDigitsWithContext(dest, destLength, digitBase, - (UBool)((options&U_SHAPE_TEXT_DIRECTION_MASK)==U_SHAPE_TEXT_DIRECTION_LOGICAL), + (options & U_SHAPE_TEXT_DIRECTION_MASK) == U_SHAPE_TEXT_DIRECTION_LOGICAL, true); break; default: diff --git a/deps/icu-small/source/common/usprep.cpp b/deps/icu-small/source/common/usprep.cpp index 22ab0c24ebb838..477b8f2309db53 100644 --- a/deps/icu-small/source/common/usprep.cpp +++ b/deps/icu-small/source/common/usprep.cpp @@ -126,8 +126,7 @@ compareEntries(const UHashTok p1, const UHashTok p2) { name2.pointer = b2->name; path1.pointer = b1->path; path2.pointer = b2->path; - return ((UBool)(uhash_compareChars(name1, name2) & - uhash_compareChars(path1, path2))); + return uhash_compareChars(name1, name2) & uhash_compareChars(path1, path2); } static void @@ -246,8 +245,8 @@ loadData(UStringPrepProfile* profile, return false; } - p=(const int32_t *)udata_getMemory(dataMemory); - pb=(const uint8_t *)(p+_SPREP_INDEX_TOP); + p = static_cast<const int32_t*>(udata_getMemory(dataMemory)); + pb = reinterpret_cast<const uint8_t*>(p + _SPREP_INDEX_TOP); utrie_unserialize(&_sprepTrie, pb, p[_SPREP_INDEX_TRIE_SIZE], errorCode); _sprepTrie.getFoldingOffset=getSPrepFoldingOffset; @@ -265,11 +264,11 @@ loadData(UStringPrepProfile* profile, uprv_memcpy(&profile->indexes, p, sizeof(profile->indexes)); uprv_memcpy(&profile->sprepTrie, &_sprepTrie, sizeof(UTrie)); } else { - p=(const int32_t *)udata_getMemory(profile->sprepData); + p = static_cast<const int32_t*>(udata_getMemory(profile->sprepData)); } umtx_unlock(&usprepMutex); /* initialize some variables */ - profile->mappingData=(uint16_t *)((uint8_t *)(p+_SPREP_INDEX_TOP)+profile->indexes[_SPREP_INDEX_TRIE_SIZE]); + profile->mappingData = reinterpret_cast<const uint16_t*>(reinterpret_cast<const uint8_t*>(p + _SPREP_INDEX_TOP) + profile->indexes[_SPREP_INDEX_TRIE_SIZE]); u_getUnicodeVersion(normUnicodeVersion); normUniVer = (normUnicodeVersion[0] << 24) + (normUnicodeVersion[1] << 16) + @@ -320,12 +319,12 @@ usprep_getProfile(const char* path, * we use the passed in pointers for fetching the data from the * hash table which is safe */ - stackKey.name = (char*) name; - stackKey.path = (char*) path; + stackKey.name = const_cast<char*>(name); + stackKey.path = const_cast<char*>(path); /* fetch the data from the cache */ umtx_lock(&usprepMutex); - profile = (UStringPrepProfile*) (uhash_get(SHARED_DATA_HASHTABLE,&stackKey)); + profile = static_cast<UStringPrepProfile*>(uhash_get(SHARED_DATA_HASHTABLE, &stackKey)); if(profile != nullptr) { profile->refCount++; } @@ -345,8 +344,8 @@ usprep_getProfile(const char* path, } /* get the options */ - newProfile->doNFKC = (UBool)((newProfile->indexes[_SPREP_OPTIONS] & _SPREP_NORMALIZATION_ON) > 0); - newProfile->checkBiDi = (UBool)((newProfile->indexes[_SPREP_OPTIONS] & _SPREP_CHECK_BIDI_ON) > 0); + newProfile->doNFKC = static_cast<UBool>((newProfile->indexes[_SPREP_OPTIONS] & _SPREP_NORMALIZATION_ON) > 0); + newProfile->checkBiDi = static_cast<UBool>((newProfile->indexes[_SPREP_OPTIONS] & _SPREP_CHECK_BIDI_ON) > 0); LocalMemory<UStringPrepKey> key; LocalMemory<char> keyName; @@ -363,7 +362,7 @@ usprep_getProfile(const char* path, umtx_lock(&usprepMutex); // If another thread already inserted the same key/value, refcount and cleanup our thread data - profile = (UStringPrepProfile*) (uhash_get(SHARED_DATA_HASHTABLE,&stackKey)); + profile = static_cast<UStringPrepProfile*>(uhash_get(SHARED_DATA_HASHTABLE, &stackKey)); if(profile != nullptr) { profile->refCount++; usprep_unload(newProfile.getAlias()); @@ -477,7 +476,7 @@ getValues(uint16_t trieWord, int16_t& value, UBool& isIndex){ isIndex =false; value = 0; }else if(trieWord >= _SPREP_TYPE_THRESHOLD){ - type = (UStringPrepType) (trieWord - _SPREP_TYPE_THRESHOLD); + type = static_cast<UStringPrepType>(trieWord - _SPREP_TYPE_THRESHOLD); isIndex =false; value = 0; }else{ @@ -489,7 +488,7 @@ getValues(uint16_t trieWord, int16_t& value, UBool& isIndex){ value = trieWord >> 2; //mask off the lower 2 bits and shift }else{ isIndex = false; - value = (int16_t)trieWord; + value = static_cast<int16_t>(trieWord); value = (value >> 2); } @@ -514,7 +513,7 @@ usprep_map( const UStringPrepProfile* profile, uint16_t result; int32_t destIndex=0; int32_t srcIndex; - UBool allowUnassigned = (UBool) ((options & USPREP_ALLOW_UNASSIGNED)>0); + UBool allowUnassigned = static_cast<UBool>((options & USPREP_ALLOW_UNASSIGNED) > 0); UStringPrepType type; int16_t value; UBool isIndex; @@ -581,7 +580,7 @@ usprep_map( const UStringPrepProfile* profile, //copy the code point into destination if(ch <= 0xFFFF){ if(destIndex < destCapacity ){ - dest[destIndex] = (char16_t)ch; + dest[destIndex] = static_cast<char16_t>(ch); } destIndex++; }else{ diff --git a/deps/icu-small/source/common/ustr_titlecase_brkiter.cpp b/deps/icu-small/source/common/ustr_titlecase_brkiter.cpp index 82beaca65b2c82..e96af0df878db4 100644 --- a/deps/icu-small/source/common/ustr_titlecase_brkiter.cpp +++ b/deps/icu-small/source/common/ustr_titlecase_brkiter.cpp @@ -93,7 +93,7 @@ void WholeStringBreakIterator::setText(UText *text, UErrorCode &errorCode) { if (U_SUCCESS(errorCode)) { int64_t length64 = utext_nativeLength(text); if (length64 <= INT32_MAX) { - length = (int32_t)length64; + length = static_cast<int32_t>(length64); } else { errorCode = U_INDEX_OUTOFBOUNDS_ERROR; } diff --git a/deps/icu-small/source/common/ustr_wcs.cpp b/deps/icu-small/source/common/ustr_wcs.cpp index efbbbc2f18784e..8ce0855226d6b7 100644 --- a/deps/icu-small/source/common/ustr_wcs.cpp +++ b/deps/icu-small/source/common/ustr_wcs.cpp @@ -57,7 +57,7 @@ u_growAnyBufferFromStatic(void *context, } *pBuffer=newBuffer; - return (UBool)(newBuffer!=nullptr); + return newBuffer!=nullptr; } /* helper function */ diff --git a/deps/icu-small/source/common/ustrcase.cpp b/deps/icu-small/source/common/ustrcase.cpp index 4c726d47db1258..58b5c5ef6235e5 100644 --- a/deps/icu-small/source/common/ustrcase.cpp +++ b/deps/icu-small/source/common/ustrcase.cpp @@ -77,7 +77,7 @@ appendResult(char16_t *dest, int32_t destIndex, int32_t destCapacity, } c=~result; if(destIndex<destCapacity && c<=0xffff) { // BMP slightly-fastpath - dest[destIndex++]=(char16_t)c; + dest[destIndex++] = static_cast<char16_t>(c); return destIndex; } length=cpLength; @@ -86,7 +86,7 @@ appendResult(char16_t *dest, int32_t destIndex, int32_t destCapacity, c=U_SENTINEL; length=result; } else if(destIndex<destCapacity && result<=0xffff) { // BMP slightly-fastpath - dest[destIndex++]=(char16_t)result; + dest[destIndex++] = static_cast<char16_t>(result); if(edits!=nullptr) { edits->addReplace(cpLength, 1); } @@ -171,7 +171,7 @@ appendUnchanged(char16_t *dest, int32_t destIndex, int32_t destCapacity, UChar32 U_CALLCONV utf16_caseContextIterator(void *context, int8_t dir) { - UCaseContext *csc=(UCaseContext *)context; + UCaseContext* csc = static_cast<UCaseContext*>(context); UChar32 c; if(dir<0) { @@ -272,7 +272,7 @@ int32_t toLower(int32_t caseLocale, uint32_t options, } else { c = lead; } - const char16_t *s; + const char16_t *s = nullptr; if (caseLocale >= 0) { csc->cpStart = cpStart; csc->cpLimit = srcIndex; @@ -369,7 +369,7 @@ int32_t toUpper(int32_t caseLocale, uint32_t options, c = lead; } csc->cpLimit = srcIndex; - const char16_t *s; + const char16_t *s = nullptr; c = ucase_toFullUpper(c, utf16_caseContextIterator, csc, &s, caseLocale); if (c >= 0) { destIndex = appendUnchanged(dest, destIndex, destCapacity, @@ -579,8 +579,8 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it } if (c == u'I' || c == u'Í') { - titleLimit = maybeTitleDutchIJ(src, c, titleStart + 1, index, - dest, destIndex, destCapacity, options, + titleLimit = maybeTitleDutchIJ(src, c, titleStart + 1, index, + dest, destIndex, destCapacity, options, edits); } } @@ -1216,7 +1216,7 @@ int32_t toUpper(uint32_t options, } if (change) { - destIndex=appendUChar(dest, destIndex, destCapacity, (char16_t)upper); + destIndex = appendUChar(dest, destIndex, destCapacity, static_cast<char16_t>(upper)); if (destIndex >= 0 && (data & HAS_EITHER_DIALYTIKA) != 0) { destIndex=appendUChar(dest, destIndex, destCapacity, 0x308); // restore or add a dialytika } @@ -1698,7 +1698,7 @@ static int32_t _cmpFold( */ if( level1==0 && - (length=ucase_toFullFolding((UChar32)cp1, &p, options))>=0 + (length = ucase_toFullFolding(cp1, &p, options)) >= 0 ) { /* cp1 case-folds to the code point "length" or to p[length] */ if(U_IS_SURROGATE(c1)) { @@ -1744,7 +1744,7 @@ static int32_t _cmpFold( } if( level2==0 && - (length=ucase_toFullFolding((UChar32)cp2, &p, options))>=0 + (length = ucase_toFullFolding(cp2, &p, options)) >= 0 ) { /* cp2 case-folds to the code point "length" or to p[length] */ if(U_IS_SURROGATE(c2)) { diff --git a/deps/icu-small/source/common/ustrenum.cpp b/deps/icu-small/source/common/ustrenum.cpp index f4fc5906ed7187..c42014d617d7b6 100644 --- a/deps/icu-small/source/common/ustrenum.cpp +++ b/deps/icu-small/source/common/ustrenum.cpp @@ -89,7 +89,7 @@ StringEnumeration::ensureCharsCapacity(int32_t capacity, UErrorCode &status) { if(chars!=charsBuffer) { uprv_free(chars); } - chars=(char *)uprv_malloc(capacity); + chars = static_cast<char*>(uprv_malloc(capacity)); if(chars==nullptr) { chars=charsBuffer; charsCapacity=sizeof(charsBuffer); @@ -104,7 +104,7 @@ UnicodeString * StringEnumeration::setChars(const char *s, int32_t length, UErrorCode &status) { if(U_SUCCESS(status) && s!=nullptr) { if(length<0) { - length=(int32_t)uprv_strlen(s); + length = static_cast<int32_t>(uprv_strlen(s)); } char16_t *buffer=unistr.getBuffer(length+1); @@ -307,7 +307,7 @@ ucharstrenum_unext(UEnumeration* en, } const char16_t* result = ((const char16_t**)e->uenum.context)[e->index++]; if (resultLength) { - *resultLength = (int32_t)u_strlen(result); + *resultLength = u_strlen(result); } return result; } diff --git a/deps/icu-small/source/common/ustring.cpp b/deps/icu-small/source/common/ustring.cpp index 4f7443cc886b7e..8375121e2f455d 100644 --- a/deps/icu-small/source/common/ustring.cpp +++ b/deps/icu-small/source/common/ustring.cpp @@ -1356,7 +1356,7 @@ _charPtr_charAt(int32_t offset, void *context) { char16_t c16; /* It would be more efficient to access the invariant tables * directly but there is no API for that. */ - u_charsToUChars(((char*) context) + offset, &c16, 1); + u_charsToUChars(static_cast<char*>(context) + offset, &c16, 1); return c16; } @@ -1394,7 +1394,7 @@ u_unescape(const char *src, char16_t *dest, int32_t destCapacity) { i += (int32_t)(src - segment); } ++src; /* advance past '\\' */ - c32 = (UChar32)u_unescapeAt(_charPtr_charAt, &lenParsed, (int32_t)uprv_strlen(src), (void*)src); + c32 = u_unescapeAt(_charPtr_charAt, &lenParsed, (int32_t)uprv_strlen(src), const_cast<char*>(src)); if (lenParsed == 0) { goto err; } diff --git a/deps/icu-small/source/common/ustrtrns.cpp b/deps/icu-small/source/common/ustrtrns.cpp index 244c111fc416ce..d16eabe99fd065 100644 --- a/deps/icu-small/source/common/ustrtrns.cpp +++ b/deps/icu-small/source/common/ustrtrns.cpp @@ -771,19 +771,19 @@ static inline uint8_t * _appendUTF8(uint8_t *pDest, UChar32 c) { /* it is 0<=c<=0x10ffff and not a surrogate if called by a validating function */ if((c)<=0x7f) { - *pDest++=(uint8_t)c; + *pDest++ = static_cast<uint8_t>(c); } else if(c<=0x7ff) { - *pDest++=(uint8_t)((c>>6)|0xc0); - *pDest++=(uint8_t)((c&0x3f)|0x80); + *pDest++ = static_cast<uint8_t>((c >> 6) | 0xc0); + *pDest++ = static_cast<uint8_t>((c & 0x3f) | 0x80); } else if(c<=0xffff) { - *pDest++=(uint8_t)((c>>12)|0xe0); - *pDest++=(uint8_t)(((c>>6)&0x3f)|0x80); - *pDest++=(uint8_t)(((c)&0x3f)|0x80); + *pDest++ = static_cast<uint8_t>((c >> 12) | 0xe0); + *pDest++ = static_cast<uint8_t>(((c >> 6) & 0x3f) | 0x80); + *pDest++ = static_cast<uint8_t>(((c) & 0x3f) | 0x80); } else /* if((uint32_t)(c)<=0x10ffff) */ { - *pDest++=(uint8_t)(((c)>>18)|0xf0); - *pDest++=(uint8_t)((((c)>>12)&0x3f)|0x80); - *pDest++=(uint8_t)((((c)>>6)&0x3f)|0x80); - *pDest++=(uint8_t)(((c)&0x3f)|0x80); + *pDest++ = static_cast<uint8_t>(((c) >> 18) | 0xf0); + *pDest++ = static_cast<uint8_t>((((c) >> 12) & 0x3f) | 0x80); + *pDest++ = static_cast<uint8_t>((((c) >> 6) & 0x3f) | 0x80); + *pDest++ = static_cast<uint8_t>(((c) & 0x3f) | 0x80); } return pDest; } diff --git a/deps/icu-small/source/common/utext.cpp b/deps/icu-small/source/common/utext.cpp index eb0a6984bd3fa8..0a4248c4e4595c 100644 --- a/deps/icu-small/source/common/utext.cpp +++ b/deps/icu-small/source/common/utext.cpp @@ -738,7 +738,7 @@ pinIndex(int64_t &index, int64_t limit) { } else if (index > limit) { index = limit; } - return (int32_t)index; + return static_cast<int32_t>(index); } @@ -1937,7 +1937,7 @@ repTextReplace(UText *ut, } // Do the actual replace operation using methods of the Replaceable class - UnicodeString replStr((UBool)(length<0), src, length); // read-only alias + UnicodeString replStr(length < 0, src, length); // read-only alias rep->handleReplaceBetween(start32, limit32, replStr); int32_t newLength = rep->length(); int32_t lengthDelta = newLength - oldLength; diff --git a/deps/icu-small/source/common/util.cpp b/deps/icu-small/source/common/util.cpp index f6a13aa445d228..d80ccb50ed0e2f 100644 --- a/deps/icu-small/source/common/util.cpp +++ b/deps/icu-small/source/common/util.cpp @@ -37,12 +37,12 @@ UnicodeString& ICU_Utility::appendNumber(UnicodeString& result, int32_t n, int32_t radix, int32_t minDigits) { if (radix < 2 || radix > 36) { // Bogus radix - return result.append((char16_t)63/*?*/); + return result.append(static_cast<char16_t>(63)/*?*/); } // Handle negatives if (n < 0) { n = -n; - result.append((char16_t)45/*-*/); + result.append(static_cast<char16_t>(45)/*-*/); } // First determine the number of digits int32_t nn = n; @@ -150,7 +150,7 @@ int32_t ICU_Utility::skipWhitespace(const UnicodeString& str, int32_t& pos, UBool advance) { int32_t p = pos; const char16_t* s = str.getBuffer(); - p = (int32_t)(PatternProps::skipWhiteSpace(s + p, str.length() - p) - s); + p = static_cast<int32_t>(PatternProps::skipWhiteSpace(s + p, str.length() - p) - s); if (advance) { pos = p; } @@ -361,7 +361,7 @@ void ICU_Utility::appendToRule(UnicodeString& rule, rule.append(BACKSLASH).append(APOSTROPHE); } } - if (c != (UChar32)-1) { + if (c != static_cast<UChar32>(-1)) { /* Since spaces are ignored during parsing, they are * emitted only for readability. We emit one here * only if there isn't already one at the end of the diff --git a/deps/icu-small/source/common/util_props.cpp b/deps/icu-small/source/common/util_props.cpp index 366a555eeebdb3..b1862c24e68092 100644 --- a/deps/icu-small/source/common/util_props.cpp +++ b/deps/icu-small/source/common/util_props.cpp @@ -120,7 +120,7 @@ int32_t ICU_Utility::parsePattern(const UnicodeString& rule, int32_t pos, int32_ if (pos >= limit) { return -1; } - c = (char16_t) u_tolower(rule.charAt(pos++)); + c = static_cast<char16_t>(u_tolower(rule.charAt(pos++))); if (c != cpat) { return -1; } diff --git a/deps/icu-small/source/common/utrace.cpp b/deps/icu-small/source/common/utrace.cpp index 1f536d5643dfc5..875bef31a29572 100644 --- a/deps/icu-small/source/common/utrace.cpp +++ b/deps/icu-small/source/common/utrace.cpp @@ -138,7 +138,7 @@ static void outputHexBytes(int64_t val, int32_t charsToOutput, static void outputPtrBytes(void *val, char *outBuf, int32_t *outIx, int32_t capacity) { uint32_t i; int32_t incVal = 1; /* +1 for big endian, -1 for little endian */ - char *p = (char *)&val; /* point to current byte to output in the ptr val */ + char* p = reinterpret_cast<char*>(&val); /* point to current byte to output in the ptr val */ #if !U_IS_BIG_ENDIAN /* Little Endian. Move p to most significant end of the value */ @@ -233,7 +233,7 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt, case 'S': /* char16_t * string, with length, len==-1 for NUL terminated. */ ptrArg = va_arg(args, char *); /* Ptr */ - intArg =(int32_t)va_arg(args, int32_t); /* Length */ + intArg = va_arg(args, int32_t); /* Length */ outputUString((const char16_t *)ptrArg, intArg, outBuf, &outIx, capacity, indent); break; @@ -298,7 +298,7 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt, i32Ptr = (int32_t *)i8Ptr; i64Ptr = (int64_t *)i8Ptr; ptrPtr = (void **)i8Ptr; - vectorLen =(int32_t)va_arg(args, int32_t); + vectorLen = va_arg(args, int32_t); if (ptrPtr == nullptr) { outputString("*NULL* ", outBuf, &outIx, capacity, indent); } else { diff --git a/deps/icu-small/source/common/utrie.cpp b/deps/icu-small/source/common/utrie.cpp index 83be0e340714ec..6a2cf1a9d995f8 100644 --- a/deps/icu-small/source/common/utrie.cpp +++ b/deps/icu-small/source/common/utrie.cpp @@ -40,7 +40,7 @@ equal_uint32(const uint32_t *s, const uint32_t *t, int32_t length) { ++t; --length; } - return (UBool)(length==0); + return length == 0; } /* Building a trie ----------------------------------------------------------*/ @@ -68,7 +68,7 @@ utrie_open(UNewTrie *fillIn, } } uprv_memset(trie, 0, sizeof(UNewTrie)); - trie->isAllocated= (UBool)(fillIn==nullptr); + trie->isAllocated = fillIn == nullptr; if(aliasData!=nullptr) { trie->data=aliasData; @@ -250,7 +250,7 @@ utrie_get32(UNewTrie *trie, UChar32 c, UBool *pInBlockZero) { block=trie->index[c>>UTRIE_SHIFT]; if(pInBlockZero!=nullptr) { - *pInBlockZero= (UBool)(block==0); + *pInBlockZero = block == 0; } return trie->data[ABS(block)+(c&UTRIE_MASK)]; @@ -730,7 +730,7 @@ defaultGetFoldedValue(UNewTrie *trie, UChar32 start, int32_t offset) { if(inBlockZero) { start+=UTRIE_DATA_BLOCK_LENGTH; } else if(value!=initialValue) { - return (uint32_t)offset; + return static_cast<uint32_t>(offset); } else { ++start; } @@ -884,7 +884,7 @@ utrie_unserialize(UTrie *trie, const void *data, int32_t length, UErrorCode *pEr *pErrorCode=U_INVALID_FORMAT_ERROR; return -1; } - trie->isLatin1Linear= (UBool)((options&UTRIE_OPTIONS_LATIN1_IS_LINEAR)!=0); + trie->isLatin1Linear = (options & UTRIE_OPTIONS_LATIN1_IS_LINEAR) != 0; /* get the length values */ trie->indexLength=header->indexLength; diff --git a/deps/icu-small/source/common/utrie2.cpp b/deps/icu-small/source/common/utrie2.cpp index 2c3488a4cd02fb..35be698fbb5d87 100644 --- a/deps/icu-small/source/common/utrie2.cpp +++ b/deps/icu-small/source/common/utrie2.cpp @@ -389,7 +389,7 @@ utrie2_close(UTrie2 *trie) { U_CAPI UBool U_EXPORT2 utrie2_isFrozen(const UTrie2 *trie) { - return (UBool)(trie->newTrie==nullptr); + return trie->newTrie==nullptr; } U_CAPI int32_t U_EXPORT2 @@ -552,7 +552,7 @@ enumEitherTrie(const UTrie2 *trie, } for(; i2<i2Limit; ++i2) { if(idx!=nullptr) { - block=(int32_t)idx[i2Block+i2]<<UTRIE2_INDEX_SHIFT; + block = static_cast<int32_t>(idx[i2Block + i2]) << UTRIE2_INDEX_SHIFT; } else { block=trie->newTrie->index2[i2Block+i2]; } diff --git a/deps/icu-small/source/common/utrie2_builder.cpp b/deps/icu-small/source/common/utrie2_builder.cpp index 02a62e3fd4d3df..4bd49c7adfa449 100644 --- a/deps/icu-small/source/common/utrie2_builder.cpp +++ b/deps/icu-small/source/common/utrie2_builder.cpp @@ -249,12 +249,12 @@ static UNewTrie2 * cloneBuilder(const UNewTrie2 *other) { UNewTrie2 *trie; - trie=(UNewTrie2 *)uprv_malloc(sizeof(UNewTrie2)); + trie = static_cast<UNewTrie2*>(uprv_malloc(sizeof(UNewTrie2))); if(trie==nullptr) { return nullptr; } - trie->data=(uint32_t *)uprv_malloc(other->dataCapacity*4); + trie->data = static_cast<uint32_t*>(uprv_malloc(other->dataCapacity * 4)); if(trie->data==nullptr) { uprv_free(trie); return nullptr; @@ -506,7 +506,7 @@ isInNullBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) { ((c>>UTRIE2_SHIFT_2)&UTRIE2_INDEX_2_MASK); } block=trie->index2[i2]; - return (UBool)(block==trie->dataNullOffset); + return block == trie->dataNullOffset; } static int32_t @@ -577,7 +577,7 @@ allocDataBlock(UNewTrie2 *trie, int32_t copyBlock) { */ return -1; } - data=(uint32_t *)uprv_malloc(capacity*4); + data = static_cast<uint32_t*>(uprv_malloc(capacity * 4)); if(data==nullptr) { return -1; } @@ -603,7 +603,7 @@ releaseDataBlock(UNewTrie2 *trie, int32_t block) { static inline UBool isWritableBlock(UNewTrie2 *trie, int32_t block) { - return (UBool)(block!=trie->dataNullOffset && 1==trie->map[block>>UTRIE2_SHIFT_2]); + return block != trie->dataNullOffset && 1 == trie->map[block >> UTRIE2_SHIFT_2]; } static inline void @@ -891,7 +891,7 @@ equal_int32(const int32_t *s, const int32_t *t, int32_t length) { ++t; --length; } - return (UBool)(length==0); + return length == 0; } static inline UBool @@ -901,7 +901,7 @@ equal_uint32(const uint32_t *s, const uint32_t *t, int32_t length) { ++t; --length; } - return (UBool)(length==0); + return length == 0; } static int32_t @@ -1211,7 +1211,7 @@ compactIndex2(UNewTrie2 *trie) { */ while((newStart&((UTRIE2_DATA_GRANULARITY-1)|1))!=0) { /* Arbitrary value: 0x3fffc not possible for real data. */ - trie->index2[newStart++]=(int32_t)0xffff<<UTRIE2_INDEX_SHIFT; + trie->index2[newStart++] = static_cast<int32_t>(0xffff) << UTRIE2_INDEX_SHIFT; } #ifdef UTRIE2_DEBUG diff --git a/deps/icu-small/source/common/utrie_swap.cpp b/deps/icu-small/source/common/utrie_swap.cpp index 83d183699d1011..bb060203fde059 100644 --- a/deps/icu-small/source/common/utrie_swap.cpp +++ b/deps/icu-small/source/common/utrie_swap.cpp @@ -64,7 +64,7 @@ utrie_swap(const UDataSwapper *ds, return 0; } - dataIs32=(UBool)((trie.options&UTRIE_OPTIONS_DATA_IS_32_BIT)!=0); + dataIs32 = (trie.options & UTRIE_OPTIONS_DATA_IS_32_BIT) != 0; size=sizeof(UTrieHeader)+trie.indexLength*2+trie.dataLength*(dataIs32?4:2); if(length>=0) { @@ -305,7 +305,7 @@ getVersion(const void *data, int32_t length, UBool anyEndianOk) { if(length<16 || data==nullptr || (U_POINTER_MASK_LSB(data, 3)!=0)) { return 0; } - signature=*(const uint32_t *)data; + signature = *static_cast<const uint32_t*>(data); if(signature==UCPTRIE_SIG) { return 3; } diff --git a/deps/icu-small/source/common/uts46.cpp b/deps/icu-small/source/common/uts46.cpp index f0e1372422daee..018c0e19b7782e 100644 --- a/deps/icu-small/source/common/uts46.cpp +++ b/deps/icu-small/source/common/uts46.cpp @@ -451,10 +451,10 @@ UTS46::processUTF8(StringPiece src, return; } char c=srcArray[i]; - if((int8_t)c<0) { // (uint8_t)c>0x7f + if (static_cast<int8_t>(c) < 0) { // (uint8_t)c>0x7f break; } - int cData=asciiData[(int)c]; // Cast: gcc warns about indexing with a char. + int cData = asciiData[static_cast<int>(c)]; // Cast: gcc warns about indexing with a char. if(cData>0) { destArray[i]=c+0x20; // Lowercase an uppercase ASCII letter. } else if(cData<0 && disallowNonLDHDot) { @@ -756,7 +756,12 @@ UTS46::processLabel(UnicodeString &dest, if(U_FAILURE(errorCode)) { return labelLength; } - if(!isValid) { + // Unicode 15.1 UTS #46: + // Added an additional condition in 4.1 Validity Criteria to + // disallow labels such as xn--xn---epa., which do not round-trip. + // --> Validity Criteria new criterion 4: + // If not CheckHyphens, the label must not begin with “xn--”. + if(!isValid || fromPunycode.startsWith(UnicodeString::readOnlyAlias(u"xn--"))) { info.labelErrors|=UIDNA_ERROR_INVALID_ACE_LABEL; return markBadACELabel(dest, labelStart, labelLength, toASCII, info, errorCode); } @@ -796,7 +801,7 @@ UTS46::processLabel(UnicodeString &dest, // in a non-Punycode label or U+FFFD itself in a Punycode label. // We also check for dots which can come from the input to a single-label function. // Ok to cast away const because we own the UnicodeString. - char16_t *s=(char16_t *)label; + char16_t* s = const_cast<char16_t*>(label); const char16_t *limit=label+labelLength; char16_t oredChars=0; // If we enforce STD3 rules, then ASCII characters other than LDH and dot are disallowed. @@ -827,7 +832,7 @@ UTS46::processLabel(UnicodeString &dest, U16_NEXT_UNSAFE(label, cpLength, c); if((U_GET_GC_MASK(c)&U_GC_M_MASK)!=0) { info.labelErrors|=UIDNA_ERROR_LEADING_COMBINING_MARK; - labelString->replace(labelStart, cpLength, (char16_t)0xfffd); + labelString->replace(labelStart, cpLength, static_cast<char16_t>(0xfffd)); label=labelString->getBuffer()+labelStart; labelLength+=1-cpLength; if(labelString==&dest) { @@ -947,7 +952,7 @@ UTS46::markBadACELabel(UnicodeString &dest, } } if(onlyLDH) { - dest.insert(labelStart+labelLength, (char16_t)0xfffd); + dest.insert(labelStart + labelLength, static_cast<char16_t>(0xfffd)); if(dest.isBogus()) { errorCode=U_MEMORY_ALLOCATION_ERROR; return 0; @@ -1361,7 +1366,7 @@ uidna_labelToASCII(const UIDNA *idna, if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) { return 0; } - UnicodeString src((UBool)(length<0), label, length); + UnicodeString src(length < 0, label, length); UnicodeString destString(dest, 0, capacity); IDNAInfo info; reinterpret_cast<const IDNA *>(idna)->labelToASCII(src, destString, info, *pErrorCode); @@ -1377,7 +1382,7 @@ uidna_labelToUnicode(const UIDNA *idna, if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) { return 0; } - UnicodeString src((UBool)(length<0), label, length); + UnicodeString src(length < 0, label, length); UnicodeString destString(dest, 0, capacity); IDNAInfo info; reinterpret_cast<const IDNA *>(idna)->labelToUnicode(src, destString, info, *pErrorCode); @@ -1393,7 +1398,7 @@ uidna_nameToASCII(const UIDNA *idna, if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) { return 0; } - UnicodeString src((UBool)(length<0), name, length); + UnicodeString src(length < 0, name, length); UnicodeString destString(dest, 0, capacity); IDNAInfo info; reinterpret_cast<const IDNA *>(idna)->nameToASCII(src, destString, info, *pErrorCode); @@ -1409,7 +1414,7 @@ uidna_nameToUnicode(const UIDNA *idna, if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) { return 0; } - UnicodeString src((UBool)(length<0), name, length); + UnicodeString src(length < 0, name, length); UnicodeString destString(dest, 0, capacity); IDNAInfo info; reinterpret_cast<const IDNA *>(idna)->nameToUnicode(src, destString, info, *pErrorCode); diff --git a/deps/icu-small/source/common/utypes.cpp b/deps/icu-small/source/common/utypes.cpp index 715994d67f04dd..4602314147f19e 100644 --- a/deps/icu-small/source/common/utypes.cpp +++ b/deps/icu-small/source/common/utypes.cpp @@ -140,8 +140,7 @@ _uFmtErrorName[U_FMT_PARSE_ERROR_LIMIT - U_FMT_PARSE_ERROR_START] = { "U_MF_MISSING_SELECTOR_ANNOTATION_ERROR", "U_MF_DUPLICATE_DECLARATION_ERROR", "U_MF_OPERAND_MISMATCH_ERROR", - "U_MF_UNSUPPORTED_STATEMENT_ERROR", - "U_MF_UNSUPPORTED_EXPRESSION_ERROR" + "U_MF_DUPLICATE_VARIANT_ERROR" }; static const char * const diff --git a/deps/icu-small/source/common/uvector.cpp b/deps/icu-small/source/common/uvector.cpp index 85c322cea75ab9..5eb89c9a56bbb0 100644 --- a/deps/icu-small/source/common/uvector.cpp +++ b/deps/icu-small/source/common/uvector.cpp @@ -49,10 +49,10 @@ UVector::UVector(UObjectDeleter *d, UElementsAreEqual *c, int32_t initialCapacit return; } // Fix bogus initialCapacity values; avoid malloc(0) and integer overflow - if ((initialCapacity < 1) || (initialCapacity > (int32_t)(INT32_MAX / sizeof(UElement)))) { + if ((initialCapacity < 1) || (initialCapacity > static_cast<int32_t>(INT32_MAX / sizeof(UElement)))) { initialCapacity = DEFAULT_CAPACITY; } - elements = (UElement *)uprv_malloc(sizeof(UElement)*initialCapacity); + elements = static_cast<UElement*>(uprv_malloc(sizeof(UElement) * initialCapacity)); if (elements == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { @@ -340,12 +340,12 @@ UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) { if (newCap < minimumCapacity) { newCap = minimumCapacity; } - if (newCap > (int32_t)(INT32_MAX / sizeof(UElement))) { // integer overflow check + if (newCap > static_cast<int32_t>(INT32_MAX / sizeof(UElement))) { // integer overflow check // We keep the original memory contents on bad minimumCapacity. status = U_ILLEGAL_ARGUMENT_ERROR; return false; } - UElement* newElems = (UElement *)uprv_realloc(elements, sizeof(UElement)*newCap); + UElement* newElems = static_cast<UElement*>(uprv_realloc(elements, sizeof(UElement) * newCap)); if (newElems == nullptr) { // We keep the original contents on the memory failure on realloc or bad minimumCapacity. status = U_MEMORY_ALLOCATION_ERROR; diff --git a/deps/icu-small/source/common/uvectr32.cpp b/deps/icu-small/source/common/uvectr32.cpp index a2dc1bdbc9832f..7389b3f06d02cc 100644 --- a/deps/icu-small/source/common/uvectr32.cpp +++ b/deps/icu-small/source/common/uvectr32.cpp @@ -54,10 +54,10 @@ void UVector32::_init(int32_t initialCapacity, UErrorCode &status) { if (maxCapacity>0 && maxCapacity<initialCapacity) { initialCapacity = maxCapacity; } - if (initialCapacity > (int32_t)(INT32_MAX / sizeof(int32_t))) { + if (initialCapacity > static_cast<int32_t>(INT32_MAX / sizeof(int32_t))) { initialCapacity = uprv_min(DEFAULT_CAPACITY, maxCapacity); } - elements = (int32_t *)uprv_malloc(sizeof(int32_t)*initialCapacity); + elements = static_cast<int32_t*>(uprv_malloc(sizeof(int32_t) * initialCapacity)); if (elements == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { @@ -223,12 +223,12 @@ UBool UVector32::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { if (maxCapacity > 0 && newCap > maxCapacity) { newCap = maxCapacity; } - if (newCap > (int32_t)(INT32_MAX / sizeof(int32_t))) { // integer overflow check + if (newCap > static_cast<int32_t>(INT32_MAX / sizeof(int32_t))) { // integer overflow check // We keep the original memory contents on bad minimumCapacity/maxCapacity. status = U_ILLEGAL_ARGUMENT_ERROR; return false; } - int32_t* newElems = (int32_t *)uprv_realloc(elements, sizeof(int32_t)*newCap); + int32_t* newElems = static_cast<int32_t*>(uprv_realloc(elements, sizeof(int32_t) * newCap)); if (newElems == nullptr) { // We keep the original contents on the memory failure on realloc. status = U_MEMORY_ALLOCATION_ERROR; @@ -244,7 +244,7 @@ void UVector32::setMaxCapacity(int32_t limit) { if (limit < 0) { limit = 0; } - if (limit > (int32_t)(INT32_MAX / sizeof(int32_t))) { // integer overflow check for realloc + if (limit > static_cast<int32_t>(INT32_MAX / sizeof(int32_t))) { // integer overflow check for realloc // Something is very wrong, don't realloc, leave capacity and maxCapacity unchanged return; } @@ -256,7 +256,7 @@ void UVector32::setMaxCapacity(int32_t limit) { // New maximum capacity is smaller than the current size. // Realloc the storage to the new, smaller size. - int32_t* newElems = (int32_t *)uprv_realloc(elements, sizeof(int32_t)*maxCapacity); + int32_t* newElems = static_cast<int32_t*>(uprv_realloc(elements, sizeof(int32_t) * maxCapacity)); if (newElems == nullptr) { // Realloc to smaller failed. // Just keep what we had. No need to call it a failure. diff --git a/deps/icu-small/source/common/uvectr64.cpp b/deps/icu-small/source/common/uvectr64.cpp index 58b0b1f8b86a5a..81c923f4f8f837 100644 --- a/deps/icu-small/source/common/uvectr64.cpp +++ b/deps/icu-small/source/common/uvectr64.cpp @@ -51,10 +51,10 @@ void UVector64::_init(int32_t initialCapacity, UErrorCode &status) { if (maxCapacity>0 && maxCapacity<initialCapacity) { initialCapacity = maxCapacity; } - if (initialCapacity > (int32_t)(INT32_MAX / sizeof(int64_t))) { + if (initialCapacity > static_cast<int32_t>(INT32_MAX / sizeof(int64_t))) { initialCapacity = uprv_min(DEFAULT_CAPACITY, maxCapacity); } - elements = (int64_t *)uprv_malloc(sizeof(int64_t)*initialCapacity); + elements = static_cast<int64_t*>(uprv_malloc(sizeof(int64_t) * initialCapacity)); if (elements == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { @@ -141,12 +141,12 @@ UBool UVector64::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { if (maxCapacity > 0 && newCap > maxCapacity) { newCap = maxCapacity; } - if (newCap > (int32_t)(INT32_MAX / sizeof(int64_t))) { // integer overflow check + if (newCap > static_cast<int32_t>(INT32_MAX / sizeof(int64_t))) { // integer overflow check // We keep the original memory contents on bad minimumCapacity/maxCapacity. status = U_ILLEGAL_ARGUMENT_ERROR; return false; } - int64_t* newElems = (int64_t *)uprv_realloc(elements, sizeof(int64_t)*newCap); + int64_t* newElems = static_cast<int64_t*>(uprv_realloc(elements, sizeof(int64_t) * newCap)); if (newElems == nullptr) { // We keep the original contents on the memory failure on realloc. status = U_MEMORY_ALLOCATION_ERROR; @@ -162,7 +162,7 @@ void UVector64::setMaxCapacity(int32_t limit) { if (limit < 0) { limit = 0; } - if (limit > (int32_t)(INT32_MAX / sizeof(int64_t))) { // integer overflow check for realloc + if (limit > static_cast<int32_t>(INT32_MAX / sizeof(int64_t))) { // integer overflow check for realloc // Something is very wrong, don't realloc, leave capacity and maxCapacity unchanged return; } @@ -174,7 +174,7 @@ void UVector64::setMaxCapacity(int32_t limit) { // New maximum capacity is smaller than the current size. // Realloc the storage to the new, smaller size. - int64_t* newElems = (int64_t *)uprv_realloc(elements, sizeof(int64_t)*maxCapacity); + int64_t* newElems = static_cast<int64_t*>(uprv_realloc(elements, sizeof(int64_t) * maxCapacity)); if (newElems == nullptr) { // Realloc to smaller failed. // Just keep what we had. No need to call it a failure. diff --git a/deps/icu-small/source/data/in/icudt75l.dat.bz2 b/deps/icu-small/source/data/in/icudt76l.dat.bz2 similarity index 56% rename from deps/icu-small/source/data/in/icudt75l.dat.bz2 rename to deps/icu-small/source/data/in/icudt76l.dat.bz2 index 8f0a27826abb53..64d846791ca2e5 100644 Binary files a/deps/icu-small/source/data/in/icudt75l.dat.bz2 and b/deps/icu-small/source/data/in/icudt76l.dat.bz2 differ diff --git a/deps/icu-small/source/i18n/alphaindex.cpp b/deps/icu-small/source/i18n/alphaindex.cpp index 1b49d3b54434f8..e220e60e95e967 100644 --- a/deps/icu-small/source/i18n/alphaindex.cpp +++ b/deps/icu-small/source/i18n/alphaindex.cpp @@ -379,16 +379,16 @@ const UnicodeString &fixLabel(const UnicodeString ¤t, UnicodeString &temp) char16_t rest = current.charAt(BASE_LENGTH); if (0x2800 < rest && rest <= 0x28FF) { // stroke count int32_t count = rest-0x2800; - temp.setTo((char16_t)(0x30 + count % 10)); + temp.setTo(static_cast<char16_t>(0x30 + count % 10)); if (count >= 10) { count /= 10; - temp.insert(0, (char16_t)(0x30 + count % 10)); + temp.insert(0, static_cast<char16_t>(0x30 + count % 10)); if (count >= 10) { count /= 10; - temp.insert(0, (char16_t)(0x30 + count)); + temp.insert(0, static_cast<char16_t>(0x30 + count)); } } - return temp.append((char16_t)0x5283); + return temp.append(static_cast<char16_t>(0x5283)); } return temp.setTo(current, BASE_LENGTH); } @@ -402,7 +402,7 @@ UBool hasMultiplePrimaryWeights( UBool seenPrimary = false; for (int32_t i = 0; i < ces.size(); ++i) { int64_t ce = ces.elementAti(i); - uint32_t p = (uint32_t)(ce >> 32); + uint32_t p = static_cast<uint32_t>(ce >> 32); if (p > variableTop) { // not primary ignorable if (seenPrimary) { @@ -494,10 +494,10 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { // Remember ASCII and Pinyin buckets for Pinyin redirects. char16_t c; if (current.length() == 1 && 0x41 <= (c = current.charAt(0)) && c <= 0x5A) { // A-Z - asciiBuckets[c - 0x41] = (Bucket *)bucketList->lastElement(); + asciiBuckets[c - 0x41] = static_cast<Bucket*>(bucketList->lastElement()); } else if (current.length() == BASE_LENGTH + 1 && current.startsWith(BASE, BASE_LENGTH) && 0x41 <= (c = current.charAt(BASE_LENGTH)) && c <= 0x5A) { - pinyinBuckets[c - 0x41] = (Bucket *)bucketList->lastElement(); + pinyinBuckets[c - 0x41] = static_cast<Bucket*>(bucketList->lastElement()); hasPinyin = true; } // Check for multiple primary weights. @@ -522,7 +522,7 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { // For example, after ... Q R S Sch we add Sch\uFFFF->S // and after ... Q R S Sch Sch\uFFFF St we add St\uFFFF->S. bucket.adoptInsteadAndCheckErrorCode(new Bucket(emptyString_, - UnicodeString(current).append((char16_t)0xFFFF), + UnicodeString(current).append(static_cast<char16_t>(0xFFFF)), U_ALPHAINDEX_NORMAL), errorCode); if (U_FAILURE(errorCode)) { @@ -880,7 +880,7 @@ void AlphabeticIndex::init(const Locale *locale, UErrorCode &status) { return; } - inflowLabel_.setTo((char16_t)0x2026); // Ellipsis + inflowLabel_.setTo(static_cast<char16_t>(0x2026)); // Ellipsis overflowLabel_ = inflowLabel_; underflowLabel_ = inflowLabel_; diff --git a/deps/icu-small/source/i18n/anytrans.cpp b/deps/icu-small/source/i18n/anytrans.cpp index 4972b6873332d5..c558a29d0005c6 100644 --- a/deps/icu-small/source/i18n/anytrans.cpp +++ b/deps/icu-small/source/i18n/anytrans.cpp @@ -286,7 +286,7 @@ Transliterator* AnyTransliterator::getTransliterator(UScriptCode source) const { Transliterator* t = nullptr; { Mutex m(nullptr); - t = (Transliterator*) uhash_iget(cache, (int32_t) source); + t = static_cast<Transliterator*>(uhash_iget(cache, static_cast<int32_t>(source))); } if (t == nullptr) { UErrorCode ec = U_ZERO_ERROR; @@ -312,10 +312,10 @@ Transliterator* AnyTransliterator::getTransliterator(UScriptCode source) const { Transliterator *rt = nullptr; { Mutex m(nullptr); - rt = static_cast<Transliterator *> (uhash_iget(cache, (int32_t) source)); + rt = static_cast<Transliterator*>(uhash_iget(cache, static_cast<int32_t>(source))); if (rt == nullptr) { // Common case, no race to cache this new transliterator. - uhash_iput(cache, (int32_t) source, t, &ec); + uhash_iput(cache, static_cast<int32_t>(source), t, &ec); } else { // Race case, some other thread beat us to caching this transliterator. Transliterator *temp = rt; @@ -340,7 +340,7 @@ static UScriptCode scriptNameToCode(const UnicodeString& name) { UBool isInvariant = uprv_isInvariantUString(name.getBuffer(), nameLen); if (isInvariant) { - name.extract(0, nameLen, buf, (int32_t)sizeof(buf), US_INV); + name.extract(0, nameLen, buf, static_cast<int32_t>(sizeof(buf)), US_INV); buf[127] = 0; // Make sure that we nullptr terminate the string. } if (!isInvariant || uscript_getCode(buf, &code, 1, &ec) != 1 || U_FAILURE(ec)) diff --git a/deps/icu-small/source/i18n/astro.cpp b/deps/icu-small/source/i18n/astro.cpp index f91f6fe08978c9..37a5b77a87717b 100644 --- a/deps/icu-small/source/i18n/astro.cpp +++ b/deps/icu-small/source/i18n/astro.cpp @@ -307,7 +307,7 @@ UDate CalendarAstronomer::getTime() { */ double CalendarAstronomer::getJulianDay() { if (isINVALID(julianDay)) { - julianDay = (fTime - (double)JULIAN_EPOCH_MS) / (double)DAY_MS; + julianDay = (fTime - JULIAN_EPOCH_MS) / static_cast<double>(DAY_MS); } return julianDay; } diff --git a/deps/icu-small/source/i18n/basictz.cpp b/deps/icu-small/source/i18n/basictz.cpp index d03c50adac0f61..a2c1ec7fb9142d 100644 --- a/deps/icu-small/source/i18n/basictz.cpp +++ b/deps/icu-small/source/i18n/basictz.cpp @@ -165,7 +165,8 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, // Get local wall time for the next transition time Grego::timeToFields(nextTransitionTime + initialRaw + initialDst, - year, month, dom, dow, doy, mid); + year, month, dom, dow, doy, mid, status); + if (U_FAILURE(status)) return; int32_t weekInMonth = Grego::dayOfWeekInMonth(year, month, dom); // Create DOW rule DateTimeRule *dtr = new DateTimeRule(month, weekInMonth, dow, mid, DateTimeRule::WALL_TIME); @@ -192,7 +193,8 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, // Get local wall time for the next transition time Grego::timeToFields(tr.getTime() + tr.getFrom()->getRawOffset() + tr.getFrom()->getDSTSavings(), - year, month, dom, dow, doy, mid); + year, month, dom, dow, doy, mid, status); + if (U_FAILURE(status)) return; weekInMonth = Grego::dayOfWeekInMonth(year, month, dom); // Generate another DOW rule dtr = new DateTimeRule(month, weekInMonth, dow, mid, DateTimeRule::WALL_TIME); @@ -223,7 +225,8 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, // Generate another DOW rule Grego::timeToFields(tr.getTime() + tr.getFrom()->getRawOffset() + tr.getFrom()->getDSTSavings(), - year, month, dom, dow, doy, mid); + year, month, dom, dow, doy, mid, status); + if (U_FAILURE(status)) return; weekInMonth = Grego::dayOfWeekInMonth(year, month, dom); dtr = new DateTimeRule(month, weekInMonth, dow, mid, DateTimeRule::WALL_TIME); tr.getTo()->getName(name); @@ -367,7 +370,7 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, // Mark rules which does not need to be processed for (i = 0; i < ruleCount; i++) { - r = (TimeZoneRule*)orgRules->elementAt(i); + r = static_cast<TimeZoneRule*>(orgRules->elementAt(i)); avail = r->getNextStart(start, res_initial->getRawOffset(), res_initial->getDSTSavings(), false, time); done[i] = !avail; } @@ -390,7 +393,7 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, const TimeZoneRule *toRule = tzt.getTo(); for (i = 0; i < ruleCount; i++) { - r = (TimeZoneRule*)orgRules->elementAt(i); + r = static_cast<TimeZoneRule*>(orgRules->elementAt(i)); if (*r == *toRule) { break; } @@ -484,7 +487,10 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, } else { // Calculate the transition year int32_t year, month, dom, dow, doy, mid; - Grego::timeToFields(tzt.getTime(), year, month, dom, dow, doy, mid); + Grego::timeToFields(tzt.getTime(), year, month, dom, dow, doy, mid, status); + if (U_FAILURE(status)) { + return; + } // Re-create the rule ar->getName(name); LocalPointer<AnnualTimeZoneRule> newAr(new AnnualTimeZoneRule(name, ar->getRawOffset(), ar->getDSTSavings(), @@ -527,8 +533,8 @@ BasicTimeZone::getOffsetFromLocal(UDate /*date*/, UTimeZoneLocalOption /*nonExis void BasicTimeZone::getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt, int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const { - getOffsetFromLocal(date, (UTimeZoneLocalOption)nonExistingTimeOpt, - (UTimeZoneLocalOption)duplicatedTimeOpt, rawOffset, dstOffset, status); + getOffsetFromLocal(date, static_cast<UTimeZoneLocalOption>(nonExistingTimeOpt), + static_cast<UTimeZoneLocalOption>(duplicatedTimeOpt), rawOffset, dstOffset, status); } U_NAMESPACE_END diff --git a/deps/icu-small/source/i18n/bocsu.cpp b/deps/icu-small/source/i18n/bocsu.cpp index 585415643bab0e..23101696aec9ca 100644 --- a/deps/icu-small/source/i18n/bocsu.cpp +++ b/deps/icu-small/source/i18n/bocsu.cpp @@ -33,22 +33,22 @@ static uint8_t * u_writeDiff(int32_t diff, uint8_t *p) { if(diff>=SLOPE_REACH_NEG_1) { if(diff<=SLOPE_REACH_POS_1) { - *p++=(uint8_t)(SLOPE_MIDDLE+diff); + *p++ = static_cast<uint8_t>(SLOPE_MIDDLE + diff); } else if(diff<=SLOPE_REACH_POS_2) { - *p++=(uint8_t)(SLOPE_START_POS_2+(diff/SLOPE_TAIL_COUNT)); - *p++=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); + *p++ = static_cast<uint8_t>(SLOPE_START_POS_2 + (diff / SLOPE_TAIL_COUNT)); + *p++ = static_cast<uint8_t>(SLOPE_MIN + diff % SLOPE_TAIL_COUNT); } else if(diff<=SLOPE_REACH_POS_3) { - p[2]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); + p[2] = static_cast<uint8_t>(SLOPE_MIN + diff % SLOPE_TAIL_COUNT); diff/=SLOPE_TAIL_COUNT; - p[1]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); - *p=(uint8_t)(SLOPE_START_POS_3+(diff/SLOPE_TAIL_COUNT)); + p[1] = static_cast<uint8_t>(SLOPE_MIN + diff % SLOPE_TAIL_COUNT); + *p = static_cast<uint8_t>(SLOPE_START_POS_3 + (diff / SLOPE_TAIL_COUNT)); p+=3; } else { - p[3]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); + p[3] = static_cast<uint8_t>(SLOPE_MIN + diff % SLOPE_TAIL_COUNT); diff/=SLOPE_TAIL_COUNT; - p[2]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); + p[2] = static_cast<uint8_t>(SLOPE_MIN + diff % SLOPE_TAIL_COUNT); diff/=SLOPE_TAIL_COUNT; - p[1]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); + p[1] = static_cast<uint8_t>(SLOPE_MIN + diff % SLOPE_TAIL_COUNT); *p=SLOPE_MAX; p+=4; } @@ -57,22 +57,22 @@ u_writeDiff(int32_t diff, uint8_t *p) { if(diff>=SLOPE_REACH_NEG_2) { NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); - *p++=(uint8_t)(SLOPE_START_NEG_2+diff); - *p++=(uint8_t)(SLOPE_MIN+m); + *p++ = static_cast<uint8_t>(SLOPE_START_NEG_2 + diff); + *p++ = static_cast<uint8_t>(SLOPE_MIN + m); } else if(diff>=SLOPE_REACH_NEG_3) { NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); - p[2]=(uint8_t)(SLOPE_MIN+m); + p[2] = static_cast<uint8_t>(SLOPE_MIN + m); NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); - p[1]=(uint8_t)(SLOPE_MIN+m); - *p=(uint8_t)(SLOPE_START_NEG_3+diff); + p[1] = static_cast<uint8_t>(SLOPE_MIN + m); + *p = static_cast<uint8_t>(SLOPE_START_NEG_3 + diff); p+=3; } else { NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); - p[3]=(uint8_t)(SLOPE_MIN+m); + p[3] = static_cast<uint8_t>(SLOPE_MIN + m); NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); - p[2]=(uint8_t)(SLOPE_MIN+m); + p[2] = static_cast<uint8_t>(SLOPE_MIN + m); NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); - p[1]=(uint8_t)(SLOPE_MIN+m); + p[1] = static_cast<uint8_t>(SLOPE_MIN + m); *p=SLOPE_MIN; p+=4; } diff --git a/deps/icu-small/source/i18n/calendar.cpp b/deps/icu-small/source/i18n/calendar.cpp index 8d5246966e270b..96247174f70d6b 100644 --- a/deps/icu-small/source/i18n/calendar.cpp +++ b/deps/icu-small/source/i18n/calendar.cpp @@ -232,7 +232,7 @@ const SharedCalendar *LocaleCacheKey<SharedCalendar>::createObject( static ECalType getCalendarType(const char *s) { for (int i = 0; gCalTypes[i] != nullptr; i++) { if (uprv_stricmp(s, gCalTypes[i]) == 0) { - return (ECalType)i; + return static_cast<ECalType>(i); } } return CALTYPE_UNKNOWN; @@ -407,7 +407,7 @@ class BasicCalendarFactory : public LocaleKeyFactory { { if (U_SUCCESS(status)) { for(int32_t i=0;gCalTypes[i] != nullptr;i++) { - UnicodeString id((char16_t)0x40); /* '@' a variant character */ + UnicodeString id(static_cast<char16_t>(0x40)); /* '@' a variant character */ id.append(UNICODE_STRING_SIMPLE("calendar=")); id.append(UnicodeString(gCalTypes[i], -1, US_INV)); result.put(id, (void*)this, status); @@ -433,7 +433,7 @@ class BasicCalendarFactory : public LocaleKeyFactory { lkey->canonicalLocale(canLoc); char keyword[ULOC_FULLNAME_CAPACITY]; - curLoc.getKeywordValue("calendar", keyword, (int32_t) sizeof(keyword), status); + curLoc.getKeywordValue("calendar", keyword, static_cast<int32_t>(sizeof(keyword)), status); #ifdef U_DEBUG_CALSVC fprintf(stderr, "BasicCalendarFactory::create() - cur %s, can %s\n", (const char*)curLoc.getName(), (const char*)canLoc.getName()); @@ -476,7 +476,7 @@ class DefaultCalendarFactory : public ICUResourceBundleFactory { if (ret == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { - ret->append((char16_t)0x40); // '@' is a variant character + ret->append(static_cast<char16_t>(0x40)); // '@' is a variant character ret->append(UNICODE_STRING("calendar=", 9)); ret->append(UnicodeString(gCalTypes[getCalendarTypeForLocale(loc.getName())], -1, US_INV)); } @@ -700,7 +700,7 @@ fIsTimeSet(false), fAreFieldsSet(false), fAreAllFieldsSet(false), fAreFieldsVirtuallySet(false), -fNextStamp((int32_t)kMinimumUserStamp), +fNextStamp(static_cast<int32_t>(kMinimumUserStamp)), fTime(0), fLenient(true), fZone(nullptr), @@ -728,7 +728,7 @@ fIsTimeSet(false), fAreFieldsSet(false), fAreAllFieldsSet(false), fAreFieldsVirtuallySet(false), -fNextStamp((int32_t)kMinimumUserStamp), +fNextStamp(static_cast<int32_t>(kMinimumUserStamp)), fTime(0), fLenient(true), fZone(nullptr), @@ -763,7 +763,7 @@ fIsTimeSet(false), fAreFieldsSet(false), fAreAllFieldsSet(false), fAreFieldsVirtuallySet(false), -fNextStamp((int32_t)kMinimumUserStamp), +fNextStamp(static_cast<int32_t>(kMinimumUserStamp)), fTime(0), fLenient(true), fZone(nullptr), @@ -1121,7 +1121,7 @@ Calendar::getTimeInMillis(UErrorCode& status) const return 0.0; if ( ! fIsTimeSet) - ((Calendar*)this)->updateTime(status); + const_cast<Calendar*>(this)->updateTime(status); /* Test for buffer overflows */ if(U_FAILURE(status)) { @@ -1191,7 +1191,7 @@ Calendar::get(UCalendarDateFields field, UErrorCode& status) const // field values are only computed when actually requested; for more on when computation // of various things happens, see the "data flow in Calendar" description at the top // of this file - if (U_SUCCESS(status)) ((Calendar*)this)->complete(status); // Cast away const + if (U_SUCCESS(status)) const_cast<Calendar*>(this)->complete(status); // Cast away const return U_SUCCESS(status) ? fFields[field] : 0; } @@ -1321,7 +1321,7 @@ Calendar::isSet(UCalendarDateFields field) const int32_t Calendar::newestStamp(UCalendarDateFields first, UCalendarDateFields last, int32_t bestStampSoFar) const { int32_t bestStamp = bestStampSoFar; - for (int32_t i=(int32_t)first; i<=(int32_t)last; ++i) { + for (int32_t i = static_cast<int32_t>(first); i <= static_cast<int32_t>(last); ++i) { if (fStamp[i] > bestStamp) { bestStamp = fStamp[i]; } @@ -1532,9 +1532,9 @@ uint8_t Calendar::julianDayToDayOfWeek(int32_t julian) { // If julian is negative, then julian%7 will be negative, so we adjust // accordingly. We add 1 because Julian day 0 is Monday. - int8_t dayOfWeek = (int8_t) ((julian + 1LL) % 7); + int8_t dayOfWeek = static_cast<int8_t>((julian + 1LL) % 7); - uint8_t result = (uint8_t)(dayOfWeek + ((dayOfWeek < 0) ? (7+UCAL_SUNDAY ) : UCAL_SUNDAY)); + uint8_t result = static_cast<uint8_t>(dayOfWeek + ((dayOfWeek < 0) ? (7 + UCAL_SUNDAY) : UCAL_SUNDAY)); return result; } @@ -1583,7 +1583,7 @@ void Calendar::computeGregorianFields(int32_t julianDay, UErrorCode& ec) { } Grego::dayToFields(julianDay, fGregorianYear, fGregorianMonth, fGregorianDayOfMonth, gregorianDayOfWeekUnused, - fGregorianDayOfYear); + fGregorianDayOfYear, ec); } /** @@ -1731,7 +1731,7 @@ void Calendar::handleComputeFields(int32_t /* julianDay */, UErrorCode& status) void Calendar::roll(EDateFields field, int32_t amount, UErrorCode& status) { - roll((UCalendarDateFields)field, amount, status); + roll(static_cast<UCalendarDateFields>(field), amount, status); } void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) UPRV_NO_SANITIZE_UNDEFINED { @@ -1762,6 +1762,9 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu { int32_t min = getActualMinimum(field,status); int32_t max = getActualMaximum(field,status); + if (U_FAILURE(status)) { + return; + } int32_t gap = max - min + 1; int64_t value = internalGet(field); @@ -2103,7 +2106,7 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu void Calendar::add(EDateFields field, int32_t amount, UErrorCode& status) { - Calendar::add((UCalendarDateFields)field, amount, status); + Calendar::add(static_cast<UCalendarDateFields>(field), amount, status); } // ------------------------------------- @@ -2280,7 +2283,7 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status // to roll over/back the date. For now, this only happens // in Samoa (Pacific/Apia) on Dec 30, 2011. See ticket:9452. int32_t adjAmount = prevOffset - newOffset; - adjAmount = adjAmount >= 0 ? adjAmount % (int32_t)kOneDay : -(-adjAmount % (int32_t)kOneDay); + adjAmount = adjAmount >= 0 ? adjAmount % static_cast<int32_t>(kOneDay) : -(-adjAmount % static_cast<int32_t>(kOneDay)); if (adjAmount != 0) { setTimeInMillis(t + adjAmount, status); newWallTime = get(UCAL_MILLISECONDS_IN_DAY, status); @@ -2316,7 +2319,7 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status // ------------------------------------- int32_t Calendar::fieldDifference(UDate when, EDateFields field, UErrorCode& status) { - return fieldDifference(when, (UCalendarDateFields) field, status); + return fieldDifference(when, static_cast<UCalendarDateFields>(field), status); } int32_t Calendar::fieldDifference(UDate targetMs, UCalendarDateFields field, UErrorCode& ec) { @@ -2389,7 +2392,7 @@ int32_t Calendar::fieldDifference(UDate targetMs, UCalendarDateFields field, UEr break; } else { min = max; - max = (int32_t)((uint32_t)(max) << 1); + max = static_cast<int32_t>(static_cast<uint32_t>(max) << 1); if (max == 0) { // Field difference too large to fit into int32_t #if defined (U_DEBUG_CAL) @@ -2543,7 +2546,7 @@ Calendar::setFirstDayOfWeek(UCalendarDaysOfWeek value) UPRV_NO_SANITIZE_UNDEFINE Calendar::EDaysOfWeek Calendar::getFirstDayOfWeek() const { - return (Calendar::EDaysOfWeek)fFirstDayOfWeek; + return static_cast<Calendar::EDaysOfWeek>(fFirstDayOfWeek); } UCalendarDaysOfWeek @@ -2654,7 +2657,7 @@ UBool Calendar::isWeekend() const { UErrorCode status = U_ZERO_ERROR; - UCalendarDaysOfWeek dayOfWeek = (UCalendarDaysOfWeek)get(UCAL_DAY_OF_WEEK, status); + UCalendarDaysOfWeek dayOfWeek = static_cast<UCalendarDaysOfWeek>(get(UCAL_DAY_OF_WEEK, status)); UCalendarWeekdayType dayType = getDayOfWeekType(dayOfWeek, status); if (U_SUCCESS(status)) { switch (dayType) { @@ -2687,7 +2690,7 @@ Calendar::isWeekend() const int32_t Calendar::getMinimum(EDateFields field) const { - return getLimit((UCalendarDateFields) field,UCAL_LIMIT_MINIMUM); + return getLimit(static_cast<UCalendarDateFields>(field), UCAL_LIMIT_MINIMUM); } int32_t @@ -2700,7 +2703,7 @@ Calendar::getMinimum(UCalendarDateFields field) const int32_t Calendar::getMaximum(EDateFields field) const { - return getLimit((UCalendarDateFields) field,UCAL_LIMIT_MAXIMUM); + return getLimit(static_cast<UCalendarDateFields>(field), UCAL_LIMIT_MAXIMUM); } int32_t @@ -2713,7 +2716,7 @@ Calendar::getMaximum(UCalendarDateFields field) const int32_t Calendar::getGreatestMinimum(EDateFields field) const { - return getLimit((UCalendarDateFields)field,UCAL_LIMIT_GREATEST_MINIMUM); + return getLimit(static_cast<UCalendarDateFields>(field), UCAL_LIMIT_GREATEST_MINIMUM); } int32_t @@ -2726,7 +2729,7 @@ Calendar::getGreatestMinimum(UCalendarDateFields field) const int32_t Calendar::getLeastMaximum(EDateFields field) const { - return getLimit((UCalendarDateFields) field,UCAL_LIMIT_LEAST_MAXIMUM); + return getLimit(static_cast<UCalendarDateFields>(field), UCAL_LIMIT_LEAST_MAXIMUM); } int32_t @@ -2739,7 +2742,7 @@ Calendar::getLeastMaximum(UCalendarDateFields field) const int32_t Calendar::getActualMinimum(EDateFields field, UErrorCode& status) const { - return getActualMinimum((UCalendarDateFields) field, status); + return getActualMinimum(static_cast<UCalendarDateFields>(field), status); } int32_t Calendar::getLimit(UCalendarDateFields field, ELimitType limitType) const { @@ -2844,9 +2847,9 @@ Calendar::inDaylightTime(UErrorCode& status) const } // Force an update of the state of the Calendar. - ((Calendar*)this)->complete(status); // cast away const + const_cast<Calendar*>(this)->complete(status); // cast away const - return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false); + return U_SUCCESS(status) ? internalGet(UCAL_DST_OFFSET) != 0 : false; } bool @@ -2909,7 +2912,7 @@ void Calendar::validateFields(UErrorCode &status) { } for (int32_t field = 0; U_SUCCESS(status) && (field < UCAL_FIELD_COUNT); field++) { if (fStamp[field] >= kMinimumUserStamp) { - validateField((UCalendarDateFields)field, status); + validateField(static_cast<UCalendarDateFields>(field), status); } } } @@ -3043,7 +3046,7 @@ UCalendarDateFields Calendar::resolveFields(const UFieldResolutionTable* precede ; } } - return (UCalendarDateFields)bestField; + return static_cast<UCalendarDateFields>(bestField); } const UFieldResolutionTable Calendar::kDatePrecedence[] = @@ -3144,7 +3147,7 @@ void Calendar::computeTime(UErrorCode& status) { // time and call clear(MONTH) to reset the MONTH to January. This // is legacy behavior. Without this, clear(MONTH) has no effect, // since the internally set JULIAN_DAY is used. - if (fStamp[UCAL_MILLISECONDS_IN_DAY] >= ((int32_t)kMinimumUserStamp) && + if (fStamp[UCAL_MILLISECONDS_IN_DAY] >= static_cast<int32_t>(kMinimumUserStamp) && newestStamp(UCAL_AM_PM, UCAL_MILLISECOND, kUnset) <= fStamp[UCAL_MILLISECONDS_IN_DAY]) { millisInDay = internalGet(UCAL_MILLISECONDS_IN_DAY); } else { @@ -3152,7 +3155,8 @@ void Calendar::computeTime(UErrorCode& status) { } UDate t = 0; - if (fStamp[UCAL_ZONE_OFFSET] >= ((int32_t)kMinimumUserStamp) || fStamp[UCAL_DST_OFFSET] >= ((int32_t)kMinimumUserStamp)) { + if (fStamp[UCAL_ZONE_OFFSET] >= static_cast<int32_t>(kMinimumUserStamp) || + fStamp[UCAL_DST_OFFSET] >= static_cast<int32_t>(kMinimumUserStamp)) { t = millis + millisInDay - internalGet(UCAL_ZONE_OFFSET) - internalGet(UCAL_DST_OFFSET); } else { // Compute the time zone offset and DST offset. There are two potential @@ -3367,7 +3371,7 @@ int32_t Calendar::computeJulianDay(UErrorCode &status) // to January. This is legacy behavior. Without this, // clear(MONTH) has no effect, since the internally set JULIAN_DAY // is used. - if (fStamp[UCAL_JULIAN_DAY] >= (int32_t)kMinimumUserStamp) { + if (fStamp[UCAL_JULIAN_DAY] >= static_cast<int32_t>(kMinimumUserStamp)) { int32_t bestStamp = newestStamp(UCAL_ERA, UCAL_DAY_OF_WEEK_IN_MONTH, kUnset); bestStamp = newestStamp(UCAL_YEAR_WOY, UCAL_EXTENDED_YEAR, bestStamp); bestStamp = newestStamp(UCAL_ORDINAL_MONTH, UCAL_ORDINAL_MONTH, bestStamp); @@ -3446,7 +3450,10 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField, UErrorCo if(isSet(UCAL_DAY_OF_MONTH)) { dayOfMonth = internalGet(UCAL_DAY_OF_MONTH,1); } else { - dayOfMonth = getDefaultDayInMonth(year, month); + dayOfMonth = getDefaultDayInMonth(year, month, status); + if (U_FAILURE(status)) { + return 0; + } } if (uprv_add32_overflow(dayOfMonth, julianDay, &dayOfMonth)) { status = U_ILLEGAL_ARGUMENT_ERROR; @@ -3654,7 +3661,7 @@ Calendar::getDefaultMonthInYear(int32_t /*eyear*/, UErrorCode& /* status */) } int32_t -Calendar::getDefaultDayInMonth(int32_t /*eyear*/, int32_t /*month*/) +Calendar::getDefaultDayInMonth(int32_t /*eyear*/, int32_t /*month*/, UErrorCode& /* status */) { return 1; } @@ -4161,11 +4168,11 @@ Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode& && 1 <= weekDataArr[1] && weekDataArr[1] <= 7 && 1 <= weekDataArr[2] && weekDataArr[2] <= 7 && 1 <= weekDataArr[4] && weekDataArr[4] <= 7) { - fFirstDayOfWeek = (UCalendarDaysOfWeek)weekDataArr[0]; - fMinimalDaysInFirstWeek = (uint8_t)weekDataArr[1]; - fWeekendOnset = (UCalendarDaysOfWeek)weekDataArr[2]; + fFirstDayOfWeek = static_cast<UCalendarDaysOfWeek>(weekDataArr[0]); + fMinimalDaysInFirstWeek = static_cast<uint8_t>(weekDataArr[1]); + fWeekendOnset = static_cast<UCalendarDaysOfWeek>(weekDataArr[2]); fWeekendOnsetMillis = weekDataArr[3]; - fWeekendCease = (UCalendarDaysOfWeek)weekDataArr[4]; + fWeekendCease = static_cast<UCalendarDaysOfWeek>(weekDataArr[4]); fWeekendCeaseMillis = weekDataArr[5]; } else { status = U_INVALID_FORMAT_ERROR; @@ -4263,7 +4270,7 @@ Calendar::recalculateStamp() { void Calendar::internalSet(EDateFields field, int32_t value) { - internalSet((UCalendarDateFields) field, value); + internalSet(static_cast<UCalendarDateFields>(field), value); } int32_t Calendar::internalGetMonth(UErrorCode& status) const { diff --git a/deps/icu-small/source/i18n/cecal.cpp b/deps/icu-small/source/i18n/cecal.cpp index b550684b79880c..7771c32efb30c8 100644 --- a/deps/icu-small/source/i18n/cecal.cpp +++ b/deps/icu-small/source/i18n/cecal.cpp @@ -110,12 +110,16 @@ CECalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType) cons //------------------------------------------------------------------------- void -CECalendar::jdToCE(int32_t julianDay, int32_t jdEpochOffset, int32_t& year, int32_t& month, int32_t& day) +CECalendar::jdToCE(int32_t julianDay, int32_t jdEpochOffset, int32_t& year, int32_t& month, int32_t& day, UErrorCode& status) { int32_t c4; // number of 4 year cycle (1461 days) int32_t r4; // remainder of 4 year cycle, always positive - c4 = ClockMath::floorDivide(julianDay - jdEpochOffset, 1461, &r4); + if (uprv_add32_overflow(julianDay, -jdEpochOffset, &julianDay)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + c4 = ClockMath::floorDivide(julianDay, 1461, &r4); year = 4 * c4 + (r4/365 - r4/1460); // 4 * <number of 4year cycle> + <years within the last cycle> diff --git a/deps/icu-small/source/i18n/cecal.h b/deps/icu-small/source/i18n/cecal.h index 8f634e796357b4..9c3332f3b84a82 100644 --- a/deps/icu-small/source/i18n/cecal.h +++ b/deps/icu-small/source/i18n/cecal.h @@ -126,7 +126,7 @@ class U_I18N_API CECalendar : public Calendar { * @internal */ static void jdToCE(int32_t julianDay, int32_t jdEpochOffset, - int32_t& year, int32_t& month, int32_t& day); + int32_t& year, int32_t& month, int32_t& day, UErrorCode& status); }; U_NAMESPACE_END diff --git a/deps/icu-small/source/i18n/chnsecal.cpp b/deps/icu-small/source/i18n/chnsecal.cpp index 7db5b4800bf594..050994fcbaf67c 100644 --- a/deps/icu-small/source/i18n/chnsecal.cpp +++ b/deps/icu-small/source/i18n/chnsecal.cpp @@ -116,9 +116,9 @@ U_NAMESPACE_BEGIN namespace { const TimeZone* getAstronomerTimeZone(); -int32_t newMoonNear(const TimeZone*, double, UBool); -int32_t newYear(const icu::ChineseCalendar::Setting&, int32_t); -UBool isLeapMonthBetween(const TimeZone*, int32_t, int32_t); +int32_t newMoonNear(const TimeZone*, double, UBool, UErrorCode&); +int32_t newYear(const icu::ChineseCalendar::Setting&, int32_t, UErrorCode&); +UBool isLeapMonthBetween(const TimeZone*, int32_t, int32_t, UErrorCode&); } // namespace @@ -253,13 +253,16 @@ int32_t ChineseCalendar::handleGetExtendedYear(UErrorCode& status) { */ int32_t ChineseCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode& status) const { const Setting setting = getSetting(status); + if (U_FAILURE(status)) { + return 0; + } int32_t thisStart = handleComputeMonthStart(extendedYear, month, true, status); if (U_FAILURE(status)) { return 0; } thisStart = thisStart - kEpochStartAsJulianDay + 1; // Julian day -> local days - int32_t nextStart = newMoonNear(setting.zoneAstroCalc, thisStart + SYNODIC_GAP, true); + int32_t nextStart = newMoonNear(setting.zoneAstroCalc, thisStart + SYNODIC_GAP, true, status); return nextStart - thisStart; } @@ -311,7 +314,7 @@ struct MonthInfo { }; struct MonthInfo computeMonthInfo( const icu::ChineseCalendar::Setting& setting, - int32_t gyear, int32_t days); + int32_t gyear, int32_t days, UErrorCode& status); } // namespace @@ -340,7 +343,7 @@ int64_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U status = U_ILLEGAL_ARGUMENT_ERROR; return 0; } - month = (int32_t)m; + month = static_cast<int32_t>(m); } const Setting setting = getSetting(status); @@ -353,8 +356,11 @@ int64_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U return 0; } - int32_t theNewYear = newYear(setting, gyear); - int32_t newMoon = newMoonNear(setting.zoneAstroCalc, theNewYear + month * 29, true); + int32_t theNewYear = newYear(setting, gyear, status); + int32_t newMoon = newMoonNear(setting.zoneAstroCalc, theNewYear + month * 29, true, status); + if (U_FAILURE(status)) { + return 0; + } // Ignore IS_LEAP_MONTH field if useMonth is false bool isLeapMonth = false; @@ -366,11 +372,17 @@ int64_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U int32_t unusedDayOfWeek; int32_t unusedDayOfMonth; int32_t unusedDayOfYear; - Grego::dayToFields(newMoon, gyear, unusedMonth, unusedDayOfWeek, unusedDayOfMonth, unusedDayOfYear); + Grego::dayToFields(newMoon, gyear, unusedMonth, unusedDayOfWeek, unusedDayOfMonth, unusedDayOfYear, status); - struct MonthInfo monthInfo = computeMonthInfo(setting, gyear, newMoon); + struct MonthInfo monthInfo = computeMonthInfo(setting, gyear, newMoon, status); + if (U_FAILURE(status)) { + return 0; + } if (month != monthInfo.month-1 || isLeapMonth != monthInfo.isLeapMonth) { - newMoon = newMoonNear(setting.zoneAstroCalc, newMoon + SYNODIC_GAP, true); + newMoon = newMoonNear(setting.zoneAstroCalc, newMoon + SYNODIC_GAP, true, status); + if (U_FAILURE(status)) { + return 0; + } } int32_t julianDay; if (uprv_add32_overflow(newMoon-1, kEpochStartAsJulianDay, &julianDay)) { @@ -410,7 +422,7 @@ void ChineseCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& * @stable ICU 2.8 */ void ChineseCalendar::add(EDateFields field, int32_t amount, UErrorCode& status) { - add((UCalendarDateFields)field, amount, status); + add(static_cast<UCalendarDateFields>(field), amount, status); } namespace { @@ -449,11 +461,17 @@ struct RollMonthInfo rollMonth(const TimeZone* timeZone, int32_t amount, int32_t // no leap month between month 0 and month m; // otherwise it will be the start of month 1. int prevMoon = output.thisMoon - - (int) (CalendarAstronomer::SYNODIC_MONTH * (month - 0.5)); - prevMoon = newMoonNear(timeZone, prevMoon, true); - if (isLeapMonthBetween(timeZone, prevMoon, output.thisMoon)) { + static_cast<int>(CalendarAstronomer::SYNODIC_MONTH * (month - 0.5)); + prevMoon = newMoonNear(timeZone, prevMoon, true, status); + if (U_FAILURE(status)) { + return output; + } + if (isLeapMonthBetween(timeZone, prevMoon, output.thisMoon, status)) { ++month; } + if (U_FAILURE(status)) { + return output; + } } } // Now do the standard roll computation on month, with the @@ -488,8 +506,9 @@ void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode int32_t dayOfMonth = get(UCAL_DAY_OF_MONTH, status); bool isLeapMonth = get(UCAL_IS_LEAP_MONTH, status) == 1; if (U_FAILURE(status)) break; - struct RollMonthInfo r = rollMonth(setting.zoneAstroCalc, amount, - day, month, dayOfMonth, isLeapMonth, hasLeapMonthBetweenWinterSolstices, status); + struct RollMonthInfo r = rollMonth( + setting.zoneAstroCalc, amount, day, month, dayOfMonth, isLeapMonth, + hasLeapMonthBetweenWinterSolstices, status); if (U_FAILURE(status)) break; if (r.newMoon != r.month) { offsetMonth(r.thisMoon, dayOfMonth, r.newMoon - r.month, status); @@ -503,7 +522,7 @@ void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode } void ChineseCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status) { - roll((UCalendarDateFields)field, amount, status); + roll(static_cast<UCalendarDateFields>(field), amount, status); } @@ -525,17 +544,20 @@ namespace { * @param days days after January 1, 1970 0:00 in the astronomical base zone * @return milliseconds after January 1, 1970 0:00 GMT */ -double daysToMillis(const TimeZone* timeZone, double days) { - double millis = days * (double)kOneDay; +double daysToMillis(const TimeZone* timeZone, double days, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } + double millis = days * kOneDay; if (timeZone != nullptr) { int32_t rawOffset, dstOffset; - UErrorCode status = U_ZERO_ERROR; timeZone->getOffset(millis, false, rawOffset, dstOffset, status); - if (U_SUCCESS(status)) { - return millis - (double)(rawOffset + dstOffset); + if (U_FAILURE(status)) { + return 0; } + return millis - static_cast<double>(rawOffset + dstOffset); } - return millis - (double)CHINA_OFFSET; + return millis - static_cast<double>(CHINA_OFFSET); } /** @@ -544,16 +566,19 @@ double daysToMillis(const TimeZone* timeZone, double days) { * @param millis milliseconds after January 1, 1970 0:00 GMT * @return days after January 1, 1970 0:00 in the astronomical base zone */ -double millisToDays(const TimeZone* timeZone, double millis) { +double millisToDays(const TimeZone* timeZone, double millis, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } if (timeZone != nullptr) { int32_t rawOffset, dstOffset; - UErrorCode status = U_ZERO_ERROR; timeZone->getOffset(millis, false, rawOffset, dstOffset, status); - if (U_SUCCESS(status)) { - return ClockMath::floorDivide(millis + (double)(rawOffset + dstOffset), kOneDay); + if (U_FAILURE(status)) { + return 0; } + return ClockMath::floorDivide(millis + static_cast<double>(rawOffset + dstOffset), kOneDay); } - return ClockMath::floorDivide(millis + (double)CHINA_OFFSET, kOneDay); + return ClockMath::floorDivide(millis + static_cast<double>(CHINA_OFFSET), kOneDay); } //------------------------------------------------------------------ @@ -571,28 +596,40 @@ double millisToDays(const TimeZone* timeZone, double millis) { * winter solstice of the given year */ int32_t winterSolstice(const icu::ChineseCalendar::Setting& setting, - int32_t gyear) { + int32_t gyear, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } const TimeZone* timeZone = setting.zoneAstroCalc; - UErrorCode status = U_ZERO_ERROR; int32_t cacheValue = CalendarCache::get(setting.winterSolsticeCache, gyear, status); + if (U_FAILURE(status)) { + return 0; + } if (cacheValue == 0) { // In books December 15 is used, but it fails for some years // using our algorithms, e.g.: 1298 1391 1492 1553 1560. That // is, winterSolstice(1298) starts search at Dec 14 08:00:00 // PST 1298 with a final result of Dec 14 10:31:59 PST 1299. - double ms = daysToMillis(timeZone, Grego::fieldsToDay(gyear, UCAL_DECEMBER, 1)); + double ms = daysToMillis(timeZone, Grego::fieldsToDay(gyear, UCAL_DECEMBER, 1), status); + if (U_FAILURE(status)) { + return 0; + } // Winter solstice is 270 degrees solar longitude aka Dongzhi double days = millisToDays(timeZone, CalendarAstronomer(ms) - .getSunTime(CalendarAstronomer::WINTER_SOLSTICE(), true)); + .getSunTime(CalendarAstronomer::WINTER_SOLSTICE(), true), + status); + if (U_FAILURE(status)) { + return 0; + } if (days < INT32_MIN || days > INT32_MAX) { status = U_ILLEGAL_ARGUMENT_ERROR; return 0; } - cacheValue = (int32_t) days; + cacheValue = static_cast<int32_t>(days); CalendarCache::put(setting.winterSolsticeCache, gyear, cacheValue, status); } if(U_FAILURE(status)) { @@ -608,14 +645,23 @@ int32_t winterSolstice(const icu::ChineseCalendar::Setting& setting, * @param days days after January 1, 1970 0:00 Asia/Shanghai * @param after if true, search for a new moon on or after the given * date; otherwise, search for a new moon before it + * @param status * @return days after January 1, 1970 0:00 Asia/Shanghai of the nearest * new moon after or before <code>days</code> */ -int32_t newMoonNear(const TimeZone* timeZone, double days, UBool after) { - return (int32_t) millisToDays( +int32_t newMoonNear(const TimeZone* timeZone, double days, UBool after, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } + double ms = daysToMillis(timeZone, days, status); + if (U_FAILURE(status)) { + return 0; + } + return static_cast<int32_t>(millisToDays( timeZone, - CalendarAstronomer(daysToMillis(timeZone, days)) - .getMoonTime(CalendarAstronomer::NEW_MOON(), after)); + CalendarAstronomer(ms) + .getMoonTime(CalendarAstronomer::NEW_MOON(), after), + status)); } /** @@ -627,7 +673,7 @@ int32_t newMoonNear(const TimeZone* timeZone, double days, UBool after) { */ int32_t synodicMonthsBetween(int32_t day1, int32_t day2) { double roundme = ((day2 - day1) / CalendarAstronomer::SYNODIC_MONTH); - return (int32_t) (roundme + (roundme >= 0 ? .5 : -.5)); + return static_cast<int32_t>(roundme + (roundme >= 0 ? .5 : -.5)); } /** @@ -637,10 +683,20 @@ int32_t synodicMonthsBetween(int32_t day1, int32_t day2) { * @param timeZone time zone for the Astro calculation. * @param days days after January 1, 1970 0:00 Asia/Shanghai */ -int32_t majorSolarTerm(const TimeZone* timeZone, int32_t days) { +int32_t majorSolarTerm(const TimeZone* timeZone, int32_t days, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } // Compute (floor(solarLongitude / (pi/6)) + 2) % 12 - int32_t term = ( ((int32_t)(6 * CalendarAstronomer(daysToMillis(timeZone, days)) + double ms = daysToMillis(timeZone, days, status); + if (U_FAILURE(status)) { + return 0; + } + int32_t term = ((static_cast<int32_t>(6 * CalendarAstronomer(ms) .getSunLongitude() / CalendarAstronomer::PI)) + 2 ) % 12; + if (U_FAILURE(status)) { + return 0; + } if (term < 1) { term += 12; } @@ -653,9 +709,17 @@ int32_t majorSolarTerm(const TimeZone* timeZone, int32_t days) { * @param newMoon days after January 1, 1970 0:00 Asia/Shanghai of a new * moon */ -UBool hasNoMajorSolarTerm(const TimeZone* timeZone, int32_t newMoon) { - return majorSolarTerm(timeZone, newMoon) == - majorSolarTerm(timeZone, newMoonNear(timeZone, newMoon + SYNODIC_GAP, true)); +UBool hasNoMajorSolarTerm(const TimeZone* timeZone, int32_t newMoon, UErrorCode& status) { + if (U_FAILURE(status)) { + return false; + } + int32_t term1 = majorSolarTerm(timeZone, newMoon, status); + int32_t term2 = majorSolarTerm( + timeZone, newMoonNear(timeZone, newMoon + SYNODIC_GAP, true, status), status); + if (U_FAILURE(status)) { + return false; + } + return term1 == term2; } @@ -672,7 +736,10 @@ UBool hasNoMajorSolarTerm(const TimeZone* timeZone, int32_t newMoon) { * @param newMoon2 days after January 1, 1970 0:00 astronomical base zone * of a new moon */ -UBool isLeapMonthBetween(const TimeZone* timeZone, int32_t newMoon1, int32_t newMoon2) { +UBool isLeapMonthBetween(const TimeZone* timeZone, int32_t newMoon1, int32_t newMoon2, UErrorCode& status) { + if (U_FAILURE(status)) { + return false; + } #ifdef U_DEBUG_CHNSECAL // This is only needed to debug the timeOfAngle divergence bug. @@ -685,10 +752,13 @@ UBool isLeapMonthBetween(const TimeZone* timeZone, int32_t newMoon1, int32_t new #endif while (newMoon2 >= newMoon1) { - if (hasNoMajorSolarTerm(timeZone, newMoon2)) { + if (hasNoMajorSolarTerm(timeZone, newMoon2, status)) { return true; } - newMoon2 = newMoonNear(timeZone, newMoon2 - SYNODIC_GAP, false); + newMoon2 = newMoonNear(timeZone, newMoon2 - SYNODIC_GAP, false, status); + if (U_FAILURE(status)) { + return false; + } } return false; } @@ -704,39 +774,63 @@ UBool isLeapMonthBetween(const TimeZone* timeZone, int32_t newMoon1, int32_t new */ struct MonthInfo computeMonthInfo( const icu::ChineseCalendar::Setting& setting, - int32_t gyear, int32_t days) { - struct MonthInfo output; + int32_t gyear, int32_t days, UErrorCode& status) { + struct MonthInfo output = {0, 0, 0, false, false}; + if (U_FAILURE(status)) { + return output; + } // Find the winter solstices before and after the target date. // These define the boundaries of this Chinese year, specifically, // the position of month 11, which always contains the solstice. // We want solsticeBefore <= date < solsticeAfter. int32_t solsticeBefore; - int32_t solsticeAfter = winterSolstice(setting, gyear); + int32_t solsticeAfter = winterSolstice(setting, gyear, status); + if (U_FAILURE(status)) { + return output; + } if (days < solsticeAfter) { - solsticeBefore = winterSolstice(setting, gyear - 1); + solsticeBefore = winterSolstice(setting, gyear - 1, status); } else { solsticeBefore = solsticeAfter; - solsticeAfter = winterSolstice(setting, gyear + 1); + solsticeAfter = winterSolstice(setting, gyear + 1, status); + } + if (U_FAILURE(status)) { + return output; } const TimeZone* timeZone = setting.zoneAstroCalc; // Find the start of the month after month 11. This will be either // the prior month 12 or leap month 11 (very rare). Also find the // start of the following month 11. - int32_t firstMoon = newMoonNear(timeZone, solsticeBefore + 1, true); - int32_t lastMoon = newMoonNear(timeZone, solsticeAfter + 1, false); - output.thisMoon = newMoonNear(timeZone, days + 1, false); // Start of this month + int32_t firstMoon = newMoonNear(timeZone, solsticeBefore + 1, true, status); + int32_t lastMoon = newMoonNear(timeZone, solsticeAfter + 1, false, status); + if (U_FAILURE(status)) { + return output; + } + output.thisMoon = newMoonNear(timeZone, days + 1, false, status); // Start of this month + if (U_FAILURE(status)) { + return output; + } output.hasLeapMonthBetweenWinterSolstices = synodicMonthsBetween(firstMoon, lastMoon) == 12; output.month = synodicMonthsBetween(firstMoon, output.thisMoon); - int32_t theNewYear = newYear(setting, gyear); + int32_t theNewYear = newYear(setting, gyear, status); + if (U_FAILURE(status)) { + return output; + } if (days < theNewYear) { - theNewYear = newYear(setting, gyear-1); + theNewYear = newYear(setting, gyear-1, status); + if (U_FAILURE(status)) { + return output; + } } if (output.hasLeapMonthBetweenWinterSolstices && - isLeapMonthBetween(timeZone, firstMoon, output.thisMoon)) { + isLeapMonthBetween(timeZone, firstMoon, output.thisMoon, status)) { output.month--; } + if (U_FAILURE(status)) { + return output; + } if (output.month < 1) { output.month += 12; } @@ -745,9 +839,13 @@ struct MonthInfo computeMonthInfo( output.ordinalMonth += 12; } output.isLeapMonth = output.hasLeapMonthBetweenWinterSolstices && - hasNoMajorSolarTerm(timeZone, output.thisMoon) && + hasNoMajorSolarTerm(timeZone, output.thisMoon, status) && !isLeapMonthBetween(timeZone, firstMoon, - newMoonNear(timeZone, output.thisMoon - SYNODIC_GAP, false)); + newMoonNear(timeZone, output.thisMoon - SYNODIC_GAP, false, status), + status); + if (U_FAILURE(status)) { + return output; + } return output; } @@ -787,7 +885,10 @@ void ChineseCalendar::handleComputeFields(int32_t julianDay, UErrorCode & status if (U_FAILURE(status)) { return; } - struct MonthInfo monthInfo = computeMonthInfo(setting, gyear, days); + struct MonthInfo monthInfo = computeMonthInfo(setting, gyear, days, status); + if (U_FAILURE(status)) { + return; + } hasLeapMonthBetweenWinterSolstices = monthInfo.hasLeapMonthBetweenWinterSolstices; // Extended year and cycle year is based on the epoch year @@ -808,9 +909,15 @@ void ChineseCalendar::handleComputeFields(int32_t julianDay, UErrorCode & status // date is in month 11, leap 11, 12. There is never a leap 12. // New year computations are cached so this should be cheap in // the long run. - int32_t theNewYear = newYear(setting, gyear); + int32_t theNewYear = newYear(setting, gyear, status); + if (U_FAILURE(status)) { + return; + } if (days < theNewYear) { - theNewYear = newYear(setting, gyear-1); + theNewYear = newYear(setting, gyear-1, status); + } + if (U_FAILURE(status)) { + return; } cycle++; yearOfCycle++; @@ -858,26 +965,37 @@ namespace { * Chinese new year of the given year (this will be a new moon) */ int32_t newYear(const icu::ChineseCalendar::Setting& setting, - int32_t gyear) { + int32_t gyear, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } const TimeZone* timeZone = setting.zoneAstroCalc; - UErrorCode status = U_ZERO_ERROR; int32_t cacheValue = CalendarCache::get(setting.newYearCache, gyear, status); + if (U_FAILURE(status)) { + return 0; + } if (cacheValue == 0) { - int32_t solsticeBefore= winterSolstice(setting, gyear - 1); - int32_t solsticeAfter = winterSolstice(setting, gyear); - int32_t newMoon1 = newMoonNear(timeZone, solsticeBefore + 1, true); - int32_t newMoon2 = newMoonNear(timeZone, newMoon1 + SYNODIC_GAP, true); - int32_t newMoon11 = newMoonNear(timeZone, solsticeAfter + 1, false); + int32_t solsticeBefore= winterSolstice(setting, gyear - 1, status); + int32_t solsticeAfter = winterSolstice(setting, gyear, status); + int32_t newMoon1 = newMoonNear(timeZone, solsticeBefore + 1, true, status); + int32_t newMoon2 = newMoonNear(timeZone, newMoon1 + SYNODIC_GAP, true, status); + int32_t newMoon11 = newMoonNear(timeZone, solsticeAfter + 1, false, status); + if (U_FAILURE(status)) { + return 0; + } if (synodicMonthsBetween(newMoon1, newMoon11) == 12 && - (hasNoMajorSolarTerm(timeZone, newMoon1) || - hasNoMajorSolarTerm(timeZone, newMoon2))) { - cacheValue = newMoonNear(timeZone, newMoon2 + SYNODIC_GAP, true); + (hasNoMajorSolarTerm(timeZone, newMoon1, status) || + hasNoMajorSolarTerm(timeZone, newMoon2, status))) { + cacheValue = newMoonNear(timeZone, newMoon2 + SYNODIC_GAP, true, status); } else { cacheValue = newMoon2; } + if (U_FAILURE(status)) { + return 0; + } CalendarCache::put(setting.newYearCache, gyear, cacheValue, status); } @@ -904,7 +1022,9 @@ int32_t newYear(const icu::ChineseCalendar::Setting& setting, void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dayOfMonth, int32_t delta, UErrorCode& status) { const Setting setting = getSetting(status); - if (U_FAILURE(status)) { return; } + if (U_FAILURE(status)) { + return; + } // Move to the middle of the month before our target month. double value = newMoon; @@ -917,7 +1037,10 @@ void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dayOfMonth, int32_t d newMoon = static_cast<int32_t>(value); // Search forward to the target month's new moon - newMoon = newMoonNear(setting.zoneAstroCalc, newMoon, true); + newMoon = newMoonNear(setting.zoneAstroCalc, newMoon, true, status); + if (U_FAILURE(status)) { + return; + } // Find the target dayOfMonth int32_t jd = newMoon + kEpochStartAsJulianDay - 1 + dayOfMonth; @@ -1030,7 +1153,7 @@ int32_t ChineseCalendar::internalGetMonth(UErrorCode& status) const { return 0; } - ChineseCalendar *nonConstThis = (ChineseCalendar*)this; // cast away const + ChineseCalendar* nonConstThis = const_cast<ChineseCalendar*>(this); // cast away const nonConstThis->internalSet(UCAL_IS_LEAP_MONTH, temp->get(UCAL_IS_LEAP_MONTH, status)); int32_t month = temp->get(UCAL_MONTH, status); if (U_FAILURE(status)) { diff --git a/deps/icu-small/source/i18n/choicfmt.cpp b/deps/icu-small/source/i18n/choicfmt.cpp index 96e73fabcfa7f0..6f44b9504d0675 100644 --- a/deps/icu-small/source/i18n/choicfmt.cpp +++ b/deps/icu-small/source/i18n/choicfmt.cpp @@ -380,7 +380,7 @@ ChoiceFormat::format(int64_t number, UnicodeString& appendTo, FieldPosition& status) const { - return format((double) number, appendTo, status); + return format(static_cast<double>(number), appendTo, status); } // ------------------------------------- @@ -392,7 +392,7 @@ ChoiceFormat::format(int32_t number, UnicodeString& appendTo, FieldPosition& status) const { - return format((double) number, appendTo, status); + return format(static_cast<double>(number), appendTo, status); } // ------------------------------------- diff --git a/deps/icu-small/source/i18n/coleitr.cpp b/deps/icu-small/source/i18n/coleitr.cpp index be0a8e4690f974..5ae15ae5a72873 100644 --- a/deps/icu-small/source/i18n/coleitr.cpp +++ b/deps/icu-small/source/i18n/coleitr.cpp @@ -127,8 +127,8 @@ int32_t CollationElementIterator::next(UErrorCode& status) int64_t ce = iter_->nextCE(status); if (ce == Collation::NO_CE) { return NULLORDER; } // Turn the 64-bit CE into two old-style 32-bit CEs, without quaternary bits. - uint32_t p = (uint32_t)(ce >> 32); - uint32_t lower32 = (uint32_t)ce; + uint32_t p = static_cast<uint32_t>(ce >> 32); + uint32_t lower32 = static_cast<uint32_t>(ce); uint32_t firstHalf = getFirstHalf(p, lower32); uint32_t secondHalf = getSecondHalf(p, lower32); if (secondHalf != 0) { @@ -199,8 +199,8 @@ int32_t CollationElementIterator::previous(UErrorCode& status) int64_t ce = iter_->previousCE(*offsets_, status); if (ce == Collation::NO_CE) { return NULLORDER; } // Turn the 64-bit CE into two old-style 32-bit CEs, without quaternary bits. - uint32_t p = (uint32_t)(ce >> 32); - uint32_t lower32 = (uint32_t)ce; + uint32_t p = static_cast<uint32_t>(ce >> 32); + uint32_t lower32 = static_cast<uint32_t>(ce); uint32_t firstHalf = getFirstHalf(p, lower32); uint32_t secondHalf = getSecondHalf(p, lower32); if (secondHalf != 0) { @@ -309,7 +309,7 @@ void CollationElementIterator::setText(CharacterIterator& source, int32_t CollationElementIterator::strengthOrder(int32_t order) const { - UColAttributeValue s = (UColAttributeValue)rbc_->settings->getStrength(); + UColAttributeValue s = static_cast<UColAttributeValue>(rbc_->settings->getStrength()); // Mask off the unwanted differences. if (s == UCOL_PRIMARY) { order &= 0xffff0000; @@ -410,8 +410,8 @@ class MaxExpSink : public ContractionsAndExpansions::CESink { } // last "half" of the last CE int64_t ce = ces[length - 1]; - uint32_t p = (uint32_t)(ce >> 32); - uint32_t lower32 = (uint32_t)ce; + uint32_t p = static_cast<uint32_t>(ce >> 32); + uint32_t lower32 = static_cast<uint32_t>(ce); uint32_t lastHalf = getSecondHalf(p, lower32); if (lastHalf == 0) { lastHalf = getFirstHalf(p, lower32); @@ -419,8 +419,8 @@ class MaxExpSink : public ContractionsAndExpansions::CESink { } else { lastHalf |= 0xc0; // old-style continuation CE } - if (count > uhash_igeti(maxExpansions, (int32_t)lastHalf)) { - uhash_iputi(maxExpansions, (int32_t)lastHalf, count, &errorCode); + if (count > uhash_igeti(maxExpansions, static_cast<int32_t>(lastHalf))) { + uhash_iputi(maxExpansions, static_cast<int32_t>(lastHalf), count, &errorCode); } } diff --git a/deps/icu-small/source/i18n/coll.cpp b/deps/icu-small/source/i18n/coll.cpp index c83b29043612bb..1f8b8e417b048c 100644 --- a/deps/icu-small/source/i18n/coll.cpp +++ b/deps/icu-small/source/i18n/coll.cpp @@ -413,7 +413,7 @@ void setAttributesFromKeywords(const Locale &loc, Collator &coll, UErrorCode &er errorCode = U_ILLEGAL_ARGUMENT_ERROR; return; } - coll.setMaxVariable((UColReorderCode)code, errorCode); + coll.setMaxVariable(static_cast<UColReorderCode>(code), errorCode); } if (U_FAILURE(errorCode)) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; @@ -493,7 +493,7 @@ Collator::EComparisonResult Collator::compare(const UnicodeString& source, const UnicodeString& target) const { UErrorCode ec = U_ZERO_ERROR; - return (EComparisonResult)compare(source, target, ec); + return static_cast<EComparisonResult>(compare(source, target, ec)); } // implement deprecated, previously abstract method @@ -502,7 +502,7 @@ Collator::EComparisonResult Collator::compare(const UnicodeString& source, int32_t length) const { UErrorCode ec = U_ZERO_ERROR; - return (EComparisonResult)compare(source, target, length, ec); + return static_cast<EComparisonResult>(compare(source, target, length, ec)); } // implement deprecated, previously abstract method @@ -511,7 +511,7 @@ Collator::EComparisonResult Collator::compare(const char16_t* source, int32_t so const { UErrorCode ec = U_ZERO_ERROR; - return (EComparisonResult)compare(source, sourceLength, target, targetLength, ec); + return static_cast<EComparisonResult>(compare(source, sourceLength, target, targetLength, ec)); } UCollationResult Collator::compare(UCharIterator &/*sIter*/, @@ -834,7 +834,7 @@ class CollationLocaleListEnumeration : public StringEnumeration { if(index < availableLocaleListCount) { result = availableLocaleList[index++].getName(); if(resultLength != nullptr) { - *resultLength = (int32_t)uprv_strlen(result); + *resultLength = static_cast<int32_t>(uprv_strlen(result)); } } else { if(resultLength != nullptr) { @@ -915,13 +915,13 @@ Collator::getFunctionalEquivalent(const char* keyword, const Locale& locale, Collator::ECollationStrength Collator::getStrength() const { UErrorCode intStatus = U_ZERO_ERROR; - return (ECollationStrength)getAttribute(UCOL_STRENGTH, intStatus); + return static_cast<ECollationStrength>(getAttribute(UCOL_STRENGTH, intStatus)); } void Collator::setStrength(ECollationStrength newStrength) { UErrorCode intStatus = U_ZERO_ERROR; - setAttribute(UCOL_STRENGTH, (UColAttributeValue)newStrength, intStatus); + setAttribute(UCOL_STRENGTH, static_cast<UColAttributeValue>(newStrength), intStatus); } Collator & diff --git a/deps/icu-small/source/i18n/collation.cpp b/deps/icu-small/source/i18n/collation.cpp index 705ee12e23cc3b..61838e10fd2a3a 100644 --- a/deps/icu-small/source/i18n/collation.cpp +++ b/deps/icu-small/source/i18n/collation.cpp @@ -27,38 +27,38 @@ Collation::incTwoBytePrimaryByOffset(uint32_t basePrimary, UBool isCompressible, // Reserve the PRIMARY_COMPRESSION_LOW_BYTE and high byte if necessary. uint32_t primary; if(isCompressible) { - offset += ((int32_t)(basePrimary >> 16) & 0xff) - 4; - primary = (uint32_t)((offset % 251) + 4) << 16; + offset += (static_cast<int32_t>(basePrimary >> 16) & 0xff) - 4; + primary = static_cast<uint32_t>((offset % 251) + 4) << 16; offset /= 251; } else { - offset += ((int32_t)(basePrimary >> 16) & 0xff) - 2; - primary = (uint32_t)((offset % 254) + 2) << 16; + offset += (static_cast<int32_t>(basePrimary >> 16) & 0xff) - 2; + primary = static_cast<uint32_t>((offset % 254) + 2) << 16; offset /= 254; } // First byte, assume no further overflow. - return primary | ((basePrimary & 0xff000000) + (uint32_t)(offset << 24)); + return primary | ((basePrimary & 0xff000000) + static_cast<uint32_t>(offset << 24)); } uint32_t Collation::incThreeBytePrimaryByOffset(uint32_t basePrimary, UBool isCompressible, int32_t offset) { // Extract the third byte, minus the minimum byte value, // plus the offset, modulo the number of usable byte values, plus the minimum. - offset += ((int32_t)(basePrimary >> 8) & 0xff) - 2; - uint32_t primary = (uint32_t)((offset % 254) + 2) << 8; + offset += (static_cast<int32_t>(basePrimary >> 8) & 0xff) - 2; + uint32_t primary = static_cast<uint32_t>((offset % 254) + 2) << 8; offset /= 254; // Same with the second byte, // but reserve the PRIMARY_COMPRESSION_LOW_BYTE and high byte if necessary. if(isCompressible) { - offset += ((int32_t)(basePrimary >> 16) & 0xff) - 4; - primary |= (uint32_t)((offset % 251) + 4) << 16; + offset += (static_cast<int32_t>(basePrimary >> 16) & 0xff) - 4; + primary |= static_cast<uint32_t>((offset % 251) + 4) << 16; offset /= 251; } else { - offset += ((int32_t)(basePrimary >> 16) & 0xff) - 2; - primary |= (uint32_t)((offset % 254) + 2) << 16; + offset += (static_cast<int32_t>(basePrimary >> 16) & 0xff) - 2; + primary |= static_cast<uint32_t>((offset % 254) + 2) << 16; offset /= 254; } // First byte, assume no further overflow. - return primary | ((basePrimary & 0xff000000) + (uint32_t)(offset << 24)); + return primary | ((basePrimary & 0xff000000) + static_cast<uint32_t>(offset << 24)); } uint32_t @@ -68,7 +68,7 @@ Collation::decTwoBytePrimaryByOneStep(uint32_t basePrimary, UBool isCompressible // Reserve the PRIMARY_COMPRESSION_LOW_BYTE and high byte if necessary. // Assume no further underflow for the first byte. U_ASSERT(0 < step && step <= 0x7f); - int32_t byte2 = ((int32_t)(basePrimary >> 16) & 0xff) - step; + int32_t byte2 = (static_cast<int32_t>(basePrimary >> 16) & 0xff) - step; if(isCompressible) { if(byte2 < 4) { byte2 += 251; @@ -80,7 +80,7 @@ Collation::decTwoBytePrimaryByOneStep(uint32_t basePrimary, UBool isCompressible basePrimary -= 0x1000000; } } - return (basePrimary & 0xff000000) | ((uint32_t)byte2 << 16); + return (basePrimary & 0xff000000) | (static_cast<uint32_t>(byte2) << 16); } uint32_t @@ -88,14 +88,14 @@ Collation::decThreeBytePrimaryByOneStep(uint32_t basePrimary, UBool isCompressib // Extract the third byte, minus the minimum byte value, // minus the step, modulo the number of usable byte values, plus the minimum. U_ASSERT(0 < step && step <= 0x7f); - int32_t byte3 = ((int32_t)(basePrimary >> 8) & 0xff) - step; + int32_t byte3 = (static_cast<int32_t>(basePrimary >> 8) & 0xff) - step; if(byte3 >= 2) { - return (basePrimary & 0xffff0000) | ((uint32_t)byte3 << 8); + return (basePrimary & 0xffff0000) | (static_cast<uint32_t>(byte3) << 8); } byte3 += 254; // Same with the second byte, // but reserve the PRIMARY_COMPRESSION_LOW_BYTE and high byte if necessary. - int32_t byte2 = ((int32_t)(basePrimary >> 16) & 0xff) - 1; + int32_t byte2 = (static_cast<int32_t>(basePrimary >> 16) & 0xff) - 1; if(isCompressible) { if(byte2 < 4) { byte2 = 0xfe; @@ -108,13 +108,13 @@ Collation::decThreeBytePrimaryByOneStep(uint32_t basePrimary, UBool isCompressib } } // First byte, assume no further underflow. - return (basePrimary & 0xff000000) | ((uint32_t)byte2 << 16) | ((uint32_t)byte3 << 8); + return (basePrimary & 0xff000000) | (static_cast<uint32_t>(byte2) << 16) | (static_cast<uint32_t>(byte3) << 8); } uint32_t Collation::getThreeBytePrimaryForOffsetData(UChar32 c, int64_t dataCE) { - uint32_t p = (uint32_t)(dataCE >> 32); // three-byte primary pppppp00 - int32_t lower32 = (int32_t)dataCE; // base code point b & step s: bbbbbbss (bit 7: isCompressible) + uint32_t p = static_cast<uint32_t>(dataCE >> 32); // three-byte primary pppppp00 + int32_t lower32 = static_cast<int32_t>(dataCE); // base code point b & step s: bbbbbbss (bit 7: isCompressible) int32_t offset = (c - (lower32 >> 8)) * (lower32 & 0x7f); // delta * increment UBool isCompressible = (lower32 & 0x80) != 0; return Collation::incThreeBytePrimaryByOffset(p, isCompressible, offset); diff --git a/deps/icu-small/source/i18n/collation.h b/deps/icu-small/source/i18n/collation.h index 2062ef29467341..5dcc0e19999e94 100644 --- a/deps/icu-small/source/i18n/collation.h +++ b/deps/icu-small/source/i18n/collation.h @@ -317,7 +317,7 @@ class U_I18N_API Collation { return ce32 & 0xffffff00; } static inline int64_t ceFromLongPrimaryCE32(uint32_t ce32) { - return ((int64_t)(ce32 & 0xffffff00) << 32) | COMMON_SEC_AND_TER_CE; + return (static_cast<int64_t>(ce32 & 0xffffff00) << 32) | COMMON_SEC_AND_TER_CE; } static uint32_t makeLongSecondaryCE32(uint32_t lower32) { @@ -341,7 +341,7 @@ class U_I18N_API Collation { } static inline int32_t tagFromCE32(uint32_t ce32) { - return (int32_t)(ce32 & 0xf); + return static_cast<int32_t>(ce32 & 0xf); } static inline UBool hasCE32Tag(uint32_t ce32, int32_t tag) { @@ -387,7 +387,7 @@ class U_I18N_API Collation { * @see LATIN_EXPANSION_TAG */ static inline int64_t latinCE0FromCE32(uint32_t ce32) { - return ((int64_t)(ce32 & 0xff000000) << 32) | COMMON_SECONDARY_CE | ((ce32 & 0xff0000) >> 8); + return (static_cast<int64_t>(ce32 & 0xff000000) << 32) | COMMON_SECONDARY_CE | ((ce32 & 0xff0000) >> 8); } /** @@ -402,7 +402,7 @@ class U_I18N_API Collation { * Returns the data index from a special CE32. */ static inline int32_t indexFromCE32(uint32_t ce32) { - return (int32_t)(ce32 >> 13); + return static_cast<int32_t>(ce32 >> 13); } /** @@ -416,14 +416,14 @@ class U_I18N_API Collation { * Returns the digit value from a DIGIT_TAG ce32. */ static inline char digitFromCE32(uint32_t ce32) { - return (char)((ce32 >> 8) & 0xf); + return static_cast<char>((ce32 >> 8) & 0xf); } /** Returns a 64-bit CE from a simple CE32 (not special). */ static inline int64_t ceFromSimpleCE32(uint32_t ce32) { // normal form ppppsstt -> pppp0000ss00tt00 // assert (ce32 & 0xff) < SPECIAL_CE32_LOW_BYTE - return ((int64_t)(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | ((ce32 & 0xff) << 8); + return (static_cast<int64_t>(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | ((ce32 & 0xff) << 8); } /** Returns a 64-bit CE from a simple/long-primary/long-secondary CE32. */ @@ -431,12 +431,12 @@ class U_I18N_API Collation { uint32_t tertiary = ce32 & 0xff; if(tertiary < SPECIAL_CE32_LOW_BYTE) { // normal form ppppsstt -> pppp0000ss00tt00 - return ((int64_t)(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | (tertiary << 8); + return (static_cast<int64_t>(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | (tertiary << 8); } else { ce32 -= tertiary; if((tertiary & 0xf) == LONG_PRIMARY_TAG) { // long-primary form ppppppC1 -> pppppp00050000500 - return ((int64_t)ce32 << 32) | COMMON_SEC_AND_TER_CE; + return (static_cast<int64_t>(ce32) << 32) | COMMON_SEC_AND_TER_CE; } else { // long-secondary form ssssttC2 -> 00000000sssstt00 // assert (tertiary & 0xf) == LONG_SECONDARY_TAG @@ -447,14 +447,14 @@ class U_I18N_API Collation { /** Creates a CE from a primary weight. */ static inline int64_t makeCE(uint32_t p) { - return ((int64_t)p << 32) | COMMON_SEC_AND_TER_CE; + return (static_cast<int64_t>(p) << 32) | COMMON_SEC_AND_TER_CE; } /** * Creates a CE from a primary weight, * 16-bit secondary/tertiary weights, and a 2-bit quaternary. */ static inline int64_t makeCE(uint32_t p, uint32_t s, uint32_t t, uint32_t q) { - return ((int64_t)p << 32) | (s << 16) | t | (q << 6); + return (static_cast<int64_t>(p) << 32) | (s << 16) | t | (q << 6); } /** diff --git a/deps/icu-small/source/i18n/collationbuilder.cpp b/deps/icu-small/source/i18n/collationbuilder.cpp index b243992cc58b23..0f7043340be315 100644 --- a/deps/icu-small/source/i18n/collationbuilder.cpp +++ b/deps/icu-small/source/i18n/collationbuilder.cpp @@ -182,7 +182,7 @@ RuleBasedCollator::internalBuildTailoring(const UnicodeString &rules, // Set attributes after building the collator, // to keep the default settings consistent with the rule string. if(strength != UCOL_DEFAULT) { - setAttribute(UCOL_STRENGTH, (UColAttributeValue)strength, errorCode); + setAttribute(UCOL_STRENGTH, static_cast<UColAttributeValue>(strength), errorCode); } if(decompositionMode != UCOL_DEFAULT) { setAttribute(UCOL_NORMALIZATION_MODE, decompositionMode, errorCode); @@ -601,7 +601,7 @@ CollationBuilder::getSpecialResetPosition(const UnicodeString &str, ce = tempCEFromIndexAndStrength(index, strength); } else { U_ASSERT(strength == UCOL_PRIMARY); - uint32_t p = (uint32_t)(ce >> 32); + uint32_t p = static_cast<uint32_t>(ce >> 32); int32_t pIndex = rootElements.findPrimary(p); UBool isCompressible = baseData->isCompressiblePrimary(p); p = rootElements.getPrimaryAfter(p, pIndex, isCompressible); @@ -700,7 +700,7 @@ CollationBuilder::addRelation(int32_t strength, const UnicodeString &prefix, int32_t index = findOrInsertNodeForCEs(strength, parserErrorReason, errorCode); U_ASSERT(cesLength > 0); int64_t ce = ces[cesLength - 1]; - if(strength == UCOL_PRIMARY && !isTempCE(ce) && (uint32_t)(ce >> 32) == 0) { + if (strength == UCOL_PRIMARY && !isTempCE(ce) && static_cast<uint32_t>(ce >> 32) == 0) { // There is no primary gap between ignorables and the space-first-primary. errorCode = U_UNSUPPORTED_ERROR; parserErrorReason = "tailoring primary after ignorables not supported"; @@ -791,7 +791,7 @@ CollationBuilder::findOrInsertNodeForCEs(int32_t strength, const char *&parserEr } // root CE - if((uint8_t)(ce >> 56) == Collation::UNASSIGNED_IMPLICIT_BYTE) { + if (static_cast<uint8_t>(ce >> 56) == Collation::UNASSIGNED_IMPLICIT_BYTE) { errorCode = U_UNSUPPORTED_ERROR; parserErrorReason = "tailoring relative to an unassigned code point not supported"; return 0; @@ -808,9 +808,9 @@ CollationBuilder::findOrInsertNodeForRootCE(int64_t ce, int32_t strength, UError // down to the requested level/strength. // Root CEs must have common=zero quaternary weights (for which we never insert any nodes). U_ASSERT((ce & 0xc0) == 0); - int32_t index = findOrInsertNodeForPrimary((uint32_t)(ce >> 32), errorCode); + int32_t index = findOrInsertNodeForPrimary(static_cast<uint32_t>(ce >> 32), errorCode); if(strength >= UCOL_SECONDARY) { - uint32_t lower32 = (uint32_t)ce; + uint32_t lower32 = static_cast<uint32_t>(ce); index = findOrInsertWeakNode(index, lower32 >> 16, UCOL_SECONDARY, errorCode); if(strength >= UCOL_TERTIARY) { index = findOrInsertWeakNode(index, lower32 & Collation::ONLY_TERTIARY_MASK, @@ -838,7 +838,7 @@ binarySearchForRootPrimaryNode(const int32_t *rootPrimaryIndexes, int32_t length for (;;) { int32_t i = (start + limit) / 2; int64_t node = nodes[rootPrimaryIndexes[i]]; - uint32_t nodePrimary = (uint32_t)(node >> 32); // weight32FromNode(node) + uint32_t nodePrimary = static_cast<uint32_t>(node >> 32); // weight32FromNode(node) if (p == nodePrimary) { return i; } else if (p < nodePrimary) { @@ -898,7 +898,7 @@ CollationBuilder::findOrInsertWeakNode(int32_t index, uint32_t weight16, int32_t // Move the HAS_BEFORE3 flag from the parent node // to the new secondary common node. commonNode |= node & HAS_BEFORE3; - node &= ~(int64_t)HAS_BEFORE3; + node &= ~static_cast<int64_t>(HAS_BEFORE3); } nodes.setElementAt(node | hasThisLevelBefore, index); // Insert below-common-weight node. @@ -1045,10 +1045,10 @@ CollationBuilder::setCaseBits(const UnicodeString &nfdString, int64_t ce = baseCEs.getCE(i); if((ce >> 32) != 0) { ++numBasePrimaries; - uint32_t c = ((uint32_t)ce >> 14) & 3; + uint32_t c = (static_cast<uint32_t>(ce) >> 14) & 3; U_ASSERT(c == 0 || c == 2); // lowercase or uppercase, no mixed case in any base CE if(numBasePrimaries < numTailoredPrimaries) { - cases |= (int64_t)c << ((numBasePrimaries - 1) * 2); + cases |= static_cast<int64_t>(c) << ((numBasePrimaries - 1) * 2); } else if(numBasePrimaries == numTailoredPrimaries) { lastCase = c; } else if(c != lastCase) { @@ -1061,7 +1061,7 @@ CollationBuilder::setCaseBits(const UnicodeString &nfdString, } } if(numBasePrimaries >= numTailoredPrimaries) { - cases |= (int64_t)lastCase << ((numTailoredPrimaries - 1) * 2); + cases |= static_cast<int64_t>(lastCase) << ((numTailoredPrimaries - 1) * 2); } } @@ -1138,12 +1138,12 @@ CollationBuilder::addOnlyClosure(const UnicodeString &nfdPrefix, const UnicodeSt for(;;) { UnicodeString str = stringIter.next(); if(str.isBogus()) { break; } - if(ignoreString(str, errorCode) || str == nfdString) { continue; } if (loop++ > kClosureLoopLimit) { // To avoid hang as in ICU-22517, return with error. errorCode = U_INPUT_TOO_LONG_ERROR; return ce32; } + if(ignoreString(str, errorCode) || str == nfdString) { continue; } ce32 = addIfDifferent(prefix, str, newCEs, newCEsLength, ce32, errorCode); if(U_FAILURE(errorCode)) { return ce32; } } @@ -1159,12 +1159,12 @@ CollationBuilder::addOnlyClosure(const UnicodeString &nfdPrefix, const UnicodeSt for(;;) { UnicodeString str = stringIter.next(); if(str.isBogus()) { break; } - if(ignoreString(str, errorCode) || (samePrefix && str == nfdString)) { continue; } if (loop++ > kClosureLoopLimit) { // To avoid hang as in ICU-22517, return with error. errorCode = U_INPUT_TOO_LONG_ERROR; return ce32; } + if(ignoreString(str, errorCode) || (samePrefix && str == nfdString)) { continue; } ce32 = addIfDifferent(prefix, str, newCEs, newCEsLength, ce32, errorCode); if(U_FAILURE(errorCode)) { return ce32; } } @@ -1652,7 +1652,7 @@ CollationBuilder::ceStrength(int64_t ce) { return isTempCE(ce) ? strengthFromTempCE(ce) : (ce & INT64_C(0xff00000000000000)) != 0 ? UCOL_PRIMARY : - ((uint32_t)ce & 0xff000000) != 0 ? UCOL_SECONDARY : + (static_cast<uint32_t>(ce) & 0xff000000) != 0 ? UCOL_SECONDARY : ce != 0 ? UCOL_TERTIARY : UCOL_IDENTICAL; } @@ -1675,7 +1675,7 @@ ucol_openRules(const char16_t *rules, int32_t rulesLength, *pErrorCode = U_MEMORY_ALLOCATION_ERROR; return nullptr; } - UnicodeString r((UBool)(rulesLength < 0), rules, rulesLength); + UnicodeString r(rulesLength < 0, rules, rulesLength); coll->internalBuildTailoring(r, strength, normalizationMode, parseError, nullptr, *pErrorCode); if(U_FAILURE(*pErrorCode)) { delete coll; diff --git a/deps/icu-small/source/i18n/collationbuilder.h b/deps/icu-small/source/i18n/collationbuilder.h index 22e24ddb813aa2..091d2c817815e1 100644 --- a/deps/icu-small/source/i18n/collationbuilder.h +++ b/deps/icu-small/source/i18n/collationbuilder.h @@ -185,9 +185,9 @@ class U_I18N_API CollationBuilder : public CollationRuleParser::Sink { // CE byte offsets, to ensure valid CE bytes, and case bits 11 INT64_C(0x4040000006002000) + // index bits 19..13 -> primary byte 1 = CE bits 63..56 (byte values 40..BF) - ((int64_t)(index & 0xfe000) << 43) + + (static_cast<int64_t>(index & 0xfe000) << 43) + // index bits 12..6 -> primary byte 2 = CE bits 55..48 (byte values 40..BF) - ((int64_t)(index & 0x1fc0) << 42) + + (static_cast<int64_t>(index & 0x1fc0) << 42) + // index bits 5..0 -> secondary byte 1 = CE bits 31..24 (byte values 06..45) ((index & 0x3f) << 24) + // strength bits 1..0 -> tertiary byte 1 = CE bits 13..8 (byte values 20..23) @@ -196,24 +196,24 @@ class U_I18N_API CollationBuilder : public CollationRuleParser::Sink { static inline int32_t indexFromTempCE(int64_t tempCE) { tempCE -= INT64_C(0x4040000006002000); return - ((int32_t)(tempCE >> 43) & 0xfe000) | - ((int32_t)(tempCE >> 42) & 0x1fc0) | - ((int32_t)(tempCE >> 24) & 0x3f); + (static_cast<int32_t>(tempCE >> 43) & 0xfe000) | + (static_cast<int32_t>(tempCE >> 42) & 0x1fc0) | + (static_cast<int32_t>(tempCE >> 24) & 0x3f); } static inline int32_t strengthFromTempCE(int64_t tempCE) { - return ((int32_t)tempCE >> 8) & 3; + return (static_cast<int32_t>(tempCE) >> 8) & 3; } static inline UBool isTempCE(int64_t ce) { - uint32_t sec = (uint32_t)ce >> 24; + uint32_t sec = static_cast<uint32_t>(ce) >> 24; return 6 <= sec && sec <= 0x45; } static inline int32_t indexFromTempCE32(uint32_t tempCE32) { tempCE32 -= 0x40400620; return - ((int32_t)(tempCE32 >> 11) & 0xfe000) | - ((int32_t)(tempCE32 >> 10) & 0x1fc0) | - ((int32_t)(tempCE32 >> 8) & 0x3f); + (static_cast<int32_t>(tempCE32 >> 11) & 0xfe000) | + (static_cast<int32_t>(tempCE32 >> 10) & 0x1fc0) | + (static_cast<int32_t>(tempCE32 >> 8) & 0x3f); } static inline UBool isTempCE32(uint32_t ce32) { return @@ -242,13 +242,13 @@ class U_I18N_API CollationBuilder : public CollationRuleParser::Sink { static const int32_t IS_TAILORED = 8; static inline int64_t nodeFromWeight32(uint32_t weight32) { - return (int64_t)weight32 << 32; + return static_cast<int64_t>(weight32) << 32; } static inline int64_t nodeFromWeight16(uint32_t weight16) { - return (int64_t)weight16 << 48; + return static_cast<int64_t>(weight16) << 48; } static inline int64_t nodeFromPreviousIndex(int32_t previous) { - return (int64_t)previous << 28; + return static_cast<int64_t>(previous) << 28; } static inline int64_t nodeFromNextIndex(int32_t next) { return next << 8; @@ -258,19 +258,19 @@ class U_I18N_API CollationBuilder : public CollationRuleParser::Sink { } static inline uint32_t weight32FromNode(int64_t node) { - return (uint32_t)(node >> 32); + return static_cast<uint32_t>(node >> 32); } static inline uint32_t weight16FromNode(int64_t node) { - return (uint32_t)(node >> 48) & 0xffff; + return static_cast<uint32_t>(node >> 48) & 0xffff; } static inline int32_t previousIndexFromNode(int64_t node) { - return (int32_t)(node >> 28) & MAX_INDEX; + return static_cast<int32_t>(node >> 28) & MAX_INDEX; } static inline int32_t nextIndexFromNode(int64_t node) { - return ((int32_t)node >> 8) & MAX_INDEX; + return (static_cast<int32_t>(node) >> 8) & MAX_INDEX; } static inline int32_t strengthFromNode(int64_t node) { - return (int32_t)node & 3; + return static_cast<int32_t>(node) & 3; } static inline UBool nodeHasBefore2(int64_t node) { diff --git a/deps/icu-small/source/i18n/collationcompare.cpp b/deps/icu-small/source/i18n/collationcompare.cpp index d9048afc279699..b4c0a3b2382993 100644 --- a/deps/icu-small/source/i18n/collationcompare.cpp +++ b/deps/icu-small/source/i18n/collationcompare.cpp @@ -47,7 +47,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat uint32_t leftPrimary; do { int64_t ce = left.nextCE(errorCode); - leftPrimary = (uint32_t)(ce >> 32); + leftPrimary = static_cast<uint32_t>(ce >> 32); if(leftPrimary < variableTop && leftPrimary > Collation::MERGE_SEPARATOR_PRIMARY) { // Variable CE, shift it to quaternary level. // Ignore all following primary ignorables, and shift further variable CEs. @@ -57,7 +57,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat left.setCurrentCE(ce & INT64_C(0xffffffff00000000)); for(;;) { ce = left.nextCE(errorCode); - leftPrimary = (uint32_t)(ce >> 32); + leftPrimary = static_cast<uint32_t>(ce >> 32); if(leftPrimary == 0) { left.setCurrentCE(0); } else { @@ -72,7 +72,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat uint32_t rightPrimary; do { int64_t ce = right.nextCE(errorCode); - rightPrimary = (uint32_t)(ce >> 32); + rightPrimary = static_cast<uint32_t>(ce >> 32); if(rightPrimary < variableTop && rightPrimary > Collation::MERGE_SEPARATOR_PRIMARY) { // Variable CE, shift it to quaternary level. // Ignore all following primary ignorables, and shift further variable CEs. @@ -82,7 +82,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat right.setCurrentCE(ce & INT64_C(0xffffffff00000000)); for(;;) { ce = right.nextCE(errorCode); - rightPrimary = (uint32_t)(ce >> 32); + rightPrimary = static_cast<uint32_t>(ce >> 32); if(rightPrimary == 0) { right.setCurrentCE(0); } else { @@ -116,12 +116,12 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat for(;;) { uint32_t leftSecondary; do { - leftSecondary = ((uint32_t)left.getCE(leftIndex++)) >> 16; + leftSecondary = static_cast<uint32_t>(left.getCE(leftIndex++)) >> 16; } while(leftSecondary == 0); uint32_t rightSecondary; do { - rightSecondary = ((uint32_t)right.getCE(rightIndex++)) >> 16; + rightSecondary = static_cast<uint32_t>(right.getCE(rightIndex++)) >> 16; } while(rightSecondary == 0); if(leftSecondary != rightSecondary) { @@ -138,13 +138,13 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat // Find the merge separator or the NO_CE terminator. uint32_t p; int32_t leftLimit = leftStart; - while((p = (uint32_t)(left.getCE(leftLimit) >> 32)) > + while ((p = static_cast<uint32_t>(left.getCE(leftLimit) >> 32)) > Collation::MERGE_SEPARATOR_PRIMARY || p == 0) { ++leftLimit; } int32_t rightLimit = rightStart; - while((p = (uint32_t)(right.getCE(rightLimit) >> 32)) > + while ((p = static_cast<uint32_t>(right.getCE(rightLimit) >> 32)) > Collation::MERGE_SEPARATOR_PRIMARY || p == 0) { ++rightLimit; @@ -156,12 +156,12 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat for(;;) { int32_t leftSecondary = 0; while(leftSecondary == 0 && leftIndex > leftStart) { - leftSecondary = ((uint32_t)left.getCE(--leftIndex)) >> 16; + leftSecondary = static_cast<uint32_t>(left.getCE(--leftIndex)) >> 16; } int32_t rightSecondary = 0; while(rightSecondary == 0 && rightIndex > rightStart) { - rightSecondary = ((uint32_t)right.getCE(--rightIndex)) >> 16; + rightSecondary = static_cast<uint32_t>(right.getCE(--rightIndex)) >> 16; } if(leftSecondary != rightSecondary) { @@ -197,15 +197,15 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat int64_t ce; do { ce = left.getCE(leftIndex++); - leftCase = (uint32_t)ce; - } while((uint32_t)(ce >> 32) == 0 || leftCase == 0); + leftCase = static_cast<uint32_t>(ce); + } while (static_cast<uint32_t>(ce >> 32) == 0 || leftCase == 0); leftLower32 = leftCase; leftCase &= 0xc000; do { ce = right.getCE(rightIndex++); - rightCase = (uint32_t)ce; - } while((uint32_t)(ce >> 32) == 0 || rightCase == 0); + rightCase = static_cast<uint32_t>(ce); + } while (static_cast<uint32_t>(ce >> 32) == 0 || rightCase == 0); rightCase &= 0xc000; } else { // Secondary+caseLevel: By analogy with the above, @@ -223,13 +223,13 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat // turning 0.0.ut into 0.0.0.t. // (See LDML Collation, Case Parameters.) do { - leftCase = (uint32_t)left.getCE(leftIndex++); + leftCase = static_cast<uint32_t>(left.getCE(leftIndex++)); } while(leftCase <= 0xffff); leftLower32 = leftCase; leftCase &= 0xc000; do { - rightCase = (uint32_t)right.getCE(rightIndex++); + rightCase = static_cast<uint32_t>(right.getCE(rightIndex++)); } while(rightCase <= 0xffff); rightCase &= 0xc000; } @@ -257,7 +257,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat for(;;) { uint32_t leftLower32, leftTertiary; do { - leftLower32 = (uint32_t)left.getCE(leftIndex++); + leftLower32 = static_cast<uint32_t>(left.getCE(leftIndex++)); anyQuaternaries |= leftLower32; U_ASSERT((leftLower32 & Collation::ONLY_TERTIARY_MASK) != 0 || (leftLower32 & 0xc0c0) == 0); @@ -266,7 +266,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat uint32_t rightLower32, rightTertiary; do { - rightLower32 = (uint32_t)right.getCE(rightIndex++); + rightLower32 = static_cast<uint32_t>(right.getCE(rightIndex++)); anyQuaternaries |= rightLower32; U_ASSERT((rightLower32 & Collation::ONLY_TERTIARY_MASK) != 0 || (rightLower32 & 0xc0c0) == 0); @@ -313,10 +313,10 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat uint32_t leftQuaternary; do { int64_t ce = left.getCE(leftIndex++); - leftQuaternary = (uint32_t)ce & 0xffff; + leftQuaternary = static_cast<uint32_t>(ce) & 0xffff; if(leftQuaternary <= Collation::NO_CE_WEIGHT16) { // Variable primary or completely ignorable or NO_CE. - leftQuaternary = (uint32_t)(ce >> 32); + leftQuaternary = static_cast<uint32_t>(ce >> 32); } else { // Regular CE, not tertiary ignorable. // Preserve the quaternary weight in bits 7..6. @@ -327,10 +327,10 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat uint32_t rightQuaternary; do { int64_t ce = right.getCE(rightIndex++); - rightQuaternary = (uint32_t)ce & 0xffff; + rightQuaternary = static_cast<uint32_t>(ce) & 0xffff; if(rightQuaternary <= Collation::NO_CE_WEIGHT16) { // Variable primary or completely ignorable or NO_CE. - rightQuaternary = (uint32_t)(ce >> 32); + rightQuaternary = static_cast<uint32_t>(ce >> 32); } else { // Regular CE, not tertiary ignorable. // Preserve the quaternary weight in bits 7..6. diff --git a/deps/icu-small/source/i18n/collationdata.cpp b/deps/icu-small/source/i18n/collationdata.cpp index 1b8b6a76de39cc..8d31711aa9a86a 100644 --- a/deps/icu-small/source/i18n/collationdata.cpp +++ b/deps/icu-small/source/i18n/collationdata.cpp @@ -118,7 +118,7 @@ CollationData::getSingleCE(UChar32 c, UErrorCode &errorCode) const { uint32_t CollationData::getFirstPrimaryForGroup(int32_t script) const { int32_t index = getScriptIndex(script); - return index == 0 ? 0 : (uint32_t)scriptStarts[index] << 16; + return index == 0 ? 0 : static_cast<uint32_t>(scriptStarts[index]) << 16; } uint32_t @@ -251,14 +251,14 @@ CollationData::makeReorderRanges(const int32_t *reorder, int32_t length, for(int32_t i = 0; i < length; ++i) { int32_t reorderCode = reorder[i] - UCOL_REORDER_CODE_FIRST; if(0 <= reorderCode && reorderCode < MAX_NUM_SPECIAL_REORDER_CODES) { - specials |= (uint32_t)1 << reorderCode; + specials |= static_cast<uint32_t>(1) << reorderCode; } } // Start the reordering with the special low reorder codes that do not occur in the input. for(int32_t i = 0; i < MAX_NUM_SPECIAL_REORDER_CODES; ++i) { int32_t index = scriptsIndex[numScripts + i]; - if(index != 0 && (specials & ((uint32_t)1 << i)) == 0) { + if (index != 0 && (specials & (static_cast<uint32_t>(1) << i)) == 0) { lowStart = addLowScriptRange(table, index, lowStart); } } @@ -354,7 +354,7 @@ CollationData::makeReorderRanges(const int32_t *reorder, int32_t length, ++i; } if(offset != 0 || i < scriptStartsLength - 1) { - ranges.addElement(((int32_t)scriptStarts[i] << 16) | (offset & 0xffff), errorCode); + ranges.addElement((static_cast<int32_t>(scriptStarts[i]) << 16) | (offset & 0xffff), errorCode); } if(i == scriptStartsLength - 1) { break; } offset = nextOffset; @@ -367,7 +367,7 @@ CollationData::addLowScriptRange(uint8_t table[], int32_t index, int32_t lowStar if((start & 0xff) < (lowStart & 0xff)) { lowStart += 0x100; } - table[index] = (uint8_t)(lowStart >> 8); + table[index] = static_cast<uint8_t>(lowStart >> 8); int32_t limit = scriptStarts[index + 1]; lowStart = ((lowStart & 0xff00) + ((limit & 0xff00) - (start & 0xff00))) | (limit & 0xff); return lowStart; @@ -381,7 +381,7 @@ CollationData::addHighScriptRange(uint8_t table[], int32_t index, int32_t highLi } int32_t start = scriptStarts[index]; highLimit = ((highLimit & 0xff00) - ((limit & 0xff00) - (start & 0xff00))) | (start & 0xff); - table[index] = (uint8_t)(highLimit >> 8); + table[index] = static_cast<uint8_t>(highLimit >> 8); return highLimit; } diff --git a/deps/icu-small/source/i18n/collationdata.h b/deps/icu-small/source/i18n/collationdata.h index d4f66828fbcb32..783a79d65d3ba9 100644 --- a/deps/icu-small/source/i18n/collationdata.h +++ b/deps/icu-small/source/i18n/collationdata.h @@ -91,7 +91,7 @@ struct U_I18N_API CollationData : public UMemory { * Access to the defaultCE32 for contraction and prefix matching. */ static uint32_t readCE32(const char16_t *p) { - return ((uint32_t)p[0] << 16) | p[1]; + return (static_cast<uint32_t>(p[0]) << 16) | p[1]; } /** diff --git a/deps/icu-small/source/i18n/collationdatabuilder.cpp b/deps/icu-small/source/i18n/collationdatabuilder.cpp index 7c6f1b881e6b1e..44a108086a7b0d 100644 --- a/deps/icu-small/source/i18n/collationdatabuilder.cpp +++ b/deps/icu-small/source/i18n/collationdatabuilder.cpp @@ -381,7 +381,7 @@ CollationDataBuilder::maybeSetPrimaryRange(UChar32 start, UChar32 end, if(2 <= step && step <= 0x7f && (blockDelta >= 3 || (blockDelta > 0 && (start & 0x1f) <= 0x1c && (end & 0x1f) >= 3))) { - int64_t dataCE = ((int64_t)primary << 32) | (start << 8) | step; + int64_t dataCE = (static_cast<int64_t>(primary) << 32) | (start << 8) | step; if(isCompressiblePrimary(primary)) { dataCE |= 0x80; } int32_t index = addCE(dataCE, errorCode); if(U_FAILURE(errorCode)) { return 0; } @@ -526,9 +526,9 @@ int32_t CollationDataBuilder::addCE32(uint32_t ce32, UErrorCode &errorCode) { int32_t length = ce32s.size(); for(int32_t i = 0; i < length; ++i) { - if(ce32 == (uint32_t)ce32s.elementAti(i)) { return i; } + if (ce32 == static_cast<uint32_t>(ce32s.elementAti(i))) { return i; } } - ce32s.addElement((int32_t)ce32, errorCode); + ce32s.addElement(static_cast<int32_t>(ce32), errorCode); return length; } @@ -586,27 +586,19 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString & if (s != sInNfd) { // s is not in NFD, so it cannot match in ICU4X, since ICU4X only // does NFD lookups. - // Now check that we're only rejecting known cases. - if (s.length() == 2) { - char16_t second = s.charAt(1); - if (second == 0x0F73 || second == 0x0F75 || second == 0x0F81) { - // Second is a special decomposing Tibetan vowel sign. - // These also get added in the decomposed form, so ignoring - // this instance is OK. - return; - } - if (c == 0xFDD1 && second == 0xAC00) { - // This strange contraction exists in the root and - // doesn't have a decomposed counterpart there. - // This won't match in ICU4X anyway and is very strange: - // Unassigned Arabic presentation form contracting with - // the very first Hangul syllable. Let's ignore this - // explicitly. - return; - } - } - // Unknown case worth investigating if ever found. - errorCode = U_UNSUPPORTED_ERROR; + + // As of Unicode 16 alpha, the cases that come here are: + // + // 1. The second character is a special decomposing Tibetan vowel + // sign. These are OK to ignore in the precomposed form, since + // the decomposed form is added also. + // 2. Likewise for KIRAT RAI VOWEL SIGN AA followed by KIRAT RAI VOWEL SIGN AI + // and other such cases. + // For details see the normalization section of + // https://www.unicode.org/review/pri497/pri497-background.html + // 3. U+FDD1 followed by U+AC00 is a marker for the alphabetical + // index feature of ICU4C, which at this time does not have + // a counterpart in ICU4X. return; } @@ -692,7 +684,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString & if(!isBuilderContextCE32(oldCE32)) { // Replace the simple oldCE32 with a builder context CE32 // pointing to a new ConditionalCE32 list head. - int32_t index = addConditionalCE32(UnicodeString((char16_t)0), oldCE32, errorCode); + int32_t index = addConditionalCE32(UnicodeString(static_cast<char16_t>(0)), oldCE32, errorCode); if(U_FAILURE(errorCode)) { return; } uint32_t contextCE32 = makeBuilderContextCE32(index); utrie2_set32(trie, c, contextCE32, &errorCode); @@ -703,7 +695,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString & cond->builtCE32 = Collation::NO_CE32; } UnicodeString suffix(s, cLength); - UnicodeString context((char16_t)prefix.length()); + UnicodeString context(static_cast<char16_t>(prefix.length())); context.append(prefix).append(suffix); unsafeBackwardSet.addAll(suffix); for(;;) { @@ -738,9 +730,9 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString & uint32_t CollationDataBuilder::encodeOneCEAsCE32(int64_t ce) { - uint32_t p = (uint32_t)(ce >> 32); - uint32_t lower32 = (uint32_t)ce; - uint32_t t = (uint32_t)(ce & 0xffff); + uint32_t p = static_cast<uint32_t>(ce >> 32); + uint32_t lower32 = static_cast<uint32_t>(ce); + uint32_t t = static_cast<uint32_t>(ce & 0xffff); U_ASSERT((t & 0xc000) != 0xc000); // Impossible case bits 11 mark special CE32s. if((ce & INT64_C(0xffff00ff00ff)) == 0) { // normal form ppppsstt @@ -794,15 +786,15 @@ CollationDataBuilder::encodeCEs(const int64_t ces[], int32_t cesLength, // on checking this tag when using the data. int64_t ce0 = ces[0]; int64_t ce1 = ces[1]; - uint32_t p0 = (uint32_t)(ce0 >> 32); + uint32_t p0 = static_cast<uint32_t>(ce0 >> 32); if((ce0 & INT64_C(0xffffffffff00ff)) == Collation::COMMON_SECONDARY_CE && (ce1 & INT64_C(0xffffffff00ffffff)) == Collation::COMMON_TERTIARY_CE && p0 != 0) { // Latin mini expansion return p0 | - (((uint32_t)ce0 & 0xff00u) << 8) | - (uint32_t)(ce1 >> 16) | + ((static_cast<uint32_t>(ce0) & 0xff00u) << 8) | + static_cast<uint32_t>(ce1 >> 16) | Collation::SPECIAL_CE32_LOW_BYTE | Collation::LATIN_EXPANSION_TAG; } @@ -815,7 +807,7 @@ CollationDataBuilder::encodeCEs(const int64_t ces[], int32_t cesLength, } uint32_t ce32 = encodeOneCEAsCE32(ces[i]); if(ce32 == Collation::NO_CE32) { break; } - newCE32s[i] = (int32_t)ce32; + newCE32s[i] = static_cast<int32_t>(ce32); } return encodeExpansion(ces, cesLength, errorCode); } @@ -920,7 +912,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte return copyFromBaseCE32(c, ce32, false, errorCode); } ConditionalCE32 head; - UnicodeString context((char16_t)0); + UnicodeString context(static_cast<char16_t>(0)); int32_t index; if(Collation::isContractionCE32(ce32)) { index = copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode); @@ -934,8 +926,8 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte while(prefixes.next(errorCode)) { context = prefixes.getString(); context.reverse(); - context.insert(0, (char16_t)context.length()); - ce32 = (uint32_t)prefixes.getValue(); + context.insert(0, static_cast<char16_t>(context.length())); + ce32 = static_cast<uint32_t>(prefixes.getValue()); if(Collation::isContractionCE32(ce32)) { index = copyContractionsFromBaseCE32(context, c, ce32, cond, errorCode); } else { @@ -956,7 +948,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte return copyFromBaseCE32(c, ce32, false, errorCode); } ConditionalCE32 head; - UnicodeString context((char16_t)0); + UnicodeString context(static_cast<char16_t>(0)); copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode); ce32 = makeBuilderContextCE32(head.next); contextChars.add(c); @@ -1002,7 +994,7 @@ CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar UCharsTrie::Iterator suffixes(p + 2, 0, errorCode); while(suffixes.next(errorCode)) { context.append(suffixes.getString()); - ce32 = copyFromBaseCE32(c, (uint32_t)suffixes.getValue(), true, errorCode); + ce32 = copyFromBaseCE32(c, static_cast<uint32_t>(suffixes.getValue()), true, errorCode); cond->next = index = addConditionalCE32(context, ce32, errorCode); if(U_FAILURE(errorCode)) { return 0; } // No need to update the unsafeBackwardSet because the tailoring set @@ -1323,7 +1315,7 @@ CollationDataBuilder::setLeadSurrogates(UErrorCode &errorCode) { utrie2_enumForLeadSurrogate(trie, lead, nullptr, enumRangeLeadValue, &value); utrie2_set32ForLeadSurrogateCodeUnit( trie, lead, - Collation::makeCE32FromTagAndIndex(Collation::LEAD_SURROGATE_TAG, 0) | (uint32_t)value, + Collation::makeCE32FromTagAndIndex(Collation::LEAD_SURROGATE_TAG, 0) | static_cast<uint32_t>(value), &errorCode); } } @@ -1357,7 +1349,7 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode) if(getJamoCE32s(jamoCE32s, errorCode)) { jamoIndex = ce32s.size(); for(int32_t i = 0; i < CollationData::JAMO_CE32S_LENGTH; ++i) { - ce32s.addElement((int32_t)jamoCE32s[i], errorCode); + ce32s.addElement(static_cast<int32_t>(jamoCE32s[i]), errorCode); } // Small optimization: Use a bit in the Hangul ce32 // to indicate that none of the Jamo CE32s are isSpecialCE32() @@ -1401,7 +1393,7 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode) if (!icu4xMode) { // For U+0000, move its normal ce32 into CE32s[0] and set U0000_TAG. - ce32s.setElementAt((int32_t)utrie2_get32(trie, 0), 0); + ce32s.setElementAt(static_cast<int32_t>(utrie2_get32(trie, 0)), 0); utrie2_set32(trie, 0, Collation::makeCE32FromTagAndIndex(Collation::U0000_TAG, 0), &errorCode); } @@ -1572,7 +1564,7 @@ CollationDataBuilder::buildContext(ConditionalCE32 *head, UErrorCode &errorCode) } } } - contractionBuilder.add(suffix, (int32_t)cond->ce32, errorCode); + contractionBuilder.add(suffix, static_cast<int32_t>(cond->ce32), errorCode); if(cond == lastCond) { break; } cond = getConditionalCE32(cond->next); } @@ -1594,7 +1586,7 @@ CollationDataBuilder::buildContext(ConditionalCE32 *head, UErrorCode &errorCode) } else { prefix.remove(0, 1); // Remove the length unit. prefix.reverse(); - prefixBuilder.add(prefix, (int32_t)ce32, errorCode); + prefixBuilder.add(prefix, static_cast<int32_t>(ce32), errorCode); if(cond->next < 0) { break; } } } @@ -1612,7 +1604,7 @@ int32_t CollationDataBuilder::addContextTrie(uint32_t defaultCE32, UCharsTrieBuilder &trieBuilder, UErrorCode &errorCode) { UnicodeString context; - context.append((char16_t)(defaultCE32 >> 16)).append((char16_t)defaultCE32); + context.append(static_cast<char16_t>(defaultCE32 >> 16)).append(static_cast<char16_t>(defaultCE32)); UnicodeString trieString; context.append(trieBuilder.buildUnicodeString(USTRINGTRIE_BUILD_SMALL, trieString, errorCode)); if(U_FAILURE(errorCode)) { return -1; } diff --git a/deps/icu-small/source/i18n/collationdatawriter.cpp b/deps/icu-small/source/i18n/collationdatawriter.cpp index ce78a0526a3b04..fea0116fa4d421 100644 --- a/deps/icu-small/source/i18n/collationdatawriter.cpp +++ b/deps/icu-small/source/i18n/collationdatawriter.cpp @@ -34,7 +34,7 @@ U_NAMESPACE_BEGIN uint8_t * RuleBasedCollator::cloneRuleData(int32_t &length, UErrorCode &errorCode) const { if(U_FAILURE(errorCode)) { return nullptr; } - LocalMemory<uint8_t> buffer((uint8_t *)uprv_malloc(20000)); + LocalMemory<uint8_t> buffer(static_cast<uint8_t*>(uprv_malloc(20000))); if(buffer.isNull()) { errorCode = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -118,7 +118,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion, int32_t fastLatinVersion; if(data.fastLatinTable != nullptr) { - fastLatinVersion = (int32_t)CollationFastLatin::VERSION << 16; + fastLatinVersion = static_cast<int32_t>(CollationFastLatin::VERSION) << 16; } else { fastLatinVersion = 0; } @@ -185,7 +185,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion, header.dataHeader.magic2 = 0x27; uprv_memcpy(&header.info, &dataInfo, sizeof(UDataInfo)); uprv_memcpy(header.info.dataVersion, dataVersion, sizeof(UVersionInfo)); - headerSize = (int32_t)sizeof(header); + headerSize = static_cast<int32_t>(sizeof(header)); U_ASSERT((headerSize & 3) == 0); // multiple of 4 bytes if(hasMappings && data.cesLength != 0) { // Sum of the sizes of the data items which are @@ -199,7 +199,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion, headerSize += 4; } } - header.dataHeader.headerSize = (uint16_t)headerSize; + header.dataHeader.headerSize = static_cast<uint16_t>(headerSize); if(headerSize <= capacity) { uprv_memcpy(dest, &header, sizeof(header)); // Write 00 bytes so that the padding is not mistaken for a copyright string. @@ -302,7 +302,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion, UnicodeString scripts; indexes[CollationDataReader::IX_SCRIPTS_OFFSET] = totalSize; if(isBase) { - scripts.append((char16_t)data.numScripts); + scripts.append(static_cast<char16_t>(data.numScripts)); scripts.append(reinterpret_cast<const char16_t *>(data.scriptsIndex), data.numScripts + 16); scripts.append(reinterpret_cast<const char16_t *>(data.scriptStarts), data.scriptStartsLength); totalSize += scripts.length() * 2; diff --git a/deps/icu-small/source/i18n/collationfastlatin.cpp b/deps/icu-small/source/i18n/collationfastlatin.cpp index f40781a1178f60..e128df49676100 100644 --- a/deps/icu-small/source/i18n/collationfastlatin.cpp +++ b/deps/icu-small/source/i18n/collationfastlatin.cpp @@ -94,7 +94,7 @@ CollationFastLatin::getOptions(const CollationData *data, const CollationSetting } else { p = 0; } - primaries[c] = (uint16_t)p; + primaries[c] = static_cast<uint16_t>(p); } if(digitsAreReordered || (settings.options & CollationSettings::NUMERIC) != 0) { // Bail out for digits. @@ -102,7 +102,7 @@ CollationFastLatin::getOptions(const CollationData *data, const CollationSetting } // Shift the miniVarTop above other options. - return ((int32_t)miniVarTop << 16) | settings.options; + return (static_cast<int32_t>(miniVarTop) << 16) | settings.options; } int32_t @@ -116,7 +116,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie U_ASSERT((table[0] >> 8) == VERSION); table += (table[0] & 0xff); // skip the header - uint32_t variableTop = (uint32_t)options >> 16; // see getOptions() + uint32_t variableTop = static_cast<uint32_t>(options) >> 16; // see getOptions() options &= 0xffff; // needed for CollationSettings::getStrength() to work // Check for supported characters, fetch mini CEs, and compare primaries. @@ -452,7 +452,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries U_ASSERT((table[0] >> 8) == VERSION); table += (table[0] & 0xff); // skip the header - uint32_t variableTop = (uint32_t)options >> 16; // see RuleBasedCollator::getFastLatinOptions() + uint32_t variableTop = static_cast<uint32_t>(options) >> 16; // see RuleBasedCollator::getFastLatinOptions() options &= 0xffff; // needed for CollationSettings::getStrength() to work // Check for supported characters, fetch mini CEs, and compare primaries. @@ -859,7 +859,7 @@ CollationFastLatin::nextPair(const uint16_t *table, UChar32 c, uint32_t ce, return ce; // simple or special mini CE } else if(ce >= EXPANSION) { int32_t index = NUM_FAST_CHARS + (ce & INDEX_MASK); - return ((uint32_t)table[index + 1] << 16) | table[index]; + return (static_cast<uint32_t>(table[index + 1]) << 16) | table[index]; } else /* ce >= CONTRACTION */ { if(c == 0 && sLength < 0) { sLength = sIndex - 1; @@ -938,7 +938,7 @@ CollationFastLatin::nextPair(const uint16_t *table, UChar32 c, uint32_t ce, if(length == 2) { return ce; } else { - return ((uint32_t)table[index + 2] << 16) | ce; + return (static_cast<uint32_t>(table[index + 2]) << 16) | ce; } } } diff --git a/deps/icu-small/source/i18n/collationfastlatinbuilder.cpp b/deps/icu-small/source/i18n/collationfastlatinbuilder.cpp index b1fd3af70aaafd..dbfdd97497971f 100644 --- a/deps/icu-small/source/i18n/collationfastlatinbuilder.cpp +++ b/deps/icu-small/source/i18n/collationfastlatinbuilder.cpp @@ -45,9 +45,9 @@ namespace { */ int32_t compareInt64AsUnsigned(int64_t a, int64_t b) { - if((uint64_t)a < (uint64_t)b) { + if (static_cast<uint64_t>(a) < static_cast<uint64_t>(b)) { return -1; - } else if((uint64_t)a > (uint64_t)b) { + } else if (static_cast<uint64_t>(a) > static_cast<uint64_t>(b)) { return 1; } else { return 0; @@ -140,7 +140,7 @@ CollationFastLatinBuilder::loadGroups(const CollationData &data, UErrorCode &err if(U_FAILURE(errorCode)) { return false; } headerLength = 1 + NUM_SPECIAL_GROUPS; uint32_t r0 = (CollationFastLatin::VERSION << 8) | headerLength; - result.append((char16_t)r0); + result.append(static_cast<char16_t>(r0)); // The first few reordering groups should be special groups // (space, punct, ..., digit) followed by Latn, then Grek and other scripts. for(int32_t i = 0; i < NUM_SPECIAL_GROUPS; ++i) { @@ -149,7 +149,7 @@ CollationFastLatinBuilder::loadGroups(const CollationData &data, UErrorCode &err // missing data return false; } - result.append((char16_t)0); // reserve a slot for this group + result.append(static_cast<char16_t>(0)); // reserve a slot for this group } firstDigitPrimary = data.getFirstPrimaryForGroup(UCOL_REORDER_CODE_DIGIT); @@ -234,7 +234,7 @@ CollationFastLatinBuilder::getCEs(const CollationData &data, UErrorCode &errorCo // Write a contraction list with only a default value if there is no real contraction. U_ASSERT(contractionCEs.isEmpty()); addContractionEntry(CollationFastLatin::CONTR_CHAR_MASK, ce0, ce1, errorCode); - charCEs[0][0] = ((int64_t)Collation::NO_CE_PRIMARY << 32) | CONTRACTION_FLAG; + charCEs[0][0] = (static_cast<int64_t>(Collation::NO_CE_PRIMARY) << 32) | CONTRACTION_FLAG; charCEs[0][1] = 0; } } @@ -301,12 +301,12 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c, // A mapping can be completely ignorable. if(ce0 == 0) { return ce1 == 0; } // We do not support an ignorable ce0 unless it is completely ignorable. - uint32_t p0 = (uint32_t)(ce0 >> 32); + uint32_t p0 = static_cast<uint32_t>(ce0 >> 32); if(p0 == 0) { return false; } // We only support primaries up to the Latin script. if(p0 > lastLatinPrimary) { return false; } // We support non-common secondary and case weights only together with short primaries. - uint32_t lower32_0 = (uint32_t)ce0; + uint32_t lower32_0 = static_cast<uint32_t>(ce0); if(p0 < firstShortPrimary) { uint32_t sc0 = lower32_0 & Collation::SECONDARY_AND_CASE_MASK; if(sc0 != Collation::COMMON_SECONDARY_CE) { return false; } @@ -319,9 +319,9 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c, // or a short-primary CE is followed by a secondary CE. // This is so that we can test the first primary and use the same mask for both, // and determine for both whether they are variable. - uint32_t p1 = (uint32_t)(ce1 >> 32); + uint32_t p1 = static_cast<uint32_t>(ce1 >> 32); if(p1 == 0 ? p0 < firstShortPrimary : !inSameGroup(p0, p1)) { return false; } - uint32_t lower32_1 = (uint32_t)ce1; + uint32_t lower32_1 = static_cast<uint32_t>(ce1); // No tertiary CEs. if((lower32_1 >> 16) == 0) { return false; } // We support non-common secondary and case weights @@ -374,7 +374,7 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data, if(addContraction) { addContractionEntry(prevX, ce0, ce1, errorCode); } - ce32 = (uint32_t)suffixes.getValue(); + ce32 = static_cast<uint32_t>(suffixes.getValue()); if(suffix.length() == 1 && getCEsFromCE32(data, U_SENTINEL, ce32, errorCode)) { addContraction = true; } else { @@ -392,7 +392,7 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data, // when there is a non-fast-Latin character following. // For example: Danish &Y<<u+umlaut, when we compare Y vs. u\u0308 we need to see the // following umlaut and bail out, rather than return the difference of Y vs. u. - ce0 = ((int64_t)Collation::NO_CE_PRIMARY << 32) | CONTRACTION_FLAG | contractionIndex; + ce0 = (static_cast<int64_t>(Collation::NO_CE_PRIMARY) << 32) | CONTRACTION_FLAG | contractionIndex; ce1 = 0; return true; } @@ -410,8 +410,8 @@ CollationFastLatinBuilder::addContractionEntry(int32_t x, int64_t cce0, int64_t void CollationFastLatinBuilder::addUniqueCE(int64_t ce, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return; } - if(ce == 0 || (uint32_t)(ce >> 32) == Collation::NO_CE_PRIMARY) { return; } - ce &= ~(int64_t)Collation::CASE_MASK; // blank out case bits + if (ce == 0 || static_cast<uint32_t>(ce >> 32) == Collation::NO_CE_PRIMARY) { return; } + ce &= ~static_cast<int64_t>(Collation::CASE_MASK); // blank out case bits int32_t i = binarySearch(uniqueCEs.getBuffer(), uniqueCEs.size(), ce); if(i < 0) { uniqueCEs.insertElementAt(ce, ~i, errorCode); @@ -420,7 +420,7 @@ CollationFastLatinBuilder::addUniqueCE(int64_t ce, UErrorCode &errorCode) { uint32_t CollationFastLatinBuilder::getMiniCE(int64_t ce) const { - ce &= ~(int64_t)Collation::CASE_MASK; // blank out case bits + ce &= ~static_cast<int64_t>(Collation::CASE_MASK); // blank out case bits int32_t index = binarySearch(uniqueCEs.getBuffer(), uniqueCEs.size(), ce); U_ASSERT(index >= 0); return miniCEs[index]; @@ -430,7 +430,7 @@ UBool CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return false; } uprv_free(miniCEs); - miniCEs = (uint16_t *)uprv_malloc(uniqueCEs.size() * 2); + miniCEs = static_cast<uint16_t*>(uprv_malloc(uniqueCEs.size() * 2)); if(miniCEs == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; return false; @@ -448,13 +448,13 @@ CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) { int64_t ce = uniqueCEs.elementAti(i); // Note: At least one of the p/s/t weights changes from one unique CE to the next. // (uniqueCEs does not store case bits.) - uint32_t p = (uint32_t)(ce >> 32); + uint32_t p = static_cast<uint32_t>(ce >> 32); if(p != prevPrimary) { while(p > lastGroupPrimary) { U_ASSERT(pri <= CollationFastLatin::MAX_LONG); // Set the group's header entry to the // last "long primary" in or before the group. - result.setCharAt(1 + group, (char16_t)pri); + result.setCharAt(1 + group, static_cast<char16_t>(pri)); if(++group < NUM_SPECIAL_GROUPS) { lastGroupPrimary = lastSpecialPrimaries[group]; } else { @@ -494,7 +494,7 @@ CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) { sec = CollationFastLatin::COMMON_SEC; ter = CollationFastLatin::COMMON_TER; } - uint32_t lower32 = (uint32_t)ce; + uint32_t lower32 = static_cast<uint32_t>(ce); uint32_t s = lower32 >> 16; if(s != prevSecondary) { if(pri == 0) { @@ -544,9 +544,9 @@ CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) { } if(CollationFastLatin::MIN_LONG <= pri && pri <= CollationFastLatin::MAX_LONG) { U_ASSERT(sec == CollationFastLatin::COMMON_SEC); - miniCEs[i] = (uint16_t)(pri | ter); + miniCEs[i] = static_cast<uint16_t>(pri | ter); } else { - miniCEs[i] = (uint16_t)(pri | sec | ter); + miniCEs[i] = static_cast<uint16_t>(pri | sec | ter); } } #if DEBUG_COLLATION_FAST_LATIN_BUILDER @@ -566,7 +566,7 @@ CollationFastLatinBuilder::encodeCharCEs(UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return false; } int32_t miniCEsStart = result.length(); for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) { - result.append((char16_t)0); // initialize to completely ignorable + result.append(static_cast<char16_t>(0)); // initialize to completely ignorable } int32_t indexBase = result.length(); for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) { @@ -578,14 +578,14 @@ CollationFastLatinBuilder::encodeCharCEs(UErrorCode &errorCode) { // and if so, then we could reuse the other expansion. // However, that seems unlikely. int32_t expansionIndex = result.length() - indexBase; - if(expansionIndex > (int32_t)CollationFastLatin::INDEX_MASK) { + if (expansionIndex > static_cast<int32_t>(CollationFastLatin::INDEX_MASK)) { miniCE = CollationFastLatin::BAIL_OUT; } else { - result.append((char16_t)(miniCE >> 16)).append((char16_t)miniCE); + result.append(static_cast<char16_t>(miniCE >> 16)).append(static_cast<char16_t>(miniCE)); miniCE = CollationFastLatin::EXPANSION | expansionIndex; } } - result.setCharAt(miniCEsStart + i, (char16_t)miniCE); + result.setCharAt(miniCEsStart + i, static_cast<char16_t>(miniCE)); } return U_SUCCESS(errorCode); } @@ -601,25 +601,25 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) { int64_t ce = charCEs[i][0]; if(!isContractionCharCE(ce)) { continue; } int32_t contractionIndex = result.length() - indexBase; - if(contractionIndex > (int32_t)CollationFastLatin::INDEX_MASK) { + if (contractionIndex > static_cast<int32_t>(CollationFastLatin::INDEX_MASK)) { result.setCharAt(headerLength + i, CollationFastLatin::BAIL_OUT); continue; } UBool firstTriple = true; - for(int32_t index = (int32_t)ce & 0x7fffffff;; index += 3) { + for (int32_t index = static_cast<int32_t>(ce) & 0x7fffffff;; index += 3) { int32_t x = static_cast<int32_t>(contractionCEs.elementAti(index)); - if((uint32_t)x == CollationFastLatin::CONTR_CHAR_MASK && !firstTriple) { break; } + if (static_cast<uint32_t>(x) == CollationFastLatin::CONTR_CHAR_MASK && !firstTriple) { break; } int64_t cce0 = contractionCEs.elementAti(index + 1); int64_t cce1 = contractionCEs.elementAti(index + 2); uint32_t miniCE = encodeTwoCEs(cce0, cce1); if(miniCE == CollationFastLatin::BAIL_OUT) { - result.append((char16_t)(x | (1 << CollationFastLatin::CONTR_LENGTH_SHIFT))); + result.append(static_cast<char16_t>(x | (1 << CollationFastLatin::CONTR_LENGTH_SHIFT))); } else if(miniCE <= 0xffff) { - result.append((char16_t)(x | (2 << CollationFastLatin::CONTR_LENGTH_SHIFT))); - result.append((char16_t)miniCE); + result.append(static_cast<char16_t>(x | (2 << CollationFastLatin::CONTR_LENGTH_SHIFT))); + result.append(static_cast<char16_t>(miniCE)); } else { - result.append((char16_t)(x | (3 << CollationFastLatin::CONTR_LENGTH_SHIFT))); - result.append((char16_t)(miniCE >> 16)).append((char16_t)miniCE); + result.append(static_cast<char16_t>(x | (3 << CollationFastLatin::CONTR_LENGTH_SHIFT))); + result.append(static_cast<char16_t>(miniCE >> 16)).append(static_cast<char16_t>(miniCE)); } firstTriple = false; } @@ -627,11 +627,11 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) { // and if so, then we could truncate the result and reuse the other list. // However, that seems unlikely. result.setCharAt(headerLength + i, - (char16_t)(CollationFastLatin::CONTRACTION | contractionIndex)); + static_cast<char16_t>(CollationFastLatin::CONTRACTION | contractionIndex)); } if(result.length() > firstContractionIndex) { // Terminate the last contraction list. - result.append((char16_t)CollationFastLatin::CONTR_CHAR_MASK); + result.append(static_cast<char16_t>(CollationFastLatin::CONTR_CHAR_MASK)); } if(result.isBogus()) { errorCode = U_MEMORY_ALLOCATION_ERROR; @@ -681,7 +681,7 @@ CollationFastLatinBuilder::encodeTwoCEs(int64_t first, int64_t second) const { if(miniCE >= CollationFastLatin::MIN_SHORT) { // Extract & copy the case bits. // Shift them from normal CE bits 15..14 to mini CE bits 4..3. - uint32_t c = (((uint32_t)first & Collation::CASE_MASK) >> (14 - 3)); + uint32_t c = ((static_cast<uint32_t>(first) & Collation::CASE_MASK) >> (14 - 3)); // Only in mini CEs: Ignorable case bits = 0, lowercase = 1. c += CollationFastLatin::LOWER_CASE; miniCE |= c; @@ -691,7 +691,7 @@ CollationFastLatinBuilder::encodeTwoCEs(int64_t first, int64_t second) const { uint32_t miniCE1 = getMiniCE(second); if(miniCE1 == CollationFastLatin::BAIL_OUT) { return miniCE1; } - uint32_t case1 = (uint32_t)second & Collation::CASE_MASK; + uint32_t case1 = static_cast<uint32_t>(second) & Collation::CASE_MASK; if(miniCE >= CollationFastLatin::MIN_SHORT && (miniCE & CollationFastLatin::SECONDARY_MASK) == CollationFastLatin::COMMON_SEC) { // Try to combine the two mini CEs into one. diff --git a/deps/icu-small/source/i18n/collationfastlatinbuilder.h b/deps/icu-small/source/i18n/collationfastlatinbuilder.h index 8b63b86815fdc6..18b20ac5f3caf0 100644 --- a/deps/icu-small/source/i18n/collationfastlatinbuilder.h +++ b/deps/icu-small/source/i18n/collationfastlatinbuilder.h @@ -63,7 +63,7 @@ class U_I18N_API CollationFastLatinBuilder : public UObject { uint32_t encodeTwoCEs(int64_t first, int64_t second) const; static UBool isContractionCharCE(int64_t ce) { - return (uint32_t)(ce >> 32) == Collation::NO_CE_PRIMARY && ce != Collation::NO_CE; + return static_cast<uint32_t>(ce >> 32) == Collation::NO_CE_PRIMARY && ce != Collation::NO_CE; } static const uint32_t CONTRACTION_FLAG = 0x80000000; diff --git a/deps/icu-small/source/i18n/collationfcd.cpp b/deps/icu-small/source/i18n/collationfcd.cpp index e1f1d0330c480e..ac037d5a2f472f 100644 --- a/deps/icu-small/source/i18n/collationfcd.cpp +++ b/deps/icu-small/source/i18n/collationfcd.cpp @@ -148,10 +148,10 @@ const uint8_t CollationFCD::lcccIndex[2048]={ const uint32_t CollationFCD::lcccBits[73]={ 0,0xffffffff,0xffff7fff,0xffff,0xf8,0xfffe0000,0xbfffffff,0xb6,0x7ff0000,0xfffff800,0x10000,0x9fc00000,0x3d9f,0x20000,0xffff0000,0x7ff, -0x200ff800,0xfbc00000,0x3eef,0xe000000,0xff000000,0xfffffc00,0xfffffffb,0x10000000,0x1e2000,0x2000,0x40000000,0x602000,0x18000000,0x400,0x7000000,0xf00, +0x200ff800,0xfbc00000,0x3eef,0xe000000,0xff800000,0xfffffc00,0xfffffffb,0x10000000,0x1e2000,0x2000,0x40000000,0x602000,0x18000000,0x400,0x7000000,0xf00, 0x3000000,0x2a00000,0x3c3e0000,0xdf,0x40,0x6800000,0xe0000000,0x300000,0x100000,0x20040000,0x200,0x1800000,0x9fe00001,0xbfff0000,0x7fff,0x10, 0xff800,0xc00,0xc0040,0x800000,0xfff70000,0x31021fd,0x1fff0000,0x1ffe2,0x38000,0x80000000,0xfc00,0x6000000,0x3ff08000,0xc0000000,0x30000,0x1000, -0x3ffff,0x3800,0x80000,1,0xc19d0000,2,0x400000,0xc0000fd,0x7108000 +0x3ffff,0x3800,0x80000,1,0xc19d0000,2,0x400000,0xd0000fd,0x7108000 }; const uint8_t CollationFCD::tcccIndex[2048]={ @@ -288,12 +288,12 @@ const uint8_t CollationFCD::tcccIndex[2048]={ const uint32_t CollationFCD::tcccBits[123]={ 0,0xffffffff,0x3e7effbf,0xbe7effbf,0xfffcffff,0x7ef1ff3f,0xfff3f1f8,0x7fffff3f,0x18003,0xdfffe000,0xff31ffcf,0xcfffffff,0xfffc0,0xffff7fff,0xffff,0x1d760, 0x1fc00,0x187c00,0x200708b,0x2000000,0x708b0000,0xc00000,0xf8,0xfccf0006,0x33ffcfc,0xfffe0000,0xbfffffff,0xb6,0x7ff0000,0x7c,0xfffff800,0x10000, -0x9fc80005,0x3d9f,0x20000,0xffff0000,0x7ff,0x200ff800,0xfbc00000,0x3eef,0xe000000,0xff000000,0xfffffc00,0xfffffffb,0x10120200,0xff1e2000,0x10000000,0xb0002000, +0x9fc80005,0x3d9f,0x20000,0xffff0000,0x7ff,0x200ff800,0xfbc00000,0x3eef,0xe000000,0xff800000,0xfffffc00,0xfffffffb,0x10120200,0xff1e2000,0x10000000,0xb0002000, 0x40000000,0x10480000,0x4e002000,0x2000,0x30002000,0x602100,0x18000000,0x24000400,0x7000000,0xf00,0x3000000,0x2a00000,0x3d7e0000,0xdf,0x40,0x6800000, 0xe0000000,0x300000,0x100000,0x20040000,0x200,0x1800000,0x9fe00001,0xbfff0000,0x7fff,0x10,0xff800,0xc00,0xc0040,0x800000,0xfff70000,0x31021fd, 0xbffffff,0x3ffffff,0x3f3fffff,0xaaff3f3f,0x3fffffff,0x1fdfffff,0xefcfffde,0x1fdc7fff,0x1fff0000,0x1ffe2,0x800,0xc000000,0x4000,0xe000,0x1210,0x50, 0x292,0x333e005,0x333,0xf000,0x3c0f,0x38000,0x80000000,0xfc00,0x55555000,0x36db02a5,0x46100000,0x47900000,0x3ff08000,0xc0000000,0x30000,0x1000, -0x3ffff,0x3800,0x80000,1,0xc19d0000,2,0x400000,0xc0000fd,0x7108000,0x5f7ffc00,0x7fdb +0x3ffff,0x3800,0x80000,1,0xc19d0000,2,0x400000,0xd0000ff,0x7108000,0x5f7ffc00,0x7fdb }; U_NAMESPACE_END diff --git a/deps/icu-small/source/i18n/collationfcd.h b/deps/icu-small/source/i18n/collationfcd.h index 9620452b97f01c..c9ca54234f66ab 100644 --- a/deps/icu-small/source/i18n/collationfcd.h +++ b/deps/icu-small/source/i18n/collationfcd.h @@ -65,7 +65,7 @@ class U_I18N_API CollationFCD { // U+0300 is the first character with lccc!=0. c >= 0x300 && (i = lcccIndex[c >> 5]) != 0 && - (lcccBits[i] & ((uint32_t)1 << (c & 0x1f))) != 0; + (lcccBits[i] & (static_cast<uint32_t>(1) << (c & 0x1f))) != 0; } static inline UBool hasTccc(UChar32 c) { @@ -77,7 +77,7 @@ class U_I18N_API CollationFCD { // U+00C0 is the first character with tccc!=0. c >= 0xc0 && (i = tcccIndex[c >> 5]) != 0 && - (tcccBits[i] & ((uint32_t)1 << (c & 0x1f))) != 0; + (tcccBits[i] & (static_cast<uint32_t>(1) << (c & 0x1f))) != 0; } static inline UBool mayHaveLccc(UChar32 c) { @@ -89,7 +89,7 @@ class U_I18N_API CollationFCD { int32_t i; return (i = lcccIndex[c >> 5]) != 0 && - (lcccBits[i] & ((uint32_t)1 << (c & 0x1f))) != 0; + (lcccBits[i] & (static_cast<uint32_t>(1) << (c & 0x1f))) != 0; } /** diff --git a/deps/icu-small/source/i18n/collationiterator.cpp b/deps/icu-small/source/i18n/collationiterator.cpp index f8c6da22b2baa8..ef1980aebfc7de 100644 --- a/deps/icu-small/source/i18n/collationiterator.cpp +++ b/deps/icu-small/source/i18n/collationiterator.cpp @@ -459,7 +459,7 @@ CollationIterator::getCE32FromPrefix(const CollationData *d, uint32_t ce32, ++lookBehind; UStringTrieResult match = prefixes.nextForCodePoint(c); if(USTRINGTRIE_HAS_VALUE(match)) { - ce32 = (uint32_t)prefixes.getValue(); + ce32 = static_cast<uint32_t>(prefixes.getValue()); } if(!USTRINGTRIE_HAS_NEXT(match)) { break; } } @@ -506,7 +506,7 @@ CollationIterator::nextCE32FromContraction(const CollationData *d, uint32_t cont for(;;) { UChar32 nextCp; if(USTRINGTRIE_HAS_VALUE(match)) { - ce32 = (uint32_t)suffixes.getValue(); + ce32 = static_cast<uint32_t>(suffixes.getValue()); if(!USTRINGTRIE_HAS_NEXT(match) || (c = nextSkippedCodePoint(errorCode)) < 0) { return ce32; } @@ -586,7 +586,7 @@ CollationIterator::nextCE32FromDiscontiguousContraction( return ce32; } ++lookAhead; - uint8_t prevCC = (uint8_t)fcd16; + uint8_t prevCC = static_cast<uint8_t>(fcd16); fcd16 = d->getFCD16(nextCp); if(fcd16 <= 0xff) { // The next code point after c is a starter (S2.1.1 "process each non-starter"). @@ -632,7 +632,7 @@ CollationIterator::nextCE32FromDiscontiguousContraction( if(prevCC < (fcd16 >> 8) && USTRINGTRIE_HAS_VALUE(match = suffixes.nextForCodePoint(c))) { // "If there is a match, replace S by S + C, and remove C." (S2.1.3) // Keep prevCC unchanged. - ce32 = (uint32_t)suffixes.getValue(); + ce32 = static_cast<uint32_t>(suffixes.getValue()); sinceMatch = 0; skipped->recordMatch(); if(!USTRINGTRIE_HAS_NEXT(match)) { break; } @@ -641,7 +641,7 @@ CollationIterator::nextCE32FromDiscontiguousContraction( // No match for "S + C", skip C. skipped->skip(c); skipped->resetToTrieState(suffixes); - prevCC = (uint8_t)fcd16; + prevCC = static_cast<uint8_t>(fcd16); } if((c = nextSkippedCodePoint(errorCode)) < 0) { break; } ++sinceMatch; diff --git a/deps/icu-small/source/i18n/collationiterator.h b/deps/icu-small/source/i18n/collationiterator.h index 07bdf61985ae09..46919ba6ab52f5 100644 --- a/deps/icu-small/source/i18n/collationiterator.h +++ b/deps/icu-small/source/i18n/collationiterator.h @@ -142,7 +142,7 @@ class U_I18N_API CollationIterator : public UObject { // Normal CE from the main data. // Forced-inline of ceFromSimpleCE32(ce32). return ceBuffer.set(cesIndex++, - ((int64_t)(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | (t << 8)); + (static_cast<int64_t>(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | (t << 8)); } const CollationData *d; // The compiler should be able to optimize the previous and the following @@ -157,7 +157,7 @@ class U_I18N_API CollationIterator : public UObject { if(t < Collation::SPECIAL_CE32_LOW_BYTE) { // Normal CE from the base data. return ceBuffer.set(cesIndex++, - ((int64_t)(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | (t << 8)); + (static_cast<int64_t>(ce32 & 0xffff0000) << 32) | ((ce32 & 0xff00) << 16) | (t << 8)); } } else { d = data; @@ -165,7 +165,7 @@ class U_I18N_API CollationIterator : public UObject { if(t == Collation::LONG_PRIMARY_CE32_LOW_BYTE) { // Forced-inline of ceFromLongPrimaryCE32(ce32). return ceBuffer.set(cesIndex++, - ((int64_t)(ce32 - t) << 32) | Collation::COMMON_SEC_AND_TER_CE); + (static_cast<int64_t>(ce32 - t) << 32) | Collation::COMMON_SEC_AND_TER_CE); } return nextCEFromCE32(d, c, ce32, errorCode); } diff --git a/deps/icu-small/source/i18n/collationkeys.cpp b/deps/icu-small/source/i18n/collationkeys.cpp index c429ac3f8f7030..b5bbd2a64aba5e 100644 --- a/deps/icu-small/source/i18n/collationkeys.cpp +++ b/deps/icu-small/source/i18n/collationkeys.cpp @@ -126,15 +126,15 @@ class SortKeyLevel : public UMemory { void SortKeyLevel::appendByte(uint32_t b) { if(len < buffer.getCapacity() || ensureCapacity(1)) { - buffer[len++] = (uint8_t)b; + buffer[len++] = static_cast<uint8_t>(b); } } void SortKeyLevel::appendWeight16(uint32_t w) { U_ASSERT((w & 0xffff) != 0); - uint8_t b0 = (uint8_t)(w >> 8); - uint8_t b1 = (uint8_t)w; + uint8_t b0 = static_cast<uint8_t>(w >> 8); + uint8_t b1 = static_cast<uint8_t>(w); int32_t appendLength = (b1 == 0) ? 1 : 2; if((len + appendLength) <= buffer.getCapacity() || ensureCapacity(appendLength)) { buffer[len++] = b0; @@ -147,7 +147,12 @@ SortKeyLevel::appendWeight16(uint32_t w) { void SortKeyLevel::appendWeight32(uint32_t w) { U_ASSERT(w != 0); - uint8_t bytes[4] = { (uint8_t)(w >> 24), (uint8_t)(w >> 16), (uint8_t)(w >> 8), (uint8_t)w }; + uint8_t bytes[4] = { + static_cast<uint8_t>(w >> 24), + static_cast<uint8_t>(w >> 16), + static_cast<uint8_t>(w >> 8), + static_cast<uint8_t>(w) + }; int32_t appendLength = (bytes[1] == 0) ? 1 : (bytes[2] == 0) ? 2 : (bytes[3] == 0) ? 3 : 4; if((len + appendLength) <= buffer.getCapacity() || ensureCapacity(appendLength)) { buffer[len++] = bytes[0]; @@ -166,8 +171,8 @@ SortKeyLevel::appendWeight32(uint32_t w) { void SortKeyLevel::appendReverseWeight16(uint32_t w) { U_ASSERT((w & 0xffff) != 0); - uint8_t b0 = (uint8_t)(w >> 8); - uint8_t b1 = (uint8_t)w; + uint8_t b0 = static_cast<uint8_t>(w >> 8); + uint8_t b1 = static_cast<uint8_t>(w); int32_t appendLength = (b1 == 0) ? 1 : 2; if((len + appendLength) <= buffer.getCapacity() || ensureCapacity(appendLength)) { if(b1 == 0) { @@ -238,7 +243,7 @@ CollationKeys::writeSortKeyUpToQuaternary(CollationIterator &iter, levels |= Collation::CASE_LEVEL_FLAG; } // Minus the levels below minLevel. - levels &= ~(((uint32_t)1 << minLevel) - 1); + levels &= ~((static_cast<uint32_t>(1) << minLevel) - 1); if(levels == 0) { return; } uint32_t variableTop; @@ -269,7 +274,7 @@ CollationKeys::writeSortKeyUpToQuaternary(CollationIterator &iter, // No need to keep all CEs in the buffer when we write a sort key. iter.clearCEsIfNoneRemaining(); int64_t ce = iter.nextCE(errorCode); - uint32_t p = (uint32_t)(ce >> 32); + uint32_t p = static_cast<uint32_t>(ce >> 32); if(p < variableTop && p > Collation::MERGE_SEPARATOR_PRIMARY) { // Variable CE, shift it to quaternary level. // Ignore all following primary ignorables, and shift further variable CEs. @@ -297,7 +302,7 @@ CollationKeys::writeSortKeyUpToQuaternary(CollationIterator &iter, } do { ce = iter.nextCE(errorCode); - p = (uint32_t)(ce >> 32); + p = static_cast<uint32_t>(ce >> 32); } while(p == 0); } while(p < variableTop && p > Collation::MERGE_SEPARATOR_PRIMARY); } @@ -331,9 +336,9 @@ CollationKeys::writeSortKeyUpToQuaternary(CollationIterator &iter, prevReorderedPrimary = 0; } } - char p2 = (char)(p >> 16); + char p2 = static_cast<char>(p >> 16); if(p2 != 0) { - char buffer[3] = { p2, (char)(p >> 8), (char)p }; + char buffer[3] = {p2, static_cast<char>(p >> 8), static_cast<char>(p)}; sink.Append(buffer, (buffer[1] == 0) ? 1 : (buffer[2] == 0) ? 2 : 3); } // Optimization for internalNextSortKeyPart(): @@ -347,7 +352,7 @@ CollationKeys::writeSortKeyUpToQuaternary(CollationIterator &iter, } } - uint32_t lower32 = (uint32_t)ce; + uint32_t lower32 = static_cast<uint32_t>(ce); if(lower32 == 0) { continue; } // completely ignorable, no secondary/case/tertiary/quaternary if((levels & Collation::SECONDARY_LEVEL_FLAG) != 0) { @@ -635,7 +640,7 @@ CollationKeys::writeSortKeyUpToQuaternary(CollationIterator &iter, int32_t length = cases.length() - 1; // Ignore the trailing NO_CE. uint8_t b = 0; for(int32_t i = 0; i < length; ++i) { - uint8_t c = (uint8_t)cases[i]; + uint8_t c = cases[i]; U_ASSERT((c & 0xf) == 0 && c != 0); if(b == 0) { b = c; diff --git a/deps/icu-small/source/i18n/collationkeys.h b/deps/icu-small/source/i18n/collationkeys.h index d1331566128b3a..0529b309848349 100644 --- a/deps/icu-small/source/i18n/collationkeys.h +++ b/deps/icu-small/source/i18n/collationkeys.h @@ -44,7 +44,7 @@ class SortKeyByteSink : public ByteSink { --ignore_; } else { if (appended_ < capacity_ || Resize(1, appended_)) { - buffer_[appended_] = (char)b; + buffer_[appended_] = static_cast<char>(b); } ++appended_; } diff --git a/deps/icu-small/source/i18n/collationrootelements.cpp b/deps/icu-small/source/i18n/collationrootelements.cpp index 9b46d14144bb3d..041f53dbda102b 100644 --- a/deps/icu-small/source/i18n/collationrootelements.cpp +++ b/deps/icu-small/source/i18n/collationrootelements.cpp @@ -64,7 +64,7 @@ CollationRootElements::lastCEWithPrimaryBefore(uint32_t p) const { secTer = q; } } - return ((int64_t)p << 32) | (secTer & ~SEC_TER_DELTA_FLAG); + return (static_cast<int64_t>(p) << 32) | (secTer & ~SEC_TER_DELTA_FLAG); } int64_t @@ -82,7 +82,7 @@ CollationRootElements::firstCEWithPrimaryAtLeast(uint32_t p) const { } } // The code above guarantees that p has at most 3 bytes: (p & 0xff) == 0. - return ((int64_t)p << 32) | Collation::COMMON_SEC_AND_TER_CE; + return (static_cast<int64_t>(p) << 32) | Collation::COMMON_SEC_AND_TER_CE; } uint32_t @@ -93,7 +93,7 @@ CollationRootElements::getPrimaryBefore(uint32_t p, UBool isCompressible) const if(p == (q & 0xffffff00)) { // Found p itself. Return the previous primary. // See if p is at the end of a previous range. - step = (int32_t)q & PRIMARY_STEP_MASK; + step = static_cast<int32_t>(q) & PRIMARY_STEP_MASK; if(step == 0) { // p is not at the end of a range. Look for the previous primary. do { @@ -105,7 +105,7 @@ CollationRootElements::getPrimaryBefore(uint32_t p, UBool isCompressible) const // p is in a range, and not at the start. uint32_t nextElement = elements[index + 1]; U_ASSERT(isEndOfPrimaryRange(nextElement)); - step = (int32_t)nextElement & PRIMARY_STEP_MASK; + step = static_cast<int32_t>(nextElement) & PRIMARY_STEP_MASK; } // Return the previous range primary. if((p & 0xffff) == 0) { @@ -120,7 +120,7 @@ CollationRootElements::getSecondaryBefore(uint32_t p, uint32_t s) const { int32_t index; uint32_t previousSec, sec; if(p == 0) { - index = (int32_t)elements[IX_FIRST_SECONDARY_INDEX]; + index = static_cast<int32_t>(elements[IX_FIRST_SECONDARY_INDEX]); // Gap at the beginning of the secondary CE range. previousSec = 0; sec = elements[index] >> 16; @@ -146,11 +146,11 @@ CollationRootElements::getTertiaryBefore(uint32_t p, uint32_t s, uint32_t t) con uint32_t previousTer, secTer; if(p == 0) { if(s == 0) { - index = (int32_t)elements[IX_FIRST_TERTIARY_INDEX]; + index = static_cast<int32_t>(elements[IX_FIRST_TERTIARY_INDEX]); // Gap at the beginning of the tertiary CE range. previousTer = 0; } else { - index = (int32_t)elements[IX_FIRST_SECONDARY_INDEX]; + index = static_cast<int32_t>(elements[IX_FIRST_SECONDARY_INDEX]); previousTer = Collation::BEFORE_WEIGHT16; } secTer = elements[index] & ~SEC_TER_DELTA_FLAG; @@ -174,7 +174,7 @@ CollationRootElements::getPrimaryAfter(uint32_t p, int32_t index, UBool isCompre U_ASSERT(p == (elements[index] & 0xffffff00) || isEndOfPrimaryRange(elements[index + 1])); uint32_t q = elements[++index]; int32_t step; - if((q & SEC_TER_DELTA_FLAG) == 0 && (step = (int32_t)q & PRIMARY_STEP_MASK) != 0) { + if ((q & SEC_TER_DELTA_FLAG) == 0 && (step = static_cast<int32_t>(q) & PRIMARY_STEP_MASK) != 0) { // Return the next primary in this range. if((p & 0xffff) == 0) { return Collation::incTwoBytePrimaryByOffset(p, isCompressible, step); @@ -198,7 +198,7 @@ CollationRootElements::getSecondaryAfter(int32_t index, uint32_t s) const { if(index == 0) { // primary = 0 U_ASSERT(s != 0); - index = (int32_t)elements[IX_FIRST_SECONDARY_INDEX]; + index = static_cast<int32_t>(elements[IX_FIRST_SECONDARY_INDEX]); secTer = elements[index]; // Gap at the end of the secondary CE range. secLimit = 0x10000; @@ -225,11 +225,11 @@ CollationRootElements::getTertiaryAfter(int32_t index, uint32_t s, uint32_t t) c // primary = 0 if(s == 0) { U_ASSERT(t != 0); - index = (int32_t)elements[IX_FIRST_TERTIARY_INDEX]; + index = static_cast<int32_t>(elements[IX_FIRST_TERTIARY_INDEX]); // Gap at the end of the tertiary CE range. terLimit = 0x4000; } else { - index = (int32_t)elements[IX_FIRST_SECONDARY_INDEX]; + index = static_cast<int32_t>(elements[IX_FIRST_SECONDARY_INDEX]); // Gap for tertiaries of primary/secondary CEs. terLimit = getTertiaryBoundary(); } @@ -287,7 +287,7 @@ CollationRootElements::findP(uint32_t p) const { // For example, it might be a reordering group boundary. U_ASSERT((p >> 24) != Collation::UNASSIGNED_IMPLICIT_BYTE); // modified binary search - int32_t start = (int32_t)elements[IX_FIRST_PRIMARY_INDEX]; + int32_t start = static_cast<int32_t>(elements[IX_FIRST_PRIMARY_INDEX]); U_ASSERT(p >= elements[start]); int32_t limit = length - 1; U_ASSERT(elements[limit] >= PRIMARY_SENTINEL); diff --git a/deps/icu-small/source/i18n/collationruleparser.cpp b/deps/icu-small/source/i18n/collationruleparser.cpp index def5ea096d478a..b20d2c9428c48b 100644 --- a/deps/icu-small/source/i18n/collationruleparser.cpp +++ b/deps/icu-small/source/i18n/collationruleparser.cpp @@ -378,7 +378,7 @@ CollationRuleParser::parseString(int32_t i, UnicodeString &raw, UErrorCode &erro if(c == 0x27) { // apostrophe if(i < rules->length() && rules->charAt(i) == 0x27) { // Double apostrophe, encodes a single one. - raw.append((char16_t)0x27); + raw.append(static_cast<char16_t>(0x27)); ++i; continue; } @@ -398,7 +398,7 @@ CollationRuleParser::parseString(int32_t i, UnicodeString &raw, UErrorCode &erro break; } } - raw.append((char16_t)c); + raw.append(static_cast<char16_t>(c)); } } else if(c == 0x5c) { // backslash if(i == rules->length()) { @@ -418,7 +418,7 @@ CollationRuleParser::parseString(int32_t i, UnicodeString &raw, UErrorCode &erro --i; break; } else { - raw.append((char16_t)c); + raw.append(static_cast<char16_t>(c)); } } for(int32_t j = 0; j < raw.length();) { @@ -466,16 +466,16 @@ CollationRuleParser::parseSpecialPosition(int32_t i, UnicodeString &str, UErrorC ++j; for(int32_t pos = 0; pos < UPRV_LENGTHOF(positions); ++pos) { if(raw == UnicodeString(positions[pos], -1, US_INV)) { - str.setTo((char16_t)POS_LEAD).append((char16_t)(POS_BASE + pos)); + str.setTo(POS_LEAD).append(static_cast<char16_t>(POS_BASE + pos)); return j; } } if(raw == UNICODE_STRING_SIMPLE("top")) { - str.setTo((char16_t)POS_LEAD).append((char16_t)(POS_BASE + LAST_REGULAR)); + str.setTo(POS_LEAD).append(static_cast<char16_t>(POS_BASE + LAST_REGULAR)); return j; } if(raw == UNICODE_STRING_SIMPLE("variable top")) { - str.setTo((char16_t)POS_LEAD).append((char16_t)(POS_BASE + LAST_VARIABLE)); + str.setTo(POS_LEAD).append(static_cast<char16_t>(POS_BASE + LAST_VARIABLE)); return j; } } @@ -507,7 +507,7 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) { return; } UnicodeString v; - int32_t valueIndex = raw.lastIndexOf((char16_t)0x20); + int32_t valueIndex = raw.lastIndexOf(static_cast<char16_t>(0x20)); if(valueIndex >= 0) { v.setTo(raw, valueIndex + 1); raw.truncate(valueIndex); @@ -694,7 +694,7 @@ CollationRuleParser::parseReordering(const UnicodeString &raw, UErrorCode &error CharString word; while(i < raw.length()) { ++i; // skip the word-separating space - int32_t limit = raw.indexOf((char16_t)0x20, i); + int32_t limit = raw.indexOf(static_cast<char16_t>(0x20), i); if(limit < 0) { limit = raw.length(); } word.clear().appendInvariantChars(raw.tempSubStringBetween(i, limit), errorCode); if(U_FAILURE(errorCode)) { return; } diff --git a/deps/icu-small/source/i18n/collationsets.cpp b/deps/icu-small/source/i18n/collationsets.cpp index 62e6a5d1806eb0..a73c7fafdd0b86 100644 --- a/deps/icu-small/source/i18n/collationsets.cpp +++ b/deps/icu-small/source/i18n/collationsets.cpp @@ -222,7 +222,7 @@ TailoredSet::comparePrefixes(UChar32 c, const char16_t *p, const char16_t *q) { const UnicodeString *bp = nullptr; // Base prefix. // Use a string with a U+FFFF as the limit sentinel. // U+FFFF is untailorable and will not occur in prefixes. - UnicodeString none((char16_t)0xffff); + UnicodeString none(static_cast<char16_t>(0xffff)); for(;;) { if(tp == nullptr) { if(prefixes.next(errorCode)) { @@ -242,15 +242,15 @@ TailoredSet::comparePrefixes(UChar32 c, const char16_t *p, const char16_t *q) { int32_t cmp = tp->compare(*bp); if(cmp < 0) { // tp occurs in the tailoring but not in the base. - addPrefix(data, *tp, c, (uint32_t)prefixes.getValue()); + addPrefix(data, *tp, c, static_cast<uint32_t>(prefixes.getValue())); tp = nullptr; } else if(cmp > 0) { // bp occurs in the base but not in the tailoring. - addPrefix(baseData, *bp, c, (uint32_t)basePrefixes.getValue()); + addPrefix(baseData, *bp, c, static_cast<uint32_t>(basePrefixes.getValue())); bp = nullptr; } else { setPrefix(*tp); - compare(c, (uint32_t)prefixes.getValue(), (uint32_t)basePrefixes.getValue()); + compare(c, static_cast<uint32_t>(prefixes.getValue()), static_cast<uint32_t>(basePrefixes.getValue())); resetPrefix(); tp = nullptr; bp = nullptr; @@ -268,8 +268,8 @@ TailoredSet::compareContractions(UChar32 c, const char16_t *p, const char16_t *q // Use a string with two U+FFFF as the limit sentinel. // U+FFFF is untailorable and will not occur in contractions except maybe // as a single suffix character for a root-collator boundary contraction. - UnicodeString none((char16_t)0xffff); - none.append((char16_t)0xffff); + UnicodeString none(static_cast<char16_t>(0xffff)); + none.append(static_cast<char16_t>(0xffff)); for(;;) { if(ts == nullptr) { if(suffixes.next(errorCode)) { @@ -297,7 +297,7 @@ TailoredSet::compareContractions(UChar32 c, const char16_t *p, const char16_t *q bs = nullptr; } else { suffix = ts; - compare(c, (uint32_t)suffixes.getValue(), (uint32_t)baseSuffixes.getValue()); + compare(c, static_cast<uint32_t>(suffixes.getValue()), static_cast<uint32_t>(baseSuffixes.getValue())); suffix = nullptr; ts = nullptr; bs = nullptr; @@ -309,7 +309,7 @@ void TailoredSet::addPrefixes(const CollationData *d, UChar32 c, const char16_t *p) { UCharsTrie::Iterator prefixes(p, 0, errorCode); while(prefixes.next(errorCode)) { - addPrefix(d, prefixes.getString(), c, (uint32_t)prefixes.getValue()); + addPrefix(d, prefixes.getString(), c, static_cast<uint32_t>(prefixes.getValue())); } } @@ -512,7 +512,7 @@ ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32) UTF16CollationIterator iter(data, false, nullptr, nullptr, nullptr); char16_t hangul[1] = { 0 }; for(UChar32 c = start; c <= end; ++c) { - hangul[0] = (char16_t)c; + hangul[0] = static_cast<char16_t>(c); iter.setText(hangul, hangul + 1); int32_t length = iter.fetchCEs(errorCode); if(U_FAILURE(errorCode)) { return; } @@ -551,7 +551,7 @@ ContractionsAndExpansions::handlePrefixes( // that always yield expansions. addStrings(start, end, contractions); addStrings(start, end, expansions); - handleCE32(start, end, (uint32_t)prefixes.getValue()); + handleCE32(start, end, static_cast<uint32_t>(prefixes.getValue())); } resetPrefix(); } @@ -577,7 +577,7 @@ ContractionsAndExpansions::handleContractions( if(!unreversedPrefix.isEmpty()) { addStrings(start, end, expansions); } - handleCE32(start, end, (uint32_t)suffixes.getValue()); + handleCE32(start, end, static_cast<uint32_t>(suffixes.getValue())); } suffix = nullptr; } diff --git a/deps/icu-small/source/i18n/collationsettings.cpp b/deps/icu-small/source/i18n/collationsettings.cpp index 1533daf38c7a33..660efc12f63b74 100644 --- a/deps/icu-small/source/i18n/collationsettings.cpp +++ b/deps/icu-small/source/i18n/collationsettings.cpp @@ -158,9 +158,9 @@ CollationSettings::setReordering(const CollationData &data, int32_t firstSplitByteRangeIndex = -1; for(int32_t i = 0; i < rangesLength; ++i) { uint32_t pair = ranges[i]; - int32_t limit1 = (int32_t)(pair >> 24); + int32_t limit1 = static_cast<int32_t>(pair >> 24); while(b < limit1) { - table[b] = (uint8_t)(b + pair); + table[b] = static_cast<uint8_t>(b + pair); ++b; } // Check the second byte of the limit. @@ -173,7 +173,7 @@ CollationSettings::setReordering(const CollationData &data, } } while(b <= 0xff) { - table[b] = (uint8_t)b; + table[b] = static_cast<uint8_t>(b); ++b; } if(firstSplitByteRangeIndex < 0) { @@ -200,7 +200,7 @@ CollationSettings::setReorderArrays(const int32_t *codes, int32_t codesLength, } else { // Allocate one memory block for the codes, the ranges, and the 16-aligned table. int32_t capacity = (totalLength + 3) & ~3; // round up to a multiple of 4 ints - ownedCodes = (int32_t *)uprv_malloc(capacity * 4 + 256); + ownedCodes = static_cast<int32_t*>(uprv_malloc(capacity * 4 + 256)); if(ownedCodes == nullptr) { resetReordering(); errorCode = U_MEMORY_ALLOCATION_ERROR; diff --git a/deps/icu-small/source/i18n/collationsettings.h b/deps/icu-small/source/i18n/collationsettings.h index 43a181211c0724..6ef3c8a8d75968 100644 --- a/deps/icu-small/source/i18n/collationsettings.h +++ b/deps/icu-small/source/i18n/collationsettings.h @@ -136,7 +136,7 @@ struct U_I18N_API CollationSettings : public SharedObject { inline uint32_t reorder(uint32_t p) const { uint8_t b = reorderTable[p >> 24]; if(b != 0 || p <= Collation::NO_CE_PRIMARY) { - return ((uint32_t)b << 24) | (p & 0xffffff); + return (static_cast<uint32_t>(b) << 24) | (p & 0xffffff); } else { return reorderEx(p); } @@ -178,7 +178,7 @@ struct U_I18N_API CollationSettings : public SharedObject { void setMaxVariable(int32_t value, int32_t defaultOptions, UErrorCode &errorCode); MaxVariable getMaxVariable() const { - return (MaxVariable)((options & MAX_VARIABLE_MASK) >> MAX_VARIABLE_SHIFT); + return static_cast<MaxVariable>((options & MAX_VARIABLE_MASK) >> MAX_VARIABLE_SHIFT); } /** diff --git a/deps/icu-small/source/i18n/collationtailoring.cpp b/deps/icu-small/source/i18n/collationtailoring.cpp index 8d22cf25166044..63419af74fa71d 100644 --- a/deps/icu-small/source/i18n/collationtailoring.cpp +++ b/deps/icu-small/source/i18n/collationtailoring.cpp @@ -101,7 +101,7 @@ CollationTailoring::setVersion(const UVersionInfo baseVersion, const UVersionInf int32_t CollationTailoring::getUCAVersion() const { - return ((int32_t)version[1] << 4) | (version[2] >> 6); + return (static_cast<int32_t>(version[1]) << 4) | (version[2] >> 6); } CollationCacheEntry::~CollationCacheEntry() { diff --git a/deps/icu-small/source/i18n/collationweights.cpp b/deps/icu-small/source/i18n/collationweights.cpp index 2351484590c9fa..6a4c32bc60158d 100644 --- a/deps/icu-small/source/i18n/collationweights.cpp +++ b/deps/icu-small/source/i18n/collationweights.cpp @@ -42,13 +42,13 @@ U_NAMESPACE_BEGIN static inline uint32_t getWeightTrail(uint32_t weight, int32_t length) { - return (uint32_t)(weight>>(8*(4-length)))&0xff; + return (weight >> (8 * (4 - length))) & 0xff; } static inline uint32_t setWeightTrail(uint32_t weight, int32_t length, uint32_t trail) { length=8*(4-length); - return (uint32_t)((weight&(0xffffff00<<length))|(trail<<length)); + return static_cast<uint32_t>((weight & (0xffffff00 << length)) | (trail << length)); } static inline uint32_t @@ -62,7 +62,7 @@ setWeightByte(uint32_t weight, int32_t idx, uint32_t byte) { idx*=8; if(idx<32) { - mask=((uint32_t)0xffffffff)>>idx; + mask = (static_cast<uint32_t>(0xffffffff)) >> idx; } else { // Do not use uint32_t>>32 because on some platforms that does not shift at all // while we need it to become 0. @@ -77,22 +77,22 @@ setWeightByte(uint32_t weight, int32_t idx, uint32_t byte) { } idx=32-idx; mask|=0xffffff00<<idx; - return (uint32_t)((weight&mask)|(byte<<idx)); + return ((weight & mask) | (byte << idx)); } static inline uint32_t truncateWeight(uint32_t weight, int32_t length) { - return (uint32_t)(weight&(0xffffffff<<(8*(4-length)))); + return static_cast<uint32_t>(weight & (0xffffffff << (8 * (4 - length)))); } static inline uint32_t incWeightTrail(uint32_t weight, int32_t length) { - return (uint32_t)(weight+(1UL<<(8*(4-length)))); + return static_cast<uint32_t>(weight + (1UL << (8 * (4 - length)))); } static inline uint32_t decWeightTrail(uint32_t weight, int32_t length) { - return (uint32_t)(weight-(1UL<<(8*(4-length)))); + return static_cast<uint32_t>(weight - (1UL << (8 * (4 - length)))); } CollationWeights::CollationWeights() @@ -169,7 +169,7 @@ uint32_t CollationWeights::incWeightByOffset(uint32_t weight, int32_t length, int32_t offset) const { for(;;) { offset += getWeightByte(weight, length); - if((uint32_t)offset <= maxBytes[length]) { + if (static_cast<uint32_t>(offset) <= maxBytes[length]) { return setWeightByte(weight, length, offset); } else { // Split the offset between this byte and the previous one. @@ -196,8 +196,8 @@ static int32_t U_CALLCONV compareRanges(const void * /*context*/, const void *left, const void *right) { uint32_t l, r; - l=((const CollationWeights::WeightRange *)left)->start; - r=((const CollationWeights::WeightRange *)right)->start; + l = static_cast<const CollationWeights::WeightRange*>(left)->start; + r = static_cast<const CollationWeights::WeightRange*>(right)->start; if(l<r) { return -1; } else if(l>r) { @@ -295,7 +295,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) { /* set the middle range */ middle.length=middleLength; if(middle.end>=middle.start) { - middle.count=(int32_t)((middle.end-middle.start)>>(8*(4-middleLength)))+1; + middle.count = static_cast<int32_t>((middle.end - middle.start) >> (8 * (4 - middleLength))) + 1; } else { /* no middle range, eliminate overlaps */ for(int32_t length=4; length>middleLength; --length) { @@ -322,8 +322,8 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) { // Intersect these two ranges. lower[length].end=upper[length].end; lower[length].count= - (int32_t)getWeightTrail(lower[length].end, length)- - (int32_t)getWeightTrail(lower[length].start, length)+1; + static_cast<int32_t>(getWeightTrail(lower[length].end, length)) - + static_cast<int32_t>(getWeightTrail(lower[length].start, length)) + 1; // count might be <=0 in which case there is no room, // and the range-collecting code below will ignore this range. merged=true; diff --git a/deps/icu-small/source/i18n/collationweights.h b/deps/icu-small/source/i18n/collationweights.h index 0d20b927b2698c..b893baba80c26e 100644 --- a/deps/icu-small/source/i18n/collationweights.h +++ b/deps/icu-small/source/i18n/collationweights.h @@ -84,7 +84,7 @@ class U_I18N_API CollationWeights : public UMemory { private: /** @return number of usable byte values for byte idx */ inline int32_t countBytes(int32_t idx) const { - return (int32_t)(maxBytes[idx] - minBytes[idx] + 1); + return static_cast<int32_t>(maxBytes[idx] - minBytes[idx] + 1); } uint32_t incWeight(uint32_t weight, int32_t length) const; diff --git a/deps/icu-small/source/i18n/coptccal.cpp b/deps/icu-small/source/i18n/coptccal.cpp index 343bcbc32934e8..feb9ff6d41c279 100644 --- a/deps/icu-small/source/i18n/coptccal.cpp +++ b/deps/icu-small/source/i18n/coptccal.cpp @@ -79,10 +79,11 @@ CopticCalendar::handleGetExtendedYear(UErrorCode& status) } void -CopticCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/) +CopticCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { int32_t eyear, month, day, era, year; - jdToCE(julianDay, getJDEpochOffset(), eyear, month, day); + jdToCE(julianDay, getJDEpochOffset(), eyear, month, day, status); + if (U_FAILURE(status)) return; if (eyear <= 0) { era = BCE; diff --git a/deps/icu-small/source/i18n/cpdtrans.cpp b/deps/icu-small/source/i18n/cpdtrans.cpp index c419153e43c75f..99643da07eb91c 100644 --- a/deps/icu-small/source/i18n/cpdtrans.cpp +++ b/deps/icu-small/source/i18n/cpdtrans.cpp @@ -196,7 +196,7 @@ void CompoundTransliterator::init(UVector& list, // Allocate array if (U_SUCCESS(status)) { count = list.size(); - trans = (Transliterator **)uprv_malloc(count * sizeof(Transliterator *)); + trans = static_cast<Transliterator**>(uprv_malloc(count * sizeof(Transliterator*))); /* test for nullptr */ if (trans == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; @@ -214,7 +214,7 @@ void CompoundTransliterator::init(UVector& list, int32_t i; for (i=0; i<count; ++i) { int32_t j = (direction == UTRANS_FORWARD) ? i : count - 1 - i; - trans[i] = (Transliterator*) list.elementAt(j); + trans[i] = static_cast<Transliterator*>(list.elementAt(j)); } // If the direction is UTRANS_REVERSE then we may need to fix the @@ -296,7 +296,7 @@ CompoundTransliterator& CompoundTransliterator::operator=( if (trans != nullptr) { uprv_free(trans); } - trans = (Transliterator **)uprv_malloc(t.count * sizeof(Transliterator *)); + trans = static_cast<Transliterator**>(uprv_malloc(t.count * sizeof(Transliterator*))); } count = t.count; if (trans != nullptr) { @@ -347,7 +347,7 @@ const Transliterator& CompoundTransliterator::getTransliterator(int32_t index) c void CompoundTransliterator::setTransliterators(Transliterator* const transliterators[], int32_t transCount) { - Transliterator** a = (Transliterator **)uprv_malloc(transCount * sizeof(Transliterator *)); + Transliterator** a = static_cast<Transliterator**>(uprv_malloc(transCount * sizeof(Transliterator*))); if (a == nullptr) { return; } diff --git a/deps/icu-small/source/i18n/csdetect.cpp b/deps/icu-small/source/i18n/csdetect.cpp index 158014351072b0..cedc3c06349038 100644 --- a/deps/icu-small/source/i18n/csdetect.cpp +++ b/deps/icu-small/source/i18n/csdetect.cpp @@ -162,7 +162,7 @@ CharsetDetector::CharsetDetector(UErrorCode &status) return; } - resultArray = (CharsetMatch **)uprv_malloc(sizeof(CharsetMatch *)*fCSRecognizers_size); + resultArray = static_cast<CharsetMatch**>(uprv_malloc(sizeof(CharsetMatch*) * fCSRecognizers_size)); if (resultArray == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; @@ -459,7 +459,7 @@ UEnumeration * CharsetDetector::getAllDetectableCharsets(UErrorCode &status) return nullptr; } uprv_memset(en->context, 0, sizeof(Context)); - ((Context*)en->context)->all = true; + static_cast<Context*>(en->context)->all = true; return en; } @@ -482,8 +482,8 @@ UEnumeration * CharsetDetector::getDetectableCharsets(UErrorCode &status) const return nullptr; } uprv_memset(en->context, 0, sizeof(Context)); - ((Context*)en->context)->all = false; - ((Context*)en->context)->enabledRecognizers = fEnabledRecognizers; + static_cast<Context*>(en->context)->all = false; + static_cast<Context*>(en->context)->enabledRecognizers = fEnabledRecognizers; return en; } diff --git a/deps/icu-small/source/i18n/csmatch.cpp b/deps/icu-small/source/i18n/csmatch.cpp index 4c5f73b31b0387..35a84c76f28284 100644 --- a/deps/icu-small/source/i18n/csmatch.cpp +++ b/deps/icu-small/source/i18n/csmatch.cpp @@ -61,7 +61,7 @@ int32_t CharsetMatch::getConfidence()const int32_t CharsetMatch::getUChars(char16_t *buf, int32_t cap, UErrorCode *status) const { UConverter *conv = ucnv_open(getName(), status); - int32_t result = ucnv_toUChars(conv, buf, cap, (const char *) textIn->fRawInput, textIn->fRawLength, status); + int32_t result = ucnv_toUChars(conv, buf, cap, reinterpret_cast<const char*>(textIn->fRawInput), textIn->fRawLength, status); ucnv_close(conv); diff --git a/deps/icu-small/source/i18n/csr2022.cpp b/deps/icu-small/source/i18n/csr2022.cpp index e064c426a2a26c..9de668a8a07dac 100644 --- a/deps/icu-small/source/i18n/csr2022.cpp +++ b/deps/icu-small/source/i18n/csr2022.cpp @@ -46,7 +46,7 @@ int32_t CharsetRecog_2022::match_2022(const uint8_t *text, int32_t textLen, cons escN = 0; while(escN < escapeSequences_length) { const uint8_t *seq = escapeSequences[escN]; - int32_t seq_length = (int32_t)uprv_strlen((const char *) seq); + int32_t seq_length = static_cast<int32_t>(uprv_strlen((const char*)seq)); if (textLen-i >= seq_length) { j = 1; diff --git a/deps/icu-small/source/i18n/csrmbcs.cpp b/deps/icu-small/source/i18n/csrmbcs.cpp index a6bd1d3a1e3763..cb78a3433b2a7e 100644 --- a/deps/icu-small/source/i18n/csrmbcs.cpp +++ b/deps/icu-small/source/i18n/csrmbcs.cpp @@ -219,9 +219,9 @@ int32_t CharsetRecog_mbcs::match_mbcs(InputText *det, const uint16_t commonChars // Frequency of occurrence statistics exist. // - double maxVal = log((double)doubleByteCharCount / 4); /*(float)?*/ + double maxVal = log(static_cast<double>(doubleByteCharCount) / 4); /*(float)?*/ double scaleFactor = 90.0 / maxVal; - confidence = (int32_t)(log((double)commonCharCount+1) * scaleFactor + 10.0); + confidence = static_cast<int32_t>(log(static_cast<double>(commonCharCount) + 1) * scaleFactor + 10.0); confidence = min(confidence, 100); } diff --git a/deps/icu-small/source/i18n/csrsbcs.cpp b/deps/icu-small/source/i18n/csrsbcs.cpp index 92af9b5291b9ff..de2ad314b02646 100644 --- a/deps/icu-small/source/i18n/csrsbcs.cpp +++ b/deps/icu-small/source/i18n/csrsbcs.cpp @@ -127,7 +127,7 @@ int32_t NGramParser::parse(InputText *det) // TODO: Is this OK? The buffer could have ended in the middle of a word... addByte(0x20); - double rawPercent = (double) hitCount / (double) ngramCount; + double rawPercent = static_cast<double>(hitCount) / static_cast<double>(ngramCount); // if (rawPercent <= 2.0) { // return 0; @@ -139,7 +139,7 @@ int32_t NGramParser::parse(InputText *det) return 98; } - return (int32_t) (rawPercent * 300.0); + return static_cast<int32_t>(rawPercent * 300.0); } #if !UCONFIG_ONLY_HTML_CONVERSION diff --git a/deps/icu-small/source/i18n/currpinf.cpp b/deps/icu-small/source/i18n/currpinf.cpp index 7c5adaaf7c39f4..6f43ecb2fedfbe 100644 --- a/deps/icu-small/source/i18n/currpinf.cpp +++ b/deps/icu-small/source/i18n/currpinf.cpp @@ -185,12 +185,12 @@ UnicodeString& CurrencyPluralInfo::getCurrencyPluralPattern(const UnicodeString& pluralCount, UnicodeString& result) const { const UnicodeString* currencyPluralPattern = - (UnicodeString*)fPluralCountToCurrencyUnitPattern->get(pluralCount); + static_cast<UnicodeString*>(fPluralCountToCurrencyUnitPattern->get(pluralCount)); if (currencyPluralPattern == nullptr) { // fall back to "other" if (pluralCount.compare(gPluralCountOther, 5)) { currencyPluralPattern = - (UnicodeString*)fPluralCountToCurrencyUnitPattern->get(UnicodeString(true, gPluralCountOther, 5)); + static_cast<UnicodeString*>(fPluralCountToCurrencyUnitPattern->get(UnicodeString(true, gPluralCountOther, 5))); } if (currencyPluralPattern == nullptr) { // no currencyUnitPatterns defined, @@ -388,7 +388,7 @@ CurrencyPluralInfo::deleteHash(Hashtable* hTable) { const UHashElement* element = nullptr; while ( (element = hTable->nextElement(pos)) != nullptr ) { const UHashTok valueTok = element->value; - const UnicodeString* value = (UnicodeString*)valueTok.pointer; + const UnicodeString* value = static_cast<UnicodeString*>(valueTok.pointer); delete value; } delete hTable; @@ -420,9 +420,9 @@ CurrencyPluralInfo::copyHash(const Hashtable* source, if (source) { while ( (element = source->nextElement(pos)) != nullptr ) { const UHashTok keyTok = element->key; - const UnicodeString* key = (UnicodeString*)keyTok.pointer; + const UnicodeString* key = static_cast<UnicodeString*>(keyTok.pointer); const UHashTok valueTok = element->value; - const UnicodeString* value = (UnicodeString*)valueTok.pointer; + const UnicodeString* value = static_cast<UnicodeString*>(valueTok.pointer); LocalPointer<UnicodeString> copy(new UnicodeString(*value), status); if (U_FAILURE(status)) { return; diff --git a/deps/icu-small/source/i18n/dangical.cpp b/deps/icu-small/source/i18n/dangical.cpp index e1cf629537175b..64e7e0be02f676 100644 --- a/deps/icu-small/source/i18n/dangical.cpp +++ b/deps/icu-small/source/i18n/dangical.cpp @@ -122,9 +122,9 @@ const char *DangiCalendar::getType() const { */ static void U_CALLCONV initAstronomerTimeZone(UErrorCode &status) { U_ASSERT(gAstronomerTimeZone == nullptr); - const UDate millis1897[] = { (UDate)((1897 - 1970) * 365 * kOneDay) }; // some days of error is not a problem here - const UDate millis1898[] = { (UDate)((1898 - 1970) * 365 * kOneDay) }; // some days of error is not a problem here - const UDate millis1912[] = { (UDate)((1912 - 1970) * 365 * kOneDay) }; // this doesn't create an issue for 1911/12/20 + const UDate millis1897[] = { static_cast<UDate>((1897 - 1970) * 365 * kOneDay) }; // some days of error is not a problem here + const UDate millis1898[] = { static_cast<UDate>((1898 - 1970) * 365 * kOneDay) }; // some days of error is not a problem here + const UDate millis1912[] = { static_cast<UDate>((1912 - 1970) * 365 * kOneDay) }; // this doesn't create an issue for 1911/12/20 LocalPointer<InitialTimeZoneRule> initialTimeZone(new InitialTimeZoneRule( UnicodeString(u"GMT+8"), 8*kOneHour, 0), status); diff --git a/deps/icu-small/source/i18n/datefmt.cpp b/deps/icu-small/source/i18n/datefmt.cpp index c62201988f64fa..655cfbd1239daa 100644 --- a/deps/icu-small/source/i18n/datefmt.cpp +++ b/deps/icu-small/source/i18n/datefmt.cpp @@ -89,7 +89,7 @@ class DateFmtBestPatternKey : public LocaleCacheKey<DateFmtBestPattern> { fSkeleton(other.fSkeleton) { } virtual ~DateFmtBestPatternKey(); virtual int32_t hashCode() const override { - return (int32_t)(37u * (uint32_t)LocaleCacheKey<DateFmtBestPattern>::hashCode() + (uint32_t)fSkeleton.hashCode()); + return static_cast<int32_t>(37u * static_cast<uint32_t>(LocaleCacheKey<DateFmtBestPattern>::hashCode()) + static_cast<uint32_t>(fSkeleton.hashCode())); } inline bool operator==(const DateFmtBestPatternKey &other) const { return fSkeleton == other.fSkeleton; @@ -207,10 +207,10 @@ DateFormat::format(const Formattable& obj, date = obj.getDate(); break; case Formattable::kDouble: - date = (UDate)obj.getDouble(); + date = static_cast<UDate>(obj.getDouble()); break; case Formattable::kLong: - date = (UDate)obj.getLong(); + date = static_cast<UDate>(obj.getLong()); break; default: status = U_ILLEGAL_ARGUMENT_ERROR; @@ -242,10 +242,10 @@ DateFormat::format(const Formattable& obj, date = obj.getDate(); break; case Formattable::kDouble: - date = (UDate)obj.getDouble(); + date = static_cast<UDate>(obj.getDouble()); break; case Formattable::kLong: - date = (UDate)obj.getLong(); + date = static_cast<UDate>(obj.getLong()); break; default: status = U_ILLEGAL_ARGUMENT_ERROR; @@ -430,7 +430,7 @@ DateFormat::createDateTimeInstance(EStyle dateStyle, { if(dateStyle != kNone) { - dateStyle = (EStyle) (dateStyle + kDateOffset); + dateStyle = static_cast<EStyle>(dateStyle + kDateOffset); } return create(timeStyle, dateStyle, aLocale); } @@ -540,7 +540,7 @@ DateFormat::create(EStyle timeStyle, EStyle dateStyle, const Locale& locale) // is it relative? if(/*((timeStyle!=UDAT_NONE)&&(timeStyle & UDAT_RELATIVE)) || */((dateStyle!=kNone)&&((dateStyle-kDateOffset) & UDAT_RELATIVE))) { - RelativeDateFormat *r = new RelativeDateFormat((UDateFormatStyle)timeStyle, (UDateFormatStyle)(dateStyle-kDateOffset), locale, status); + RelativeDateFormat* r = new RelativeDateFormat(static_cast<UDateFormatStyle>(timeStyle), static_cast<UDateFormatStyle>(dateStyle - kDateOffset), locale, status); if(U_SUCCESS(status)) return r; delete r; status = U_ZERO_ERROR; @@ -719,7 +719,7 @@ void DateFormat::setContext(UDisplayContext value, UErrorCode& status) { if (U_FAILURE(status)) return; - if ( (UDisplayContextType)((uint32_t)value >> 8) == UDISPCTX_TYPE_CAPITALIZATION ) { + if (static_cast<UDisplayContextType>(static_cast<uint32_t>(value) >> 8) == UDISPCTX_TYPE_CAPITALIZATION) { fCapitalizationContext = value; } else { status = U_ILLEGAL_ARGUMENT_ERROR; @@ -733,10 +733,10 @@ void DateFormat::setContext(UDisplayContext value, UErrorCode& status) UDisplayContext DateFormat::getContext(UDisplayContextType type, UErrorCode& status) const { if (U_FAILURE(status)) - return (UDisplayContext)0; + return static_cast<UDisplayContext>(0); if (type != UDISPCTX_TYPE_CAPITALIZATION) { status = U_ILLEGAL_ARGUMENT_ERROR; - return (UDisplayContext)0; + return static_cast<UDisplayContext>(0); } return fCapitalizationContext; } @@ -763,7 +763,7 @@ DateFormat::setBooleanAttribute(UDateFormatBooleanAttribute attr, UBool DateFormat::getBooleanAttribute(UDateFormatBooleanAttribute attr, UErrorCode &/*status*/) const { - return static_cast<UBool>(fBoolFlags.get(attr)); + return fBoolFlags.get(attr); } U_NAMESPACE_END diff --git a/deps/icu-small/source/i18n/dcfmtsym.cpp b/deps/icu-small/source/i18n/dcfmtsym.cpp index ac1f777399ad30..b4c90e6765a7df 100644 --- a/deps/icu-small/source/i18n/dcfmtsym.cpp +++ b/deps/icu-small/source/i18n/dcfmtsym.cpp @@ -154,11 +154,11 @@ DecimalFormatSymbols& DecimalFormatSymbols::operator=(const DecimalFormatSymbols& rhs) { if (this != &rhs) { - for(int32_t i = 0; i < (int32_t)kFormatSymbolCount; ++i) { + for (int32_t i = 0; i < static_cast<int32_t>(kFormatSymbolCount); ++i) { // fastCopyFrom is safe, see docs on fSymbols - fSymbols[(ENumberFormatSymbol)i].fastCopyFrom(rhs.fSymbols[(ENumberFormatSymbol)i]); + fSymbols[static_cast<ENumberFormatSymbol>(i)].fastCopyFrom(rhs.fSymbols[static_cast<ENumberFormatSymbol>(i)]); } - for(int32_t i = 0; i < (int32_t)UNUM_CURRENCY_SPACING_COUNT; ++i) { + for (int32_t i = 0; i < static_cast<int32_t>(UNUM_CURRENCY_SPACING_COUNT); ++i) { currencySpcBeforeSym[i].fastCopyFrom(rhs.currencySpcBeforeSym[i]); currencySpcAfterSym[i].fastCopyFrom(rhs.currencySpcAfterSym[i]); } @@ -188,12 +188,12 @@ DecimalFormatSymbols::operator==(const DecimalFormatSymbols& that) const if (fIsCustomIntlCurrencySymbol != that.fIsCustomIntlCurrencySymbol) { return false; } - for(int32_t i = 0; i < (int32_t)kFormatSymbolCount; ++i) { - if(fSymbols[(ENumberFormatSymbol)i] != that.fSymbols[(ENumberFormatSymbol)i]) { + for (int32_t i = 0; i < static_cast<int32_t>(kFormatSymbolCount); ++i) { + if (fSymbols[static_cast<ENumberFormatSymbol>(i)] != that.fSymbols[static_cast<ENumberFormatSymbol>(i)]) { return false; } } - for(int32_t i = 0; i < (int32_t)UNUM_CURRENCY_SPACING_COUNT; ++i) { + for (int32_t i = 0; i < static_cast<int32_t>(UNUM_CURRENCY_SPACING_COUNT); ++i) { if(currencySpcBeforeSym[i] != that.currencySpcBeforeSym[i]) { return false; } @@ -242,7 +242,7 @@ struct DecFmtSymDataSink : public ResourceSink { if (!seenSymbol[i]) { seenSymbol[i] = true; dfs.setSymbol( - (DecimalFormatSymbols::ENumberFormatSymbol) i, + static_cast<DecimalFormatSymbols::ENumberFormatSymbol>(i), value.getUnicodeString(errorCode)); if (U_FAILURE(errorCode)) { return; } } @@ -331,11 +331,11 @@ struct CurrencySpacingSink : public ResourceSink { static const char* defaults[] = { "[:letter:]", "[:digit:]", " " }; if (!hasBeforeCurrency || !hasAfterCurrency) { for (int32_t pattern = 0; pattern < UNUM_CURRENCY_SPACING_COUNT; pattern++) { - dfs.setPatternForCurrencySpacing((UCurrencySpacing)pattern, + dfs.setPatternForCurrencySpacing(static_cast<UCurrencySpacing>(pattern), false, UnicodeString(defaults[pattern], -1, US_INV)); } for (int32_t pattern = 0; pattern < UNUM_CURRENCY_SPACING_COUNT; pattern++) { - dfs.setPatternForCurrencySpacing((UCurrencySpacing)pattern, + dfs.setPatternForCurrencySpacing(static_cast<UCurrencySpacing>(pattern), true, UnicodeString(defaults[pattern], -1, US_INV)); } } @@ -485,34 +485,34 @@ DecimalFormatSymbols::initialize() { * cannot initialize a static array with class constructors. * markus 2000may25 */ - fSymbols[kDecimalSeparatorSymbol] = (char16_t)0x2e; // '.' decimal separator + fSymbols[kDecimalSeparatorSymbol] = static_cast<char16_t>(0x2e); // '.' decimal separator fSymbols[kGroupingSeparatorSymbol].remove(); // group (thousands) separator - fSymbols[kPatternSeparatorSymbol] = (char16_t)0x3b; // ';' pattern separator - fSymbols[kPercentSymbol] = (char16_t)0x25; // '%' percent sign - fSymbols[kZeroDigitSymbol] = (char16_t)0x30; // '0' native 0 digit - fSymbols[kOneDigitSymbol] = (char16_t)0x31; // '1' native 1 digit - fSymbols[kTwoDigitSymbol] = (char16_t)0x32; // '2' native 2 digit - fSymbols[kThreeDigitSymbol] = (char16_t)0x33; // '3' native 3 digit - fSymbols[kFourDigitSymbol] = (char16_t)0x34; // '4' native 4 digit - fSymbols[kFiveDigitSymbol] = (char16_t)0x35; // '5' native 5 digit - fSymbols[kSixDigitSymbol] = (char16_t)0x36; // '6' native 6 digit - fSymbols[kSevenDigitSymbol] = (char16_t)0x37; // '7' native 7 digit - fSymbols[kEightDigitSymbol] = (char16_t)0x38; // '8' native 8 digit - fSymbols[kNineDigitSymbol] = (char16_t)0x39; // '9' native 9 digit - fSymbols[kDigitSymbol] = (char16_t)0x23; // '#' pattern digit - fSymbols[kPlusSignSymbol] = (char16_t)0x002b; // '+' plus sign - fSymbols[kMinusSignSymbol] = (char16_t)0x2d; // '-' minus sign - fSymbols[kCurrencySymbol] = (char16_t)0xa4; // 'OX' currency symbol + fSymbols[kPatternSeparatorSymbol] = static_cast<char16_t>(0x3b); // ';' pattern separator + fSymbols[kPercentSymbol] = static_cast<char16_t>(0x25); // '%' percent sign + fSymbols[kZeroDigitSymbol] = static_cast<char16_t>(0x30); // '0' native 0 digit + fSymbols[kOneDigitSymbol] = static_cast<char16_t>(0x31); // '1' native 1 digit + fSymbols[kTwoDigitSymbol] = static_cast<char16_t>(0x32); // '2' native 2 digit + fSymbols[kThreeDigitSymbol] = static_cast<char16_t>(0x33); // '3' native 3 digit + fSymbols[kFourDigitSymbol] = static_cast<char16_t>(0x34); // '4' native 4 digit + fSymbols[kFiveDigitSymbol] = static_cast<char16_t>(0x35); // '5' native 5 digit + fSymbols[kSixDigitSymbol] = static_cast<char16_t>(0x36); // '6' native 6 digit + fSymbols[kSevenDigitSymbol] = static_cast<char16_t>(0x37); // '7' native 7 digit + fSymbols[kEightDigitSymbol] = static_cast<char16_t>(0x38); // '8' native 8 digit + fSymbols[kNineDigitSymbol] = static_cast<char16_t>(0x39); // '9' native 9 digit + fSymbols[kDigitSymbol] = static_cast<char16_t>(0x23); // '#' pattern digit + fSymbols[kPlusSignSymbol] = static_cast<char16_t>(0x002b); // '+' plus sign + fSymbols[kMinusSignSymbol] = static_cast<char16_t>(0x2d); // '-' minus sign + fSymbols[kCurrencySymbol] = static_cast<char16_t>(0xa4); // 'OX' currency symbol fSymbols[kIntlCurrencySymbol].setTo(true, INTL_CURRENCY_SYMBOL_STR, 2); - fSymbols[kMonetarySeparatorSymbol] = (char16_t)0x2e; // '.' monetary decimal separator - fSymbols[kExponentialSymbol] = (char16_t)0x45; // 'E' exponential - fSymbols[kPerMillSymbol] = (char16_t)0x2030; // '%o' per mill - fSymbols[kPadEscapeSymbol] = (char16_t)0x2a; // '*' pad escape symbol - fSymbols[kInfinitySymbol] = (char16_t)0x221e; // 'oo' infinite - fSymbols[kNaNSymbol] = (char16_t)0xfffd; // SUB NaN - fSymbols[kSignificantDigitSymbol] = (char16_t)0x0040; // '@' significant digit + fSymbols[kMonetarySeparatorSymbol] = static_cast<char16_t>(0x2e); // '.' monetary decimal separator + fSymbols[kExponentialSymbol] = static_cast<char16_t>(0x45); // 'E' exponential + fSymbols[kPerMillSymbol] = static_cast<char16_t>(0x2030); // '%o' per mill + fSymbols[kPadEscapeSymbol] = static_cast<char16_t>(0x2a); // '*' pad escape symbol + fSymbols[kInfinitySymbol] = static_cast<char16_t>(0x221e); // 'oo' infinite + fSymbols[kNaNSymbol] = static_cast<char16_t>(0xfffd); // SUB NaN + fSymbols[kSignificantDigitSymbol] = static_cast<char16_t>(0x0040); // '@' significant digit fSymbols[kMonetaryGroupingSeparatorSymbol].remove(); // - fSymbols[kExponentMultiplicationSymbol] = (char16_t)0xd7; // 'x' multiplication symbol for exponents + fSymbols[kExponentMultiplicationSymbol] = static_cast<char16_t>(0xd7); // 'x' multiplication symbol for exponents fSymbols[kApproximatelySignSymbol] = u'~'; // '~' approximately sign fIsCustomCurrencySymbol = false; fIsCustomIntlCurrencySymbol = false; @@ -551,11 +551,11 @@ void DecimalFormatSymbols::setCurrency(const char16_t* currency, UErrorCode& sta ures_getByIndex(rb.getAlias(), 2, rb.getAlias(), &localStatus); int32_t currPatternLen = 0; currPattern = - ures_getStringByIndex(rb.getAlias(), (int32_t)0, &currPatternLen, &localStatus); + ures_getStringByIndex(rb.getAlias(), static_cast<int32_t>(0), &currPatternLen, &localStatus); UnicodeString decimalSep = - ures_getUnicodeStringByIndex(rb.getAlias(), (int32_t)1, &localStatus); + ures_getUnicodeStringByIndex(rb.getAlias(), static_cast<int32_t>(1), &localStatus); UnicodeString groupingSep = - ures_getUnicodeStringByIndex(rb.getAlias(), (int32_t)2, &localStatus); + ures_getUnicodeStringByIndex(rb.getAlias(), static_cast<int32_t>(2), &localStatus); if(U_SUCCESS(localStatus)){ fSymbols[kMonetaryGroupingSeparatorSymbol] = groupingSep; fSymbols[kMonetarySeparatorSymbol] = decimalSep; @@ -580,9 +580,9 @@ DecimalFormatSymbols::getPatternForCurrencySpacing(UCurrencySpacing type, return fNoSymbol; // always empty. } if (beforeCurrency) { - return currencySpcBeforeSym[(int32_t)type]; + return currencySpcBeforeSym[static_cast<int32_t>(type)]; } else { - return currencySpcAfterSym[(int32_t)type]; + return currencySpcAfterSym[static_cast<int32_t>(type)]; } } @@ -591,9 +591,9 @@ DecimalFormatSymbols::setPatternForCurrencySpacing(UCurrencySpacing type, UBool beforeCurrency, const UnicodeString& pattern) { if (beforeCurrency) { - currencySpcBeforeSym[(int32_t)type] = pattern; + currencySpcBeforeSym[static_cast<int32_t>(type)] = pattern; } else { - currencySpcAfterSym[(int32_t)type] = pattern; + currencySpcAfterSym[static_cast<int32_t>(type)] = pattern; } } U_NAMESPACE_END diff --git a/deps/icu-small/source/i18n/decNumber.cpp b/deps/icu-small/source/i18n/decNumber.cpp index e21ebfb04f8da7..96ad3d7f986aed 100644 --- a/deps/icu-small/source/i18n/decNumber.cpp +++ b/deps/icu-small/source/i18n/decNumber.cpp @@ -3876,7 +3876,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, /* [following code does not require input rounding] */ /* note whether signs differ [used all paths] */ - diffsign=(Flag)((lhs->bits^rhs->bits^negate)&DECNEG); + diffsign = static_cast<Flag>((lhs->bits ^ rhs->bits ^ negate) & DECNEG); /* handle infinities and NaNs */ if (SPECIALARGS) { /* a special bit set */ @@ -3982,9 +3982,9 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, partial+=*rhs->lsu; if ((partial<=DECDPUNMAX) /* result fits in unit */ && (lhs->digits>=DECDPUN || /* .. and no digits-count change */ - partial<(Int)powers[lhs->digits])) { /* .. */ + partial < static_cast<Int>(powers[lhs->digits]))) { /* .. */ if (res!=lhs) uprv_decNumberCopy(res, lhs); /* not in place */ - *res->lsu=(Unit)partial; /* [copy could have overwritten RHS] */ + *res->lsu = static_cast<Unit>(partial); /* [copy could have overwritten RHS] */ break; } /* else drop out for careful add */ @@ -3993,7 +3993,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, partial-=*rhs->lsu; if (partial>0) { /* no borrow needed, and non-0 result */ if (res!=lhs) uprv_decNumberCopy(res, lhs); /* not in place */ - *res->lsu=(Unit)partial; + *res->lsu = static_cast<Unit>(partial); /* this could have reduced digits [but result>0] */ res->digits=decGetDigits(res->lsu, D2U(res->digits)); break; @@ -4022,7 +4022,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, if (padding<0) { /* LHS needs the padding */ const decNumber *t; padding=-padding; /* will be +ve */ - bits=(uByte)(rhs->bits^negate); /* assumed sign is now that of RHS */ + bits = static_cast<uByte>(rhs->bits ^ negate); /* assumed sign is now that of RHS */ t=lhs; lhs=rhs; rhs=t; swapped=1; } @@ -4073,7 +4073,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, acc=accbuff; /* assume use local buffer */ if (need*sizeof(Unit)>sizeof(accbuff)) { /* printf("malloc add %ld %ld\n", need, sizeof(accbuff)); */ - allocacc=(Unit *)malloc(need*sizeof(Unit)); + allocacc = static_cast<Unit*>(malloc(need * sizeof(Unit))); if (allocacc==nullptr) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} @@ -4081,7 +4081,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs, } } - res->bits=(uByte)(bits&DECNEG); /* it's now safe to overwrite.. */ + res->bits = static_cast<uByte>(bits & DECNEG); /* it's now safe to overwrite.. */ res->exponent=lhs->exponent; /* .. operands (even if aliased) */ #if DECTRACE @@ -4438,7 +4438,7 @@ static decNumber * decDivideOp(decNumber *res, acclength=D2U(reqdigits+DECDPUN); /* in Units */ if (acclength*sizeof(Unit)>sizeof(accbuff)) { /* printf("malloc dvacc %ld units\n", acclength); */ - allocacc=(Unit *)malloc(acclength*sizeof(Unit)); + allocacc = static_cast<Unit*>(malloc(acclength * sizeof(Unit))); if (allocacc==nullptr) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} @@ -4463,7 +4463,7 @@ static decNumber * decDivideOp(decNumber *res, if (!(op&DIVIDE)) var1units++; if ((var1units+1)*sizeof(Unit)>sizeof(varbuff)) { /* printf("malloc dvvar %ld units\n", var1units+1); */ - varalloc=(Unit *)malloc((var1units+1)*sizeof(Unit)); + varalloc = static_cast<Unit*>(malloc((var1units + 1) * sizeof(Unit))); if (varalloc==nullptr) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} @@ -4491,7 +4491,7 @@ static decNumber * decDivideOp(decNumber *res, /* 1 to make sure that the multiplier is never overestimated. */ msu2plus=*msu2; /* it's value .. */ if (var2units>1) msu2plus++; /* .. +1 if any more */ - msu2pair=(eInt)*msu2*(DECDPUNMAX+1);/* top two pair .. */ + msu2pair = static_cast<eInt>(*msu2) * (DECDPUNMAX + 1); /* top two pair .. */ if (var2units>1) { /* .. [else treat 2nd as 0] */ msu2pair+=*(msu2-1); /* .. */ if (var2units>2) msu2pair++; /* .. +1 if any more */ @@ -4573,16 +4573,16 @@ static decNumber * decDivideOp(decNumber *res, /* *pv1>v2. Prepare for real subtraction; the lengths are equal */ /* Estimate the multiplier (there's always a msu1-1)... */ /* Bring in two units of var2 to provide a good estimate. */ - mult=(Int)(((eInt)*msu1*(DECDPUNMAX+1)+*(msu1-1))/msu2pair); + mult = static_cast<Int>((static_cast<eInt>(*msu1) * (DECDPUNMAX + 1) + *(msu1 - 1)) / msu2pair); } /* lengths the same */ else { /* var1units > var2ulen, so subtraction is safe */ /* The var2 msu is one unit towards the lsu of the var1 msu, */ /* so only one unit for var2 can be used. */ - mult=(Int)(((eInt)*msu1*(DECDPUNMAX+1)+*(msu1-1))/msu2plus); + mult = static_cast<Int>((static_cast<eInt>(*msu1) * (DECDPUNMAX + 1) + *(msu1 - 1)) / msu2plus); } if (mult==0) mult=1; /* must always be at least 1 */ /* subtraction needed; var1 is > var2 */ - thisunit=(Unit)(thisunit+mult); /* accumulate */ + thisunit = static_cast<Unit>(thisunit + mult); /* accumulate */ /* subtract var1-var2, into var1; only the overlap needs */ /* processing, as this is an in-place calculation */ shift=var2ulen-var2units; @@ -4706,7 +4706,7 @@ static decNumber * decDivideOp(decNumber *res, if (set->extended) #endif res->exponent=exp; /* .. with proper exponent */ - res->bits=(uByte)(bits&DECNEG); /* [cleaned] */ + res->bits = static_cast<uByte>(bits & DECNEG); /* [cleaned] */ decFinish(res, set, &residue, status); /* might clamp */ break; } @@ -4797,7 +4797,7 @@ static decNumber * decDivideOp(decNumber *res, /* subtract [A+B*(-m)]; the result will always be negative */ accunits=-decUnitAddSub(accnext, accunits, rhs->lsu, D2U(rhs->digits), - expunits, accnext, -(Int)powers[exprem]); + expunits, accnext, -static_cast<Int>(powers[exprem])); accdigits=decGetDigits(accnext, accunits); /* count digits exactly */ accunits=D2U(accdigits); /* and recalculate the units for copy */ /* [exponent is as for original remainder] */ @@ -4809,7 +4809,7 @@ static decNumber * decDivideOp(decNumber *res, /* Set exponent and bits */ res->exponent=exponent; - res->bits=(uByte)(bits&DECNEG); /* [cleaned] */ + res->bits = static_cast<uByte>(bits & DECNEG); /* [cleaned] */ /* Now the coefficient. */ decSetCoeff(res, set, accnext, accdigits, &residue, status); @@ -4934,7 +4934,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, #endif /* precalculate result sign */ - bits=(uByte)((lhs->bits^rhs->bits)&DECNEG); + bits = static_cast<uByte>((lhs->bits ^ rhs->bits) & DECNEG); /* handle infinities and NaNs */ if (SPECIALARGS) { /* a special bit set */ @@ -4990,12 +4990,12 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* allocate buffers if required, as usual */ needbytes=ilhs*sizeof(uInt); - if (needbytes>(Int)sizeof(zlhibuff)) { - alloclhi=(uInt *)malloc(needbytes); + if (needbytes > static_cast<Int>(sizeof(zlhibuff))) { + alloclhi = static_cast<uInt*>(malloc(needbytes)); zlhi=alloclhi;} needbytes=irhs*sizeof(uInt); - if (needbytes>(Int)sizeof(zrhibuff)) { - allocrhi=(uInt *)malloc(needbytes); + if (needbytes > static_cast<Int>(sizeof(zrhibuff))) { + allocrhi = static_cast<uInt*>(malloc(needbytes)); zrhi=allocrhi;} /* Allocating the accumulator space needs a special case when */ @@ -5014,14 +5014,14 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, zoff=(iacc+7)/8; /* items to offset by */ needbytes+=zoff*8; #endif - if (needbytes>(Int)sizeof(zaccbuff)) { - allocacc=(uLong *)malloc(needbytes); - zacc=(uLong *)allocacc;} + if (needbytes > static_cast<Int>(sizeof(zaccbuff))) { + allocacc = static_cast<uLong*>(malloc(needbytes)); + zacc = static_cast<uLong*>(allocacc);} if (zlhi==nullptr||zrhi==nullptr||zacc==nullptr) { *status|=DEC_Insufficient_storage; break;} - acc=(Unit *)zacc; /* -> target Unit array */ + acc = reinterpret_cast<Unit*>(zacc); /* -> target Unit array */ #if DECDPUN==1 zacc+=zoff; /* start uLong accumulator to right */ #endif @@ -5062,7 +5062,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, for (rip=zrhi; rip<=rmsi; rip++) { /* over each item in rhs */ lp=zacc+(rip-zrhi); /* where to add the lhs */ for (lip=zlhi; lip<=lmsi; lip++, lp++) { /* over each item in lhs */ - *lp+=(uLong)(*lip)*(*rip); /* [this should in-line] */ + *lp += static_cast<uLong>(*lip) * (*rip); /* [this should in-line] */ } /* lip loop */ lazy--; if (lazy>0 && rip!=rmsi) continue; @@ -5075,15 +5075,15 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* and occasional extra divide (slow) is well worth it, as */ /* it allows FASTLAZY to be increased to 18 rather than 4 */ /* in the FASTDIGS=9 case */ - if (lcarry<FASTBASE) carry=(uInt)lcarry; /* [usual] */ + if (lcarry<FASTBASE) carry = static_cast<uInt>(lcarry); /* [usual] */ else { /* two-place carry [fairly rare] */ - uInt carry2=(uInt)(lcarry/FASTBASE); /* top top part */ + uInt carry2 = static_cast<uInt>(lcarry / FASTBASE); /* top top part */ *(lp+2)+=carry2; /* add to item+2 */ - *lp-=((uLong)FASTBASE*FASTBASE*carry2); /* [slow] */ - carry=(uInt)(lcarry-((uLong)FASTBASE*carry2)); /* [inline] */ + *lp -= (static_cast<uLong>(FASTBASE) * FASTBASE * carry2); /* [slow] */ + carry = static_cast<uInt>(lcarry - (static_cast<uLong>(FASTBASE) * carry2)); /* [inline] */ } *(lp+1)+=carry; /* add to item above [inline] */ - *lp-=((uLong)FASTBASE*carry); /* [inline] */ + *lp -= (static_cast<uLong>(FASTBASE) * carry); /* [inline] */ } /* carry resolution */ } /* rip loop */ @@ -5094,13 +5094,13 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* each item in the accumulator (which will become up to N */ /* units, where 2<=N<=9). */ for (lp=zacc, up=acc; lp<zacc+iacc; lp++) { - uInt item=(uInt)*lp; /* decapitate to uInt */ + uInt item = static_cast<uInt>(*lp); /* decapitate to uInt */ for (p=0; p<FASTDIGS-DECDPUN; p+=DECDPUN, up++) { uInt part=item/(DECDPUNMAX+1); - *up=(Unit)(item-(part*(DECDPUNMAX+1))); + *up = static_cast<Unit>(item - (part * (DECDPUNMAX + 1))); item=part; } /* p */ - *up=(Unit)item; up++; /* [final needs no division] */ + *up = static_cast<Unit>(item); up++; /* [final needs no division] */ } /* lp */ accunits = static_cast<int32_t>(up-acc); /* count of units */ } @@ -5110,10 +5110,10 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, /* if accumulator will be too long for local storage, then allocate */ acc=accbuff; /* -> assume buffer for accumulator */ needbytes=(D2U(lhs->digits)+D2U(rhs->digits))*sizeof(Unit); - if (needbytes>(Int)sizeof(accbuff)) { - allocacc=(Unit *)malloc(needbytes); + if (needbytes > static_cast<Int>(sizeof(accbuff))) { + allocacc = static_cast<Unit*>(malloc(needbytes)); if (allocacc==nullptr) {*status|=DEC_Insufficient_storage; break;} - acc=(Unit *)allocacc; /* use the allocated space */ + acc = static_cast<Unit*>(allocacc); /* use the allocated space */ } /* Now the main long multiplication loop */ @@ -5398,7 +5398,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, decNumber *newrhs=bufr; /* assume will fit on stack */ needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit); if (needbytes>sizeof(bufr)) { /* need malloc space */ - allocrhs=(decNumber *)malloc(needbytes); + allocrhs = static_cast<decNumber*>(malloc(needbytes)); if (allocrhs==nullptr) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} @@ -5430,7 +5430,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, /* sufficiently exact. */ needbytes=sizeof(decNumber)+(D2U(p*2)-1)*sizeof(Unit); if (needbytes>sizeof(bufa)) { /* need malloc space */ - allocbufa=(decNumber *)malloc(needbytes); + allocbufa = static_cast<decNumber*>(malloc(needbytes)); if (allocbufa==nullptr) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} @@ -5442,7 +5442,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs, /* calculation below, which needs an extra two digits */ needbytes=sizeof(decNumber)+(D2U(p+2)-1)*sizeof(Unit); if (needbytes>sizeof(buft)) { /* need malloc space */ - allocbuft=(decNumber *)malloc(needbytes); + allocbuft = static_cast<decNumber*>(malloc(needbytes)); if (allocbuft==nullptr) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} @@ -5711,7 +5711,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, /* estimate. */ needbytes=sizeof(decNumber)+(D2U(MAXI(p,16))-1)*sizeof(Unit); if (needbytes>sizeof(bufa)) { /* need malloc space */ - allocbufa=(decNumber *)malloc(needbytes); + allocbufa = static_cast<decNumber*>(malloc(needbytes)); if (allocbufa==nullptr) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} @@ -5720,7 +5720,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs, pp=p+rhs->digits; needbytes=sizeof(decNumber)+(D2U(MAXI(pp,16))-1)*sizeof(Unit); if (needbytes>sizeof(bufb)) { /* need malloc space */ - allocbufb=(decNumber *)malloc(needbytes); + allocbufb = static_cast<decNumber*>(malloc(needbytes)); if (allocbufb==nullptr) { /* hopeless -- abandon */ *status|=DEC_Insufficient_storage; break;} @@ -6299,8 +6299,8 @@ static Int decUnitCompare(const Unit *a, Int alength, /* Unaligned. If one is >1 unit longer than the other, padded */ /* approximately, then can return easily */ - if (alength>blength+(Int)D2U(exp)) return 1; - if (alength+1<blength+(Int)D2U(exp)) return -1; + if (alength > blength + static_cast<Int>(D2U(exp))) return 1; + if (alength + 1 < blength + static_cast<Int>(D2U(exp))) return -1; /* Need to do a real subtract. For this, a result buffer is needed */ /* even though only the sign is of interest. Its length needs */ @@ -6310,7 +6310,7 @@ static Int decUnitCompare(const Unit *a, Int alength, need+=2; acc=accbuff; /* assume use local buffer */ if (need*sizeof(Unit)>sizeof(accbuff)) { - allocacc=(Unit *)malloc(need*sizeof(Unit)); + allocacc = static_cast<Unit*>(malloc(need * sizeof(Unit))); if (allocacc==nullptr) return BADINT; /* hopeless -- abandon */ acc=allocacc; } @@ -6319,7 +6319,7 @@ static Int decUnitCompare(const Unit *a, Int alength, exprem=exp%DECDPUN; /* subtract [A+B*(-m)] */ accunits=decUnitAddSub(a, alength, b, blength, expunits, acc, - -(Int)powers[exprem]); + -static_cast<Int>(powers[exprem])); /* [UnitAddSub result may have leading zeros, even on zero] */ if (accunits<0) result=-1; /* negative result */ else { /* non-negative result */ @@ -6424,11 +6424,11 @@ static Int decUnitAddSub(const Unit *a, Int alength, for (; c<minC; c++) { carry+=*a; a++; - carry+=((eInt)*b)*m; /* [special-casing m=1/-1 */ + carry += (static_cast<eInt>(*b)) * m; /* [special-casing m=1/-1 */ b++; /* here is not a win] */ /* here carry is new Unit of digits; it could be +ve or -ve */ - if ((ueInt)carry<=DECDPUNMAX) { /* fastpath 0-DECDPUNMAX */ - *c=(Unit)carry; + if (static_cast<ueInt>(carry) <= DECDPUNMAX) { /* fastpath 0-DECDPUNMAX */ + *c = static_cast<Unit>(carry); carry=0; continue; } @@ -6472,14 +6472,14 @@ static Int decUnitAddSub(const Unit *a, Int alength, /* Can use QUOT10 as carry <= 4 digits */ if (carry>=0) { est=QUOT10(carry, DECDPUN); - *c=(Unit)(carry-est*(DECDPUNMAX+1)); /* remainder */ + *c = static_cast<Unit>(carry - est * (DECDPUNMAX + 1)); /* remainder */ carry=est; /* quotient */ continue; } /* negative case */ - carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */ + carry = carry + static_cast<eInt>(DECDPUNMAX + 1) * (DECDPUNMAX + 1); /* make positive */ est=QUOT10(carry, DECDPUN); - *c=(Unit)(carry-est*(DECDPUNMAX+1)); + *c = static_cast<Unit>(carry - est * (DECDPUNMAX + 1)); carry=est-(DECDPUNMAX+1); /* correctly negative */ #else /* remainder operator is undefined if negative, so must test */ @@ -6508,13 +6508,13 @@ static Int decUnitAddSub(const Unit *a, Int alength, a++; } else { /* inside B */ - carry+=((eInt)*b)*m; + carry += static_cast<eInt>(*b) * m; b++; } /* here carry is new Unit of digits; it could be +ve or -ve and */ /* magnitude up to DECDPUNMAX squared */ - if ((ueInt)carry<=DECDPUNMAX) { /* fastpath 0-DECDPUNMAX */ - *c=(Unit)carry; + if (static_cast<ueInt>(carry) <= DECDPUNMAX) { /* fastpath 0-DECDPUNMAX */ + *c = static_cast<Unit>(carry); carry=0; continue; } @@ -6558,14 +6558,14 @@ static Int decUnitAddSub(const Unit *a, Int alength, #elif DECDPUN<=2 if (carry>=0) { est=QUOT10(carry, DECDPUN); - *c=(Unit)(carry-est*(DECDPUNMAX+1)); /* remainder */ + *c = static_cast<Unit>(carry - est * (DECDPUNMAX + 1)); /* remainder */ carry=est; /* quotient */ continue; } /* negative case */ - carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */ + carry = carry + static_cast<eInt>(DECDPUNMAX + 1) * (DECDPUNMAX + 1); /* make positive */ est=QUOT10(carry, DECDPUN); - *c=(Unit)(carry-est*(DECDPUNMAX+1)); + *c = static_cast<Unit>(carry - est * (DECDPUNMAX + 1)); carry=est-(DECDPUNMAX+1); /* correctly negative */ #else if ((ueInt)carry<(DECDPUNMAX+1)*2){ /* fastpath carry 1 */ @@ -6590,7 +6590,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, /* return number of Units in the result, negated if a borrow */ if (carry==0) return static_cast<int32_t>(c-clsu); /* no carry, so no more to do */ if (carry>0) { /* positive carry */ - *c=(Unit)carry; /* place as new unit */ + *c = static_cast<Unit>(carry); /* place as new unit */ c++; /* .. */ return static_cast<int32_t>(c-clsu); } @@ -6599,7 +6599,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, for (c=clsu; c<maxC; c++) { add=DECDPUNMAX+add-*c; if (add<=DECDPUNMAX) { - *c=(Unit)add; + *c = static_cast<Unit>(add); add=0; } else { @@ -6612,7 +6612,7 @@ static Int decUnitAddSub(const Unit *a, Int alength, printf("UAS borrow: add %ld, carry %ld\n", add, carry); #endif if ((add-carry-1)!=0) { - *c=(Unit)(add-carry-1); + *c = static_cast<Unit>(add - carry - 1); c++; /* interesting, include it */ } return static_cast<int32_t>(clsu-c); /* -ve result indicates borrowed */ @@ -6733,7 +6733,7 @@ static Int decShiftToMost(Unit *uar, Int digits, Int shift) { if (shift==0) return digits; /* [fastpath] nothing to do */ if ((digits+shift)<=DECDPUN) { /* [fastpath] single-unit case */ - *uar=(Unit)(*uar*powers[shift]); + *uar = static_cast<Unit>(*uar * powers[shift]); return digits+shift; } @@ -6756,14 +6756,14 @@ static Int decShiftToMost(Unit *uar, Int digits, Int shift) { uInt rem=*source%powers[cut]; next+=*source/powers[cut]; #endif - if (target<=first) *target=(Unit)next; /* write to target iff valid */ + if (target <= first) *target = static_cast<Unit>(next); /* write to target iff valid */ next=rem*powers[DECDPUN-cut]; /* save remainder for next Unit */ } } /* shift-move */ /* propagate any partial unit to one below and clear the rest */ for (; target>=uar; target--) { - *target=(Unit)next; + *target = static_cast<Unit>(next); next=0; } return digits+shift; @@ -6810,7 +6810,7 @@ static Int decShiftToLeast(Unit *uar, Int units, Int shift) { quot=*up/powers[cut]; #endif for (; ; target++) { - *target=(Unit)quot; + *target = static_cast<Unit>(quot); count-=(DECDPUN-cut); if (count<=0) break; up++; @@ -6822,7 +6822,7 @@ static Int decShiftToLeast(Unit *uar, Int units, Int shift) { rem=quot%powers[cut]; quot=quot/powers[cut]; #endif - *target=(Unit)(*target+rem*powers[DECDPUN-cut]); + *target = static_cast<Unit>(*target + rem * powers[DECDPUN - cut]); count-=cut; if (count<=0) break; } @@ -6993,7 +6993,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, /* here up -> Unit with first discarded digit */ cut=discard-(count-DECDPUN)-1; if (cut==DECDPUN-1) { /* unit-boundary case (fast) */ - Unit half=(Unit)powers[DECDPUN]>>1; + Unit half = static_cast<Unit>(powers[DECDPUN]) >> 1; /* set residue directly */ if (*up>=half) { if (*up>half) *residue=7; @@ -7057,7 +7057,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, dn->digits=count; /* set the new length */ /* shift-copy the coefficient array to the result number */ for (target=dn->lsu; ; target++) { - *target=(Unit)quot; + *target = static_cast<Unit>(quot); count-=(DECDPUN-cut); if (count<=0) break; up++; @@ -7069,7 +7069,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu, rem=quot%powers[cut]; quot=quot/powers[cut]; #endif - *target=(Unit)(*target+rem*powers[DECDPUN-cut]); + *target = static_cast<Unit>(*target + rem * powers[DECDPUN - cut]); count-=cut; if (count<=0) break; } /* shift-copy loop */ @@ -7205,7 +7205,7 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue, /* this is the last Unit (the msu) */ if (*up!=powers[count]-1) break; /* not still 9s */ /* here if it, too, is all nines */ - *up=(Unit)powers[count-1]; /* here 999 -> 100 etc. */ + *up = static_cast<Unit>(powers[count - 1]); /* here 999 -> 100 etc. */ for (up=up-1; up>=dn->lsu; up--) *up=0; /* others all to 0 */ dn->exponent++; /* and bump exponent */ /* [which, very rarely, could cause Overflow...] */ @@ -7230,9 +7230,9 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue, if (*up!=powers[count-1]) break; /* not 100.. */ /* here if have the 1000... case */ sup=up; /* save msu pointer */ - *up=(Unit)powers[count]-1; /* here 100 in msu -> 999 */ + *up = static_cast<Unit>(powers[count]) - 1; /* here 100 in msu -> 999 */ /* others all to all-nines, too */ - for (up=up-1; up>=dn->lsu; up--) *up=(Unit)powers[DECDPUN]-1; + for (up=up-1; up>=dn->lsu; up--) *up = static_cast<Unit>(powers[DECDPUN]) - 1; dn->exponent--; /* and bump exponent */ /* iff the number was at the subnormal boundary (exponent=etiny) */ @@ -7243,7 +7243,7 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue, if (dn->exponent+1==set->emin-set->digits+1) { if (count==1 && dn->digits==1) *sup=0; /* here 9 -> 0[.9] */ else { - *sup=(Unit)powers[count-1]-1; /* here 999.. in msu -> 99.. */ + *sup = static_cast<Unit>(powers[count - 1]) - 1; /* here 999.. in msu -> 99.. */ dn->digits--; } dn->exponent++; @@ -7442,7 +7442,7 @@ static void decSetMaxValue(decNumber *dn, decContext *set) { for (up=dn->lsu; ; up++) { if (count>DECDPUN) *up=DECDPUNMAX; /* unit full o'nines */ else { /* this is the msu */ - *up=(Unit)(powers[count]-1); + *up = static_cast<Unit>(powers[count] - 1); break; } count-=DECDPUN; /* filled those digits */ @@ -7642,7 +7642,7 @@ static Int decGetInt(const decNumber *dn) { got+=DECDPUN; } if (ilength==10) { /* need to check for wrap */ - if (theInt/(Int)powers[got-DECDPUN]!=(Int)*(up-1)) ilength=11; + if (theInt / static_cast<Int>(powers[got - DECDPUN]) != static_cast<Int>(*(up - 1))) ilength = 11; /* [that test also disallows the BADINT result case] */ else if (neg && theInt>1999999997) ilength=11; else if (!neg && theInt>999999999) ilength=11; diff --git a/deps/icu-small/source/i18n/decimfmt.cpp b/deps/icu-small/source/i18n/decimfmt.cpp index 36c44afe2cc112..85ba4d83cb613d 100644 --- a/deps/icu-small/source/i18n/decimfmt.cpp +++ b/deps/icu-small/source/i18n/decimfmt.cpp @@ -210,7 +210,7 @@ DecimalFormat::setAttribute(UNumberFormatAttribute attr, int32_t newValue, UErro break; case UNUM_ROUNDING_MODE: - setRoundingMode((DecimalFormat::ERoundingMode) newValue); + setRoundingMode(static_cast<DecimalFormat::ERoundingMode>(newValue)); break; case UNUM_FORMAT_WIDTH: @@ -219,7 +219,7 @@ DecimalFormat::setAttribute(UNumberFormatAttribute attr, int32_t newValue, UErro case UNUM_PADDING_POSITION: /** The position at which padding will take place. */ - setPadPosition((DecimalFormat::EPadPosition) newValue); + setPadPosition(static_cast<DecimalFormat::EPadPosition>(newValue)); break; case UNUM_SECONDARY_GROUPING_SIZE: @@ -228,20 +228,20 @@ DecimalFormat::setAttribute(UNumberFormatAttribute attr, int32_t newValue, UErro #if UCONFIG_HAVE_PARSEALLINPUT case UNUM_PARSE_ALL_INPUT: - setParseAllInput((UNumberFormatAttributeValue) newValue); + setParseAllInput(static_cast<UNumberFormatAttributeValue>(newValue)); break; #endif case UNUM_PARSE_NO_EXPONENT: - setParseNoExponent((UBool) newValue); + setParseNoExponent(static_cast<UBool>(newValue)); break; case UNUM_PARSE_DECIMAL_MARK_REQUIRED: - setDecimalPatternMatchRequired((UBool) newValue); + setDecimalPatternMatchRequired(static_cast<UBool>(newValue)); break; case UNUM_CURRENCY_USAGE: - setCurrencyUsage((UCurrencyUsage) newValue, &status); + setCurrencyUsage(static_cast<UCurrencyUsage>(newValue), &status); break; case UNUM_MINIMUM_GROUPING_DIGITS: diff --git a/deps/icu-small/source/i18n/double-conversion-string-to-double.cpp b/deps/icu-small/source/i18n/double-conversion-string-to-double.cpp index 727fff24e17aca..0a33b91b7c90a4 100644 --- a/deps/icu-small/source/i18n/double-conversion-string-to-double.cpp +++ b/deps/icu-small/source/i18n/double-conversion-string-to-double.cpp @@ -383,7 +383,7 @@ static double RadixStringToIeee(Iterator* current, } // Rounding up may cause overflow. - if ((number & ((int64_t)1 << kSignificandSize)) != 0) { + if ((number & (static_cast<int64_t>(1) << kSignificandSize)) != 0) { exponent++; number >>= 1; } diff --git a/deps/icu-small/source/i18n/dtfmtsym.cpp b/deps/icu-small/source/i18n/dtfmtsym.cpp index 5d770eada4812c..23cea3eba20ae4 100644 --- a/deps/icu-small/source/i18n/dtfmtsym.cpp +++ b/deps/icu-small/source/i18n/dtfmtsym.cpp @@ -370,7 +370,7 @@ DateFormatSymbols::createZoneStrings(const UnicodeString *const * otherStrings) int32_t row, col; UBool failed = false; - fZoneStrings = (UnicodeString **)uprv_malloc(fZoneStringsRowCount * sizeof(UnicodeString *)); + fZoneStrings = static_cast<UnicodeString**>(uprv_malloc(fZoneStringsRowCount * sizeof(UnicodeString*))); if (fZoneStrings != nullptr) { for (row=0; row<fZoneStringsRowCount; ++row) { @@ -1260,7 +1260,7 @@ DateFormatSymbols::getZoneStrings(int32_t& rowCount, int32_t& columnCount) const umtx_lock(&LOCK); if (fZoneStrings == nullptr) { if (fLocaleZoneStrings == nullptr) { - ((DateFormatSymbols*)this)->initZoneStringsArray(); + const_cast<DateFormatSymbols*>(this)->initZoneStringsArray(); } result = (const UnicodeString**)fLocaleZoneStrings; } else { @@ -1306,7 +1306,7 @@ DateFormatSymbols::initZoneStringsArray() { // Allocate array int32_t size = rows * sizeof(UnicodeString*); - zarray = (UnicodeString**)uprv_malloc(size); + zarray = static_cast<UnicodeString**>(uprv_malloc(size)); if (zarray == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; break; @@ -1370,7 +1370,7 @@ DateFormatSymbols::setZoneStrings(const UnicodeString* const *strings, int32_t r // than adopting the list passed in) fZoneStringsRowCount = rowCount; fZoneStringsColCount = columnCount; - createZoneStrings((const UnicodeString**)strings); + createZoneStrings(const_cast<const UnicodeString**>(strings)); } //------------------------------------------------------ @@ -1391,39 +1391,39 @@ DateFormatSymbols::getPatternCharIndex(char16_t c) { } static const uint64_t kNumericFieldsAlways = - ((uint64_t)1 << UDAT_YEAR_FIELD) | // y - ((uint64_t)1 << UDAT_DATE_FIELD) | // d - ((uint64_t)1 << UDAT_HOUR_OF_DAY1_FIELD) | // k - ((uint64_t)1 << UDAT_HOUR_OF_DAY0_FIELD) | // H - ((uint64_t)1 << UDAT_MINUTE_FIELD) | // m - ((uint64_t)1 << UDAT_SECOND_FIELD) | // s - ((uint64_t)1 << UDAT_FRACTIONAL_SECOND_FIELD) | // S - ((uint64_t)1 << UDAT_DAY_OF_YEAR_FIELD) | // D - ((uint64_t)1 << UDAT_DAY_OF_WEEK_IN_MONTH_FIELD) | // F - ((uint64_t)1 << UDAT_WEEK_OF_YEAR_FIELD) | // w - ((uint64_t)1 << UDAT_WEEK_OF_MONTH_FIELD) | // W - ((uint64_t)1 << UDAT_HOUR1_FIELD) | // h - ((uint64_t)1 << UDAT_HOUR0_FIELD) | // K - ((uint64_t)1 << UDAT_YEAR_WOY_FIELD) | // Y - ((uint64_t)1 << UDAT_EXTENDED_YEAR_FIELD) | // u - ((uint64_t)1 << UDAT_JULIAN_DAY_FIELD) | // g - ((uint64_t)1 << UDAT_MILLISECONDS_IN_DAY_FIELD) | // A - ((uint64_t)1 << UDAT_RELATED_YEAR_FIELD); // r + (static_cast<uint64_t>(1) << UDAT_YEAR_FIELD) | // y + (static_cast<uint64_t>(1) << UDAT_DATE_FIELD) | // d + (static_cast<uint64_t>(1) << UDAT_HOUR_OF_DAY1_FIELD) | // k + (static_cast<uint64_t>(1) << UDAT_HOUR_OF_DAY0_FIELD) | // H + (static_cast<uint64_t>(1) << UDAT_MINUTE_FIELD) | // m + (static_cast<uint64_t>(1) << UDAT_SECOND_FIELD) | // s + (static_cast<uint64_t>(1) << UDAT_FRACTIONAL_SECOND_FIELD) | // S + (static_cast<uint64_t>(1) << UDAT_DAY_OF_YEAR_FIELD) | // D + (static_cast<uint64_t>(1) << UDAT_DAY_OF_WEEK_IN_MONTH_FIELD) | // F + (static_cast<uint64_t>(1) << UDAT_WEEK_OF_YEAR_FIELD) | // w + (static_cast<uint64_t>(1) << UDAT_WEEK_OF_MONTH_FIELD) | // W + (static_cast<uint64_t>(1) << UDAT_HOUR1_FIELD) | // h + (static_cast<uint64_t>(1) << UDAT_HOUR0_FIELD) | // K + (static_cast<uint64_t>(1) << UDAT_YEAR_WOY_FIELD) | // Y + (static_cast<uint64_t>(1) << UDAT_EXTENDED_YEAR_FIELD) | // u + (static_cast<uint64_t>(1) << UDAT_JULIAN_DAY_FIELD) | // g + (static_cast<uint64_t>(1) << UDAT_MILLISECONDS_IN_DAY_FIELD) | // A + (static_cast<uint64_t>(1) << UDAT_RELATED_YEAR_FIELD); // r static const uint64_t kNumericFieldsForCount12 = - ((uint64_t)1 << UDAT_MONTH_FIELD) | // M or MM - ((uint64_t)1 << UDAT_DOW_LOCAL_FIELD) | // e or ee - ((uint64_t)1 << UDAT_STANDALONE_DAY_FIELD) | // c or cc - ((uint64_t)1 << UDAT_STANDALONE_MONTH_FIELD) | // L or LL - ((uint64_t)1 << UDAT_QUARTER_FIELD) | // Q or QQ - ((uint64_t)1 << UDAT_STANDALONE_QUARTER_FIELD); // q or qq + (static_cast<uint64_t>(1) << UDAT_MONTH_FIELD) | // M or MM + (static_cast<uint64_t>(1) << UDAT_DOW_LOCAL_FIELD) | // e or ee + (static_cast<uint64_t>(1) << UDAT_STANDALONE_DAY_FIELD) | // c or cc + (static_cast<uint64_t>(1) << UDAT_STANDALONE_MONTH_FIELD) | // L or LL + (static_cast<uint64_t>(1) << UDAT_QUARTER_FIELD) | // Q or QQ + (static_cast<uint64_t>(1) << UDAT_STANDALONE_QUARTER_FIELD); // q or qq UBool U_EXPORT2 DateFormatSymbols::isNumericField(UDateFormatField f, int32_t count) { if (f == UDAT_FIELD_COUNT) { return false; } - uint64_t flag = ((uint64_t)1 << f); + uint64_t flag = static_cast<uint64_t>(1) << f; return ((kNumericFieldsAlways & flag) != 0 || ((kNumericFieldsForCount12 & flag) != 0 && count < 3)); } @@ -1626,11 +1626,11 @@ struct CalendarDataSink : public ResourceSink { modified = false; for (int32_t i = 0; i < aliasPathPairs.size();) { UBool mod = false; - UnicodeString *alias = (UnicodeString*)aliasPathPairs[i]; + UnicodeString* alias = static_cast<UnicodeString*>(aliasPathPairs[i]); UnicodeString *aliasArray; Hashtable *aliasMap; - if ((aliasArray = (UnicodeString*)arrays.get(*alias)) != nullptr) { - UnicodeString *path = (UnicodeString*)aliasPathPairs[i + 1]; + if ((aliasArray = static_cast<UnicodeString*>(arrays.get(*alias))) != nullptr) { + UnicodeString* path = static_cast<UnicodeString*>(aliasPathPairs[i + 1]); if (arrays.get(*path) == nullptr) { // Clone the array int32_t aliasArraySize = arraySizes.geti(*alias); @@ -1643,8 +1643,8 @@ struct CalendarDataSink : public ResourceSink { } if (U_FAILURE(errorCode)) { return; } mod = true; - } else if ((aliasMap = (Hashtable*)maps.get(*alias)) != nullptr) { - UnicodeString *path = (UnicodeString*)aliasPathPairs[i + 1]; + } else if ((aliasMap = static_cast<Hashtable*>(maps.get(*alias))) != nullptr) { + UnicodeString* path = static_cast<UnicodeString*>(aliasPathPairs[i + 1]); if (maps.get(*path) == nullptr) { maps.put(*path, aliasMap, errorCode); } @@ -1848,12 +1848,12 @@ static void initField(UnicodeString **field, int32_t& length, const char16_t *data, LastResortSize numStr, LastResortSize strLen, UErrorCode &status) { if (U_SUCCESS(status)) { length = numStr; - *field = newUnicodeStringArray((size_t)numStr); + *field = newUnicodeStringArray(static_cast<size_t>(numStr)); if (*field) { for(int32_t i = 0; i<length; i++) { // readonly aliases - all "data" strings are constant // -1 as length for variable-length strings (gLastResortDayNames[0] is empty) - (*(field)+i)->setTo(true, data+(i*((int32_t)strLen)), -1); + (*(field) + i)->setTo(true, data + (i * (static_cast<int32_t>(strLen))), -1); } } else { @@ -1969,7 +1969,7 @@ static const ContextUsageTypeNameToEnumValue contextUsageTypeMap[] = { { "month-standalone-except-narrow", DateFormatSymbols::kCapContextUsageMonthStandalone }, { "zone-long", DateFormatSymbols::kCapContextUsageZoneLong }, { "zone-short", DateFormatSymbols::kCapContextUsageZoneShort }, - { nullptr, (DateFormatSymbols::ECapitalizationContextUsageType)0 }, + { nullptr, static_cast<DateFormatSymbols::ECapitalizationContextUsageType>(0) }, }; // Resource keys to look up localized strings for day periods. @@ -2496,31 +2496,31 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError status = U_USING_FALLBACK_WARNING; //TODO(fabalbon): make sure we are storing las resort data for all fields in here. - initField(&fEras, fErasCount, (const char16_t *)gLastResortEras, kEraNum, kEraLen, status); - initField(&fEraNames, fEraNamesCount, (const char16_t *)gLastResortEras, kEraNum, kEraLen, status); - initField(&fNarrowEras, fNarrowErasCount, (const char16_t *)gLastResortEras, kEraNum, kEraLen, status); - initField(&fMonths, fMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status); - initField(&fShortMonths, fShortMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status); - initField(&fNarrowMonths, fNarrowMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status); - initField(&fStandaloneMonths, fStandaloneMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status); - initField(&fStandaloneShortMonths, fStandaloneShortMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status); - initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status); - initField(&fWeekdays, fWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status); - initField(&fShortWeekdays, fShortWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status); - initField(&fShorterWeekdays, fShorterWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status); - initField(&fNarrowWeekdays, fNarrowWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status); - initField(&fStandaloneWeekdays, fStandaloneWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status); - initField(&fStandaloneShortWeekdays, fStandaloneShortWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status); - initField(&fStandaloneShorterWeekdays, fStandaloneShorterWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status); - initField(&fStandaloneNarrowWeekdays, fStandaloneNarrowWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status); - initField(&fAmPms, fAmPmsCount, (const char16_t *)gLastResortAmPmMarkers, kAmPmNum, kAmPmLen, status); - initField(&fNarrowAmPms, fNarrowAmPmsCount, (const char16_t *)gLastResortAmPmMarkers, kAmPmNum, kAmPmLen, status); - initField(&fQuarters, fQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); - initField(&fShortQuarters, fShortQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); - initField(&fNarrowQuarters, fNarrowQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); - initField(&fStandaloneQuarters, fStandaloneQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); - initField(&fStandaloneShortQuarters, fStandaloneShortQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); - initField(&fStandaloneNarrowQuarters, fStandaloneNarrowQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); + initField(&fEras, fErasCount, reinterpret_cast<const char16_t*>(gLastResortEras), kEraNum, kEraLen, status); + initField(&fEraNames, fEraNamesCount, reinterpret_cast<const char16_t*>(gLastResortEras), kEraNum, kEraLen, status); + initField(&fNarrowEras, fNarrowErasCount, reinterpret_cast<const char16_t*>(gLastResortEras), kEraNum, kEraLen, status); + initField(&fMonths, fMonthsCount, reinterpret_cast<const char16_t*>(gLastResortMonthNames), kMonthNum, kMonthLen, status); + initField(&fShortMonths, fShortMonthsCount, reinterpret_cast<const char16_t*>(gLastResortMonthNames), kMonthNum, kMonthLen, status); + initField(&fNarrowMonths, fNarrowMonthsCount, reinterpret_cast<const char16_t*>(gLastResortMonthNames), kMonthNum, kMonthLen, status); + initField(&fStandaloneMonths, fStandaloneMonthsCount, reinterpret_cast<const char16_t*>(gLastResortMonthNames), kMonthNum, kMonthLen, status); + initField(&fStandaloneShortMonths, fStandaloneShortMonthsCount, reinterpret_cast<const char16_t*>(gLastResortMonthNames), kMonthNum, kMonthLen, status); + initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, reinterpret_cast<const char16_t*>(gLastResortMonthNames), kMonthNum, kMonthLen, status); + initField(&fWeekdays, fWeekdaysCount, reinterpret_cast<const char16_t*>(gLastResortDayNames), kDayNum, kDayLen, status); + initField(&fShortWeekdays, fShortWeekdaysCount, reinterpret_cast<const char16_t*>(gLastResortDayNames), kDayNum, kDayLen, status); + initField(&fShorterWeekdays, fShorterWeekdaysCount, reinterpret_cast<const char16_t*>(gLastResortDayNames), kDayNum, kDayLen, status); + initField(&fNarrowWeekdays, fNarrowWeekdaysCount, reinterpret_cast<const char16_t*>(gLastResortDayNames), kDayNum, kDayLen, status); + initField(&fStandaloneWeekdays, fStandaloneWeekdaysCount, reinterpret_cast<const char16_t*>(gLastResortDayNames), kDayNum, kDayLen, status); + initField(&fStandaloneShortWeekdays, fStandaloneShortWeekdaysCount, reinterpret_cast<const char16_t*>(gLastResortDayNames), kDayNum, kDayLen, status); + initField(&fStandaloneShorterWeekdays, fStandaloneShorterWeekdaysCount, reinterpret_cast<const char16_t*>(gLastResortDayNames), kDayNum, kDayLen, status); + initField(&fStandaloneNarrowWeekdays, fStandaloneNarrowWeekdaysCount, reinterpret_cast<const char16_t*>(gLastResortDayNames), kDayNum, kDayLen, status); + initField(&fAmPms, fAmPmsCount, reinterpret_cast<const char16_t*>(gLastResortAmPmMarkers), kAmPmNum, kAmPmLen, status); + initField(&fNarrowAmPms, fNarrowAmPmsCount, reinterpret_cast<const char16_t*>(gLastResortAmPmMarkers), kAmPmNum, kAmPmLen, status); + initField(&fQuarters, fQuartersCount, reinterpret_cast<const char16_t*>(gLastResortQuarters), kQuarterNum, kQuarterLen, status); + initField(&fShortQuarters, fShortQuartersCount, reinterpret_cast<const char16_t*>(gLastResortQuarters), kQuarterNum, kQuarterLen, status); + initField(&fNarrowQuarters, fNarrowQuartersCount, reinterpret_cast<const char16_t*>(gLastResortQuarters), kQuarterNum, kQuarterLen, status); + initField(&fStandaloneQuarters, fStandaloneQuartersCount, reinterpret_cast<const char16_t*>(gLastResortQuarters), kQuarterNum, kQuarterLen, status); + initField(&fStandaloneShortQuarters, fStandaloneShortQuartersCount, reinterpret_cast<const char16_t*>(gLastResortQuarters), kQuarterNum, kQuarterLen, status); + initField(&fStandaloneNarrowQuarters, fStandaloneNarrowQuartersCount, reinterpret_cast<const char16_t*>(gLastResortQuarters), kQuarterNum, kQuarterLen, status); fLocalPatternChars.setTo(true, gPatternChars, PATTERN_CHARS_LEN); } } diff --git a/deps/icu-small/source/i18n/dtitvfmt.cpp b/deps/icu-small/source/i18n/dtitvfmt.cpp index a8aefe064faaed..985aabda0402ca 100644 --- a/deps/icu-small/source/i18n/dtitvfmt.cpp +++ b/deps/icu-small/source/i18n/dtitvfmt.cpp @@ -641,7 +641,7 @@ DateIntervalFormat::setContext(UDisplayContext value, UErrorCode& status) { if (U_FAILURE(status)) return; - if ( (UDisplayContextType)((uint32_t)value >> 8) == UDISPCTX_TYPE_CAPITALIZATION ) { + if (static_cast<UDisplayContextType>(static_cast<uint32_t>(value) >> 8) == UDISPCTX_TYPE_CAPITALIZATION) { fCapitalizationContext = value; } else { status = U_ILLEGAL_ARGUMENT_ERROR; @@ -652,10 +652,10 @@ UDisplayContext DateIntervalFormat::getContext(UDisplayContextType type, UErrorCode& status) const { if (U_FAILURE(status)) - return (UDisplayContext)0; + return static_cast<UDisplayContext>(0); if (type != UDISPCTX_TYPE_CAPITALIZATION) { status = U_ILLEGAL_ARGUMENT_ERROR; - return (UDisplayContext)0; + return static_cast<UDisplayContext>(0); } return fCapitalizationContext; } @@ -829,7 +829,7 @@ DateIntervalFormat::initializePattern(UErrorCode& status) { int32_t dateTimeFormatLength; const char16_t* dateTimeFormat = ures_getStringByIndex( dateTimePatternsRes.getAlias(), - (int32_t)DateFormat::kDateTime, + static_cast<int32_t>(DateFormat::kDateTime), &dateTimeFormatLength, &status); if ( U_SUCCESS(status) && dateTimeFormatLength >= 3 ) { fDateTimeFormat = new UnicodeString(dateTimeFormat, dateTimeFormatLength); @@ -1538,7 +1538,7 @@ DateIntervalFormat::splitPatternInto2Part(const UnicodeString& intervalPattern) if (ch != prevCh && count > 0) { // check the repeativeness of pattern letter - UBool repeated = patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)]; + UBool repeated = patternRepeated[prevCh - PATTERN_CHAR_BASE]; if ( repeated == false ) { patternRepeated[prevCh - PATTERN_CHAR_BASE] = true; } else { @@ -1569,7 +1569,7 @@ DateIntervalFormat::splitPatternInto2Part(const UnicodeString& intervalPattern) // "d-d"(last char repeated ), and // "d-d MM" ( repetition found ) if ( count > 0 && foundRepetition == false ) { - if ( patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)] == false ) { + if (patternRepeated[prevCh - PATTERN_CHAR_BASE] == false) { count = 0; } } @@ -1774,8 +1774,8 @@ DateIntervalFormat::adjustFieldWidth(const UnicodeString& inputSkeleton, // for skeleton "M+", the pattern might be "...L..." skeletonChar = CAP_M; } - int32_t fieldCount = bestMatchSkeletonFieldWidth[(int)(skeletonChar - PATTERN_CHAR_BASE)]; - int32_t inputFieldCount = inputSkeletonFieldWidth[(int)(skeletonChar - PATTERN_CHAR_BASE)]; + int32_t fieldCount = bestMatchSkeletonFieldWidth[skeletonChar - PATTERN_CHAR_BASE]; + int32_t inputFieldCount = inputSkeletonFieldWidth[skeletonChar - PATTERN_CHAR_BASE]; if ( fieldCount == count && inputFieldCount > fieldCount ) { count = inputFieldCount - fieldCount; int32_t j; @@ -1813,8 +1813,8 @@ DateIntervalFormat::adjustFieldWidth(const UnicodeString& inputSkeleton, // for skeleton "M+", the pattern might be "...L..." skeletonChar = CAP_M; } - int32_t fieldCount = bestMatchSkeletonFieldWidth[(int)(skeletonChar - PATTERN_CHAR_BASE)]; - int32_t inputFieldCount = inputSkeletonFieldWidth[(int)(skeletonChar - PATTERN_CHAR_BASE)]; + int32_t fieldCount = bestMatchSkeletonFieldWidth[skeletonChar - PATTERN_CHAR_BASE]; + int32_t inputFieldCount = inputSkeletonFieldWidth[skeletonChar - PATTERN_CHAR_BASE]; if ( fieldCount == count && inputFieldCount > fieldCount ) { count = inputFieldCount - fieldCount; int32_t j; diff --git a/deps/icu-small/source/i18n/dtitvinf.cpp b/deps/icu-small/source/i18n/dtitvinf.cpp index 8ebb2f70d88d6b..6a1e48fbe32a32 100644 --- a/deps/icu-small/source/i18n/dtitvinf.cpp +++ b/deps/icu-small/source/i18n/dtitvinf.cpp @@ -188,7 +188,7 @@ DateIntervalInfo::getIntervalPattern(const UnicodeString& skeleton, return result; } - const UnicodeString* patternsOfOneSkeleton = (UnicodeString*) fIntervalPatterns->get(skeleton); + const UnicodeString* patternsOfOneSkeleton = static_cast<UnicodeString*>(fIntervalPatterns->get(skeleton)); if ( patternsOfOneSkeleton != nullptr ) { IntervalPatternIndex index = calendarFieldToIntervalIndex(field, status); if ( U_FAILURE(status) ) { @@ -364,7 +364,7 @@ struct DateIntervalInfo::DateIntervalSink : public ResourceSink { UnicodeString skeleton(currentSkeleton, -1, US_INV); UnicodeString* patternsOfOneSkeleton = - (UnicodeString*)(dateIntervalInfo.fIntervalPatterns->get(skeleton)); + static_cast<UnicodeString*>(dateIntervalInfo.fIntervalPatterns->get(skeleton)); if (patternsOfOneSkeleton == nullptr || patternsOfOneSkeleton[index].isEmpty()) { UnicodeString pattern = value.getUnicodeString(errorCode); @@ -491,7 +491,7 @@ DateIntervalInfo::setIntervalPatternInternally(const UnicodeString& skeleton, if ( U_FAILURE(status) ) { return; } - UnicodeString* patternsOfOneSkeleton = (UnicodeString*)(fIntervalPatterns->get(skeleton)); + UnicodeString* patternsOfOneSkeleton = static_cast<UnicodeString*>(fIntervalPatterns->get(skeleton)); UBool emptyHash = false; if ( patternsOfOneSkeleton == nullptr ) { patternsOfOneSkeleton = new UnicodeString[kIPI_MAX_INDEX]; @@ -517,7 +517,7 @@ DateIntervalInfo::parseSkeleton(const UnicodeString& skeleton, int32_t i; for ( i = 0; i < skeleton.length(); ++i ) { // it is an ASCII char in skeleton - int8_t ch = (int8_t)skeleton.charAt(i); + int8_t ch = static_cast<int8_t>(skeleton.charAt(i)); ++skeletonFieldWidth[ch - PATTERN_CHAR_BASE]; } } @@ -612,7 +612,7 @@ DateIntervalInfo::getBestSkeleton(const UnicodeString& skeleton, const UHashElement* elem = nullptr; while ( (elem = fIntervalPatterns->nextElement(pos)) != nullptr ) { const UHashTok keyTok = elem->key; - UnicodeString* newSkeleton = (UnicodeString*)keyTok.pointer; + UnicodeString* newSkeleton = static_cast<UnicodeString*>(keyTok.pointer); #ifdef DTITVINF_DEBUG skeleton->extract(0, skeleton->length(), result, "UTF-8"); snprintf(mesg, sizeof(mesg), "available skeletons: skeleton: %s; \n", result); @@ -641,7 +641,7 @@ DateIntervalInfo::getBestSkeleton(const UnicodeString& skeleton, fieldDifference = -1; distance += DIFFERENT_FIELD; } else if (stringNumeric(inputFieldWidth, fieldWidth, - (char)(i+BASE) ) ) { + static_cast<char>(i + BASE))) { distance += STRING_NUMERIC_DIFFERENCE; } else { distance += (inputFieldWidth > fieldWidth) ? @@ -723,7 +723,7 @@ DateIntervalInfo::deleteHash(Hashtable* hTable) const UHashElement* element = nullptr; while ( (element = hTable->nextElement(pos)) != nullptr ) { const UHashTok valueTok = element->value; - const UnicodeString* value = (UnicodeString*)valueTok.pointer; + const UnicodeString* value = static_cast<UnicodeString*>(valueTok.pointer); delete[] value; } delete fIntervalPatterns; @@ -787,9 +787,9 @@ DateIntervalInfo::copyHash(const Hashtable* source, if ( source ) { while ( (element = source->nextElement(pos)) != nullptr ) { const UHashTok keyTok = element->key; - const UnicodeString* key = (UnicodeString*)keyTok.pointer; + const UnicodeString* key = static_cast<UnicodeString*>(keyTok.pointer); const UHashTok valueTok = element->value; - const UnicodeString* value = (UnicodeString*)valueTok.pointer; + const UnicodeString* value = static_cast<UnicodeString*>(valueTok.pointer); UnicodeString* copy = new UnicodeString[kIPI_MAX_INDEX]; if (copy == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; diff --git a/deps/icu-small/source/i18n/dtptngen.cpp b/deps/icu-small/source/i18n/dtptngen.cpp index 4fe00a23e19e68..50c0b050b92e1d 100644 --- a/deps/icu-small/source/i18n/dtptngen.cpp +++ b/deps/icu-small/source/i18n/dtptngen.cpp @@ -647,9 +647,9 @@ static int32_t* getAllowedHourFormatsLangCountry(const char* language, const cha langCountry.append(country, status); int32_t* allowedFormats; - allowedFormats = (int32_t *)uhash_get(localeToAllowedHourFormatsMap, langCountry.data()); + allowedFormats = static_cast<int32_t*>(uhash_get(localeToAllowedHourFormatsMap, langCountry.data())); if (allowedFormats == nullptr) { - allowedFormats = (int32_t *)uhash_get(localeToAllowedHourFormatsMap, const_cast<char *>(country)); + allowedFormats = static_cast<int32_t*>(uhash_get(localeToAllowedHourFormatsMap, const_cast<char*>(country))); } return allowedFormats; @@ -803,38 +803,58 @@ DateTimePatternGenerator::staticGetBaseSkeleton( void DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& status) { - if (U_FAILURE(status)) { return; } - UnicodeString dfPattern; - UnicodeString conflictingString; - DateFormat* df; - - // Load with ICU patterns - for (int32_t i=DateFormat::kFull; i<=DateFormat::kShort; i++) { - DateFormat::EStyle style = (DateFormat::EStyle)i; - df = DateFormat::createDateInstance(style, locale); - SimpleDateFormat* sdf; - if (df != nullptr && (sdf = dynamic_cast<SimpleDateFormat*>(df)) != nullptr) { - sdf->toPattern(dfPattern); - addPattern(dfPattern, false, conflictingString, status); - } - // TODO Maybe we should return an error when the date format isn't simple. - delete df; - if (U_FAILURE(status)) { return; } + if (U_FAILURE(status)) { + return; + } + + LocalUResourceBundlePointer rb(ures_open(nullptr, locale.getBaseName(), &status)); + CharString calendarTypeToUse; // to be filled in with the type to use, if all goes well + getCalendarTypeToUse(locale, calendarTypeToUse, status); - df = DateFormat::createTimeInstance(style, locale); - if (df != nullptr && (sdf = dynamic_cast<SimpleDateFormat*>(df)) != nullptr) { - sdf->toPattern(dfPattern); - addPattern(dfPattern, false, conflictingString, status); + // HACK to get around the fact that the old SimpleDateFormat code (actually, Calendar::getCalendarTypeForLocale() ) + // returns "gregorian" for ja_JP_TRADITIONAL instead of "japanese" + if (uprv_strcmp(locale.getBaseName(), "ja_JP_TRADITIONAL") == 0) { + calendarTypeToUse.clear().append("gregorian", status); + } + + if (U_FAILURE(status)) { + return; + } - // TODO: C++ and Java are inconsistent (see #12568). - // C++ uses MEDIUM, but Java uses SHORT. - if ( i==DateFormat::kShort && !dfPattern.isEmpty() ) { - consumeShortTimePattern(dfPattern, status); - } + // TODO: See ICU-22867 + CharString patternResourcePath; + patternResourcePath.append(DT_DateTimeCalendarTag, status) + .append('/', status) + .append(calendarTypeToUse, status) + .append('/', status) + .append(DT_DateTimePatternsTag, status); + + LocalUResourceBundlePointer dateTimePatterns(ures_getByKeyWithFallback(rb.getAlias(), patternResourcePath.data(), + nullptr, &status)); + if (ures_getType(dateTimePatterns.getAlias()) != URES_ARRAY || ures_getSize(dateTimePatterns.getAlias()) < 8) { + status = U_INVALID_FORMAT_ERROR; + return; + } + + for (int32_t i = 0; U_SUCCESS(status) && i < DateFormat::kDateTime; i++) { + LocalUResourceBundlePointer patternRes(ures_getByIndex(dateTimePatterns.getAlias(), i, nullptr, &status)); + UnicodeString pattern; + switch (ures_getType(patternRes.getAlias())) { + case URES_STRING: + pattern = ures_getUnicodeString(patternRes.getAlias(), &status); + break; + case URES_ARRAY: + pattern = ures_getUnicodeStringByIndex(patternRes.getAlias(), 0, &status); + break; + default: + status = U_INVALID_FORMAT_ERROR; + return; + } + + if (U_SUCCESS(status)) { + UnicodeString conflictingPattern; + addPatternWithSkeleton(pattern, nullptr, false, conflictingPattern, status); } - // TODO Maybe we should return an error when the date format isn't simple. - delete df; - if (U_FAILURE(status)) { return; } } } @@ -905,7 +925,12 @@ DateTimePatternGenerator::getCalendarTypeToUse(const Locale& locale, CharString& &localStatus); localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination // now get the calendar key value from that locale - destination = ulocimp_getKeywordValue(localeWithCalendarKey, "calendar", localStatus); + // (the call to ures_getFunctionalEquivalent() above might fail, and if it does, localeWithCalendarKey + // won't contain a `calendar` keyword. If this happens, the line below will stomp on `destination`, + // so we have to check the return code before overwriting `destination`.) + if (U_SUCCESS(localStatus)) { + destination = ulocimp_getKeywordValue(localeWithCalendarKey, "calendar", localStatus); + } // If the input locale was invalid, don't fail with missing resource error, instead // continue with default of Gregorian. if (U_FAILURE(localStatus) && localStatus != U_MISSING_RESOURCE_ERROR) { @@ -947,7 +972,7 @@ struct DateTimePatternGenerator::AppendItemFormatsSink : public ResourceSink { void fillInMissing() { UnicodeString defaultItemFormat(true, UDATPG_ItemFormat, UPRV_LENGTHOF(UDATPG_ItemFormat)-1); // Read-only alias. for (int32_t i = 0; i < UDATPG_FIELD_COUNT; i++) { - UDateTimePatternField field = (UDateTimePatternField)i; + UDateTimePatternField field = static_cast<UDateTimePatternField>(i); if (dtpg.getAppendItemFormat(field).isEmpty()) { dtpg.setAppendItemFormat(field, defaultItemFormat); } @@ -979,25 +1004,25 @@ struct DateTimePatternGenerator::AppendItemNamesSink : public ResourceSink { void fillInMissing() { for (int32_t i = 0; i < UDATPG_FIELD_COUNT; i++) { - UnicodeString& valueStr = dtpg.getMutableFieldDisplayName((UDateTimePatternField)i, UDATPG_WIDE); + UnicodeString& valueStr = dtpg.getMutableFieldDisplayName(static_cast<UDateTimePatternField>(i), UDATPG_WIDE); if (valueStr.isEmpty()) { valueStr = CAP_F; U_ASSERT(i < 20); if (i < 10) { // F0, F1, ..., F9 - valueStr += (char16_t)(i+0x30); + valueStr += static_cast<char16_t>(i + 0x30); } else { // F10, F11, ... - valueStr += (char16_t)0x31; - valueStr += (char16_t)(i-10 + 0x30); + valueStr += static_cast<char16_t>(0x31); + valueStr += static_cast<char16_t>(i - 10 + 0x30); } // NUL-terminate for the C API. valueStr.getTerminatedBuffer(); } for (int32_t j = 1; j < UDATPG_WIDTH_COUNT; j++) { - UnicodeString& valueStr2 = dtpg.getMutableFieldDisplayName((UDateTimePatternField)i, (UDateTimePGDisplayWidth)j); + UnicodeString& valueStr2 = dtpg.getMutableFieldDisplayName(static_cast<UDateTimePatternField>(i), static_cast<UDateTimePGDisplayWidth>(j)); if (valueStr2.isEmpty()) { - valueStr2 = dtpg.getFieldDisplayName((UDateTimePatternField)i, (UDateTimePGDisplayWidth)(j-1)); + valueStr2 = dtpg.getFieldDisplayName(static_cast<UDateTimePatternField>(i), static_cast<UDateTimePGDisplayWidth>(j - 1)); } } } @@ -1259,7 +1284,7 @@ DateTimePatternGenerator::mapSkeletonMetacharacters(const UnicodeString& pattern } else { AllowedHourFormat bestAllowed; if (fAllowedHourFormats[0] != ALLOWED_HOUR_FORMAT_UNKNOWN) { - bestAllowed = (AllowedHourFormat)fAllowedHourFormats[0]; + bestAllowed = static_cast<AllowedHourFormat>(fAllowedHourFormats[0]); } else { status = U_INVALID_FORMAT_ERROR; return {}; @@ -1353,7 +1378,7 @@ void DateTimePatternGenerator::setDateTimeFormat(const UnicodeString& dtFormat) { UErrorCode status = U_ZERO_ERROR; for (int32_t style = UDAT_FULL; style <= UDAT_SHORT; style++) { - setDateTimeFormat((UDateFormatStyle)style, dtFormat, status); + setDateTimeFormat(static_cast<UDateFormatStyle>(style), dtFormat, status); } } @@ -1441,7 +1466,7 @@ DateTimePatternGenerator::setDateTimeFromCalendar(const Locale& locale, UErrorCo // Try again with standard variant status = U_ZERO_ERROR; dateTimePatterns.orphan(); - dateTimeOffset = (int32_t)DateFormat::kDateTimeOffset; + dateTimeOffset = static_cast<int32_t>(DateFormat::kDateTimeOffset); if (!cTypeIsGregorian) { specificCalBundle.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), cType, nullptr, &status)); @@ -1462,7 +1487,7 @@ DateTimePatternGenerator::setDateTimeFromCalendar(const Locale& locale, UErrorCo if (U_FAILURE(status)) { return; } for (int32_t style = UDAT_FULL; style <= UDAT_SHORT; style++) { resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), dateTimeOffset + style, &resStrLen, &status); - setDateTimeFormat((UDateFormatStyle)style, UnicodeString(true, resStr, resStrLen), status); + setDateTimeFormat(static_cast<UDateFormatStyle>(style), UnicodeString(true, resStr, resStrLen), status); } } @@ -1568,7 +1593,7 @@ UDateTimePatternField DateTimePatternGenerator::getAppendFormatNumber(const char* field) const { for (int32_t i=0; i<UDATPG_FIELD_COUNT; ++i ) { if (uprv_strcmp(CLDR_FIELD_APPEND[i], field)==0) { - return (UDateTimePatternField)i; + return static_cast<UDateTimePatternField>(i); } } return UDATPG_FIELD_COUNT; @@ -1584,7 +1609,7 @@ DateTimePatternGenerator::getFieldAndWidthIndices(const char* key, UDateTimePGDi if (hyphenPtr) { for (int32_t i=UDATPG_WIDTH_COUNT-1; i>0; --i) { if (uprv_strcmp(CLDR_FIELD_WIDTH[i], hyphenPtr)==0) { - *widthP=(UDateTimePGDisplayWidth)i; + *widthP = static_cast<UDateTimePGDisplayWidth>(i); break; } } @@ -1592,7 +1617,7 @@ DateTimePatternGenerator::getFieldAndWidthIndices(const char* key, UDateTimePGDi } for (int32_t i=0; i<UDATPG_FIELD_COUNT; ++i ) { if (uprv_strcmp(CLDR_FIELD_NAME[i],cldrFieldKey)==0) { - return (UDateTimePatternField)i; + return static_cast<UDateTimePatternField>(i); } } return UDATPG_FIELD_COUNT; @@ -1809,7 +1834,7 @@ DateTimePatternGenerator::getBestAppending(int32_t missingFields, int32_t flags, if (appendItemFormats[topField].length() != 0) { UnicodeString appendName; - getAppendName((UDateTimePatternField)topField, appendName); + getAppendName(static_cast<UDateTimePatternField>(topField), appendName); const UnicodeString *values[3] = { &resultPattern, &tempPattern, @@ -1849,7 +1874,7 @@ DateTimePatternGenerator::setAvailableFormat(const UnicodeString &key, UErrorCod UBool DateTimePatternGenerator::isAvailableFormatSet(const UnicodeString &key) const { - return (UBool)(fAvailableFormatKeyHash->geti(key) == 1); + return fAvailableFormatKeyHash->geti(key) == 1; } void @@ -1870,7 +1895,7 @@ DateTimePatternGenerator::copyHashtable(Hashtable *other, UErrorCode &status) { // walk through the hash table and create a deep clone while((elem = other->nextElement(pos))!= nullptr){ const UHashTok otherKeyTok = elem->key; - UnicodeString* otherKey = (UnicodeString*)otherKeyTok.pointer; + UnicodeString* otherKey = static_cast<UnicodeString*>(otherKeyTok.pointer); fAvailableFormatKeyHash->puti(*otherKey, 1, status); if(U_FAILURE(status)){ return; @@ -2551,7 +2576,7 @@ FormatParser::getCanonicalIndex(const UnicodeString& s, UBool strict) { UBool FormatParser::isQuoteLiteral(const UnicodeString& s) { - return (UBool)(s.charAt(0) == SINGLE_QUOTE); + return s.charAt(0) == SINGLE_QUOTE; } // This function assumes the current itemIndex points to the quote literal. @@ -2734,8 +2759,8 @@ void SkeletonFields::populate(int32_t field, const UnicodeString& value) { } void SkeletonFields::populate(int32_t field, char16_t ch, int32_t length) { - chars[field] = (int8_t) ch; - lengths[field] = (int8_t) length; + chars[field] = static_cast<int8_t>(ch); + lengths[field] = static_cast<int8_t>(length); } UBool SkeletonFields::isFieldEmpty(int32_t field) const { @@ -2751,7 +2776,7 @@ UnicodeString& SkeletonFields::appendTo(UnicodeString& string) const { UnicodeString& SkeletonFields::appendFieldTo(int32_t field, UnicodeString& string) const { char16_t ch(chars[field]); - int32_t length = (int32_t) lengths[field]; + int32_t length = static_cast<int32_t>(lengths[field]); for (int32_t i=0; i<length; i++) { string += ch; @@ -2890,7 +2915,7 @@ DTSkeletonEnumeration::DTSkeletonEnumeration(PatternMap& patternMap, dtStrEnum t const UnicodeString* DTSkeletonEnumeration::snext(UErrorCode& status) { if (U_SUCCESS(status) && fSkeletons.isValid() && pos < fSkeletons->size()) { - return (const UnicodeString*)fSkeletons->elementAt(pos++); + return static_cast<const UnicodeString*>(fSkeletons->elementAt(pos++)); } return nullptr; } @@ -2922,7 +2947,7 @@ DTSkeletonEnumeration::~DTSkeletonEnumeration() { UnicodeString *s; if (fSkeletons.isValid()) { for (int32_t i = 0; i < fSkeletons->size(); ++i) { - if ((s = (UnicodeString *)fSkeletons->elementAt(i)) != nullptr) { + if ((s = static_cast<UnicodeString*>(fSkeletons->elementAt(i))) != nullptr) { delete s; } } @@ -2957,7 +2982,7 @@ DTRedundantEnumeration::add(const UnicodeString& pattern, UErrorCode& status) { const UnicodeString* DTRedundantEnumeration::snext(UErrorCode& status) { if (U_SUCCESS(status) && fPatterns.isValid() && pos < fPatterns->size()) { - return (const UnicodeString*)fPatterns->elementAt(pos++); + return static_cast<const UnicodeString*>(fPatterns->elementAt(pos++)); } return nullptr; } @@ -2989,7 +3014,7 @@ DTRedundantEnumeration::~DTRedundantEnumeration() { UnicodeString *s; if (fPatterns.isValid()) { for (int32_t i = 0; i < fPatterns->size(); ++i) { - if ((s = (UnicodeString *)fPatterns->elementAt(i)) != nullptr) { + if ((s = static_cast<UnicodeString*>(fPatterns->elementAt(i))) != nullptr) { delete s; } } diff --git a/deps/icu-small/source/i18n/erarules.cpp b/deps/icu-small/source/i18n/erarules.cpp index 65405bb84aac48..8ab6f00ae04b68 100644 --- a/deps/icu-small/source/i18n/erarules.cpp +++ b/deps/icu-small/source/i18n/erarules.cpp @@ -54,7 +54,7 @@ static UBool isValidRuleStartDate(int32_t year, int32_t month, int32_t day) { * @return an encoded date. */ static int32_t encodeDate(int32_t year, int32_t month, int32_t day) { - return (int32_t)((uint32_t)year << 16) | month << 8 | day; + return static_cast<int32_t>(static_cast<uint32_t>(year) << 16) | month << 8 | day; } static void decodeDate(int32_t encodedDate, int32_t (&fields)[3]) { @@ -141,8 +141,8 @@ EraRules* EraRules::createInstance(const char *calType, UBool includeTentativeEr } const char *eraIdxStr = ures_getKey(eraRuleRes.getAlias()); char *endp; - int32_t eraIdx = (int32_t)strtol(eraIdxStr, &endp, 10); - if ((size_t)(endp - eraIdxStr) != uprv_strlen(eraIdxStr)) { + int32_t eraIdx = static_cast<int32_t>(strtol(eraIdxStr, &endp, 10)); + if (static_cast<size_t>(endp - eraIdxStr) != uprv_strlen(eraIdxStr)) { status = U_INVALID_FORMAT_ERROR; return nullptr; } @@ -306,7 +306,8 @@ void EraRules::initCurrentEra() { } int year, month0, dom, dow, doy, mid; - Grego::timeToFields(localMillis, year, month0, dom, dow, doy, mid); + Grego::timeToFields(localMillis, year, month0, dom, dow, doy, mid, ec); + if (U_FAILURE(ec)) return; int currentEncodedDate = encodeDate(year, month0 + 1 /* changes to 1-base */, dom); int eraIdx = numEras - 1; while (eraIdx > 0) { diff --git a/deps/icu-small/source/i18n/erarules.h b/deps/icu-small/source/i18n/erarules.h index 74b7862da4c18c..7ad4c6bf684e30 100644 --- a/deps/icu-small/source/i18n/erarules.h +++ b/deps/icu-small/source/i18n/erarules.h @@ -18,16 +18,8 @@ U_NAMESPACE_BEGIN // When building DLLs for Windows this is required even though no direct access leaks out of the i18n library. // See digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples. #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN -#if defined(_MSC_VER) -// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= -#pragma warning(push) -#pragma warning(disable: 4661) -#endif template class U_I18N_API LocalPointerBase<int32_t>; template class U_I18N_API LocalMemory<int32_t>; -#if defined(_MSC_VER) -#pragma warning(pop) -#endif #endif class U_I18N_API EraRules : public UMemory { diff --git a/deps/icu-small/source/i18n/ethpccal.cpp b/deps/icu-small/source/i18n/ethpccal.cpp index 41b70767044d36..770df614afbb3e 100644 --- a/deps/icu-small/source/i18n/ethpccal.cpp +++ b/deps/icu-small/source/i18n/ethpccal.cpp @@ -80,10 +80,11 @@ EthiopicCalendar::handleGetExtendedYear(UErrorCode& status) } void -EthiopicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/) +EthiopicCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { int32_t eyear, month, day; - jdToCE(julianDay, getJDEpochOffset(), eyear, month, day); + jdToCE(julianDay, getJDEpochOffset(), eyear, month, day, status); + if (U_FAILURE(status)) return; internalSet(UCAL_EXTENDED_YEAR, eyear); internalSet(UCAL_ERA, (eyear > 0) ? AMETE_MIHRET : AMETE_ALEM); @@ -171,10 +172,11 @@ EthiopicAmeteAlemCalendar::handleGetExtendedYear(UErrorCode& status) } void -EthiopicAmeteAlemCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/) +EthiopicAmeteAlemCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { int32_t eyear, month, day; - jdToCE(julianDay, getJDEpochOffset(), eyear, month, day); + jdToCE(julianDay, getJDEpochOffset(), eyear, month, day, status); + if (U_FAILURE(status)) return; internalSet(UCAL_EXTENDED_YEAR, eyear); internalSet(UCAL_ERA, AMETE_ALEM); diff --git a/deps/icu-small/source/i18n/fmtable.cpp b/deps/icu-small/source/i18n/fmtable.cpp index 01d7bad1ba6f0c..b7f0dddabb768a 100644 --- a/deps/icu-small/source/i18n/fmtable.cpp +++ b/deps/icu-small/source/i18n/fmtable.cpp @@ -399,7 +399,7 @@ Formattable::getLong(UErrorCode& status) const switch (fType) { case Formattable::kLong: - return (int32_t)fValue.fInt64; + return static_cast<int32_t>(fValue.fInt64); case Formattable::kInt64: if (fValue.fInt64 > INT32_MAX) { status = U_INVALID_FORMAT_ERROR; @@ -408,7 +408,7 @@ Formattable::getLong(UErrorCode& status) const status = U_INVALID_FORMAT_ERROR; return INT32_MIN; } else { - return (int32_t)fValue.fInt64; + return static_cast<int32_t>(fValue.fInt64); } case Formattable::kDouble: if (fValue.fDouble > INT32_MAX) { @@ -418,7 +418,7 @@ Formattable::getLong(UErrorCode& status) const status = U_INVALID_FORMAT_ERROR; return INT32_MIN; } else { - return (int32_t)fValue.fDouble; // loses fraction + return static_cast<int32_t>(fValue.fDouble); // loses fraction } case Formattable::kObject: if (fValue.fObject == nullptr) { @@ -456,10 +456,10 @@ Formattable::getInt64(UErrorCode& status) const case Formattable::kInt64: return fValue.fInt64; case Formattable::kDouble: - if (fValue.fDouble > (double)U_INT64_MAX) { + if (fValue.fDouble > static_cast<double>(U_INT64_MAX)) { status = U_INVALID_FORMAT_ERROR; return U_INT64_MAX; - } else if (fValue.fDouble < (double)U_INT64_MIN) { + } else if (fValue.fDouble < static_cast<double>(U_INT64_MIN)) { status = U_INVALID_FORMAT_ERROR; return U_INT64_MIN; } else if (fabs(fValue.fDouble) > U_DOUBLE_MAX_EXACT_INT && fDecimalQuantity != nullptr) { @@ -471,7 +471,7 @@ Formattable::getInt64(UErrorCode& status) const return fDecimalQuantity->isNegative() ? U_INT64_MIN : U_INT64_MAX; } } else { - return (int64_t)fValue.fDouble; + return static_cast<int64_t>(fValue.fDouble); } case Formattable::kObject: if (fValue.fObject == nullptr) { @@ -500,7 +500,7 @@ Formattable::getDouble(UErrorCode& status) const switch (fType) { case Formattable::kLong: case Formattable::kInt64: // loses precision - return (double)fValue.fInt64; + return static_cast<double>(fValue.fInt64); case Formattable::kDouble: return fValue.fDouble; case Formattable::kObject: @@ -688,7 +688,7 @@ Formattable::getArray(int32_t& count, UErrorCode& status) const UnicodeString* Formattable::getBogus() const { - return (UnicodeString*)&fBogus; /* cast away const :-( */ + return const_cast<UnicodeString*>(&fBogus); /* cast away const :-( */ } diff --git a/deps/icu-small/source/i18n/formatted_string_builder.cpp b/deps/icu-small/source/i18n/formatted_string_builder.cpp index 6481f73dcf6538..94082dc379f231 100644 --- a/deps/icu-small/source/i18n/formatted_string_builder.cpp +++ b/deps/icu-small/source/i18n/formatted_string_builder.cpp @@ -156,7 +156,7 @@ FormattedStringBuilder::insertCodePoint(int32_t index, UChar32 codePoint, Field auto* charPtr = getCharPtr(); auto* fieldPtr = getFieldPtr(); if (count == 1) { - charPtr[position] = (char16_t) codePoint; + charPtr[position] = static_cast<char16_t>(codePoint); fieldPtr[position] = field; } else { charPtr[position] = U16_LEAD(codePoint); diff --git a/deps/icu-small/source/i18n/gender.cpp b/deps/icu-small/source/i18n/gender.cpp index ab76dab12173bb..6e9d8d2ac03604 100644 --- a/deps/icu-small/source/i18n/gender.cpp +++ b/deps/icu-small/source/i18n/gender.cpp @@ -107,7 +107,7 @@ const GenderInfo* GenderInfo::getInstance(const Locale& locale, UErrorCode& stat const char* key = locale.getName(); { Mutex lock(&gGenderMetaLock); - result = (const GenderInfo*) uhash_get(gGenderInfoCache, key); + result = static_cast<const GenderInfo*>(uhash_get(gGenderInfoCache, key)); } if (result) { return result; @@ -123,7 +123,7 @@ const GenderInfo* GenderInfo::getInstance(const Locale& locale, UErrorCode& stat // favor the GenderInfo object that is already in the cache. { Mutex lock(&gGenderMetaLock); - GenderInfo* temp = (GenderInfo*) uhash_get(gGenderInfoCache, key); + GenderInfo* temp = static_cast<GenderInfo*>(uhash_get(gGenderInfoCache, key)); if (temp) { result = temp; } else { diff --git a/deps/icu-small/source/i18n/gregocal.cpp b/deps/icu-small/source/i18n/gregocal.cpp index dfd64faa50e7c0..23366c7ab7a333 100644 --- a/deps/icu-small/source/i18n/gregocal.cpp +++ b/deps/icu-small/source/i18n/gregocal.cpp @@ -331,7 +331,7 @@ GregorianCalendar::setGregorianChange(UDate date, UErrorCode& status) // normalized cutover is in pure date milliseconds; it contains no time // of day or timezone component, and it used to compare against other // pure date values. - double cutoverDay = ClockMath::floorDivide(date, (double)kOneDay); + double cutoverDay = ClockMath::floorDivide(date, kOneDay); // Handle the rare case of numeric overflow where the user specifies a time // outside of INT32_MIN .. INT32_MAX number of days. @@ -363,7 +363,7 @@ GregorianCalendar::setGregorianChange(UDate date, UErrorCode& status) if (cal->get(UCAL_ERA, status) == BC) { fGregorianCutoverYear = 1 - fGregorianCutoverYear; } - fCutoverJulianDay = (int32_t)cutoverDay; + fCutoverJulianDay = static_cast<int32_t>(cutoverDay); delete cal; } @@ -388,10 +388,10 @@ void GregorianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& statu // The Julian epoch day (not the same as Julian Day) // is zero on Saturday December 30, 0 (Gregorian). int32_t julianEpochDay = julianDay - (kJan1_1JulianDay - 2); - eyear = (int32_t) ClockMath::floorDivide((4.0*julianEpochDay) + 1464.0, (int32_t) 1461, &unusedRemainder); + eyear = static_cast<int32_t>(ClockMath::floorDivide((4.0 * julianEpochDay) + 1464.0, static_cast<int32_t>(1461), &unusedRemainder)); // Compute the Julian calendar day number for January 1, eyear - int32_t january1 = 365*(eyear-1) + ClockMath::floorDivide(eyear-1, (int32_t)4); + int32_t january1 = 365 * (eyear - 1) + ClockMath::floorDivide(eyear - 1, static_cast<int32_t>(4)); dayOfYear = (julianEpochDay - january1); // 0-based // Julian leap years occurred historically every 4 years starting @@ -542,7 +542,7 @@ int64_t GregorianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, if (U_FAILURE(status)) { return 0; } - GregorianCalendar *nonConstThis = (GregorianCalendar*)this; // cast away const + GregorianCalendar* nonConstThis = const_cast<GregorianCalendar*>(this); // cast away const // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. @@ -555,7 +555,7 @@ int64_t GregorianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, } UBool isLeap = eyear%4 == 0; - int64_t y = (int64_t)eyear-1; + int64_t y = static_cast<int64_t>(eyear) - 1; int64_t julianDay = 365LL * y + ClockMath::floorDivideInt64(y, 4LL) + kJan1_1JulianDay - 3LL; @@ -638,8 +638,8 @@ GregorianCalendar::validateFields() const // Ignore DATE and DAY_OF_YEAR which are handled below if (field != UCAL_DATE && field != UCAL_DAY_OF_YEAR && - isSet((UCalendarDateFields)field) && - ! boundsCheck(internalGet((UCalendarDateFields)field), (UCalendarDateFields)field)) + isSet(static_cast<UCalendarDateFields>(field)) && + !boundsCheck(internalGet(static_cast<UCalendarDateFields>(field)), static_cast<UCalendarDateFields>(field))) return false; } @@ -778,7 +778,7 @@ double GregorianCalendar::computeJulianDayOfYear(UBool isGregorian, double GregorianCalendar::millisToJulianDay(UDate millis) { - return (double)kEpochStartAsJulianDay + ClockMath::floorDivide(millis, (double)kOneDay); + return static_cast<double>(kEpochStartAsJulianDay) + ClockMath::floorDivide(millis, kOneDay); } // ------------------------------------- @@ -786,7 +786,7 @@ GregorianCalendar::millisToJulianDay(UDate millis) UDate GregorianCalendar::julianDayToMillis(double julian) { - return (UDate) ((julian - kEpochStartAsJulianDay) * (double) kOneDay); + return static_cast<UDate>((julian - kEpochStartAsJulianDay) * kOneDay); } // ------------------------------------- @@ -796,7 +796,7 @@ GregorianCalendar::aggregateStamp(int32_t stamp_a, int32_t stamp_b) { return (((stamp_a != kUnset && stamp_b != kUnset) ? uprv_max(stamp_a, stamp_b) - : (int32_t)kUnset)); + : static_cast<int32_t>(kUnset))); } // ------------------------------------- @@ -808,7 +808,7 @@ GregorianCalendar::aggregateStamp(int32_t stamp_a, int32_t stamp_b) void GregorianCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status) { - roll((UCalendarDateFields) field, amount, status); + roll(static_cast<UCalendarDateFields>(field), amount, status); } void @@ -1055,12 +1055,12 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s */ int32_t GregorianCalendar::getActualMinimum(EDateFields field) const { - return getMinimum((UCalendarDateFields)field); + return getMinimum(static_cast<UCalendarDateFields>(field)); } int32_t GregorianCalendar::getActualMinimum(EDateFields field, UErrorCode& /* status */) const { - return getMinimum((UCalendarDateFields)field); + return getMinimum(static_cast<UCalendarDateFields>(field)); } /** @@ -1258,7 +1258,7 @@ int32_t GregorianCalendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, */ int32_t GregorianCalendar::internalGetEra() const { - return isSet(UCAL_ERA) ? internalGet(UCAL_ERA) : (int32_t)AD; + return isSet(UCAL_ERA) ? internalGet(UCAL_ERA) : static_cast<int32_t>(AD); } const char * diff --git a/deps/icu-small/source/i18n/gregoimp.cpp b/deps/icu-small/source/i18n/gregoimp.cpp index 57499bd308579f..d5c8437a9b80f0 100644 --- a/deps/icu-small/source/i18n/gregoimp.cpp +++ b/deps/icu-small/source/i18n/gregoimp.cpp @@ -51,7 +51,7 @@ double ClockMath::floorDivide(double numerator, int32_t denominator, // expression `(int32_t) (x + n)` evaluated with rounding to nearest // differs from ⌊x+n⌋ if 0 < ⌈x⌉−x ≪ x+n, as `x + n` is rounded up to // n+⌈x⌉ = ⌊x+n⌋ + 1. Rewriting it as ⌊x⌋+n makes the addition exact. - *remainder = (int32_t) (uprv_floor(numerator) - (quotient * denominator)); + *remainder = static_cast<int32_t>(uprv_floor(numerator) - (quotient * denominator)); } return quotient; } @@ -118,10 +118,14 @@ int64_t Grego::fieldsToDay(int32_t year, int32_t month, int32_t dom) { } void Grego::dayToFields(int32_t day, int32_t& year, int32_t& month, - int32_t& dom, int32_t& dow, int32_t& doy) { + int32_t& dom, int32_t& dow, int32_t& doy, UErrorCode& status) { + if (U_FAILURE(status)) return; // Convert from 1970 CE epoch to 1 CE epoch (Gregorian calendar) - day += JULIAN_1970_CE - JULIAN_1_CE; + if (uprv_add32_overflow(day, JULIAN_1970_CE - JULIAN_1_CE, &day)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } // Convert from the day number to the multiple radix // representation. We use 400-year, 100-year, and 4-year cycles. @@ -156,11 +160,12 @@ void Grego::dayToFields(int32_t day, int32_t& year, int32_t& month, } void Grego::timeToFields(UDate time, int32_t& year, int32_t& month, - int32_t& dom, int32_t& dow, int32_t& doy, int32_t& mid) { + int32_t& dom, int32_t& dow, int32_t& doy, int32_t& mid, UErrorCode& status) { + if (U_FAILURE(status)) return; double millisInDay; - double day = ClockMath::floorDivide((double)time, (double)U_MILLIS_PER_DAY, &millisInDay); - mid = (int32_t)millisInDay; - dayToFields(day, year, month, dom, dow, doy); + double day = ClockMath::floorDivide(static_cast<double>(time), static_cast<double>(U_MILLIS_PER_DAY), &millisInDay); + mid = static_cast<int32_t>(millisInDay); + dayToFields(day, year, month, dom, dow, doy, status); } int32_t Grego::dayOfWeek(int32_t day) { diff --git a/deps/icu-small/source/i18n/gregoimp.h b/deps/icu-small/source/i18n/gregoimp.h index cd7694040d66c4..e069fb60de7909 100644 --- a/deps/icu-small/source/i18n/gregoimp.h +++ b/deps/icu-small/source/i18n/gregoimp.h @@ -208,9 +208,10 @@ class Grego { * @param dom output parameter to receive day-of-month (1-based) * @param dow output parameter to receive day-of-week (1-based, 1==Sun) * @param doy output parameter to receive day-of-year (1-based) + * @param status error code. */ static void dayToFields(int32_t day, int32_t& year, int32_t& month, - int32_t& dom, int32_t& dow, int32_t& doy); + int32_t& dom, int32_t& dow, int32_t& doy, UErrorCode& status); /** * Convert a 1970-epoch day number to proleptic Gregorian year, @@ -220,9 +221,10 @@ class Grego { * @param month output parameter to receive month (0-based, 0==Jan) * @param dom output parameter to receive day-of-month (1-based) * @param dow output parameter to receive day-of-week (1-based, 1==Sun) + * @param status error code. */ static inline void dayToFields(int32_t day, int32_t& year, int32_t& month, - int32_t& dom, int32_t& dow); + int32_t& dom, int32_t& dow, UErrorCode& status); /** * Convert a 1970-epoch milliseconds to proleptic Gregorian year, @@ -234,9 +236,10 @@ class Grego { * @param dow output parameter to receive day-of-week (1-based, 1==Sun) * @param doy output parameter to receive day-of-year (1-based) * @param mid output parameter to receive millis-in-day + * @param status error code. */ static void timeToFields(UDate time, int32_t& year, int32_t& month, - int32_t& dom, int32_t& dow, int32_t& doy, int32_t& mid); + int32_t& dom, int32_t& dow, int32_t& doy, int32_t& mid, UErrorCode& status); /** * Return the day of week on the 1970-epoch day @@ -303,9 +306,9 @@ Grego::previousMonthLength(int y, int m) { } inline void Grego::dayToFields(int32_t day, int32_t& year, int32_t& month, - int32_t& dom, int32_t& dow) { + int32_t& dom, int32_t& dow, UErrorCode& status) { int32_t doy_unused; - dayToFields(day,year,month,dom,dow,doy_unused); + dayToFields(day,year,month,dom,dow,doy_unused, status); } inline double Grego::julianDayToMillis(int32_t julian) @@ -314,11 +317,11 @@ inline double Grego::julianDayToMillis(int32_t julian) } inline int32_t Grego::millisToJulianDay(double millis) { - return (int32_t) (kEpochStartAsJulianDay + ClockMath::floorDivide(millis, (double)kOneDay)); + return static_cast<int32_t>(kEpochStartAsJulianDay + ClockMath::floorDivide(millis, kOneDay)); } inline int32_t Grego::gregorianShift(int32_t eyear) { - int64_t y = (int64_t)eyear-1; + int64_t y = static_cast<int64_t>(eyear) - 1; int64_t gregShift = ClockMath::floorDivideInt64(y, 400LL) - ClockMath::floorDivideInt64(y, 100LL) + 2; return static_cast<int32_t>(gregShift); } diff --git a/deps/icu-small/source/i18n/hebrwcal.cpp b/deps/icu-small/source/i18n/hebrwcal.cpp index d74ab2d3e7de26..ef70a48f2353e3 100644 --- a/deps/icu-small/source/i18n/hebrwcal.cpp +++ b/deps/icu-small/source/i18n/hebrwcal.cpp @@ -301,9 +301,15 @@ void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& */ void HebrewCalendar::add(EDateFields field, int32_t amount, UErrorCode& status) { - add((UCalendarDateFields)field, amount, status); + add(static_cast<UCalendarDateFields>(field), amount, status); } +namespace { + +int32_t monthsInYear(int32_t year); + +} // namespace + /** * Rolls (up/down) a specified amount time on the given field. For * example, to roll the current date up by three days, you can call @@ -372,7 +378,7 @@ void HebrewCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& } void HebrewCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status) { - roll((UCalendarDateFields)field, amount, status); + roll(static_cast<UCalendarDateFields>(field), amount, status); } //------------------------------------------------------------------------- @@ -396,6 +402,8 @@ static const int32_t MONTH_PARTS = MONTH_DAYS*DAY_PARTS + MONTH_FRACT; // Bet (Monday), Hey (5 hours from sunset), Resh-Daled (204). static const int32_t BAHARAD = 11*HOUR_PARTS + 204; +namespace { + /** * Finds the day # of the first day in the given Hebrew year. * To do this, we want to calculate the time of the Tishri 1 new moon @@ -416,7 +424,7 @@ static const int32_t BAHARAD = 11*HOUR_PARTS + 204; * http://www.faqs.org/faqs/calendars/faq/</a> * </ul> */ -int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) +int32_t startOfYear(int32_t year, UErrorCode &status) { ucln_i18n_registerCleanup(UCLN_I18N_HEBREW_CALENDAR, calendar_hebrew_cleanup); int64_t day = CalendarCache::get(&gCache, year, status); @@ -427,7 +435,7 @@ int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) if (day == 0) { // # of months before year int64_t months = ClockMath::floorDivideInt64( - (235LL * (int64_t)year - 234LL), 19LL); + (235LL * static_cast<int64_t>(year) - 234LL), 19LL); int64_t frac = months * MONTH_FRACT + BAHARAD; // Fractional part of day # day = months * 29LL + frac / DAY_PARTS; // Whole # part of calculation @@ -440,13 +448,13 @@ int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) day += 1; wd = (day % 7); } - if (wd == 1 && frac > 15*HOUR_PARTS+204 && !isLeapYear(year) ) { + if (wd == 1 && frac > 15*HOUR_PARTS+204 && !HebrewCalendar::isLeapYear(year) ) { // If the new moon falls after 3:11:20am (15h204p from the previous noon) // on a Tuesday and it is not a leap year, postpone by 2 days. // This prevents 356-day years. day += 2; } - else if (wd == 0 && frac > 21*HOUR_PARTS+589 && isLeapYear(year-1) ) { + else if (wd == 0 && frac > 21*HOUR_PARTS+589 && HebrewCalendar::isLeapYear(year-1) ) { // If the new moon falls after 9:32:43 1/3am (21h589p from yesterday noon) // on a Monday and *last* year was a leap year, postpone by 1 day. // Prevents 382-day years. @@ -463,16 +471,11 @@ int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) return day; } -/** -* Find the day of the week for a given day -* -* @param day The # of days since the start of the Hebrew calendar, -* 1-based (i.e. 1/1/1 AM is day 1). -*/ -int32_t HebrewCalendar::absoluteDayToDayOfWeek(int32_t day) -{ - // We know that 1/1/1 AM is a Monday, which makes the math easy... - return (day % 7) + 1; +int32_t daysInYear(int32_t eyear, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } + return startOfYear(eyear+1, status) - startOfYear(eyear, status); } /** @@ -481,9 +484,15 @@ int32_t HebrewCalendar::absoluteDayToDayOfWeek(int32_t day) * 1 "Normal" year with 354 or 384 days * 2 "Complete" year with 355 or 385 days */ -int32_t HebrewCalendar::yearType(int32_t year) const +int32_t yearType(int32_t year, UErrorCode& status) { - int32_t yearLength = handleGetYearLength(year); + if (U_FAILURE(status)) { + return 0; + } + int32_t yearLength = daysInYear(year, status); + if (U_FAILURE(status)) { + return 0; + } if (yearLength > 380) { yearLength -= 30; // Subtract length of leap month. @@ -505,6 +514,8 @@ int32_t HebrewCalendar::yearType(int32_t year) const return type; } +} // namespace + // /** * Determine whether a given Hebrew year is a leap year * @@ -517,10 +528,14 @@ UBool HebrewCalendar::isLeapYear(int32_t year) { return x >= ((x < 0) ? -7 : 12); } -int32_t HebrewCalendar::monthsInYear(int32_t year) { - return isLeapYear(year) ? 13 : 12; +namespace{ + +int32_t monthsInYear(int32_t year) { + return HebrewCalendar::isLeapYear(year) ? 13 : 12; } +} // namespace + //------------------------------------------------------------------------- // Calendar framework //------------------------------------------------------------------------- @@ -557,8 +572,14 @@ int32_t HebrewCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month switch (month) { case HESHVAN: case KISLEV: - // These two month lengths can vary - return MONTH_LENGTH[month][yearType(extendedYear)]; + { + // These two month lengths can vary + int32_t type = yearType(extendedYear, status); + if(U_FAILURE(status)) { + return 0; + } + return MONTH_LENGTH[month][type]; + } default: // The rest are a fixed length @@ -572,7 +593,11 @@ int32_t HebrewCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month */ int32_t HebrewCalendar::handleGetYearLength(int32_t eyear) const { UErrorCode status = U_ZERO_ERROR; - return startOfYear(eyear+1, status) - startOfYear(eyear, status); + int32_t len = daysInYear(eyear, status); + if (U_FAILURE(status)) { + return 12; + } + return len; } void HebrewCalendar::validateField(UCalendarDateFields field, UErrorCode &status) { @@ -616,8 +641,8 @@ void HebrewCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) return; } int32_t d = julianDay - 347997; - double m = ClockMath::floorDivide((d * (double)DAY_PARTS), (double) MONTH_PARTS); // Months (approx) - int32_t year = (int32_t)(ClockMath::floorDivide((19. * m + 234.), 235.) + 1.); // Years (approx) + double m = ClockMath::floorDivide((d * static_cast<double>(DAY_PARTS)), static_cast<double>(MONTH_PARTS)); // Months (approx) + int32_t year = static_cast<int32_t>(ClockMath::floorDivide((19. * m + 234.), 235.) + 1.); // Years (approx) int32_t ys = startOfYear(year, status); // 1st day of year if (U_FAILURE(status)) { return; @@ -635,12 +660,16 @@ void HebrewCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) } // Now figure out which month we're in, and the date within that month - int32_t type = yearType(year); + int32_t type = yearType(year, status); + if (U_FAILURE(status)) { + return; + } UBool isLeap = isLeapYear(year); int32_t month = 0; int32_t momax = UPRV_LENGTHOF(MONTH_START); - while (month < momax && dayOfYear > ( isLeap ? LEAP_MONTH_START[month][type] : MONTH_START[month][type] ) ) { + while (month < momax && + dayOfYear > ( isLeap ? LEAP_MONTH_START[month][type] : MONTH_START[month][type] ) ) { month++; } if (month >= momax || month<=0) { @@ -663,25 +692,25 @@ void HebrewCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) // Check out of bound year int32_t min_year = handleGetLimit(UCAL_EXTENDED_YEAR, UCAL_LIMIT_MINIMUM); if (year < min_year) { - if (!isLenient()) { - status = U_ILLEGAL_ARGUMENT_ERROR; - return; - } - year = min_year; + if (!isLenient()) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + year = min_year; } int32_t max_year = handleGetLimit(UCAL_EXTENDED_YEAR, UCAL_LIMIT_MAXIMUM); if (max_year < year) { - if (!isLenient()) { - status = U_ILLEGAL_ARGUMENT_ERROR; - return; - } - year = max_year; + if (!isLenient()) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + year = max_year; } internalSet(UCAL_YEAR, year); internalSet(UCAL_EXTENDED_YEAR, year); int32_t ordinal_month = month; if (!isLeap && ordinal_month > ADAR_1) { - ordinal_month--; + ordinal_month--; } internalSet(UCAL_ORDINAL_MONTH, ordinal_month); internalSet(UCAL_MONTH, month); @@ -754,10 +783,14 @@ int64_t HebrewCalendar::handleComputeMonthStart( } if (month != 0) { + int32_t type = yearType(eyear, status); + if (U_FAILURE(status)) { + return 0; + } if (isLeapYear(eyear)) { - day += LEAP_MONTH_START[month][yearType(eyear)]; + day += LEAP_MONTH_START[month][type]; } else { - day += MONTH_START[month][yearType(eyear)]; + day += MONTH_START[month][type]; } } @@ -830,7 +863,7 @@ int32_t HebrewCalendar::internalGetMonth(UErrorCode& status) const { } if (resolveFields(kMonthPrecedence) == UCAL_ORDINAL_MONTH) { int32_t ordinalMonth = internalGet(UCAL_ORDINAL_MONTH); - HebrewCalendar *nonConstThis = (HebrewCalendar*)this; // cast away const + HebrewCalendar* nonConstThis = const_cast<HebrewCalendar*>(this); // cast away const int32_t year = nonConstThis->handleGetExtendedYear(status); if (U_FAILURE(status)) { diff --git a/deps/icu-small/source/i18n/hebrwcal.h b/deps/icu-small/source/i18n/hebrwcal.h index 342fdb0efa766c..5fb10993d307b6 100644 --- a/deps/icu-small/source/i18n/hebrwcal.h +++ b/deps/icu-small/source/i18n/hebrwcal.h @@ -329,6 +329,7 @@ class U_I18N_API HebrewCalendar : public Calendar { * @stable ICU 2.0 */ virtual int32_t handleGetYearLength(int32_t eyear) const override; + /** * Subclasses may override this method to compute several fields * specific to each calendar system. These are: @@ -427,44 +428,6 @@ class U_I18N_API HebrewCalendar : public Calendar { protected: virtual int32_t internalGetMonth(UErrorCode& status) const override; - - private: // Calendar-specific implementation - /** - * Finds the day # of the first day in the given Hebrew year. - * To do this, we want to calculate the time of the Tishri 1 new moon - * in that year. - * <p> - * The algorithm here is similar to ones described in a number of - * references, including: - * <ul> - * <li>"Calendrical Calculations", by Nachum Dershowitz & Edward Reingold, - * Cambridge University Press, 1997, pages 85-91. - * - * <li>Hebrew Calendar Science and Myths, - * <a href="http://www.geocities.com/Athens/1584/"> - * http://www.geocities.com/Athens/1584/</a> - * - * <li>The Calendar FAQ, - * <a href="http://www.faqs.org/faqs/calendars/faq/"> - * http://www.faqs.org/faqs/calendars/faq/</a> - * </ul> - * @param year extended year - * @return day number (JD) - * @internal - */ - static int32_t startOfYear(int32_t year, UErrorCode& status); - - static int32_t absoluteDayToDayOfWeek(int32_t day) ; - - /** - * @internal - */ - int32_t yearType(int32_t year) const; - - /** - * @internal - */ - static int32_t monthsInYear(int32_t year) ; }; U_NAMESPACE_END diff --git a/deps/icu-small/source/i18n/indiancal.cpp b/deps/icu-small/source/i18n/indiancal.cpp index 1cca8e5f841264..b1fd39b9927e5d 100644 --- a/deps/icu-small/source/i18n/indiancal.cpp +++ b/deps/icu-small/source/i18n/indiancal.cpp @@ -148,10 +148,10 @@ static double gregorianToJD(int32_t year, int32_t month, int32_t date) { * Month is 0 based. * @param jd The Julian Day */ -static int32_t* jdToGregorian(double jd, int32_t gregorianDate[3]) { +static int32_t* jdToGregorian(double jd, int32_t gregorianDate[3], UErrorCode& status) { int32_t gdow; Grego::dayToFields(jd - kEpochStartAsJulianDay, - gregorianDate[0], gregorianDate[1], gregorianDate[2], gdow); + gregorianDate[0], gregorianDate[1], gregorianDate[2], gdow, status); return gregorianDate; } @@ -263,16 +263,17 @@ int32_t IndianCalendar::handleGetExtendedYear(UErrorCode& status) { * method is called. The getGregorianXxx() methods return Gregorian * calendar equivalents for the given Julian day. */ -void IndianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& /* status */) { +void IndianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { double jdAtStartOfGregYear; int32_t leapMonth, IndianYear, yday, IndianMonth, IndianDayOfMonth, mday; int32_t gregorianYear; // Stores gregorian date corresponding to Julian day; int32_t gd[3]; - gregorianYear = jdToGregorian(julianDay, gd)[0]; // Gregorian date for Julian day + gregorianYear = jdToGregorian(julianDay, gd, status)[0]; // Gregorian date for Julian day + if (U_FAILURE(status)) return; IndianYear = gregorianYear - INDIAN_ERA_START; // Year in Saka era jdAtStartOfGregYear = gregorianToJD(gregorianYear, 0, 1); // JD at start of Gregorian year - yday = (int32_t)(julianDay - jdAtStartOfGregYear); // Day number in Gregorian year (starting from 0) + yday = static_cast<int32_t>(julianDay - jdAtStartOfGregYear); // Day number in Gregorian year (starting from 0) if (yday < INDIAN_YEAR_START) { // Day is at the end of the preceding Saka year @@ -290,11 +291,11 @@ void IndianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& /* stat } else { mday = yday - leapMonth; if (mday < (31 * 5)) { - IndianMonth = (int32_t)uprv_floor(mday / 31) + 1; + IndianMonth = static_cast<int32_t>(uprv_floor(mday / 31)) + 1; IndianDayOfMonth = (mday % 31) + 1; } else { mday -= 31 * 5; - IndianMonth = (int32_t)uprv_floor(mday / 30) + 6; + IndianMonth = static_cast<int32_t>(uprv_floor(mday / 30)) + 6; IndianDayOfMonth = (mday % 30) + 1; } } diff --git a/deps/icu-small/source/i18n/inputext.cpp b/deps/icu-small/source/i18n/inputext.cpp index 0351518b704e08..4a7712404ca315 100644 --- a/deps/icu-small/source/i18n/inputext.cpp +++ b/deps/icu-small/source/i18n/inputext.cpp @@ -50,15 +50,15 @@ void InputText::setText(const char *in, int32_t len) { fInputLen = 0; fC1Bytes = false; - fRawInput = (const uint8_t *) in; - fRawLength = len == -1? (int32_t)uprv_strlen(in) : len; + fRawInput = reinterpret_cast<const uint8_t*>(in); + fRawLength = len == -1 ? static_cast<int32_t>(uprv_strlen(in)) : len; } void InputText::setDeclaredEncoding(const char* encoding, int32_t len) { if(encoding) { if (len == -1) { - len = (int32_t)uprv_strlen(encoding); + len = static_cast<int32_t>(uprv_strlen(encoding)); } len += 1; // to make place for the \0 at the end. @@ -98,7 +98,7 @@ void InputText::MungeInput(UBool fStripTags) { for (srci = 0; srci < fRawLength && dsti < BUFFER_SIZE; srci += 1) { b = fRawInput[srci]; - if (b == (uint8_t)0x3C) { /* Check for the ASCII '<' */ + if (b == static_cast<uint8_t>(0x3C)) { /* Check for the ASCII '<' */ if (inMarkup) { badTags += 1; } @@ -111,7 +111,7 @@ void InputText::MungeInput(UBool fStripTags) { fInputBytes[dsti++] = b; } - if (b == (uint8_t)0x3E) { /* Check for the ASCII '>' */ + if (b == static_cast<uint8_t>(0x3E)) { /* Check for the ASCII '>' */ inMarkup = false; } } diff --git a/deps/icu-small/source/i18n/islamcal.cpp b/deps/icu-small/source/i18n/islamcal.cpp index d299358a5f1ca8..dfeac36a66516d 100644 --- a/deps/icu-small/source/i18n/islamcal.cpp +++ b/deps/icu-small/source/i18n/islamcal.cpp @@ -303,7 +303,7 @@ inline bool civilLeapYear(int32_t year) { return (14 + 11 * year) % 30 < 11; } -int32_t trueMonthStart(int32_t month); +int32_t trueMonthStart(int32_t month, UErrorCode& status); } // namespace @@ -311,8 +311,8 @@ int32_t trueMonthStart(int32_t month); * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ -int64_t IslamicCalendar::yearStart(int32_t year) const{ - return trueMonthStart(12*(year-1)); +int64_t IslamicCalendar::yearStart(int32_t year, UErrorCode& status) const { + return trueMonthStart(12*(year-1), status); } /** @@ -334,7 +334,7 @@ int64_t IslamicCalendar::monthStart(int32_t year, int32_t month, UErrorCode& sta return 0; } - return trueMonthStart(month); + return trueMonthStart(month, status); } namespace { @@ -357,9 +357,11 @@ double moonAge(UDate time); * * @return The day number on which the given month starts. */ -int32_t trueMonthStart(int32_t month) { +int32_t trueMonthStart(int32_t month, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } ucln_i18n_registerCleanup(UCLN_I18N_ISLAMIC_CALENDAR, calendar_islamic_cleanup); - UErrorCode status = U_ZERO_ERROR; int64_t start = CalendarCache::get(&gMonthCache, month, status); if (U_SUCCESS(status) && start==0) { @@ -385,7 +387,7 @@ int32_t trueMonthStart(int32_t month) { } while (age < 0); } start = ClockMath::floorDivideInt64( - (int64_t)((int64_t)origin - HIJRA_MILLIS), (int64_t)kOneDay) + 1; + static_cast<int64_t>(static_cast<int64_t>(origin) - HIJRA_MILLIS), static_cast<int64_t>(kOneDay)) + 1; CalendarCache::put(&gMonthCache, month, start, status); } if(U_FAILURE(status)) { @@ -417,18 +419,40 @@ double moonAge(UDate time) { * @draft ICU 2.4 */ int32_t IslamicCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month, - UErrorCode& /* status */) const { + UErrorCode& status) const { month = 12*(extendedYear-1) + month; - return trueMonthStart(month+1) - trueMonthStart(month) ; + int32_t len = trueMonthStart(month+1, status) - trueMonthStart(month, status) ; + if (U_FAILURE(status)) { + return 0; + } + return len; +} + +namespace { + +int32_t yearLength(int32_t extendedYear, UErrorCode& status) { + int32_t month = 12*(extendedYear-1); + int32_t length = trueMonthStart(month + 12, status) - trueMonthStart(month, status); + if (U_FAILURE(status)) { + return 0; + } + return length; } +} // namepsace /** * Return the number of days in the given Islamic year * @draft ICU 2.4 */ int32_t IslamicCalendar::handleGetYearLength(int32_t extendedYear) const { - int32_t month = 12*(extendedYear-1); - return (trueMonthStart(month + 12) - trueMonthStart(month)); + UErrorCode status = U_ZERO_ERROR; + int32_t length = yearLength(extendedYear, status); + if (U_FAILURE(status)) { + // fallback to normal Islamic calendar length 355 day a year if we + // encounter error and cannot propagate. + return 355; + } + return length; } //------------------------------------------------------------------------- @@ -452,7 +476,6 @@ int64_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, // This may be called by Calendar::handleComputeJulianDay with months out of the range // 0..11. Need to handle that here since monthStart requires months in the range 0.11. if (month > 11) { - eyear += (month / 12); if (uprv_add32_overflow(eyear, (month / 12), &eyear)) { status = U_ILLEGAL_ARGUMENT_ERROR; return 0; @@ -500,13 +523,15 @@ int32_t IslamicCalendar::handleGetExtendedYear(UErrorCode& /* status */) { * @draft ICU 2.4 */ void IslamicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } int32_t days = julianDay - getEpoc(); // Guess at the number of elapsed full months since the epoch - int32_t month = (int32_t)uprv_floor((double)days / CalendarAstronomer::SYNODIC_MONTH); + int32_t month = static_cast<int32_t>(uprv_floor(static_cast<double>(days) / CalendarAstronomer::SYNODIC_MONTH)); - int32_t startDate = (int32_t)uprv_floor(month * CalendarAstronomer::SYNODIC_MONTH); + int32_t startDate = static_cast<int32_t>(uprv_floor(month * CalendarAstronomer::SYNODIC_MONTH)); double age = moonAge(internalGetTime()); if ( days - startDate >= 25 && age > 0) { @@ -516,10 +541,16 @@ void IslamicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) // Find out the last time that the new moon was actually visible at this longitude // This returns midnight the night that the moon was visible at sunset. - while ((startDate = trueMonthStart(month)) > days) { + while ((startDate = trueMonthStart(month, status)) > days) { + if (U_FAILURE(status)) { + return; + } // If it was after the date in question, back up a month and try again month--; } + if (U_FAILURE(status)) { + return; + } int32_t year = month >= 0 ? ((month / 12) + 1) : ((month + 1 ) / 12); month = ((month % 12) + 12 ) % 12; @@ -636,7 +667,7 @@ IslamicCivilCalendar* IslamicCivilCalendar::clone() const { * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ -int64_t IslamicCivilCalendar::yearStart(int32_t year) const{ +int64_t IslamicCivilCalendar::yearStart(int32_t year, UErrorCode& /* status */) const { return 354LL * (year-1LL) + ClockMath::floorDivideInt64(3 + 11LL * year, 30LL); } @@ -696,14 +727,19 @@ int32_t IslamicCivilCalendar::handleGetYearLength(int32_t extendedYear) const { * @draft ICU 2.4 */ void IslamicCivilCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } int32_t days = julianDay - getEpoc(); // Use the civil calendar approximation, which is just arithmetic int64_t year = ClockMath::floorDivideInt64(30LL * days + 10646LL, 10631LL); int32_t month = static_cast<int32_t>( - uprv_ceil((days - 29 - yearStart(year)) / 29.5 )); + uprv_ceil((days - 29 - yearStart(year, status)) / 29.5 )); + if (U_FAILURE(status)) { + return; + } month = month<11?month:11; int64_t dayOfMonth = (days - monthStart(year, month, status)) + 1; @@ -781,14 +817,14 @@ IslamicUmalquraCalendar* IslamicUmalquraCalendar::clone() const { * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ -int64_t IslamicUmalquraCalendar::yearStart(int32_t year) const { +int64_t IslamicUmalquraCalendar::yearStart(int32_t year, UErrorCode& status) const { if (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END) { - return IslamicCivilCalendar::yearStart(year); + return IslamicCivilCalendar::yearStart(year, status); } year -= UMALQURA_YEAR_START; // rounded least-squares fit of the dates previously calculated from UMALQURA_MONTHLENGTH iteration int64_t yrStartLinearEstimate = static_cast<int64_t>( - (354.36720 * (double)year) + 460322.05 + 0.5); + (354.36720 * static_cast<double>(year)) + 460322.05 + 0.5); // need a slight correction to some return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year]; } @@ -801,10 +837,10 @@ int64_t IslamicUmalquraCalendar::yearStart(int32_t year) const { * @param month The hijri month, 0-based (assumed to be in range 0..11) */ int64_t IslamicUmalquraCalendar::monthStart(int32_t year, int32_t month, UErrorCode& status) const { + int64_t ms = yearStart(year, status); if (U_FAILURE(status)) { return 0; } - int64_t ms = yearStart(year); for(int i=0; i< month; i++){ ms+= handleGetMonthLength(year, i, status); if (U_FAILURE(status)) { @@ -826,7 +862,7 @@ int32_t IslamicUmalquraCalendar::handleGetMonthLength(int32_t extendedYear, int3 return IslamicCivilCalendar::handleGetMonthLength(extendedYear, month, status); } int32_t length = 29; - int32_t mask = (int32_t) (0x01 << (11 - month)); // set mask for bit corresponding to month + int32_t mask = static_cast<int32_t>(0x01 << (11 - month)); // set mask for bit corresponding to month int32_t index = extendedYear - UMALQURA_YEAR_START; if ((UMALQURA_MONTHLENGTH[index] & mask) != 0) { length++; @@ -834,20 +870,32 @@ int32_t IslamicUmalquraCalendar::handleGetMonthLength(int32_t extendedYear, int3 return length; } -/** -* Return the number of days in the given Islamic year -* @draft ICU 2.4 -*/ -int32_t IslamicUmalquraCalendar::handleGetYearLength(int32_t extendedYear) const { +int32_t IslamicUmalquraCalendar::yearLength(int32_t extendedYear, UErrorCode& status) const { if (extendedYear<UMALQURA_YEAR_START || extendedYear>UMALQURA_YEAR_END) { return IslamicCivilCalendar::handleGetYearLength(extendedYear); } int length = 0; - UErrorCode internalStatus = U_ZERO_ERROR; for(int i=0; i<12; i++) { - length += handleGetMonthLength(extendedYear, i, internalStatus); + length += handleGetMonthLength(extendedYear, i, status); + if (U_FAILURE(status)) { + return 0; + } + } + return length; +} + +/** +* Return the number of days in the given Islamic year +* @draft ICU 2.4 +*/ +int32_t IslamicUmalquraCalendar::handleGetYearLength(int32_t extendedYear) const { + UErrorCode status = U_ZERO_ERROR; + int32_t length = yearLength(extendedYear, status); + if (U_FAILURE(status)) { + // fallback to normal Islamic calendar length 355 day a year if we + // encounter error and cannot propagate. + return 355; } - U_ASSERT(U_SUCCESS(internalStatus)); return length; } @@ -868,12 +916,17 @@ int32_t IslamicUmalquraCalendar::handleGetYearLength(int32_t extendedYear) const * @draft ICU 2.4 */ void IslamicUmalquraCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } int64_t year; int32_t month; int32_t days = julianDay - getEpoc(); - static int64_t kUmalquraStart = yearStart(UMALQURA_YEAR_START); + static int64_t kUmalquraStart = yearStart(UMALQURA_YEAR_START, status); + if (U_FAILURE(status)) { + return; + } if (days < kUmalquraStart) { IslamicCivilCalendar::handleComputeFields(julianDay, status); return; @@ -881,18 +934,21 @@ void IslamicUmalquraCalendar::handleComputeFields(int32_t julianDay, UErrorCode // Estimate a value y which is closer to but not greater than the year. // It is the inverse function of the logic inside // IslamicUmalquraCalendar::yearStart(). - year = ((double(days) - (460322.05 + 0.5)) / 354.36720) + UMALQURA_YEAR_START - 1; + year = ((static_cast<double>(days) - (460322.05 + 0.5)) / 354.36720) + UMALQURA_YEAR_START - 1; month = 0; int32_t d = 1; // need a slight correction to some while (d > 0) { - d = days - yearStart(++year) + 1; - int32_t yearLength = handleGetYearLength(year); - if (d == yearLength) { + d = days - yearStart(++year, status) + 1; + int32_t length = yearLength(year, status); + if (U_FAILURE(status)) { + return; + } + if (d == length) { month = 11; break; } - if (d < yearLength){ + if (d < length){ int32_t monthLen = handleGetMonthLength(year, month, status); for (month = 0; d > monthLen; diff --git a/deps/icu-small/source/i18n/islamcal.h b/deps/icu-small/source/i18n/islamcal.h index 1fb9ecd506cb55..e42e681328b4d2 100644 --- a/deps/icu-small/source/i18n/islamcal.h +++ b/deps/icu-small/source/i18n/islamcal.h @@ -201,7 +201,7 @@ class U_I18N_API IslamicCalendar : public Calendar { * Return the day # on which the given year starts. Days are counted * from the Hijri epoch, origin 0. */ - virtual int64_t yearStart(int32_t year) const; + virtual int64_t yearStart(int32_t year, UErrorCode& status) const; /** * Return the day # on which the given month starts. Days are counted @@ -413,7 +413,7 @@ class U_I18N_API IslamicCivilCalendar : public IslamicCalendar { * from the Hijri epoch, origin 0. * @internal */ - virtual int64_t yearStart(int32_t year) const override; + virtual int64_t yearStart(int32_t year, UErrorCode& status) const override; /** * Return the day # on which the given month starts. Days are counted @@ -596,7 +596,7 @@ class U_I18N_API IslamicUmalquraCalendar : public IslamicCivilCalendar { * from the Hijri epoch, origin 0. * @internal */ - virtual int64_t yearStart(int32_t year) const override; + virtual int64_t yearStart(int32_t year, UErrorCode& status) const override; /** * Return the day # on which the given month starts. Days are counted @@ -640,6 +640,9 @@ class U_I18N_API IslamicUmalquraCalendar : public IslamicCivilCalendar { * @internal */ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override; + + private: + virtual int32_t yearLength(int32_t extendedYear, UErrorCode& status) const; }; diff --git a/deps/icu-small/source/i18n/japancal.cpp b/deps/icu-small/source/i18n/japancal.cpp index 7e69b97a3af4ea..c0dd9fad0dc09b 100644 --- a/deps/icu-small/source/i18n/japancal.cpp +++ b/deps/icu-small/source/i18n/japancal.cpp @@ -171,15 +171,19 @@ int32_t JapaneseCalendar::getDefaultMonthInYear(int32_t eyear, UErrorCode& statu return month; } -int32_t JapaneseCalendar::getDefaultDayInMonth(int32_t eyear, int32_t month) +int32_t JapaneseCalendar::getDefaultDayInMonth(int32_t eyear, int32_t month, UErrorCode& status) { + if (U_FAILURE(status)) { + return 0; + } int32_t era = internalGetEra(); int32_t day = 1; int32_t eraStart[3] = { 0,0,0 }; - UErrorCode status = U_ZERO_ERROR; gJapaneseEraRules->getStartDate(era, eraStart, status); - U_ASSERT(U_SUCCESS(status)); + if (U_FAILURE(status)) { + return 0; + } if (eyear == eraStart[0] && (month == eraStart[1] - 1)) { return eraStart[2]; } @@ -227,8 +231,16 @@ void JapaneseCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status int32_t year = internalGet(UCAL_EXTENDED_YEAR); // Gregorian year int32_t eraIdx = gJapaneseEraRules->getEraIndex(year, internalGetMonth(status) + 1, internalGet(UCAL_DAY_OF_MONTH), status); + int32_t startYear = gJapaneseEraRules->getStartYear(eraIdx, status) - 1; + if (U_FAILURE(status)) { + return; + } + if (uprv_add32_overflow(year, -startYear, &year)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } internalSet(UCAL_ERA, eraIdx); - internalSet(UCAL_YEAR, year - gJapaneseEraRules->getStartYear(eraIdx, status) + 1); + internalSet(UCAL_YEAR, year); } /* diff --git a/deps/icu-small/source/i18n/japancal.h b/deps/icu-small/source/i18n/japancal.h index bd2a2ca0755063..627b12750b98a3 100644 --- a/deps/icu-small/source/i18n/japancal.h +++ b/deps/icu-small/source/i18n/japancal.h @@ -195,6 +195,7 @@ class JapaneseCalendar : public GregorianCalendar { * taking year and era into account. Will return the first month of the given era, if * the current year is an ascension year. * @param eyear the extended year + * @param status Indicates the status. * @internal */ virtual int32_t getDefaultMonthInYear(int32_t eyear, UErrorCode& status) override; @@ -205,9 +206,10 @@ class JapaneseCalendar : public GregorianCalendar { * era, if the current month is an ascension year and month. * @param eyear the extended year * @param mon the month in the year + * @param status Indicates the status. * @internal */ - virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month) override; + virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month, UErrorCode& status) override; virtual bool isEra0CountingBackward() const override { return false; } }; diff --git a/deps/icu-small/source/i18n/measunit.cpp b/deps/icu-small/source/i18n/measunit.cpp index a70d486539ff7d..2741b84aabf0c4 100644 --- a/deps/icu-small/source/i18n/measunit.cpp +++ b/deps/icu-small/source/i18n/measunit.cpp @@ -43,24 +43,24 @@ static const int32_t gOffsets[] = { 17, 27, 31, - 332, - 343, - 360, - 364, - 373, - 376, - 380, - 388, - 410, - 414, - 429, - 430, - 436, - 447, - 452, - 456, - 458, - 492 + 333, + 344, + 362, + 366, + 375, + 378, + 382, + 390, + 412, + 416, + 431, + 432, + 438, + 449, + 455, + 459, + 461, + 495 }; static const int32_t kCurrencyOffset = 5; @@ -423,6 +423,7 @@ static const char * const gSubTypes[] = { "ZRZ", "ZWC", "ZWD", + "ZWG", "ZWL", "ZWN", "ZWR", @@ -448,6 +449,7 @@ static const char * const gSubTypes[] = { "month", "month-person", "nanosecond", + "night", "quarter", "second", "week", @@ -544,6 +546,7 @@ static const char * const gSubTypes[] = { "beaufort", "kilometer-per-hour", "knot", + "light-speed", "meter-per-second", "mile-per-hour", "celsius", @@ -1016,54 +1019,62 @@ MeasureUnit MeasureUnit::getNanosecond() { return MeasureUnit(7, 10); } -MeasureUnit *MeasureUnit::createQuarter(UErrorCode &status) { +MeasureUnit *MeasureUnit::createNight(UErrorCode &status) { return MeasureUnit::create(7, 11, status); } -MeasureUnit MeasureUnit::getQuarter() { +MeasureUnit MeasureUnit::getNight() { return MeasureUnit(7, 11); } -MeasureUnit *MeasureUnit::createSecond(UErrorCode &status) { +MeasureUnit *MeasureUnit::createQuarter(UErrorCode &status) { return MeasureUnit::create(7, 12, status); } -MeasureUnit MeasureUnit::getSecond() { +MeasureUnit MeasureUnit::getQuarter() { return MeasureUnit(7, 12); } -MeasureUnit *MeasureUnit::createWeek(UErrorCode &status) { +MeasureUnit *MeasureUnit::createSecond(UErrorCode &status) { return MeasureUnit::create(7, 13, status); } -MeasureUnit MeasureUnit::getWeek() { +MeasureUnit MeasureUnit::getSecond() { return MeasureUnit(7, 13); } -MeasureUnit *MeasureUnit::createWeekPerson(UErrorCode &status) { +MeasureUnit *MeasureUnit::createWeek(UErrorCode &status) { return MeasureUnit::create(7, 14, status); } -MeasureUnit MeasureUnit::getWeekPerson() { +MeasureUnit MeasureUnit::getWeek() { return MeasureUnit(7, 14); } -MeasureUnit *MeasureUnit::createYear(UErrorCode &status) { +MeasureUnit *MeasureUnit::createWeekPerson(UErrorCode &status) { return MeasureUnit::create(7, 15, status); } -MeasureUnit MeasureUnit::getYear() { +MeasureUnit MeasureUnit::getWeekPerson() { return MeasureUnit(7, 15); } -MeasureUnit *MeasureUnit::createYearPerson(UErrorCode &status) { +MeasureUnit *MeasureUnit::createYear(UErrorCode &status) { return MeasureUnit::create(7, 16, status); } -MeasureUnit MeasureUnit::getYearPerson() { +MeasureUnit MeasureUnit::getYear() { return MeasureUnit(7, 16); } +MeasureUnit *MeasureUnit::createYearPerson(UErrorCode &status) { + return MeasureUnit::create(7, 17, status); +} + +MeasureUnit MeasureUnit::getYearPerson() { + return MeasureUnit(7, 17); +} + MeasureUnit *MeasureUnit::createAmpere(UErrorCode &status) { return MeasureUnit::create(8, 0, status); } @@ -1544,14 +1555,6 @@ MeasureUnit MeasureUnit::getKilogram() { return MeasureUnit(15, 5); } -MeasureUnit *MeasureUnit::createMetricTon(UErrorCode &status) { - return MeasureUnit::create(15, 14, status); -} - -MeasureUnit MeasureUnit::getMetricTon() { - return MeasureUnit(15, 14); -} - MeasureUnit *MeasureUnit::createMicrogram(UErrorCode &status) { return MeasureUnit::create(15, 6, status); } @@ -1624,6 +1627,14 @@ MeasureUnit MeasureUnit::getTonne() { return MeasureUnit(15, 14); } +MeasureUnit *MeasureUnit::createMetricTon(UErrorCode &status) { + return MeasureUnit::create(15, 14, status); +} + +MeasureUnit MeasureUnit::getMetricTon() { + return MeasureUnit(15, 14); +} + MeasureUnit *MeasureUnit::createGigawatt(UErrorCode &status) { return MeasureUnit::create(17, 0, status); } @@ -1784,22 +1795,30 @@ MeasureUnit MeasureUnit::getKnot() { return MeasureUnit(19, 2); } -MeasureUnit *MeasureUnit::createMeterPerSecond(UErrorCode &status) { +MeasureUnit *MeasureUnit::createLightSpeed(UErrorCode &status) { return MeasureUnit::create(19, 3, status); } -MeasureUnit MeasureUnit::getMeterPerSecond() { +MeasureUnit MeasureUnit::getLightSpeed() { return MeasureUnit(19, 3); } -MeasureUnit *MeasureUnit::createMilePerHour(UErrorCode &status) { +MeasureUnit *MeasureUnit::createMeterPerSecond(UErrorCode &status) { return MeasureUnit::create(19, 4, status); } -MeasureUnit MeasureUnit::getMilePerHour() { +MeasureUnit MeasureUnit::getMeterPerSecond() { return MeasureUnit(19, 4); } +MeasureUnit *MeasureUnit::createMilePerHour(UErrorCode &status) { + return MeasureUnit::create(19, 5, status); +} + +MeasureUnit MeasureUnit::getMilePerHour() { + return MeasureUnit(19, 5); +} + MeasureUnit *MeasureUnit::createCelsius(UErrorCode &status) { return MeasureUnit::create(20, 0, status); } diff --git a/deps/icu-small/source/i18n/measunit_impl.h b/deps/icu-small/source/i18n/measunit_impl.h index 5ee5c7bb95d9be..f6a8f90dc94f0c 100644 --- a/deps/icu-small/source/i18n/measunit_impl.h +++ b/deps/icu-small/source/i18n/measunit_impl.h @@ -356,16 +356,8 @@ template class U_I18N_API MaybeStackVector<MeasureUnitImplWithIndex, 8>; // Export an explicit template instantiation of the LocalPointer that is used as a // data member of MeasureUnitImpl. // (When building DLLs for Windows this is required.) -#if defined(_MSC_VER) -// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= -#pragma warning(push) -#pragma warning(disable : 4661) -#endif template class U_I18N_API LocalPointerBase<MeasureUnitImpl>; template class U_I18N_API LocalPointer<MeasureUnitImpl>; -#if defined(_MSC_VER) -#pragma warning(pop) -#endif #endif U_NAMESPACE_END diff --git a/deps/icu-small/source/i18n/messageformat2.cpp b/deps/icu-small/source/i18n/messageformat2.cpp index c5ae9f1c60859a..73f7fa45e69f81 100644 --- a/deps/icu-small/source/i18n/messageformat2.cpp +++ b/deps/icu-small/source/i18n/messageformat2.cpp @@ -241,24 +241,6 @@ FunctionOptions MessageFormatter::resolveOptions(const Environment& env, const O return FormattedPlaceholder(fallback); } -// Per https://github.com/unicode-org/message-format-wg/blob/main/spec/formatting.md#fallback-resolution -static UnicodeString reservedFallback (const Expression& e) { - UErrorCode localErrorCode = U_ZERO_ERROR; - const Operator* rator = e.getOperator(localErrorCode); - U_ASSERT(U_SUCCESS(localErrorCode)); - const Reserved& r = rator->asReserved(); - - // An empty Reserved isn't representable in the syntax - U_ASSERT(r.numParts() > 0); - - const UnicodeString& contents = r.getPart(0).unquoted(); - // Parts should never be empty - U_ASSERT(contents.length() > 0); - - // Return first character of string - return UnicodeString(contents, 0, 1); -} - // Formats an expression using `globalEnv` for the values of variables [[nodiscard]] FormattedPlaceholder MessageFormatter::formatExpression(const Environment& globalEnv, const Expression& expr, @@ -268,12 +250,6 @@ static UnicodeString reservedFallback (const Expression& e) { return {}; } - // Formatting error - if (expr.isReserved()) { - context.getErrors().setReservedError(status); - return FormattedPlaceholder(reservedFallback(expr)); - } - const Operand& rand = expr.getOperand(); // Format the operand (formatOperand handles the case of a null operand) FormattedPlaceholder randVal = formatOperand(globalEnv, rand, context, status); @@ -467,7 +443,7 @@ void MessageFormatter::resolvePreferences(MessageContext& context, UVector& res, int32_t numVariants = dataModel.numVariants(); const Variant* variants = dataModel.getVariantsInternal(); // 2. For each index i in res - for (int32_t i = 0; i < (int32_t) res.size(); i++) { + for (int32_t i = 0; i < res.size(); i++) { // 2i. Let keys be a new empty list of strings. LocalPointer<UVector> keys(createUVector(status)); CHECK_ERROR(status); @@ -535,7 +511,7 @@ void MessageFormatter::filterVariants(const UVector& pref, UVector& vars, UError const Key* var = selectorKeys.getKeysInternal(); // 2i. For each index `i` in `pref`: bool noMatch = false; - for (int32_t i = 0; i < (int32_t) pref.size(); i++) { + for (int32_t i = 0; i < pref.size(); i++) { // 2i(a). Let `key` be the `var` key at position `i`. U_ASSERT(i < selectorKeys.len); const Key& key = var[i]; @@ -675,12 +651,6 @@ ResolvedSelector MessageFormatter::resolveVariables(const Environment& env, return {}; } - // A `reserved` is an error - if (expr.isReserved()) { - context.getErrors().setReservedError(status); - return ResolvedSelector(FormattedPlaceholder(reservedFallback(expr))); - } - // Function call -- resolve the operand and options if (expr.isFunctionCall()) { const Operator* rator = expr.getOperator(status); @@ -814,7 +784,12 @@ UnicodeString MessageFormatter::formatToString(const MessageArguments& arguments } } // Update status according to all errors seen while formatting - context.checkErrors(status); + if (signalErrors) { + context.checkErrors(status); + } + if (U_FAILURE(status)) { + result.remove(); + } return result; } @@ -869,7 +844,7 @@ void MessageFormatter::checkDeclarations(MessageContext& context, Environment*& CHECK_ERROR(status); const Binding* decls = getDataModel().getLocalVariablesInternal(); - U_ASSERT(env != nullptr && decls != nullptr); + U_ASSERT(env != nullptr && (decls != nullptr || getDataModel().bindingsLen == 0)); for (int32_t i = 0; i < getDataModel().bindingsLen; i++) { const Binding& decl = decls[i]; diff --git a/deps/icu-small/source/i18n/messageformat2_checker.cpp b/deps/icu-small/source/i18n/messageformat2_checker.cpp index 192167583fffdb..bdc5c383b6e89f 100644 --- a/deps/icu-small/source/i18n/messageformat2_checker.cpp +++ b/deps/icu-small/source/i18n/messageformat2_checker.cpp @@ -22,6 +22,7 @@ Checks data model errors The following are checked here: Variant Key Mismatch +Duplicate Variant Missing Fallback Variant (called NonexhaustivePattern here) Missing Selector Annotation Duplicate Declaration @@ -135,9 +136,7 @@ void Checker::addFreeVars(TypeEnvironment& t, const OptionMap& opts, UErrorCode& void Checker::addFreeVars(TypeEnvironment& t, const Operator& rator, UErrorCode& status) { CHECK_ERROR(status); - if (!rator.isReserved()) { - addFreeVars(t, rator.getOptionsInternal(), status); - } + addFreeVars(t, rator.getOptionsInternal(), status); } void Checker::addFreeVars(TypeEnvironment& t, const Expression& rhs, UErrorCode& status) { @@ -162,6 +161,7 @@ void Checker::checkVariants(UErrorCode& status) { // Check that one variant includes only wildcards bool defaultExists = false; + bool duplicatesExist = false; for (int32_t i = 0; i < dataModel.numVariants(); i++) { const SelectorKeys& k = variants[i].getKeys(); @@ -173,10 +173,35 @@ void Checker::checkVariants(UErrorCode& status) { return; } defaultExists |= areDefaultKeys(keys, len); + + // Check if this variant's keys are duplicated by any other variant's keys + if (!duplicatesExist) { + // This check takes quadratic time, but it can be optimized if checking + // this property turns out to be a bottleneck. + for (int32_t j = 0; j < i; j++) { + const SelectorKeys& k1 = variants[j].getKeys(); + const Key* keys1 = k1.getKeysInternal(); + bool allEqual = true; + // This variant was already checked, + // so we know keys1.len == len + for (int32_t kk = 0; kk < len; kk++) { + if (!(keys[kk] == keys1[kk])) { + allEqual = false; + break; + } + } + if (allEqual) { + duplicatesExist = true; + } + } + } + } + + if (duplicatesExist) { + errors.addError(StaticErrorType::DuplicateVariant, status); } if (!defaultExists) { errors.addError(StaticErrorType::NonexhaustivePattern, status); - return; } } @@ -186,12 +211,10 @@ void Checker::requireAnnotated(const TypeEnvironment& t, const Expression& selec if (selectorExpr.isFunctionCall()) { return; // No error } - if (!selectorExpr.isReserved()) { - const Operand& rand = selectorExpr.getOperand(); - if (rand.isVariable()) { - if (t.get(rand.asVariable()) == TypeEnvironment::Type::Annotated) { - return; // No error - } + const Operand& rand = selectorExpr.getOperand(); + if (rand.isVariable()) { + if (t.get(rand.asVariable()) == TypeEnvironment::Type::Annotated) { + return; // No error } } // If this code is reached, an error was detected @@ -213,9 +236,6 @@ TypeEnvironment::Type typeOf(TypeEnvironment& t, const Expression& expr) { if (expr.isFunctionCall()) { return TypeEnvironment::Type::Annotated; } - if (expr.isReserved()) { - return TypeEnvironment::Type::Unannotated; - } const Operand& rand = expr.getOperand(); U_ASSERT(!rand.isNull()); if (rand.isLiteral()) { @@ -269,11 +289,6 @@ void Checker::checkDeclarations(TypeEnvironment& t, UErrorCode& status) { // Next, extend the type environment with a binding from lhs to its type t.extend(lhs, typeOf(t, rhs), status); } - - // Check for unsupported statements - if (dataModel.unsupportedStatementsLen > 0) { - errors.addError(StaticErrorType::UnsupportedStatementError, status); - } } void Checker::check(UErrorCode& status) { diff --git a/deps/icu-small/source/i18n/messageformat2_data_model.cpp b/deps/icu-small/source/i18n/messageformat2_data_model.cpp index 8255de01af062e..3fe5f65b532364 100644 --- a/deps/icu-small/source/i18n/messageformat2_data_model.cpp +++ b/deps/icu-small/source/i18n/messageformat2_data_model.cpp @@ -186,6 +186,9 @@ bool Key::operator==(const Key& other) const { if (isWildcard()) { return other.isWildcard(); } + if (other.isWildcard()) { + return false; + } return (asLiteral() == other.asLiteral()); } @@ -196,77 +199,6 @@ const Literal& Key::asLiteral() const { Key::~Key() {} -// ------------ Reserved - -// Copy constructor -Reserved::Reserved(const Reserved& other) : len(other.len) { - U_ASSERT(!other.bogus); - - UErrorCode localErrorCode = U_ZERO_ERROR; - if (len == 0) { - parts.adoptInstead(nullptr); - } else { - parts.adoptInstead(copyArray(other.parts.getAlias(), len, localErrorCode)); - } - if (U_FAILURE(localErrorCode)) { - bogus = true; - } -} - -Reserved& Reserved::operator=(Reserved other) noexcept { - swap(*this, other); - return *this; -} - -Reserved::Reserved(const UVector& ps, UErrorCode& status) noexcept : len(ps.size()) { - if (U_FAILURE(status)) { - return; - } - parts = LocalArray<Literal>(copyVectorToArray<Literal>(ps, status)); -} - -int32_t Reserved::numParts() const { - U_ASSERT(!bogus); - return len; -} - -const Literal& Reserved::getPart(int32_t i) const { - U_ASSERT(!bogus); - U_ASSERT(i < numParts()); - return parts[i]; -} - -Reserved::Builder::Builder(UErrorCode& status) { - parts = createUVector(status); -} - -Reserved Reserved::Builder::build(UErrorCode& status) const noexcept { - if (U_FAILURE(status)) { - return {}; - } - U_ASSERT(parts != nullptr); - return Reserved(*parts, status); -} - -Reserved::Builder& Reserved::Builder::add(Literal&& part, UErrorCode& status) noexcept { - U_ASSERT(parts != nullptr); - if (U_SUCCESS(status)) { - Literal* l = create<Literal>(std::move(part), status); - parts->adoptElement(l, status); - } - return *this; -} - -Reserved::Builder::~Builder() { - if (parts != nullptr) { - delete parts; - } -} - -Reserved::~Reserved() { - len = 0; -} - //------------------------ Operator OptionMap::OptionMap(const UVector& opts, UErrorCode& status) : len(opts.size()) { @@ -281,6 +213,10 @@ OptionMap::OptionMap(const UVector& opts, UErrorCode& status) : len(opts.size()) OptionMap::OptionMap(const OptionMap& other) : len(other.len) { U_ASSERT(!other.bogus); + if (len == 0) { + bogus = false; + return; + } UErrorCode localErrorCode = U_ZERO_ERROR; Option* result = copyArray(other.options.getAlias(), len, localErrorCode); if (U_FAILURE(localErrorCode)) { @@ -372,14 +308,8 @@ OptionMap::Builder::~Builder() { } } -const Reserved& Operator::asReserved() const { - U_ASSERT(isReserved()); - return *(std::get_if<Reserved>(&contents)); -} - const OptionMap& Operator::getOptionsInternal() const { - U_ASSERT(!isReserved()); - return std::get_if<Callable>(&contents)->getOptions(); + return options; } Option::Option(const Option& other): name(other.name), rand(other.rand) {} @@ -393,62 +323,28 @@ Option::~Option() {} Operator::Builder::Builder(UErrorCode& status) : options(OptionMap::Builder(status)) {} -Operator::Builder& Operator::Builder::setReserved(Reserved&& reserved) { - isReservedSequence = true; - hasFunctionName = false; - hasOptions = false; - asReserved = std::move(reserved); - return *this; -} - Operator::Builder& Operator::Builder::setFunctionName(FunctionName&& func) { - isReservedSequence = false; - hasFunctionName = true; functionName = std::move(func); return *this; } const FunctionName& Operator::getFunctionName() const { - U_ASSERT(!isReserved()); - return std::get_if<Callable>(&contents)->getName(); + return name; } Operator::Builder& Operator::Builder::addOption(const UnicodeString &key, Operand&& value, UErrorCode& errorCode) noexcept { THIS_ON_ERROR(errorCode); - isReservedSequence = false; - hasOptions = true; options.add(Option(key, std::move(value)), errorCode); return *this; } Operator Operator::Builder::build(UErrorCode& errorCode) { - Operator result; - if (U_FAILURE(errorCode)) { - return result; - } - // Must be either reserved or function, not both; enforced by methods - if (isReservedSequence) { - // Methods enforce that the function name and options are unset - // if `setReserved()` is called, so if they were valid, that - // would indicate a bug. - U_ASSERT(!hasOptions && !hasFunctionName); - result = Operator(asReserved); - } else { - if (!hasFunctionName) { - // Neither function name nor reserved was set - // There is no default, so this case could occur if the - // caller creates a builder and doesn't make any calls - // before calling build(). - errorCode = U_INVALID_STATE_ERROR; - return result; - } - result = Operator(functionName, options.build(errorCode)); - } - return result; + return Operator(functionName, options.build(errorCode)); } -Operator::Operator(const Operator& other) noexcept : contents(other.contents) {} +Operator::Operator(const Operator& other) noexcept + : name(other.name), options(other.options) {} Operator& Operator::operator=(Operator other) noexcept { swap(*this, other); @@ -456,23 +352,13 @@ Operator& Operator::operator=(Operator other) noexcept { } // Function call -Operator::Operator(const FunctionName& f, const UVector& optsVector, UErrorCode& status) : contents(Callable(f, OptionMap(optsVector, status))) {} -Operator::Operator(const FunctionName& f, const OptionMap& opts) : contents(Callable(f, opts)) {} +Operator::Operator(const FunctionName& f, const OptionMap& opts) : name(f), options(opts) {} Operator::Builder::~Builder() {} Operator::~Operator() {} -Callable& Callable::operator=(Callable other) noexcept { - swap(*this, other); - return *this; -} - -Callable::Callable(const Callable& other) : name(other.name), options(other.options) {} - -Callable::~Callable() {} - // ------------ Markup Markup::Builder::Builder(UErrorCode& status) @@ -531,19 +417,14 @@ UBool Expression::isStandaloneAnnotation() const { // Returns true for function calls with operands as well as // standalone annotations. -// Reserved sequences are not function calls UBool Expression::isFunctionCall() const { - return (rator.has_value() && !rator->isReserved()); -} - -UBool Expression::isReserved() const { - return (rator.has_value() && rator->isReserved()); + return rator.has_value(); } const Operator* Expression::getOperator(UErrorCode& status) const { NULL_ON_ERROR(status); - if (!(isReserved() || isFunctionCall())) { + if (!isFunctionCall()) { status = U_INVALID_STATE_ERROR; return nullptr; } @@ -610,92 +491,6 @@ Expression::Builder::~Builder() {} Expression::~Expression() {} -// ----------- UnsupportedStatement - -UnsupportedStatement::Builder::Builder(UErrorCode& status) { - expressions = createUVector(status); -} - -UnsupportedStatement::Builder& UnsupportedStatement::Builder::setKeyword(const UnicodeString& k) { - keyword = k; - return *this; -} - -UnsupportedStatement::Builder& UnsupportedStatement::Builder::setBody(Reserved&& r) { - body.emplace(r); - return *this; -} - -UnsupportedStatement::Builder& UnsupportedStatement::Builder::addExpression(Expression&& e, UErrorCode& status) { - U_ASSERT(expressions != nullptr); - if (U_SUCCESS(status)) { - Expression* expr = create<Expression>(std::move(e), status); - expressions->adoptElement(expr, status); - } - return *this; -} - -UnsupportedStatement UnsupportedStatement::Builder::build(UErrorCode& status) const { - if (U_SUCCESS(status)) { - U_ASSERT(expressions != nullptr); - if (keyword.length() <= 0) { - status = U_ILLEGAL_ARGUMENT_ERROR; - } else if (expressions->size() < 1) { - status = U_ILLEGAL_ARGUMENT_ERROR; - } else { - return UnsupportedStatement(keyword, body, *expressions, status); - } - } - return {}; -} - -const Reserved* UnsupportedStatement::getBody(UErrorCode& errorCode) const { - if (U_SUCCESS(errorCode)) { - if (body.has_value()) { - return &(*body); - } - errorCode = U_ILLEGAL_ARGUMENT_ERROR; - } - return nullptr; -} - -UnsupportedStatement::UnsupportedStatement(const UnicodeString& k, - const std::optional<Reserved>& r, - const UVector& es, - UErrorCode& status) - : keyword(k), body(r), expressionsLen(es.size()) { - CHECK_ERROR(status); - - U_ASSERT(expressionsLen >= 1); - Expression* result = copyVectorToArray<Expression>(es, status); - CHECK_ERROR(status); - expressions.adoptInstead(result); -} - -UnsupportedStatement::UnsupportedStatement(const UnsupportedStatement& other) { - keyword = other.keyword; - body = other.body; - expressionsLen = other.expressionsLen; - U_ASSERT(expressionsLen > 0); - UErrorCode localErrorCode = U_ZERO_ERROR; - expressions.adoptInstead(copyArray(other.expressions.getAlias(), expressionsLen, localErrorCode)); - if (U_FAILURE(localErrorCode)) { - expressionsLen = 0; - } -} - -UnsupportedStatement& UnsupportedStatement::operator=(UnsupportedStatement other) noexcept { - swap(*this, other); - return *this; -} - -UnsupportedStatement::Builder::~Builder() { - if (expressions != nullptr) { - delete expressions; - } -} - -UnsupportedStatement::~UnsupportedStatement() {} // ----------- PatternPart // PatternPart needs a copy constructor in order to make Pattern deeply copyable @@ -829,23 +624,19 @@ const Expression& Binding::getValue() const { } else { const Operator* rator = rhs.getOperator(errorCode); bool hasOperator = U_SUCCESS(errorCode); - if (hasOperator && rator->isReserved()) { - errorCode = U_INVALID_STATE_ERROR; + // Clear error code -- the "error" from the absent operator + // is handled + errorCode = U_ZERO_ERROR; + b = Binding(variableName, std::move(rhs)); + b.local = false; + if (hasOperator) { + rator = b.getValue().getOperator(errorCode); + U_ASSERT(U_SUCCESS(errorCode)); + b.annotation = rator; } else { - // Clear error code -- the "error" from the absent operator - // is handled - errorCode = U_ZERO_ERROR; - b = Binding(variableName, std::move(rhs)); - b.local = false; - if (hasOperator) { - rator = b.getValue().getOperator(errorCode); - U_ASSERT(U_SUCCESS(errorCode)); - b.annotation = std::get_if<Callable>(&(rator->contents)); - } else { - b.annotation = nullptr; - } - U_ASSERT(!hasOperator || b.annotation != nullptr); + b.annotation = nullptr; } + U_ASSERT(!hasOperator || b.annotation != nullptr); } } return b; @@ -853,17 +644,17 @@ const Expression& Binding::getValue() const { const OptionMap& Binding::getOptionsInternal() const { U_ASSERT(annotation != nullptr); - return annotation->getOptions(); + return annotation->getOptionsInternal(); } void Binding::updateAnnotation() { UErrorCode localErrorCode = U_ZERO_ERROR; const Operator* rator = expr.getOperator(localErrorCode); - if (U_FAILURE(localErrorCode) || rator->isReserved()) { + if (U_FAILURE(localErrorCode)) { return; } - U_ASSERT(U_SUCCESS(localErrorCode) && !rator->isReserved()); - annotation = std::get_if<Callable>(&(rator->contents)); + U_ASSERT(U_SUCCESS(localErrorCode)); + annotation = rator; } Binding::Binding(const Binding& other) : var(other.var), expr(other.expr), local(other.local) { @@ -926,9 +717,10 @@ const Pattern& MFDataModel::getPattern() const { return *(std::get_if<Pattern>(&body)); } +// Returns nullptr if no bindings const Binding* MFDataModel::getLocalVariablesInternal() const { U_ASSERT(!bogus); - U_ASSERT(bindings.isValid()); + U_ASSERT(bindingsLen == 0 || bindings.isValid()); return bindings.getAlias(); } @@ -944,16 +736,8 @@ const Variant* MFDataModel::getVariantsInternal() const { return std::get_if<Matcher>(&body)->variants.getAlias(); } -const UnsupportedStatement* MFDataModel::getUnsupportedStatementsInternal() const { - U_ASSERT(!bogus); - U_ASSERT(unsupportedStatements.isValid()); - return unsupportedStatements.getAlias(); -} - - MFDataModel::Builder::Builder(UErrorCode& status) { bindings = createUVector(status); - unsupportedStatements = createUVector(status); } // Invalidate pattern and create selectors/variants if necessary @@ -1002,14 +786,6 @@ MFDataModel::Builder& MFDataModel::Builder::addBinding(Binding&& b, UErrorCode& return *this; } -MFDataModel::Builder& MFDataModel::Builder::addUnsupportedStatement(UnsupportedStatement&& s, UErrorCode& status) { - if (U_SUCCESS(status)) { - U_ASSERT(unsupportedStatements != nullptr); - unsupportedStatements->adoptElement(create<UnsupportedStatement>(std::move(s), status), status); - } - return *this; -} - /* selector must be non-null */ @@ -1052,7 +828,6 @@ MFDataModel::MFDataModel(const MFDataModel& other) : body(Pattern()) { UErrorCode localErrorCode = U_ZERO_ERROR; if (other.hasPattern()) { - // body.emplace<Pattern>(Pattern(*std::get_if<Pattern>(&other.body))); body = *std::get_if<Pattern>(&other.body); } else { const Expression* otherSelectors = other.getSelectorsInternal(); @@ -1065,17 +840,13 @@ MFDataModel::MFDataModel(const MFDataModel& other) : body(Pattern()) { bogus = true; return; } - // body.emplace<Matcher>(Matcher(copiedSelectors, numSelectors, copiedVariants, numVariants)); body = Matcher(copiedSelectors, numSelectors, copiedVariants, numVariants); } bindingsLen = other.bindingsLen; - bindings.adoptInstead(copyArray(other.bindings.getAlias(), bindingsLen, localErrorCode)); - if (U_FAILURE(localErrorCode)) { - bogus = true; + if (bindingsLen > 0) { + bindings.adoptInstead(copyArray(other.bindings.getAlias(), bindingsLen, localErrorCode)); } - unsupportedStatementsLen = other.unsupportedStatementsLen; - unsupportedStatements.adoptInstead(copyArray(other.unsupportedStatements.getAlias(), unsupportedStatementsLen, localErrorCode)); if (U_FAILURE(localErrorCode)) { bogus = true; } @@ -1091,20 +862,20 @@ MFDataModel::MFDataModel(const MFDataModel::Builder& builder, UErrorCode& errorC U_ASSERT(builder.selectors != nullptr); int32_t numVariants = builder.variants->size(); int32_t numSelectors = builder.selectors->size(); - Variant* variants = copyVectorToArray<Variant>(*builder.variants, errorCode); - Expression* selectors = copyVectorToArray<Expression>(*builder.selectors, errorCode); + LocalArray<Variant> variants(copyVectorToArray<Variant>(*builder.variants, errorCode), errorCode); + LocalArray<Expression> selectors(copyVectorToArray<Expression>(*builder.selectors, errorCode), errorCode); if (U_FAILURE(errorCode)) { bogus = true; return; } - body.emplace<Matcher>(Matcher(selectors, numSelectors, variants, numVariants)); + body.emplace<Matcher>(Matcher(selectors.orphan(), numSelectors, variants.orphan(), numVariants)); } U_ASSERT(builder.bindings != nullptr); bindingsLen = builder.bindings->size(); - bindings.adoptInstead(copyVectorToArray<Binding>(*builder.bindings, errorCode)); - unsupportedStatementsLen = builder.unsupportedStatements->size(); - unsupportedStatements.adoptInstead(copyVectorToArray<UnsupportedStatement>(*builder.unsupportedStatements, errorCode)); + if (bindingsLen > 0) { + bindings.adoptInstead(copyVectorToArray<Binding>(*builder.bindings, errorCode)); + } if (U_FAILURE(errorCode)) { bogus = true; } @@ -1139,9 +910,6 @@ MFDataModel::Builder::~Builder() { if (bindings != nullptr) { delete bindings; } - if (unsupportedStatements != nullptr) { - delete unsupportedStatements; - } } } // namespace message2 diff --git a/deps/icu-small/source/i18n/messageformat2_errors.cpp b/deps/icu-small/source/i18n/messageformat2_errors.cpp index 48fa17a79ad8d0..9d1d6bab81a1f7 100644 --- a/deps/icu-small/source/i18n/messageformat2_errors.cpp +++ b/deps/icu-small/source/i18n/messageformat2_errors.cpp @@ -19,10 +19,6 @@ namespace message2 { // Errors // ----------- - void DynamicErrors::setReservedError(UErrorCode& status) { - addError(DynamicError(DynamicErrorType::ReservedError), status); - } - void DynamicErrors::setFormattingError(const FunctionName& formatterName, UErrorCode& status) { addError(DynamicError(DynamicErrorType::FormattingError, formatterName), status); } @@ -121,37 +117,10 @@ namespace message2 { if (count() == 0) { return; } - if (staticErrors.syntaxAndDataModelErrors->size() > 0) { - switch (staticErrors.first().type) { - case StaticErrorType::DuplicateDeclarationError: { - status = U_MF_DUPLICATE_DECLARATION_ERROR; - break; - } - case StaticErrorType::DuplicateOptionName: { - status = U_MF_DUPLICATE_OPTION_NAME_ERROR; - break; - } - case StaticErrorType::VariantKeyMismatchError: { - status = U_MF_VARIANT_KEY_MISMATCH_ERROR; - break; - } - case StaticErrorType::NonexhaustivePattern: { - status = U_MF_NONEXHAUSTIVE_PATTERN_ERROR; - break; - } - case StaticErrorType::MissingSelectorAnnotation: { - status = U_MF_MISSING_SELECTOR_ANNOTATION_ERROR; - break; - } - case StaticErrorType::SyntaxError: { - status = U_MF_SYNTAX_ERROR; - break; - } - case StaticErrorType::UnsupportedStatementError: { - status = U_MF_UNSUPPORTED_STATEMENT_ERROR; - } - } - } else { + staticErrors.checkErrors(status); + if (U_FAILURE(status)) { + return; + } U_ASSERT(resolutionAndFormattingErrors->size() > 0); switch (first().type) { case DynamicErrorType::UnknownFunction: { @@ -170,16 +139,11 @@ namespace message2 { status = U_MF_OPERAND_MISMATCH_ERROR; break; } - case DynamicErrorType::ReservedError: { - status = U_MF_UNSUPPORTED_EXPRESSION_ERROR; - break; - } case DynamicErrorType::SelectorError: { status = U_MF_SELECTOR_ERROR; break; } } - } } void StaticErrors::addSyntaxError(UErrorCode& status) { @@ -189,10 +153,12 @@ namespace message2 { void StaticErrors::addError(StaticError&& e, UErrorCode& status) { CHECK_ERROR(status); + StaticErrorType type = e.type; + void* errorP = static_cast<void*>(create<StaticError>(std::move(e), status)); U_ASSERT(syntaxAndDataModelErrors.isValid()); - switch (e.type) { + switch (type) { case StaticErrorType::SyntaxError: { syntaxError = true; break; @@ -209,16 +175,16 @@ namespace message2 { dataModelError = true; break; } - case StaticErrorType::NonexhaustivePattern: { + case StaticErrorType::DuplicateVariant: { dataModelError = true; break; } - case StaticErrorType::MissingSelectorAnnotation: { - missingSelectorAnnotationError = true; + case StaticErrorType::NonexhaustivePattern: { dataModelError = true; break; } - case StaticErrorType::UnsupportedStatementError: { + case StaticErrorType::MissingSelectorAnnotation: { + missingSelectorAnnotationError = true; dataModelError = true; break; } @@ -229,10 +195,12 @@ namespace message2 { void DynamicErrors::addError(DynamicError&& e, UErrorCode& status) { CHECK_ERROR(status); + DynamicErrorType type = e.type; + void* errorP = static_cast<void*>(create<DynamicError>(std::move(e), status)); U_ASSERT(resolutionAndFormattingErrors.isValid()); - switch (e.type) { + switch (type) { case DynamicErrorType::UnresolvedVariable: { unresolvedVariableError = true; resolutionAndFormattingErrors->adoptElement(errorP, status); @@ -248,10 +216,6 @@ namespace message2 { resolutionAndFormattingErrors->adoptElement(errorP, status); break; } - case DynamicErrorType::ReservedError: { - resolutionAndFormattingErrors->adoptElement(errorP, status); - break; - } case DynamicErrorType::SelectorError: { selectorError = true; resolutionAndFormattingErrors->adoptElement(errorP, status); @@ -265,6 +229,44 @@ namespace message2 { } } + void StaticErrors::checkErrors(UErrorCode& status) const { + if (U_FAILURE(status)) { + return; + } + if (syntaxAndDataModelErrors->size() > 0) { + switch (first().type) { + case StaticErrorType::DuplicateDeclarationError: { + status = U_MF_DUPLICATE_DECLARATION_ERROR; + break; + } + case StaticErrorType::DuplicateOptionName: { + status = U_MF_DUPLICATE_OPTION_NAME_ERROR; + break; + } + case StaticErrorType::VariantKeyMismatchError: { + status = U_MF_VARIANT_KEY_MISMATCH_ERROR; + break; + } + case StaticErrorType::DuplicateVariant: { + status = U_MF_DUPLICATE_VARIANT_ERROR; + break; + } + case StaticErrorType::NonexhaustivePattern: { + status = U_MF_NONEXHAUSTIVE_PATTERN_ERROR; + break; + } + case StaticErrorType::MissingSelectorAnnotation: { + status = U_MF_MISSING_SELECTOR_ANNOTATION_ERROR; + break; + } + case StaticErrorType::SyntaxError: { + status = U_MF_SYNTAX_ERROR; + break; + } + } + } + } + const StaticError& StaticErrors::first() const { U_ASSERT(syntaxAndDataModelErrors.isValid() && syntaxAndDataModelErrors->size() > 0); return *static_cast<StaticError*>(syntaxAndDataModelErrors->elementAt(0)); diff --git a/deps/icu-small/source/i18n/messageformat2_errors.h b/deps/icu-small/source/i18n/messageformat2_errors.h index ef2ad20faddb74..f84aa736283786 100644 --- a/deps/icu-small/source/i18n/messageformat2_errors.h +++ b/deps/icu-small/source/i18n/messageformat2_errors.h @@ -54,10 +54,10 @@ namespace message2 { enum StaticErrorType { DuplicateDeclarationError, DuplicateOptionName, + DuplicateVariant, MissingSelectorAnnotation, NonexhaustivePattern, SyntaxError, - UnsupportedStatementError, VariantKeyMismatchError }; @@ -65,7 +65,6 @@ namespace message2 { UnresolvedVariable, FormattingError, OperandMismatchError, - ReservedError, SelectorError, UnknownFunction, }; @@ -99,8 +98,9 @@ namespace message2 { bool hasSyntaxError() const { return syntaxError; } bool hasMissingSelectorAnnotationError() const { return missingSelectorAnnotationError; } void addError(StaticError&&, UErrorCode&); - void checkErrors(UErrorCode&); + void checkErrors(UErrorCode&) const; + void clear(); const StaticError& first() const; StaticErrors(const StaticErrors&, UErrorCode&); StaticErrors(StaticErrors&&) noexcept; @@ -121,7 +121,6 @@ namespace message2 { int32_t count() const; void setSelectorError(const FunctionName&, UErrorCode&); - void setReservedError(UErrorCode&); void setUnresolvedVariable(const VariableName&, UErrorCode&); void setUnknownFunction(const FunctionName&, UErrorCode&); void setFormattingError(const FunctionName&, UErrorCode&); diff --git a/deps/icu-small/source/i18n/messageformat2_formatter.cpp b/deps/icu-small/source/i18n/messageformat2_formatter.cpp index 47be3987889d27..8d17ae49b99a9a 100644 --- a/deps/icu-small/source/i18n/messageformat2_formatter.cpp +++ b/deps/icu-small/source/i18n/messageformat2_formatter.cpp @@ -27,12 +27,31 @@ namespace message2 { // ------------------------------------- // Creates a MessageFormat instance based on the pattern. - MessageFormatter::Builder& MessageFormatter::Builder::setPattern(const UnicodeString& pat, UParseError& parseError, UErrorCode& errorCode) { + void MessageFormatter::Builder::clearState() { normalizedInput.remove(); + delete errors; + errors = nullptr; + } + + MessageFormatter::Builder& MessageFormatter::Builder::setPattern(const UnicodeString& pat, + UParseError& parseError, + UErrorCode& errorCode) { + clearState(); + // Create errors + errors = create<StaticErrors>(StaticErrors(errorCode), errorCode); + THIS_ON_ERROR(errorCode); + // Parse the pattern MFDataModel::Builder tree(errorCode); Parser(pat, tree, *errors, normalizedInput).parse(parseError, errorCode); + // Fail on syntax errors + if (errors->hasSyntaxError()) { + errors->checkErrors(errorCode); + // Check that the checkErrors() method set the error code + U_ASSERT(U_FAILURE(errorCode)); + } + // Build the data model based on what was parsed dataModel = tree.build(errorCode); hasDataModel = true; @@ -55,9 +74,7 @@ namespace message2 { } MessageFormatter::Builder& MessageFormatter::Builder::setDataModel(MFDataModel&& newDataModel) { - normalizedInput.remove(); - delete errors; - errors = nullptr; + clearState(); hasPattern = false; hasDataModel = true; dataModel = std::move(newDataModel); @@ -65,6 +82,13 @@ namespace message2 { return *this; } + MessageFormatter::Builder& + MessageFormatter::Builder::setErrorHandlingBehavior( + MessageFormatter::UMFErrorHandlingBehavior type) { + signalErrors = type == U_MF_STRICT; + return *this; + } + /* This build() method is non-destructive, which entails the risk that its borrowed MFFunctionRegistry and (if the setDataModel() method was called) @@ -86,6 +110,7 @@ namespace message2 { MessageFormatter::Builder::~Builder() { if (errors != nullptr) { delete errors; + errors = nullptr; } } @@ -116,6 +141,7 @@ namespace message2 { standardMFFunctionRegistry.checkStandard(); normalizedInput = builder.normalizedInput; + signalErrors = builder.signalErrors; // Build data model // First, check that there is a data model @@ -150,6 +176,7 @@ namespace message2 { void MessageFormatter::cleanup() noexcept { if (errors != nullptr) { delete errors; + errors = nullptr; } } @@ -161,6 +188,7 @@ namespace message2 { customMFFunctionRegistry = other.customMFFunctionRegistry; dataModel = std::move(other.dataModel); normalizedInput = std::move(other.normalizedInput); + signalErrors = other.signalErrors; errors = other.errors; other.errors = nullptr; return *this; diff --git a/deps/icu-small/source/i18n/messageformat2_function_registry.cpp b/deps/icu-small/source/i18n/messageformat2_function_registry.cpp index 18401d4844c7c9..17955760ecfb44 100644 --- a/deps/icu-small/source/i18n/messageformat2_function_registry.cpp +++ b/deps/icu-small/source/i18n/messageformat2_function_registry.cpp @@ -7,10 +7,14 @@ #if !UCONFIG_NO_MF2 +#include <math.h> + #include "unicode/dtptngen.h" #include "unicode/messageformat2_data_model_names.h" #include "unicode/messageformat2_function_registry.h" #include "unicode/smpdtfmt.h" +#include "charstr.h" +#include "double-conversion.h" #include "messageformat2_allocation.h" #include "messageformat2_function_registry_internal.h" #include "messageformat2_macros.h" @@ -18,6 +22,13 @@ #include "number_types.h" #include "uvector.h" // U_ASSERT +// The C99 standard suggested that C++ implementations not define PRId64 etc. constants +// unless this macro is defined. +// See the Notes at https://en.cppreference.com/w/cpp/types/integer . +// Similar to defining __STDC_LIMIT_MACROS in unicode/ptypes.h . +#ifndef __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS +#endif #include <inttypes.h> #include <math.h> @@ -287,7 +298,7 @@ MFFunctionRegistry::~MFFunctionRegistry() { // Style options -- specific to `:number` if (!isInteger) { if (number.usePercent(opts)) { - nf = nf.unit(NoUnit::percent()); + nf = nf.unit(NoUnit::percent()).scale(Scale::powerOfTen(2)); } } @@ -296,18 +307,36 @@ MFFunctionRegistry::~MFFunctionRegistry() { int32_t minFractionDigits = number.minimumFractionDigits(opts); int32_t maxFractionDigits = number.maximumFractionDigits(opts); int32_t minSignificantDigits = number.minimumSignificantDigits(opts); - Precision p = Precision::minMaxFraction(minFractionDigits, maxFractionDigits); - if (minSignificantDigits > 0) { + Precision p = Precision::unlimited(); + bool precisionOptions = false; + + // Returning -1 means the option wasn't provided + if (maxFractionDigits != -1 && minFractionDigits != -1) { + precisionOptions = true; + p = Precision::minMaxFraction(minFractionDigits, maxFractionDigits); + } else if (minFractionDigits != -1) { + precisionOptions = true; + p = Precision::minFraction(minFractionDigits); + } else if (maxFractionDigits != -1) { + precisionOptions = true; + p = Precision::maxFraction(maxFractionDigits); + } + + if (minSignificantDigits != -1) { + precisionOptions = true; p = p.minSignificantDigits(minSignificantDigits); } - if (maxSignificantDigits > 0) { + if (maxSignificantDigits != -1) { + precisionOptions = true; p = p.maxSignificantDigits(maxSignificantDigits); } - nf = nf.precision(p); + if (precisionOptions) { + nf = nf.precision(p); + } } else { // maxSignificantDigits applies to `:integer`, but the other precision options don't Precision p = Precision::integer(); - if (maxSignificantDigits > 0) { + if (maxSignificantDigits != -1) { p = p.maxSignificantDigits(maxSignificantDigits); } nf = nf.precision(p); @@ -347,8 +376,26 @@ MFFunctionRegistry::~MFFunctionRegistry() { grp = UNumberGroupingStrategy::UNUM_GROUPING_AUTO; } nf = nf.grouping(grp); + + // numberingSystem + UnicodeString ns = opts.getStringFunctionOption(UnicodeString("numberingSystem")); + if (ns.length() > 0) { + ns = ns.toLower(Locale("en-US")); + CharString buffer; + // Ignore bad option values, so use a local status + UErrorCode localStatus = U_ZERO_ERROR; + // Copied from number_skeletons.cpp (helpers::parseNumberingSystemOption) + buffer.appendInvariantChars({false, ns.getBuffer(), ns.length()}, localStatus); + if (U_SUCCESS(localStatus)) { + LocalPointer<NumberingSystem> symbols + (NumberingSystem::createInstanceByName(buffer.data(), localStatus)); + if (U_SUCCESS(localStatus)) { + nf = nf.adoptSymbols(symbols.orphan()); + } + } + } } - return LocalizedNumberFormatter(nf.locale(number.locale)); + return nf.locale(number.locale); } Formatter* StandardFunctions::NumberFactory::createFormatter(const Locale& locale, UErrorCode& errorCode) { @@ -377,12 +424,11 @@ static FormattedPlaceholder notANumber(const FormattedPlaceholder& input) { return FormattedPlaceholder(input, FormattedValue(UnicodeString("NaN"))); } -static FormattedPlaceholder stringAsNumber(const number::LocalizedNumberFormatter& nf, const FormattedPlaceholder& input, UErrorCode& errorCode) { +static double parseNumberLiteral(const FormattedPlaceholder& input, UErrorCode& errorCode) { if (U_FAILURE(errorCode)) { return {}; } - double numberValue; // Copying string to avoid GCC dangling-reference warning // (although the reference is safe) UnicodeString inputStr = input.asFormattable().getString(errorCode); @@ -390,12 +436,39 @@ static FormattedPlaceholder stringAsNumber(const number::LocalizedNumberFormatte if (U_FAILURE(errorCode)) { return {}; } - UErrorCode localErrorCode = U_ZERO_ERROR; - strToDouble(inputStr, numberValue, localErrorCode); - if (U_FAILURE(localErrorCode)) { + + // Hack: Check for cases that are forbidden by the MF2 grammar + // but allowed by StringToDouble + int32_t len = inputStr.length(); + + if (len > 0 && ((inputStr[0] == '+') + || (inputStr[0] == '0' && len > 1 && inputStr[1] != '.') + || (inputStr[len - 1] == '.') + || (inputStr[0] == '.'))) { + errorCode = U_MF_OPERAND_MISMATCH_ERROR; + return 0; + } + + // Otherwise, convert to double using double_conversion::StringToDoubleConverter + using namespace double_conversion; + int processedCharactersCount = 0; + StringToDoubleConverter converter(0, 0, 0, "", ""); + double result = + converter.StringToDouble(reinterpret_cast<const uint16_t*>(inputStr.getBuffer()), + len, + &processedCharactersCount); + if (processedCharactersCount != len) { errorCode = U_MF_OPERAND_MISMATCH_ERROR; + } + return result; +} + +static FormattedPlaceholder tryParsingNumberLiteral(const number::LocalizedNumberFormatter& nf, const FormattedPlaceholder& input, UErrorCode& errorCode) { + double numberValue = parseNumberLiteral(input, errorCode); + if (U_FAILURE(errorCode)) { return notANumber(input); } + UErrorCode savedStatus = errorCode; number::FormattedNumber result = nf.formatDouble(numberValue, errorCode); // Ignore U_USING_DEFAULT_WARNING @@ -419,7 +492,10 @@ int32_t StandardFunctions::Number::maximumFractionDigits(const FunctionOptions& return static_cast<int32_t>(val); } } - return number::impl::kMaxIntFracSig; + // Returning -1 indicates that the option wasn't provided or was a non-integer. + // The caller needs to check for that case, since passing -1 to Precision::maxFraction() + // is an error. + return -1; } int32_t StandardFunctions::Number::minimumFractionDigits(const FunctionOptions& opts) const { @@ -434,7 +510,10 @@ int32_t StandardFunctions::Number::minimumFractionDigits(const FunctionOptions& } } } - return 0; + // Returning -1 indicates that the option wasn't provided or was a non-integer. + // The caller needs to check for that case, since passing -1 to Precision::minFraction() + // is an error. + return -1; } int32_t StandardFunctions::Number::minimumIntegerDigits(const FunctionOptions& opts) const { @@ -462,10 +541,10 @@ int32_t StandardFunctions::Number::minimumSignificantDigits(const FunctionOption } } } - // Returning 0 indicates that the option wasn't provided or was a non-integer. - // The caller needs to check for that case, since passing 0 to Precision::minSignificantDigits() + // Returning -1 indicates that the option wasn't provided or was a non-integer. + // The caller needs to check for that case, since passing -1 to Precision::minSignificantDigits() // is an error. - return 0; + return -1; } int32_t StandardFunctions::Number::maximumSignificantDigits(const FunctionOptions& opts) const { @@ -478,10 +557,10 @@ int32_t StandardFunctions::Number::maximumSignificantDigits(const FunctionOption return static_cast<int32_t>(val); } } - // Returning 0 indicates that the option wasn't provided or was a non-integer. - // The caller needs to check for that case, since passing 0 to Precision::maxSignificantDigits() + // Returning -1 indicates that the option wasn't provided or was a non-integer. + // The caller needs to check for that case, since passing -1 to Precision::maxSignificantDigits() // is an error. - return 0; // Not a valid value for Precision; has to be checked + return -1; // Not a valid value for Precision; has to be checked } bool StandardFunctions::Number::usePercent(const FunctionOptions& opts) const { @@ -540,7 +619,7 @@ FormattedPlaceholder StandardFunctions::Number::format(FormattedPlaceholder&& ar } case UFMT_STRING: { // Try to parse the string as a number - return stringAsNumber(realFormatter, arg, errorCode); + return tryParsingNumberLiteral(realFormatter, arg, errorCode); } default: { // Other types can't be parsed as a number @@ -582,67 +661,17 @@ Selector* StandardFunctions::PluralFactory::createSelector(const Locale& locale, Selector* result; if (isInteger) { - result = new Plural(Plural::integer(locale)); + result = new Plural(Plural::integer(locale, errorCode)); } else { - result = new Plural(locale); + result = new Plural(locale, errorCode); } + NULL_ON_ERROR(errorCode); if (result == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; - return nullptr; } return result; } -static double tryAsString(const UnicodeString& s, UErrorCode& errorCode) { - if (U_FAILURE(errorCode)) { - return 0; - } - // Try parsing the inputString as a double - double valToCheck; - strToDouble(s, valToCheck, errorCode); - return valToCheck; -} - -static double tryWithFormattable(const Formattable& value, UErrorCode& errorCode) { - if (U_FAILURE(errorCode)) { - return 0; - } - double valToCheck; - switch (value.getType()) { - case UFMT_DOUBLE: { - valToCheck = value.getDouble(errorCode); - break; - } - case UFMT_LONG: { - valToCheck = (double) value.getLong(errorCode); - break; - } - case UFMT_INT64: { - valToCheck = (double) value.getInt64(errorCode); - break; - } - case UFMT_STRING: { - const UnicodeString& s = value.getString(errorCode); - U_ASSERT(U_SUCCESS(errorCode)); - return tryAsString(s, errorCode); - } - default: { - errorCode = U_ILLEGAL_ARGUMENT_ERROR; - return 0; - } - } - U_ASSERT(U_SUCCESS(errorCode)); - return valToCheck; -} - -static UnicodeString toJSONString(double d) { - // TODO :( - char buffer[512]; - // "Only integer matching is required in the Technical Preview." - snprintf(buffer, 512, "%" PRId64, static_cast<int64_t>(d)); - return UnicodeString(buffer); -} - void StandardFunctions::Plural::selectKey(FormattedPlaceholder&& toFormat, FunctionOptions&& opts, const UnicodeString* keys, @@ -658,42 +687,57 @@ void StandardFunctions::Plural::selectKey(FormattedPlaceholder&& toFormat, return; } - // Only doubles and integers can match - double valToCheck; + // Handle any formatting options + PluralType type = pluralType(opts); + FormattedPlaceholder resolvedSelector = numberFormatter->format(std::move(toFormat), + std::move(opts), + errorCode); + CHECK_ERROR(errorCode); - bool isFormattedString = toFormat.isEvaluated() && toFormat.output().isString(); - bool isFormattedNumber = toFormat.isEvaluated() && toFormat.output().isNumber(); + U_ASSERT(resolvedSelector.isEvaluated() && resolvedSelector.output().isNumber()); - if (isFormattedString) { - // Formatted string: try parsing it as a number - valToCheck = tryAsString(toFormat.output().getString(), errorCode); - } else { - // Already checked that contents can be formatted - valToCheck = tryWithFormattable(toFormat.asFormattable(), errorCode); - } + // See https://github.com/unicode-org/message-format-wg/blob/main/spec/registry.md#number-selection + // 1. Let exact be the JSON string representation of the numeric value of resolvedSelector + const number::FormattedNumber& formattedNumber = resolvedSelector.output().getNumber(); + UnicodeString exact = formattedNumber.toString(errorCode); if (U_FAILURE(errorCode)) { // Non-number => selector error errorCode = U_MF_SELECTOR_ERROR; return; } - // TODO: This needs to be checked against https://github.com/unicode-org/message-format-wg/blob/main/spec/registry.md#number-selection - // Determine `exact`, per step 1 under "Number Selection" - UnicodeString exact = toJSONString(valToCheck); - // Generate the matches - // ----------------------- + // Step 2. Let keyword be a string which is the result of rule selection on resolvedSelector. + // If the option select is set to exact, rule-based selection is not used. Return the empty string. + UnicodeString keyword; + if (type != PluralType::PLURAL_EXACT) { + UPluralType t = type == PluralType::PLURAL_ORDINAL ? UPLURAL_TYPE_ORDINAL : UPLURAL_TYPE_CARDINAL; + // Look up plural rules by locale and type + LocalPointer<PluralRules> rules(PluralRules::forLocale(locale, t, errorCode)); + CHECK_ERROR(errorCode); + + keyword = rules->select(formattedNumber, errorCode); + } + + // Steps 3-4 elided: + // 3. Let resultExact be a new empty list of strings. + // 4. Let resultKeyword be a new empty list of strings. + // Instead, we use `prefs` the concatenation of `resultExact` + // and `resultKeyword`. prefsLen = 0; - // First, check for an exact match + // 5. For each string key in keys: double keyAsDouble = 0; for (int32_t i = 0; i < keysLen; i++) { // Try parsing the key as a double UErrorCode localErrorCode = U_ZERO_ERROR; strToDouble(keys[i], keyAsDouble, localErrorCode); + // 5i. If the value of key matches the production number-literal, then if (U_SUCCESS(localErrorCode)) { + // 5i(a). If key and exact consist of the same sequence of Unicode code points, then if (exact == keys[i]) { + // 5i(a)(a) Append key as the last element of the list resultExact. prefs[prefsLen] = keys[i]; prefsLen++; break; @@ -701,43 +745,57 @@ void StandardFunctions::Plural::selectKey(FormattedPlaceholder&& toFormat, } } - PluralType type = pluralType(opts); // Return immediately if exact matching was requested if (prefsLen == keysLen || type == PluralType::PLURAL_EXACT) { return; } - UPluralType t = type == PluralType::PLURAL_ORDINAL ? UPLURAL_TYPE_ORDINAL : UPLURAL_TYPE_CARDINAL; - // Look up plural rules by locale and type - LocalPointer<PluralRules> rules(PluralRules::forLocale(locale, t, errorCode)); - CHECK_ERROR(errorCode); - - - // Check for a match based on the plural category - UnicodeString match; - if (isFormattedNumber) { - match = rules->select(toFormat.output().getNumber(), errorCode); - } else { - if (isInteger) { - match = rules->select(static_cast<int32_t>(trunc(valToCheck))); - } else { - match = rules->select(valToCheck); - } - } - CHECK_ERROR(errorCode); for (int32_t i = 0; i < keysLen; i ++) { if (prefsLen >= keysLen) { break; } - if (match == keys[i]) { + // 5ii. Else if key is one of the keywords zero, one, two, few, many, or other, then + // 5ii(a). If key and keyword consist of the same sequence of Unicode code points, then + if (keyword == keys[i]) { + // 5ii(a)(a) Append key as the last element of the list resultKeyword. prefs[prefsLen] = keys[i]; prefsLen++; } } + + // Note: Step 5(iii) "Else, emit a Selection Error" is omitted in both loops + + // 6. Return a new list whose elements are the concatenation of the elements + // (in order) of resultExact followed by the elements (in order) of resultKeyword. + // (Implicit, since `prefs` is an out-parameter) +} + +StandardFunctions::Plural::Plural(const Locale& loc, UErrorCode& status) : locale(loc) { + CHECK_ERROR(status); + + numberFormatter.adoptInstead(new StandardFunctions::Number(loc)); + if (!numberFormatter.isValid()) { + status = U_MEMORY_ALLOCATION_ERROR; + } +} + +StandardFunctions::Plural::Plural(const Locale& loc, bool isInt, UErrorCode& status) : locale(loc), isInteger(isInt) { + CHECK_ERROR(status); + + if (isInteger) { + numberFormatter.adoptInstead(new StandardFunctions::Number(loc, true)); + } else { + numberFormatter.adoptInstead(new StandardFunctions::Number(loc)); + } + + if (!numberFormatter.isValid()) { + status = U_MEMORY_ALLOCATION_ERROR; + } } StandardFunctions::Plural::~Plural() {} + StandardFunctions::PluralFactory::~PluralFactory() {} // --------- DateTimeFactory diff --git a/deps/icu-small/source/i18n/messageformat2_function_registry_internal.h b/deps/icu-small/source/i18n/messageformat2_function_registry_internal.h index b34cb9b014211b..733fc5e945d5c8 100644 --- a/deps/icu-small/source/i18n/messageformat2_function_registry_internal.h +++ b/deps/icu-small/source/i18n/messageformat2_function_registry_internal.h @@ -175,12 +175,13 @@ namespace message2 { PLURAL_CARDINAL, PLURAL_EXACT } PluralType; - Plural(const Locale& loc) : locale(loc) {} - Plural(const Locale& loc, bool isInt) : locale(loc), isInteger(isInt) {} - static Plural integer(const Locale& loc) { return Plural(loc, true); } + Plural(const Locale& loc, UErrorCode& errorCode); + Plural(const Locale& loc, bool isInt, UErrorCode& errorCode); + static Plural integer(const Locale& loc, UErrorCode& errorCode) { return Plural(loc, true, errorCode); } PluralType pluralType(const FunctionOptions& opts) const; const Locale& locale; const bool isInteger = false; + LocalPointer<StandardFunctions::Number> numberFormatter; }; class TextFactory : public SelectorFactory { diff --git a/deps/icu-small/source/i18n/messageformat2_macros.h b/deps/icu-small/source/i18n/messageformat2_macros.h index ee8cf0779e6ba2..f06ed1a5a97746 100644 --- a/deps/icu-small/source/i18n/messageformat2_macros.h +++ b/deps/icu-small/source/i18n/messageformat2_macros.h @@ -60,19 +60,11 @@ using namespace pluralimpl; // Fallback #define REPLACEMENT ((UChar32) 0xFFFD) -// MessageFormat2 uses four keywords: `.input`, `.local`, `.when`, and `.match`. +// MessageFormat2 uses three keywords: `.input`, `.local`, and `.match`. -static constexpr UChar32 ID_INPUT[] = { - 0x2E, 0x69, 0x6E, 0x70, 0x75, 0x74, 0 /* ".input" */ -}; - -static constexpr UChar32 ID_LOCAL[] = { - 0x2E, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0 /* ".local" */ -}; - -static constexpr UChar32 ID_MATCH[] = { - 0x2E, 0x6D, 0x61, 0x74, 0x63, 0x68, 0 /* ".match" */ -}; +static constexpr std::u16string_view ID_INPUT = u".input"; +static constexpr std::u16string_view ID_LOCAL = u".local"; +static constexpr std::u16string_view ID_MATCH = u".match"; // Returns immediately if `errorCode` indicates failure #define CHECK_ERROR(errorCode) \ diff --git a/deps/icu-small/source/i18n/messageformat2_parser.cpp b/deps/icu-small/source/i18n/messageformat2_parser.cpp index 15b185762dcac8..b4768756c5ead2 100644 --- a/deps/icu-small/source/i18n/messageformat2_parser.cpp +++ b/deps/icu-small/source/i18n/messageformat2_parser.cpp @@ -24,21 +24,22 @@ using namespace data_model; The `ERROR()` macro sets a syntax error in the context and sets the offset in `parseError` to `index`. It does not alter control flow. */ -#define ERROR(parseError, errorCode, index) \ +#define ERROR(errorCode) \ if (!errors.hasSyntaxError()) { \ setParseError(parseError, index); \ errors.addSyntaxError(errorCode); \ } -// Returns true iff `index` is a valid index for the string `source` -static bool inBounds(const UnicodeString &source, uint32_t index) { - return (((int32_t)index) < source.length()); -} +#define ERROR_AT(errorCode, i) \ + if (!errors.hasSyntaxError()) { \ + setParseError(parseError, i); \ + errors.addSyntaxError(errorCode); \ + } // Increments the line number and updates the "characters seen before -// current line" count in `parseError`, iff `source[index]` is a newline +// current line" count in `parseError`, iff `peek()` is a newline void Parser::maybeAdvanceLine() { - if (source[index] == LF) { + if (peek() == LF) { parseError.line++; // add 1 to index to get the number of characters seen so far // (including the newline) @@ -50,10 +51,15 @@ void Parser::maybeAdvanceLine() { Signals an error and returns either if `parseError` already denotes an error, or `index` is out of bounds for the string `source` */ -#define CHECK_BOUNDS(source, index, parseError, errorCode) \ - if (!inBounds(source, index)) { \ - ERROR(parseError, errorCode, index); \ - return; \ +#define CHECK_BOUNDS(errorCode) \ + if (!inBounds()) { \ + ERROR(errorCode); \ + return; \ + } +#define CHECK_BOUNDS_1(errorCode) \ + if (!inBounds(1)) { \ + ERROR_AT(errorCode, index + 1); \ + return; \ } // ------------------------------------- @@ -98,8 +104,6 @@ static bool inRange(UChar32 c, UChar32 first, UChar32 last) { `isContentChar()` : `content-char` `isTextChar()` : `text-char` - `isReservedStart()` : `reserved-start` - `isReservedChar()` : `reserved-char` `isAlpha()` : `ALPHA` `isDigit()` : `DIGIT` `isNameStart()` : `name-start` @@ -143,35 +147,6 @@ static bool isTextChar(UChar32 c) { || c == PIPE; } -// Note: this doesn't distinguish between private-use -// and reserved, since the data model doesn't -static bool isReservedStart(UChar32 c) { - switch (c) { - case BANG: - case PERCENT: - case ASTERISK: - case PLUS: - case LESS_THAN: - case GREATER_THAN: - case QUESTION: - case TILDE: - // Private-use - case CARET: - case AMPERSAND: - return true; - default: - return false; - } -} - -static bool isReservedChar(UChar32 c) { - return isContentChar(c) || c == PERIOD; -} - -static bool isReservedBodyStart(UChar32 c) { - return isReservedChar(c) || c == BACKSLASH || c == PIPE; -} - static bool isAlpha(UChar32 c) { return inRange(c, 0x0041, 0x005A) || inRange(c, 0x0061, 0x007A); } static bool isDigit(UChar32 c) { return inRange(c, 0x0030, 0x0039); } @@ -203,6 +178,13 @@ static bool isQuotedChar(UChar32 c) { || c == RIGHT_CURLY_BRACE; } +static bool isEscapableChar(UChar32 c) { + return c == PIPE + || c == BACKSLASH + || c == LEFT_CURLY_BRACE + || c == RIGHT_CURLY_BRACE; +} + // Returns true iff `c` can begin a `function` nonterminal static bool isFunctionStart(UChar32 c) { switch (c) { @@ -217,24 +199,7 @@ static bool isFunctionStart(UChar32 c) { // Returns true iff `c` can begin an `annotation` nonterminal static bool isAnnotationStart(UChar32 c) { - return isFunctionStart(c) || isReservedStart(c); -} - -// Returns true iff `c` can begin either a `reserved-char` or `reserved-escape` -// literal -static bool reservedChunkFollows(UChar32 c) { - switch(c) { - // reserved-escape - case BACKSLASH: - // literal - case PIPE: { - return true; - } - default: { - // reserved-char - return (isReservedChar(c)); - } - } + return isFunctionStart(c); } // Returns true iff `c` can begin a `literal` nonterminal @@ -247,15 +212,13 @@ static bool isKeyStart(UChar32 c) { return (c == ASTERISK || isLiteralStart(c)); } -inline bool isDeclarationStart(const UnicodeString& source, int32_t index) { - int32_t len = source.length(); - int32_t next = index + 1; - return (source[index] == ID_LOCAL[0] - && next < len - && source[next] == ID_LOCAL[1]) - || (source[index] == ID_INPUT[0] - && next < len - && source[next] == ID_INPUT[1]); +bool Parser::isDeclarationStart() { + return (peek() == ID_LOCAL[0] + && inBounds(1) + && peek(1) == ID_LOCAL[1]) + || (peek() == ID_INPUT[0] + && inBounds(1) + && peek(1) == ID_INPUT[1]); } // ------------------------------------- @@ -375,14 +338,14 @@ option, or the optional space before an attribute. Unless otherwise noted in a comment, all helper functions that take a `source` string, an `index` unsigned int, and an `errorCode` `UErrorCode` have the precondition: - `index` < `source.length()` + `index` < `len()` and the postcondition: - `U_FAILURE(errorCode)` || `index < `source.length()` + `U_FAILURE(errorCode)` || `index < `len()` */ /* No pre, no post. - A message may end with whitespace, so `index` may equal `source.length()` on exit. + A message may end with whitespace, so `index` may equal `len()` on exit. */ void Parser::parseWhitespaceMaybeRequired(bool required, UErrorCode& errorCode) { bool sawWhitespace = false; @@ -391,7 +354,7 @@ void Parser::parseWhitespaceMaybeRequired(bool required, UErrorCode& errorCode) // or when we see a non-whitespace character. while (true) { // Check if all input has been consumed - if (!inBounds(source, index)) { + if (!inBounds()) { // If whitespace isn't required -- or if we saw it already -- // then the caller is responsible for checking this case and // setting an error if necessary. @@ -401,24 +364,24 @@ void Parser::parseWhitespaceMaybeRequired(bool required, UErrorCode& errorCode) } // Otherwise, whitespace is required; the end of the input has // been reached without whitespace. This is an error. - ERROR(parseError, errorCode, index); + ERROR(errorCode); return; } // Input remains; process the next character if it's whitespace, // exit the loop otherwise - if (isWhitespace(source[index])) { + if (isWhitespace(peek())) { sawWhitespace = true; // Increment line number in parse error if we consume a newline maybeAdvanceLine(); - index++; + next(); } else { break; } } if (!sawWhitespace && required) { - ERROR(parseError, errorCode, index); + ERROR(errorCode); } } @@ -437,37 +400,36 @@ void Parser::parseOptionalWhitespace(UErrorCode& errorCode) { parseWhitespaceMaybeRequired(false, errorCode); } -// Consumes a single character, signaling an error if `source[index]` != `c` +// Consumes a single character, signaling an error if `peek()` != `c` // No postcondition -- a message can end with a '}' token void Parser::parseToken(UChar32 c, UErrorCode& errorCode) { - CHECK_BOUNDS(source, index, parseError, errorCode); + CHECK_BOUNDS(errorCode); - if (source[index] == c) { - index++; + if (peek() == c) { + next(); normalizedInput += c; return; } // Next character didn't match -- error out - ERROR(parseError, errorCode, index); + ERROR(errorCode); } /* Consumes a fixed-length token, signaling an error if the token isn't a prefix of - the string beginning at `source[index]` + the string beginning at `peek()` No postcondition -- a message can end with a '}' token */ -template <int32_t N> -void Parser::parseToken(const UChar32 (&token)[N], UErrorCode& errorCode) { - U_ASSERT(inBounds(source, index)); +void Parser::parseToken(const std::u16string_view& token, UErrorCode& errorCode) { + U_ASSERT(inBounds()); int32_t tokenPos = 0; - while (tokenPos < N - 1) { - if (source[index] != token[tokenPos]) { - ERROR(parseError, errorCode, index); + while (tokenPos < static_cast<int32_t>(token.length())) { + if (peek() != token[tokenPos]) { + ERROR(errorCode); return; } normalizedInput += token[tokenPos]; - index++; + next(); tokenPos++; } } @@ -478,16 +440,15 @@ void Parser::parseToken(const UChar32 (&token)[N], UErrorCode& errorCode) { the string beginning at `source[index']`), then consumes optional whitespace again */ -template <int32_t N> -void Parser::parseTokenWithWhitespace(const UChar32 (&token)[N], UErrorCode& errorCode) { +void Parser::parseTokenWithWhitespace(const std::u16string_view& token, UErrorCode& errorCode) { // No need for error check or bounds check before parseOptionalWhitespace parseOptionalWhitespace(errorCode); // Establish precondition - CHECK_BOUNDS(source, index, parseError, errorCode); - parseToken(token); + CHECK_BOUNDS(errorCode); + parseToken(token, errorCode); parseOptionalWhitespace(errorCode); // Guarantee postcondition - CHECK_BOUNDS(source, index, parseError, errorCode); + CHECK_BOUNDS(errorCode); } /* @@ -500,11 +461,11 @@ void Parser::parseTokenWithWhitespace(UChar32 c, UErrorCode& errorCode) { // No need for error check or bounds check before parseOptionalWhitespace(errorCode) parseOptionalWhitespace(errorCode); // Establish precondition - CHECK_BOUNDS(source, index, parseError, errorCode); + CHECK_BOUNDS(errorCode); parseToken(c, errorCode); parseOptionalWhitespace(errorCode); // Guarantee postcondition - CHECK_BOUNDS(source, index, parseError, errorCode); + CHECK_BOUNDS(errorCode); } /* @@ -519,19 +480,20 @@ void Parser::parseTokenWithWhitespace(UChar32 c, UErrorCode& errorCode) { UnicodeString Parser::parseName(UErrorCode& errorCode) { UnicodeString name; - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); - if (!isNameStart(source[index])) { - ERROR(parseError, errorCode, index); + if (!isNameStart(peek())) { + ERROR(errorCode); return name; } - while (isNameChar(source[index])) { - name += source[index]; - normalizedInput += source[index]; - index++; - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + while (isNameChar(peek())) { + UChar32 c = peek(); + name += c; + normalizedInput += c; + next(); + if (!inBounds()) { + ERROR(errorCode); break; } } @@ -547,13 +509,13 @@ UnicodeString Parser::parseName(UErrorCode& errorCode) { VariableName Parser::parseVariableName(UErrorCode& errorCode) { VariableName result; - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); // If the '$' is missing, we don't want a binding // for this variable to be created. - bool valid = source[index] == DOLLAR; + bool valid = peek() == DOLLAR; parseToken(DOLLAR, errorCode); - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); return result; } UnicodeString varName = parseName(errorCode); @@ -569,7 +531,7 @@ VariableName Parser::parseVariableName(UErrorCode& errorCode) { Corresponds to the `identifier` nonterminal in the grammar */ UnicodeString Parser::parseIdentifier(UErrorCode& errorCode) { - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); UnicodeString result; // The following is a hack to get around ambiguity in the grammar: @@ -584,7 +546,7 @@ UnicodeString Parser::parseIdentifier(UErrorCode& errorCode) { // Parse namespace result += parseName(errorCode); int32_t firstColon = -1; - while (inBounds(source, index) && source[index] == COLON) { + while (inBounds() && peek() == COLON) { // Parse ':' separator if (firstColon == -1) { firstColon = index; @@ -592,8 +554,8 @@ UnicodeString Parser::parseIdentifier(UErrorCode& errorCode) { parseToken(COLON, errorCode); result += COLON; // Check for message ending with something like "foo:" - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); } else { // Parse name part result += parseName(errorCode); @@ -605,7 +567,7 @@ UnicodeString Parser::parseIdentifier(UErrorCode& errorCode) { if (firstColon != -1) { for (int32_t i = firstColon + 1; i < result.length(); i++) { if (result[i] == COLON) { - ERROR(parseError, errorCode, i); + ERROR_AT(errorCode, i); return {}; } } @@ -621,16 +583,16 @@ UnicodeString Parser::parseIdentifier(UErrorCode& errorCode) { Returns the function name. */ FunctionName Parser::parseFunction(UErrorCode& errorCode) { - U_ASSERT(inBounds(source, index)); - if (!isFunctionStart(source[index])) { - ERROR(parseError, errorCode, index); + U_ASSERT(inBounds()); + if (!isFunctionStart(peek())) { + ERROR(errorCode); return FunctionName(); } - normalizedInput += source[index]; - index++; // Consume the function start character - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + normalizedInput += peek(); + next(); // Consume the function start character + if (!inBounds()) { + ERROR(errorCode); return FunctionName(); } return parseIdentifier(errorCode); @@ -638,83 +600,43 @@ FunctionName Parser::parseFunction(UErrorCode& errorCode) { /* - Precondition: source[index] == BACKSLASH + Precondition: peek() == BACKSLASH Consume an escaped character. + Corresponds to `escaped-char` in the grammar. - Generalized to handle `reserved-escape`, `text-escape`, - or `literal-escape`, depending on the `kind` argument. - - Appends result to `str` + No postcondition (a message can end with an escaped char) */ -void Parser::parseEscapeSequence(EscapeKind kind, - UnicodeString &str, - UErrorCode& errorCode) { - U_ASSERT(inBounds(source, index)); - U_ASSERT(source[index] == BACKSLASH); +UnicodeString Parser::parseEscapeSequence(UErrorCode& errorCode) { + U_ASSERT(inBounds()); + U_ASSERT(peek() == BACKSLASH); normalizedInput += BACKSLASH; - index++; // Skip the initial backslash - CHECK_BOUNDS(source, index, parseError, errorCode); - - #define SUCCEED \ - /* Append to the output string */ \ - str += source[index]; \ - /* Update normalizedInput */ \ - normalizedInput += source[index]; \ - /* Consume the character */ \ - index++; \ - /* Guarantee postcondition */ \ - CHECK_BOUNDS(source, index, parseError, errorCode); \ - return; - - // Expect a '{', '|' or '}' - switch (source[index]) { - case LEFT_CURLY_BRACE: - case RIGHT_CURLY_BRACE: { - // Allowed in a `text-escape` or `reserved-escape` - switch (kind) { - case TEXT: - case RESERVED: { - SUCCEED; + next(); // Skip the initial backslash + UnicodeString str; + if (inBounds()) { + // Expect a '{', '|' or '}' + switch (peek()) { + case LEFT_CURLY_BRACE: + case RIGHT_CURLY_BRACE: + case PIPE: + case BACKSLASH: { + /* Append to the output string */ + str += peek(); + /* Update normalizedInput */ + normalizedInput += peek(); + /* Consume the character */ + next(); + return str; } default: { + // No other characters are allowed here break; } } - break; - } - case PIPE: { - // Allowed in a `literal-escape` or `reserved-escape` - switch (kind) { - case LITERAL: - case RESERVED: { - SUCCEED; - } - default: { - break; - } - } - break; } - case BACKSLASH: { - // Allowed in any escape sequence - SUCCEED; - } - default: { - // No other characters are allowed here - break; - } - } // If control reaches here, there was an error - ERROR(parseError, errorCode, index); -} - -/* - Consume an escaped pipe or backslash, matching the `literal-escape` - nonterminal in the grammar -*/ -void Parser::parseLiteralEscape(UnicodeString &str, UErrorCode& errorCode) { - parseEscapeSequence(LITERAL, str, errorCode); + ERROR(errorCode); + return str; } @@ -728,26 +650,34 @@ Literal Parser::parseQuotedLiteral(UErrorCode& errorCode) { if (U_SUCCESS(errorCode)) { // Parse the opening '|' parseToken(PIPE, errorCode); - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); error = true; } else { // Parse the contents bool done = false; while (!done) { - if (source[index] == BACKSLASH) { - parseLiteralEscape(contents, errorCode); - } else if (isQuotedChar(source[index])) { - contents += source[index]; - normalizedInput += source[index]; - index++; // Consume this character + if (peek() == BACKSLASH) { + contents += parseEscapeSequence(errorCode); + } else if (isQuotedChar(peek())) { + contents += peek(); + // Handle cases like: + // |}{| -- we want to escape everywhere that + // can be escaped, to make round-trip checking + // easier -- so this case normalizes to + // |\}\{| + if (isEscapableChar(peek())) { + normalizedInput += BACKSLASH; + } + normalizedInput += peek(); + next(); // Consume this character maybeAdvanceLine(); } else { // Assume the sequence of literal characters ends here done = true; } - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); error = true; break; } @@ -771,18 +701,18 @@ UnicodeString Parser::parseDigits(UErrorCode& errorCode) { return {}; } - U_ASSERT(isDigit(source[index])); + U_ASSERT(isDigit(peek())); UnicodeString contents; do { - contents += source[index]; - normalizedInput += source[index]; - index++; - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + contents += peek(); + normalizedInput += peek(); + next(); + if (!inBounds()) { + ERROR(errorCode); return {}; } - } while (isDigit(source[index])); + } while (isDigit(peek())); return contents; } @@ -795,7 +725,7 @@ Literal Parser::parseUnquotedLiteral(UErrorCode& errorCode) { } // unquoted -> name - if (isNameStart(source[index])) { + if (isNameStart(peek())) { return Literal(false, parseName(errorCode)); } @@ -804,75 +734,75 @@ Literal Parser::parseUnquotedLiteral(UErrorCode& errorCode) { UnicodeString contents; // Parse the sign - if (source[index] == HYPHEN) { - contents += source[index]; - normalizedInput += source[index]; - index++; + if (peek() == HYPHEN) { + contents += peek(); + normalizedInput += peek(); + next(); } - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); return {}; } // Parse the integer part - if (source[index] == ((UChar32)0x0030) /* 0 */) { - contents += source[index]; - normalizedInput += source[index]; - index++; - } else if (isDigit(source[index])) { + if (peek() == ((UChar32)0x0030) /* 0 */) { + contents += peek(); + normalizedInput += peek(); + next(); + } else if (isDigit(peek())) { contents += parseDigits(errorCode); } else { // Error -- nothing else can start a number literal - ERROR(parseError, errorCode, index); + ERROR(errorCode); return {}; } // Parse the decimal point if present - if (source[index] == PERIOD) { - contents += source[index]; - normalizedInput += source[index]; - index++; - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (peek() == PERIOD) { + contents += peek(); + normalizedInput += peek(); + next(); + if (!inBounds()) { + ERROR(errorCode); return {}; } // Parse the fraction part - if (isDigit(source[index])) { + if (isDigit(peek())) { contents += parseDigits(errorCode); } else { // '.' not followed by digit is a parse error - ERROR(parseError, errorCode, index); + ERROR(errorCode); return {}; } } - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); return {}; } // Parse the exponent part if present - if (source[index] == UPPERCASE_E || source[index] == LOWERCASE_E) { - contents += source[index]; - normalizedInput += source[index]; - index++; - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (peek() == UPPERCASE_E || peek() == LOWERCASE_E) { + contents += peek(); + normalizedInput += peek(); + next(); + if (!inBounds()) { + ERROR(errorCode); return {}; } // Parse sign if present - if (source[index] == PLUS || source[index] == HYPHEN) { - contents += source[index]; - normalizedInput += source[index]; - index++; - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (peek() == PLUS || peek() == HYPHEN) { + contents += peek(); + normalizedInput += peek(); + next(); + if (!inBounds()) { + ERROR(errorCode); return {}; } } // Parse exponent digits - if (!isDigit(source[index])) { - ERROR(parseError, errorCode, index); + if (!isDigit(peek())) { + ERROR(errorCode); return {}; } contents += parseDigits(errorCode); @@ -886,17 +816,17 @@ Literal Parser::parseUnquotedLiteral(UErrorCode& errorCode) { */ Literal Parser::parseLiteral(UErrorCode& errorCode) { Literal result; - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); } else { - if (source[index] == PIPE) { + if (peek() == PIPE) { result = parseQuotedLiteral(errorCode); } else { result = parseUnquotedLiteral(errorCode); } // Guarantee postcondition - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); } } @@ -910,9 +840,9 @@ Literal Parser::parseLiteral(UErrorCode& errorCode) { */ template<class T> void Parser::parseAttribute(AttributeAdder<T>& attrAdder, UErrorCode& errorCode) { - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); - U_ASSERT(source[index] == AT); + U_ASSERT(peek() == AT); // Consume the '@' parseToken(AT, errorCode); @@ -926,13 +856,13 @@ void Parser::parseAttribute(AttributeAdder<T>& attrAdder, UErrorCode& errorCode) parseOptionalWhitespace(errorCode); Operand rand; - if (source[index] == EQUALS) { + if (peek() == EQUALS) { // Parse '=' parseTokenWithWhitespace(EQUALS, errorCode); UnicodeString rhsStr; // Parse RHS, which is either a literal or variable - switch (source[index]) { + switch (peek()) { case DOLLAR: { rand = Operand(parseVariableName(errorCode)); break; @@ -961,7 +891,7 @@ void Parser::parseAttribute(AttributeAdder<T>& attrAdder, UErrorCode& errorCode) */ template<class T> void Parser::parseOption(OptionAdder<T>& addOption, UErrorCode& errorCode) { - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); // Parse LHS UnicodeString lhs = parseIdentifier(errorCode); @@ -972,7 +902,7 @@ void Parser::parseOption(OptionAdder<T>& addOption, UErrorCode& errorCode) { UnicodeString rhsStr; Operand rand; // Parse RHS, which is either a literal or variable - switch (source[index]) { + switch (peek()) { case DOLLAR: { rand = Operand(parseVariableName(errorCode)); break; @@ -1009,7 +939,7 @@ void Parser::parseOption(OptionAdder<T>& addOption, UErrorCode& errorCode) { template <class T> void Parser::parseOptions(OptionAdder<T>& addOption, UErrorCode& errorCode) { // Early exit if out of bounds -- no more work is possible - CHECK_BOUNDS(source, index, parseError, errorCode); + CHECK_BOUNDS(errorCode); /* Arbitrary lookahead is required to parse option lists. To see why, consider @@ -1057,7 +987,7 @@ an option or an attribute. // If the next character is not whitespace, that means we've already // parsed the entire options list (which may have been empty) and there's // no trailing whitespace. In that case, exit. - if (!isWhitespace(source[index])) { + if (!isWhitespace(peek())) { break; } int32_t firstWhitespace = index; @@ -1066,7 +996,7 @@ an option or an attribute. // one whitespace character. parseRequiredWhitespace(errorCode); // Restore precondition - CHECK_BOUNDS(source, index, parseError, errorCode); + CHECK_BOUNDS(errorCode); // If a name character follows, then at least one more option remains // in the list. @@ -1074,7 +1004,7 @@ an option or an attribute. // and can exit. // Note that exiting is sort of like backtracking: "(s option)" doesn't apply, // so we back out to [s]. - if (!isNameStart(source[index])) { + if (!isNameStart(peek())) { // We've consumed all the options (meaning that either we consumed non-empty // whitespace, or consumed at least one option.) // Done. @@ -1097,8 +1027,8 @@ template<class T> void Parser::parseAttributes(AttributeAdder<T>& attrAdder, UErrorCode& errorCode) { // Early exit if out of bounds -- no more work is possible - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); return; } @@ -1111,7 +1041,7 @@ Arbitrary lookahead is required to parse attribute lists, similarly to option li // If the next character is not whitespace, that means we've already // parsed the entire attributes list (which may have been empty) and there's // no trailing whitespace. In that case, exit. - if (!isWhitespace(source[index])) { + if (!isWhitespace(peek())) { break; } @@ -1119,8 +1049,8 @@ Arbitrary lookahead is required to parse attribute lists, similarly to option li // one whitespace character. parseRequiredWhitespace(errorCode); // Restore precondition - if (!inBounds(source, index)) { - ERROR(parseError, errorCode, index); + if (!inBounds()) { + ERROR(errorCode); break; } @@ -1130,7 +1060,7 @@ Arbitrary lookahead is required to parse attribute lists, similarly to option li // and can exit. // Note that exiting is sort of like backtracking: "(s attributes)" doesn't apply, // so we back out to [s]. - if (source[index] != AT) { + if (peek() != AT) { // We've consumed all the attributes (meaning that either we consumed non-empty // whitespace, or consumed at least one attribute.) // Done. @@ -1142,206 +1072,19 @@ Arbitrary lookahead is required to parse attribute lists, similarly to option li } } -void Parser::parseReservedEscape(UnicodeString &str, UErrorCode& errorCode) { - parseEscapeSequence(RESERVED, str, errorCode); -} - /* - Consumes a non-empty sequence of reserved-chars, reserved-escapes, and - literals (as in 1*(reserved-char / reserved-escape / literal) in the `reserved-body` rule) - - Appends it to `str` -*/ -void Parser::parseReservedChunk(Reserved::Builder& result, UErrorCode& status) { - CHECK_ERROR(status); - - bool empty = true; - UnicodeString chunk; - while(reservedChunkFollows(source[index])) { - empty = false; - // reserved-char - if (isReservedChar(source[index])) { - chunk += source[index]; - normalizedInput += source[index]; - // consume the char - index++; - // Restore precondition - CHECK_BOUNDS(source, index, parseError, status); - continue; - } - - if (chunk.length() > 0) { - result.add(Literal(false, chunk), status); - chunk.setTo(u"", 0); - } - - if (source[index] == BACKSLASH) { - // reserved-escape - parseReservedEscape(chunk, status); - result.add(Literal(false, chunk), status); - chunk.setTo(u"", 0); - } else if (source[index] == PIPE || isUnquotedStart(source[index])) { - result.add(parseLiteral(status), status); - } else { - // The reserved chunk ends here - break; - } - - CHECK_ERROR(status); // Avoid looping infinitely - } - - // Add the last chunk if necessary - if (chunk.length() > 0) { - result.add(Literal(false, chunk), status); - } - - if (empty) { - ERROR(parseError, status, index); - } -} - -/* - Consume a `reserved-start` character followed by a possibly-empty sequence - of non-empty sequences of reserved characters, separated by whitespace. - Matches the `reserved` nonterminal in the grammar - -*/ -Reserved Parser::parseReserved(UErrorCode& status) { - Reserved::Builder builder(status); - - if (U_FAILURE(status)) { - return {}; - } - - U_ASSERT(inBounds(source, index)); - - // Require a `reservedStart` character - if (!isReservedStart(source[index])) { - ERROR(parseError, status, index); - return Reserved(); - } - - // Add the start char as a separate text chunk - UnicodeString firstCharString(source[index]); - builder.add(Literal(false, firstCharString), status); - if (U_FAILURE(status)) { - return {}; - } - // Consume reservedStart - normalizedInput += source[index]; - index++; - return parseReservedBody(builder, status); -} - -Reserved Parser::parseReservedBody(Reserved::Builder& builder, UErrorCode& status) { - if (U_FAILURE(status)) { - return {}; - } - -/* - Arbitrary lookahead is required to parse a `reserved`, for similar reasons - to why it's required for parsing function annotations. - - In the grammar: - - annotation = (function *(s option)) / reserved - expression = "{" [s] (((literal / variable) [s annotation]) / annotation) [s] "}" - reserved = reserved-start reserved-body - reserved-body = *( [s] 1*(reserved-char / reserved-escape / literal)) - - When reading a whitespace character, it's ambiguous whether it's the optional - whitespace in this rule, or the optional whitespace that precedes a '}' in an - expression. - - The ambiguity is resolved using the same grammar refactoring as shown in - the comment in `parseOptions()`. -*/ - // Consume reserved characters / literals / reserved escapes - // until a character that can't be in a `reserved-body` is seen - while (true) { - /* - First, if there is whitespace, it means either a chunk follows it, - or this is the trailing whitespace before the '}' that terminates an - expression. - - Next, if the next character can start a reserved-char, reserved-escape, - or literal, then parse a "chunk" of reserved things. - In any other case, we exit successfully, since per the refactored - grammar rule: - annotation = (function *(s option) [s]) / (reserved [s]) - it's valid to consume whitespace after a `reserved`. - (`parseExpression()` is responsible for checking that the next - character is in fact a '}'.) - */ - if (!inBounds(source, index)) { - break; - } - int32_t numWhitespaceChars = 0; - int32_t savedIndex = index; - if (isWhitespace(source[index])) { - parseOptionalWhitespace(status); - numWhitespaceChars = index - savedIndex; - // Restore precondition - if (!inBounds(source, index)) { - break; - } - } - - if (reservedChunkFollows(source[index])) { - parseReservedChunk(builder, status); - - // Avoid looping infinitely - if (U_FAILURE(status) || !inBounds(source, index)) { - break; - } - } else { - if (numWhitespaceChars > 0) { - if (source[index] == LEFT_CURLY_BRACE) { - // Resolve even more ambiguity (space preceding another piece of - // a `reserved-body`, vs. space preceding an expression in `reserved-statement` - // "Backtrack" - index -= numWhitespaceChars; - break; - } - if (source[index] == RIGHT_CURLY_BRACE) { - // Not an error: just means there's no trailing whitespace - // after this `reserved` - break; - } - if (source[index] == AT) { - // Not an error, but we have to "backtrack" due to the ambiguity - // between an `s` preceding another reserved chunk - // and an `s` preceding an attribute list - index -= numWhitespaceChars; - break; - } - // Error: if there's whitespace, it must either be followed - // by a non-empty sequence or by '}' - ERROR(parseError, status, index); - break; - } - // If there was no whitespace, it's not an error, - // just the end of the reserved string - break; - } - } - - return builder.build(status); -} - -/* - Consume a function call or reserved string, matching the `annotation` + Consume a function call, matching the `annotation` nonterminal in the grammar Returns an `Operator` representing this (a reserved is a parse error) */ Operator Parser::parseAnnotation(UErrorCode& status) { - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); Operator::Builder ratorBuilder(status); if (U_FAILURE(status)) { return {}; } - if (isFunctionStart(source[index])) { + if (isFunctionStart(peek())) { // Consume the function name FunctionName func = parseFunction(status); ratorBuilder.setFunctionName(std::move(func)); @@ -1350,17 +1093,9 @@ Operator Parser::parseAnnotation(UErrorCode& status) { // Consume the options (which may be empty) parseOptions(addOptions, status); } else { - // Must be reserved - // A reserved sequence is not a parse error, but might be a formatting error - Reserved rator = parseReserved(status); - ratorBuilder.setReserved(std::move(rator)); + ERROR(status); } - UErrorCode localStatus = U_ZERO_ERROR; - Operator result = ratorBuilder.build(localStatus); - // Either `setReserved` or `setFunctionName` was called, - // so there shouldn't be an error. - U_ASSERT(U_SUCCESS(localStatus)); - return result; + return ratorBuilder.build(status); } /* @@ -1373,7 +1108,7 @@ void Parser::parseLiteralOrVariableWithAnnotation(bool isVariable, UErrorCode& status) { CHECK_ERROR(status); - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); Operand rand; if (isVariable) { @@ -1407,7 +1142,7 @@ refactoring for the `expression` nonterminal that `parseOptions()` relies on. Se the comment in `parseOptions()` for details. */ - if (isWhitespace(source[index])) { + if (isWhitespace(peek())) { int32_t firstWhitespace = index; // If the next character is whitespace, either [s annotation] or [s] applies @@ -1416,10 +1151,10 @@ the comment in `parseOptions()` for details. // one does apply. parseOptionalWhitespace(status); // Restore precondition - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); // This next check resolves the ambiguity between [s annotation] and [s] - bool isSAnnotation = isAnnotationStart(source[index]); + bool isSAnnotation = isAnnotationStart(peek()); if (isSAnnotation) { normalizedInput += SPACE; @@ -1480,7 +1215,7 @@ Expression Parser::parseExpression(UErrorCode& status) { } // Early return if out of input -- no more work is possible - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); // Parse opening brace parseToken(LEFT_CURLY_BRACE, status); @@ -1489,11 +1224,11 @@ Expression Parser::parseExpression(UErrorCode& status) { Expression::Builder exprBuilder(status); // Restore precondition - if (!inBounds(source, index)) { + if (!inBounds()) { exprFallback(exprBuilder); } else { // literal '|', variable '$' or annotation - switch (source[index]) { + switch (peek()) { case PIPE: { // Quoted literal parseLiteralOrVariableWithAnnotation(false, exprBuilder, status); @@ -1505,15 +1240,15 @@ Expression Parser::parseExpression(UErrorCode& status) { break; } default: { - if (isAnnotationStart(source[index])) { + if (isAnnotationStart(peek())) { Operator rator = parseAnnotation(status); exprBuilder.setOperator(std::move(rator)); - } else if (isUnquotedStart(source[index])) { + } else if (isUnquotedStart(peek())) { // Unquoted literal parseLiteralOrVariableWithAnnotation(false, exprBuilder, status); } else { // Not a literal, variable or annotation -- error out - ERROR(parseError, status, index); + ERROR(status); exprFallback(exprBuilder); break; } @@ -1523,7 +1258,7 @@ Expression Parser::parseExpression(UErrorCode& status) { } // Parse attributes - AttributeAdder attrAdder(exprBuilder); + AttributeAdder<Expression::Builder> attrAdder(exprBuilder); parseAttributes(attrAdder, status); // Parse optional space @@ -1537,8 +1272,8 @@ Expression Parser::parseExpression(UErrorCode& status) { U_ASSERT(U_SUCCESS(localStatus)); // Check for end-of-input and missing '}' - if (!inBounds(source, index)) { - ERROR(parseError, status, index); + if (!inBounds()) { + ERROR(status); } else { // Otherwise, it's safe to check for the '}' parseToken(RIGHT_CURLY_BRACE, status); @@ -1553,17 +1288,17 @@ Expression Parser::parseExpression(UErrorCode& status) { void Parser::parseLocalDeclaration(UErrorCode& status) { // End-of-input here would be an error; even empty // declarations must be followed by a body - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); parseToken(ID_LOCAL, status); parseRequiredWhitespace(status); // Restore precondition - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); VariableName lhs = parseVariableName(status); parseTokenWithWhitespace(EQUALS, status); // Restore precondition before calling parseExpression() - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); Expression rhs = parseExpression(status); @@ -1601,13 +1336,13 @@ void Parser::parseLocalDeclaration(UErrorCode& status) { void Parser::parseInputDeclaration(UErrorCode& status) { // End-of-input here would be an error; even empty // declarations must be followed by a body - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); parseToken(ID_INPUT, status); parseOptionalWhitespace(status); // Restore precondition before calling parseExpression() - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); // Save the index for error diagnostics int32_t exprIndex = index; @@ -1617,7 +1352,7 @@ void Parser::parseInputDeclaration(UErrorCode& status) { if (!rhs.getOperand().isVariable()) { // This case is a syntax error; report it at the beginning // of the expression - ERROR(parseError, status, exprIndex); + ERROR_AT(status, exprIndex); return; } @@ -1640,93 +1375,6 @@ void Parser::parseInputDeclaration(UErrorCode& status) { } } -/* - Parses a `reserved-statement` per the grammar - */ -void Parser::parseUnsupportedStatement(UErrorCode& status) { - U_ASSERT(inBounds(source, index) && source[index] == PERIOD); - - UnsupportedStatement::Builder builder(status); - CHECK_ERROR(status); - - // Parse the keyword - UnicodeString keyword(PERIOD); - normalizedInput += UnicodeString(PERIOD); - index++; - keyword += parseName(status); - builder.setKeyword(keyword); - - // Parse the body, which is optional - // Lookahead is required to distinguish the `s` in reserved-body - // from the `s` in `[s] expression` - // Next character may be: - // * whitespace (followed by either a reserved-body start or - // a '{') - // * a '{' - - CHECK_BOUNDS(source, index, parseError, status); - - if (source[index] != LEFT_CURLY_BRACE) { - if (!isWhitespace(source[index])) { - ERROR(parseError, status, index); - return; - } - // Expect a reserved-body start - int32_t savedIndex = index; - parseRequiredWhitespace(status); - CHECK_BOUNDS(source, index, parseError, status); - if (isReservedBodyStart(source[index])) { - // There is a reserved body - Reserved::Builder r(status); - builder.setBody(parseReservedBody(r, status)); - } else { - // No body -- backtrack so we can parse 1*([s] expression) - index = savedIndex; - normalizedInput.truncate(normalizedInput.length() - 1); - } - // Otherwise, the next character must be a '{' - // to open the required expression (or optional whitespace) - if (source[index] != LEFT_CURLY_BRACE && !isWhitespace(source[index])) { - ERROR(parseError, status, index); - return; - } - } - - // Finally, parse the expressions - - // Need to look ahead to disambiguate a '{' beginning - // an expression from one beginning with a quoted pattern - int32_t expressionCount = 0; - while (source[index] == LEFT_CURLY_BRACE || isWhitespace(source[index])) { - parseOptionalWhitespace(status); - - bool nextIsLbrace = source[index] == LEFT_CURLY_BRACE; - bool nextIsQuotedPattern = nextIsLbrace && inBounds(source, index + 1) - && source[index + 1] == LEFT_CURLY_BRACE; - if (nextIsQuotedPattern) { - break; - } - - builder.addExpression(parseExpression(status), status); - expressionCount++; - } - if (expressionCount <= 0) { - // At least one expression is required - ERROR(parseError, status, index); - return; - } - dataModel.addUnsupportedStatement(builder.build(status), status); -} - -// Terrible hack to get around the ambiguity between `matcher` and `reserved-statement` -bool Parser::nextIsMatch() const { - for(int32_t i = 0; i < 6; i++) { - if (!inBounds(source, index + i) || source[index + i] != ID_MATCH[i]) { - return false; - } - } - return true; -} /* Consume a possibly-empty sequence of declarations separated by whitespace; each declaration matches the `declaration` nonterminal in the grammar @@ -1736,23 +1384,17 @@ bool Parser::nextIsMatch() const { void Parser::parseDeclarations(UErrorCode& status) { // End-of-input here would be an error; even empty // declarations must be followed by a body - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); - while (source[index] == PERIOD) { - CHECK_BOUNDS(source, index + 1, parseError, status); - if (source[index + 1] == ID_LOCAL[1]) { + while (peek() == PERIOD) { + CHECK_BOUNDS_1(status); + if (peek(1) == ID_LOCAL[1]) { parseLocalDeclaration(status); - } else if (source[index + 1] == ID_INPUT[1]) { + } else if (peek(1) == ID_INPUT[1]) { parseInputDeclaration(status); } else { - // Unsupported statement - // Lookahead is needed to disambiguate this from a `match` - if (!nextIsMatch()) { - parseUnsupportedStatement(status); - } else { - // Done parsing declarations - break; - } + // Done parsing declarations + break; } // Avoid looping infinitely @@ -1760,54 +1402,31 @@ void Parser::parseDeclarations(UErrorCode& status) { parseOptionalWhitespace(status); // Restore precondition - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); } } /* - Consume an escaped curly brace, or backslash, matching the `text-escape` - nonterminal in the grammar -*/ -void Parser::parseTextEscape(UnicodeString &str, UErrorCode& status) { - parseEscapeSequence(TEXT, str, status); -} - -/* - Consume a non-empty sequence of text characters and escaped text characters, - matching the `text` nonterminal in the grammar + Consume a text character + matching the `text-char` nonterminal in the grammar - No postcondition (a message can end with a text) + No postcondition (a message can end with a text-char) */ -UnicodeString Parser::parseText(UErrorCode& status) { +UnicodeString Parser::parseTextChar(UErrorCode& status) { UnicodeString str; - if (!inBounds(source, index)) { - // Text can be empty - return str; - } - - if (!(isTextChar(source[index] || source[index] == BACKSLASH))) { - // Error -- text is expected here - ERROR(parseError, status, index); - return str; - } - - while (true) { - if (source[index] == BACKSLASH) { - parseTextEscape(str, status); - } else if (isTextChar(source[index])) { - normalizedInput += source[index]; - str += source[index]; - index++; - maybeAdvanceLine(); - } else { - break; - } - if (!inBounds(source, index)) { - // OK for text to end a message - break; + if (!inBounds() || !(isTextChar(peek()))) { + // Error -- text-char is expected here + ERROR(status); + } else { + // See comment in parseQuotedLiteral() + if (isEscapableChar(peek())) { + normalizedInput += BACKSLASH; } + normalizedInput += peek(); + str += peek(); + next(); + maybeAdvanceLine(); } - return str; } @@ -1816,17 +1435,17 @@ UnicodeString Parser::parseText(UErrorCode& status) { the `key` nonterminal in the grammar */ Key Parser::parseKey(UErrorCode& status) { - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); Key k; // wildcard by default // Literal | '*' - switch (source[index]) { + switch (peek()) { case ASTERISK: { - index++; + next(); normalizedInput += ASTERISK; // Guarantee postcondition - if (!inBounds(source, index)) { - ERROR(parseError, status, index); + if (!inBounds()) { + ERROR(status); return k; } break; @@ -1852,7 +1471,7 @@ SelectorKeys Parser::parseNonEmptyKeys(UErrorCode& status) { return result; } - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); /* Arbitrary lookahead is required to parse key lists. To see why, consider @@ -1884,31 +1503,31 @@ This is addressed using "backtracking" (similarly to `parseOptions()`). keysBuilder.add(parseKey(status), status); // Restore precondition - if (!inBounds(source, index)) { - ERROR(parseError, status, index); + if (!inBounds()) { + ERROR(status); return result; } // We've seen at least one whitespace-key pair, so now we can parse // *(s key) [s] - while (source[index] != LEFT_CURLY_BRACE || isWhitespace(source[index])) { // Try to recover from errors - bool wasWhitespace = isWhitespace(source[index]); + while (peek() != LEFT_CURLY_BRACE || isWhitespace(peek())) { // Try to recover from errors + bool wasWhitespace = isWhitespace(peek()); parseRequiredWhitespace(status); if (!wasWhitespace) { // Avoid infinite loop when parsing something like: // when * @{!... - index++; + next(); } // Restore precondition - if (!inBounds(source, index)) { - ERROR(parseError, status, index); + if (!inBounds()) { + ERROR(status); return result; } // At this point, it's ambiguous whether we are inside (s key) or [s]. // This check resolves that ambiguity. - if (source[index] == LEFT_CURLY_BRACE) { + if (peek() == LEFT_CURLY_BRACE) { // A pattern follows, so what we just parsed was the optional // trailing whitespace. All the keys have been parsed. @@ -1923,7 +1542,7 @@ This is addressed using "backtracking" (similarly to `parseOptions()`). } Pattern Parser::parseQuotedPattern(UErrorCode& status) { - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); parseToken(LEFT_CURLY_BRACE, status); parseToken(LEFT_CURLY_BRACE, status); @@ -1938,9 +1557,9 @@ Pattern Parser::parseQuotedPattern(UErrorCode& status) { No postcondition (a markup can end a message) */ Markup Parser::parseMarkup(UErrorCode& status) { - U_ASSERT(inBounds(source, index + 1)); + U_ASSERT(inBounds(1)); - U_ASSERT(source[index] == LEFT_CURLY_BRACE); + U_ASSERT(peek() == LEFT_CURLY_BRACE); Markup::Builder builder(status); if (U_FAILURE(status)) { @@ -1948,26 +1567,26 @@ Markup Parser::parseMarkup(UErrorCode& status) { } // Consume the '{' - index++; + next(); normalizedInput += LEFT_CURLY_BRACE; parseOptionalWhitespace(status); bool closing = false; - switch (source[index]) { + switch (peek()) { case NUMBER_SIGN: { // Open or standalone; consume the '#' - normalizedInput += source[index]; - index++; + normalizedInput += peek(); + next(); break; } case SLASH: { // Closing - normalizedInput += source[index]; + normalizedInput += peek(); closing = true; - index++; + next(); break; } default: { - ERROR(parseError, status, index); + ERROR(status); return {}; } } @@ -1977,15 +1596,15 @@ Markup Parser::parseMarkup(UErrorCode& status) { // Parse the options, which must begin with a ' ' // if present - if (inBounds(source, index) && isWhitespace(source[index])) { + if (inBounds() && isWhitespace(peek())) { OptionAdder<Markup::Builder> optionAdder(builder); parseOptions(optionAdder, status); } // Parse the attributes, which also must begin // with a ' ' - if (inBounds(source, index) && isWhitespace(source[index])) { - AttributeAdder attrAdder(builder); + if (inBounds() && isWhitespace(peek())) { + AttributeAdder<Markup::Builder> attrAdder(builder); parseAttributes(attrAdder, status); } @@ -1994,10 +1613,10 @@ Markup Parser::parseMarkup(UErrorCode& status) { bool standalone = false; // Check if this is a standalone or not if (!closing) { - if (inBounds(source, index) && source[index] == SLASH) { + if (inBounds() && peek() == SLASH) { standalone = true; normalizedInput += SLASH; - index++; + next(); } } @@ -2019,16 +1638,31 @@ Markup Parser::parseMarkup(UErrorCode& status) { No postcondition (a placeholder can end a message) */ std::variant<Expression, Markup> Parser::parsePlaceholder(UErrorCode& status) { - U_ASSERT(source[index] == LEFT_CURLY_BRACE); + U_ASSERT(peek() == LEFT_CURLY_BRACE); - if (!inBounds(source, index)) { - ERROR(parseError, status, index); + if (!inBounds()) { + ERROR(status); return exprFallback(status); } - // Check if it's markup or an expression - if (source[index + 1] == NUMBER_SIGN || source[index + 1] == SLASH) { - // Markup + // Need to look ahead arbitrarily since whitespace + // can appear before the '{' and '#' + // in markup + int32_t tempIndex = 1; + bool isMarkup = false; + while (inBounds(1)) { + UChar32 c = peek(tempIndex); + if (c == NUMBER_SIGN || c == SLASH) { + isMarkup = true; + break; + } + if (!isWhitespace(c)){ + break; + } + tempIndex++; + } + + if (isMarkup) { return parseMarkup(status); } return parseExpression(status); @@ -2036,7 +1670,7 @@ std::variant<Expression, Markup> Parser::parsePlaceholder(UErrorCode& status) { /* Consume a `simple-message`, matching the nonterminal in the grammar - Postcondition: `index == source.length()` or U_FAILURE(status); + Postcondition: `index == len()` or U_FAILURE(status); for a syntactically correct message, this will consume the entire input */ Pattern Parser::parseSimpleMessage(UErrorCode& status) { @@ -2044,8 +1678,8 @@ Pattern Parser::parseSimpleMessage(UErrorCode& status) { if (U_SUCCESS(status)) { Expression expression; - while (inBounds(source, index)) { - switch (source[index]) { + while (inBounds()) { + switch (peek()) { case LEFT_CURLY_BRACE: { // Must be placeholder std::variant<Expression, Markup> piece = parsePlaceholder(status); @@ -2058,13 +1692,22 @@ Pattern Parser::parseSimpleMessage(UErrorCode& status) { } break; } + case BACKSLASH: { + // Must be escaped-char + result.add(parseEscapeSequence(status), status); + break; + } + case RIGHT_CURLY_BRACE: { + // Distinguish unescaped '}' from end of quoted pattern + break; + } default: { - // Must be text - result.add(parseText(status), status); + // Must be text-char + result.add(parseTextChar(status), status); break; } } - if (source[index] == RIGHT_CURLY_BRACE) { + if (peek() == RIGHT_CURLY_BRACE) { // End of quoted pattern break; } @@ -2082,13 +1725,13 @@ Pattern Parser::parseSimpleMessage(UErrorCode& status) { Consume a `selectors` (matching the nonterminal in the grammar), followed by a non-empty sequence of `variant`s (matching the nonterminal in the grammar) preceded by whitespace - No postcondition (on return, `index` might equal `source.length()` with no syntax error + No postcondition (on return, `index` might equal `len()` with no syntax error because a message can end with a variant) */ void Parser::parseSelectors(UErrorCode& status) { CHECK_ERROR(status); - U_ASSERT(inBounds(source, index)); + U_ASSERT(inBounds()); parseToken(ID_MATCH, status); @@ -2096,11 +1739,11 @@ void Parser::parseSelectors(UErrorCode& status) { // Parse selectors // "Backtracking" is required here. It's not clear if whitespace is // (`[s]` selector) or (`[s]` variant) - while (isWhitespace(source[index]) || source[index] == LEFT_CURLY_BRACE) { + while (isWhitespace(peek()) || peek() == LEFT_CURLY_BRACE) { parseOptionalWhitespace(status); // Restore precondition - CHECK_BOUNDS(source, index, parseError, status); - if (source[index] != LEFT_CURLY_BRACE) { + CHECK_BOUNDS(status); + if (peek() != LEFT_CURLY_BRACE) { // This is not necessarily an error, but rather, // means the whitespace we parsed was the optional // whitespace preceding the first variant, not the @@ -2117,29 +1760,21 @@ void Parser::parseSelectors(UErrorCode& status) { // At least one selector is required if (empty) { - ERROR(parseError, status, index); + ERROR(status); return; } #define CHECK_END_OF_INPUT \ - if (((int32_t)index) >= source.length()) { \ + if (!inBounds()) { \ break; \ } \ // Parse variants - while (isWhitespace(source[index]) || isKeyStart(source[index])) { - if (isWhitespace(source[index])) { - int32_t whitespaceStart = index; - parseOptionalWhitespace(status); - // Restore the precondition. - // Error out if we reached the end of input. The message - // cannot end with trailing whitespace if there are variants. - if (!inBounds(source, index)) { - // Use index of first whitespace for error message - index = whitespaceStart; - ERROR(parseError, status, index); - return; - } + while (isWhitespace(peek()) || isKeyStart(peek())) { + // Trailing whitespace is allowed + parseOptionalWhitespace(status); + if (!inBounds()) { + return; } // At least one key is required @@ -2152,7 +1787,7 @@ void Parser::parseSelectors(UErrorCode& status) { // Restore precondition before calling parsePattern() // (which must return a non-null value) - CHECK_BOUNDS(source, index, parseError, status); + CHECK_BOUNDS(status); Pattern rhs = parseQuotedPattern(status); dataModel.addVariant(std::move(keyList), std::move(rhs), status); @@ -2169,7 +1804,7 @@ void Parser::parseSelectors(UErrorCode& status) { /* Consume a `body` (matching the nonterminal in the grammar), - No postcondition (on return, `index` might equal `source.length()` with no syntax error, + No postcondition (on return, `index` might equal `len()` with no syntax error, because a message can end with a body (trailing whitespace is optional) */ @@ -2188,8 +1823,9 @@ void Parser::errorPattern(UErrorCode& status) { whether this is the intent behind the spec */ UnicodeString partStr(LEFT_CURLY_BRACE); - while (inBounds(source, index)) { - partStr += source[index++]; + while (inBounds()) { + partStr += peek(); + next(); } // Add curly braces around the entire output (same comment as above) partStr += RIGHT_CURLY_BRACE; @@ -2201,13 +1837,13 @@ void Parser::parseBody(UErrorCode& status) { CHECK_ERROR(status); // Out-of-input is a syntax warning - if (!inBounds(source, index)) { + if (!inBounds()) { errorPattern(status); return; } // Body must be either a pattern or selectors - switch (source[index]) { + switch (peek()) { case LEFT_CURLY_BRACE: { // Pattern dataModel.setPattern(parseQuotedPattern(status)); @@ -2219,7 +1855,7 @@ void Parser::parseBody(UErrorCode& status) { return; } default: { - ERROR(parseError, status, index); + ERROR(status); errorPattern(status); return; } @@ -2232,21 +1868,34 @@ void Parser::parseBody(UErrorCode& status) { void Parser::parse(UParseError &parseErrorResult, UErrorCode& status) { CHECK_ERROR(status); - bool simple = true; + bool complex = false; + // First, "look ahead" to determine if this is a simple or complex + // message. To do that, check the first non-whitespace character. + while (inBounds(index) && isWhitespace(peek())) { + next(); + } + // Message can be empty, so we need to only look ahead // if we know it's non-empty - if (inBounds(source, index)) { - if (source[index] == PERIOD - || (index < ((uint32_t) source.length() + 1) - && source[index] == LEFT_CURLY_BRACE - && source[index + 1] == LEFT_CURLY_BRACE)) { - // A complex message begins with a '.' or '{' - parseDeclarations(status); - parseBody(status); - simple = false; + if (inBounds()) { + if (peek() == PERIOD + || (inBounds(1) + && peek() == LEFT_CURLY_BRACE + && peek(1) == LEFT_CURLY_BRACE)) { + complex = true; } } - if (simple) { + // Reset index + index = 0; + + // Message can be empty, so we need to only look ahead + // if we know it's non-empty + if (complex) { + parseOptionalWhitespace(status); + parseDeclarations(status); + parseBody(status); + parseOptionalWhitespace(status); + } else { // Simple message // For normalization, quote the pattern normalizedInput += LEFT_CURLY_BRACE; @@ -2259,8 +1908,8 @@ void Parser::parse(UParseError &parseErrorResult, UErrorCode& status) { CHECK_ERROR(status); // There are no errors; finally, check that the entire input was consumed - if (((int32_t)index) != source.length()) { - ERROR(parseError, status, index); + if (!allConsumed()) { + ERROR(status); } // Finally, copy the relevant fields of the internal `MessageParseError` diff --git a/deps/icu-small/source/i18n/messageformat2_parser.h b/deps/icu-small/source/i18n/messageformat2_parser.h index 92c0475d67db03..b62cbe9200b94a 100644 --- a/deps/icu-small/source/i18n/messageformat2_parser.h +++ b/deps/icu-small/source/i18n/messageformat2_parser.h @@ -91,10 +91,6 @@ namespace message2 { parseError.postContext[0] = '\0'; } - // Used so `parseEscapeSequence()` can handle all types of escape sequences - // (literal, text, and reserved) - typedef enum { LITERAL, TEXT, RESERVED } EscapeKind; - static void translateParseError(const MessageParseError&, UParseError&); static void setParseError(MessageParseError&, uint32_t); void maybeAdvanceLine(); @@ -111,19 +107,16 @@ namespace message2 { void parseOptionalWhitespace(UErrorCode&); void parseToken(UChar32, UErrorCode&); void parseTokenWithWhitespace(UChar32, UErrorCode&); - template <int32_t N> - void parseToken(const UChar32 (&)[N], UErrorCode&); - template <int32_t N> - void parseTokenWithWhitespace(const UChar32 (&)[N], UErrorCode&); - bool nextIsMatch() const; + void parseToken(const std::u16string_view&, UErrorCode&); + void parseTokenWithWhitespace(const std::u16string_view&, UErrorCode&); + bool nextIs(const std::u16string_view&) const; UnicodeString parseName(UErrorCode&); UnicodeString parseIdentifier(UErrorCode&); UnicodeString parseDigits(UErrorCode&); VariableName parseVariableName(UErrorCode&); FunctionName parseFunction(UErrorCode&); - void parseEscapeSequence(EscapeKind, UnicodeString&, UErrorCode&); - void parseLiteralEscape(UnicodeString&, UErrorCode&); - Literal parseUnquotedLiteral(UErrorCode&); + UnicodeString parseEscapeSequence(UErrorCode&); + Literal parseUnquotedLiteral(UErrorCode&); Literal parseQuotedLiteral(UErrorCode&); Literal parseLiteral(UErrorCode&); template<class T> @@ -134,25 +127,31 @@ namespace message2 { void parseOption(OptionAdder<T>&, UErrorCode&); template<class T> void parseOptions(OptionAdder<T>&, UErrorCode&); - void parseReservedEscape(UnicodeString&, UErrorCode&); - void parseReservedChunk(Reserved::Builder&, UErrorCode&); - Reserved parseReserved(UErrorCode&); - Reserved parseReservedBody(Reserved::Builder&, UErrorCode&); Operator parseAnnotation(UErrorCode&); void parseLiteralOrVariableWithAnnotation(bool, Expression::Builder&, UErrorCode&); Markup parseMarkup(UErrorCode&); Expression parseExpression(UErrorCode&); std::variant<Expression, Markup> parsePlaceholder(UErrorCode&); - void parseTextEscape(UnicodeString&, UErrorCode&); - UnicodeString parseText(UErrorCode&); + UnicodeString parseTextChar(UErrorCode&); Key parseKey(UErrorCode&); SelectorKeys parseNonEmptyKeys(UErrorCode&); void errorPattern(UErrorCode& status); Pattern parseQuotedPattern(UErrorCode&); + bool isDeclarationStart(); + + UChar32 peek() const { return source.char32At(index) ; } + UChar32 peek(uint32_t i) const { + return source.char32At(source.moveIndex32(index, i)); + } + void next() { index = source.moveIndex32(index, 1); } + + bool inBounds() const { return (int32_t) index < source.length(); } + bool inBounds(uint32_t i) const { return source.moveIndex32(index, i) < source.length(); } + bool allConsumed() const { return (int32_t) index == source.length(); } // The input string const UnicodeString &source; - // The current position within the input string + // The current position within the input string -- counting in UChar32 uint32_t index; // Represents the current line (and when an error is indicated), // character offset within the line of the parse error diff --git a/deps/icu-small/source/i18n/messageformat2_serializer.cpp b/deps/icu-small/source/i18n/messageformat2_serializer.cpp index b55c55ab7ced9b..b2765f5acf434f 100644 --- a/deps/icu-small/source/i18n/messageformat2_serializer.cpp +++ b/deps/icu-small/source/i18n/messageformat2_serializer.cpp @@ -35,35 +35,33 @@ void Serializer::emit(const UnicodeString& s) { result += s; } -template <int32_t N> -void Serializer::emit(const UChar32 (&token)[N]) { - // Don't emit the terminator - for (int32_t i = 0; i < N - 1; i++) { - emit(token[i]); - } +void Serializer::emit(const std::u16string_view& token) { + result.append(token); } void Serializer::emit(const Literal& l) { if (l.isQuoted()) { emit(PIPE); - const UnicodeString& contents = l.unquoted(); - for (int32_t i = 0; ((int32_t) i) < contents.length(); i++) { - // Re-escape any PIPE or BACKSLASH characters + } + const UnicodeString& contents = l.unquoted(); + for (int32_t i = 0; ((int32_t) i) < contents.length(); i++) { + // Re-escape any escaped-char characters switch(contents[i]) { case BACKSLASH: - case PIPE: { - emit(BACKSLASH); - break; + case PIPE: + case LEFT_CURLY_BRACE: + case RIGHT_CURLY_BRACE: { + emit(BACKSLASH); + break; } default: { - break; + break; } } emit(contents[i]); - } - emit(PIPE); - } else { - emit(l.unquoted()); + } + if (l.isQuoted()) { + emit(PIPE); } } @@ -136,36 +134,10 @@ void Serializer::emitAttributes(const OptionMap& attributes) { } } -void Serializer::emit(const Reserved& reserved) { - // Re-escape '\' / '{' / '|' / '}' - for (int32_t i = 0; i < reserved.numParts(); i++) { - const Literal& l = reserved.getPart(i); - if (l.isQuoted()) { - emit(l); - } else { - const UnicodeString& s = l.unquoted(); - for (int32_t j = 0; ((int32_t) j) < s.length(); j++) { - switch(s[j]) { - case LEFT_CURLY_BRACE: - case PIPE: - case RIGHT_CURLY_BRACE: - case BACKSLASH: { - emit(BACKSLASH); - break; - } - default: - break; - } - emit(s[j]); - } - } - } -} - void Serializer::emit(const Expression& expr) { emit(LEFT_CURLY_BRACE); - if (!expr.isReserved() && !expr.isFunctionCall()) { + if (!expr.isFunctionCall()) { // Literal or variable, no annotation emit(expr.getOperand()); } else { @@ -178,17 +150,12 @@ void Serializer::emit(const Reserved& reserved) { UErrorCode localStatus = U_ZERO_ERROR; const Operator* rator = expr.getOperator(localStatus); U_ASSERT(U_SUCCESS(localStatus)); - if (rator->isReserved()) { - const Reserved& reserved = rator->asReserved(); - emit(reserved); - } else { - emit(COLON); - emit(rator->getFunctionName()); - // No whitespace after function name, in case it has - // no options. (when there are options, emit(OptionMap) will - // emit the leading whitespace) - emit(rator->getOptionsInternal()); - } + emit(COLON); + emit(rator->getFunctionName()); + // No whitespace after function name, in case it has + // no options. (when there are options, emit(OptionMap) will + // emit the leading whitespace) + emit(rator->getOptionsInternal()); } emitAttributes(expr.getAttributesInternal()); emit(RIGHT_CURLY_BRACE); @@ -198,9 +165,10 @@ void Serializer::emit(const PatternPart& part) { if (part.isText()) { // Raw text const UnicodeString& text = part.asText(); - // Re-escape '{'/'}'/'\' + // Re-escape '{'/'}'/'\''|' for (int32_t i = 0; ((int32_t) i) < text.length(); i++) { switch(text[i]) { + case PIPE: case BACKSLASH: case LEFT_CURLY_BRACE: case RIGHT_CURLY_BRACE: { @@ -252,7 +220,7 @@ void Serializer::emit(const Pattern& pat) { void Serializer::serializeDeclarations() { const Binding* bindings = dataModel.getLocalVariablesInternal(); - U_ASSERT(bindings != nullptr); + U_ASSERT(dataModel.bindingsLen == 0 || bindings != nullptr); for (int32_t i = 0; i < dataModel.bindingsLen; i++) { const Binding& b = bindings[i]; @@ -274,26 +242,6 @@ void Serializer::serializeDeclarations() { } } -void Serializer::serializeUnsupported() { - const UnsupportedStatement* statements = dataModel.getUnsupportedStatementsInternal(); - U_ASSERT(statements != nullptr); - - for (int32_t i = 0; i < dataModel.unsupportedStatementsLen; i++) { - const UnsupportedStatement& s = statements[i]; - emit(s.getKeyword()); - UErrorCode localErrorCode = U_ZERO_ERROR; - const Reserved* r = s.getBody(localErrorCode); - if (U_SUCCESS(localErrorCode)) { - whitespace(); - emit(*r); - } - const Expression* e = s.getExpressionsInternal(); - for (int32_t j = 0; j < s.expressionsLen; j++) { - emit(e[j]); - } - } -} - void Serializer::serializeSelectors() { U_ASSERT(!dataModel.hasPattern()); const Expression* selectors = dataModel.getSelectorsInternal(); @@ -320,7 +268,6 @@ void Serializer::serializeVariants() { // Main (public) serializer method void Serializer::serialize() { serializeDeclarations(); - serializeUnsupported(); // Pattern message if (dataModel.hasPattern()) { emit(dataModel.getPattern()); diff --git a/deps/icu-small/source/i18n/messageformat2_serializer.h b/deps/icu-small/source/i18n/messageformat2_serializer.h index 4b72d1ca715ff8..1b97b3b930087d 100644 --- a/deps/icu-small/source/i18n/messageformat2_serializer.h +++ b/deps/icu-small/source/i18n/messageformat2_serializer.h @@ -38,21 +38,18 @@ namespace message2 { void whitespace(); void emit(UChar32); - template <int32_t N> - void emit(const UChar32 (&)[N]); + void emit(const std::u16string_view&); void emit(const UnicodeString&); void emit(const Literal&); void emit(const Key&); void emit(const SelectorKeys&); void emit(const Operand&); - void emit(const Reserved&); void emit(const Expression&); void emit(const PatternPart&); void emit(const Pattern&); void emit(const Variant*); void emitAttributes(const OptionMap&); void emit(const OptionMap&); - void serializeUnsupported(); void serializeDeclarations(); void serializeSelectors(); void serializeVariants(); diff --git a/deps/icu-small/source/i18n/msgfmt.cpp b/deps/icu-small/source/i18n/msgfmt.cpp index 0413dc7465d631..ae6e76c99debd3 100644 --- a/deps/icu-small/source/i18n/msgfmt.cpp +++ b/deps/icu-small/source/i18n/msgfmt.cpp @@ -355,8 +355,8 @@ UBool MessageFormat::allocateArgTypes(int32_t capacity, UErrorCode& status) { } else if (capacity < 2*argTypeCapacity) { capacity = 2*argTypeCapacity; } - Formattable::Type* a = (Formattable::Type*) - uprv_realloc(argTypes, sizeof(*argTypes) * capacity); + Formattable::Type* a = static_cast<Formattable::Type*>( + uprv_realloc(argTypes, sizeof(*argTypes) * capacity)); if (a == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return false; @@ -424,8 +424,8 @@ MessageFormat::operator==(const Format& rhs) const if (cur->key.integer != rhs_cur->key.integer) { return false; } - const Format* format = (const Format*)uhash_iget(cachedFormatters, cur->key.integer); - const Format* rhs_format = (const Format*)uhash_iget(that.cachedFormatters, rhs_cur->key.integer); + const Format* format = static_cast<const Format*>(uhash_iget(cachedFormatters, cur->key.integer)); + const Format* rhs_format = static_cast<const Format*>(uhash_iget(that.cachedFormatters, rhs_cur->key.integer)); if (*format != *rhs_format) { return false; } @@ -596,8 +596,8 @@ Format* MessageFormat::getCachedFormatter(int32_t argumentNumber) const { return nullptr; } void* ptr = uhash_iget(cachedFormatters, argumentNumber); - if (ptr != nullptr && dynamic_cast<DummyFormat*>((Format*)ptr) == nullptr) { - return (Format*) ptr; + if (ptr != nullptr && dynamic_cast<DummyFormat*>(static_cast<Format*>(ptr)) == nullptr) { + return static_cast<Format*>(ptr); } else { // Not cached, or a DummyFormat representing setFormat(nullptr). return nullptr; @@ -820,16 +820,16 @@ MessageFormat::getFormats(int32_t& cnt) const cnt = 0; if (formatAliases == nullptr) { t->formatAliasesCapacity = totalCapacity; - Format** a = (Format**) - uprv_malloc(sizeof(Format*) * formatAliasesCapacity); + Format** a = static_cast<Format**>( + uprv_malloc(sizeof(Format*) * formatAliasesCapacity)); if (a == nullptr) { t->formatAliasesCapacity = 0; return nullptr; } t->formatAliases = a; } else if (totalCapacity > formatAliasesCapacity) { - Format** a = (Format**) - uprv_realloc(formatAliases, sizeof(Format*) * totalCapacity); + Format** a = static_cast<Format**>( + uprv_realloc(formatAliases, sizeof(Format*) * totalCapacity)); if (a == nullptr) { t->formatAliasesCapacity = 0; return nullptr; @@ -1346,7 +1346,7 @@ void MessageFormat::copyObjects(const MessageFormat& that, UErrorCode& ec) { int32_t pos, idx; for (idx = 0, pos = UHASH_FIRST; idx < count && U_SUCCESS(ec); ++idx) { const UHashElement* cur = uhash_nextElement(that.cachedFormatters, &pos); - Format* newFormat = ((Format*)(cur->value.pointer))->clone(); + Format* newFormat = static_cast<Format*>(cur->value.pointer)->clone(); if (newFormat) { uhash_iput(cachedFormatters, cur->key.integer, newFormat, &ec); } else { @@ -1827,7 +1827,7 @@ MessageFormat::createIntegerFormat(const Locale& locale, UErrorCode& status) con */ const NumberFormat* MessageFormat::getDefaultNumberFormat(UErrorCode& ec) const { if (defaultNumberFormat == nullptr) { - MessageFormat* t = (MessageFormat*) this; + MessageFormat* t = const_cast<MessageFormat*>(this); t->defaultNumberFormat = NumberFormat::createInstance(fLocale, ec); if (U_FAILURE(ec)) { delete t->defaultNumberFormat; @@ -1848,7 +1848,7 @@ const NumberFormat* MessageFormat::getDefaultNumberFormat(UErrorCode& ec) const */ const DateFormat* MessageFormat::getDefaultDateFormat(UErrorCode& ec) const { if (defaultDateFormat == nullptr) { - MessageFormat* t = (MessageFormat*) this; + MessageFormat* t = const_cast<MessageFormat*>(this); t->defaultDateFormat = DateFormat::createDateTimeInstance(DateFormat::kShort, DateFormat::kShort, fLocale); if (t->defaultDateFormat == nullptr) { ec = U_MEMORY_ALLOCATION_ERROR; @@ -1868,7 +1868,7 @@ MessageFormat::getArgTypeCount() const { } UBool MessageFormat::equalFormats(const void* left, const void* right) { - return *(const Format*)left==*(const Format*)right; + return *static_cast<const Format*>(left) == *static_cast<const Format*>(right); } @@ -1923,7 +1923,7 @@ FormatNameEnumeration::FormatNameEnumeration(LocalPointer<UVector> nameList, UEr const UnicodeString* FormatNameEnumeration::snext(UErrorCode& status) { if (U_SUCCESS(status) && pos < fFormatNames->size()) { - return (const UnicodeString*)fFormatNames->elementAt(pos++); + return static_cast<const UnicodeString*>(fFormatNames->elementAt(pos++)); } return nullptr; } @@ -1972,7 +1972,7 @@ UnicodeString MessageFormat::PluralSelectorProvider::select(void *ctx, double nu context.numberArgIndex = msgFormat.findFirstPluralNumberArg(otherIndex, context.argName); if(context.numberArgIndex > 0 && msgFormat.cachedFormatters != nullptr) { context.formatter = - (const Format*)uhash_iget(msgFormat.cachedFormatters, context.numberArgIndex); + static_cast<const Format*>(uhash_iget(msgFormat.cachedFormatters, context.numberArgIndex)); } if(context.formatter == nullptr) { context.formatter = msgFormat.getDefaultNumberFormat(ec); diff --git a/deps/icu-small/source/i18n/name2uni.cpp b/deps/icu-small/source/i18n/name2uni.cpp index 2d26dba812c46d..a15a0469cb5cd1 100644 --- a/deps/icu-small/source/i18n/name2uni.cpp +++ b/deps/icu-small/source/i18n/name2uni.cpp @@ -66,7 +66,7 @@ NameUnicodeTransliterator::NameUnicodeTransliterator(UnicodeFilter* adoptedFilte UnicodeSet *legalPtr = &legal; // Get the legal character set USetAdder sa = { - (USet *)legalPtr, // USet* == UnicodeSet* + reinterpret_cast<USet*>(legalPtr), // USet* == UnicodeSet* _set_add, nullptr, // Don't need _set_addRange nullptr, // Don't need _set_addString @@ -121,7 +121,7 @@ void NameUnicodeTransliterator::handleTransliterate(Replaceable& text, UTransPos // Accommodate the longest possible name ++maxLen; // allow for temporary trailing space - char* cbuf = (char*) uprv_malloc(maxLen); + char* cbuf = static_cast<char*>(uprv_malloc(maxLen)); if (cbuf == nullptr) { offsets.start = offsets.limit; return; diff --git a/deps/icu-small/source/i18n/nfrlist.h b/deps/icu-small/source/i18n/nfrlist.h index 1864d4d3bd99e5..bb19cb2beac9a9 100644 --- a/deps/icu-small/source/i18n/nfrlist.h +++ b/deps/icu-small/source/i18n/nfrlist.h @@ -39,7 +39,7 @@ class NFRuleList : public UMemory { uint32_t fCapacity; public: NFRuleList(uint32_t capacity = 10) - : fStuff(capacity ? (NFRule**)uprv_malloc(capacity * sizeof(NFRule*)) : nullptr) + : fStuff(capacity ? static_cast<NFRule**>(uprv_malloc(capacity * sizeof(NFRule*))) : nullptr) , fCount(0) , fCapacity(capacity) {} ~NFRuleList() { @@ -65,7 +65,7 @@ class NFRuleList : public UMemory { void add(NFRule* thing) { if (fCount == fCapacity) { fCapacity += 10; - fStuff = (NFRule**)uprv_realloc(fStuff, fCapacity * sizeof(NFRule*)); // assume success + fStuff = static_cast<NFRule**>(uprv_realloc(fStuff, fCapacity * sizeof(NFRule*))); // assume success } if (fStuff != nullptr) { fStuff[fCount++] = thing; diff --git a/deps/icu-small/source/i18n/nfrs.cpp b/deps/icu-small/source/i18n/nfrs.cpp index 1f4b9b9d2945d8..be2ab2932e7a5c 100644 --- a/deps/icu-small/source/i18n/nfrs.cpp +++ b/deps/icu-small/source/i18n/nfrs.cpp @@ -267,27 +267,35 @@ NFRuleSet::parseRules(UnicodeString& description, UErrorCode& status) * @param rule The rule to set. */ void NFRuleSet::setNonNumericalRule(NFRule *rule) { - int64_t baseValue = rule->getBaseValue(); - if (baseValue == NFRule::kNegativeNumberRule) { - delete nonNumericalRules[NEGATIVE_RULE_INDEX]; - nonNumericalRules[NEGATIVE_RULE_INDEX] = rule; - } - else if (baseValue == NFRule::kImproperFractionRule) { - setBestFractionRule(IMPROPER_FRACTION_RULE_INDEX, rule, true); - } - else if (baseValue == NFRule::kProperFractionRule) { - setBestFractionRule(PROPER_FRACTION_RULE_INDEX, rule, true); - } - else if (baseValue == NFRule::kDefaultRule) { - setBestFractionRule(DEFAULT_RULE_INDEX, rule, true); - } - else if (baseValue == NFRule::kInfinityRule) { - delete nonNumericalRules[INFINITY_RULE_INDEX]; - nonNumericalRules[INFINITY_RULE_INDEX] = rule; - } - else if (baseValue == NFRule::kNaNRule) { - delete nonNumericalRules[NAN_RULE_INDEX]; - nonNumericalRules[NAN_RULE_INDEX] = rule; + switch (rule->getBaseValue()) { + case NFRule::kNegativeNumberRule: + delete nonNumericalRules[NEGATIVE_RULE_INDEX]; + nonNumericalRules[NEGATIVE_RULE_INDEX] = rule; + return; + case NFRule::kImproperFractionRule: + setBestFractionRule(IMPROPER_FRACTION_RULE_INDEX, rule, true); + return; + case NFRule::kProperFractionRule: + setBestFractionRule(PROPER_FRACTION_RULE_INDEX, rule, true); + return; + case NFRule::kDefaultRule: + setBestFractionRule(DEFAULT_RULE_INDEX, rule, true); + return; + case NFRule::kInfinityRule: + delete nonNumericalRules[INFINITY_RULE_INDEX]; + nonNumericalRules[INFINITY_RULE_INDEX] = rule; + return; + case NFRule::kNaNRule: + delete nonNumericalRules[NAN_RULE_INDEX]; + nonNumericalRules[NAN_RULE_INDEX] = rule; + return; + case NFRule::kNoBase: + case NFRule::kOtherRule: + default: + // If we do not remember the rule inside the object. + // delete it here to prevent memory leak. + delete rule; + return; } } @@ -490,7 +498,7 @@ NFRuleSet::findNormalRule(int64_t number) const // to find the rule (we should only go into this clause if the // value is 0) if (fIsFractionRuleSet) { - return findFractionRuleSetRule((double)number); + return findFractionRuleSetRule(static_cast<double>(number)); } // if the number is negative, return the negative-number rule @@ -590,7 +598,7 @@ NFRuleSet::findFractionRuleSetRule(double number) const for (uint32_t i = 1; i < rules.size(); ++i) { leastCommonMultiple = util_lcm(leastCommonMultiple, rules[i]->getBaseValue()); } - numerator = util64_fromDouble(number * (double)leastCommonMultiple + 0.5); + numerator = util64_fromDouble(number * static_cast<double>(leastCommonMultiple) + 0.5); } // for each rule, do the following... int64_t tempDifference; @@ -632,9 +640,9 @@ NFRuleSet::findFractionRuleSetRule(double number) const // the numerator of the fraction is anything else (this lets us // do things like "one third"/"two thirds" without having to define // a whole bunch of extra rule sets) - if ((unsigned)(winner + 1) < rules.size() && + if (static_cast<unsigned>(winner + 1) < rules.size() && rules[winner + 1]->getBaseValue() == rules[winner]->getBaseValue()) { - double n = ((double)rules[winner]->getBaseValue()) * number; + double n = static_cast<double>(rules[winner]->getBaseValue()) * number; if (n < 0.5 || n >= 2) { ++winner; } @@ -681,7 +689,7 @@ static void dumpUS(FILE* f, const UnicodeString& us) { #endif UBool -NFRuleSet::parse(const UnicodeString& text, ParsePosition& pos, double upperBound, uint32_t nonNumericalExecutedRuleMask, Formattable& result) const +NFRuleSet::parse(const UnicodeString& text, ParsePosition& pos, double upperBound, uint32_t nonNumericalExecutedRuleMask, int32_t recursionCount, Formattable& result) const { // try matching each rule in the rule set against the text being // parsed. Whichever one matches the most characters is the one @@ -689,6 +697,12 @@ NFRuleSet::parse(const UnicodeString& text, ParsePosition& pos, double upperBoun result.setLong(0); + // dump out if we've reached the recursion limit + if (recursionCount >= RECURSION_LIMIT) { + // stop recursion + return false; + } + // dump out if there's no text to parse if (text.length() == 0) { return 0; @@ -712,7 +726,7 @@ NFRuleSet::parse(const UnicodeString& text, ParsePosition& pos, double upperBoun nonNumericalExecutedRuleMask |= 1 << i; Formattable tempResult; - UBool success = nonNumericalRules[i]->doParse(text, workingPos, 0, upperBound, nonNumericalExecutedRuleMask, tempResult); + UBool success = nonNumericalRules[i]->doParse(text, workingPos, 0, upperBound, nonNumericalExecutedRuleMask, recursionCount + 1, tempResult); if (success && (workingPos.getIndex() > highWaterMark.getIndex())) { result = tempResult; highWaterMark = workingPos; @@ -751,7 +765,7 @@ NFRuleSet::parse(const UnicodeString& text, ParsePosition& pos, double upperBoun continue; } Formattable tempResult; - UBool success = rules[i]->doParse(text, workingPos, fIsFractionRuleSet, upperBound, nonNumericalExecutedRuleMask, tempResult); + UBool success = rules[i]->doParse(text, workingPos, fIsFractionRuleSet, upperBound, nonNumericalExecutedRuleMask, recursionCount + 1, tempResult); if (success && workingPos.getIndex() > highWaterMark.getIndex()) { result = tempResult; highWaterMark = workingPos; @@ -825,7 +839,7 @@ int64_t util64_fromDouble(double d) { if (neg) { d = -d; } - result = (int64_t)uprv_floor(d); + result = static_cast<int64_t>(uprv_floor(d)); if (neg) { result = -result; } @@ -860,7 +874,7 @@ static const uint8_t asciiDigits[] = { 0x77u, 0x78u, 0x79u, 0x7au, }; -static const char16_t kUMinus = (char16_t)0x002d; +static const char16_t kUMinus = static_cast<char16_t>(0x002d); #ifdef RBNF_DEBUG static const char kMinus = '-'; @@ -998,15 +1012,15 @@ uint32_t util64_tou(int64_t w, char16_t* buf, uint32_t len, uint32_t radix, UBoo *p++ = kUMinus; --len; } else if (len && (w == 0)) { - *p++ = (char16_t)raw ? 0 : asciiDigits[0]; + *p++ = static_cast<char16_t>(raw) ? 0 : asciiDigits[0]; --len; } while (len && (w != 0)) { int64_t n = w / base; int64_t m = n * base; - int32_t d = (int32_t)(w-m); - *p++ = (char16_t)(raw ? d : asciiDigits[d]); + int32_t d = static_cast<int32_t>(w - m); + *p++ = static_cast<char16_t>(raw ? d : asciiDigits[d]); w = n; --len; } @@ -1014,7 +1028,7 @@ uint32_t util64_tou(int64_t w, char16_t* buf, uint32_t len, uint32_t radix, UBoo *p = 0; // null terminate if room for caller convenience } - len = (uint32_t)(p - buf); + len = static_cast<uint32_t>(p - buf); if (*buf == kUMinus) { ++buf; } diff --git a/deps/icu-small/source/i18n/nfrs.h b/deps/icu-small/source/i18n/nfrs.h index a1beedda17d79e..5e448395f7b6c5 100644 --- a/deps/icu-small/source/i18n/nfrs.h +++ b/deps/icu-small/source/i18n/nfrs.h @@ -55,7 +55,7 @@ class NFRuleSet : public UMemory { void format(int64_t number, UnicodeString& toAppendTo, int32_t pos, int32_t recursionCount, UErrorCode& status) const; void format(double number, UnicodeString& toAppendTo, int32_t pos, int32_t recursionCount, UErrorCode& status) const; - UBool parse(const UnicodeString& text, ParsePosition& pos, double upperBound, uint32_t nonNumericalExecutedRuleMask, Formattable& result) const; + UBool parse(const UnicodeString& text, ParsePosition& pos, double upperBound, uint32_t nonNumericalExecutedRuleMask, int32_t recursionCount, Formattable& result) const; void appendRules(UnicodeString& result) const; // toString diff --git a/deps/icu-small/source/i18n/nfrule.cpp b/deps/icu-small/source/i18n/nfrule.cpp index 1c78e6b1a25e83..264e8d79e2d968 100644 --- a/deps/icu-small/source/i18n/nfrule.cpp +++ b/deps/icu-small/source/i18n/nfrule.cpp @@ -19,6 +19,7 @@ #if U_HAVE_RBNF +#include <limits> #include "unicode/localpointer.h" #include "unicode/rbnf.h" #include "unicode/tblcoll.h" @@ -35,7 +36,7 @@ U_NAMESPACE_BEGIN NFRule::NFRule(const RuleBasedNumberFormat* _rbnf, const UnicodeString &_ruleText, UErrorCode &status) - : baseValue((int32_t)0) + : baseValue(static_cast<int32_t>(0)) , radix(10) , exponent(0) , decimalPoint(0) @@ -116,9 +117,9 @@ NFRule::makeRules(UnicodeString& description, // new it up and initialize its basevalue and divisor // (this also strips the rule descriptor, if any, off the // description string) - NFRule* rule1 = new NFRule(rbnf, description, status); + LocalPointer<NFRule> rule1(new NFRule(rbnf, description, status)); /* test for nullptr */ - if (rule1 == nullptr) { + if (rule1.isNull()) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -144,7 +145,7 @@ NFRule::makeRules(UnicodeString& description, else { // if the description does contain a matched pair of brackets, // then it's really shorthand for two rules (with one exception) - NFRule* rule2 = nullptr; + LocalPointer<NFRule> rule2; UnicodeString sbuf; // we'll actually only split the rule into two rules if its @@ -160,9 +161,9 @@ NFRule::makeRules(UnicodeString& description, // set, they both have the same base value; otherwise, // increment the original rule's base value ("rule1" actually // goes SECOND in the rule set's rule list) - rule2 = new NFRule(rbnf, UnicodeString(), status); + rule2.adoptInstead(new NFRule(rbnf, UnicodeString(), status)); /* test for nullptr */ - if (rule2 == nullptr) { + if (rule2.isNull()) { status = U_MEMORY_ALLOCATION_ERROR; return; } @@ -217,20 +218,20 @@ NFRule::makeRules(UnicodeString& description, // BEFORE rule1 in the list: in all cases, rule2 OMITS the // material in the brackets and rule1 INCLUDES the material // in the brackets) - if (rule2 != nullptr) { + if (!rule2.isNull()) { if (rule2->baseValue >= kNoBase) { - rules.add(rule2); + rules.add(rule2.orphan()); } else { - owner->setNonNumericalRule(rule2); + owner->setNonNumericalRule(rule2.orphan()); } } } if (rule1->baseValue >= kNoBase) { - rules.add(rule1); + rules.add(rule1.orphan()); } else { - owner->setNonNumericalRule(rule1); + owner->setNonNumericalRule(rule1.orphan()); } } @@ -289,7 +290,14 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status) while (p < descriptorLength) { c = descriptor.charAt(p); if (c >= gZero && c <= gNine) { - val = val * ll_10 + (int32_t)(c - gZero); + int32_t single_digit = static_cast<int32_t>(c - gZero); + if ((val > 0 && val > (std::numeric_limits<int64_t>::max() - single_digit) / 10) || + (val < 0 && val < (std::numeric_limits<int64_t>::min() - single_digit) / 10)) { + // out of int64_t range + status = U_PARSE_ERROR; + return; + } + val = val * ll_10 + single_digit; } else if (c == gSlash || c == gGreaterThan) { break; @@ -318,7 +326,7 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status) while (p < descriptorLength) { c = descriptor.charAt(p); if (c >= gZero && c <= gNine) { - val = val * ll_10 + (int32_t)(c - gZero); + val = val * ll_10 + static_cast<int32_t>(c - gZero); } else if (c == gGreaterThan) { break; @@ -335,7 +343,7 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status) // tempValue now contain's the rule's radix. Set it // accordingly, and recalculate the rule's exponent - radix = (int32_t)val; + radix = static_cast<int32_t>(val); if (radix == 0) { // throw new IllegalArgumentException("Rule can't have radix of 0"); status = U_PARSE_ERROR; @@ -581,7 +589,8 @@ NFRule::expectedExponent() const // we get rounding error in some cases-- for example, log 1000 / log 10 // gives us 1.9999999996 instead of 2. The extra logic here is to take // that into account - int16_t tempResult = (int16_t)(uprv_log((double)baseValue) / uprv_log((double)radix)); + int16_t tempResult = static_cast<int16_t>(uprv_log(static_cast<double>(baseValue)) / + uprv_log(static_cast<double>(radix))); int64_t temp = util64_pow(radix, tempResult + 1); if (temp <= baseValue) { tempResult += 1; @@ -764,7 +773,7 @@ NFRule::doFormat(int64_t number, UnicodeString& toInsertInto, int32_t pos, int32 toInsertInto.insert(pos, fRuleText.tempSubString(pluralRuleEnd + 2)); } toInsertInto.insert(pos, - rulePatternFormat->format((int32_t)(number/util64_pow(radix, exponent)), status)); + rulePatternFormat->format(static_cast<int32_t>(number / util64_pow(radix, exponent)), status)); if (pluralRuleStart > 0) { toInsertInto.insert(pos, fRuleText.tempSubString(0, pluralRuleStart)); } @@ -818,7 +827,7 @@ NFRule::doFormat(double number, UnicodeString& toInsertInto, int32_t pos, int32_ else { pluralVal = pluralVal / util64_pow(radix, exponent); } - toInsertInto.insert(pos, rulePatternFormat->format((int32_t)(pluralVal), status)); + toInsertInto.insert(pos, rulePatternFormat->format(static_cast<int32_t>(pluralVal), status)); if (pluralRuleStart > 0) { toInsertInto.insert(pos, fRuleText.tempSubString(0, pluralRuleStart)); } @@ -909,6 +918,7 @@ NFRule::doParse(const UnicodeString& text, UBool isFractionRule, double upperBound, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& resVal) const { // internally we operate on a copy of the string being parsed @@ -998,7 +1008,7 @@ NFRule::doParse(const UnicodeString& text, int highWaterMark = 0; double result = 0; int start = 0; - double tempBaseValue = (double)(baseValue <= 0 ? 0 : baseValue); + double tempBaseValue = static_cast<double>(baseValue <= 0 ? 0 : baseValue); UnicodeString temp; do { @@ -1012,6 +1022,7 @@ NFRule::doParse(const UnicodeString& text, double partialResult = matchToDelimiter(workText, start, tempBaseValue, temp, pp, sub1, nonNumericalExecutedRuleMask, + recursionCount, upperBound); // if we got a successful match (or were trying to match a @@ -1033,6 +1044,7 @@ NFRule::doParse(const UnicodeString& text, partialResult = matchToDelimiter(workText2, 0, partialResult, temp, pp2, sub2, nonNumericalExecutedRuleMask, + recursionCount, upperBound); // if we got a successful match on this second @@ -1170,6 +1182,7 @@ NFRule::matchToDelimiter(const UnicodeString& text, ParsePosition& pp, const NFSubstitution* sub, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, double upperBound) const { UErrorCode status = U_ZERO_ERROR; @@ -1204,6 +1217,7 @@ NFRule::matchToDelimiter(const UnicodeString& text, formatter->isLenient(), #endif nonNumericalExecutedRuleMask, + recursionCount, result); // if the substitution could match all the text up to @@ -1258,6 +1272,7 @@ NFRule::matchToDelimiter(const UnicodeString& text, formatter->isLenient(), #endif nonNumericalExecutedRuleMask, + recursionCount, result); if (success && (tempPP.getIndex() != 0)) { // if there's a successful match (or it's a null diff --git a/deps/icu-small/source/i18n/nfrule.h b/deps/icu-small/source/i18n/nfrule.h index 2ae074cd860094..284d915c9424db 100644 --- a/deps/icu-small/source/i18n/nfrule.h +++ b/deps/icu-small/source/i18n/nfrule.h @@ -57,8 +57,8 @@ class NFRule : public UMemory { bool operator==(const NFRule& rhs) const; bool operator!=(const NFRule& rhs) const { return !operator==(rhs); } - ERuleType getType() const { return (ERuleType)(baseValue <= kNoBase ? (ERuleType)baseValue : kOtherRule); } - void setType(ERuleType ruleType) { baseValue = (int32_t)ruleType; } + ERuleType getType() const { return (baseValue <= kNoBase ? static_cast<ERuleType>(baseValue) : kOtherRule); } + void setType(ERuleType ruleType) { baseValue = static_cast<int32_t>(ruleType); } int64_t getBaseValue() const { return baseValue; } void setBaseValue(int64_t value, UErrorCode& status); @@ -77,6 +77,7 @@ class NFRule : public UMemory { UBool isFractional, double upperBound, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& result) const; UBool shouldRollBack(int64_t number) const; @@ -98,6 +99,7 @@ class NFRule : public UMemory { double matchToDelimiter(const UnicodeString& text, int32_t startPos, double baseValue, const UnicodeString& delimiter, ParsePosition& pp, const NFSubstitution* sub, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, double upperBound) const; void stripPrefix(UnicodeString& text, const UnicodeString& prefix, ParsePosition& pp) const; diff --git a/deps/icu-small/source/i18n/nfsubs.cpp b/deps/icu-small/source/i18n/nfsubs.cpp index ecd3b7b68fc226..e7f2c6335048e4 100644 --- a/deps/icu-small/source/i18n/nfsubs.cpp +++ b/deps/icu-small/source/i18n/nfsubs.cpp @@ -62,7 +62,7 @@ class SameValueSubstitution : public NFSubstitution { virtual double transformNumber(double number) const override { return number; } virtual double composeRuleValue(double newRuleValue, double /*oldRuleValue*/) const override { return newRuleValue; } virtual double calcUpperBound(double oldUpperBound) const override { return oldUpperBound; } - virtual char16_t tokenChar() const override { return (char16_t)0x003d; } // '=' + virtual char16_t tokenChar() const override { return static_cast<char16_t>(0x003d); } // '=' public: static UClassID getStaticClassID(); @@ -132,7 +132,7 @@ class MultiplierSubstitution : public NFSubstitution { virtual double calcUpperBound(double /*oldUpperBound*/) const override { return static_cast<double>(divisor); } - virtual char16_t tokenChar() const override { return (char16_t)0x003c; } // '<' + virtual char16_t tokenChar() const override { return static_cast<char16_t>(0x003c); } // '<' public: static UClassID getStaticClassID(); @@ -175,6 +175,7 @@ class ModulusSubstitution : public NFSubstitution { double upperBound, UBool lenientParse, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& result) const override; virtual double composeRuleValue(double newRuleValue, double oldRuleValue) const override { @@ -185,7 +186,7 @@ class ModulusSubstitution : public NFSubstitution { virtual UBool isModulusSubstitution() const override { return true; } - virtual char16_t tokenChar() const override { return (char16_t)0x003e; } // '>' + virtual char16_t tokenChar() const override { return static_cast<char16_t>(0x003e); } // '>' virtual void toString(UnicodeString& result) const override; @@ -209,7 +210,7 @@ class IntegralPartSubstitution : public NFSubstitution { virtual double transformNumber(double number) const override { return uprv_floor(number); } virtual double composeRuleValue(double newRuleValue, double oldRuleValue) const override { return newRuleValue + oldRuleValue; } virtual double calcUpperBound(double /*oldUpperBound*/) const override { return DBL_MAX; } - virtual char16_t tokenChar() const override { return (char16_t)0x003c; } // '<' + virtual char16_t tokenChar() const override { return static_cast<char16_t>(0x003c); } // '<' public: static UClassID getStaticClassID(); @@ -242,11 +243,12 @@ class FractionalPartSubstitution : public NFSubstitution { double upperBound, UBool lenientParse, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& result) const override; virtual double composeRuleValue(double newRuleValue, double oldRuleValue) const override { return newRuleValue + oldRuleValue; } virtual double calcUpperBound(double /*oldUpperBound*/) const override { return 0.0; } - virtual char16_t tokenChar() const override { return (char16_t)0x003e; } // '>' + virtual char16_t tokenChar() const override { return static_cast<char16_t>(0x003e); } // '>' public: static UClassID getStaticClassID(); @@ -268,7 +270,7 @@ class AbsoluteValueSubstitution : public NFSubstitution { virtual double transformNumber(double number) const override { return uprv_fabs(number); } virtual double composeRuleValue(double newRuleValue, double /*oldRuleValue*/) const override { return -newRuleValue; } virtual double calcUpperBound(double /*oldUpperBound*/) const override { return DBL_MAX; } - virtual char16_t tokenChar() const override { return (char16_t)0x003e; } // '>' + virtual char16_t tokenChar() const override { return static_cast<char16_t>(0x003e); } // '>' public: static UClassID getStaticClassID(); @@ -314,11 +316,12 @@ class NumeratorSubstitution : public NFSubstitution { double upperBound, UBool /*lenientParse*/, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& result) const override; virtual double composeRuleValue(double newRuleValue, double oldRuleValue) const override { return newRuleValue / oldRuleValue; } virtual double calcUpperBound(double /*oldUpperBound*/) const override { return denominator; } - virtual char16_t tokenChar() const override { return (char16_t)0x003c; } // '<' + virtual char16_t tokenChar() const override { return static_cast<char16_t>(0x003c); } // '<' private: static const char16_t LTLT[2]; @@ -365,7 +368,7 @@ NFSubstitution::makeSubstitution(int32_t pos, // if the rule set containing the rule is a fraction // rule set, return a NumeratorSubstitution else if (ruleSet->isFractionRuleSet()) { - return new NumeratorSubstitution(pos, (double)rule->getBaseValue(), + return new NumeratorSubstitution(pos, static_cast<double>(rule->getBaseValue()), formatter->getDefaultRuleSet(), description, status); } @@ -600,7 +603,7 @@ NFSubstitution::doSubstitution(int64_t number, UnicodeString& toInsertInto, int3 // then use that formatter's format() method // to format the result UnicodeString temp; - numberFormat->format(transformNumber((double)number), temp, status); + numberFormat->format(transformNumber(static_cast<double>(number)), temp, status); toInsertInto.insert(_pos + this->pos, temp); } else { @@ -706,6 +709,7 @@ NFSubstitution::doParse(const UnicodeString& text, double upperBound, UBool lenientParse, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& result) const { #ifdef RBNF_DEBUG @@ -726,7 +730,7 @@ NFSubstitution::doParse(const UnicodeString& text, // on), then also try parsing the text using a default- // constructed NumberFormat if (ruleSet != nullptr) { - ruleSet->parse(text, parsePosition, upperBound, nonNumericalExecutedRuleMask, result); + ruleSet->parse(text, parsePosition, upperBound, nonNumericalExecutedRuleMask, recursionCount, result); if (lenientParse && !ruleSet->isFractionRuleSet() && parsePosition.getIndex() == 0) { UErrorCode status = U_ZERO_ERROR; NumberFormat* fmt = NumberFormat::createInstance(status); @@ -949,18 +953,19 @@ ModulusSubstitution::doParse(const UnicodeString& text, double upperBound, UBool lenientParse, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& result) const { // if this isn't a >>> substitution, we can just use the // inherited parse() routine to do the parsing if (ruleToUse == nullptr) { - return NFSubstitution::doParse(text, parsePosition, baseValue, upperBound, lenientParse, nonNumericalExecutedRuleMask, result); + return NFSubstitution::doParse(text, parsePosition, baseValue, upperBound, lenientParse, nonNumericalExecutedRuleMask, recursionCount, result); // but if it IS a >>> substitution, we have to do it here: we // use the specific rule's doParse() method, and then we have to // do some of the other work of NFRuleSet.parse() } else { - ruleToUse->doParse(text, parsePosition, false, upperBound, nonNumericalExecutedRuleMask, result); + ruleToUse->doParse(text, parsePosition, false, upperBound, nonNumericalExecutedRuleMask, recursionCount, result); if (parsePosition.getIndex() != 0) { UErrorCode status = U_ZERO_ERROR; @@ -1031,7 +1036,7 @@ FractionalPartSubstitution::FractionalPartSubstitution(int32_t _pos, } } else { // cast away const - ((NFRuleSet*)getRuleSet())->makeIntoFractionRuleSet(); + const_cast<NFRuleSet*>(getRuleSet())->makeIntoFractionRuleSet(); } } @@ -1103,7 +1108,7 @@ FractionalPartSubstitution::doSubstitution(double number, UnicodeString& toInser if (!pad) { // hack around lack of precision in digitlist. if we would end up with // "foo point" make sure we add a " zero" to the end. - getRuleSet()->format((int64_t)0, toInsertInto, _pos + getPos(), recursionCount, status); + getRuleSet()->format(static_cast<int64_t>(0), toInsertInto, _pos + getPos(), recursionCount, status); } } } @@ -1136,12 +1141,13 @@ FractionalPartSubstitution::doParse(const UnicodeString& text, double /*upperBound*/, UBool lenientParse, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& resVal) const { // if we're not in byDigits mode, we can just use the inherited // doParse() if (!byDigits) { - return NFSubstitution::doParse(text, parsePosition, baseValue, 0, lenientParse, nonNumericalExecutedRuleMask, resVal); + return NFSubstitution::doParse(text, parsePosition, baseValue, 0, lenientParse, nonNumericalExecutedRuleMask, recursionCount, resVal); // if we ARE in byDigits mode, parse the text one digit at a time // using this substitution's owning rule set (we do this by setting @@ -1160,7 +1166,7 @@ FractionalPartSubstitution::doParse(const UnicodeString& text, while (workText.length() > 0 && workPos.getIndex() != 0) { workPos.setIndex(0); Formattable temp; - getRuleSet()->parse(workText, workPos, 10, nonNumericalExecutedRuleMask, temp); + getRuleSet()->parse(workText, workPos, 10, nonNumericalExecutedRuleMask, recursionCount, temp); UErrorCode status = U_ZERO_ERROR; digit = temp.getLong(status); // digit = temp.getType() == Formattable::kLong ? @@ -1240,7 +1246,7 @@ NumeratorSubstitution::doSubstitution(double number, UnicodeString& toInsertInto int32_t len = toInsertInto.length(); while ((nf *= 10) < denominator) { toInsertInto.insert(apos + getPos(), gSpace); - aruleSet->format((int64_t)0, toInsertInto, apos + getPos(), recursionCount, status); + aruleSet->format(static_cast<int64_t>(0), toInsertInto, apos + getPos(), recursionCount, status); } apos += toInsertInto.length() - len; } @@ -1271,6 +1277,7 @@ NumeratorSubstitution::doParse(const UnicodeString& text, double upperBound, UBool /*lenientParse*/, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& result) const { // we don't have to do anything special to do the parsing here, @@ -1289,7 +1296,7 @@ NumeratorSubstitution::doParse(const UnicodeString& text, while (workText.length() > 0 && workPos.getIndex() != 0) { workPos.setIndex(0); - getRuleSet()->parse(workText, workPos, 1, nonNumericalExecutedRuleMask, temp); // parse zero or nothing at all + getRuleSet()->parse(workText, workPos, 1, nonNumericalExecutedRuleMask, recursionCount, temp); // parse zero or nothing at all if (workPos.getIndex() == 0) { // we failed, either there were no more zeros, or the number was formatted with digits // either way, we're done @@ -1306,12 +1313,12 @@ NumeratorSubstitution::doParse(const UnicodeString& text, } workText = text; - workText.remove(0, (int32_t)parsePosition.getIndex()); + workText.remove(0, parsePosition.getIndex()); parsePosition.setIndex(0); } // we've parsed off the zeros, now let's parse the rest from our current position - NFSubstitution::doParse(workText, parsePosition, withZeros ? 1 : baseValue, upperBound, false, nonNumericalExecutedRuleMask, result); + NFSubstitution::doParse(workText, parsePosition, withZeros ? 1 : baseValue, upperBound, false, nonNumericalExecutedRuleMask, recursionCount, result); if (withZeros) { // any base value will do in this case. is there a way to @@ -1329,7 +1336,7 @@ NumeratorSubstitution::doParse(const UnicodeString& text, --zeroCount; } // d is now our true denominator - result.setDouble((double)n/(double)d); + result.setDouble(static_cast<double>(n) / static_cast<double>(d)); } return true; diff --git a/deps/icu-small/source/i18n/nfsubs.h b/deps/icu-small/source/i18n/nfsubs.h index d252f864993168..a14c04459f1acf 100644 --- a/deps/icu-small/source/i18n/nfsubs.h +++ b/deps/icu-small/source/i18n/nfsubs.h @@ -192,6 +192,7 @@ class NFSubstitution : public UObject { double upperBound, UBool lenientParse, uint32_t nonNumericalExecutedRuleMask, + int32_t recursionCount, Formattable& result) const; /** diff --git a/deps/icu-small/source/i18n/nortrans.cpp b/deps/icu-small/source/i18n/nortrans.cpp index e2452cd37c9f70..c57418dfdd2ead 100644 --- a/deps/icu-small/source/i18n/nortrans.cpp +++ b/deps/icu-small/source/i18n/nortrans.cpp @@ -59,8 +59,8 @@ void NormalizationTransliterator::registerIDs() { */ Transliterator* NormalizationTransliterator::_create(const UnicodeString& ID, Token context) { - const char *name = (const char *)context.pointer; - UNormalization2Mode mode = (UNormalization2Mode)uprv_strchr(name, 0)[1]; + const char* name = static_cast<const char*>(context.pointer); + UNormalization2Mode mode = static_cast<UNormalization2Mode>(uprv_strchr(name, 0)[1]); UErrorCode errorCode = U_ZERO_ERROR; const Normalizer2 *norm2 = Normalizer2::getInstance(nullptr, name, mode, errorCode); if(U_SUCCESS(errorCode)) { diff --git a/deps/icu-small/source/i18n/number_capi.cpp b/deps/icu-small/source/i18n/number_capi.cpp index b91a9760e20e22..a35680a6200330 100644 --- a/deps/icu-small/source/i18n/number_capi.cpp +++ b/deps/icu-small/source/i18n/number_capi.cpp @@ -317,11 +317,6 @@ usnum_setMaximumIntegerDigits(USimpleNumber* unumber, int32_t maximumIntegerDigi number->fNumber.setMaximumIntegerDigits(maximumIntegerDigits, *ec); } -U_CAPI void U_EXPORT2 -usnum_truncateStart(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec) { - usnum_setMaximumIntegerDigits(unumber, maximumIntegerDigits, ec); -} - U_CAPI void U_EXPORT2 usnum_setSign(USimpleNumber* unumber, USimpleNumberSign sign, UErrorCode* ec) { auto* number = USimpleNumberData::validate(unumber, *ec); diff --git a/deps/icu-small/source/i18n/number_decimalquantity.cpp b/deps/icu-small/source/i18n/number_decimalquantity.cpp index 227ead4e20b642..f9350d5d5cc8a2 100644 --- a/deps/icu-small/source/i18n/number_decimalquantity.cpp +++ b/deps/icu-small/source/i18n/number_decimalquantity.cpp @@ -1082,7 +1082,7 @@ UnicodeString DecimalQuantity::toScientificString() const { result.append(u'E'); int32_t _scale = upperPos + scale + exponent; if (_scale == INT32_MIN) { - result.append({u"-2147483648", -1}); + result.append(u"-2147483648"); return result; } else if (_scale < 0) { _scale *= -1; @@ -1113,7 +1113,7 @@ int8_t DecimalQuantity::getDigitPos(int32_t position) const { return fBCD.bcdBytes.ptr[position]; } else { if (position < 0 || position >= 16) { return 0; } - return (int8_t) ((fBCD.bcdLong >> (position * 4)) & 0xf); + return static_cast<int8_t>((fBCD.bcdLong >> (position * 4)) & 0xf); } } @@ -1128,7 +1128,7 @@ void DecimalQuantity::setDigitPos(int32_t position, int8_t value) { fBCD.bcdBytes.ptr[position] = value; } else { int shift = position * 4; - fBCD.bcdLong = (fBCD.bcdLong & ~(0xfL << shift)) | ((long) value << shift); + fBCD.bcdLong = (fBCD.bcdLong & ~(0xfL << shift)) | (static_cast<long>(value) << shift); } } diff --git a/deps/icu-small/source/i18n/number_decimfmtprops.h b/deps/icu-small/source/i18n/number_decimfmtprops.h index 6cf4b4c108a2e2..a6b641f5d6cda7 100644 --- a/deps/icu-small/source/i18n/number_decimfmtprops.h +++ b/deps/icu-small/source/i18n/number_decimfmtprops.h @@ -21,16 +21,8 @@ U_NAMESPACE_BEGIN // data member of CurrencyPluralInfoWrapper. // (When building DLLs for Windows this is required.) #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN -#if defined(_MSC_VER) -// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= -#pragma warning(push) -#pragma warning(disable: 4661) -#endif template class U_I18N_API LocalPointerBase<CurrencyPluralInfo>; template class U_I18N_API LocalPointer<CurrencyPluralInfo>; -#if defined(_MSC_VER) -#pragma warning(pop) -#endif #endif namespace number::impl { diff --git a/deps/icu-small/source/i18n/number_grouping.cpp b/deps/icu-small/source/i18n/number_grouping.cpp index 54aeffee811de3..4ad16df2a298b5 100644 --- a/deps/icu-small/source/i18n/number_grouping.cpp +++ b/deps/icu-small/source/i18n/number_grouping.cpp @@ -78,7 +78,7 @@ void Grouper::setLocaleData(const impl::ParsedPatternInfo &patternInfo, const Lo auto grouping2 = static_cast<int16_t> ((patternInfo.positive.groupingSizes >> 16) & 0xffff); auto grouping3 = static_cast<int16_t> ((patternInfo.positive.groupingSizes >> 32) & 0xffff); if (grouping2 == -1) { - grouping1 = fGrouping1 == -4 ? (short) 3 : (short) -1; + grouping1 = fGrouping1 == -4 ? static_cast<short>(3) : static_cast<short>(-1); } if (grouping3 == -1) { grouping2 = grouping1; diff --git a/deps/icu-small/source/i18n/number_longnames.cpp b/deps/icu-small/source/i18n/number_longnames.cpp index 4ef4efd701aff9..de6aad7c3e8af7 100644 --- a/deps/icu-small/source/i18n/number_longnames.cpp +++ b/deps/icu-small/source/i18n/number_longnames.cpp @@ -9,6 +9,8 @@ #include "unicode/simpleformatter.h" #include "unicode/ures.h" +#include "unicode/plurrule.h" +#include "unicode/strenum.h" #include "ureslocs.h" #include "charstr.h" #include "uresimp.h" @@ -18,6 +20,7 @@ #include <algorithm> #include "cstring.h" #include "util.h" +#include "sharedpluralrules.h" using namespace icu; using namespace icu::number; @@ -519,10 +522,35 @@ void getCurrencyLongNameData(const Locale &locale, const CurrencyUnit ¤cy, // In ICU4J, this method gets a CurrencyData from CurrencyData.provider. // TODO(ICU4J): Implement this without going through CurrencyData, like in ICU4C? PluralTableSink sink(outArray); + // Here all outArray entries are bogus. LocalUResourceBundlePointer unitsBundle(ures_open(U_ICUDATA_CURR, locale.getName(), &status)); if (U_FAILURE(status)) { return; } ures_getAllChildrenWithFallback(unitsBundle.getAlias(), "CurrencyUnitPatterns", sink, status); if (U_FAILURE(status)) { return; } + // Here the outArray[] entries are filled in with any CurrencyUnitPatterns data for locale, + // or if there is no CurrencyUnitPatterns data for locale since the patterns all inherited + // from the "other" pattern in root (which is true for many locales in CLDR 46), then only + // the "other" entry has a currency pattern. So now what we do is: For all valid plural keywords + // for the locale, if the corresponding outArray[] entry is bogus, fill it in from the "other" + // entry. In the longer run, clients of this should instead consider using CurrencyPluralInfo + // (see i18n/unicode/currpinf.h). + UErrorCode localStatus = U_ZERO_ERROR; + const SharedPluralRules *pr = PluralRules::createSharedInstance( + locale, UPLURAL_TYPE_CARDINAL, localStatus); + if (U_SUCCESS(localStatus)) { + LocalPointer<StringEnumeration> keywords((*pr)->getKeywords(localStatus), localStatus); + if (U_SUCCESS(localStatus)) { + const char* keyword; + while (((keyword = keywords->next(nullptr, localStatus)) != nullptr) && U_SUCCESS(localStatus)) { + int32_t index = StandardPlural::indexOrOtherIndexFromString(keyword); + if (index != StandardPlural::Form::OTHER && outArray[index].isBogus()) { + outArray[index].setTo(outArray[StandardPlural::Form::OTHER]); + } + } + } + pr->removeRef(); + } + for (int32_t i = 0; i < StandardPlural::Form::COUNT; i++) { UnicodeString &pattern = outArray[i]; if (pattern.isBogus()) { @@ -1481,9 +1509,8 @@ LongNameHandler* LongNameHandler::forCurrencyLongNames(const Locale &loc, const const PluralRules *rules, const MicroPropsGenerator *parent, UErrorCode &status) { - auto* result = new LongNameHandler(rules, parent); - if (result == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; + LocalPointer<LongNameHandler> result(new LongNameHandler(rules, parent), status); + if (U_FAILURE(status)) { return nullptr; } UnicodeString simpleFormats[ARRAY_LENGTH]; @@ -1491,7 +1518,7 @@ LongNameHandler* LongNameHandler::forCurrencyLongNames(const Locale &loc, const if (U_FAILURE(status)) { return nullptr; } result->simpleFormatsToModifiers(simpleFormats, {UFIELD_CATEGORY_NUMBER, UNUM_CURRENCY_FIELD}, status); // TODO(icu-units#28): currency gender? - return result; + return result.orphan(); } void LongNameHandler::simpleFormatsToModifiers(const UnicodeString *simpleFormats, Field field, diff --git a/deps/icu-small/source/i18n/number_patternmodifier.h b/deps/icu-small/source/i18n/number_patternmodifier.h index 4cae160049d422..f8c66ef92fc7b2 100644 --- a/deps/icu-small/source/i18n/number_patternmodifier.h +++ b/deps/icu-small/source/i18n/number_patternmodifier.h @@ -21,16 +21,8 @@ U_NAMESPACE_BEGIN // data member of AdoptingModifierStore. // (When building DLLs for Windows this is required.) #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN -#if defined(_MSC_VER) -// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= -#pragma warning(push) -#pragma warning(disable : 4661) -#endif template class U_I18N_API LocalPointerBase<number::impl::AdoptingModifierStore>; template class U_I18N_API LocalPointer<number::impl::AdoptingModifierStore>; -#if defined(_MSC_VER) -#pragma warning(pop) -#endif #endif namespace number::impl { diff --git a/deps/icu-small/source/i18n/number_simple.cpp b/deps/icu-small/source/i18n/number_simple.cpp index 7daeb66dc2afba..4d8706d9bd07a0 100644 --- a/deps/icu-small/source/i18n/number_simple.cpp +++ b/deps/icu-small/source/i18n/number_simple.cpp @@ -108,10 +108,6 @@ void SimpleNumber::setMaximumIntegerDigits(uint32_t position, UErrorCode& status fData->quantity.applyMaxInteger(position); } -void SimpleNumber::truncateStart(uint32_t position, UErrorCode& status) { - setMaximumIntegerDigits(position, status); -} - void SimpleNumber::setSign(USimpleNumberSign sign, UErrorCode& status) { if (U_FAILURE(status)) { return; diff --git a/deps/icu-small/source/i18n/number_usageprefs.cpp b/deps/icu-small/source/i18n/number_usageprefs.cpp index 6f7fdaa9dcaddb..5c15c1cc3fb8bd 100644 --- a/deps/icu-small/source/i18n/number_usageprefs.cpp +++ b/deps/icu-small/source/i18n/number_usageprefs.cpp @@ -49,7 +49,7 @@ StringProp &StringProp::operator=(const StringProp &other) { // copying an errored StringProp. return *this; } - fValue = (char *)uprv_malloc(other.fLength + 1); + fValue = static_cast<char*>(uprv_malloc(other.fLength + 1)); if (fValue == nullptr) { fError = U_MEMORY_ALLOCATION_ERROR; return *this; @@ -96,7 +96,7 @@ void StringProp::set(StringPiece value) { fValue = nullptr; } fLength = value.length(); - fValue = (char *)uprv_malloc(fLength + 1); + fValue = static_cast<char*>(uprv_malloc(fLength + 1)); if (fValue == nullptr) { fLength = 0; fError = U_MEMORY_ALLOCATION_ERROR; diff --git a/deps/icu-small/source/i18n/number_usageprefs.h b/deps/icu-small/source/i18n/number_usageprefs.h index 9aebc3140cdd00..921c1a8e015c0b 100644 --- a/deps/icu-small/source/i18n/number_usageprefs.h +++ b/deps/icu-small/source/i18n/number_usageprefs.h @@ -70,16 +70,8 @@ class U_I18N_API UsagePrefsHandler : public MicroPropsGenerator, public UMemory // Note: These need to be outside of the number::impl namespace, or Clang will // generate a compile error. #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN -#if defined(_MSC_VER) -// Ignore warning 4661 as LocalPointerBase does not use operator== or operator!= -#pragma warning(push) -#pragma warning(disable: 4661) -#endif template class U_I18N_API LocalPointerBase<ComplexUnitsConverter>; template class U_I18N_API LocalPointer<ComplexUnitsConverter>; -#if defined(_MSC_VER) -#pragma warning(pop) -#endif #endif namespace number::impl { diff --git a/deps/icu-small/source/i18n/numfmt.cpp b/deps/icu-small/source/i18n/numfmt.cpp index 74689e1363a829..7c877a33ab8450 100644 --- a/deps/icu-small/source/i18n/numfmt.cpp +++ b/deps/icu-small/source/i18n/numfmt.cpp @@ -661,7 +661,7 @@ NumberFormat::format(int64_t number, FieldPosition& pos) const { // default so we don't introduce a new abstract method - return format((int32_t)number, appendTo, pos); + return format(static_cast<int32_t>(number), appendTo, pos); } // ------------------------------------- @@ -861,7 +861,7 @@ class ICUNumberFormatFactory : public ICUResourceBundleFactory { virtual ~ICUNumberFormatFactory(); protected: virtual UObject* handleCreate(const Locale& loc, int32_t kind, const ICUService* /* service */, UErrorCode& status) const override { - return NumberFormat::makeInstance(loc, (UNumberFormatStyle)kind, status); + return NumberFormat::makeInstance(loc, static_cast<UNumberFormatStyle>(kind), status); } }; @@ -893,7 +893,7 @@ class NFFactory : public LocaleKeyFactory { lkey->canonicalLocale(loc); int32_t kind = lkey->kind(); - UObject* result = _delegate->createFormat(loc, (UNumberFormatStyle)kind); + UObject* result = _delegate->createFormat(loc, static_cast<UNumberFormatStyle>(kind)); if (result == nullptr) { result = service->getKey(const_cast<ICUServiceKey&>(key) /* cast away const */, nullptr, this, status); } @@ -914,7 +914,7 @@ class NFFactory : public LocaleKeyFactory { if (!_ids) { int32_t count = 0; const UnicodeString * const idlist = _delegate->getSupportedIDs(count, status); - ((NFFactory*)this)->_ids = new Hashtable(status); /* cast away const */ + const_cast<NFFactory*>(this)->_ids = new Hashtable(status); /* cast away const */ if (_ids) { for (int i = 0; i < count; ++i) { _ids->put(idlist[i], (void*)this, status); @@ -954,7 +954,7 @@ class ICUNumberFormatService : public ICULocaleService { int32_t kind = lkey->kind(); Locale loc; lkey->currentLocale(loc); - return NumberFormat::makeInstance(loc, (UNumberFormatStyle)kind, status); + return NumberFormat::makeInstance(loc, static_cast<UNumberFormatStyle>(kind), status); } virtual UBool isDefault() const override { @@ -1216,7 +1216,7 @@ void NumberFormat::setContext(UDisplayContext value, UErrorCode& status) { if (U_FAILURE(status)) return; - if ( (UDisplayContextType)((uint32_t)value >> 8) == UDISPCTX_TYPE_CAPITALIZATION ) { + if (static_cast<UDisplayContextType>(static_cast<uint32_t>(value) >> 8) == UDISPCTX_TYPE_CAPITALIZATION) { fCapitalizationContext = value; } else { status = U_ILLEGAL_ARGUMENT_ERROR; @@ -1227,10 +1227,10 @@ void NumberFormat::setContext(UDisplayContext value, UErrorCode& status) UDisplayContext NumberFormat::getContext(UDisplayContextType type, UErrorCode& status) const { if (U_FAILURE(status)) - return (UDisplayContext)0; + return static_cast<UDisplayContext>(0); if (type != UDISPCTX_TYPE_CAPITALIZATION) { status = U_ILLEGAL_ARGUMENT_ERROR; - return (UDisplayContext)0; + return static_cast<UDisplayContext>(0); } return fCapitalizationContext; } @@ -1378,7 +1378,7 @@ NumberFormat::makeInstance(const Locale& desiredLocale, static UMutex nscacheMutex; Mutex lock(&nscacheMutex); - ns = (NumberingSystem *)uhash_iget(NumberingSystem_cache, hashKey); + ns = static_cast<NumberingSystem*>(uhash_iget(NumberingSystem_cache, hashKey)); if (ns == nullptr) { ns = NumberingSystem::createInstance(desiredLocale,status); uhash_iput(NumberingSystem_cache, hashKey, (void*)ns, &status); diff --git a/deps/icu-small/source/i18n/numrange_fluent.cpp b/deps/icu-small/source/i18n/numrange_fluent.cpp index e03701788ca88f..a02ae5b9c2c1f9 100644 --- a/deps/icu-small/source/i18n/numrange_fluent.cpp +++ b/deps/icu-small/source/i18n/numrange_fluent.cpp @@ -313,9 +313,8 @@ FormattedNumberRange LocalizedNumberRangeFormatter::formatFormattableRange( return FormattedNumberRange(U_ILLEGAL_ARGUMENT_ERROR); } - auto* results = new UFormattedNumberRangeData(); - if (results == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; + LocalPointer<UFormattedNumberRangeData> results(new UFormattedNumberRangeData(), status); + if (U_FAILURE(status)) { return FormattedNumberRange(status); } @@ -333,9 +332,8 @@ FormattedNumberRange LocalizedNumberRangeFormatter::formatFormattableRange( // Do not save the results object if we encountered a failure. if (U_SUCCESS(status)) { - return FormattedNumberRange(results); + return FormattedNumberRange(results.orphan()); } else { - delete results; return FormattedNumberRange(status); } } @@ -373,13 +371,8 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const { } // Try computing the formatter on our own - auto* temp = new NumberRangeFormatterImpl(fMacros, status); + LocalPointer<NumberRangeFormatterImpl> temp(new NumberRangeFormatterImpl(fMacros, status), status); if (U_FAILURE(status)) { - delete temp; - return nullptr; - } - if (temp == nullptr) { - status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } @@ -387,13 +380,12 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const { // it is set to what is actually stored in the atomic // if another thread beat us to computing the formatter object. auto* nonConstThis = const_cast<LocalizedNumberRangeFormatter*>(this); - if (!nonConstThis->fAtomicFormatter.compare_exchange_strong(ptr, temp)) { + if (!nonConstThis->fAtomicFormatter.compare_exchange_strong(ptr, temp.getAlias())) { // Another thread beat us to computing the formatter - delete temp; return ptr; } else { // Our copy of the formatter got stored in the atomic - return temp; + return temp.orphan(); } } diff --git a/deps/icu-small/source/i18n/numsys.cpp b/deps/icu-small/source/i18n/numsys.cpp index 4fb1b5af3710cf..3123a5c8da3937 100644 --- a/deps/icu-small/source/i18n/numsys.cpp +++ b/deps/icu-small/source/i18n/numsys.cpp @@ -258,7 +258,7 @@ void NumberingSystem::setDesc(const UnicodeString &d) { } void NumberingSystem::setName(const char *n) { if ( n == nullptr ) { - name[0] = (char) 0; + name[0] = static_cast<char>(0); } else { uprv_strncpy(name,n,kInternalNumSysNameCapacity); name[kInternalNumSysNameCapacity] = '\0'; // Make sure it is null terminated. @@ -337,7 +337,7 @@ NumsysNameEnumeration::NumsysNameEnumeration(UErrorCode& status) : pos(0) { const UnicodeString* NumsysNameEnumeration::snext(UErrorCode& status) { if (U_SUCCESS(status) && (gNumsysNames != nullptr) && (pos < gNumsysNames->size())) { - return (const UnicodeString*)gNumsysNames->elementAt(pos++); + return static_cast<const UnicodeString*>(gNumsysNames->elementAt(pos++)); } return nullptr; } diff --git a/deps/icu-small/source/i18n/olsontz.cpp b/deps/icu-small/source/i18n/olsontz.cpp index 924502f5371d70..9d9770dd4224e4 100644 --- a/deps/icu-small/source/i18n/olsontz.cpp +++ b/deps/icu-small/source/i18n/olsontz.cpp @@ -181,7 +181,7 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top, if (U_SUCCESS(ec) && (len < 2 || len > 0x7FFE || (len & 1) != 0)) { ec = U_INVALID_FORMAT_ERROR; } - typeCount = (int16_t) len >> 1; + typeCount = static_cast<int16_t>(len) >> 1; // Type map data must be of the same size as the transition count typeMapData = nullptr; @@ -212,12 +212,12 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top, finalZone = new SimpleTimeZone( ruleRaw * U_MILLIS_PER_SECOND, emptyStr, - (int8_t)ruleData[0], (int8_t)ruleData[1], (int8_t)ruleData[2], + static_cast<int8_t>(ruleData[0]), static_cast<int8_t>(ruleData[1]), static_cast<int8_t>(ruleData[2]), ruleData[3] * U_MILLIS_PER_SECOND, - (SimpleTimeZone::TimeMode) ruleData[4], - (int8_t)ruleData[5], (int8_t)ruleData[6], (int8_t)ruleData[7], + static_cast<SimpleTimeZone::TimeMode>(ruleData[4]), + static_cast<int8_t>(ruleData[5]), static_cast<int8_t>(ruleData[6]), static_cast<int8_t>(ruleData[7]), ruleData[8] * U_MILLIS_PER_SECOND, - (SimpleTimeZone::TimeMode) ruleData[9], + static_cast<SimpleTimeZone::TimeMode>(ruleData[9]), ruleData[10] * U_MILLIS_PER_SECOND, ec); if (finalZone == nullptr) { ec = U_MEMORY_ALLOCATION_ERROR; @@ -379,7 +379,7 @@ int32_t OlsonTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, } // Compute local epoch millis from input fields - UDate date = (UDate)(Grego::fieldsToDay(year, month, dom) * U_MILLIS_PER_DAY + millis); + UDate date = static_cast<UDate>(Grego::fieldsToDay(year, month, dom) * U_MILLIS_PER_DAY + millis); int32_t rawoff, dstoff; getHistoricalOffset(date, true, kDaylight, kStandard, rawoff, dstoff); return rawoff + dstoff; @@ -451,18 +451,18 @@ OlsonTimeZone::transitionTimeInSeconds(int16_t transIdx) const { U_ASSERT(transIdx >= 0 && transIdx < transitionCount()); if (transIdx < transitionCountPre32) { - return (((int64_t)((uint32_t)transitionTimesPre32[transIdx << 1])) << 32) - | ((int64_t)((uint32_t)transitionTimesPre32[(transIdx << 1) + 1])); + return (static_cast<int64_t>(static_cast<uint32_t>(transitionTimesPre32[transIdx << 1])) << 32) + | static_cast<int64_t>(static_cast<uint32_t>(transitionTimesPre32[(transIdx << 1) + 1])); } transIdx -= transitionCountPre32; if (transIdx < transitionCount32) { - return (int64_t)transitionTimes32[transIdx]; + return static_cast<int64_t>(transitionTimes32[transIdx]); } transIdx -= transitionCount32; - return (((int64_t)((uint32_t)transitionTimesPost32[transIdx << 1])) << 32) - | ((int64_t)((uint32_t)transitionTimesPost32[(transIdx << 1) + 1])); + return (static_cast<int64_t>(static_cast<uint32_t>(transitionTimesPost32[transIdx << 1])) << 32) + | static_cast<int64_t>(static_cast<uint32_t>(transitionTimesPost32[(transIdx << 1) + 1])); } // Maximum absolute offset in seconds (86400 seconds = 1 day) @@ -569,7 +569,10 @@ UBool OlsonTimeZone::useDaylightTime() const { } int32_t year, month, dom, dow, doy, mid; - Grego::timeToFields(current, year, month, dom, dow, doy, mid); + UErrorCode status = U_ZERO_ERROR; + Grego::timeToFields(current, year, month, dom, dow, doy, mid, status); + U_ASSERT(U_SUCCESS(status)); + if (U_FAILURE(status)) return false; // If error, just return false. // Find start of this year, and start of next year double start = Grego::fieldsToDay(year, 0, 1) * SECONDS_PER_DAY; @@ -578,7 +581,7 @@ UBool OlsonTimeZone::useDaylightTime() const { // Return true if DST is observed at any time during the current // year. for (int16_t i = 0; i < transitionCount(); ++i) { - double transition = (double)transitionTimeInSeconds(i); + double transition = static_cast<double>(transitionTimeInSeconds(i)); if (transition >= limit) { break; } @@ -736,7 +739,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) { // Actually no transitions... } else { // Build historic rule array - UDate* times = (UDate*)uprv_malloc(sizeof(UDate)*transCount); /* large enough to store all transition times */ + UDate* times = static_cast<UDate*>(uprv_malloc(sizeof(UDate) * transCount)); /* large enough to store all transition times */ if (times == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; deleteTransitionRules(); @@ -746,8 +749,8 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) { // Gather all start times for each pair of offsets int32_t nTimes = 0; for (transitionIdx = firstTZTransitionIdx; transitionIdx < transCount; transitionIdx++) { - if (typeIdx == (int16_t)typeMapData[transitionIdx]) { - UDate tt = (UDate)transitionTime(transitionIdx); + if (typeIdx == static_cast<int16_t>(typeMapData[transitionIdx])) { + UDate tt = static_cast<UDate>(transitionTime(transitionIdx)); if (finalZone == nullptr || tt <= finalStartMillis) { // Exclude transitions after finalMillis times[nTimes++] = tt; @@ -760,7 +763,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) { dst = typeOffsets[(typeIdx << 1) + 1] * U_MILLIS_PER_SECOND; if (historicRules == nullptr) { historicRuleCount = typeCount; - historicRules = (TimeArrayTimeZoneRule**)uprv_malloc(sizeof(TimeArrayTimeZoneRule*)*historicRuleCount); + historicRules = static_cast<TimeArrayTimeZoneRule**>(uprv_malloc(sizeof(TimeArrayTimeZoneRule*) * historicRuleCount)); if (historicRules == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; deleteTransitionRules(); @@ -785,8 +788,8 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) { uprv_free(times); // Create initial transition - typeIdx = (int16_t)typeMapData[firstTZTransitionIdx]; - firstTZTransition = new TimeZoneTransition((UDate)transitionTime(firstTZTransitionIdx), + typeIdx = static_cast<int16_t>(typeMapData[firstTZTransitionIdx]); + firstTZTransition = new TimeZoneTransition(static_cast<UDate>(transitionTime(firstTZTransitionIdx)), *initialRule, *historicRules[typeIdx]); // Check to make sure firstTZTransition was created. if (firstTZTransition == nullptr) { @@ -798,7 +801,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) { } if (finalZone != nullptr) { // Get the first occurrence of final rule starts - UDate startTime = (UDate)finalStartMillis; + UDate startTime = static_cast<UDate>(finalStartMillis); TimeZoneRule *firstFinalRule = nullptr; if (finalZone->useDaylightTime()) { @@ -895,7 +898,7 @@ OlsonTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition int16_t transCount = transitionCount(); int16_t ttidx = transCount - 1; for (; ttidx >= firstTZTransitionIdx; ttidx--) { - UDate t = (UDate)transitionTime(ttidx); + UDate t = static_cast<UDate>(transitionTime(ttidx)); if (base > t || (!inclusive && base == t)) { break; } @@ -914,7 +917,7 @@ OlsonTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition // Create a TimeZoneTransition TimeZoneRule *to = historicRules[typeMapData[ttidx + 1]]; TimeZoneRule *from = historicRules[typeMapData[ttidx]]; - UDate startTime = (UDate)transitionTime(ttidx+1); + UDate startTime = static_cast<UDate>(transitionTime(ttidx + 1)); // The transitions loaded from zoneinfo.res may contain non-transition data UnicodeString fromName, toName; @@ -960,7 +963,7 @@ OlsonTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransi // Find a historical transition int16_t ttidx = transitionCount() - 1; for (; ttidx >= firstTZTransitionIdx; ttidx--) { - UDate t = (UDate)transitionTime(ttidx); + UDate t = static_cast<UDate>(transitionTime(ttidx)); if (base > t || (inclusive && base == t)) { break; } @@ -975,7 +978,7 @@ OlsonTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransi // Create a TimeZoneTransition TimeZoneRule *to = historicRules[typeMapData[ttidx]]; TimeZoneRule *from = historicRules[typeMapData[ttidx-1]]; - UDate startTime = (UDate)transitionTime(ttidx); + UDate startTime = static_cast<UDate>(transitionTime(ttidx)); // The transitions loaded from zoneinfo.res may contain non-transition data UnicodeString fromName, toName; diff --git a/deps/icu-small/source/i18n/olsontz.h b/deps/icu-small/source/i18n/olsontz.h index 9fe0d5dfed1ba9..1ca0455ee18a62 100644 --- a/deps/icu-small/source/i18n/olsontz.h +++ b/deps/icu-small/source/i18n/olsontz.h @@ -410,7 +410,7 @@ OlsonTimeZone::transitionCount() const { inline double OlsonTimeZone::transitionTime(int16_t transIdx) const { - return (double)transitionTimeInSeconds(transIdx) * U_MILLIS_PER_SECOND; + return static_cast<double>(transitionTimeInSeconds(transIdx)) * U_MILLIS_PER_SECOND; } inline int32_t diff --git a/deps/icu-small/source/i18n/persncal.cpp b/deps/icu-small/source/i18n/persncal.cpp index c97a32197acaa0..31f7ae252b5e8a 100644 --- a/deps/icu-small/source/i18n/persncal.cpp +++ b/deps/icu-small/source/i18n/persncal.cpp @@ -217,7 +217,8 @@ int32_t PersianCalendar::handleGetExtendedYear(UErrorCode& status) { * method is called. */ void PersianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { - int64_t daysSinceEpoch = julianDay - PERSIAN_EPOCH; + int64_t daysSinceEpoch = julianDay; + daysSinceEpoch -= PERSIAN_EPOCH; int64_t year = ClockMath::floorDivideInt64( 33LL * daysSinceEpoch + 3LL, 12053LL) + 1LL; if (year > INT32_MAX || year < INT32_MIN) { diff --git a/deps/icu-small/source/i18n/plurfmt.cpp b/deps/icu-small/source/i18n/plurfmt.cpp index 7b225bcc8aa399..8effc71dff6228 100644 --- a/deps/icu-small/source/i18n/plurfmt.cpp +++ b/deps/icu-small/source/i18n/plurfmt.cpp @@ -234,7 +234,7 @@ PluralFormat::format(int32_t number, UnicodeString& appendTo, FieldPosition& pos, UErrorCode& status) const { - return format(Formattable(number), (double)number, appendTo, pos, status); + return format(Formattable(number), static_cast<double>(number), appendTo, pos, status); } UnicodeString& @@ -242,7 +242,7 @@ PluralFormat::format(double number, UnicodeString& appendTo, FieldPosition& pos, UErrorCode& status) const { - return format(Formattable(number), (double)number, appendTo, pos, status); + return format(Formattable(number), number, appendTo, pos, status); } UnicodeString& diff --git a/deps/icu-small/source/i18n/plurrule.cpp b/deps/icu-small/source/i18n/plurrule.cpp index 2ded25d600644d..cfb50a83fbbab5 100644 --- a/deps/icu-small/source/i18n/plurrule.cpp +++ b/deps/icu-small/source/i18n/plurrule.cpp @@ -1599,7 +1599,7 @@ PluralKeywordEnumeration::PluralKeywordEnumeration(RuleChain *header, UErrorCode const UnicodeString* PluralKeywordEnumeration::snext(UErrorCode& status) { if (U_SUCCESS(status) && pos < fKeywordNames.size()) { - return (const UnicodeString*)fKeywordNames.elementAt(pos++); + return static_cast<const UnicodeString*>(fKeywordNames.elementAt(pos++)); } return nullptr; } @@ -1783,7 +1783,7 @@ void FixedDecimal::init(double n, int32_t v, int64_t f, int32_t e, int32_t c) { intValue = 0; _hasIntegerValue = false; } else { - intValue = (int64_t)source; + intValue = static_cast<int64_t>(source); _hasIntegerValue = (source == intValue); } @@ -1867,17 +1867,17 @@ int64_t FixedDecimal::getFractionalDigits(double n, int32_t v) { n = fabs(n); double fract = n - floor(n); switch (v) { - case 1: return (int64_t)(fract*10.0 + 0.5); - case 2: return (int64_t)(fract*100.0 + 0.5); - case 3: return (int64_t)(fract*1000.0 + 0.5); + case 1: return static_cast<int64_t>(fract * 10.0 + 0.5); + case 2: return static_cast<int64_t>(fract * 100.0 + 0.5); + case 3: return static_cast<int64_t>(fract * 1000.0 + 0.5); default: - double scaled = floor(fract * pow(10.0, (double)v) + 0.5); + double scaled = floor(fract * pow(10.0, static_cast<double>(v)) + 0.5); if (scaled >= static_cast<double>(U_INT64_MAX)) { // Note: a double cannot accurately represent U_INT64_MAX. Casting it to double // will round up to the next representable value, which is U_INT64_MAX + 1. return U_INT64_MAX; } else { - return (int64_t)scaled; + return static_cast<int64_t>(scaled); } } } @@ -1902,7 +1902,7 @@ void FixedDecimal::adjustForMinFractionDigits(int32_t minFractionDigits) { double FixedDecimal::getPluralOperand(PluralOperand operand) const { switch(operand) { case PLURAL_OPERAND_N: return (exponent == 0 ? source : source * pow(10.0, exponent)); - case PLURAL_OPERAND_I: return (double) longValue(); + case PLURAL_OPERAND_I: return static_cast<double>(longValue()); case PLURAL_OPERAND_F: return static_cast<double>(decimalDigits); case PLURAL_OPERAND_T: return static_cast<double>(decimalDigitsWithoutTrailingZeros); case PLURAL_OPERAND_V: return visibleDecimalDigitCount; @@ -1959,7 +1959,7 @@ int64_t FixedDecimal::longValue() const { if (exponent == 0) { return intValue; } else { - return (long) (pow(10.0, exponent) * intValue); + return static_cast<long>(pow(10.0, exponent) * intValue); } } diff --git a/deps/icu-small/source/i18n/plurrule_impl.h b/deps/icu-small/source/i18n/plurrule_impl.h index 4de6d6460aaa19..e57f931af3c45d 100644 --- a/deps/icu-small/source/i18n/plurrule_impl.h +++ b/deps/icu-small/source/i18n/plurrule_impl.h @@ -50,67 +50,67 @@ namespace pluralimpl { // TODO: Remove this and replace with u"" literals. Was for EBCDIC compatibility. -static const char16_t DOT = ((char16_t) 0x002E); -static const char16_t SINGLE_QUOTE = ((char16_t) 0x0027); -static const char16_t SLASH = ((char16_t) 0x002F); -static const char16_t BACKSLASH = ((char16_t) 0x005C); -static const char16_t SPACE = ((char16_t) 0x0020); -static const char16_t EXCLAMATION = ((char16_t) 0x0021); -static const char16_t QUOTATION_MARK = ((char16_t) 0x0022); -static const char16_t NUMBER_SIGN = ((char16_t) 0x0023); -static const char16_t PERCENT_SIGN = ((char16_t) 0x0025); -static const char16_t ASTERISK = ((char16_t) 0x002A); -static const char16_t COMMA = ((char16_t) 0x002C); -static const char16_t HYPHEN = ((char16_t) 0x002D); -static const char16_t U_ZERO = ((char16_t) 0x0030); -static const char16_t U_ONE = ((char16_t) 0x0031); -static const char16_t U_TWO = ((char16_t) 0x0032); -static const char16_t U_THREE = ((char16_t) 0x0033); -static const char16_t U_FOUR = ((char16_t) 0x0034); -static const char16_t U_FIVE = ((char16_t) 0x0035); -static const char16_t U_SIX = ((char16_t) 0x0036); -static const char16_t U_SEVEN = ((char16_t) 0x0037); -static const char16_t U_EIGHT = ((char16_t) 0x0038); -static const char16_t U_NINE = ((char16_t) 0x0039); -static const char16_t COLON = ((char16_t) 0x003A); -static const char16_t SEMI_COLON = ((char16_t) 0x003B); -static const char16_t EQUALS = ((char16_t) 0x003D); -static const char16_t AT = ((char16_t) 0x0040); -static const char16_t CAP_A = ((char16_t) 0x0041); -static const char16_t CAP_B = ((char16_t) 0x0042); -static const char16_t CAP_R = ((char16_t) 0x0052); -static const char16_t CAP_Z = ((char16_t) 0x005A); -static const char16_t LOWLINE = ((char16_t) 0x005F); -static const char16_t LEFTBRACE = ((char16_t) 0x007B); -static const char16_t RIGHTBRACE = ((char16_t) 0x007D); -static const char16_t TILDE = ((char16_t) 0x007E); -static const char16_t ELLIPSIS = ((char16_t) 0x2026); - -static const char16_t LOW_A = ((char16_t) 0x0061); -static const char16_t LOW_B = ((char16_t) 0x0062); -static const char16_t LOW_C = ((char16_t) 0x0063); -static const char16_t LOW_D = ((char16_t) 0x0064); -static const char16_t LOW_E = ((char16_t) 0x0065); -static const char16_t LOW_F = ((char16_t) 0x0066); -static const char16_t LOW_G = ((char16_t) 0x0067); -static const char16_t LOW_H = ((char16_t) 0x0068); -static const char16_t LOW_I = ((char16_t) 0x0069); -static const char16_t LOW_J = ((char16_t) 0x006a); -static const char16_t LOW_K = ((char16_t) 0x006B); -static const char16_t LOW_L = ((char16_t) 0x006C); -static const char16_t LOW_M = ((char16_t) 0x006D); -static const char16_t LOW_N = ((char16_t) 0x006E); -static const char16_t LOW_O = ((char16_t) 0x006F); -static const char16_t LOW_P = ((char16_t) 0x0070); -static const char16_t LOW_Q = ((char16_t) 0x0071); -static const char16_t LOW_R = ((char16_t) 0x0072); -static const char16_t LOW_S = ((char16_t) 0x0073); -static const char16_t LOW_T = ((char16_t) 0x0074); -static const char16_t LOW_U = ((char16_t) 0x0075); -static const char16_t LOW_V = ((char16_t) 0x0076); -static const char16_t LOW_W = ((char16_t) 0x0077); -static const char16_t LOW_Y = ((char16_t) 0x0079); -static const char16_t LOW_Z = ((char16_t) 0x007A); +static const char16_t DOT = static_cast<char16_t>(0x002E); +static const char16_t SINGLE_QUOTE = static_cast<char16_t>(0x0027); +static const char16_t SLASH = static_cast<char16_t>(0x002F); +static const char16_t BACKSLASH = static_cast<char16_t>(0x005C); +static const char16_t SPACE = static_cast<char16_t>(0x0020); +static const char16_t EXCLAMATION = static_cast<char16_t>(0x0021); +static const char16_t QUOTATION_MARK = static_cast<char16_t>(0x0022); +static const char16_t NUMBER_SIGN = static_cast<char16_t>(0x0023); +static const char16_t PERCENT_SIGN = static_cast<char16_t>(0x0025); +static const char16_t ASTERISK = static_cast<char16_t>(0x002A); +static const char16_t COMMA = static_cast<char16_t>(0x002C); +static const char16_t HYPHEN = static_cast<char16_t>(0x002D); +static const char16_t U_ZERO = static_cast<char16_t>(0x0030); +static const char16_t U_ONE = static_cast<char16_t>(0x0031); +static const char16_t U_TWO = static_cast<char16_t>(0x0032); +static const char16_t U_THREE = static_cast<char16_t>(0x0033); +static const char16_t U_FOUR = static_cast<char16_t>(0x0034); +static const char16_t U_FIVE = static_cast<char16_t>(0x0035); +static const char16_t U_SIX = static_cast<char16_t>(0x0036); +static const char16_t U_SEVEN = static_cast<char16_t>(0x0037); +static const char16_t U_EIGHT = static_cast<char16_t>(0x0038); +static const char16_t U_NINE = static_cast<char16_t>(0x0039); +static const char16_t COLON = static_cast<char16_t>(0x003A); +static const char16_t SEMI_COLON = static_cast<char16_t>(0x003B); +static const char16_t EQUALS = static_cast<char16_t>(0x003D); +static const char16_t AT = static_cast<char16_t>(0x0040); +static const char16_t CAP_A = static_cast<char16_t>(0x0041); +static const char16_t CAP_B = static_cast<char16_t>(0x0042); +static const char16_t CAP_R = static_cast<char16_t>(0x0052); +static const char16_t CAP_Z = static_cast<char16_t>(0x005A); +static const char16_t LOWLINE = static_cast<char16_t>(0x005F); +static const char16_t LEFTBRACE = static_cast<char16_t>(0x007B); +static const char16_t RIGHTBRACE = static_cast<char16_t>(0x007D); +static const char16_t TILDE = static_cast<char16_t>(0x007E); +static const char16_t ELLIPSIS = static_cast<char16_t>(0x2026); + +static const char16_t LOW_A = static_cast<char16_t>(0x0061); +static const char16_t LOW_B = static_cast<char16_t>(0x0062); +static const char16_t LOW_C = static_cast<char16_t>(0x0063); +static const char16_t LOW_D = static_cast<char16_t>(0x0064); +static const char16_t LOW_E = static_cast<char16_t>(0x0065); +static const char16_t LOW_F = static_cast<char16_t>(0x0066); +static const char16_t LOW_G = static_cast<char16_t>(0x0067); +static const char16_t LOW_H = static_cast<char16_t>(0x0068); +static const char16_t LOW_I = static_cast<char16_t>(0x0069); +static const char16_t LOW_J = static_cast<char16_t>(0x006a); +static const char16_t LOW_K = static_cast<char16_t>(0x006B); +static const char16_t LOW_L = static_cast<char16_t>(0x006C); +static const char16_t LOW_M = static_cast<char16_t>(0x006D); +static const char16_t LOW_N = static_cast<char16_t>(0x006E); +static const char16_t LOW_O = static_cast<char16_t>(0x006F); +static const char16_t LOW_P = static_cast<char16_t>(0x0070); +static const char16_t LOW_Q = static_cast<char16_t>(0x0071); +static const char16_t LOW_R = static_cast<char16_t>(0x0072); +static const char16_t LOW_S = static_cast<char16_t>(0x0073); +static const char16_t LOW_T = static_cast<char16_t>(0x0074); +static const char16_t LOW_U = static_cast<char16_t>(0x0075); +static const char16_t LOW_V = static_cast<char16_t>(0x0076); +static const char16_t LOW_W = static_cast<char16_t>(0x0077); +static const char16_t LOW_Y = static_cast<char16_t>(0x0079); +static const char16_t LOW_Z = static_cast<char16_t>(0x007A); } diff --git a/deps/icu-small/source/i18n/quant.cpp b/deps/icu-small/source/i18n/quant.cpp index 4a45db1bf5c268..a4c21c8e721b15 100644 --- a/deps/icu-small/source/i18n/quant.cpp +++ b/deps/icu-small/source/i18n/quant.cpp @@ -103,21 +103,21 @@ UnicodeString& Quantifier::toPattern(UnicodeString& result, matcher->toMatcher()->toPattern(result, escapeUnprintable); if (minCount == 0) { if (maxCount == 1) { - return result.append((char16_t)63); /*?*/ + return result.append(static_cast<char16_t>(63)); /*?*/ } else if (maxCount == MAX) { - return result.append((char16_t)42); /***/ + return result.append(static_cast<char16_t>(42)); /***/ } // else fall through } else if (minCount == 1 && maxCount == MAX) { - return result.append((char16_t)43); /*+*/ + return result.append(static_cast<char16_t>(43)); /*+*/ } - result.append((char16_t)123); /*{*/ + result.append(static_cast<char16_t>(123)); /*{*/ ICU_Utility::appendNumber(result, minCount); - result.append((char16_t)44); /*,*/ + result.append(static_cast<char16_t>(44)); /*,*/ if (maxCount != MAX) { ICU_Utility::appendNumber(result, maxCount); } - result.append((char16_t)125); /*}*/ + result.append(static_cast<char16_t>(125)); /*}*/ return result; } diff --git a/deps/icu-small/source/i18n/quantityformatter.cpp b/deps/icu-small/source/i18n/quantityformatter.cpp index 0a1982e3d4c86d..f350c521f819d2 100644 --- a/deps/icu-small/source/i18n/quantityformatter.cpp +++ b/deps/icu-small/source/i18n/quantityformatter.cpp @@ -166,7 +166,7 @@ StandardPlural::Form QuantityFormatter::selectPlural( } else if (number.getType() == Formattable::kLong) { pluralKeyword = rules.select(number.getLong()); } else if (number.getType() == Formattable::kInt64) { - pluralKeyword = rules.select((double) number.getInt64()); + pluralKeyword = rules.select(static_cast<double>(number.getInt64())); } else { status = U_ILLEGAL_ARGUMENT_ERROR; return StandardPlural::OTHER; diff --git a/deps/icu-small/source/i18n/rbnf.cpp b/deps/icu-small/source/i18n/rbnf.cpp index a30b945909cc3b..c4e8ff73a7cc0c 100644 --- a/deps/icu-small/source/i18n/rbnf.cpp +++ b/deps/icu-small/source/i18n/rbnf.cpp @@ -226,9 +226,9 @@ class VArray { cap += 256; } if (buf == nullptr) { - buf = (void**)uprv_malloc(cap * sizeof(void*)); + buf = static_cast<void**>(uprv_malloc(cap * sizeof(void*))); } else { - buf = (void**)uprv_realloc(buf, cap * sizeof(void*)); + buf = static_cast<void**>(uprv_realloc(buf, cap * sizeof(void*))); } if (buf == nullptr) { // if we couldn't realloc, we leak the memory we've already allocated, but we're in deep trouble anyway @@ -460,7 +460,7 @@ LocDataParser::doParse() { array.add(nullptr, ec); if (U_SUCCESS(ec)) { int32_t numLocs = array.length() - 2; // subtract first, nullptr - char16_t*** result = (char16_t***)array.release(); + char16_t*** result = reinterpret_cast<char16_t***>(array.release()); return new StringLocalizationInfo(data, result, requiredLength-2, numLocs); // subtract first, nullptr } @@ -515,7 +515,7 @@ LocDataParser::nextArray(int32_t& requiredLength) { ERROR("Array not of required length"); } - return (char16_t**)array.release(); + return reinterpret_cast<char16_t**>(array.release()); } ERROR("Unknown Error"); } @@ -583,11 +583,11 @@ void LocDataParser::parseError(const char* EXPLANATION_ARG) if (limit > e) { limit = e; } - u_strncpy(pe.preContext, start, (int32_t)(p-start)); + u_strncpy(pe.preContext, start, static_cast<int32_t>(p - start)); pe.preContext[p-start] = 0; - u_strncpy(pe.postContext, p, (int32_t)(limit-p)); + u_strncpy(pe.postContext, p, static_cast<int32_t>(limit - p)); pe.postContext[limit-p] = 0; - pe.offset = (int32_t)(p - data); + pe.offset = static_cast<int32_t>(p - data); #ifdef RBNF_DEBUG fprintf(stderr, "%s at or near character %ld: ", EXPLANATION_ARG, p-data); @@ -632,7 +632,7 @@ StringLocalizationInfo::create(const UnicodeString& info, UParseError& perror, U return nullptr; // no error; } - char16_t* p = (char16_t*)uprv_malloc(len * sizeof(char16_t)); + char16_t* p = static_cast<char16_t*>(uprv_malloc(len * sizeof(char16_t))); if (!p) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -647,7 +647,7 @@ StringLocalizationInfo::create(const UnicodeString& info, UParseError& perror, U } StringLocalizationInfo::~StringLocalizationInfo() { - for (char16_t*** p = (char16_t***)data; *p; ++p) { + for (char16_t*** p = data; *p; ++p) { // remaining data is simply pointer into our unicode string data. if (*p) uprv_free(*p); } @@ -990,7 +990,7 @@ UnicodeString RuleBasedNumberFormat::getRuleSetName(int32_t index) const { if (localizations) { - UnicodeString string(true, localizations->getRuleSetName(index), (int32_t)-1); + UnicodeString string(true, localizations->getRuleSetName(index), static_cast<int32_t>(-1)); return string; } else if (fRuleSets) { @@ -1045,7 +1045,7 @@ RuleBasedNumberFormat::getRuleSetDisplayNameLocale(int32_t index, UErrorCode& st int32_t cap = name.length() + 1; char* bp = buffer; if (cap > 64) { - bp = (char *)uprv_malloc(cap); + bp = static_cast<char*>(uprv_malloc(cap)); if (bp == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return {""}; @@ -1159,7 +1159,7 @@ RuleBasedNumberFormat::format(int32_t number, UnicodeString& toAppendTo, FieldPosition& pos) const { - return format((int64_t)number, toAppendTo, pos); + return format(static_cast<int64_t>(number), toAppendTo, pos); } @@ -1196,7 +1196,7 @@ RuleBasedNumberFormat::format(int32_t number, FieldPosition& pos, UErrorCode& status) const { - return format((int64_t)number, ruleSetName, toAppendTo, pos, status); + return format(static_cast<int64_t>(number), ruleSetName, toAppendTo, pos, status); } @@ -1362,7 +1362,7 @@ RuleBasedNumberFormat::parse(const UnicodeString& text, ParsePosition working_pp(0); Formattable working_result; - rp->parse(workingText, working_pp, kMaxDouble, 0, working_result); + rp->parse(workingText, working_pp, kMaxDouble, 0, 0, working_result); if (working_pp.getIndex() > high_pp.getIndex()) { high_pp = working_pp; high_result = working_result; @@ -1555,7 +1555,7 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, LocalizationInfo* locali ++numRuleSets; // our rule list is an array of the appropriate size - fRuleSets = (NFRuleSet **)uprv_malloc((numRuleSets + 1) * sizeof(NFRuleSet *)); + fRuleSets = static_cast<NFRuleSet**>(uprv_malloc((numRuleSets + 1) * sizeof(NFRuleSet*))); /* test for nullptr */ if (fRuleSets == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; @@ -1829,7 +1829,7 @@ RuleBasedNumberFormat::getCollator() const if (U_SUCCESS(status)) { newCollator->setAttribute(UCOL_DECOMPOSITION_MODE, UCOL_ON, status); // cast away const - ((RuleBasedNumberFormat*)this)->collator = newCollator; + const_cast<RuleBasedNumberFormat*>(this)->collator = newCollator; } else { delete newCollator; } diff --git a/deps/icu-small/source/i18n/rbt.cpp b/deps/icu-small/source/i18n/rbt.cpp index 1ff04fd95b00c6..f34ddc9c385427 100644 --- a/deps/icu-small/source/i18n/rbt.cpp +++ b/deps/icu-small/source/i18n/rbt.cpp @@ -52,7 +52,7 @@ void RuleBasedTransliterator::_construct(const UnicodeString& rules, return; } - fData = (TransliterationRuleData*)parser.dataVector.orphanElementAt(0); + fData = static_cast<TransliterationRuleData*>(parser.dataVector.orphanElementAt(0)); setMaximumContextLength(fData->ruleSet.getMaximumContextLength()); } @@ -142,7 +142,7 @@ RuleBasedTransliterator::RuleBasedTransliterator(const UnicodeString& id, const TransliterationRuleData* theData, UnicodeFilter* adoptedFilter) : Transliterator(id, adoptedFilter), - fData((TransliterationRuleData*)theData), // cast away const + fData(const_cast<TransliterationRuleData*>(theData)), // cast away const isDataOwned(false) { setMaximumContextLength(fData->ruleSet.getMaximumContextLength()); } diff --git a/deps/icu-small/source/i18n/rbt_data.cpp b/deps/icu-small/source/i18n/rbt_data.cpp index 0a08f92054006c..6079e70caf9b48 100644 --- a/deps/icu-small/source/i18n/rbt_data.cpp +++ b/deps/icu-small/source/i18n/rbt_data.cpp @@ -48,17 +48,17 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData& const UHashElement *e; while ((e = other.variableNames.nextElement(pos)) != nullptr) { UnicodeString* value = - new UnicodeString(*(const UnicodeString*)e->value.pointer); + new UnicodeString(*static_cast<const UnicodeString*>(e->value.pointer)); // Exit out if value could not be created. if (value == nullptr) { return; } - variableNames.put(*(UnicodeString*)e->key.pointer, value, status); + variableNames.put(*static_cast<UnicodeString*>(e->key.pointer), value, status); } variables = nullptr; if (other.variables != nullptr) { - variables = (UnicodeFunctor **)uprv_malloc(variablesLength * sizeof(UnicodeFunctor *)); + variables = static_cast<UnicodeFunctor**>(uprv_malloc(variablesLength * sizeof(UnicodeFunctor*))); /* test for nullptr */ if (variables == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; diff --git a/deps/icu-small/source/i18n/rbt_pars.cpp b/deps/icu-small/source/i18n/rbt_pars.cpp index 880014b59bcadf..9dfdbfe1e9d47f 100644 --- a/deps/icu-small/source/i18n/rbt_pars.cpp +++ b/deps/icu-small/source/i18n/rbt_pars.cpp @@ -182,7 +182,7 @@ ParseData::~ParseData() {} * Implement SymbolTable API. */ const UnicodeString* ParseData::lookup(const UnicodeString& name) const { - return (const UnicodeString*) variableNames->get(name); + return static_cast<const UnicodeString*>(variableNames->get(name)); } /** @@ -196,7 +196,7 @@ const UnicodeFunctor* ParseData::lookupMatcher(UChar32 ch) const { if (i >= 0 && i < variablesVector->size()) { int32_t j = ch - data->variablesBase; set = (j < variablesVector->size()) ? - (UnicodeFunctor*) variablesVector->elementAt(j) : nullptr; + static_cast<UnicodeFunctor*>(variablesVector->elementAt(j)) : nullptr; } return set; } @@ -230,7 +230,7 @@ UBool ParseData::isMatcher(UChar32 ch) { // set array has not been constructed yet. int32_t i = ch - data->variablesBase; if (i >= 0 && i < variablesVector->size()) { - UnicodeFunctor *f = (UnicodeFunctor*) variablesVector->elementAt(i); + UnicodeFunctor* f = static_cast<UnicodeFunctor*>(variablesVector->elementAt(i)); return f != nullptr && f->toMatcher() != nullptr; } return true; @@ -245,7 +245,7 @@ UBool ParseData::isReplacer(UChar32 ch) { // set array has not been constructed yet. int i = ch - data->variablesBase; if (i >= 0 && i < variablesVector->size()) { - UnicodeFunctor *f = (UnicodeFunctor*) variablesVector->elementAt(i); + UnicodeFunctor* f = static_cast<UnicodeFunctor*>(variablesVector->elementAt(i)); return f != nullptr && f->toReplacer() != nullptr; } return true; @@ -446,7 +446,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l return syntaxError(U_TRAILING_BACKSLASH, rule, start, status); } UChar32 escaped = rule.unescapeAt(pos); // pos is already past '\\' - if (escaped == (UChar32) -1) { + if (escaped == static_cast<UChar32>(-1)) { return syntaxError(U_MALFORMED_UNICODE_ESCAPE, rule, start, status); } if (!parser.checkVariableRange(escaped)) { @@ -844,11 +844,11 @@ segmentObjects(statusReturn) */ TransliteratorParser::~TransliteratorParser() { while (!dataVector.isEmpty()) - delete (TransliterationRuleData*)(dataVector.orphanElementAt(0)); + delete static_cast<TransliterationRuleData*>(dataVector.orphanElementAt(0)); delete compoundFilter; delete parseData; while (!variablesVector.isEmpty()) - delete (UnicodeFunctor*)variablesVector.orphanElementAt(0); + delete static_cast<UnicodeFunctor*>(variablesVector.orphanElementAt(0)); } void @@ -895,7 +895,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, int32_t ruleCount = 0; while (!dataVector.isEmpty()) { - delete (TransliterationRuleData*)(dataVector.orphanElementAt(0)); + delete static_cast<TransliterationRuleData*>(dataVector.orphanElementAt(0)); } if (U_FAILURE(status)) { return; @@ -910,7 +910,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, compoundFilter = nullptr; while (!variablesVector.isEmpty()) { - delete (UnicodeFunctor*)variablesVector.orphanElementAt(0); + delete static_cast<UnicodeFunctor*>(variablesVector.orphanElementAt(0)); } variableNames.removeAll(); parseData = new ParseData(nullptr, &variablesVector, &variableNames); @@ -919,7 +919,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, return; } - dotStandIn = (char16_t) -1; + dotStandIn = static_cast<char16_t>(-1); UnicodeString *tempstr = nullptr; // used for memory allocation error checking UnicodeString str; // scratch @@ -943,7 +943,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, } // Skip lines starting with the comment character if (c == RULE_COMMENT_CHAR) { - pos = rule.indexOf((char16_t)0x000A /*\n*/, pos) + 1; + pos = rule.indexOf(static_cast<char16_t>(0x000A) /*\n*/, pos) + 1; if (pos == 0) { break; // No "\n" found; rest of rule is a comment } @@ -1106,12 +1106,12 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, // Convert the set vector to an array int32_t i, dataVectorSize = dataVector.size(); for (i = 0; i < dataVectorSize; i++) { - TransliterationRuleData* data = (TransliterationRuleData*)dataVector.elementAt(i); + TransliterationRuleData* data = static_cast<TransliterationRuleData*>(dataVector.elementAt(i)); data->variablesLength = variablesVector.size(); if (data->variablesLength == 0) { data->variables = nullptr; } else { - data->variables = (UnicodeFunctor**)uprv_malloc(data->variablesLength * sizeof(UnicodeFunctor*)); + data->variables = static_cast<UnicodeFunctor**>(uprv_malloc(data->variablesLength * sizeof(UnicodeFunctor*))); // nullptr pointer check if (data->variables == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; @@ -1129,12 +1129,12 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, int32_t p = UHASH_FIRST; const UHashElement* he = variableNames.nextElement(p); while (he != nullptr) { - UnicodeString* tempus = ((UnicodeString*)(he->value.pointer))->clone(); + UnicodeString* tempus = static_cast<UnicodeString*>(he->value.pointer)->clone(); if (tempus == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } - data->variableNames.put(*((UnicodeString*)(he->key.pointer)), + data->variableNames.put(*static_cast<UnicodeString*>(he->key.pointer), tempus, status); he = variableNames.nextElement(p); } @@ -1150,10 +1150,10 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, } for (i = 0; i < dataVectorSize; i++) { - TransliterationRuleData* data = (TransliterationRuleData*)dataVector.elementAt(i); + TransliterationRuleData* data = static_cast<TransliterationRuleData*>(dataVector.elementAt(i)); data->ruleSet.freeze(parseError, status); } - if (idBlockVector.size() == 1 && ((UnicodeString*)idBlockVector.elementAt(0))->isEmpty()) { + if (idBlockVector.size() == 1 && static_cast<UnicodeString*>(idBlockVector.elementAt(0))->isEmpty()) { idBlockVector.removeElementAt(0); } } @@ -1168,10 +1168,10 @@ void TransliteratorParser::setVariableRange(int32_t start, int32_t end, UErrorCo return; } - curData->variablesBase = (char16_t) start; + curData->variablesBase = static_cast<char16_t>(start); if (dataVector.size() == 0) { - variableNext = (char16_t) start; - variableLimit = (char16_t) (end + 1); + variableNext = static_cast<char16_t>(start); + variableLimit = static_cast<char16_t>(end + 1); } } @@ -1453,12 +1453,12 @@ int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos, // Flatten segment objects vector to an array UnicodeFunctor** segmentsArray = nullptr; if (segmentObjects.size() > 0) { - segmentsArray = (UnicodeFunctor **)uprv_malloc(segmentObjects.size() * sizeof(UnicodeFunctor *)); + segmentsArray = static_cast<UnicodeFunctor**>(uprv_malloc(segmentObjects.size() * sizeof(UnicodeFunctor*))); // Null pointer check if (segmentsArray == nullptr) { return syntaxError(U_MEMORY_ALLOCATION_ERROR, rule, start, status); } - segmentObjects.toArray((void**) segmentsArray); + segmentObjects.toArray(reinterpret_cast<void**>(segmentsArray)); } TransliterationRule* temptr = new TransliterationRule( left->text, left->ante, left->post, @@ -1513,7 +1513,7 @@ int32_t TransliteratorParser::syntaxError(UErrorCode parseErrorCode, //null terminate the buffer parseError.postContext[stop-start]= 0; - status = (UErrorCode)parseErrorCode; + status = parseErrorCode; return pos; } @@ -1529,7 +1529,7 @@ char16_t TransliteratorParser::parseSet(const UnicodeString& rule, // Null pointer check if (set == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; - return (char16_t)0x0000; // Return empty character with error. + return static_cast<char16_t>(0x0000); // Return empty character with error. } set->compact(); return generateStandInFor(set, status); @@ -1546,7 +1546,7 @@ char16_t TransliteratorParser::generateStandInFor(UnicodeFunctor* adopted, UErro // (typical n is 0, 1, or 2); linear search is optimal. for (int32_t i=0; i<variablesVector.size(); ++i) { if (variablesVector.elementAt(i) == adopted) { // [sic] pointer comparison - return (char16_t) (curData->variablesBase + i); + return static_cast<char16_t>(curData->variablesBase + i); } } @@ -1619,12 +1619,12 @@ void TransliteratorParser::setSegmentObject(int32_t seg, StringMatcher* adopted, * time and reused thereafter. */ char16_t TransliteratorParser::getDotStandIn(UErrorCode& status) { - if (dotStandIn == (char16_t) -1) { + if (dotStandIn == static_cast<char16_t>(-1)) { UnicodeSet* tempus = new UnicodeSet(UnicodeString(true, DOT_SET, -1), status); // Null pointer check. if (tempus == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; - return (char16_t)0x0000; + return static_cast<char16_t>(0x0000); } dotStandIn = generateStandInFor(tempus, status); } @@ -1638,7 +1638,7 @@ char16_t TransliteratorParser::getDotStandIn(UErrorCode& status) { void TransliteratorParser::appendVariableDef(const UnicodeString& name, UnicodeString& buf, UErrorCode& status) { - const UnicodeString* s = (const UnicodeString*) variableNames.get(name); + const UnicodeString* s = static_cast<const UnicodeString*>(variableNames.get(name)); if (s == nullptr) { // We allow one undefined variable so that variable definition // statements work. For the first undefined variable we return @@ -1651,7 +1651,7 @@ void TransliteratorParser::appendVariableDef(const UnicodeString& name, status = U_ILLEGAL_ARGUMENT_ERROR; return; } - buf.append((char16_t) --variableLimit); + buf.append(--variableLimit); } else { //throw new IllegalArgumentException("Undefined variable $" // + name); @@ -1693,7 +1693,7 @@ utrans_stripRules(const char16_t *source, int32_t sourceLen, char16_t *target, U U16_NEXT_UNSAFE(source, index, c); source+=index; if(c == QUOTE) { - quoted = (UBool)!quoted; + quoted = !quoted; } else if (!quoted) { if (c == RULE_COMMENT_CHAR) { @@ -1739,7 +1739,7 @@ utrans_stripRules(const char16_t *source, int32_t sourceLen, char16_t *target, U } else if (c2 == QUOTE) { /* \' seen. Make sure we don't do anything when we see it again. */ - quoted = (UBool)!quoted; + quoted = !quoted; } } } diff --git a/deps/icu-small/source/i18n/rbt_rule.cpp b/deps/icu-small/source/i18n/rbt_rule.cpp index 4cf557e04d87d6..fb71f0f9b90877 100644 --- a/deps/icu-small/source/i18n/rbt_rule.cpp +++ b/deps/icu-small/source/i18n/rbt_rule.cpp @@ -175,7 +175,7 @@ TransliterationRule::TransliterationRule(TransliterationRule& other) : segments = nullptr; segmentsCount = 0; if (other.segmentsCount > 0) { - segments = (UnicodeFunctor **)uprv_malloc(other.segmentsCount * sizeof(UnicodeFunctor *)); + segments = static_cast<UnicodeFunctor**>(uprv_malloc(other.segmentsCount * sizeof(UnicodeFunctor*))); uprv_memcpy(segments, other.segments, (size_t)other.segmentsCount*sizeof(segments[0])); } @@ -225,7 +225,7 @@ int16_t TransliterationRule::getIndexValue() const { return -1; } UChar32 c = pattern.char32At(anteContextLength); - return (int16_t)(data->lookupMatcher(c) == nullptr ? (c & 0xFF) : -1); + return static_cast<int16_t>(data->lookupMatcher(c) == nullptr ? (c & 0xFF) : -1); } /** @@ -481,27 +481,27 @@ UnicodeString& TransliterationRule::toRule(UnicodeString& rule, // Emit start anchor if ((flags & ANCHOR_START) != 0) { - rule.append((char16_t)94/*^*/); + rule.append(static_cast<char16_t>(94)/*^*/); } // Emit the input pattern ICU_Utility::appendToRule(rule, anteContext, escapeUnprintable, quoteBuf); if (emitBraces) { - ICU_Utility::appendToRule(rule, (char16_t) 0x007B /*{*/, true, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, static_cast<char16_t>(0x007B) /*{*/, true, escapeUnprintable, quoteBuf); } ICU_Utility::appendToRule(rule, key, escapeUnprintable, quoteBuf); if (emitBraces) { - ICU_Utility::appendToRule(rule, (char16_t) 0x007D /*}*/, true, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, static_cast<char16_t>(0x007D) /*}*/, true, escapeUnprintable, quoteBuf); } ICU_Utility::appendToRule(rule, postContext, escapeUnprintable, quoteBuf); // Emit end anchor if ((flags & ANCHOR_END) != 0) { - rule.append((char16_t)36/*$*/); + rule.append(static_cast<char16_t>(36)/*$*/); } ICU_Utility::appendToRule(rule, UnicodeString(true, FORWARD_OP, 3), true, escapeUnprintable, quoteBuf); @@ -511,7 +511,7 @@ UnicodeString& TransliterationRule::toRule(UnicodeString& rule, ICU_Utility::appendToRule(rule, output->toReplacer()->toReplacerPattern(str, escapeUnprintable), true, escapeUnprintable, quoteBuf); - ICU_Utility::appendToRule(rule, (char16_t) 0x003B /*;*/, true, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, static_cast<char16_t>(0x003B) /*;*/, true, escapeUnprintable, quoteBuf); return rule; } diff --git a/deps/icu-small/source/i18n/rbt_set.cpp b/deps/icu-small/source/i18n/rbt_set.cpp index 23577f489f24c9..93852d9af97668 100644 --- a/deps/icu-small/source/i18n/rbt_set.cpp +++ b/deps/icu-small/source/i18n/rbt_set.cpp @@ -193,7 +193,7 @@ TransliterationRuleSet::TransliterationRuleSet(const TransliterationRuleSet& oth len = other.ruleVector->size(); for (i=0; i<len && U_SUCCESS(status); ++i) { LocalPointer<TransliterationRule> tempTranslitRule( - new TransliterationRule(*(TransliterationRule*)other.ruleVector->elementAt(i)), status); + new TransliterationRule(*static_cast<TransliterationRule*>(other.ruleVector->elementAt(i))), status); ruleVector->adoptElement(tempTranslitRule.orphan(), status); } } @@ -295,14 +295,14 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status) /* Precompute the index values. This saves a LOT of time. * Be careful not to call malloc(0). */ - int16_t* indexValue = (int16_t*) uprv_malloc( sizeof(int16_t) * (n > 0 ? n : 1) ); + int16_t* indexValue = static_cast<int16_t*>(uprv_malloc(sizeof(int16_t) * (n > 0 ? n : 1))); /* test for nullptr */ if (indexValue == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } for (j=0; j<n; ++j) { - TransliterationRule* r = (TransliterationRule*) ruleVector->elementAt(j); + TransliterationRule* r = static_cast<TransliterationRule*>(ruleVector->elementAt(j)); indexValue[j] = r->getIndexValue(); } for (x=0; x<256; ++x) { @@ -317,8 +317,8 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status) // a set, and we must use the more time-consuming // matchesIndexValue check. In practice this happens // rarely, so we seldom treat this code path. - TransliterationRule* r = (TransliterationRule*) ruleVector->elementAt(j); - if (r->matchesIndexValue((uint8_t)x)) { + TransliterationRule* r = static_cast<TransliterationRule*>(ruleVector->elementAt(j)); + if (r->matchesIndexValue(static_cast<uint8_t>(x))) { v.addElement(r, status); } } @@ -339,14 +339,14 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status) rules = nullptr; return; } - rules = (TransliterationRule **)uprv_malloc(v.size() * sizeof(TransliterationRule *)); + rules = static_cast<TransliterationRule**>(uprv_malloc(v.size() * sizeof(TransliterationRule*))); /* test for nullptr */ if (rules == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } for (j=0; j<v.size(); ++j) { - rules[j] = (TransliterationRule*) v.elementAt(j); + rules[j] = static_cast<TransliterationRule*>(v.elementAt(j)); } // TODO Add error reporting that indicates the rules that @@ -401,7 +401,7 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status) UBool TransliterationRuleSet::transliterate(Replaceable& text, UTransPosition& pos, UBool incremental) { - int16_t indexByte = (int16_t) (text.char32At(pos.start) & 0xFF); + int16_t indexByte = static_cast<int16_t>(text.char32At(pos.start) & 0xFF); for (int32_t i=index[indexByte]; i<index[indexByte+1]; ++i) { UMatchDegree m = rules[i]->matchAndReplace(text, pos, incremental); switch (m) { @@ -431,10 +431,10 @@ UnicodeString& TransliterationRuleSet::toRules(UnicodeString& ruleSource, ruleSource.truncate(0); for (i=0; i<count; ++i) { if (i != 0) { - ruleSource.append((char16_t) 0x000A /*\n*/); + ruleSource.append(static_cast<char16_t>(0x000A) /*\n*/); } TransliterationRule *r = - (TransliterationRule*) ruleVector->elementAt(i); + static_cast<TransliterationRule*>(ruleVector->elementAt(i)); r->toRule(ruleSource, escapeUnprintable); } return ruleSource; @@ -451,7 +451,7 @@ UnicodeSet& TransliterationRuleSet::getSourceTargetSet(UnicodeSet& result, int32_t count = ruleVector->size(); for (int32_t i=0; i<count; ++i) { TransliterationRule* r = - (TransliterationRule*) ruleVector->elementAt(i); + static_cast<TransliterationRule*>(ruleVector->elementAt(i)); if (getTarget) { r->addTargetSetTo(result); } else { diff --git a/deps/icu-small/source/i18n/rbtz.cpp b/deps/icu-small/source/i18n/rbtz.cpp index 6bee2aa04baf1e..ad79bd60b164f9 100644 --- a/deps/icu-small/source/i18n/rbtz.cpp +++ b/deps/icu-small/source/i18n/rbtz.cpp @@ -49,8 +49,8 @@ static UBool compareRules(UVector* rules1, UVector* rules2) { return false; } for (int32_t i = 0; i < size; i++) { - TimeZoneRule *r1 = (TimeZoneRule*)rules1->elementAt(i); - TimeZoneRule *r2 = (TimeZoneRule*)rules2->elementAt(i); + TimeZoneRule* r1 = static_cast<TimeZoneRule*>(rules1->elementAt(i)); + TimeZoneRule* r2 = static_cast<TimeZoneRule*>(rules2->elementAt(i)); if (*r1 != *r2) { return false; } @@ -195,7 +195,7 @@ RuleBasedTimeZone::complete(UErrorCode& status) { if (fHistoricRules != nullptr && fHistoricRules->size() > 0) { int32_t i; int32_t historicCount = fHistoricRules->size(); - LocalMemory<bool> done((bool *)uprv_malloc(sizeof(bool) * historicCount)); + LocalMemory<bool> done(static_cast<bool*>(uprv_malloc(sizeof(bool) * historicCount))); if (done == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; goto cleanup; @@ -218,7 +218,7 @@ RuleBasedTimeZone::complete(UErrorCode& status) { if (done[i]) { continue; } - r = (TimeZoneRule*)fHistoricRules->elementAt(i); + r = static_cast<TimeZoneRule*>(fHistoricRules->elementAt(i)); avail = r->getNextStart(lastTransitionTime, curStdOffset, curDstSavings, false, tt); if (!avail) { // No more transitions from this rule - skip this rule next time @@ -254,11 +254,11 @@ RuleBasedTimeZone::complete(UErrorCode& status) { if (fFinalRules != nullptr) { // Check if one of final rules has earlier transition date for (i = 0; i < 2 /* fFinalRules->size() */; i++) { - TimeZoneRule *fr = (TimeZoneRule*)fFinalRules->elementAt(i); + TimeZoneRule* fr = static_cast<TimeZoneRule*>(fFinalRules->elementAt(i)); if (*fr == *curRule) { continue; } - r = (TimeZoneRule*)fFinalRules->elementAt(i); + r = static_cast<TimeZoneRule*>(fFinalRules->elementAt(i)); avail = r->getNextStart(lastTransitionTime, curStdOffset, curDstSavings, false, tt); if (avail) { if (tt < nextTransitionTime) { @@ -307,8 +307,8 @@ RuleBasedTimeZone::complete(UErrorCode& status) { fHistoricTransitions = lpHistoricTransitions.orphan(); } // Append the first transition for each - TimeZoneRule *rule0 = (TimeZoneRule*)fFinalRules->elementAt(0); - TimeZoneRule *rule1 = (TimeZoneRule*)fFinalRules->elementAt(1); + TimeZoneRule* rule0 = static_cast<TimeZoneRule*>(fFinalRules->elementAt(0)); + TimeZoneRule* rule1 = static_cast<TimeZoneRule*>(fFinalRules->elementAt(1)); UDate tt0, tt1; UBool avail0 = rule0->getNextStart(lastTransitionTime, curRule->getRawOffset(), curRule->getDSTSavings(), false, tt0); UBool avail1 = rule1->getNextStart(lastTransitionTime, curRule->getRawOffset(), curRule->getDSTSavings(), false, tt1); @@ -385,7 +385,7 @@ RuleBasedTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t d year = 1 - year; } int32_t rawOffset, dstOffset; - UDate time = (UDate)Grego::fieldsToDay(year, month, day) * U_MILLIS_PER_DAY + millis; + UDate time = static_cast<UDate>(Grego::fieldsToDay(year, month, day)) * U_MILLIS_PER_DAY + millis; getOffsetInternal(time, true, kDaylight, kStandard, rawOffset, dstOffset, status); if (U_FAILURE(status)) { return 0; @@ -431,13 +431,13 @@ RuleBasedTimeZone::getOffsetInternal(UDate date, UBool local, if (fHistoricTransitions == nullptr) { rule = fInitialRule; } else { - UDate tstart = getTransitionTime((Transition*)fHistoricTransitions->elementAt(0), + UDate tstart = getTransitionTime(static_cast<Transition*>(fHistoricTransitions->elementAt(0)), local, NonExistingTimeOpt, DuplicatedTimeOpt); if (date < tstart) { rule = fInitialRule; } else { int32_t idx = fHistoricTransitions->size() - 1; - UDate tend = getTransitionTime((Transition*)fHistoricTransitions->elementAt(idx), + UDate tend = getTransitionTime(static_cast<Transition*>(fHistoricTransitions->elementAt(idx)), local, NonExistingTimeOpt, DuplicatedTimeOpt); if (date > tend) { if (fFinalRules != nullptr) { @@ -446,18 +446,18 @@ RuleBasedTimeZone::getOffsetInternal(UDate date, UBool local, if (rule == nullptr) { // no final rules or the given time is before the first transition // specified by the final rules -> use the last rule - rule = ((Transition*)fHistoricTransitions->elementAt(idx))->to; + rule = static_cast<Transition*>(fHistoricTransitions->elementAt(idx))->to; } } else { // Find a historical transition while (idx >= 0) { - if (date >= getTransitionTime((Transition*)fHistoricTransitions->elementAt(idx), + if (date >= getTransitionTime(static_cast<Transition*>(fHistoricTransitions->elementAt(idx)), local, NonExistingTimeOpt, DuplicatedTimeOpt)) { break; } idx--; } - rule = ((Transition*)fHistoricTransitions->elementAt(idx))->to; + rule = static_cast<Transition*>(fHistoricTransitions->elementAt(idx))->to; } } } @@ -605,14 +605,14 @@ RuleBasedTimeZone::getTimeZoneRules(const InitialTimeZoneRule*& initial, int32_t historicCount = fHistoricRules->size(); idx = 0; while (cnt < trscount && idx < historicCount) { - trsrules[cnt++] = (const TimeZoneRule*)fHistoricRules->elementAt(idx++); + trsrules[cnt++] = static_cast<const TimeZoneRule*>(fHistoricRules->elementAt(idx++)); } } if (fFinalRules != nullptr && cnt < trscount) { int32_t finalCount = fFinalRules->size(); idx = 0; while (cnt < trscount && idx < finalCount) { - trsrules[cnt++] = (const TimeZoneRule*)fFinalRules->elementAt(idx++); + trsrules[cnt++] = static_cast<const TimeZoneRule*>(fFinalRules->elementAt(idx++)); } } // Set the result length @@ -652,7 +652,7 @@ RuleBasedTimeZone::copyRules(UVector* source) { } int32_t i; for (i = 0; i < size; i++) { - LocalPointer<TimeZoneRule> rule(((TimeZoneRule*)source->elementAt(i))->clone(), ec); + LocalPointer<TimeZoneRule> rule(static_cast<TimeZoneRule*>(source->elementAt(i))->clone(), ec); rules->adoptElement(rule.orphan(), ec); if (U_FAILURE(ec)) { return nullptr; @@ -668,8 +668,8 @@ RuleBasedTimeZone::findRuleInFinal(UDate date, UBool local, return nullptr; } - AnnualTimeZoneRule* fr0 = (AnnualTimeZoneRule*)fFinalRules->elementAt(0); - AnnualTimeZoneRule* fr1 = (AnnualTimeZoneRule*)fFinalRules->elementAt(1); + AnnualTimeZoneRule* fr0 = static_cast<AnnualTimeZoneRule*>(fFinalRules->elementAt(0)); + AnnualTimeZoneRule* fr1 = static_cast<AnnualTimeZoneRule*>(fFinalRules->elementAt(1)); if (fr0 == nullptr || fr1 == nullptr) { return nullptr; } @@ -718,14 +718,14 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime, UBool isFinal = false; UBool found = false; Transition result; - Transition *tzt = (Transition*)fHistoricTransitions->elementAt(0); + Transition* tzt = static_cast<Transition*>(fHistoricTransitions->elementAt(0)); UDate tt = tzt->time; if (tt > base || (inclusive && tt == base)) { result = *tzt; found = true; } else { int32_t idx = fHistoricTransitions->size() - 1; - tzt = (Transition*)fHistoricTransitions->elementAt(idx); + tzt = static_cast<Transition*>(fHistoricTransitions->elementAt(idx)); tt = tzt->time; if (inclusive && tt == base) { result = *tzt; @@ -733,8 +733,8 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime, } else if (tt <= base) { if (fFinalRules != nullptr) { // Find a transion time with finalRules - TimeZoneRule *r0 = (TimeZoneRule*)fFinalRules->elementAt(0); - TimeZoneRule *r1 = (TimeZoneRule*)fFinalRules->elementAt(1); + TimeZoneRule* r0 = static_cast<TimeZoneRule*>(fFinalRules->elementAt(0)); + TimeZoneRule* r1 = static_cast<TimeZoneRule*>(fFinalRules->elementAt(1)); UDate start0, start1; UBool avail0 = r0->getNextStart(base, r1->getRawOffset(), r1->getDSTSavings(), inclusive, start0); UBool avail1 = r1->getNextStart(base, r0->getRawOffset(), r0->getDSTSavings(), inclusive, start1); @@ -759,7 +759,7 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime, idx--; Transition *prev = tzt; while (idx > 0) { - tzt = (Transition*)fHistoricTransitions->elementAt(idx); + tzt = static_cast<Transition*>(fHistoricTransitions->elementAt(idx)); tt = tzt->time; if (tt < base || (!inclusive && tt == base)) { break; @@ -801,14 +801,14 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime, } UBool found = false; Transition result; - Transition *tzt = (Transition*)fHistoricTransitions->elementAt(0); + Transition* tzt = static_cast<Transition*>(fHistoricTransitions->elementAt(0)); UDate tt = tzt->time; if (inclusive && tt == base) { result = *tzt; found = true; } else if (tt < base) { int32_t idx = fHistoricTransitions->size() - 1; - tzt = (Transition*)fHistoricTransitions->elementAt(idx); + tzt = static_cast<Transition*>(fHistoricTransitions->elementAt(idx)); tt = tzt->time; if (inclusive && tt == base) { result = *tzt; @@ -816,8 +816,8 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime, } else if (tt < base) { if (fFinalRules != nullptr) { // Find a transion time with finalRules - TimeZoneRule *r0 = (TimeZoneRule*)fFinalRules->elementAt(0); - TimeZoneRule *r1 = (TimeZoneRule*)fFinalRules->elementAt(1); + TimeZoneRule* r0 = static_cast<TimeZoneRule*>(fFinalRules->elementAt(0)); + TimeZoneRule* r1 = static_cast<TimeZoneRule*>(fFinalRules->elementAt(1)); UDate start0, start1; UBool avail0 = r0->getPreviousStart(base, r1->getRawOffset(), r1->getDSTSavings(), inclusive, start0); UBool avail1 = r1->getPreviousStart(base, r0->getRawOffset(), r0->getDSTSavings(), inclusive, start1); @@ -842,7 +842,7 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime, // Find a transition within the historic transitions idx--; while (idx >= 0) { - tzt = (Transition*)fHistoricTransitions->elementAt(idx); + tzt = static_cast<Transition*>(fHistoricTransitions->elementAt(idx)); tt = tzt->time; if (tt < base || (inclusive && tt == base)) { break; diff --git a/deps/icu-small/source/i18n/regexcmp.cpp b/deps/icu-small/source/i18n/regexcmp.cpp index 1e599cd4e58436..cfce4d76f09c14 100644 --- a/deps/icu-small/source/i18n/regexcmp.cpp +++ b/deps/icu-small/source/i18n/regexcmp.cpp @@ -207,14 +207,14 @@ void RegexCompile::compile( // Table row specified "quoted" and the char was quoted. break; } - if (tableEl->fCharClass == 253 && fC.fChar == (UChar32)-1) { + if (tableEl->fCharClass == 253 && fC.fChar == static_cast<UChar32>(-1)) { // Table row specified eof and we hit eof on the input. break; } if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class && fC.fQuoted == false && // char is not escaped && - fC.fChar != (UChar32)-1) { // char is not EOF + fC.fChar != static_cast<UChar32>(-1)) { // char is not EOF U_ASSERT(tableEl->fCharClass <= 137); if (RegexStaticSets::gStaticSets->fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) { // Table row specified a character class, or set of characters, @@ -323,7 +323,7 @@ void RegexCompile::compile( } int32_t i; for (i=0; i<numSets; i++) { - UnicodeSet *s = (UnicodeSet *)fRXPat->fSets->elementAt(i); + UnicodeSet* s = static_cast<UnicodeSet*>(fRXPat->fSets->elementAt(i)); fRXPat->fSets8[i].init(s); } @@ -347,7 +347,7 @@ UBool RegexCompile::doParseActions(int32_t action) { UBool returnVal = true; - switch ((Regex_PatternParseAction)action) { + switch (static_cast<Regex_PatternParseAction>(action)) { case doPatStart: // Start of pattern compiles to: @@ -403,7 +403,7 @@ UBool RegexCompile::doParseActions(int32_t action) // side fails to match and backtracks. Locate the position for the // save from the location on the top of the parentheses stack. int32_t savePosition = fParenStack.popi(); - int32_t op = (int32_t)fRXPat->fCompiledPat->elementAti(savePosition); + int32_t op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(savePosition)); U_ASSERT(URX_TYPE(op) == URX_NOP); // original contents of reserved location op = buildOp(URX_STATE_SAVE, fRXPat->fCompiledPat->size()+1); fRXPat->fCompiledPat->setElementAt(op, savePosition); @@ -793,7 +793,7 @@ UBool RegexCompile::doParseActions(int32_t action) // Check for simple constructs, which may get special optimized code. if (topLoc == fRXPat->fCompiledPat->size() - 1) { - int32_t repeatedOp = (int32_t)fRXPat->fCompiledPat->elementAti(topLoc); + int32_t repeatedOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(topLoc)); if (URX_TYPE(repeatedOp) == URX_SETREF) { // Emit optimized code for [char set]+ @@ -925,7 +925,7 @@ UBool RegexCompile::doParseActions(int32_t action) // Check for simple *, where the construct being repeated // compiled to single opcode, and might be optimizable. if (topLoc == fRXPat->fCompiledPat->size() - 1) { - int32_t repeatedOp = (int32_t)fRXPat->fCompiledPat->elementAti(topLoc); + int32_t repeatedOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(topLoc)); if (URX_TYPE(repeatedOp) == URX_SETREF) { // Emit optimized code for a [char set]* @@ -1015,11 +1015,11 @@ UBool RegexCompile::doParseActions(int32_t action) { int32_t digitValue = u_charDigitValue(fC.fChar); U_ASSERT(digitValue >= 0); - int64_t val = (int64_t)fIntervalLow*10 + digitValue; + int64_t val = static_cast<int64_t>(fIntervalLow) * 10 + digitValue; if (val > INT32_MAX) { error(U_REGEX_NUMBER_TOO_BIG); } else { - fIntervalLow = (int32_t)val; + fIntervalLow = static_cast<int32_t>(val); } } break; @@ -1032,11 +1032,11 @@ UBool RegexCompile::doParseActions(int32_t action) } int32_t digitValue = u_charDigitValue(fC.fChar); U_ASSERT(digitValue >= 0); - int64_t val = (int64_t)fIntervalUpper*10 + digitValue; + int64_t val = static_cast<int64_t>(fIntervalUpper) * 10 + digitValue; if (val > INT32_MAX) { error(U_REGEX_NUMBER_TOO_BIG); } else { - fIntervalUpper = (int32_t)val; + fIntervalUpper = static_cast<int32_t>(val); } } break; @@ -1075,7 +1075,7 @@ UBool RegexCompile::doParseActions(int32_t action) int32_t op = buildOp(URX_STO_SP, varLoc); fRXPat->fCompiledPat->setElementAt(op, topLoc); - int32_t loopOp = (int32_t)fRXPat->fCompiledPat->popi(); + int32_t loopOp = static_cast<int32_t>(fRXPat->fCompiledPat->popi()); U_ASSERT(URX_TYPE(loopOp) == URX_CTR_LOOP && URX_VAL(loopOp) == topLoc); loopOp++; // point LoopOp after the just-inserted STO_SP fRXPat->fCompiledPat->push(loopOp, *fStatus); @@ -1545,28 +1545,28 @@ UBool RegexCompile::doParseActions(int32_t action) case doSetAddAmp: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); set->add(chAmp); } break; case doSetAddDash: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); set->add(chDash); } break; case doSetBackslash_s: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); set->addAll(RegexStaticSets::gStaticSets->fPropSets[URX_ISSPACE_SET]); break; } case doSetBackslash_S: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); UnicodeSet SSet; SSet.addAll(RegexStaticSets::gStaticSets->fPropSets[URX_ISSPACE_SET]).complement(); set->addAll(SSet); @@ -1575,7 +1575,7 @@ UBool RegexCompile::doParseActions(int32_t action) case doSetBackslash_d: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); // TODO - make a static set, ticket 6058. addCategory(set, U_GC_ND_MASK, *fStatus); break; @@ -1583,7 +1583,7 @@ UBool RegexCompile::doParseActions(int32_t action) case doSetBackslash_D: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); UnicodeSet digits; // TODO - make a static set, ticket 6058. digits.applyIntPropertyValue(UCHAR_GENERAL_CATEGORY_MASK, U_GC_ND_MASK, *fStatus); @@ -1594,20 +1594,20 @@ UBool RegexCompile::doParseActions(int32_t action) case doSetBackslash_h: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); UnicodeSet h; h.applyIntPropertyValue(UCHAR_GENERAL_CATEGORY_MASK, U_GC_ZS_MASK, *fStatus); - h.add((UChar32)9); // Tab + h.add(static_cast<UChar32>(9)); // Tab set->addAll(h); break; } case doSetBackslash_H: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); UnicodeSet h; h.applyIntPropertyValue(UCHAR_GENERAL_CATEGORY_MASK, U_GC_ZS_MASK, *fStatus); - h.add((UChar32)9); // Tab + h.add(static_cast<UChar32>(9)); // Tab h.complement(); set->addAll(h); break; @@ -1615,20 +1615,20 @@ UBool RegexCompile::doParseActions(int32_t action) case doSetBackslash_v: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); - set->add((UChar32)0x0a, (UChar32)0x0d); // add range - set->add((UChar32)0x85); - set->add((UChar32)0x2028, (UChar32)0x2029); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); + set->add(static_cast<UChar32>(0x0a), static_cast<UChar32>(0x0d)); // add range + set->add(static_cast<UChar32>(0x85)); + set->add(static_cast<UChar32>(0x2028), static_cast<UChar32>(0x2029)); break; } case doSetBackslash_V: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); UnicodeSet v; - v.add((UChar32)0x0a, (UChar32)0x0d); // add range - v.add((UChar32)0x85); - v.add((UChar32)0x2028, (UChar32)0x2029); + v.add(static_cast<UChar32>(0x0a), static_cast<UChar32>(0x0d)); // add range + v.add(static_cast<UChar32>(0x85)); + v.add(static_cast<UChar32>(0x2028), static_cast<UChar32>(0x2029)); v.complement(); set->addAll(v); break; @@ -1636,14 +1636,14 @@ UBool RegexCompile::doParseActions(int32_t action) case doSetBackslash_w: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); set->addAll(RegexStaticSets::gStaticSets->fPropSets[URX_ISWORD_SET]); break; } case doSetBackslash_W: { - UnicodeSet *set = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* set = static_cast<UnicodeSet*>(fSetStack.peek()); UnicodeSet SSet; SSet.addAll(RegexStaticSets::gStaticSets->fPropSets[URX_ISWORD_SET]).complement(); set->addAll(SSet); @@ -1716,7 +1716,7 @@ UBool RegexCompile::doParseActions(int32_t action) // the operator stack should be empty and the operand stack should have just // one entry, the result set. U_ASSERT(fSetOpStack.empty()); - UnicodeSet *theSet = (UnicodeSet *)fSetStack.pop(); + UnicodeSet* theSet = static_cast<UnicodeSet*>(fSetStack.pop()); U_ASSERT(fSetStack.empty()); compileSet(theSet); break; @@ -1735,7 +1735,7 @@ UBool RegexCompile::doParseActions(int32_t action) // as union-ing in a literal' { setEval(setUnion); - UnicodeSet *s = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* s = static_cast<UnicodeSet*>(fSetStack.peek()); s->add(fC.fChar); fLastSetLiteral = fC.fChar; break; @@ -1752,7 +1752,7 @@ UBool RegexCompile::doParseActions(int32_t action) error(U_REGEX_BAD_ESCAPE_SEQUENCE); } setEval(setUnion); - UnicodeSet *s = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* s = static_cast<UnicodeSet*>(fSetStack.peek()); s->add(fC.fChar); fLastSetLiteral = fC.fChar; break; @@ -1765,7 +1765,7 @@ UBool RegexCompile::doParseActions(int32_t action) { UChar32 c = scanNamedChar(); setEval(setUnion); - UnicodeSet *s = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* s = static_cast<UnicodeSet*>(fSetStack.peek()); s->add(c); fLastSetLiteral = c; break; @@ -1782,7 +1782,7 @@ UBool RegexCompile::doParseActions(int32_t action) if (U_SUCCESS(*fStatus) && (fLastSetLiteral == U_SENTINEL || fLastSetLiteral > c)) { error(U_REGEX_INVALID_RANGE); } - UnicodeSet *s = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* s = static_cast<UnicodeSet*>(fSetStack.peek()); s->add(fLastSetLiteral, c); fLastSetLiteral = c; break; @@ -1821,7 +1821,7 @@ UBool RegexCompile::doParseActions(int32_t action) { UnicodeSet *s = scanPosixProp(); if (s != nullptr) { - UnicodeSet *tos = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* tos = static_cast<UnicodeSet*>(fSetStack.peek()); tos->addAll(*s); delete s; } // else error. scanProp() reported the error status already. @@ -1833,7 +1833,7 @@ UBool RegexCompile::doParseActions(int32_t action) { UnicodeSet *s = scanProp(); if (s != nullptr) { - UnicodeSet *tos = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* tos = static_cast<UnicodeSet*>(fSetStack.peek()); tos->addAll(*s); delete s; } // else error. scanProp() reported the error status already. @@ -1852,7 +1852,7 @@ UBool RegexCompile::doParseActions(int32_t action) if (fLastSetLiteral == U_SENTINEL || fLastSetLiteral > fC.fChar) { error(U_REGEX_INVALID_RANGE); } - UnicodeSet *s = (UnicodeSet *)fSetStack.peek(); + UnicodeSet* s = static_cast<UnicodeSet*>(fSetStack.peek()); s->add(fLastSetLiteral, fC.fChar); break; } @@ -2026,7 +2026,7 @@ void RegexCompile::insertOp(int32_t where) { // were moved down by the insert. Fix them. int32_t loc; for (loc=0; loc<code->size(); loc++) { - int32_t op = (int32_t)code->elementAti(loc); + int32_t op = static_cast<int32_t>(code->elementAti(loc)); int32_t opType = URX_TYPE(op); int32_t opValue = URX_VAL(op); if ((opType == URX_JMP || @@ -2152,7 +2152,7 @@ int32_t RegexCompile::blockTopLoc(UBool reserveLoc) { // No slot for STATE_SAVE was pre-reserved in the compiled code. // We need to make space now. theLoc = fRXPat->fCompiledPat->size()-1; - int32_t opAtTheLoc = (int32_t)fRXPat->fCompiledPat->elementAti(theLoc); + int32_t opAtTheLoc = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(theLoc)); if (URX_TYPE(opAtTheLoc) == URX_STRING_LEN) { // Strings take two opcode, we want the position of the first one. // We can have a string at this point if a single character case-folded to two. @@ -2202,7 +2202,7 @@ void RegexCompile::handleCloseParen() { break; } U_ASSERT(patIdx>0 && patIdx <= fRXPat->fCompiledPat->size()); - patOp = (int32_t)fRXPat->fCompiledPat->elementAti(patIdx); + patOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(patIdx)); U_ASSERT(URX_VAL(patOp) == 0); // Branch target for JMP should not be set. patOp |= fRXPat->fCompiledPat->size(); // Set it now. fRXPat->fCompiledPat->setElementAt(patOp, patIdx); @@ -2230,7 +2230,7 @@ void RegexCompile::handleCloseParen() { // The frame offset of the variables for this cg is obtained from the // start capture op and put it into the end-capture op. { - int32_t captureOp = (int32_t)fRXPat->fCompiledPat->elementAti(fMatchOpenParen+1); + int32_t captureOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(fMatchOpenParen + 1)); U_ASSERT(URX_TYPE(captureOp) == URX_START_CAPTURE); int32_t frameVarLocation = URX_VAL(captureOp); @@ -2242,7 +2242,7 @@ void RegexCompile::handleCloseParen() { // Insert a LD_SP operation to restore the state stack to the position // it was when the atomic parens were entered. { - int32_t stoOp = (int32_t)fRXPat->fCompiledPat->elementAti(fMatchOpenParen+1); + int32_t stoOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(fMatchOpenParen + 1)); U_ASSERT(URX_TYPE(stoOp) == URX_STO_SP); int32_t stoLoc = URX_VAL(stoOp); appendOp(URX_LD_SP, stoLoc); @@ -2251,7 +2251,7 @@ void RegexCompile::handleCloseParen() { case lookAhead: { - int32_t startOp = (int32_t)fRXPat->fCompiledPat->elementAti(fMatchOpenParen-5); + int32_t startOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(fMatchOpenParen - 5)); U_ASSERT(URX_TYPE(startOp) == URX_LA_START); int32_t dataLoc = URX_VAL(startOp); appendOp(URX_LA_END, dataLoc); @@ -2261,7 +2261,7 @@ void RegexCompile::handleCloseParen() { case negLookAhead: { // See comment at doOpenLookAheadNeg - int32_t startOp = (int32_t)fRXPat->fCompiledPat->elementAti(fMatchOpenParen-1); + int32_t startOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(fMatchOpenParen - 1)); U_ASSERT(URX_TYPE(startOp) == URX_LA_START); int32_t dataLoc = URX_VAL(startOp); appendOp(URX_LA_END, dataLoc); @@ -2270,7 +2270,7 @@ void RegexCompile::handleCloseParen() { // Patch the URX_SAVE near the top of the block. // The destination of the SAVE is the final LA_END that was just added. - int32_t saveOp = (int32_t)fRXPat->fCompiledPat->elementAti(fMatchOpenParen); + int32_t saveOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(fMatchOpenParen)); U_ASSERT(URX_TYPE(saveOp) == URX_STATE_SAVE); int32_t dest = fRXPat->fCompiledPat->size()-1; saveOp = buildOp(URX_STATE_SAVE, dest); @@ -2283,7 +2283,7 @@ void RegexCompile::handleCloseParen() { // See comment at doOpenLookBehind. // Append the URX_LB_END and URX_LA_END to the compiled pattern. - int32_t startOp = (int32_t)fRXPat->fCompiledPat->elementAti(fMatchOpenParen-4); + int32_t startOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(fMatchOpenParen - 4)); U_ASSERT(URX_TYPE(startOp) == URX_LB_START); int32_t dataLoc = URX_VAL(startOp); appendOp(URX_LB_END, dataLoc); @@ -2327,7 +2327,7 @@ void RegexCompile::handleCloseParen() { // See comment at doOpenLookBehindNeg. // Append the URX_LBN_END to the compiled pattern. - int32_t startOp = (int32_t)fRXPat->fCompiledPat->elementAti(fMatchOpenParen-5); + int32_t startOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(fMatchOpenParen - 5)); U_ASSERT(URX_TYPE(startOp) == URX_LB_START); int32_t dataLoc = URX_VAL(startOp); appendOp(URX_LBN_END, dataLoc); @@ -2535,7 +2535,7 @@ UBool RegexCompile::compileInlineInterval() { // Pick up the opcode that is to be repeated // - int32_t op = (int32_t)fRXPat->fCompiledPat->elementAti(topOfBlock); + int32_t op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(topOfBlock)); // Compute the pattern location where the inline sequence // will end, and set up the state save op that will be needed. @@ -2718,7 +2718,7 @@ void RegexCompile::matchStartType() { } for (loc = 3; loc<end; loc++) { - op = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); opType = URX_TYPE(op); // The loop is advancing linearly through the pattern. @@ -2785,7 +2785,7 @@ void RegexCompile::matchStartType() { if (currentLen == 0) { int32_t sn = URX_VAL(op); U_ASSERT(sn > 0 && sn < fRXPat->fSets->size()); - const UnicodeSet *s = (UnicodeSet *)fRXPat->fSets->elementAt(sn); + const UnicodeSet* s = static_cast<UnicodeSet*>(fRXPat->fSets->elementAt(sn)); fRXPat->fInitialChars->addAll(*s); numInitialStrings += 2; } @@ -2799,7 +2799,7 @@ void RegexCompile::matchStartType() { if (currentLen == 0) { int32_t sn = URX_VAL(op); U_ASSERT(sn > 0 && sn < fRXPat->fSets->size()); - const UnicodeSet *s = (UnicodeSet *)fRXPat->fSets->elementAt(sn); + const UnicodeSet* s = static_cast<UnicodeSet*>(fRXPat->fSets->elementAt(sn)); fRXPat->fInitialChars->addAll(*s); numInitialStrings += 2; } @@ -2867,7 +2867,7 @@ void RegexCompile::matchStartType() { if (currentLen == 0) { UnicodeSet s; s.applyIntPropertyValue(UCHAR_GENERAL_CATEGORY_MASK, U_GC_ZS_MASK, *fStatus); - s.add((UChar32)9); // Tab + s.add(static_cast<UChar32>(9)); // Tab if (URX_VAL(op) != 0) { s.complement(); } @@ -2883,9 +2883,9 @@ void RegexCompile::matchStartType() { case URX_BACKSLASH_V: // Any line ending code point, with optional negation if (currentLen == 0) { UnicodeSet s; - s.add((UChar32)0x0a, (UChar32)0x0d); // add range - s.add((UChar32)0x85); - s.add((UChar32)0x2028, (UChar32)0x2029); + s.add(static_cast<UChar32>(0x0a), static_cast<UChar32>(0x0d)); // add range + s.add(static_cast<UChar32>(0x85)); + s.add(static_cast<UChar32>(0x2028), static_cast<UChar32>(0x2029)); if (URX_VAL(op) != 0) { // Complement option applies to URX_BACKSLASH_V only. s.complement(); @@ -2995,7 +2995,7 @@ void RegexCompile::matchStartType() { case URX_STRING: { loc++; - int32_t stringLenOp = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + int32_t stringLenOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); int32_t stringLen = URX_VAL(stringLenOp); U_ASSERT(URX_TYPE(stringLenOp) == URX_STRING_LEN); U_ASSERT(stringLenOp >= 2); @@ -3024,7 +3024,7 @@ void RegexCompile::matchStartType() { // attempt a string search for possible match positions. But we // do update the set of possible starting characters. loc++; - int32_t stringLenOp = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + int32_t stringLenOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); int32_t stringLen = URX_VAL(stringLenOp); U_ASSERT(URX_TYPE(stringLenOp) == URX_STRING_LEN); U_ASSERT(stringLenOp >= 2); @@ -3053,9 +3053,9 @@ void RegexCompile::matchStartType() { // move loc forwards to the end of the loop, skipping over the body. // If the min count is > 0, // continue normal processing of the body of the loop. - int32_t loopEndLoc = (int32_t)fRXPat->fCompiledPat->elementAti(loc+1); + int32_t loopEndLoc = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc + 1)); loopEndLoc = URX_VAL(loopEndLoc); - int32_t minLoopCount = (int32_t)fRXPat->fCompiledPat->elementAti(loc+2); + int32_t minLoopCount = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc + 2)); if (minLoopCount == 0) { // Min Loop Count of 0, treat like a forward branch and // move the current minimum length up to the target @@ -3097,7 +3097,7 @@ void RegexCompile::matchStartType() { int32_t depth = (opType == URX_LA_START? 2: 1); for (;;) { loc++; - op = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); if (URX_TYPE(op) == URX_LA_START) { depth+=2; } @@ -3177,7 +3177,7 @@ void RegexCompile::matchStartType() { fRXPat->fStartType = START_CHAR; fRXPat->fInitialChar = fRXPat->fInitialChars->charAt(0); U_ASSERT(fRXPat->fInitialChar != (UChar32)-1); - } else if (fRXPat->fInitialChars->contains((UChar32)0, (UChar32)0x10ffff) == false && + } else if (fRXPat->fInitialChars->contains(static_cast<UChar32>(0), static_cast<UChar32>(0x10ffff)) == false && fRXPat->fMinMatchLen > 0) { // Matches start with a set of character smaller than the set of all chars. fRXPat->fStartType = START_SET; @@ -3230,7 +3230,7 @@ int32_t RegexCompile::minMatchLength(int32_t start, int32_t end) { } for (loc = start; loc<=end; loc++) { - op = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); opType = URX_TYPE(op); // The loop is advancing linearly through the pattern. @@ -3342,7 +3342,7 @@ int32_t RegexCompile::minMatchLength(int32_t start, int32_t end) { case URX_STRING: { loc++; - int32_t stringLenOp = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + int32_t stringLenOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); currentLen = safeIncrement(currentLen, URX_VAL(stringLenOp)); } break; @@ -3368,9 +3368,9 @@ int32_t RegexCompile::minMatchLength(int32_t start, int32_t end) { // move loc forwards to the end of the loop, skipping over the body. // If the min count is > 0, // continue normal processing of the body of the loop. - int32_t loopEndLoc = (int32_t)fRXPat->fCompiledPat->elementAti(loc+1); + int32_t loopEndLoc = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc + 1)); loopEndLoc = URX_VAL(loopEndLoc); - int32_t minLoopCount = (int32_t)fRXPat->fCompiledPat->elementAti(loc+2); + int32_t minLoopCount = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc + 2)); if (minLoopCount == 0) { loc = loopEndLoc; } else { @@ -3405,7 +3405,7 @@ int32_t RegexCompile::minMatchLength(int32_t start, int32_t end) { int32_t depth = (opType == URX_LA_START? 2: 1); for (;;) { loc++; - op = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); if (URX_TYPE(op) == URX_LA_START) { // The boilerplate for look-ahead includes two LA_END instructions, // Depth will be decremented by each one when it is seen. @@ -3499,7 +3499,7 @@ int32_t RegexCompile::maxMatchLength(int32_t start, int32_t end) { } for (loc = start; loc<=end; loc++) { - op = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); opType = URX_TYPE(op); // The loop is advancing linearly through the pattern. @@ -3628,7 +3628,7 @@ int32_t RegexCompile::maxMatchLength(int32_t start, int32_t end) { case URX_STRING: { loc++; - int32_t stringLenOp = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + int32_t stringLenOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); currentLen = safeIncrement(currentLen, URX_VAL(stringLenOp)); break; } @@ -3656,7 +3656,7 @@ int32_t RegexCompile::maxMatchLength(int32_t start, int32_t end) { // { loc++; - int32_t stringLenOp = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + int32_t stringLenOp = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); currentLen = safeIncrement(currentLen, URX_VAL(stringLenOp)); } break; @@ -3683,12 +3683,12 @@ int32_t RegexCompile::maxMatchLength(int32_t start, int32_t end) { U_ASSERT(loopEndLoc >= loc+4); int64_t blockLen = maxMatchLength(loc+4, loopEndLoc-1); // Recursive call. - int64_t updatedLen = (int64_t)currentLen + blockLen * maxLoopCount; + int64_t updatedLen = static_cast<int64_t>(currentLen) + blockLen * maxLoopCount; if (updatedLen >= INT32_MAX) { currentLen = INT32_MAX; break; } - currentLen = (int32_t)updatedLen; + currentLen = static_cast<int32_t>(updatedLen); loc = loopEndLoc; break; } @@ -3725,7 +3725,7 @@ int32_t RegexCompile::maxMatchLength(int32_t start, int32_t end) { // without processing the look-behind block. int32_t dataLoc = URX_VAL(op); for (loc = loc + 1; loc <= end; ++loc) { - op = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); int32_t opType = URX_TYPE(op); if ((opType == URX_LA_END || opType == URX_LBN_END) && (URX_VAL(op) == dataLoc)) { break; @@ -3779,7 +3779,7 @@ void RegexCompile::stripNOPs() { int32_t d = 0; for (loc=0; loc<end; loc++) { deltas.addElement(d, *fStatus); - int32_t op = (int32_t)fRXPat->fCompiledPat->elementAti(loc); + int32_t op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc)); if (URX_TYPE(op) == URX_NOP) { d++; } @@ -3794,7 +3794,7 @@ void RegexCompile::stripNOPs() { int32_t src; int32_t dst = 0; for (src=0; src<end; src++) { - int32_t op = (int32_t)fRXPat->fCompiledPat->elementAti(src); + int32_t op = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(src)); int32_t opType = URX_TYPE(op); switch (opType) { case URX_NOP: @@ -3918,11 +3918,11 @@ void RegexCompile::error(UErrorCode e) { fParseErr->line = 0; fParseErr->offset = -1; } else if (fCharNum > 0x7FFFFFFF) { - fParseErr->line = (int32_t)fLineNum; + fParseErr->line = static_cast<int32_t>(fLineNum); fParseErr->offset = -1; } else { - fParseErr->line = (int32_t)fLineNum; - fParseErr->offset = (int32_t)fCharNum; + fParseErr->line = static_cast<int32_t>(fLineNum); + fParseErr->offset = static_cast<int32_t>(fCharNum); } UErrorCode status = U_ZERO_ERROR; // throwaway status for extracting context @@ -4034,8 +4034,8 @@ void RegexCompile::nextChar(RegexPatternChar &c) { if (fQuoteMode) { c.fQuoted = true; - if ((c.fChar==chBackSlash && peekCharLL()==chE && ((fModeFlags & UREGEX_LITERAL) == 0)) || - c.fChar == (UChar32)-1) { + if ((c.fChar == chBackSlash && peekCharLL() == chE && ((fModeFlags & UREGEX_LITERAL) == 0)) || + c.fChar == static_cast<UChar32>(-1)) { fQuoteMode = false; // Exit quote mode, nextCharLL(); // discard the E // nextChar(c); // recurse to get the real next char @@ -4060,14 +4060,14 @@ void RegexCompile::nextChar(RegexPatternChar &c) { // Scan through any white space and comments, until we // reach a significant character or the end of input. for (;;) { - if (c.fChar == (UChar32)-1) { + if (c.fChar == static_cast<UChar32>(-1)) { break; // End of Input } if (c.fChar == chPound && fEOLComments) { // Start of a comment. Consume the rest of it, until EOF or a new line for (;;) { c.fChar = nextCharLL(); - if (c.fChar == (UChar32)-1 || // EOF + if (c.fChar == static_cast<UChar32>(-1) || // EOF c.fChar == chCR || c.fChar == chLF || c.fChar == chNEL || @@ -4099,8 +4099,8 @@ void RegexCompile::nextChar(RegexPatternChar &c) { c.fQuoted = true; if (UTEXT_FULL_TEXT_IN_CHUNK(fRXPat->fPattern, fPatternLength)) { - int32_t endIndex = (int32_t)pos; - c.fChar = u_unescapeAt(uregex_ucstr_unescape_charAt, &endIndex, (int32_t)fPatternLength, (void *)fRXPat->fPattern->chunkContents); + int32_t endIndex = static_cast<int32_t>(pos); + c.fChar = u_unescapeAt(uregex_ucstr_unescape_charAt, &endIndex, static_cast<int32_t>(fPatternLength), const_cast<char16_t*>(fRXPat->fPattern->chunkContents)); if (endIndex == pos) { error(U_REGEX_BAD_ESCAPE_SEQUENCE); @@ -4220,7 +4220,7 @@ UChar32 RegexCompile::scanNamedChar() { char name[100]; if (!uprv_isInvariantUString(charName.getBuffer(), charName.length()) || - (uint32_t)charName.length()>=sizeof(name)) { + static_cast<uint32_t>(charName.length()) >= sizeof(name)) { // All Unicode character names have only invariant characters. // The API to get a character, given a name, accepts only char *, forcing us to convert, // which requires this error check @@ -4618,7 +4618,7 @@ void RegexCompile::setEval(int32_t nextOp) { } fSetOpStack.popi(); U_ASSERT(fSetStack.empty() == false); - rightOperand = (UnicodeSet *)fSetStack.peek(); + rightOperand = static_cast<UnicodeSet*>(fSetStack.peek()); // ICU 70 adds emoji properties of strings, but createSetForProperty() removes all strings // (see comments there). // We also do not yet support string literals in character classes, @@ -4638,20 +4638,20 @@ void RegexCompile::setEval(int32_t nextOp) { case setDifference1: case setDifference2: fSetStack.pop(); - leftOperand = (UnicodeSet *)fSetStack.peek(); + leftOperand = static_cast<UnicodeSet*>(fSetStack.peek()); leftOperand->removeAll(*rightOperand); delete rightOperand; break; case setIntersection1: case setIntersection2: fSetStack.pop(); - leftOperand = (UnicodeSet *)fSetStack.peek(); + leftOperand = static_cast<UnicodeSet*>(fSetStack.peek()); leftOperand->retainAll(*rightOperand); delete rightOperand; break; case setUnion: fSetStack.pop(); - leftOperand = (UnicodeSet *)fSetStack.peek(); + leftOperand = static_cast<UnicodeSet*>(fSetStack.peek()); leftOperand->addAll(*rightOperand); delete rightOperand; break; diff --git a/deps/icu-small/source/i18n/regeximp.cpp b/deps/icu-small/source/i18n/regeximp.cpp index 86e238c0f7150c..59dba630482a24 100644 --- a/deps/icu-small/source/i18n/regeximp.cpp +++ b/deps/icu-small/source/i18n/regeximp.cpp @@ -41,7 +41,7 @@ UChar32 CaseFoldingUTextIterator::next() { if (fFoldLength < 0) { fFoldLength = ~fFoldLength; } - foldedC = (UChar32)fFoldLength; + foldedC = static_cast<UChar32>(fFoldLength); fFoldChars = nullptr; return foldedC; } @@ -89,7 +89,7 @@ UChar32 CaseFoldingUCharIterator::next() { if (fFoldLength < 0) { fFoldLength = ~fFoldLength; } - foldedC = (UChar32)fFoldLength; + foldedC = static_cast<UChar32>(fFoldLength); fFoldChars = nullptr; return foldedC; } diff --git a/deps/icu-small/source/i18n/region.cpp b/deps/icu-small/source/i18n/region.cpp index 839a252e120a11..ad5bdbe0115dc7 100644 --- a/deps/icu-small/source/i18n/region.cpp +++ b/deps/icu-small/source/i18n/region.cpp @@ -172,7 +172,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { if ( U_FAILURE(status) ) { return; } - UnicodeString *regionName = (UnicodeString *)allRegions->elementAt(i); + UnicodeString* regionName = static_cast<UnicodeString*>(allRegions->elementAt(i)); r->idStr = *regionName; r->idStr.extract(0,r->idStr.length(),r->id,sizeof(r->id),US_INV); @@ -203,7 +203,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { if (U_FAILURE(status)) { break; } - Region *grouping = (Region *) uhash_get(newRegionIDMap.getAlias(), groupingName); + Region* grouping = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), groupingName)); if (grouping != nullptr) { for (int32_t i = 0; i < ures_getSize(groupingBundle) && U_SUCCESS(status); i++) { UnicodeString child = ures_getUnicodeStringByIndex(groupingBundle, i, &status); @@ -232,8 +232,8 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { UnicodeString aliasTo = ures_getUnicodeStringByKey(res.getAlias(),"replacement",&status); res.adoptInstead(nullptr); - const Region *aliasToRegion = (Region *) uhash_get(newRegionIDMap.getAlias(),&aliasTo); - Region *aliasFromRegion = (Region *)uhash_get(newRegionIDMap.getAlias(),aliasFromStr.getAlias()); + const Region* aliasToRegion = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), &aliasTo)); + Region* aliasFromRegion = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), aliasFromStr.getAlias())); if ( aliasToRegion != nullptr && aliasFromRegion == nullptr ) { // This is just an alias from some string to a region uhash_put(newRegionAliases.getAlias(),(void *)aliasFromStr.orphan(), (void *)aliasToRegion,&status); @@ -275,7 +275,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { currentRegion.append(aliasTo.charAt(i)); } if ( aliasTo.charAt(i) == 0x0020 || i+1 == aliasTo.length() ) { - Region *target = (Region *)uhash_get(newRegionIDMap.getAlias(),(void *)¤tRegion); + Region* target = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), ¤tRegion)); if (target) { LocalPointer<UnicodeString> preferredValue(new UnicodeString(target->idStr), status); aliasFromRegion->preferredValues->adoptElement(preferredValue.orphan(),status); // may add null if err @@ -294,7 +294,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { UnicodeString codeMappingNumber = ures_getUnicodeStringByIndex(mapping,1,&status); UnicodeString codeMapping3Letter = ures_getUnicodeStringByIndex(mapping,2,&status); - Region *r = (Region *)uhash_get(newRegionIDMap.getAlias(),(void *)&codeMappingID); + Region* r = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), &codeMappingID)); if ( r ) { int32_t pos = 0; int32_t result = ICU_Utility::parseAsciiInteger(codeMappingNumber, pos); @@ -312,26 +312,26 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { // Now fill in the special cases for WORLD, UNKNOWN, CONTINENTS, and GROUPINGS Region *r; UnicodeString WORLD_ID_STRING(WORLD_ID); - r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&WORLD_ID_STRING); + r = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), &WORLD_ID_STRING)); if ( r ) { r->fType = URGN_WORLD; } UnicodeString UNKNOWN_REGION_ID_STRING(UNKNOWN_REGION_ID); - r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&UNKNOWN_REGION_ID_STRING); + r = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), &UNKNOWN_REGION_ID_STRING)); if ( r ) { r->fType = URGN_UNKNOWN; } for ( int32_t i = 0 ; i < continents->size() ; i++ ) { - r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)continents->elementAt(i)); + r = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), continents->elementAt(i))); if ( r ) { r->fType = URGN_CONTINENT; } } for ( int32_t i = 0 ; i < groupings->size() ; i++ ) { - r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)groupings->elementAt(i)); + r = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), groupings->elementAt(i))); if ( r ) { r->fType = URGN_GROUPING; } @@ -341,7 +341,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { // even though it looks like a territory code. Need to handle it here. UnicodeString OUTLYING_OCEANIA_REGION_ID_STRING(OUTLYING_OCEANIA_REGION_ID); - r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&OUTLYING_OCEANIA_REGION_ID_STRING); + r = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), &OUTLYING_OCEANIA_REGION_ID_STRING)); if ( r ) { r->fType = URGN_SUBCONTINENT; } @@ -358,11 +358,11 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { // #11232 is to do something useful with these. } UnicodeString parentStr = UnicodeString(parent, -1 , US_INV); - Region *parentRegion = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&parentStr); + Region* parentRegion = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), &parentStr)); for ( int j = 0 ; j < ures_getSize(mapping.getAlias()); j++ ) { UnicodeString child = ures_getUnicodeStringByIndex(mapping.getAlias(),j,&status); - Region *childRegion = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&child); + Region* childRegion = static_cast<Region*>(uhash_get(newRegionIDMap.getAlias(), &child)); if ( parentRegion != nullptr && childRegion != nullptr ) { // Add the child region to the set of regions contained by the parent @@ -398,7 +398,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { // Create the availableRegions lists int32_t pos = UHASH_FIRST; while ( const UHashElement* element = uhash_nextElement(newRegionIDMap.getAlias(),&pos)) { - Region *ar = (Region *)element->value.pointer; + Region* ar = static_cast<Region*>(element->value.pointer); if ( availableRegions[ar->fType] == nullptr ) { LocalPointer<UVector> newAr(new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status); availableRegions[ar->fType] = newAr.orphan(); @@ -497,10 +497,10 @@ Region::getInstance(const char *region_code, UErrorCode &status) { } UnicodeString regionCodeString = UnicodeString(region_code, -1, US_INV); - Region *r = (Region *)uhash_get(regionIDMap,(void *)®ionCodeString); + Region* r = static_cast<Region*>(uhash_get(regionIDMap, ®ionCodeString)); if ( !r ) { - r = (Region *)uhash_get(regionAliases,(void *)®ionCodeString); + r = static_cast<Region*>(uhash_get(regionAliases, ®ionCodeString)); } if ( !r ) { // Unknown region code @@ -512,7 +512,7 @@ Region::getInstance(const char *region_code, UErrorCode &status) { StringEnumeration *pv = r->getPreferredValues(status); pv->reset(status); const UnicodeString *ustr = pv->snext(status); - r = (Region *)uhash_get(regionIDMap,(void *)ustr); + r = static_cast<Region*>(uhash_get(regionIDMap, ustr)); delete pv; } @@ -532,12 +532,12 @@ Region::getInstance (int32_t code, UErrorCode &status) { return nullptr; } - Region *r = (Region *)uhash_iget(numericCodeMap,code); + Region* r = static_cast<Region*>(uhash_iget(numericCodeMap, code)); if ( !r ) { // Just in case there's an alias that's numeric, try to find it. UnicodeString id; ICU_Utility::appendNumber(id, code, 10, 1); - r = (Region *)uhash_get(regionAliases,&id); + r = static_cast<Region*>(uhash_get(regionAliases, &id)); } if( U_FAILURE(status) ) { @@ -553,7 +553,7 @@ Region::getInstance (int32_t code, UErrorCode &status) { StringEnumeration *pv = r->getPreferredValues(status); pv->reset(status); const UnicodeString *ustr = pv->snext(status); - r = (Region *)uhash_get(regionIDMap,(void *)ustr); + r = static_cast<Region*>(uhash_get(regionIDMap, ustr)); delete pv; } @@ -670,8 +670,8 @@ Region::contains(const Region &other) const { return true; } else { for ( int32_t i = 0 ; i < containedRegions->size() ; i++ ) { - UnicodeString *crStr = (UnicodeString *)containedRegions->elementAt(i); - Region *cr = (Region *) uhash_get(regionIDMap,(void *)crStr); + UnicodeString* crStr = static_cast<UnicodeString*>(containedRegions->elementAt(i)); + Region* cr = static_cast<Region*>(uhash_get(regionIDMap, crStr)); if ( cr && cr->contains(other) ) { return true; } @@ -725,7 +725,7 @@ RegionNameEnumeration::RegionNameEnumeration(UVector *nameList, UErrorCode& stat LocalPointer<UVector> regionNames( new UVector(uprv_deleteUObject, uhash_compareUnicodeString, nameList->size(), status), status); for ( int32_t i = 0 ; U_SUCCESS(status) && i < nameList->size() ; i++ ) { - UnicodeString* this_region_name = (UnicodeString *)nameList->elementAt(i); + UnicodeString* this_region_name = static_cast<UnicodeString*>(nameList->elementAt(i)); LocalPointer<UnicodeString> new_region_name(new UnicodeString(*this_region_name), status); regionNames->adoptElement(new_region_name.orphan(), status); } @@ -740,7 +740,7 @@ RegionNameEnumeration::snext(UErrorCode& status) { if (U_FAILURE(status) || (fRegionNames==nullptr)) { return nullptr; } - const UnicodeString* nextStr = (const UnicodeString *)fRegionNames->elementAt(pos); + const UnicodeString* nextStr = static_cast<const UnicodeString*>(fRegionNames->elementAt(pos)); if (nextStr!=nullptr) { pos++; } diff --git a/deps/icu-small/source/i18n/reldatefmt.cpp b/deps/icu-small/source/i18n/reldatefmt.cpp index c3c450f376c26b..fa1adfa78726c3 100644 --- a/deps/icu-small/source/i18n/reldatefmt.cpp +++ b/deps/icu-small/source/i18n/reldatefmt.cpp @@ -1161,7 +1161,8 @@ void RelativeDateTimeFormatter::formatRelativeImpl( if (offset > -2.1 && offset < 2.1) { // Allow a 1% epsilon, so offsets in -1.01..-0.99 map to LAST double offsetx100 = offset * 100.0; - int32_t intoffset = (offsetx100 < 0)? (int32_t)(offsetx100-0.5) : (int32_t)(offsetx100+0.5); + int32_t intoffset = offsetx100 < 0 ? static_cast<int32_t>(offsetx100 - 0.5) + : static_cast<int32_t>(offsetx100 + 0.5); switch (intoffset) { case -200/*-2*/: direction = UDAT_DIRECTION_LAST_2; break; case -100/*-1*/: direction = UDAT_DIRECTION_LAST; break; @@ -1447,8 +1448,8 @@ ureldatefmt_combineDateAndTime( const URelativeDateTimeFormatter* reldatefmt, *status = U_ILLEGAL_ARGUMENT_ERROR; return 0; } - UnicodeString relDateStr((UBool)(relativeDateStringLen == -1), relativeDateString, relativeDateStringLen); - UnicodeString timeStr((UBool)(timeStringLen == -1), timeString, timeStringLen); + UnicodeString relDateStr(relativeDateStringLen == -1, relativeDateString, relativeDateStringLen); + UnicodeString timeStr(timeStringLen == -1, timeString, timeStringLen); UnicodeString res(result, 0, resultCapacity); ((RelativeDateTimeFormatter*)reldatefmt)->combineDateAndTime(relDateStr, timeStr, res, *status); if (U_FAILURE(*status)) { diff --git a/deps/icu-small/source/i18n/reldtfmt.cpp b/deps/icu-small/source/i18n/reldtfmt.cpp index 7015c13089986a..6b41af8f13ef33 100644 --- a/deps/icu-small/source/i18n/reldtfmt.cpp +++ b/deps/icu-small/source/i18n/reldtfmt.cpp @@ -57,7 +57,7 @@ RelativeDateFormat::RelativeDateFormat(const RelativeDateFormat& other) : fCombinedFormat = new SimpleFormatter(*other.fCombinedFormat); } if (fDatesLen > 0) { - fDates = (URelativeString*) uprv_malloc(sizeof(fDates[0])*(size_t)fDatesLen); + fDates = static_cast<URelativeString*>(uprv_malloc(sizeof(fDates[0]) * static_cast<size_t>(fDatesLen))); uprv_memcpy(fDates, other.fDates, sizeof(fDates[0])*(size_t)fDatesLen); } #if !UCONFIG_NO_BREAK_ITERATION @@ -92,12 +92,12 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS status = U_ILLEGAL_ARGUMENT_ERROR; return; } - UDateFormatStyle baseDateStyle = (dateStyle > UDAT_SHORT)? (UDateFormatStyle)(dateStyle & ~UDAT_RELATIVE): dateStyle; + UDateFormatStyle baseDateStyle = (dateStyle > UDAT_SHORT) ? static_cast<UDateFormatStyle>(dateStyle & ~UDAT_RELATIVE) : dateStyle; DateFormat * df; // Get fDateTimeFormatter from either date or time style (does not matter, we will override the pattern). // We do need to get separate patterns for the date & time styles. if (baseDateStyle != UDAT_NONE) { - df = createDateInstance((EStyle)baseDateStyle, locale); + df = createDateInstance(static_cast<EStyle>(baseDateStyle), locale); fDateTimeFormatter=dynamic_cast<SimpleDateFormat *>(df); if (fDateTimeFormatter == nullptr) { status = U_UNSUPPORTED_ERROR; @@ -105,7 +105,7 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS } fDateTimeFormatter->toPattern(fDatePattern); if (timeStyle != UDAT_NONE) { - df = createTimeInstance((EStyle)timeStyle, locale); + df = createTimeInstance(static_cast<EStyle>(timeStyle), locale); SimpleDateFormat *sdf = dynamic_cast<SimpleDateFormat *>(df); if (sdf != nullptr) { sdf->toPattern(fTimePattern); @@ -114,7 +114,7 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS } } else { // does not matter whether timeStyle is UDAT_NONE, we need something for fDateTimeFormatter - df = createTimeInstance((EStyle)timeStyle, locale); + df = createTimeInstance(static_cast<EStyle>(timeStyle), locale); fDateTimeFormatter=dynamic_cast<SimpleDateFormat *>(df); if (fDateTimeFormatter == nullptr) { status = U_UNSUPPORTED_ERROR; @@ -157,7 +157,7 @@ bool RelativeDateFormat::operator==(const Format& other) const { return false; } -static const char16_t APOSTROPHE = (char16_t)0x0027; +static const char16_t APOSTROPHE = static_cast<char16_t>(0x0027); UnicodeString& RelativeDateFormat::format( Calendar& cal, UnicodeString& appendTo, @@ -503,7 +503,7 @@ struct RelDateFmtDataSink : public ResourceSink { // Put in the proper spot, but don't override existing data. n = offset + UDAT_DIRECTION_THIS; // Converts to index in UDAT_R - if (n < fDatesLen && fDatesPtr[n].string == nullptr) { + if (0 <= n && n < fDatesLen && fDatesPtr[n].string == nullptr) { // Not found and n is an empty slot. fDatesPtr[n].offset = offset; fDatesPtr[n].string = value.getString(len, errorCode); @@ -536,8 +536,8 @@ void RelativeDateFormat::loadDates(UErrorCode &status) { int32_t glueIndex = kDateTime; if (patternsSize >= (kDateTimeOffset + kShort + 1)) { int32_t offsetIncrement = (fDateStyle & ~kRelative); // Remove relative bit. - if (offsetIncrement >= (int32_t)kFull && - offsetIncrement <= (int32_t)kShortRelative) { + if (offsetIncrement >= static_cast<int32_t>(kFull) && + offsetIncrement <= static_cast<int32_t>(kShortRelative)) { glueIndex = kDateTimeOffset + offsetIncrement; } } @@ -552,7 +552,7 @@ void RelativeDateFormat::loadDates(UErrorCode &status) { // Data loading for relative names, e.g., "yesterday", "today", "tomorrow". fDatesLen = UDAT_DIRECTION_COUNT; // Maximum defined by data. - fDates = (URelativeString*) uprv_malloc(sizeof(fDates[0])*fDatesLen); + fDates = static_cast<URelativeString*>(uprv_malloc(sizeof(fDates[0]) * fDatesLen)); RelDateFmtDataSink sink(fDates, fDatesLen); ures_getAllItemsWithFallback(rb, "fields/day/relative", sink, status); diff --git a/deps/icu-small/source/i18n/rematch.cpp b/deps/icu-small/source/i18n/rematch.cpp index c76f0c55bcbe49..7864dffa4631c4 100644 --- a/deps/icu-small/source/i18n/rematch.cpp +++ b/deps/icu-small/source/i18n/rematch.cpp @@ -242,7 +242,7 @@ void RegexMatcher::init2(UText *input, UErrorCode &status) { } if (fPattern->fDataSize > UPRV_LENGTHOF(fSmallData)) { - fData = (int64_t *)uprv_malloc(fPattern->fDataSize * sizeof(int64_t)); + fData = static_cast<int64_t*>(uprv_malloc(fPattern->fDataSize * sizeof(int64_t))); if (fData == nullptr) { status = fDeferredStatus = U_MEMORY_ALLOCATION_ERROR; return; @@ -317,16 +317,16 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest, if (fMatchStart > fAppendPosition) { if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { destLen += utext_replace(dest, destLen, destLen, fInputText->chunkContents+fAppendPosition, - (int32_t)(fMatchStart-fAppendPosition), &status); + static_cast<int32_t>(fMatchStart - fAppendPosition), &status); } else { int32_t len16; if (UTEXT_USES_U16(fInputText)) { - len16 = (int32_t)(fMatchStart-fAppendPosition); + len16 = static_cast<int32_t>(fMatchStart - fAppendPosition); } else { UErrorCode lengthStatus = U_ZERO_ERROR; len16 = utext_extract(fInputText, fAppendPosition, fMatchStart, nullptr, 0, &lengthStatus); } - char16_t *inputChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(len16+1)); + char16_t* inputChars = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (len16 + 1))); if (inputChars == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return *this; @@ -360,9 +360,9 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest, int32_t offset = 0; struct URegexUTextUnescapeCharContext context = U_REGEX_UTEXT_UNESCAPE_CONTEXT(replacement); UChar32 escapedChar = u_unescapeAt(uregex_utext_unescape_charAt, &offset, INT32_MAX, &context); - if (escapedChar != (UChar32)0xFFFFFFFF) { + if (escapedChar != static_cast<UChar32>(0xFFFFFFFF)) { if (U_IS_BMP(escapedChar)) { - char16_t c16 = (char16_t)escapedChar; + char16_t c16 = static_cast<char16_t>(escapedChar); destLen += utext_replace(dest, destLen, destLen, &c16, 1, &status); } else { char16_t surrogate[2]; @@ -384,7 +384,7 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest, (void)UTEXT_NEXT32(replacement); // Plain backslash escape. Just put out the escaped character. if (U_IS_BMP(c)) { - char16_t c16 = (char16_t)c; + char16_t c16 = static_cast<char16_t>(c); destLen += utext_replace(dest, destLen, destLen, &c16, 1, &status); } else { char16_t surrogate[2]; @@ -398,7 +398,7 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest, } else if (c != DOLLARSIGN) { // Normal char, not a $. Copy it out without further checks. if (U_IS_BMP(c)) { - char16_t c16 = (char16_t)c; + char16_t c16 = static_cast<char16_t>(c); destLen += utext_replace(dest, destLen, destLen, &c16, 1, &status); } else { char16_t surrogate[2]; @@ -516,17 +516,17 @@ UText *RegexMatcher::appendTail(UText *dest, UErrorCode &status) { if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { int64_t destLen = utext_nativeLength(dest); utext_replace(dest, destLen, destLen, fInputText->chunkContents+fAppendPosition, - (int32_t)(fInputLength-fAppendPosition), &status); + static_cast<int32_t>(fInputLength - fAppendPosition), &status); } else { int32_t len16; if (UTEXT_USES_U16(fInputText)) { - len16 = (int32_t)(fInputLength-fAppendPosition); + len16 = static_cast<int32_t>(fInputLength - fAppendPosition); } else { len16 = utext_extract(fInputText, fAppendPosition, fInputLength, nullptr, 0, &status); status = U_ZERO_ERROR; // buffer overflow } - char16_t *inputChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(len16)); + char16_t* inputChars = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (len16))); if (inputChars == nullptr) { fDeferredStatus = U_MEMORY_ALLOCATION_ERROR; } else { @@ -583,7 +583,7 @@ int64_t RegexMatcher::end64(int32_t group, UErrorCode &err) const { } int32_t RegexMatcher::end(int32_t group, UErrorCode &err) const { - return (int32_t)end64(group, err); + return static_cast<int32_t>(end64(group, err)); } //-------------------------------------------------------------------------------- @@ -926,9 +926,9 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { // matcher has been reset. // - int32_t startPos = (int32_t)fMatchEnd; + int32_t startPos = static_cast<int32_t>(fMatchEnd); if (startPos==0) { - startPos = (int32_t)fActiveStart; + startPos = static_cast<int32_t>(fActiveStart); } const char16_t *inputBuf = fInputText->chunkContents; @@ -963,7 +963,7 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { // Note: some patterns that cannot match anything will have fMinMatchLength==Max Int. // Be aware of possible overflows if making changes here. // Note: a match can begin at inputBuf + testLen; it is an inclusive limit. - int32_t testLen = (int32_t)(fActiveLimit - fPattern->fMinMatchLen); + int32_t testLen = static_cast<int32_t>(fActiveLimit - fPattern->fMinMatchLen); if (startPos > testLen) { fMatch = false; fHitEnd = true; @@ -1283,16 +1283,16 @@ int64_t RegexMatcher::appendGroup(int32_t groupNum, UText *dest, UErrorCode &sta int64_t deltaLen; if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { U_ASSERT(e <= fInputLength); - deltaLen = utext_replace(dest, destLen, destLen, fInputText->chunkContents+s, (int32_t)(e-s), &status); + deltaLen = utext_replace(dest, destLen, destLen, fInputText->chunkContents + s, static_cast<int32_t>(e - s), &status); } else { int32_t len16; if (UTEXT_USES_U16(fInputText)) { - len16 = (int32_t)(e-s); + len16 = static_cast<int32_t>(e - s); } else { UErrorCode lengthStatus = U_ZERO_ERROR; len16 = utext_extract(fInputText, s, e, nullptr, 0, &lengthStatus); } - char16_t *groupChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(len16+1)); + char16_t* groupChars = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (len16 + 1))); if (groupChars == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return 0; @@ -1357,7 +1357,7 @@ const UnicodeString &RegexMatcher::input() const { UErrorCode status = U_ZERO_ERROR; int32_t len16; if (UTEXT_USES_U16(fInputText)) { - len16 = (int32_t)fInputLength; + len16 = static_cast<int32_t>(fInputLength); } else { len16 = utext_extract(fInputText, 0, fInputLength, nullptr, 0, &status); status = U_ZERO_ERROR; // overflow, length status @@ -1368,7 +1368,7 @@ const UnicodeString &RegexMatcher::input() const { utext_extract(fInputText, 0, fInputLength, inputChars, len16, &status); // unterminated warning result->releaseBuffer(len16); - (*(const UnicodeString **)&fInput) = result; // pointer assignment, rather than operator= + *const_cast<const UnicodeString**>(&fInput) = result; // pointer assignment, rather than operator= } return *fInput; @@ -1400,16 +1400,16 @@ UText *RegexMatcher::getInput (UText *dest, UErrorCode &status) const { if (dest) { if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - utext_replace(dest, 0, utext_nativeLength(dest), fInputText->chunkContents, (int32_t)fInputLength, &status); + utext_replace(dest, 0, utext_nativeLength(dest), fInputText->chunkContents, static_cast<int32_t>(fInputLength), &status); } else { int32_t input16Len; if (UTEXT_USES_U16(fInputText)) { - input16Len = (int32_t)fInputLength; + input16Len = static_cast<int32_t>(fInputLength); } else { UErrorCode lengthStatus = U_ZERO_ERROR; input16Len = utext_extract(fInputText, 0, fInputLength, nullptr, 0, &lengthStatus); // buffer overflow error } - char16_t *inputChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(input16Len)); + char16_t* inputChars = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (input16Len))); if (inputChars == nullptr) { return dest; } @@ -1478,7 +1478,7 @@ UBool RegexMatcher::lookingAt(UErrorCode &status) { resetPreserveRegion(); } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - MatchChunkAt((int32_t)fActiveStart, false, status); + MatchChunkAt(static_cast<int32_t>(fActiveStart), false, status); } else { MatchAt(fActiveStart, false, status); } @@ -1516,7 +1516,7 @@ UBool RegexMatcher::lookingAt(int64_t start, UErrorCode &status) { } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - MatchChunkAt((int32_t)nativeStart, false, status); + MatchChunkAt(static_cast<int32_t>(nativeStart), false, status); } else { MatchAt(nativeStart, false, status); } @@ -1550,7 +1550,7 @@ UBool RegexMatcher::matches(UErrorCode &status) { } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - MatchChunkAt((int32_t)fActiveStart, true, status); + MatchChunkAt(static_cast<int32_t>(fActiveStart), true, status); } else { MatchAt(fActiveStart, true, status); } @@ -1588,7 +1588,7 @@ UBool RegexMatcher::matches(int64_t start, UErrorCode &status) { } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - MatchChunkAt((int32_t)nativeStart, true, status); + MatchChunkAt(static_cast<int32_t>(nativeStart), true, status); } else { MatchAt(nativeStart, true, status); } @@ -1666,7 +1666,7 @@ RegexMatcher &RegexMatcher::region(int64_t start, int64_t limit, UErrorCode &sta // //-------------------------------------------------------------------------------- int32_t RegexMatcher::regionEnd() const { - return (int32_t)fRegionLimit; + return static_cast<int32_t>(fRegionLimit); } int64_t RegexMatcher::regionEnd64() const { @@ -1679,7 +1679,7 @@ int64_t RegexMatcher::regionEnd64() const { // //-------------------------------------------------------------------------------- int32_t RegexMatcher::regionStart() const { - return (int32_t)fRegionStart; + return static_cast<int32_t>(fRegionStart); } int64_t RegexMatcher::regionStart64() const { @@ -2050,7 +2050,7 @@ int32_t RegexMatcher::split(const UnicodeString &input, return 0; } - UText **destText = (UText **)uprv_malloc(sizeof(UText*)*destCapacity); + UText** destText = static_cast<UText**>(uprv_malloc(sizeof(UText*) * destCapacity)); if (destText == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return 0; @@ -2119,7 +2119,7 @@ int32_t RegexMatcher::split(UText *input, if (dest[i]) { utext_replace(dest[i], 0, utext_nativeLength(dest[i]), input->chunkContents+nextOutputStringStart, - (int32_t)(fActiveLimit-nextOutputStringStart), &status); + static_cast<int32_t>(fActiveLimit - nextOutputStringStart), &status); } else { UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart, @@ -2131,7 +2131,7 @@ int32_t RegexMatcher::split(UText *input, UErrorCode lengthStatus = U_ZERO_ERROR; int32_t remaining16Length = utext_extract(input, nextOutputStringStart, fActiveLimit, nullptr, 0, &lengthStatus); - char16_t *remainingChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(remaining16Length+1)); + char16_t* remainingChars = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (remaining16Length + 1))); if (remainingChars == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; break; @@ -2159,7 +2159,7 @@ int32_t RegexMatcher::split(UText *input, if (dest[i]) { utext_replace(dest[i], 0, utext_nativeLength(dest[i]), input->chunkContents+nextOutputStringStart, - (int32_t)(fMatchStart-nextOutputStringStart), &status); + static_cast<int32_t>(fMatchStart - nextOutputStringStart), &status); } else { UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart, @@ -2170,7 +2170,7 @@ int32_t RegexMatcher::split(UText *input, } else { UErrorCode lengthStatus = U_ZERO_ERROR; int32_t remaining16Length = utext_extract(input, nextOutputStringStart, fMatchStart, nullptr, 0, &lengthStatus); - char16_t *remainingChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(remaining16Length+1)); + char16_t* remainingChars = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (remaining16Length + 1))); if (remainingChars == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; break; @@ -2213,7 +2213,7 @@ int32_t RegexMatcher::split(UText *input, if (dest[i] == nullptr) { dest[i] = utext_openUChars(nullptr, nullptr, 0, &status); } else { - static const char16_t emptyString[] = {(char16_t)0}; + static const char16_t emptyString[] = {static_cast<char16_t>(0)}; utext_replace(dest[i], 0, utext_nativeLength(dest[i]), emptyString, 0, &status); } } @@ -2229,7 +2229,7 @@ int32_t RegexMatcher::split(UText *input, if (dest[i]) { utext_replace(dest[i], 0, utext_nativeLength(dest[i]), input->chunkContents+nextOutputStringStart, - (int32_t)(fActiveLimit-nextOutputStringStart), &status); + static_cast<int32_t>(fActiveLimit - nextOutputStringStart), &status); } else { UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart, @@ -2240,7 +2240,7 @@ int32_t RegexMatcher::split(UText *input, } else { UErrorCode lengthStatus = U_ZERO_ERROR; int32_t remaining16Length = utext_extract(input, nextOutputStringStart, fActiveLimit, nullptr, 0, &lengthStatus); - char16_t *remainingChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(remaining16Length+1)); + char16_t* remainingChars = static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (remaining16Length + 1))); if (remainingChars == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; break; @@ -2318,7 +2318,7 @@ int64_t RegexMatcher::start64(int32_t group, UErrorCode &status) const { int32_t RegexMatcher::start(int32_t group, UErrorCode &status) const { - return (int32_t)start64(group, status); + return static_cast<int32_t>(start64(group, status)); } //-------------------------------------------------------------------------------- @@ -2512,7 +2512,7 @@ REStackFrame *RegexMatcher::resetStack() { // where they indicate that a group has not yet matched anything. fStack->removeAllElements(); - REStackFrame *iFrame = (REStackFrame *)fStack->reserveBlock(fPattern->fFrameSize, fDeferredStatus); + REStackFrame* iFrame = reinterpret_cast<REStackFrame*>(fStack->reserveBlock(fPattern->fFrameSize, fDeferredStatus)); if(U_FAILURE(fDeferredStatus)) { return nullptr; } @@ -2650,7 +2650,7 @@ UBool RegexMatcher::isUWordBoundary(int64_t pos, UErrorCode &status) { // words are not boundaries. All non-word chars stand by themselves, // with word boundaries on both sides. } else { - returnVal = fWordBreakItr->isBoundary((int32_t)pos); + returnVal = fWordBreakItr->isBoundary(static_cast<int32_t>(pos)); } #endif return returnVal; @@ -2743,10 +2743,10 @@ inline REStackFrame *RegexMatcher::StateSave(REStackFrame *fp, int64_t savePatId // be looked at again. return fp; } - fp = (REStackFrame *)(newFP - fFrameSize); // in case of realloc of stack. + fp = reinterpret_cast<REStackFrame*>(newFP - fFrameSize); // in case of realloc of stack. // New stack frame = copy of old top frame. - int64_t *source = (int64_t *)fp; + int64_t* source = reinterpret_cast<int64_t*>(fp); int64_t *dest = newFP; for (;;) { *dest++ = *source++; @@ -2760,7 +2760,7 @@ inline REStackFrame *RegexMatcher::StateSave(REStackFrame *fp, int64_t savePatId IncrementTime(status); // Re-initializes fTickCounter } fp->fPatIdx = savePatIdx; - return (REStackFrame *)newFP; + return reinterpret_cast<REStackFrame*>(newFP); } #if defined(REGEX_DEBUG) @@ -2833,7 +2833,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // One iteration of the loop per pattern operation performed. // for (;;) { - op = (int32_t)pat[fp->fPatIdx]; + op = static_cast<int32_t>(pat[fp->fPatIdx]); opType = URX_TYPE(op); opValue = URX_VAL(op); #ifdef REGEX_RUN_DEBUG @@ -2857,7 +2857,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Force a backtrack. In some circumstances, the pattern compiler // will notice that the pattern can't possibly match anything, and will // emit one of these at that point. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; @@ -2872,7 +2872,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } else { fHitEnd = true; } - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; @@ -2883,7 +2883,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // offset to the string text, and one for the length. int32_t stringStartIdx = opValue; - op = (int32_t)pat[fp->fPatIdx]; // Fetch the second operand + op = static_cast<int32_t>(pat[fp->fPatIdx]); // Fetch the second operand fp->fPatIdx++; opType = URX_TYPE(op); int32_t stringLen = URX_VAL(op); @@ -2913,7 +2913,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (success) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -2929,7 +2929,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // when we reach the end of the pattern. if (toEnd && fp->fInputIdx != fActiveLimit) { // The pattern matched, but not to the end of input. Try some more. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } isMatch = true; @@ -2990,7 +2990,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } } - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -3013,7 +3013,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } // Not at end of input. Back-track out. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; @@ -3038,7 +3038,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } } // not at a new line. Fail. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -3055,7 +3055,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // It makes no difference where the new-line is within the input. UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); if (UTEXT_CURRENT32(fInputText) != 0x0a) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3063,7 +3063,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_CARET: // ^, test for start of line if (fp->fInputIdx != fAnchorStart) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -3084,7 +3084,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { break; } // Not at the start of a line. Fail. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -3102,7 +3102,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UChar32 c = UTEXT_PREVIOUS32(fInputText); if (c != 0x0a) { // Not at the start of a line. Back-track out. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3110,9 +3110,9 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_B: // Test for word boundaries { UBool success = isWordBoundary(fp->fInputIdx); - success ^= (UBool)(opValue != 0); // flip sense for \B + success ^= static_cast<UBool>(opValue != 0); // flip sense for \B if (!success) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3121,9 +3121,9 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_BU: // Test for word boundaries, Unicode-style { UBool success = isUWordBoundary(fp->fInputIdx, status); - success ^= (UBool)(opValue != 0); // flip sense for \B + success ^= static_cast<UBool>(opValue != 0); // flip sense for \B if (!success) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3133,7 +3133,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -3142,11 +3142,11 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UChar32 c = UTEXT_NEXT32(fInputText); int8_t ctype = u_charType(c); // TODO: make a unicode set for this. Will be faster. UBool success = (ctype == U_DECIMAL_DIGIT_NUMBER); - success ^= (UBool)(opValue != 0); // flip sense for \D + success ^= static_cast<UBool>(opValue != 0); // flip sense for \D if (success) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3154,7 +3154,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_G: // Test for position at end of previous match if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==false && fp->fInputIdx==fActiveStart))) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -3163,18 +3163,18 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); UChar32 c = UTEXT_NEXT32(fInputText); int8_t ctype = u_charType(c); UBool success = (ctype == U_SPACE_SEPARATOR || c == 9); // SPACE_SEPARATOR || TAB - success ^= (UBool)(opValue != 0); // flip sense for \H + success ^= static_cast<UBool>(opValue != 0); // flip sense for \H if (success) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3184,7 +3184,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); @@ -3195,7 +3195,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3205,17 +3205,17 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); UChar32 c = UTEXT_NEXT32(fInputText); UBool success = isLineTerminator(c); - success ^= (UBool)(opValue != 0); // flip sense for \V + success ^= static_cast<UBool>(opValue != 0); // flip sense for \V if (success) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3227,7 +3227,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Fail if at end of input if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -3241,7 +3241,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_Z: // Test for end of Input if (fp->fInputIdx < fAnchorLimit) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } else { fHitEnd = true; fRequireEnd = true; @@ -3259,7 +3259,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // 1: success if input char is not in set. if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -3284,7 +3284,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { // the character wasn't in the set. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3296,7 +3296,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // the predefined sets (Word Characters, for example) if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -3319,7 +3319,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } } // the character wasn't in the set. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -3327,7 +3327,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_SETREF: if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } else { UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); @@ -3342,7 +3342,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { break; } } else { - UnicodeSet *s = (UnicodeSet *)fSets->elementAt(opValue); + UnicodeSet* s = static_cast<UnicodeSet*>(fSets->elementAt(opValue)); if (s->contains(c)) { // The character is in the set. A Match. fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); @@ -3351,7 +3351,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } // the character wasn't in the set. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -3362,7 +3362,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -3372,7 +3372,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UChar32 c = UTEXT_NEXT32(fInputText); if (isLineTerminator(c)) { // End of line in normal mode. . does not match. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); @@ -3386,7 +3386,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -3416,7 +3416,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -3426,7 +3426,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UChar32 c = UTEXT_NEXT32(fInputText); if (c == 0x0a) { // End of line in normal mode. '.' does not match the \n - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } else { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } @@ -3455,7 +3455,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // data address of the input position at the start of the loop. { U_ASSERT(opValue > 0 && opValue < fPattern->fCompiledPat->size()); - int32_t stoOp = (int32_t)pat[opValue-1]; + int32_t stoOp = static_cast<int32_t>(pat[opValue - 1]); U_ASSERT(URX_TYPE(stoOp) == URX_STO_INP_LOC); int32_t frameLoc = URX_VAL(stoOp); U_ASSERT(frameLoc >= 0 && frameLoc < fFrameSize); @@ -3479,11 +3479,11 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Pick up the three extra operands that CTR_INIT has, and // skip the pattern location counter past - int32_t instrOperandLoc = (int32_t)fp->fPatIdx; + int32_t instrOperandLoc = static_cast<int32_t>(fp->fPatIdx); fp->fPatIdx += 3; int32_t loopLoc = URX_VAL(pat[instrOperandLoc]); - int32_t minCount = (int32_t)pat[instrOperandLoc+1]; - int32_t maxCount = (int32_t)pat[instrOperandLoc+2]; + int32_t minCount = static_cast<int32_t>(pat[instrOperandLoc + 1]); + int32_t maxCount = static_cast<int32_t>(pat[instrOperandLoc + 2]); U_ASSERT(minCount>=0); U_ASSERT(maxCount>=minCount || maxCount==-1); U_ASSERT(loopLoc>=fp->fPatIdx); @@ -3494,7 +3494,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (maxCount == -1) { fp->fExtra[opValue+1] = fp->fInputIdx; // For loop breaking. } else if (maxCount == 0) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3502,13 +3502,13 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_CTR_LOOP: { U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); - int32_t initOp = (int32_t)pat[opValue]; + int32_t initOp = static_cast<int32_t>(pat[opValue]); U_ASSERT(URX_TYPE(initOp) == URX_CTR_INIT); int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; - int32_t minCount = (int32_t)pat[opValue+2]; - int32_t maxCount = (int32_t)pat[opValue+3]; + int32_t minCount = static_cast<int32_t>(pat[opValue + 2]); + int32_t maxCount = static_cast<int32_t>(pat[opValue + 3]); (*pCounter)++; - if ((uint64_t)*pCounter >= (uint32_t)maxCount && maxCount != -1) { + if (static_cast<uint64_t>(*pCounter) >= static_cast<uint32_t>(maxCount) && maxCount != -1) { U_ASSERT(*pCounter == maxCount); break; } @@ -3544,11 +3544,11 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Pick up the three extra operands that CTR_INIT_NG has, and // skip the pattern location counter past - int32_t instrOperandLoc = (int32_t)fp->fPatIdx; + int32_t instrOperandLoc = static_cast<int32_t>(fp->fPatIdx); fp->fPatIdx += 3; int32_t loopLoc = URX_VAL(pat[instrOperandLoc]); - int32_t minCount = (int32_t)pat[instrOperandLoc+1]; - int32_t maxCount = (int32_t)pat[instrOperandLoc+2]; + int32_t minCount = static_cast<int32_t>(pat[instrOperandLoc + 1]); + int32_t maxCount = static_cast<int32_t>(pat[instrOperandLoc + 2]); U_ASSERT(minCount>=0); U_ASSERT(maxCount>=minCount || maxCount==-1); U_ASSERT(loopLoc>fp->fPatIdx); @@ -3569,14 +3569,14 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { // Non-greedy {min, max} loops U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); - int32_t initOp = (int32_t)pat[opValue]; + int32_t initOp = static_cast<int32_t>(pat[opValue]); U_ASSERT(URX_TYPE(initOp) == URX_CTR_INIT_NG); int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; - int32_t minCount = (int32_t)pat[opValue+2]; - int32_t maxCount = (int32_t)pat[opValue+3]; + int32_t minCount = static_cast<int32_t>(pat[opValue + 2]); + int32_t maxCount = static_cast<int32_t>(pat[opValue + 3]); (*pCounter)++; - if ((uint64_t)*pCounter >= (uint32_t)maxCount && maxCount != -1) { + if (static_cast<uint64_t>(*pCounter) >= static_cast<uint32_t>(maxCount) && maxCount != -1) { // The loop has matched the maximum permitted number of times. // Break out of here with no action. Matching will // continue with the following pattern. @@ -3623,17 +3623,17 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_LD_SP: { U_ASSERT(opValue >= 0 && opValue < fPattern->fDataSize); - int32_t newStackSize = (int32_t)fData[opValue]; + int32_t newStackSize = static_cast<int32_t>(fData[opValue]); U_ASSERT(newStackSize <= fStack->size()); int64_t *newFP = fStack->getBuffer() + newStackSize - fFrameSize; - if (newFP == (int64_t *)fp) { + if (newFP == reinterpret_cast<int64_t*>(fp)) { break; } int32_t j; for (j=0; j<fFrameSize; j++) { - newFP[j] = ((int64_t *)fp)[j]; + newFP[j] = reinterpret_cast<int64_t*>(fp)[j]; } - fp = (REStackFrame *)newFP; + fp = reinterpret_cast<REStackFrame*>(newFP); fStack->setSize(newStackSize); } break; @@ -3646,7 +3646,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { U_ASSERT(groupStartIdx <= groupEndIdx); if (groupStartIdx < 0) { // This capture group has not participated in the match thus far, - fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); // FAIL, no match. break; } UTEXT_SETNATIVEINDEX(fAltInputText, groupStartIdx); @@ -3678,7 +3678,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (success) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -3693,7 +3693,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { U_ASSERT(groupStartIdx <= groupEndIdx); if (groupStartIdx < 0) { // This capture group has not participated in the match thus far, - fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); // FAIL, no match. break; } utext_setNativeIndex(fAltInputText, groupStartIdx); @@ -3734,7 +3734,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (success) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } @@ -3749,7 +3749,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_JMPX: { - int32_t instrOperandLoc = (int32_t)fp->fPatIdx; + int32_t instrOperandLoc = static_cast<int32_t>(fp->fPatIdx); fp->fPatIdx += 1; int32_t dataLoc = URX_VAL(pat[instrOperandLoc]); U_ASSERT(dataLoc >= 0 && dataLoc < fFrameSize); @@ -3758,7 +3758,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (savedInputIdx < fp->fInputIdx) { fp->fPatIdx = opValue; // JMP } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no progress in loop. + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); // FAIL, no progress in loop. } } break; @@ -3783,7 +3783,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // restore Stack Ptr, Input Pos to positions they had on entry to block. U_ASSERT(opValue>=0 && opValue+3<fPattern->fDataSize); int32_t stackSize = fStack->size(); - int32_t newStackSize =(int32_t)fData[opValue]; + int32_t newStackSize = static_cast<int32_t>(fData[opValue]); U_ASSERT(stackSize >= newStackSize); if (stackSize > newStackSize) { // Copy the current top frame back to the new (cut back) top frame. @@ -3792,9 +3792,9 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { int64_t *newFP = fStack->getBuffer() + newStackSize - fFrameSize; int32_t j; for (j=0; j<fFrameSize; j++) { - newFP[j] = ((int64_t *)fp)[j]; + newFP[j] = reinterpret_cast<int64_t*>(fp)[j]; } - fp = (REStackFrame *)newFP; + fp = reinterpret_cast<REStackFrame*>(newFP); fStack->setSize(newStackSize); } fp->fInputIdx = fData[opValue+1]; @@ -3824,7 +3824,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { fHitEnd = true; } - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; case URX_STRING_I: @@ -3837,7 +3837,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { const char16_t *patternString = litText + opValue; int32_t patternStringIdx = 0; - op = (int32_t)pat[fp->fPatIdx]; + op = static_cast<int32_t>(pat[fp->fPatIdx]); fp->fPatIdx++; opType = URX_TYPE(op); opValue = URX_VAL(op); @@ -3871,7 +3871,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (success) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } } @@ -3904,8 +3904,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Fetch the min and max possible match lengths. They are the operands // of this op in the pattern. - int32_t minML = (int32_t)pat[fp->fPatIdx++]; - int32_t maxML = (int32_t)pat[fp->fPatIdx++]; + int32_t minML = static_cast<int32_t>(pat[fp->fPatIdx++]); + int32_t maxML = static_cast<int32_t>(pat[fp->fPatIdx++]); if (!UTEXT_USES_U16(fInputText)) { // utf-8 fix to maximum match length. The pattern compiler assumes utf-16. // The max length need not be exact; it just needs to be >= actual maximum. @@ -3941,7 +3941,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // We have tried all potential match starting points without // getting a match. Backtrack out, and out of the // Look Behind altogether. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); fActiveStart = fData[opValue+2]; fActiveLimit = fData[opValue+3]; U_ASSERT(fActiveStart >= 0); @@ -3966,7 +3966,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // FAIL out of here, which will take us back to the LB_CONT, which // will retry the match starting at another position or fail // the look-behind altogether, whichever is appropriate. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -3987,14 +3987,14 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // at all possible input starting positions. // Fetch the extra parameters of this op. - int32_t minML = (int32_t)pat[fp->fPatIdx++]; - int32_t maxML = (int32_t)pat[fp->fPatIdx++]; + int32_t minML = static_cast<int32_t>(pat[fp->fPatIdx++]); + int32_t maxML = static_cast<int32_t>(pat[fp->fPatIdx++]); if (!UTEXT_USES_U16(fInputText)) { // utf-8 fix to maximum match length. The pattern compiler assumes utf-16. // The max length need not be exact; it just needs to be >= actual maximum. maxML *= 3; } - int32_t continueLoc = (int32_t)pat[fp->fPatIdx++]; + int32_t continueLoc = static_cast<int32_t>(pat[fp->fPatIdx++]); continueLoc = URX_VAL(continueLoc); U_ASSERT(minML <= maxML); U_ASSERT(minML >= 0); @@ -4052,7 +4052,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // FAIL out of here, which will take us back to the LB_CONT, which // will retry the match starting at another position or succeed // the look-behind altogether, whichever is appropriate. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4070,13 +4070,13 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Restore original stack position, discarding any state saved // by the successful pattern match. U_ASSERT(opValue>=0 && opValue+1<fPattern->fDataSize); - int32_t newStackSize = (int32_t)fData[opValue]; + int32_t newStackSize = static_cast<int32_t>(fData[opValue]); U_ASSERT(fStack->size() > newStackSize); fStack->setSize(newStackSize); // FAIL, which will take control back to someplace // prior to entering the look-behind test. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -4089,7 +4089,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { U_ASSERT(opValue > 0 && opValue < fSets->size()); Regex8BitSet *s8 = &fPattern->fSets8[opValue]; - UnicodeSet *s = (UnicodeSet *)fSets->elementAt(opValue); + UnicodeSet* s = static_cast<UnicodeSet*>(fSets->elementAt(opValue)); // Loop through input, until either the input is exhausted or // we reach a character that is not a member of the set. @@ -4123,7 +4123,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Peek ahead in the compiled pattern, to the URX_LOOP_C that // must follow. It's operand is the stack location // that holds the starting input index for the match of this [set]* - int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; + int32_t loopcOp = static_cast<int32_t>(pat[fp->fPatIdx]); U_ASSERT(URX_TYPE(loopcOp) == URX_LOOP_C); int32_t stackLoc = URX_VAL(loopcOp); U_ASSERT(stackLoc >= 0 && stackLoc < fFrameSize); @@ -4184,7 +4184,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Peek ahead in the compiled pattern, to the URX_LOOP_C that // must follow. It's operand is the stack location // that holds the starting input index for the match of this .* - int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; + int32_t loopcOp = static_cast<int32_t>(pat[fp->fPatIdx]); U_ASSERT(URX_TYPE(loopcOp) == URX_LOOP_C); int32_t stackLoc = URX_VAL(loopcOp); U_ASSERT(stackLoc >= 0 && stackLoc < fFrameSize); @@ -4225,7 +4225,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (prevC == 0x0a && fp->fInputIdx > backSearchIndex && twoPrevC == 0x0d) { - int32_t prevOp = (int32_t)pat[fp->fPatIdx-2]; + int32_t prevOp = static_cast<int32_t>(pat[fp->fPatIdx - 2]); if (URX_TYPE(prevOp) == URX_LOOP_DOT_I) { // .*, stepping back over CRLF pair. fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); @@ -4342,7 +4342,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // One iteration of the loop per pattern operation performed. // for (;;) { - op = (int32_t)pat[fp->fPatIdx]; + op = static_cast<int32_t>(pat[fp->fPatIdx]); opType = URX_TYPE(op); opValue = URX_VAL(op); #ifdef REGEX_RUN_DEBUG @@ -4366,7 +4366,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Force a backtrack. In some circumstances, the pattern compiler // will notice that the pattern can't possibly match anything, and will // emit one of these at that point. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; @@ -4380,7 +4380,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } else { fHitEnd = true; } - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; @@ -4392,7 +4392,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu int32_t stringStartIdx = opValue; int32_t stringLen; - op = (int32_t)pat[fp->fPatIdx]; // Fetch the second operand + op = static_cast<int32_t>(pat[fp->fPatIdx]); // Fetch the second operand fp->fPatIdx++; opType = URX_TYPE(op); stringLen = URX_VAL(op); @@ -4419,7 +4419,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (success) { fp->fInputIdx += stringLen; } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4435,7 +4435,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // when we reach the end of the pattern. if (toEnd && fp->fInputIdx != fActiveLimit) { // The pattern matched, but not to the end of input. Try some more. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } isMatch = true; @@ -4466,7 +4466,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (fp->fInputIdx < fAnchorLimit-2) { // We are no where near the end of input. Fail. // This is the common case. Keep it first. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } if (fp->fInputIdx >= fAnchorLimit) { @@ -4497,7 +4497,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu break; // At CR/LF at end of input. Success } - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; @@ -4521,7 +4521,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } // Not at end of input. Back-track out. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; @@ -4545,7 +4545,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } } // not at a new line. Fail. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -4561,7 +4561,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // If we are not positioned just before a new-line, the test fails; backtrack out. // It makes no difference where the new-line is within the input. if (inputBuf[fp->fInputIdx] != 0x0a) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4569,7 +4569,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_CARET: // ^, test for start of line if (fp->fInputIdx != fAnchorStart) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -4590,7 +4590,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu break; } // Not at the start of a line. Fail. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -4607,17 +4607,17 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu char16_t c = inputBuf[fp->fInputIdx - 1]; if (c != 0x0a) { // Not at the start of a line. Back-track out. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; case URX_BACKSLASH_B: // Test for word boundaries { - UBool success = isChunkWordBoundary((int32_t)fp->fInputIdx); - success ^= (UBool)(opValue != 0); // flip sense for \B + UBool success = isChunkWordBoundary(static_cast<int32_t>(fp->fInputIdx)); + success ^= static_cast<UBool>(opValue != 0); // flip sense for \B if (!success) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4626,9 +4626,9 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_BACKSLASH_BU: // Test for word boundaries, Unicode-style { UBool success = isUWordBoundary(fp->fInputIdx, status); - success ^= (UBool)(opValue != 0); // flip sense for \B + success ^= static_cast<UBool>(opValue != 0); // flip sense for \B if (!success) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4638,7 +4638,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4646,9 +4646,9 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); int8_t ctype = u_charType(c); // TODO: make a unicode set for this. Will be faster. UBool success = (ctype == U_DECIMAL_DIGIT_NUMBER); - success ^= (UBool)(opValue != 0); // flip sense for \D + success ^= static_cast<UBool>(opValue != 0); // flip sense for \D if (!success) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4656,7 +4656,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_BACKSLASH_G: // Test for position at end of previous match if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==false && fp->fInputIdx==fActiveStart))) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -4665,16 +4665,16 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } UChar32 c; U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); int8_t ctype = u_charType(c); UBool success = (ctype == U_SPACE_SEPARATOR || c == 9); // SPACE_SEPARATOR || TAB - success ^= (UBool)(opValue != 0); // flip sense for \H + success ^= static_cast<UBool>(opValue != 0); // flip sense for \H if (!success) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4684,7 +4684,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } UChar32 c; @@ -4699,7 +4699,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } } } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4709,15 +4709,15 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } UChar32 c; U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); UBool success = isLineTerminator(c); - success ^= (UBool)(opValue != 0); // flip sense for \V + success ^= static_cast<UBool>(opValue != 0); // flip sense for \V if (!success) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4729,7 +4729,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Fail if at end of input if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4743,7 +4743,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_BACKSLASH_Z: // Test for end of Input if (fp->fInputIdx < fAnchorLimit) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } else { fHitEnd = true; fRequireEnd = true; @@ -4761,7 +4761,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // 1: success if input char is not in set. if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4783,7 +4783,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } } if (!success) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4795,7 +4795,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // the predefined sets (Word Characters, for example) if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4814,7 +4814,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu break; } } - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -4823,7 +4823,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { if (fp->fInputIdx >= fActiveLimit) { fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4839,7 +4839,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu break; } } else { - UnicodeSet *s = (UnicodeSet *)fSets->elementAt(opValue); + UnicodeSet* s = static_cast<UnicodeSet*>(fSets->elementAt(opValue)); if (s->contains(c)) { // The character is in the set. A Match. break; @@ -4847,7 +4847,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } // the character wasn't in the set. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -4858,7 +4858,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4867,7 +4867,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); if (isLineTerminator(c)) { // End of line in normal mode. . does not match. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } } @@ -4880,7 +4880,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4905,7 +4905,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. fHitEnd = true; - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -4914,7 +4914,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); if (c == 0x0a) { // End of line in normal mode. '.' does not match the \n - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4941,11 +4941,11 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // data address of the input position at the start of the loop. { U_ASSERT(opValue > 0 && opValue < fPattern->fCompiledPat->size()); - int32_t stoOp = (int32_t)pat[opValue-1]; + int32_t stoOp = static_cast<int32_t>(pat[opValue - 1]); U_ASSERT(URX_TYPE(stoOp) == URX_STO_INP_LOC); int32_t frameLoc = URX_VAL(stoOp); U_ASSERT(frameLoc >= 0 && frameLoc < fFrameSize); - int32_t prevInputIdx = (int32_t)fp->fExtra[frameLoc]; + int32_t prevInputIdx = static_cast<int32_t>(fp->fExtra[frameLoc]); U_ASSERT(prevInputIdx <= fp->fInputIdx); if (prevInputIdx < fp->fInputIdx) { // The match did make progress. Repeat the loop. @@ -4965,11 +4965,11 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Pick up the three extra operands that CTR_INIT has, and // skip the pattern location counter past - int32_t instrOperandLoc = (int32_t)fp->fPatIdx; + int32_t instrOperandLoc = static_cast<int32_t>(fp->fPatIdx); fp->fPatIdx += 3; int32_t loopLoc = URX_VAL(pat[instrOperandLoc]); - int32_t minCount = (int32_t)pat[instrOperandLoc+1]; - int32_t maxCount = (int32_t)pat[instrOperandLoc+2]; + int32_t minCount = static_cast<int32_t>(pat[instrOperandLoc + 1]); + int32_t maxCount = static_cast<int32_t>(pat[instrOperandLoc + 2]); U_ASSERT(minCount>=0); U_ASSERT(maxCount>=minCount || maxCount==-1); U_ASSERT(loopLoc>=fp->fPatIdx); @@ -4980,7 +4980,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (maxCount == -1) { fp->fExtra[opValue+1] = fp->fInputIdx; // For loop breaking. } else if (maxCount == 0) { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -4988,13 +4988,13 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_CTR_LOOP: { U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); - int32_t initOp = (int32_t)pat[opValue]; + int32_t initOp = static_cast<int32_t>(pat[opValue]); U_ASSERT(URX_TYPE(initOp) == URX_CTR_INIT); int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; - int32_t minCount = (int32_t)pat[opValue+2]; - int32_t maxCount = (int32_t)pat[opValue+3]; + int32_t minCount = static_cast<int32_t>(pat[opValue + 2]); + int32_t maxCount = static_cast<int32_t>(pat[opValue + 3]); (*pCounter)++; - if ((uint64_t)*pCounter >= (uint32_t)maxCount && maxCount != -1) { + if (static_cast<uint64_t>(*pCounter) >= static_cast<uint32_t>(maxCount) && maxCount != -1) { U_ASSERT(*pCounter == maxCount); break; } @@ -5029,11 +5029,11 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Pick up the three extra operands that CTR_INIT_NG has, and // skip the pattern location counter past - int32_t instrOperandLoc = (int32_t)fp->fPatIdx; + int32_t instrOperandLoc = static_cast<int32_t>(fp->fPatIdx); fp->fPatIdx += 3; int32_t loopLoc = URX_VAL(pat[instrOperandLoc]); - int32_t minCount = (int32_t)pat[instrOperandLoc+1]; - int32_t maxCount = (int32_t)pat[instrOperandLoc+2]; + int32_t minCount = static_cast<int32_t>(pat[instrOperandLoc + 1]); + int32_t maxCount = static_cast<int32_t>(pat[instrOperandLoc + 2]); U_ASSERT(minCount>=0); U_ASSERT(maxCount>=minCount || maxCount==-1); U_ASSERT(loopLoc>fp->fPatIdx); @@ -5054,14 +5054,14 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { // Non-greedy {min, max} loops U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); - int32_t initOp = (int32_t)pat[opValue]; + int32_t initOp = static_cast<int32_t>(pat[opValue]); U_ASSERT(URX_TYPE(initOp) == URX_CTR_INIT_NG); int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; - int32_t minCount = (int32_t)pat[opValue+2]; - int32_t maxCount = (int32_t)pat[opValue+3]; + int32_t minCount = static_cast<int32_t>(pat[opValue + 2]); + int32_t maxCount = static_cast<int32_t>(pat[opValue + 3]); (*pCounter)++; - if ((uint64_t)*pCounter >= (uint32_t)maxCount && maxCount != -1) { + if (static_cast<uint64_t>(*pCounter) >= static_cast<uint32_t>(maxCount) && maxCount != -1) { // The loop has matched the maximum permitted number of times. // Break out of here with no action. Matching will // continue with the following pattern. @@ -5107,17 +5107,17 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_LD_SP: { U_ASSERT(opValue >= 0 && opValue < fPattern->fDataSize); - int32_t newStackSize = (int32_t)fData[opValue]; + int32_t newStackSize = static_cast<int32_t>(fData[opValue]); U_ASSERT(newStackSize <= fStack->size()); int64_t *newFP = fStack->getBuffer() + newStackSize - fFrameSize; - if (newFP == (int64_t *)fp) { + if (newFP == reinterpret_cast<int64_t*>(fp)) { break; } int32_t j; for (j=0; j<fFrameSize; j++) { - newFP[j] = ((int64_t *)fp)[j]; + newFP[j] = reinterpret_cast<int64_t*>(fp)[j]; } - fp = (REStackFrame *)newFP; + fp = reinterpret_cast<REStackFrame*>(newFP); fStack->setSize(newStackSize); } break; @@ -5131,7 +5131,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu int64_t inputIndex = fp->fInputIdx; if (groupStartIdx < 0) { // This capture group has not participated in the match thus far, - fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); // FAIL, no match. break; } UBool success = true; @@ -5155,7 +5155,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (success) { fp->fInputIdx = inputIndex; } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -5168,7 +5168,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu U_ASSERT(groupStartIdx <= groupEndIdx); if (groupStartIdx < 0) { // This capture group has not participated in the match thus far, - fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); // FAIL, no match. break; } CaseFoldingUCharIterator captureGroupItr(inputBuf, groupStartIdx, groupEndIdx); @@ -5207,7 +5207,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (success) { fp->fInputIdx = inputItr.getIndex(); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -5221,16 +5221,16 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_JMPX: { - int32_t instrOperandLoc = (int32_t)fp->fPatIdx; + int32_t instrOperandLoc = static_cast<int32_t>(fp->fPatIdx); fp->fPatIdx += 1; int32_t dataLoc = URX_VAL(pat[instrOperandLoc]); U_ASSERT(dataLoc >= 0 && dataLoc < fFrameSize); - int32_t savedInputIdx = (int32_t)fp->fExtra[dataLoc]; + int32_t savedInputIdx = static_cast<int32_t>(fp->fExtra[dataLoc]); U_ASSERT(savedInputIdx <= fp->fInputIdx); if (savedInputIdx < fp->fInputIdx) { fp->fPatIdx = opValue; // JMP } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no progress in loop. + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); // FAIL, no progress in loop. } } break; @@ -5255,7 +5255,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // restore Stack Ptr, Input Pos to positions they had on entry to block. U_ASSERT(opValue>=0 && opValue+3<fPattern->fDataSize); int32_t stackSize = fStack->size(); - int32_t newStackSize = (int32_t)fData[opValue]; + int32_t newStackSize = static_cast<int32_t>(fData[opValue]); U_ASSERT(stackSize >= newStackSize); if (stackSize > newStackSize) { // Copy the current top frame back to the new (cut back) top frame. @@ -5264,9 +5264,9 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu int64_t *newFP = fStack->getBuffer() + newStackSize - fFrameSize; int32_t j; for (j=0; j<fFrameSize; j++) { - newFP[j] = ((int64_t *)fp)[j]; + newFP[j] = reinterpret_cast<int64_t*>(fp)[j]; } - fp = (REStackFrame *)newFP; + fp = reinterpret_cast<REStackFrame*>(newFP); fStack->setSize(newStackSize); } fp->fInputIdx = fData[opValue+1]; @@ -5290,7 +5290,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } else { fHitEnd = true; } - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; case URX_STRING_I: @@ -5301,7 +5301,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { const char16_t *patternString = litText + opValue; - op = (int32_t)pat[fp->fPatIdx]; + op = static_cast<int32_t>(pat[fp->fPatIdx]); fp->fPatIdx++; opType = URX_TYPE(op); opValue = URX_VAL(op); @@ -5331,7 +5331,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (success) { fp->fInputIdx = inputIterator.getIndex(); } else { - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } } break; @@ -5363,8 +5363,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Fetch the min and max possible match lengths. They are the operands // of this op in the pattern. - int32_t minML = (int32_t)pat[fp->fPatIdx++]; - int32_t maxML = (int32_t)pat[fp->fPatIdx++]; + int32_t minML = static_cast<int32_t>(pat[fp->fPatIdx++]); + int32_t maxML = static_cast<int32_t>(pat[fp->fPatIdx++]); U_ASSERT(minML <= maxML); U_ASSERT(minML >= 0); @@ -5391,7 +5391,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // We have tried all potential match starting points without // getting a match. Backtrack out, and out of the // Look Behind altogether. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); fActiveStart = fData[opValue+2]; fActiveLimit = fData[opValue+3]; U_ASSERT(fActiveStart >= 0); @@ -5416,7 +5416,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // FAIL out of here, which will take us back to the LB_CONT, which // will retry the match starting at another position or fail // the look-behind altogether, whichever is appropriate. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -5437,9 +5437,9 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // at all possible input starting positions. // Fetch the extra parameters of this op. - int32_t minML = (int32_t)pat[fp->fPatIdx++]; - int32_t maxML = (int32_t)pat[fp->fPatIdx++]; - int32_t continueLoc = (int32_t)pat[fp->fPatIdx++]; + int32_t minML = static_cast<int32_t>(pat[fp->fPatIdx++]); + int32_t maxML = static_cast<int32_t>(pat[fp->fPatIdx++]); + int32_t continueLoc = static_cast<int32_t>(pat[fp->fPatIdx++]); continueLoc = URX_VAL(continueLoc); U_ASSERT(minML <= maxML); U_ASSERT(minML >= 0); @@ -5493,7 +5493,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // FAIL out of here, which will take us back to the LB_CONT, which // will retry the match starting at another position or succeed // the look-behind altogether, whichever is appropriate. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); break; } @@ -5511,13 +5511,13 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Restore original stack position, discarding any state saved // by the successful pattern match. U_ASSERT(opValue>=0 && opValue+1<fPattern->fDataSize); - int32_t newStackSize = (int32_t)fData[opValue]; + int32_t newStackSize = static_cast<int32_t>(fData[opValue]); U_ASSERT(fStack->size() > newStackSize); fStack->setSize(newStackSize); // FAIL, which will take control back to someplace // prior to entering the look-behind test. - fp = (REStackFrame *)fStack->popFrame(fFrameSize); + fp = reinterpret_cast<REStackFrame*>(fStack->popFrame(fFrameSize)); } break; @@ -5530,11 +5530,11 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { U_ASSERT(opValue > 0 && opValue < fSets->size()); Regex8BitSet *s8 = &fPattern->fSets8[opValue]; - UnicodeSet *s = (UnicodeSet *)fSets->elementAt(opValue); + UnicodeSet* s = static_cast<UnicodeSet*>(fSets->elementAt(opValue)); // Loop through input, until either the input is exhausted or // we reach a character that is not a member of the set. - int32_t ix = (int32_t)fp->fInputIdx; + int32_t ix = static_cast<int32_t>(fp->fInputIdx); for (;;) { if (ix >= fActiveLimit) { fHitEnd = true; @@ -5565,7 +5565,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Peek ahead in the compiled pattern, to the URX_LOOP_C that // must follow. It's operand is the stack location // that holds the starting input index for the match of this [set]* - int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; + int32_t loopcOp = static_cast<int32_t>(pat[fp->fPatIdx]); U_ASSERT(URX_TYPE(loopcOp) == URX_LOOP_C); int32_t stackLoc = URX_VAL(loopcOp); U_ASSERT(stackLoc >= 0 && stackLoc < fFrameSize); @@ -5591,12 +5591,12 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu int32_t ix; if ((opValue & 1) == 1) { // Dot-matches-All mode. Jump straight to the end of the string. - ix = (int32_t)fActiveLimit; + ix = static_cast<int32_t>(fActiveLimit); fHitEnd = true; } else { // NOT DOT ALL mode. Line endings do not match '.' // Scan forward until a line ending or end of input. - ix = (int32_t)fp->fInputIdx; + ix = static_cast<int32_t>(fp->fInputIdx); for (;;) { if (ix >= fActiveLimit) { fHitEnd = true; @@ -5627,7 +5627,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Peek ahead in the compiled pattern, to the URX_LOOP_C that // must follow. It's operand is the stack location // that holds the starting input index for the match of this .* - int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; + int32_t loopcOp = static_cast<int32_t>(pat[fp->fPatIdx]); U_ASSERT(URX_TYPE(loopcOp) == URX_LOOP_C); int32_t stackLoc = URX_VAL(loopcOp); U_ASSERT(stackLoc >= 0 && stackLoc < fFrameSize); @@ -5646,7 +5646,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_LOOP_C: { U_ASSERT(opValue>=0 && opValue<fFrameSize); - backSearchIndex = (int32_t)fp->fExtra[opValue]; + backSearchIndex = static_cast<int32_t>(fp->fExtra[opValue]); U_ASSERT(backSearchIndex <= fp->fInputIdx); if (backSearchIndex == fp->fInputIdx) { // We've backed up the input idx to the point that the loop started. @@ -5666,7 +5666,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (prevC == 0x0a && fp->fInputIdx > backSearchIndex && inputBuf[fp->fInputIdx-1] == 0x0d) { - int32_t prevOp = (int32_t)pat[fp->fPatIdx-2]; + int32_t prevOp = static_cast<int32_t>(pat[fp->fPatIdx - 2]); if (URX_TYPE(prevOp) == URX_LOOP_DOT_I) { // .*, stepping back over CRLF pair. U16_BACK_1(inputBuf, 0, fp->fInputIdx); diff --git a/deps/icu-small/source/i18n/repattrn.cpp b/deps/icu-small/source/i18n/repattrn.cpp index 67577436e2ca54..f0cc709e9739b3 100644 --- a/deps/icu-small/source/i18n/repattrn.cpp +++ b/deps/icu-small/source/i18n/repattrn.cpp @@ -125,7 +125,7 @@ RegexPattern &RegexPattern::operator = (const RegexPattern &other) { if (U_FAILURE(fDeferredStatus)) { return *this; } - UnicodeSet *sourceSet = (UnicodeSet *)other.fSets->elementAt(i); + UnicodeSet* sourceSet = static_cast<UnicodeSet*>(other.fSets->elementAt(i)); UnicodeSet *newSet = new UnicodeSet(*sourceSet); if (newSet == nullptr) { fDeferredStatus = U_MEMORY_ALLOCATION_ERROR; @@ -142,7 +142,7 @@ RegexPattern &RegexPattern::operator = (const RegexPattern &other) { if (U_FAILURE(fDeferredStatus)) { break; } - const UnicodeString *name = (const UnicodeString *)hashEl->key.pointer; + const UnicodeString* name = static_cast<const UnicodeString*>(hashEl->key.pointer); UnicodeString *key = new UnicodeString(*name); int32_t val = hashEl->value.integer; if (key == nullptr) { @@ -199,7 +199,7 @@ void RegexPattern::init() { } // Slot zero of the vector of sets is reserved. Fill it here. - fSets->addElement((int32_t)0, fDeferredStatus); + fSets->addElement(static_cast<int32_t>(0), fDeferredStatus); } @@ -232,7 +232,7 @@ void RegexPattern::zap() { int i; for (i=1; i<fSets->size(); i++) { UnicodeSet *s; - s = (UnicodeSet *)fSets->elementAt(i); + s = static_cast<UnicodeSet*>(fSets->elementAt(i)); delete s; } delete fSets; diff --git a/deps/icu-small/source/i18n/rulebasedcollator.cpp b/deps/icu-small/source/i18n/rulebasedcollator.cpp index 685f44de373759..3d91b3c592b8cd 100644 --- a/deps/icu-small/source/i18n/rulebasedcollator.cpp +++ b/deps/icu-small/source/i18n/rulebasedcollator.cpp @@ -427,7 +427,7 @@ RuleBasedCollator::getAttribute(UColAttribute attr, UErrorCode &errorCode) const option = CollationSettings::CHECK_FCD; break; case UCOL_STRENGTH: - return (UColAttributeValue)settings->getStrength(); + return static_cast<UColAttributeValue>(settings->getStrength()); case UCOL_HIRAGANA_QUATERNARY_MODE: // Deprecated attribute, unsettable. return UCOL_OFF; @@ -539,7 +539,7 @@ RuleBasedCollator::setMaxVariable(UColReorderCode group, UErrorCode &errorCode) } if(group == UCOL_REORDER_CODE_DEFAULT) { - group = (UColReorderCode)( + group = static_cast<UColReorderCode>( UCOL_REORDER_CODE_FIRST + int32_t{defaultSettings.getMaxVariable()}); } uint32_t varTop = data->getLastPrimaryForGroup(group); @@ -558,7 +558,7 @@ RuleBasedCollator::setMaxVariable(UColReorderCode group, UErrorCode &errorCode) UColReorderCode RuleBasedCollator::getMaxVariable() const { - return (UColReorderCode)(UCOL_REORDER_CODE_FIRST + int32_t{settings->getMaxVariable()}); + return static_cast<UColReorderCode>(UCOL_REORDER_CODE_FIRST + int32_t{settings->getMaxVariable()}); } uint32_t @@ -593,7 +593,7 @@ RuleBasedCollator::setVariableTop(const char16_t *varTop, int32_t len, UErrorCod errorCode = U_CE_NOT_FOUND_ERROR; return 0; } - setVariableTop((uint32_t)(ce1 >> 32), errorCode); + setVariableTop(static_cast<uint32_t>(ce1 >> 32), errorCode); return settings->variableTop; } @@ -862,7 +862,7 @@ class FCDUTF16NFDIterator : public UTF16NFDIterator { s = text; limit = spanLimit; } else { - str.setTo(text, (int32_t)(spanLimit - text)); + str.setTo(text, static_cast<int32_t>(spanLimit - text)); { ReorderingBuffer r_buffer(nfcImpl, str); if(r_buffer.init(str.length(), errorCode)) { @@ -1063,7 +1063,7 @@ RuleBasedCollator::doCompare(const char16_t *left, int32_t leftLength, } } if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) { - return (UCollationResult)result; + return static_cast<UCollationResult>(result); } // Note: If NUL-terminated, we could get the actual limits from the iterators now. @@ -1188,7 +1188,7 @@ RuleBasedCollator::doCompare(const uint8_t *left, int32_t leftLength, } } if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) { - return (UCollationResult)result; + return static_cast<UCollationResult>(result); } // Note: If NUL-terminated, we could get the actual limits from the iterators now. @@ -1364,13 +1364,13 @@ RuleBasedCollator::writeIdenticalLevel(const char16_t *s, const char16_t *limit, sink.Append(Collation::LEVEL_SEPARATOR_BYTE); UChar32 prev = 0; if(nfdQCYesLimit != s) { - prev = u_writeIdenticalLevelRun(prev, s, (int32_t)(nfdQCYesLimit - s), sink); + prev = u_writeIdenticalLevelRun(prev, s, static_cast<int32_t>(nfdQCYesLimit - s), sink); } // Is there non-NFD text? int32_t destLengthEstimate; if(limit != nullptr) { if(nfdQCYesLimit == limit) { return; } - destLengthEstimate = (int32_t)(limit - nfdQCYesLimit); + destLengthEstimate = static_cast<int32_t>(limit - nfdQCYesLimit); } else { // s is NUL-terminated if(*nfdQCYesLimit == 0) { return; } @@ -1432,10 +1432,10 @@ RuleBasedCollator::internalNextSortKeyPart(UCharIterator *iter, uint32_t state[2 if(count == 0) { return 0; } FixedSortKeyByteSink sink(reinterpret_cast<char *>(dest), count); - sink.IgnoreBytes((int32_t)state[1]); + sink.IgnoreBytes(static_cast<int32_t>(state[1])); iter->move(iter, 0, UITER_START); - Collation::Level level = (Collation::Level)state[0]; + Collation::Level level = static_cast<Collation::Level>(state[0]); if(level <= Collation::QUATERNARY_LEVEL) { UBool numeric = settings->isNumeric(); PartLevelCallback callback(sink); @@ -1450,8 +1450,8 @@ RuleBasedCollator::internalNextSortKeyPart(UCharIterator *iter, uint32_t state[2 } if(U_FAILURE(errorCode)) { return 0; } if(sink.NumberOfBytesAppended() > count) { - state[0] = (uint32_t)callback.getLevel(); - state[1] = (uint32_t)callback.getLevelCapacity(); + state[0] = static_cast<uint32_t>(callback.getLevel()); + state[1] = static_cast<uint32_t>(callback.getLevelCapacity()); return count; } // All of the normal levels are done. @@ -1468,20 +1468,20 @@ RuleBasedCollator::internalNextSortKeyPart(UCharIterator *iter, uint32_t state[2 for(;;) { UChar32 c = iter->next(iter); if(c < 0) { break; } - s.append((char16_t)c); + s.append(static_cast<char16_t>(c)); } const char16_t *sArray = s.getBuffer(); writeIdenticalLevel(sArray, sArray + s.length(), sink, errorCode); if(U_FAILURE(errorCode)) { return 0; } if(sink.NumberOfBytesAppended() > count) { - state[0] = (uint32_t)level; - state[1] = (uint32_t)levelCapacity; + state[0] = static_cast<uint32_t>(level); + state[1] = static_cast<uint32_t>(levelCapacity); return count; } } // ZERO_LEVEL: Fill the remainder of dest with 00 bytes. - state[0] = (uint32_t)Collation::ZERO_LEVEL; + state[0] = static_cast<uint32_t>(Collation::ZERO_LEVEL); state[1] = 0; int32_t length = sink.NumberOfBytesAppended(); int32_t i = length; diff --git a/deps/icu-small/source/i18n/scriptset.cpp b/deps/icu-small/source/i18n/scriptset.cpp index 736a85cf8c1f24..eec1eeb37dafbf 100644 --- a/deps/icu-small/source/i18n/scriptset.cpp +++ b/deps/icu-small/source/i18n/scriptset.cpp @@ -57,7 +57,7 @@ UBool ScriptSet::test(UScriptCode script, UErrorCode &status) const { if (U_FAILURE(status)) { return false; } - if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) { + if (script < 0 || static_cast<int32_t>(script) >= SCRIPT_LIMIT) { status = U_ILLEGAL_ARGUMENT_ERROR; return false; } @@ -71,7 +71,7 @@ ScriptSet &ScriptSet::set(UScriptCode script, UErrorCode &status) { if (U_FAILURE(status)) { return *this; } - if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) { + if (script < 0 || static_cast<int32_t>(script) >= SCRIPT_LIMIT) { status = U_ILLEGAL_ARGUMENT_ERROR; return *this; } @@ -85,7 +85,7 @@ ScriptSet &ScriptSet::reset(UScriptCode script, UErrorCode &status) { if (U_FAILURE(status)) { return *this; } - if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) { + if (script < 0 || static_cast<int32_t>(script) >= SCRIPT_LIMIT) { status = U_ILLEGAL_ARGUMENT_ERROR; return *this; } @@ -178,7 +178,7 @@ int32_t ScriptSet::nextSetBit(int32_t fromIndex) const { } UErrorCode status = U_ZERO_ERROR; for (int32_t scriptIndex = fromIndex; scriptIndex < SCRIPT_LIMIT; scriptIndex++) { - if (test((UScriptCode)scriptIndex, status)) { + if (test(static_cast<UScriptCode>(scriptIndex), status)) { return scriptIndex; } } @@ -198,10 +198,10 @@ UnicodeString &ScriptSet::displayScripts(UnicodeString &dest) const { UBool firstTime = true; for (int32_t i = nextSetBit(0); i >= 0; i = nextSetBit(i + 1)) { if (!firstTime) { - dest.append((char16_t)0x20); + dest.append(static_cast<char16_t>(0x20)); } firstTime = false; - const char *scriptName = uscript_getShortName((UScriptCode(i))); + const char* scriptName = uscript_getShortName(static_cast<UScriptCode>(i)); dest.append(UnicodeString(scriptName, -1, US_INV)); } return dest; @@ -230,7 +230,7 @@ ScriptSet &ScriptSet::parseScripts(const UnicodeString &scriptString, UErrorCode if (sc == UCHAR_INVALID_CODE) { status = U_ILLEGAL_ARGUMENT_ERROR; } else { - this->set((UScriptCode)sc, status); + this->set(static_cast<UScriptCode>(sc), status); } if (U_FAILURE(status)) { return *this; diff --git a/deps/icu-small/source/i18n/search.cpp b/deps/icu-small/source/i18n/search.cpp index ec5028ca81b7b0..fd46f702a4cc1c 100644 --- a/deps/icu-small/source/i18n/search.cpp +++ b/deps/icu-small/source/i18n/search.cpp @@ -27,7 +27,7 @@ SearchIterator::SearchIterator(const SearchIterator &other) { m_breakiterator_ = other.m_breakiterator_; m_text_ = other.m_text_; - m_search_ = (USearch *)uprv_malloc(sizeof(USearch)); + m_search_ = static_cast<USearch*>(uprv_malloc(sizeof(USearch))); m_search_->breakIter = other.m_search_->breakIter; m_search_->isCanonicalMatch = other.m_search_->isCanonicalMatch; m_search_->isOverlap = other.m_search_->isOverlap; @@ -62,7 +62,7 @@ void SearchIterator::setAttribute(USearchAttribute attribute, break; case USEARCH_ELEMENT_COMPARISON : if (value == USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD || value == USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD) { - m_search_->elementComparisonType = (int16_t)value; + m_search_->elementComparisonType = static_cast<int16_t>(value); } else { m_search_->elementComparisonType = 0; } @@ -88,7 +88,7 @@ USearchAttributeValue SearchIterator::getAttribute( { int16_t value = m_search_->elementComparisonType; if (value == USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD || value == USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD) { - return (USearchAttributeValue)value; + return static_cast<USearchAttributeValue>(value); } else { return USEARCH_STANDARD_ELEMENT_COMPARISON; } @@ -136,7 +136,7 @@ void SearchIterator::setBreakIterator(BreakIterator *breakiter, // // Besides, a UBreakIterator is a BreakIterator, so // any subclass of BreakIterator should work fine here... - m_search_->breakIter = (UBreakIterator *) breakiter; + m_search_->breakIter = reinterpret_cast<UBreakIterator*>(breakiter); #endif m_breakiterator_ = breakiter; @@ -344,7 +344,7 @@ void SearchIterator::reset() SearchIterator::SearchIterator() { - m_search_ = (USearch *)uprv_malloc(sizeof(USearch)); + m_search_ = static_cast<USearch*>(uprv_malloc(sizeof(USearch))); m_search_->breakIter = nullptr; m_search_->isOverlap = false; m_search_->isCanonicalMatch = false; @@ -363,7 +363,7 @@ SearchIterator::SearchIterator(const UnicodeString &text, m_breakiterator_(breakiter), m_text_(text) { - m_search_ = (USearch *)uprv_malloc(sizeof(USearch)); + m_search_ = static_cast<USearch*>(uprv_malloc(sizeof(USearch))); m_search_->breakIter = nullptr; m_search_->isOverlap = false; m_search_->isCanonicalMatch = false; @@ -380,7 +380,7 @@ SearchIterator::SearchIterator(CharacterIterator &text, BreakIterator *breakiter) : m_breakiterator_(breakiter) { - m_search_ = (USearch *)uprv_malloc(sizeof(USearch)); + m_search_ = static_cast<USearch*>(uprv_malloc(sizeof(USearch))); m_search_->breakIter = nullptr; m_search_->isOverlap = false; m_search_->isCanonicalMatch = false; diff --git a/deps/icu-small/source/i18n/simpletz.cpp b/deps/icu-small/source/i18n/simpletz.cpp index f144577155cd14..cbefc29830ffd9 100644 --- a/deps/icu-small/source/i18n/simpletz.cpp +++ b/deps/icu-small/source/i18n/simpletz.cpp @@ -310,9 +310,9 @@ void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek, int32_t time, TimeMode mode, UErrorCode& status) { - startMonth = (int8_t)month; - startDay = (int8_t)dayOfWeekInMonth; - startDayOfWeek = (int8_t)dayOfWeek; + startMonth = static_cast<int8_t>(month); + startDay = static_cast<int8_t>(dayOfWeekInMonth); + startDayOfWeek = static_cast<int8_t>(dayOfWeek); startTime = time; startTimeMode = mode; decodeStartRule(status); @@ -362,9 +362,9 @@ void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek, int32_t time, TimeMode mode, UErrorCode& status) { - endMonth = (int8_t)month; - endDay = (int8_t)dayOfWeekInMonth; - endDayOfWeek = (int8_t)dayOfWeek; + endMonth = static_cast<int8_t>(month); + endDay = static_cast<int8_t>(dayOfWeekInMonth); + endDayOfWeek = static_cast<int8_t>(dayOfWeek); endTime = time; endTimeMode = mode; decodeEndRule(status); @@ -475,11 +475,11 @@ SimpleTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, // Compare the date to the starting and ending rules.+1 = date>rule, -1 // = date<rule, 0 = date==rule. - int32_t startCompare = compareToRule((int8_t)month, (int8_t)monthLength, (int8_t)prevMonthLength, - (int8_t)day, (int8_t)dayOfWeek, millis, + int32_t startCompare = compareToRule(static_cast<int8_t>(month), static_cast<int8_t>(monthLength), static_cast<int8_t>(prevMonthLength), + static_cast<int8_t>(day), static_cast<int8_t>(dayOfWeek), millis, startTimeMode == UTC_TIME ? -rawOffset : 0, - startMode, (int8_t)startMonth, (int8_t)startDayOfWeek, - (int8_t)startDay, startTime); + startMode, startMonth, startDayOfWeek, + startDay, startTime); int32_t endCompare = 0; /* We don't always have to compute endCompare. For many instances, @@ -489,12 +489,12 @@ SimpleTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day, * must have DST. This is reflected in the way the next if statement * (not the one immediately following) short circuits. */ if(southern != (startCompare >= 0)) { - endCompare = compareToRule((int8_t)month, (int8_t)monthLength, (int8_t)prevMonthLength, - (int8_t)day, (int8_t)dayOfWeek, millis, + endCompare = compareToRule(static_cast<int8_t>(month), static_cast<int8_t>(monthLength), static_cast<int8_t>(prevMonthLength), + static_cast<int8_t>(day), static_cast<int8_t>(dayOfWeek), millis, endTimeMode == WALL_TIME ? dstSavings : (endTimeMode == UTC_TIME ? -rawOffset : 0), - endMode, (int8_t)endMonth, (int8_t)endDayOfWeek, - (int8_t)endDay, endTime); + endMode, endMonth, endDayOfWeek, + endDay, endTime); } // Check for both the northern and southern hemisphere cases. We @@ -526,10 +526,11 @@ SimpleTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingT } int32_t day = dday; - Grego::dayToFields(day, year, month, dom, dow); + Grego::dayToFields(day, year, month, dom, dow, status); + if (U_FAILURE(status)) return; savingsDST = getOffset(GregorianCalendar::AD, year, month, dom, - (uint8_t) dow, millis, + static_cast<uint8_t>(dow), millis, Grego::monthLength(year, month), status) - rawOffsetGMT; if (U_FAILURE(status)) { @@ -554,9 +555,10 @@ SimpleTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingT } if (recalc) { day = ClockMath::floorDivide(date, U_MILLIS_PER_DAY, &millis); - Grego::dayToFields(day, year, month, dom, dow); + Grego::dayToFields(day, year, month, dom, dow, status); + if (U_FAILURE(status)) return; savingsDST = getOffset(GregorianCalendar::AD, year, month, dom, - (uint8_t) dow, millis, + static_cast<uint8_t>(dow), millis, Grego::monthLength(year, month), status) - rawOffsetGMT; } @@ -585,7 +587,7 @@ SimpleTimeZone::compareToRule(int8_t month, int8_t monthLen, int8_t prevMonthLen while (millis >= U_MILLIS_PER_DAY) { millis -= U_MILLIS_PER_DAY; ++dayOfMonth; - dayOfWeek = (int8_t)(1 + (dayOfWeek % 7)); // dayOfWeek is one-based + dayOfWeek = static_cast<int8_t>(1 + (dayOfWeek % 7)); // dayOfWeek is one-based if (dayOfMonth > monthLen) { dayOfMonth = 1; /* When incrementing the month, it is desirable to overflow @@ -598,7 +600,7 @@ SimpleTimeZone::compareToRule(int8_t month, int8_t monthLen, int8_t prevMonthLen while (millis < 0) { millis += U_MILLIS_PER_DAY; --dayOfMonth; - dayOfWeek = (int8_t)(1 + ((dayOfWeek+5) % 7)); // dayOfWeek is one-based + dayOfWeek = static_cast<int8_t>(1 + ((dayOfWeek + 5) % 7)); // dayOfWeek is one-based if (dayOfMonth < 1) { dayOfMonth = prevMonthLen; --month; @@ -875,7 +877,7 @@ SimpleTimeZone::decodeStartRule(UErrorCode& status) { if(U_FAILURE(status)) return; - useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? true : false); + useDaylight = static_cast<UBool>(startDay != 0 && endDay != 0); if (useDaylight && dstSavings == 0) { dstSavings = U_MILLIS_PER_HOUR; } @@ -895,11 +897,11 @@ SimpleTimeZone::decodeStartRule(UErrorCode& status) if (startDayOfWeek > 0) { startMode = DOW_IN_MONTH_MODE; } else { - startDayOfWeek = (int8_t)-startDayOfWeek; + startDayOfWeek = static_cast<int8_t>(-startDayOfWeek); if (startDay > 0) { startMode = DOW_GE_DOM_MODE; } else { - startDay = (int8_t)-startDay; + startDay = static_cast<int8_t>(-startDay); startMode = DOW_LE_DOM_MODE; } } @@ -930,7 +932,7 @@ SimpleTimeZone::decodeEndRule(UErrorCode& status) { if(U_FAILURE(status)) return; - useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? true : false); + useDaylight = static_cast<UBool>(startDay != 0 && endDay != 0); if (useDaylight && dstSavings == 0) { dstSavings = U_MILLIS_PER_HOUR; } @@ -950,11 +952,11 @@ SimpleTimeZone::decodeEndRule(UErrorCode& status) if (endDayOfWeek > 0) { endMode = DOW_IN_MONTH_MODE; } else { - endDayOfWeek = (int8_t)-endDayOfWeek; + endDayOfWeek = static_cast<int8_t>(-endDayOfWeek); if (endDay > 0) { endMode = DOW_GE_DOM_MODE; } else { - endDay = (int8_t)-endDay; + endDay = static_cast<int8_t>(-endDay); endMode = DOW_LE_DOM_MODE; } } diff --git a/deps/icu-small/source/i18n/smpdtfmt.cpp b/deps/icu-small/source/i18n/smpdtfmt.cpp index 2822e686fd965f..f79d4ae49532b0 100644 --- a/deps/icu-small/source/i18n/smpdtfmt.cpp +++ b/deps/icu-small/source/i18n/smpdtfmt.cpp @@ -297,8 +297,8 @@ static const SharedNumberFormat *createSharedNumberFormat( } static const SharedNumberFormat **allocSharedNumberFormatters() { - const SharedNumberFormat **result = (const SharedNumberFormat**) - uprv_malloc(UDAT_FIELD_COUNT * sizeof(const SharedNumberFormat*)); + const SharedNumberFormat** result = static_cast<const SharedNumberFormat**>( + uprv_malloc(UDAT_FIELD_COUNT * sizeof(const SharedNumberFormat*))); if (result == nullptr) { return nullptr; } @@ -346,7 +346,7 @@ SimpleDateFormat::SimpleDateFormat(UErrorCode& status) : fLocale(Locale::getDefault()) { initializeBooleanAttributes(); - construct(kShort, (EStyle) (kShort + kDateOffset), fLocale, status); + construct(kShort, static_cast<EStyle>(kShort + kDateOffset), fLocale, status); initializeDefaultCentury(); } @@ -772,7 +772,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, UnicodeString tempus1(timePattern); if (tempus1.length() == 0) { currentBundle.adoptInstead( - ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)timeStyle, nullptr, &status)); + ures_getByIndex(dateTimePatterns.getAlias(), static_cast<int32_t>(timeStyle), nullptr, &status)); if (U_FAILURE(status)) { status = U_INVALID_FORMAT_ERROR; return; @@ -798,7 +798,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, } currentBundle.adoptInstead( - ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)dateStyle, nullptr, &status)); + ures_getByIndex(dateTimePatterns.getAlias(), static_cast<int32_t>(dateStyle), nullptr, &status)); if (U_FAILURE(status)) { status = U_INVALID_FORMAT_ERROR; return; @@ -848,7 +848,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, int32_t patternsSize = ures_getSize(dateTimePatterns.getAlias()); if (patternsSize >= (kDateTimeOffset + kShort + 1)) { // Get proper date time format - glueIndex = (int32_t)(kDateTimeOffset + (dateStyle - kDateOffset)); + glueIndex = static_cast<int32_t>(kDateTimeOffset + (dateStyle - kDateOffset)); } resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), glueIndex, &resStrLen, &status); @@ -863,7 +863,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, fPattern.setTo(timePattern); if (fPattern.length() == 0) { currentBundle.adoptInstead( - ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)timeStyle, nullptr, &status)); + ures_getByIndex(dateTimePatterns.getAlias(), static_cast<int32_t>(timeStyle), nullptr, &status)); if (U_FAILURE(status)) { status = U_INVALID_FORMAT_ERROR; return; @@ -889,7 +889,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, } else if (dateStyle != kNone) { currentBundle.adoptInstead( - ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)dateStyle, nullptr, &status)); + ures_getByIndex(dateTimePatterns.getAlias(), static_cast<int32_t>(dateStyle), nullptr, &status)); if (U_FAILURE(status)) { status = U_INVALID_FORMAT_ERROR; return; @@ -1088,7 +1088,7 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo, // Consecutive single quotes are a single quote literal, // either outside of quotes or between quotes if ((i+1) < patternLength && fPattern[i+1] == QUOTE) { - appendTo += (char16_t)QUOTE; + appendTo += QUOTE; ++i; } else { inQuote = ! inQuote; @@ -1365,7 +1365,7 @@ SimpleDateFormat::processOverrideString(const Locale &locale, const UnicodeStrin NSOverride *overrideList = nullptr; while (moreToProcess) { - int32_t delimiterPosition = str.indexOf((char16_t)ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE,start); + int32_t delimiterPosition = str.indexOf(static_cast<char16_t>(ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE), start); if (delimiterPosition == -1) { moreToProcess = false; len = str.length() - start; @@ -1373,7 +1373,7 @@ SimpleDateFormat::processOverrideString(const Locale &locale, const UnicodeStrin len = delimiterPosition - start; } UnicodeString currentString(str,start,len); - int32_t equalSignPosition = currentString.indexOf((char16_t)ULOC_KEYWORD_ASSIGN_UNICODE,0); + int32_t equalSignPosition = currentString.indexOf(static_cast<char16_t>(ULOC_KEYWORD_ASSIGN_UNICODE), 0); if (equalSignPosition == -1) { // Simple override string such as "hebrew" nsName.setTo(currentString); ovrField.setToBogus(); @@ -1576,10 +1576,9 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, case UDAT_MONTH_FIELD: case UDAT_STANDALONE_MONTH_FIELD: if (uprv_strcmp(cal.getType(),"hebrew") == 0) { - HebrewCalendar *hc = (HebrewCalendar*)&cal; - if (hc->isLeapYear(hc->get(UCAL_YEAR,status)) && value == 6 && count >= 3 ) + if (HebrewCalendar::isLeapYear(cal.get(UCAL_YEAR,status)) && value == 6 && count >= 3 ) value = 13; // Show alternate form for Adar II in leap years in Hebrew calendar. - if (!hc->isLeapYear(hc->get(UCAL_YEAR,status)) && value >= 6 && count < 3 ) + if (!HebrewCalendar::isLeapYear(cal.get(UCAL_YEAR,status)) && value >= 6 && count < 3 ) value--; // Adjust the month number down 1 in Hebrew non-leap years, i.e. Adar is 6, not 7. } { @@ -1992,7 +1991,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, if (periodType != DayPeriodRules::DAYPERIOD_AM && periodType != DayPeriodRules::DAYPERIOD_PM && periodType != DayPeriodRules::DAYPERIOD_MIDNIGHT) { - index = (int32_t)periodType; + index = static_cast<int32_t>(periodType); if (count <= 3) { toAppend = &fSymbols->fAbbreviatedDayPeriods[index]; // i.e. short } else if (count == 4 || count > 5) { @@ -2010,7 +2009,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, (periodType == DayPeriodRules::DAYPERIOD_MIDNIGHT || periodType == DayPeriodRules::DAYPERIOD_NOON)) { periodType = ruleSet->getDayPeriodForHour(hour); - index = (int32_t)periodType; + index = static_cast<int32_t>(periodType); if (count <= 3) { toAppend = &fSymbols->fAbbreviatedDayPeriods[index]; // i.e. short @@ -2420,7 +2419,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& // If dayPeriod is set, use it in conjunction with hour-of-day to determine am/pm. if (dayPeriodInt >= 0) { - DayPeriodRules::DayPeriod dayPeriod = (DayPeriodRules::DayPeriod)dayPeriodInt; + DayPeriodRules::DayPeriod dayPeriod = static_cast<DayPeriodRules::DayPeriod>(dayPeriodInt); const DayPeriodRules *ruleSet = DayPeriodRules::getInstance(this->getSmpFmtLocale(), status); if (!cal.isSet(UCAL_HOUR) && !cal.isSet(UCAL_HOUR_OF_DAY)) { @@ -2432,7 +2431,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& if (U_SUCCESS(status)) { // Truncate midPoint toward zero to get the hour. // Any leftover means it was a half-hour. - int32_t midPointHour = (int32_t) midPoint; + int32_t midPointHour = static_cast<int32_t>(midPoint); int32_t midPointMinute = (midPoint - midPointHour) > 0 ? 30 : 0; // No need to set am/pm because hour-of-day is set last therefore takes precedence. @@ -3051,7 +3050,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, ch UnicodeString hebr("hebr", 4, US_INV); if (numericLeapMonthFormatter != nullptr) { - numericLeapMonthFormatter->setFormats((const Format **)¤tNumberFormat, 1); + numericLeapMonthFormatter->setFormats(reinterpret_cast<const Format**>(¤tNumberFormat), 1); } UBool isChineseCalendar = (uprv_strcmp(cal.getType(),"chinese") == 0 || uprv_strcmp(cal.getType(),"dangi") == 0); @@ -4362,7 +4361,7 @@ SimpleDateFormat::compareSimpleAffix(const UnicodeString& affix, int32_t SimpleDateFormat::skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) const { const char16_t* s = text.getBuffer(); - return (int32_t)(PatternProps::skipWhiteSpace(s + pos, text.length() - pos) - s); + return static_cast<int32_t>(PatternProps::skipWhiteSpace(s + pos, text.length() - pos) - s); } //---------------------------------------------------------------------- diff --git a/deps/icu-small/source/i18n/strmatch.cpp b/deps/icu-small/source/i18n/strmatch.cpp index b6a5c94e98d407..1c8734c1a96df5 100644 --- a/deps/icu-small/source/i18n/strmatch.cpp +++ b/deps/icu-small/source/i18n/strmatch.cpp @@ -165,7 +165,7 @@ UnicodeString& StringMatcher::toPattern(UnicodeString& result, result.truncate(0); UnicodeString str, quoteBuf; if (segmentNumber > 0) { - result.append((char16_t)40); /*(*/ + result.append(static_cast<char16_t>(40)); /*(*/ } for (int32_t i=0; i<pattern.length(); ++i) { char16_t keyChar = pattern.charAt(i); @@ -178,7 +178,7 @@ UnicodeString& StringMatcher::toPattern(UnicodeString& result, } } if (segmentNumber > 0) { - result.append((char16_t)41); /*)*/ + result.append(static_cast<char16_t>(41)); /*)*/ } // Flush quoteBuf out to result ICU_Utility::appendToRule(result, -1, @@ -247,7 +247,7 @@ UnicodeString& StringMatcher::toReplacerPattern(UnicodeString& rule, UBool /*escapeUnprintable*/) const { // assert(segmentNumber > 0); rule.truncate(0); - rule.append((char16_t)0x0024 /*$*/); + rule.append(static_cast<char16_t>(0x0024) /*$*/); ICU_Utility::appendNumber(rule, segmentNumber, 10, 1); return rule; } diff --git a/deps/icu-small/source/i18n/strrepl.cpp b/deps/icu-small/source/i18n/strrepl.cpp index 2981553869a7c5..a3a0eae1e77fee 100644 --- a/deps/icu-small/source/i18n/strrepl.cpp +++ b/deps/icu-small/source/i18n/strrepl.cpp @@ -149,7 +149,7 @@ int32_t StringReplacer::replace(Replaceable& text, text.copy(start-len, start, tempStart); destStart += len; } else { - UnicodeString str((char16_t) 0xFFFF); + UnicodeString str(static_cast<char16_t>(0xFFFF)); text.handleReplaceBetween(tempStart, tempStart, str); destStart++; } @@ -249,14 +249,14 @@ UnicodeString& StringReplacer::toReplacerPattern(UnicodeString& rule, // Handle a cursor preceding the output if (hasCursor && cursor < 0) { while (cursor++ < 0) { - ICU_Utility::appendToRule(rule, (char16_t)0x0040 /*@*/, true, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, static_cast<char16_t>(0x0040) /*@*/, true, escapeUnprintable, quoteBuf); } // Fall through and append '|' below } for (int32_t i=0; i<output.length(); ++i) { if (hasCursor && i == cursor) { - ICU_Utility::appendToRule(rule, (char16_t)0x007C /*|*/, true, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, static_cast<char16_t>(0x007C) /*|*/, true, escapeUnprintable, quoteBuf); } char16_t c = output.charAt(i); // Ok to use 16-bits here @@ -266,8 +266,8 @@ UnicodeString& StringReplacer::toReplacerPattern(UnicodeString& rule, } else { UnicodeString buf; r->toReplacerPattern(buf, escapeUnprintable); - buf.insert(0, (char16_t)0x20); - buf.append((char16_t)0x20); + buf.insert(0, static_cast<char16_t>(0x20)); + buf.append(static_cast<char16_t>(0x20)); ICU_Utility::appendToRule(rule, buf, true, escapeUnprintable, quoteBuf); } @@ -279,9 +279,9 @@ UnicodeString& StringReplacer::toReplacerPattern(UnicodeString& rule, if (hasCursor && cursor > output.length()) { cursor -= output.length(); while (cursor-- > 0) { - ICU_Utility::appendToRule(rule, (char16_t)0x0040 /*@*/, true, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, static_cast<char16_t>(0x0040) /*@*/, true, escapeUnprintable, quoteBuf); } - ICU_Utility::appendToRule(rule, (char16_t)0x007C /*|*/, true, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, static_cast<char16_t>(0x007C) /*|*/, true, escapeUnprintable, quoteBuf); } // Flush quoteBuf out to result ICU_Utility::appendToRule(rule, -1, diff --git a/deps/icu-small/source/i18n/stsearch.cpp b/deps/icu-small/source/i18n/stsearch.cpp index 3641d98e7c68a6..c41e8de21dc16a 100644 --- a/deps/icu-small/source/i18n/stsearch.cpp +++ b/deps/icu-small/source/i18n/stsearch.cpp @@ -38,7 +38,7 @@ StringSearch::StringSearch(const UnicodeString &pattern, m_strsrch_ = usearch_open(m_pattern_.getBuffer(), m_pattern_.length(), m_text_.getBuffer(), m_text_.length(), - locale.getName(), (UBreakIterator *)breakiter, + locale.getName(), reinterpret_cast<UBreakIterator*>(breakiter), &status); uprv_free(m_search_); m_search_ = nullptr; @@ -70,7 +70,7 @@ StringSearch::StringSearch(const UnicodeString &pattern, m_pattern_.length(), m_text_.getBuffer(), m_text_.length(), coll->toUCollator(), - (UBreakIterator *)breakiter, + reinterpret_cast<UBreakIterator*>(breakiter), &status); uprv_free(m_search_); m_search_ = nullptr; @@ -95,7 +95,7 @@ StringSearch::StringSearch(const UnicodeString &pattern, } m_strsrch_ = usearch_open(m_pattern_.getBuffer(), m_pattern_.length(), m_text_.getBuffer(), m_text_.length(), - locale.getName(), (UBreakIterator *)breakiter, + locale.getName(), reinterpret_cast<UBreakIterator*>(breakiter), &status); uprv_free(m_search_); m_search_ = nullptr; @@ -127,7 +127,7 @@ StringSearch::StringSearch(const UnicodeString &pattern, m_pattern_.length(), m_text_.getBuffer(), m_text_.length(), coll->toUCollator(), - (UBreakIterator *)breakiter, + reinterpret_cast<UBreakIterator*>(breakiter), &status); uprv_free(m_search_); m_search_ = nullptr; @@ -159,7 +159,7 @@ StringSearch::StringSearch(const StringSearch &that) : m_text_.getBuffer(), m_text_.length(), that.m_strsrch_->collator, - (UBreakIterator *)that.m_breakiterator_, + reinterpret_cast<UBreakIterator*>(that.m_breakiterator_), &status); if (U_SUCCESS(status)) { // m_search_ has been created by the base SearchIterator class diff --git a/deps/icu-small/source/i18n/timezone.cpp b/deps/icu-small/source/i18n/timezone.cpp index 2f6794c506015a..118dfe2f2af629 100644 --- a/deps/icu-small/source/i18n/timezone.cpp +++ b/deps/icu-small/source/i18n/timezone.cpp @@ -195,7 +195,7 @@ static int32_t findInStringArray(UResourceBundle* array, const UnicodeString& id U_DEBUG_TZ_MSG(("fisa: Looking for %s, between %d and %d\n", U_DEBUG_TZ_STR(UnicodeString(id).getTerminatedBuffer()), start, limit)); for (;;) { - mid = (int32_t)((start + limit) / 2); + mid = static_cast<int32_t>((start + limit) / 2); if (lastMid == mid) { /* Have we moved? */ break; /* We haven't moved, and it wasn't found. */ } @@ -258,7 +258,7 @@ static UResourceBundle* getZoneByName(const UResourceBundle* top, const UnicodeS UResourceBundle* TimeZone::loadRule(const UResourceBundle* top, const UnicodeString& ruleid, UResourceBundle* oldbundle, UErrorCode& status) { char key[64]; - ruleid.extract(0, sizeof(key)-1, key, (int32_t)sizeof(key)-1, US_INV); + ruleid.extract(0, sizeof(key) - 1, key, static_cast<int32_t>(sizeof(key)) - 1, US_INV); U_DEBUG_TZ_MSG(("loadRule(%s)\n", key)); UResourceBundle *r = ures_getByKey(top, kRULES, oldbundle, &status); U_DEBUG_TZ_MSG(("loadRule(%s) -> kRULES [%s]\n", key, u_errorName(status))); @@ -630,7 +630,7 @@ static void U_CALLCONV initMap(USystemTimeZoneType type, UErrorCode& ec) { res = ures_getByKey(res, kNAMES, res, &ec); // dereference Zones section if (U_SUCCESS(ec)) { int32_t size = ures_getSize(res); - int32_t *m = (int32_t *)uprv_malloc(size * sizeof(int32_t)); + int32_t* m = static_cast<int32_t*>(uprv_malloc(size * sizeof(int32_t))); if (m == nullptr) { ec = U_MEMORY_ALLOCATION_ERROR; } else { @@ -669,7 +669,7 @@ static void U_CALLCONV initMap(USystemTimeZoneType type, UErrorCode& ec) { } if (U_SUCCESS(ec)) { int32_t *tmp = m; - m = (int32_t *)uprv_realloc(tmp, numEntries * sizeof(int32_t)); + m = static_cast<int32_t*>(uprv_realloc(tmp, numEntries * sizeof(int32_t))); if (m == nullptr) { // realloc failed.. use the original one even it has unused // area at the end @@ -738,10 +738,11 @@ void TimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset, ec = U_ILLEGAL_ARGUMENT_ERROR; return; } - Grego::dayToFields(day, year, month, dom, dow); + Grego::dayToFields(day, year, month, dom, dow, ec); + if (U_FAILURE(ec)) return; dstOffset = getOffset(GregorianCalendar::AD, year, month, dom, - (uint8_t) dow, millis, + static_cast<uint8_t>(dow), millis, Grego::monthLength(year, month), ec) - rawOffset; @@ -848,7 +849,7 @@ class TZEnumeration : public StringEnumeration { if (region != nullptr || rawOffset != nullptr) { int32_t filteredMapSize = DEFAULT_FILTERED_MAP_SIZE; - filteredMap = (int32_t *)uprv_malloc(filteredMapSize * sizeof(int32_t)); + filteredMap = static_cast<int32_t*>(uprv_malloc(filteredMapSize * sizeof(int32_t))); if (filteredMap == nullptr) { ec = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -892,7 +893,7 @@ class TZEnumeration : public StringEnumeration { if (filteredMapSize <= numEntries) { filteredMapSize += MAP_INCREMENT_SIZE; - int32_t *tmp = (int32_t *)uprv_realloc(filteredMap, filteredMapSize * sizeof(int32_t)); + int32_t* tmp = static_cast<int32_t*>(uprv_realloc(filteredMap, filteredMapSize * sizeof(int32_t))); if (tmp == nullptr) { ec = U_MEMORY_ALLOCATION_ERROR; break; @@ -935,7 +936,7 @@ class TZEnumeration : public StringEnumeration { TZEnumeration(const TZEnumeration &other) : StringEnumeration(), map(nullptr), localMap(nullptr), len(0), pos(0) { if (other.localMap != nullptr) { - localMap = (int32_t *)uprv_malloc(other.len * sizeof(int32_t)); + localMap = static_cast<int32_t*>(uprv_malloc(other.len * sizeof(int32_t))); if (localMap != nullptr) { len = other.len; uprv_memcpy(localMap, other.localMap, len * sizeof(int32_t)); @@ -1472,33 +1473,33 @@ TimeZone::formatCustomID(int32_t hour, int32_t min, int32_t sec, id.setTo(GMT_ID, GMT_ID_LENGTH); if (hour | min | sec) { if (negative) { - id += (char16_t)MINUS; + id += static_cast<char16_t>(MINUS); } else { - id += (char16_t)PLUS; + id += static_cast<char16_t>(PLUS); } if (hour < 10) { - id += (char16_t)ZERO_DIGIT; + id += static_cast<char16_t>(ZERO_DIGIT); } else { - id += (char16_t)(ZERO_DIGIT + hour/10); + id += static_cast<char16_t>(ZERO_DIGIT + hour / 10); } - id += (char16_t)(ZERO_DIGIT + hour%10); - id += (char16_t)COLON; + id += static_cast<char16_t>(ZERO_DIGIT + hour % 10); + id += static_cast<char16_t>(COLON); if (min < 10) { - id += (char16_t)ZERO_DIGIT; + id += static_cast<char16_t>(ZERO_DIGIT); } else { - id += (char16_t)(ZERO_DIGIT + min/10); + id += static_cast<char16_t>(ZERO_DIGIT + min / 10); } - id += (char16_t)(ZERO_DIGIT + min%10); + id += static_cast<char16_t>(ZERO_DIGIT + min % 10); if (sec) { - id += (char16_t)COLON; + id += static_cast<char16_t>(COLON); if (sec < 10) { - id += (char16_t)ZERO_DIGIT; + id += static_cast<char16_t>(ZERO_DIGIT); } else { - id += (char16_t)(ZERO_DIGIT + sec/10); + id += static_cast<char16_t>(ZERO_DIGIT + sec / 10); } - id += (char16_t)(ZERO_DIGIT + sec%10); + id += static_cast<char16_t>(ZERO_DIGIT + sec % 10); } } return id; @@ -1520,7 +1521,7 @@ static void U_CALLCONV initTZDataVersion(UErrorCode &status) { const char16_t *tzver = ures_getStringByKey(bundle.getAlias(), kTZVERSION, &len, &status); if (U_SUCCESS(status)) { - if (len >= (int32_t)sizeof(TZDATA_VERSION)) { + if (len >= static_cast<int32_t>(sizeof(TZDATA_VERSION))) { // Ensure that there is always space for a trailing nul in TZDATA_VERSION len = sizeof(TZDATA_VERSION) - 1; } @@ -1606,8 +1607,11 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode return winid; } - UResourceBundle *mapTimezones = ures_openDirect(nullptr, "windowsZones", &status); - ures_getByKey(mapTimezones, "mapTimezones", mapTimezones, &status); + LocalUResourceBundlePointer mapTimezones(ures_openDirect(nullptr, "windowsZones", &status)); + if (U_FAILURE(status)) { + return winid; + } + ures_getByKey(mapTimezones.getAlias(), "mapTimezones", mapTimezones.getAlias(), &status); if (U_FAILURE(status)) { return winid; @@ -1615,8 +1619,8 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode UResourceBundle *winzone = nullptr; UBool found = false; - while (ures_hasNext(mapTimezones) && !found) { - winzone = ures_getNextResource(mapTimezones, winzone, &status); + while (ures_hasNext(mapTimezones.getAlias()) && !found) { + winzone = ures_getNextResource(mapTimezones.getAlias(), winzone, &status); if (U_FAILURE(status)) { break; } @@ -1641,7 +1645,7 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode const char16_t *start = tzids; UBool hasNext = true; while (hasNext) { - const char16_t *end = u_strchr(start, (char16_t)0x20); + const char16_t* end = u_strchr(start, static_cast<char16_t>(0x20)); if (end == nullptr) { end = tzids + len; hasNext = false; @@ -1657,7 +1661,6 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode ures_close(regionalData); } ures_close(winzone); - ures_close(mapTimezones); return winid; } @@ -1682,7 +1685,7 @@ TimeZone::getIDForWindowsID(const UnicodeString& winid, const char* region, Unic char winidKey[MAX_WINDOWS_ID_SIZE]; int32_t winKeyLen = winid.extract(0, winid.length(), winidKey, sizeof(winidKey) - 1, US_INV); - if (winKeyLen == 0 || winKeyLen >= (int32_t)sizeof(winidKey)) { + if (winKeyLen == 0 || winKeyLen >= static_cast<int32_t>(sizeof(winidKey))) { ures_close(zones); return id; } @@ -1703,7 +1706,7 @@ TimeZone::getIDForWindowsID(const UnicodeString& winid, const char* region, Unic // regional mapping is optional if (U_SUCCESS(tmperr)) { // first ID delimited by space is the default one - const char16_t *end = u_strchr(tzids, (char16_t)0x20); + const char16_t* end = u_strchr(tzids, static_cast<char16_t>(0x20)); if (end == nullptr) { id.setTo(tzids, -1); } else { diff --git a/deps/icu-small/source/i18n/titletrn.cpp b/deps/icu-small/source/i18n/titletrn.cpp index d3732893a78cd0..4f2baa00708ce3 100644 --- a/deps/icu-small/source/i18n/titletrn.cpp +++ b/deps/icu-small/source/i18n/titletrn.cpp @@ -132,7 +132,7 @@ void TitlecaseTransliterator::handleTransliterate( } else { result=ucase_toFullLower(c, utrans_rep_caseContextIterator, &csc, &s, UCASE_LOC_ROOT); } - doTitle = (UBool)(type==0); // doTitle=isUncased + doTitle = static_cast<UBool>(type == 0); // doTitle=isUncased if(csc.b1 && isIncremental) { // fMap() tried to look beyond the context limit diff --git a/deps/icu-small/source/i18n/tmutfmt.cpp b/deps/icu-small/source/i18n/tmutfmt.cpp index 9f7bc89eeb2755..f96ab4322647c8 100644 --- a/deps/icu-small/source/i18n/tmutfmt.cpp +++ b/deps/icu-small/source/i18n/tmutfmt.cpp @@ -116,7 +116,7 @@ TimeUnitFormat::TimeUnitFormat(const TimeUnitFormat& other) { for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; i < TimeUnit::UTIMEUNIT_FIELD_COUNT; - i = (TimeUnit::UTimeUnitFields)(i+1)) { + i = static_cast<TimeUnit::UTimeUnitFields>(i + 1)) { UErrorCode status = U_ZERO_ERROR; fTimeUnitToCountToPatterns[i] = initHash(status); if (U_SUCCESS(status)) { @@ -132,7 +132,7 @@ TimeUnitFormat::TimeUnitFormat(const TimeUnitFormat& other) TimeUnitFormat::~TimeUnitFormat() { for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; i < TimeUnit::UTIMEUNIT_FIELD_COUNT; - i = (TimeUnit::UTimeUnitFields)(i+1)) { + i = static_cast<TimeUnit::UTimeUnitFields>(i + 1)) { deleteHash(fTimeUnitToCountToPatterns[i]); fTimeUnitToCountToPatterns[i] = nullptr; } @@ -153,13 +153,13 @@ TimeUnitFormat::operator=(const TimeUnitFormat& other) { MeasureFormat::operator=(other); for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; i < TimeUnit::UTIMEUNIT_FIELD_COUNT; - i = (TimeUnit::UTimeUnitFields)(i+1)) { + i = static_cast<TimeUnit::UTimeUnitFields>(i + 1)) { deleteHash(fTimeUnitToCountToPatterns[i]); fTimeUnitToCountToPatterns[i] = nullptr; } for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; i < TimeUnit::UTIMEUNIT_FIELD_COUNT; - i = (TimeUnit::UTimeUnitFields)(i+1)) { + i = static_cast<TimeUnit::UTimeUnitFields>(i + 1)) { UErrorCode status = U_ZERO_ERROR; fTimeUnitToCountToPatterns[i] = initHash(status); if (U_SUCCESS(status)) { @@ -193,22 +193,22 @@ TimeUnitFormat::parseObject(const UnicodeString& source, // and looking for the longest match. for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; i < TimeUnit::UTIMEUNIT_FIELD_COUNT; - i = (TimeUnit::UTimeUnitFields)(i+1)) { + i = static_cast<TimeUnit::UTimeUnitFields>(i + 1)) { Hashtable* countToPatterns = fTimeUnitToCountToPatterns[i]; int32_t elemPos = UHASH_FIRST; const UHashElement* elem = nullptr; while ((elem = countToPatterns->nextElement(elemPos)) != nullptr){ const UHashTok keyTok = elem->key; - UnicodeString* count = (UnicodeString*)keyTok.pointer; + UnicodeString* count = static_cast<UnicodeString*>(keyTok.pointer); #ifdef TMUTFMT_DEBUG count->extract(0, count->length(), res, "UTF-8"); std::cout << "parse plural count: " << res << "\n"; #endif const UHashTok valueTok = elem->value; // the value is a pair of MessageFormat* - MessageFormat** patterns = (MessageFormat**)valueTok.pointer; + MessageFormat** patterns = static_cast<MessageFormat**>(valueTok.pointer); for (UTimeUnitFormatStyle style = UTMUTFMT_FULL_STYLE; style < UTMUTFMT_FORMAT_STYLE_COUNT; - style = (UTimeUnitFormatStyle)(style + 1)) { + style = static_cast<UTimeUnitFormatStyle>(style + 1)) { MessageFormat* pattern = patterns[style]; pos.setErrorIndex(-1); pos.setIndex(oldPos); @@ -295,7 +295,7 @@ TimeUnitFormat::create(UTimeUnitFormatStyle style, UErrorCode& status) { // before checking for failure status. for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; i < TimeUnit::UTIMEUNIT_FIELD_COUNT; - i = (TimeUnit::UTimeUnitFields)(i+1)) { + i = static_cast<TimeUnit::UTimeUnitFields>(i + 1)) { fTimeUnitToCountToPatterns[i] = nullptr; } @@ -346,7 +346,7 @@ TimeUnitFormat::initDataMembers(UErrorCode& err){ } for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR; i < TimeUnit::UTIMEUNIT_FIELD_COUNT; - i = (TimeUnit::UTimeUnitFields)(i+1)) { + i = static_cast<TimeUnit::UTimeUnitFields>(i + 1)) { deleteHash(fTimeUnitToCountToPatterns[i]); fTimeUnitToCountToPatterns[i] = nullptr; } @@ -432,10 +432,10 @@ struct TimeUnitFormatReadSink : public ResourceSink { return; } MessageFormat** formatters = - (MessageFormat**)countToPatterns->get(pluralCountUniStr); + static_cast<MessageFormat**>(countToPatterns->get(pluralCountUniStr)); if (formatters == nullptr) { LocalMemory<MessageFormat *> localFormatters( - (MessageFormat **)uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT*sizeof(MessageFormat*))); + static_cast<MessageFormat**>(uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT * sizeof(MessageFormat*)))); if (localFormatters.isNull()) { errorCode = U_MEMORY_ALLOCATION_ERROR; return; @@ -521,14 +521,14 @@ TimeUnitFormat::checkConsistency(UTimeUnitFormatStyle style, const char* key, UE return; } } - MessageFormat** formatters = (MessageFormat**)countToPatterns->get(*pluralCount); + MessageFormat** formatters = static_cast<MessageFormat**>(countToPatterns->get(*pluralCount)); if( formatters == nullptr || formatters[style] == nullptr ) { // look through parents const char* localeName = getLocaleID(err); CharString pluralCountChars; pluralCountChars.appendInvariantChars(*pluralCount, err); searchInLocaleChain(style, key, localeName, - (TimeUnit::UTimeUnitFields)i, + static_cast<TimeUnit::UTimeUnitFields>(i), *pluralCount, pluralCountChars.data(), countToPatterns, err); } @@ -578,10 +578,10 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, if (U_FAILURE(err)) { return; } - MessageFormat** formatters = (MessageFormat**)countToPatterns->get(srcPluralCount); + MessageFormat** formatters = static_cast<MessageFormat**>(countToPatterns->get(srcPluralCount)); if (formatters == nullptr) { LocalMemory<MessageFormat *> localFormatters( - (MessageFormat**)uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT*sizeof(MessageFormat*))); + static_cast<MessageFormat**>(uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT * sizeof(MessageFormat*)))); formatters = localFormatters.getAlias(); localFormatters[UTMUTFMT_FULL_STYLE] = nullptr; localFormatters[UTMUTFMT_ABBREVIATED_STYLE] = nullptr; @@ -615,7 +615,7 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, if (U_FAILURE(err)) { return; } - MessageFormat** formatters = (MessageFormat**)countToPatterns->get(srcPluralCount); + MessageFormat** formatters = static_cast<MessageFormat**>(countToPatterns->get(srcPluralCount)); if (formatters != nullptr && formatters[style] != nullptr) { return; } @@ -649,10 +649,10 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, if (U_FAILURE(err)) { return; } - MessageFormat** formatters = (MessageFormat**)countToPatterns->get(srcPluralCount); + MessageFormat** formatters = static_cast<MessageFormat**>(countToPatterns->get(srcPluralCount)); if (formatters == nullptr) { LocalMemory<MessageFormat *> localFormatters ( - (MessageFormat**)uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT*sizeof(MessageFormat*))); + static_cast<MessageFormat**>(uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT * sizeof(MessageFormat*)))); if (localFormatters.isNull()) { err = U_MEMORY_ALLOCATION_ERROR; return; @@ -697,7 +697,7 @@ TimeUnitFormat::deleteHash(Hashtable* htable) { if ( htable ) { while ( (element = htable->nextElement(pos)) != nullptr ) { const UHashTok valueTok = element->value; - const MessageFormat** value = (const MessageFormat**)valueTok.pointer; + const MessageFormat** value = static_cast<const MessageFormat**>(valueTok.pointer); delete value[UTMUTFMT_FULL_STYLE]; delete value[UTMUTFMT_ABBREVIATED_STYLE]; //delete[] value; @@ -718,10 +718,10 @@ TimeUnitFormat::copyHash(const Hashtable* source, Hashtable* target, UErrorCode& if ( source ) { while ( (element = source->nextElement(pos)) != nullptr ) { const UHashTok keyTok = element->key; - const UnicodeString* key = (UnicodeString*)keyTok.pointer; + const UnicodeString* key = static_cast<UnicodeString*>(keyTok.pointer); const UHashTok valueTok = element->value; - const MessageFormat** value = (const MessageFormat**)valueTok.pointer; - MessageFormat** newVal = (MessageFormat**)uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT*sizeof(MessageFormat*)); + const MessageFormat** value = static_cast<const MessageFormat**>(valueTok.pointer); + MessageFormat** newVal = static_cast<MessageFormat**>(uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT * sizeof(MessageFormat*))); newVal[0] = value[0]->clone(); newVal[1] = value[1]->clone(); target->put(UnicodeString(*key), newVal, status); diff --git a/deps/icu-small/source/i18n/translit.cpp b/deps/icu-small/source/i18n/translit.cpp index 42256140b1746e..7b1e9f57135a7a 100644 --- a/deps/icu-small/source/i18n/translit.cpp +++ b/deps/icu-small/source/i18n/translit.cpp @@ -132,7 +132,7 @@ Transliterator::Transliterator(const UnicodeString& theID, maximumContextLength(0) { // NUL-terminate the ID string, which is a non-aliased copy. - ID.append((char16_t)0); + ID.append(static_cast<char16_t>(0)); ID.truncate(ID.length()-1); } @@ -151,7 +151,7 @@ Transliterator::Transliterator(const Transliterator& other) : maximumContextLength(other.maximumContextLength) { // NUL-terminate the ID string, which is a non-aliased copy. - ID.append((char16_t)0); + ID.append(static_cast<char16_t>(0)); ID.truncate(ID.length()-1); if (other.filter != nullptr) { @@ -759,8 +759,8 @@ UnicodeString& U_EXPORT2 Transliterator::getDisplayName(const UnicodeString& id, if (uprv_isInvariantUString(ID.getBuffer(), ID.length())) { char key[200]; uprv_strcpy(key, RB_DISPLAY_NAME_PREFIX); - int32_t length=(int32_t)uprv_strlen(RB_DISPLAY_NAME_PREFIX); - ID.extract(0, (int32_t)(sizeof(key)-length), key+length, (int32_t)(sizeof(key)-length), US_INV); + int32_t length = static_cast<int32_t>(uprv_strlen(RB_DISPLAY_NAME_PREFIX)); + ID.extract(0, static_cast<int32_t>(sizeof(key) - length), key + length, static_cast<int32_t>(sizeof(key) - length), US_INV); // Try to retrieve a UnicodeString from the bundle. UnicodeString resString = bundle.getStringEx(key, status); @@ -793,13 +793,13 @@ UnicodeString& U_EXPORT2 Transliterator::getDisplayName(const UnicodeString& id, // Use display names for the scripts, if they exist UnicodeString s; - length=(int32_t)uprv_strlen(RB_SCRIPT_DISPLAY_NAME_PREFIX); + length = static_cast<int32_t>(uprv_strlen(RB_SCRIPT_DISPLAY_NAME_PREFIX)); for (int j=1; j<=2; ++j) { status = U_ZERO_ERROR; uprv_strcpy(key, RB_SCRIPT_DISPLAY_NAME_PREFIX); args[j].getString(s); if (uprv_isInvariantUString(s.getBuffer(), s.length())) { - s.extract(0, sizeof(key)-length-1, key+length, (int32_t)sizeof(key)-length-1, US_INV); + s.extract(0, sizeof(key) - length - 1, key + length, static_cast<int32_t>(sizeof(key)) - length - 1, US_INV); resString = bundle.getStringEx(key, status); @@ -949,7 +949,7 @@ Transliterator::createInstance(const UnicodeString& ID, t = new CompoundTransliterator(list, parseError, status); } else { - t = (Transliterator*)list.elementAt(0); + t = static_cast<Transliterator*>(list.elementAt(0)); } // Check null pointer if (t != nullptr) { @@ -1068,7 +1068,7 @@ Transliterator::createFromRules(const UnicodeString& ID, t = new NullTransliterator(); } else if (parser.idBlockVector.size() == 0 && parser.dataVector.size() == 1) { - t = new RuleBasedTransliterator(ID, (TransliterationRuleData*)parser.dataVector.orphanElementAt(0), true); + t = new RuleBasedTransliterator(ID, static_cast<TransliterationRuleData*>(parser.dataVector.orphanElementAt(0)), true); } else if (parser.idBlockVector.size() == 1 && parser.dataVector.size() == 0) { // idBlock, no data -- this is an alias. The ID has @@ -1079,10 +1079,10 @@ Transliterator::createFromRules(const UnicodeString& ID, UnicodeString filterPattern; parser.compoundFilter->toPattern(filterPattern, false); t = createInstance(filterPattern + UnicodeString(ID_DELIM) - + *((UnicodeString*)parser.idBlockVector.elementAt(0)), UTRANS_FORWARD, parseError, status); + + *static_cast<UnicodeString*>(parser.idBlockVector.elementAt(0)), UTRANS_FORWARD, parseError, status); } else - t = createInstance(*((UnicodeString*)parser.idBlockVector.elementAt(0)), UTRANS_FORWARD, parseError, status); + t = createInstance(*static_cast<UnicodeString*>(parser.idBlockVector.elementAt(0)), UTRANS_FORWARD, parseError, status); if (t != nullptr) { @@ -1101,7 +1101,7 @@ Transliterator::createFromRules(const UnicodeString& ID, for (int32_t i = 0; i < limit; i++) { if (i < parser.idBlockVector.size()) { - UnicodeString* idBlock = (UnicodeString*)parser.idBlockVector.elementAt(i); + UnicodeString* idBlock = static_cast<UnicodeString*>(parser.idBlockVector.elementAt(i)); if (!idBlock->isEmpty()) { Transliterator* temp = createInstance(*idBlock, UTRANS_FORWARD, parseError, status); if (U_FAILURE(status)) { @@ -1120,7 +1120,7 @@ Transliterator::createFromRules(const UnicodeString& ID, } } if (!parser.dataVector.isEmpty()) { - TransliterationRuleData* data = (TransliterationRuleData*)parser.dataVector.orphanElementAt(0); + TransliterationRuleData* data = static_cast<TransliterationRuleData*>(parser.dataVector.orphanElementAt(0)); // TODO: Should passNumber be turned into a decimal-string representation (1 -> "1")? RuleBasedTransliterator* temprbt = new RuleBasedTransliterator(UnicodeString(CompoundTransliterator::PASS_STRING) + UnicodeString(passNumber++), data, true); diff --git a/deps/icu-small/source/i18n/transreg.cpp b/deps/icu-small/source/i18n/transreg.cpp index 226edc6ff9ad72..5f050f2e2bd325 100644 --- a/deps/icu-small/source/i18n/transreg.cpp +++ b/deps/icu-small/source/i18n/transreg.cpp @@ -142,8 +142,8 @@ Transliterator* TransliteratorAlias::create(UParseError& pe, // to see whether there really are ID blocks at the beginning and end (by looking for U+FFFF, which // marks the position where an anonymous transliterator goes) and adjust accordingly int32_t anonymousRBTs = transes->size(); - UnicodeString noIDBlock((char16_t)(0xffff)); - noIDBlock += ((char16_t)(0xffff)); + UnicodeString noIDBlock(static_cast<char16_t>(0xffff)); + noIDBlock += static_cast<char16_t>(0xffff); int32_t pos = aliasesOrRules.indexOf(noIDBlock); while (pos >= 0) { pos = aliasesOrRules.indexOf(noIDBlock, pos + 1); @@ -151,7 +151,7 @@ Transliterator* TransliteratorAlias::create(UParseError& pe, UVector transliterators(uprv_deleteUObject, nullptr, ec); UnicodeString idBlock; - int32_t blockSeparatorPos = aliasesOrRules.indexOf((char16_t)(0xffff)); + int32_t blockSeparatorPos = aliasesOrRules.indexOf(static_cast<char16_t>(0xffff)); while (blockSeparatorPos >= 0) { aliasesOrRules.extract(0, blockSeparatorPos, idBlock); aliasesOrRules.remove(0, blockSeparatorPos + 1); @@ -159,7 +159,7 @@ Transliterator* TransliteratorAlias::create(UParseError& pe, transliterators.adoptElement(Transliterator::createInstance(idBlock, UTRANS_FORWARD, pe, ec), ec); if (!transes->isEmpty()) transliterators.adoptElement(transes->orphanElementAt(0), ec); - blockSeparatorPos = aliasesOrRules.indexOf((char16_t)(0xffff)); + blockSeparatorPos = aliasesOrRules.indexOf(static_cast<char16_t>(0xffff)); } if (!aliasesOrRules.isEmpty()) transliterators.adoptElement(Transliterator::createInstance(aliasesOrRules, UTRANS_FORWARD, pe, ec), ec); @@ -177,7 +177,7 @@ Transliterator* TransliteratorAlias::create(UParseError& pe, } } else { for (int32_t i = 0; i < transliterators.size(); i++) - delete (Transliterator*)(transliterators.elementAt(i)); + delete static_cast<Transliterator*>(transliterators.elementAt(i)); } } break; @@ -492,7 +492,7 @@ TransliteratorEntry::~TransliteratorEntry() { delete u.data; } else if (entryType == COMPOUND_RBT) { while (u.dataVector != nullptr && !u.dataVector->isEmpty()) - delete (TransliterationRuleData*)u.dataVector->orphanElementAt(0); + delete static_cast<TransliterationRuleData*>(u.dataVector->orphanElementAt(0)); delete u.dataVector; } delete compoundFilter; @@ -593,11 +593,11 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID, entry->stringArg = UNICODE_STRING_SIMPLE("Any-nullptr"); } else if (parser.idBlockVector.isEmpty() && parser.dataVector.size() == 1) { - entry->u.data = (TransliterationRuleData*)parser.dataVector.orphanElementAt(0); + entry->u.data = static_cast<TransliterationRuleData*>(parser.dataVector.orphanElementAt(0)); entry->entryType = TransliteratorEntry::RBT_DATA; } else if (parser.idBlockVector.size() == 1 && parser.dataVector.isEmpty()) { - entry->stringArg = *(UnicodeString*)(parser.idBlockVector.elementAt(0)); + entry->stringArg = *static_cast<UnicodeString*>(parser.idBlockVector.elementAt(0)); entry->compoundFilter = parser.orphanCompoundFilter(); entry->entryType = TransliteratorEntry::ALIAS; } @@ -615,17 +615,17 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID, for (int32_t i = 0; i < limit; i++) { if (i < parser.idBlockVector.size()) { - UnicodeString* idBlock = (UnicodeString*)parser.idBlockVector.elementAt(i); + UnicodeString* idBlock = static_cast<UnicodeString*>(parser.idBlockVector.elementAt(i)); if (!idBlock->isEmpty()) entry->stringArg += *idBlock; } if (!parser.dataVector.isEmpty()) { - TransliterationRuleData* data = (TransliterationRuleData*)parser.dataVector.orphanElementAt(0); + TransliterationRuleData* data = static_cast<TransliterationRuleData*>(parser.dataVector.orphanElementAt(0)); entry->u.dataVector->addElement(data, status); if (U_FAILURE(status)) { delete data; } - entry->stringArg += (char16_t)0xffff; // use U+FFFF to mark position of RBTs in ID block + entry->stringArg += static_cast<char16_t>(0xffff); // use U+FFFF to mark position of RBTs in ID block } } } @@ -751,7 +751,7 @@ const UnicodeString& TransliteratorRegistry::getAvailableID(int32_t index) const } if (e != nullptr) { - return *(UnicodeString*) e->key.pointer; + return *static_cast<UnicodeString*>(e->key.pointer); } // If the code reaches here, the hash table was likely modified during iteration. @@ -781,20 +781,20 @@ UnicodeString& TransliteratorRegistry::getAvailableSource(int32_t index, if (e == nullptr) { result.truncate(0); } else { - result = *(UnicodeString*) e->key.pointer; + result = *static_cast<UnicodeString*>(e->key.pointer); } return result; } int32_t TransliteratorRegistry::countAvailableTargets(const UnicodeString& source) const { - Hashtable *targets = (Hashtable*) specDAG.get(source); + Hashtable* targets = static_cast<Hashtable*>(specDAG.get(source)); return (targets == nullptr) ? 0 : targets->count(); } UnicodeString& TransliteratorRegistry::getAvailableTarget(int32_t index, const UnicodeString& source, UnicodeString& result) const { - Hashtable *targets = (Hashtable*) specDAG.get(source); + Hashtable* targets = static_cast<Hashtable*>(specDAG.get(source)); if (targets == nullptr) { result.truncate(0); // invalid source return result; @@ -810,14 +810,14 @@ UnicodeString& TransliteratorRegistry::getAvailableTarget(int32_t index, if (e == nullptr) { result.truncate(0); // invalid index } else { - result = *(UnicodeString*) e->key.pointer; + result = *static_cast<UnicodeString*>(e->key.pointer); } return result; } int32_t TransliteratorRegistry::countAvailableVariants(const UnicodeString& source, const UnicodeString& target) const { - Hashtable *targets = (Hashtable*) specDAG.get(source); + Hashtable* targets = static_cast<Hashtable*>(specDAG.get(source)); if (targets == nullptr) { return 0; } @@ -836,7 +836,7 @@ UnicodeString& TransliteratorRegistry::getAvailableVariant(int32_t index, const UnicodeString& source, const UnicodeString& target, UnicodeString& result) const { - Hashtable *targets = (Hashtable*) specDAG.get(source); + Hashtable* targets = static_cast<Hashtable*>(specDAG.get(source)); if (targets == nullptr) { result.truncate(0); // invalid source return result; @@ -847,7 +847,7 @@ UnicodeString& TransliteratorRegistry::getAvailableVariant(int32_t index, while (varMask > 0) { if (varMask & 1) { if (varCount == index) { - UnicodeString *v = (UnicodeString*) variantList.elementAt(varListIndex); + UnicodeString* v = static_cast<UnicodeString*>(variantList.elementAt(varListIndex)); if (v != nullptr) { result = *v; return result; @@ -905,7 +905,7 @@ const UnicodeString* TransliteratorRegistry::Enumeration::snext(UErrorCode& stat } // Copy the string! This avoids lifetime problems. - unistr = *(const UnicodeString*) element->key.pointer; + unistr = *static_cast<const UnicodeString*>(element->key.pointer); return &unistr; } @@ -985,7 +985,7 @@ void TransliteratorRegistry::registerSTV(const UnicodeString& source, // assert(source.length() > 0); // assert(target.length() > 0); UErrorCode status = U_ZERO_ERROR; - Hashtable *targets = (Hashtable*) specDAG.get(source); + Hashtable* targets = static_cast<Hashtable*>(specDAG.get(source)); if (targets == nullptr) { int32_t size = 3; if (source.compare(ANY,3) == 0) { @@ -1030,7 +1030,7 @@ void TransliteratorRegistry::removeSTV(const UnicodeString& source, // assert(source.length() > 0); // assert(target.length() > 0); UErrorCode status = U_ZERO_ERROR; - Hashtable *targets = (Hashtable*) specDAG.get(source); + Hashtable* targets = static_cast<Hashtable*>(specDAG.get(source)); if (targets == nullptr) { return; // should never happen for valid s-t/v } @@ -1065,7 +1065,7 @@ TransliteratorEntry* TransliteratorRegistry::findInDynamicStore(const Transliter const UnicodeString& variant) const { UnicodeString ID; TransliteratorIDParser::STVtoID(src, trg, variant, ID); - TransliteratorEntry *e = (TransliteratorEntry*) registry.get(ID); + TransliteratorEntry* e = static_cast<TransliteratorEntry*>(registry.get(ID)); DEBUG_useEntry(e); return e; } @@ -1239,7 +1239,7 @@ TransliteratorEntry* TransliteratorRegistry::find(UnicodeString& source, // ICU ticket #8089 UnicodeString ID; TransliteratorIDParser::STVtoID(source, target, variant, ID); - entry = (TransliteratorEntry*) registry.get(ID); + entry = static_cast<TransliteratorEntry*>(registry.get(ID)); if (entry != nullptr) { // std::string ss; // std::cout << ID.toUTF8String(ss) << std::endl; @@ -1345,7 +1345,7 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID for (int32_t i = 0; U_SUCCESS(status) && i < entry->u.dataVector->size(); i++) { // TODO: Should passNumber be turned into a decimal-string representation (1 -> "1")? Transliterator* tl = new RuleBasedTransliterator(UnicodeString(CompoundTransliterator::PASS_STRING) + UnicodeString(passNumber++), - (TransliterationRuleData*)(entry->u.dataVector->elementAt(i)), false); + static_cast<TransliterationRuleData*>(entry->u.dataVector->elementAt(i)), false); if (tl == nullptr) status = U_MEMORY_ALLOCATION_ERROR; else @@ -1364,7 +1364,7 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID return nullptr; case TransliteratorEntry::LOCALE_RULES: aliasReturn = new TransliteratorAlias(ID, entry->stringArg, - (UTransDirection) entry->intArg); + static_cast<UTransDirection>(entry->intArg)); if (aliasReturn == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } diff --git a/deps/icu-small/source/i18n/tridpars.cpp b/deps/icu-small/source/i18n/tridpars.cpp index 40f21b45215372..5c769dc39fbcec 100644 --- a/deps/icu-small/source/i18n/tridpars.cpp +++ b/deps/icu-small/source/i18n/tridpars.cpp @@ -413,7 +413,7 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d // Construct canonical ID for (i=0; i<list.size(); ++i) { - SingleID* single = (SingleID*) list.elementAt(i); + SingleID* single = static_cast<SingleID*>(list.elementAt(i)); canonID.append(single->canonID); if (i != (list.size()-1)) { canonID.append(ID_DELIM); @@ -489,7 +489,7 @@ void TransliteratorIDParser::instantiateList(UVector& list, break; } - SingleID* single = (SingleID*) list.elementAt(i); + SingleID* single = static_cast<SingleID*>(list.elementAt(i)); if (single->basicID.length() != 0) { t = single->createInstance(); if (t == nullptr) { @@ -522,7 +522,7 @@ void TransliteratorIDParser::instantiateList(UVector& list, list.setDeleter(_deleteTransliteratorTrIDPars); while (tlist.size() > 0) { - t = (Transliterator*) tlist.orphanElementAt(0); + t = static_cast<Transliterator*>(tlist.orphanElementAt(0)); list.adoptElement(t, ec); if (U_FAILURE(ec)) { list.removeAllElements(); @@ -607,7 +607,7 @@ void TransliteratorIDParser::STVtoID(const UnicodeString& source, } // NUL-terminate the ID string for getTerminatedBuffer. // This prevents valgrind and Purify warnings. - id.append((char16_t)0); + id.append(static_cast<char16_t>(0)); id.truncate(id.length()-1); } @@ -862,7 +862,7 @@ TransliteratorIDParser::specsToSpecialInverse(const Specs& specs, UErrorCode &st UnicodeString* inverseTarget; umtx_lock(&LOCK); - inverseTarget = (UnicodeString*) SPECIAL_INVERSES->get(specs.target); + inverseTarget = static_cast<UnicodeString*>(SPECIAL_INVERSES->get(specs.target)); umtx_unlock(&LOCK); if (inverseTarget != nullptr) { diff --git a/deps/icu-small/source/i18n/tzfmt.cpp b/deps/icu-small/source/i18n/tzfmt.cpp index 00c69ee7734669..0fb6336b86de02 100644 --- a/deps/icu-small/source/i18n/tzfmt.cpp +++ b/deps/icu-small/source/i18n/tzfmt.cpp @@ -225,7 +225,7 @@ GMTOffsetField::createText(const UnicodeString& text, UErrorCode& status) { } int32_t len = text.length(); - result->fText = (char16_t*)uprv_malloc((len + 1) * sizeof(char16_t)); + result->fText = static_cast<char16_t*>(uprv_malloc((len + 1) * sizeof(char16_t))); if (result->fText == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; delete result; @@ -331,7 +331,7 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status) } else { fTargetRegion[0] = 0; } - } else if (regionLen < (int32_t)sizeof(fTargetRegion)) { + } else if (regionLen < static_cast<int32_t>(sizeof(fTargetRegion))) { uprv_strcpy(fTargetRegion, region); } else { fTargetRegion[0] = 0; @@ -374,10 +374,10 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status) UBool useDefaultOffsetPatterns = true; if (hourFormats) { - char16_t *sep = u_strchr(hourFormats, (char16_t)0x003B /* ';' */); + char16_t* sep = u_strchr(hourFormats, static_cast<char16_t>(0x003B) /* ';' */); if (sep != nullptr) { UErrorCode tmpStatus = U_ZERO_ERROR; - fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(false, hourFormats, (int32_t)(sep - hourFormats)); + fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(false, hourFormats, static_cast<int32_t>(sep - hourFormats)); fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(true, sep + 1, -1); expandOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HMS], tmpStatus); expandOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS], tmpStatus); @@ -1342,7 +1342,7 @@ TimeZoneFormat::formatGeneric(const TimeZone& tz, int32_t genType, UDate date, U } return gnames->getGenericLocationName(UnicodeString(true, canonicalID, -1), name); } - return gnames->getDisplayName(tz, (UTimeZoneGenericNameType)genType, date, name); + return gnames->getDisplayName(tz, static_cast<UTimeZoneGenericNameType>(genType), date, name); } UnicodeString& @@ -1540,8 +1540,8 @@ TimeZoneFormat::formatOffsetISO8601(int32_t offset, UBool isBasic, UBool useUtcI if (sep && idx != 0) { result.append(sep); } - result.append((char16_t)(0x0030 + fields[idx]/10)); - result.append((char16_t)(0x0030 + fields[idx]%10)); + result.append(static_cast<char16_t>(0x0030 + fields[idx] / 10)); + result.append(static_cast<char16_t>(0x0030 + fields[idx] % 10)); } return result; @@ -1603,7 +1603,7 @@ TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeS result.setTo(fGMTPatternPrefix); for (int32_t i = 0; i < offsetPatternItems->size(); i++) { - const GMTOffsetField* item = (GMTOffsetField*)offsetPatternItems->elementAt(i); + const GMTOffsetField* item = static_cast<GMTOffsetField*>(offsetPatternItems->elementAt(i)); GMTOffsetField::FieldType type = item->getType(); switch (type) { @@ -1641,7 +1641,7 @@ TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos } char16_t firstChar = text.charAt(start); - if (firstChar == ISO8601_UTC || firstChar == (char16_t)(ISO8601_UTC + 0x20)) { + if (firstChar == ISO8601_UTC || firstChar == static_cast<char16_t>(ISO8601_UTC + 0x20)) { // "Z" (or "z") - indicates UTC pos.setIndex(start + 1); return 0; @@ -1856,7 +1856,7 @@ TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t for (int32_t i = 0; i < patternItems->size(); i++) { int32_t len = 0; - const GMTOffsetField* field = (const GMTOffsetField*)patternItems->elementAt(i); + const GMTOffsetField* field = static_cast<const GMTOffsetField*>(patternItems->elementAt(i)); GMTOffsetField::FieldType fieldType = field->getType(); if (fieldType == GMTOffsetField::TEXT) { const char16_t* patStr = field->getPatternText(); @@ -2191,8 +2191,8 @@ TimeZoneFormat::formatOffsetWithAsciiDigits(int32_t offset, char16_t sep, Offset if (sep && idx != 0) { result.append(sep); } - result.append((char16_t)(0x0030 + fields[idx]/10)); - result.append((char16_t)(0x0030 + fields[idx]%10)); + result.append(static_cast<char16_t>(0x0030 + fields[idx] / 10)); + result.append(static_cast<char16_t>(0x0030 + fields[idx] % 10)); } return result; @@ -2577,7 +2577,7 @@ TimeZoneFormat::expandOffsetPattern(const UnicodeString& offsetHM, UnicodeString } UnicodeString sep; - int32_t idx_H = offsetHM.tempSubString(0, idx_mm).lastIndexOf((char16_t)0x0048 /* H */); + int32_t idx_H = offsetHM.tempSubString(0, idx_mm).lastIndexOf(static_cast<char16_t>(0x0048) /* H */); if (idx_H >= 0) { sep = offsetHM.tempSubString(idx_H + 1, idx_mm - (idx_H + 1)); } @@ -2607,7 +2607,7 @@ TimeZoneFormat::truncateOffsetPattern(const UnicodeString& offsetHM, UnicodeStri if (idx_HH >= 0) { return result.setTo(offsetHM.tempSubString(0, idx_HH + 2)); } - int32_t idx_H = offsetHM.tempSubString(0, idx_mm).lastIndexOf((char16_t)0x0048, 0); + int32_t idx_H = offsetHM.tempSubString(0, idx_mm).lastIndexOf(static_cast<char16_t>(0x0048), 0); if (idx_H >= 0) { return result.setTo(offsetHM.tempSubString(0, idx_H + 1)); } @@ -2647,7 +2647,7 @@ TimeZoneFormat::checkAbuttingHoursAndMinutes() { UBool afterH = false; UVector *items = fGMTOffsetPatternItems[type]; for (int32_t i = 0; i < items->size(); i++) { - const GMTOffsetField* item = (GMTOffsetField*)items->elementAt(i); + const GMTOffsetField* item = static_cast<GMTOffsetField*>(items->elementAt(i)); GMTOffsetField::FieldType fieldType = item->getType(); if (fieldType != GMTOffsetField::TEXT) { if (afterH) { @@ -2745,7 +2745,7 @@ ZoneIdMatchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, return false; } if (node->hasValues()) { - const char16_t* id = (const char16_t*)node->getValue(0); + const char16_t* id = static_cast<const char16_t*>(node->getValue(0)); if (id != nullptr) { if (fLen < matchLength) { fID = id; diff --git a/deps/icu-small/source/i18n/tzgnames.cpp b/deps/icu-small/source/i18n/tzgnames.cpp index 19ad38404bf420..57ee984ee9ba35 100644 --- a/deps/icu-small/source/i18n/tzgnames.cpp +++ b/deps/icu-small/source/i18n/tzgnames.cpp @@ -50,7 +50,7 @@ static const char16_t gEmpty[] = {0x00}; static const char16_t gDefRegionPattern[] = {0x7B, 0x30, 0x7D, 0x00}; // "{0}" static const char16_t gDefFallbackPattern[] = {0x7B, 0x31, 0x7D, 0x20, 0x28, 0x7B, 0x30, 0x7D, 0x29, 0x00}; // "{1} ({0})" -static const double kDstCheckRange = (double)184*U_MILLIS_PER_DAY; +static const double kDstCheckRange = static_cast<double>(184) * U_MILLIS_PER_DAY; @@ -157,7 +157,7 @@ TimeZoneGenericNameMatchInfo::size() const { UTimeZoneGenericNameType TimeZoneGenericNameMatchInfo::getGenericNameType(int32_t index) const { - GMatchInfo *minfo = (GMatchInfo *)fMatches->elementAt(index); + GMatchInfo* minfo = static_cast<GMatchInfo*>(fMatches->elementAt(index)); if (minfo != nullptr) { return static_cast<UTimeZoneGenericNameType>(minfo->gnameInfo->type); } @@ -166,7 +166,7 @@ TimeZoneGenericNameMatchInfo::getGenericNameType(int32_t index) const { int32_t TimeZoneGenericNameMatchInfo::getMatchLength(int32_t index) const { - ZMatchInfo *minfo = (ZMatchInfo *)fMatches->elementAt(index); + ZMatchInfo* minfo = static_cast<ZMatchInfo*>(fMatches->elementAt(index)); if (minfo != nullptr) { return minfo->matchLength; } @@ -175,7 +175,7 @@ TimeZoneGenericNameMatchInfo::getMatchLength(int32_t index) const { UnicodeString& TimeZoneGenericNameMatchInfo::getTimeZoneID(int32_t index, UnicodeString& tzID) const { - GMatchInfo *minfo = (GMatchInfo *)fMatches->elementAt(index); + GMatchInfo* minfo = static_cast<GMatchInfo*>(fMatches->elementAt(index)); if (minfo != nullptr && minfo->gnameInfo->tzID != nullptr) { tzID.setTo(true, minfo->gnameInfo->tzID, -1); } else { @@ -230,7 +230,7 @@ GNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, } fResults = lpResults.orphan(); } - GMatchInfo *gmatch = (GMatchInfo *)uprv_malloc(sizeof(GMatchInfo)); + GMatchInfo* gmatch = static_cast<GMatchInfo*>(uprv_malloc(sizeof(GMatchInfo))); if (gmatch == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return false; @@ -502,7 +502,7 @@ TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID) { U_ASSERT(status == U_ZERO_ERROR); // already checked length above tzIDKey[tzIDKeyLen] = 0; - const char16_t *locname = (const char16_t *)uhash_get(fLocationNamesMap, tzIDKey); + const char16_t* locname = static_cast<const char16_t*>(uhash_get(fLocationNamesMap, tzIDKey)); if (locname != nullptr) { // gEmpty indicate the name is not available @@ -560,7 +560,7 @@ TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID) { locname = nullptr; } else { // put the name info into the trie - GNameInfo *nameinfo = (ZNameInfo *)uprv_malloc(sizeof(GNameInfo)); + GNameInfo* nameinfo = static_cast<ZNameInfo*>(uprv_malloc(sizeof(GNameInfo))); if (nameinfo != nullptr) { nameinfo->type = UTZGNM_LOCATION; nameinfo->tzID = cacheID; @@ -756,7 +756,7 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID, key.isLong = isLong; U_ASSERT(key.tzID != nullptr && key.mzID != nullptr); - const char16_t* uplname = (const char16_t*)uhash_get(fPartialLocationNamesMap, (void *)&key); + const char16_t* uplname = static_cast<const char16_t*>(uhash_get(fPartialLocationNamesMap, &key)); if (uplname != nullptr) { return uplname; } @@ -799,7 +799,7 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID, uplname = fStringPool.get(name, status); if (U_SUCCESS(status)) { // Add the name to cache - PartialLocationKey* cacheKey = (PartialLocationKey *)uprv_malloc(sizeof(PartialLocationKey)); + PartialLocationKey* cacheKey = static_cast<PartialLocationKey*>(uprv_malloc(sizeof(PartialLocationKey))); if (cacheKey != nullptr) { cacheKey->tzID = key.tzID; cacheKey->mzID = key.mzID; @@ -809,7 +809,7 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID, uprv_free(cacheKey); } else { // put the name to the local trie as well - GNameInfo *nameinfo = (ZNameInfo *)uprv_malloc(sizeof(GNameInfo)); + GNameInfo* nameinfo = static_cast<ZNameInfo*>(uprv_malloc(sizeof(GNameInfo))); if (nameinfo != nullptr) { nameinfo->type = isLong ? UTZGNM_LONG : UTZGNM_SHORT; nameinfo->tzID = key.tzID; @@ -1142,10 +1142,10 @@ U_CDECL_END static void sweepCache() { int32_t pos = UHASH_FIRST; const UHashElement* elem; - double now = (double)uprv_getUTCtime(); + double now = static_cast<double>(uprv_getUTCtime()); while ((elem = uhash_nextElement(gTZGNCoreCache, &pos)) != nullptr) { - TZGNCoreRef *entry = (TZGNCoreRef *)elem->value.pointer; + TZGNCoreRef* entry = static_cast<TZGNCoreRef*>(elem->value.pointer); if (entry->refCount <= 0 && (now - entry->lastAccess) > CACHE_EXPIRATION) { // delete this entry uhash_removeElement(gTZGNCoreCache, elem); @@ -1193,12 +1193,13 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) { } } if (U_FAILURE(status)) { + delete instance; return nullptr; } // Check the cache, if not available, create new one and cache const char *key = locale.getName(); - cacheEntry = (TZGNCoreRef *)uhash_get(gTZGNCoreCache, key); + cacheEntry = static_cast<TZGNCoreRef*>(uhash_get(gTZGNCoreCache, key)); if (cacheEntry == nullptr) { TZGNCore *tzgnCore = nullptr; char *newKey = nullptr; @@ -1208,7 +1209,7 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) { status = U_MEMORY_ALLOCATION_ERROR; } if (U_SUCCESS(status)) { - newKey = (char *)uprv_malloc(uprv_strlen(key) + 1); + newKey = static_cast<char*>(uprv_malloc(uprv_strlen(key) + 1)); if (newKey == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { @@ -1216,13 +1217,13 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) { } } if (U_SUCCESS(status)) { - cacheEntry = (TZGNCoreRef *)uprv_malloc(sizeof(TZGNCoreRef)); + cacheEntry = static_cast<TZGNCoreRef*>(uprv_malloc(sizeof(TZGNCoreRef))); if (cacheEntry == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { cacheEntry->obj = tzgnCore; cacheEntry->refCount = 1; - cacheEntry->lastAccess = (double)uprv_getUTCtime(); + cacheEntry->lastAccess = static_cast<double>(uprv_getUTCtime()); uhash_put(gTZGNCoreCache, newKey, cacheEntry, &status); } @@ -1240,7 +1241,7 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) { } else { // Update the reference count cacheEntry->refCount++; - cacheEntry->lastAccess = (double)uprv_getUTCtime(); + cacheEntry->lastAccess = static_cast<double>(uprv_getUTCtime()); } gAccessCount++; if (gAccessCount >= SWEEP_INTERVAL) { diff --git a/deps/icu-small/source/i18n/tznames.cpp b/deps/icu-small/source/i18n/tznames.cpp index 24ca161e88c8ec..48e043a3db2b9d 100644 --- a/deps/icu-small/source/i18n/tznames.cpp +++ b/deps/icu-small/source/i18n/tznames.cpp @@ -85,10 +85,10 @@ U_CDECL_END static void sweepCache() { int32_t pos = UHASH_FIRST; const UHashElement* elem; - double now = (double)uprv_getUTCtime(); + double now = static_cast<double>(uprv_getUTCtime()); while ((elem = uhash_nextElement(gTimeZoneNamesCache, &pos)) != nullptr) { - TimeZoneNamesCacheEntry *entry = (TimeZoneNamesCacheEntry *)elem->value.pointer; + TimeZoneNamesCacheEntry* entry = static_cast<TimeZoneNamesCacheEntry*>(elem->value.pointer); if (entry->refCount <= 0 && (now - entry->lastAccess) > CACHE_EXPIRATION) { // delete this entry uhash_removeElement(gTimeZoneNamesCache, elem); @@ -152,7 +152,7 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s TimeZoneNamesCacheEntry *cacheEntry = nullptr; const char *key = locale.getName(); - cacheEntry = (TimeZoneNamesCacheEntry *)uhash_get(gTimeZoneNamesCache, key); + cacheEntry = static_cast<TimeZoneNamesCacheEntry*>(uhash_get(gTimeZoneNamesCache, key)); if (cacheEntry == nullptr) { TimeZoneNames *tznames = nullptr; char *newKey = nullptr; @@ -162,7 +162,7 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s status = U_MEMORY_ALLOCATION_ERROR; } if (U_SUCCESS(status)) { - newKey = (char *)uprv_malloc(uprv_strlen(key) + 1); + newKey = static_cast<char*>(uprv_malloc(uprv_strlen(key) + 1)); if (newKey == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { @@ -170,13 +170,13 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s } } if (U_SUCCESS(status)) { - cacheEntry = (TimeZoneNamesCacheEntry *)uprv_malloc(sizeof(TimeZoneNamesCacheEntry)); + cacheEntry = static_cast<TimeZoneNamesCacheEntry*>(uprv_malloc(sizeof(TimeZoneNamesCacheEntry))); if (cacheEntry == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; } else { cacheEntry->names = tznames; cacheEntry->refCount = 1; - cacheEntry->lastAccess = (double)uprv_getUTCtime(); + cacheEntry->lastAccess = static_cast<double>(uprv_getUTCtime()); uhash_put(gTimeZoneNamesCache, newKey, cacheEntry, &status); } @@ -194,7 +194,7 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s } else { // Update the reference count cacheEntry->refCount++; - cacheEntry->lastAccess = (double)uprv_getUTCtime(); + cacheEntry->lastAccess = static_cast<double>(uprv_getUTCtime()); } gAccessCount++; if (gAccessCount >= SWEEP_INTERVAL) { @@ -442,7 +442,7 @@ TimeZoneNames::MatchInfoCollection::size() const { UTimeZoneNameType TimeZoneNames::MatchInfoCollection::getNameTypeAt(int32_t idx) const { - const MatchInfo* match = (const MatchInfo*)fMatches->elementAt(idx); + const MatchInfo* match = static_cast<const MatchInfo*>(fMatches->elementAt(idx)); if (match) { return match->nameType; } @@ -451,7 +451,7 @@ TimeZoneNames::MatchInfoCollection::getNameTypeAt(int32_t idx) const { int32_t TimeZoneNames::MatchInfoCollection::getMatchLengthAt(int32_t idx) const { - const MatchInfo* match = (const MatchInfo*)fMatches->elementAt(idx); + const MatchInfo* match = static_cast<const MatchInfo*>(fMatches->elementAt(idx)); if (match) { return match->matchLength; } @@ -461,7 +461,7 @@ TimeZoneNames::MatchInfoCollection::getMatchLengthAt(int32_t idx) const { UBool TimeZoneNames::MatchInfoCollection::getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const { tzID.remove(); - const MatchInfo* match = (const MatchInfo*)fMatches->elementAt(idx); + const MatchInfo* match = static_cast<const MatchInfo*>(fMatches->elementAt(idx)); if (match && match->isTZID) { tzID.setTo(match->id); return true; @@ -472,7 +472,7 @@ TimeZoneNames::MatchInfoCollection::getTimeZoneIDAt(int32_t idx, UnicodeString& UBool TimeZoneNames::MatchInfoCollection::getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const { mzID.remove(); - const MatchInfo* match = (const MatchInfo*)fMatches->elementAt(idx); + const MatchInfo* match = static_cast<const MatchInfo*>(fMatches->elementAt(idx)); if (match && !match->isTZID) { mzID.setTo(match->id); return true; diff --git a/deps/icu-small/source/i18n/tznames_impl.cpp b/deps/icu-small/source/i18n/tznames_impl.cpp index 038b8097f2162f..9b7ade7f0bb12f 100644 --- a/deps/icu-small/source/i18n/tznames_impl.cpp +++ b/deps/icu-small/source/i18n/tznames_impl.cpp @@ -132,7 +132,7 @@ void CharacterNode::deleteValues(UObjectDeleter *valueDeleter) { valueDeleter(fValues); } } else { - delete (UVector *)fValues; + delete static_cast<UVector*>(fValues); } } @@ -168,7 +168,7 @@ CharacterNode::addValue(void *value, UObjectDeleter *valueDeleter, UErrorCode &s fHasValuesVector = true; } // Add the new value. - UVector *values = (UVector *)fValues; + UVector* values = static_cast<UVector*>(fValues); if (values->hasDeleter()) { values->adoptElement(value, status); } else { @@ -235,31 +235,25 @@ TextTrieMap::put(const char16_t *key, void *value, UErrorCode &status) { LocalPointer<UVector> lpLazyContents(new UVector(status), status); fLazyContents = lpLazyContents.orphan(); } - if (U_FAILURE(status)) { - if (fValueDeleter) { - fValueDeleter((void*) key); + if (U_SUCCESS(status)) { + U_ASSERT(fLazyContents != nullptr); + char16_t *s = const_cast<char16_t *>(key); + fLazyContents->addElement(s, status); + if (U_SUCCESS(status)) { + fLazyContents->addElement(value, status); + return; } - return; } - U_ASSERT(fLazyContents != nullptr); - - char16_t *s = const_cast<char16_t *>(key); - fLazyContents->addElement(s, status); - if (U_FAILURE(status)) { - if (fValueDeleter) { - fValueDeleter((void*) key); - } - return; + if (fValueDeleter) { + fValueDeleter(value); } - - fLazyContents->addElement(value, status); } void TextTrieMap::putImpl(const UnicodeString &key, void *value, UErrorCode &status) { if (fNodes == nullptr) { fNodesCapacity = 512; - fNodes = (CharacterNode *)uprv_malloc(fNodesCapacity * sizeof(CharacterNode)); + fNodes = static_cast<CharacterNode*>(uprv_malloc(fNodesCapacity * sizeof(CharacterNode))); if (fNodes == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; @@ -298,7 +292,7 @@ TextTrieMap::growNodes() { if (newCapacity > 0xffff) { newCapacity = 0xffff; } - CharacterNode *newNodes = (CharacterNode *)uprv_malloc(newCapacity * sizeof(CharacterNode)); + CharacterNode* newNodes = static_cast<CharacterNode*>(uprv_malloc(newCapacity * sizeof(CharacterNode))); if (newNodes == nullptr) { return false; } @@ -331,7 +325,7 @@ TextTrieMap::addChildNode(CharacterNode *parent, char16_t c, UErrorCode &status) // Ensure capacity. Grow fNodes[] if needed. if (fNodesCount == fNodesCapacity) { - int32_t parentIndex = (int32_t)(parent - fNodes); + int32_t parentIndex = static_cast<int32_t>(parent - fNodes); if (!growNodes()) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -345,9 +339,9 @@ TextTrieMap::addChildNode(CharacterNode *parent, char16_t c, UErrorCode &status) node->fCharacter = c; node->fNextSibling = nodeIndex; if (prevIndex == 0) { - parent->fFirstChild = (uint16_t)fNodesCount; + parent->fFirstChild = static_cast<uint16_t>(fNodesCount); } else { - fNodes[prevIndex].fNextSibling = (uint16_t)fNodesCount; + fNodes[prevIndex].fNextSibling = static_cast<uint16_t>(fNodesCount); } ++fNodesCount; return node; @@ -378,7 +372,7 @@ TextTrieMap::getChildNode(CharacterNode *parent, char16_t c) const { void TextTrieMap::buildTrie(UErrorCode &status) { if (fLazyContents != nullptr) { for (int32_t i=0; i<fLazyContents->size(); i+=2) { - const char16_t *key = (char16_t *)fLazyContents->elementAt(i); + const char16_t* key = static_cast<char16_t*>(fLazyContents->elementAt(i)); void *val = fLazyContents->elementAt(i+1); UnicodeString keyString(true, key, -1); // Aliasing UnicodeString constructor. putImpl(keyString, val, status); @@ -678,7 +672,7 @@ class ZNames : public UMemory { if (locationNameUniStr.length() > 0) { const char16_t* buff = locationNameUniStr.getTerminatedBuffer(); int32_t len = sizeof(char16_t) * (locationNameUniStr.length() + 1); - locationName = (char16_t*) uprv_malloc(len); + locationName = static_cast<char16_t*>(uprv_malloc(len)); if (locationName == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -721,14 +715,14 @@ class ZNames : public UMemory { for (int32_t i = 0; i < UTZNM_INDEX_COUNT; i++) { const char16_t* name = fNames[i]; if (name != nullptr) { - ZNameInfo *nameinfo = (ZNameInfo *)uprv_malloc(sizeof(ZNameInfo)); + ZNameInfo* nameinfo = static_cast<ZNameInfo*>(uprv_malloc(sizeof(ZNameInfo))); if (nameinfo == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return; } nameinfo->mzID = mzID; nameinfo->tzID = tzID; - nameinfo->type = getTZNameType((UTimeZoneNameTypeIndex)i); + nameinfo->type = getTZNameType(static_cast<UTimeZoneNameTypeIndex>(i)); trie.put(name, nameinfo, status); // trie.put() takes ownership of the key if (U_FAILURE(status)) { return; @@ -767,8 +761,8 @@ struct ZNames::ZNamesLoader : public ResourceSink { // Replace "/" with ":". UnicodeString uKey(tzID); for (int32_t i = 0; i < uKey.length(); i++) { - if (uKey.charAt(i) == (char16_t)0x2F) { - uKey.setCharAt(i, (char16_t)0x3A); + if (uKey.charAt(i) == static_cast<char16_t>(0x2F)) { + uKey.setCharAt(i, static_cast<char16_t>(0x3A)); } } @@ -905,7 +899,7 @@ MetaZoneIDsEnumeration::MetaZoneIDsEnumeration(LocalPointer<UVector> mzIDs) const UnicodeString* MetaZoneIDsEnumeration::snext(UErrorCode& status) { if (U_SUCCESS(status) && fMetaZoneIDs != nullptr && fPos < fLen) { - unistr.setTo((const char16_t*)fMetaZoneIDs->elementAt(fPos++), -1); + unistr.setTo(static_cast<const char16_t*>(fMetaZoneIDs->elementAt(fPos++)), -1); return &unistr; } return nullptr; @@ -1168,7 +1162,7 @@ TimeZoneNamesImpl::_getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCod U_ASSERT(mzIDs.isValid()); for (int32_t i = 0; U_SUCCESS(status) && i < mappings->size(); i++) { - OlsonToMetaMappingEntry *map = (OlsonToMetaMappingEntry *)mappings->elementAt(i); + OlsonToMetaMappingEntry* map = static_cast<OlsonToMetaMappingEntry*>(mappings->elementAt(i)); const char16_t *mzID = map->mzid; if (!mzIDs->contains((void *)mzID)) { mzIDs->addElement((void *)mzID, status); @@ -1338,7 +1332,7 @@ TimeZoneNamesImpl::loadMetaZoneNames(const UnicodeString& mzID, UErrorCode& stat } if (mznames != EMPTY) { - return (ZNames*)mznames; + return static_cast<ZNames*>(mznames); } else { return nullptr; } @@ -1369,7 +1363,7 @@ TimeZoneNamesImpl::loadTimeZoneNames(const UnicodeString& tzID, UErrorCode& stat } // tznames is never EMPTY - return (ZNames*)tznames; + return static_cast<ZNames*>(tznames); } TimeZoneNames::MatchInfoCollection* @@ -1441,8 +1435,8 @@ void TimeZoneNamesImpl::addAllNamesIntoTrie(UErrorCode& status) { pos = UHASH_FIRST; while ((element = uhash_nextElement(fMZNamesMap, &pos)) != nullptr) { if (element->value.pointer == EMPTY) { continue; } - char16_t* mzID = (char16_t*) element->key.pointer; - ZNames* znames = (ZNames*) element->value.pointer; + char16_t* mzID = static_cast<char16_t*>(element->key.pointer); + ZNames* znames = static_cast<ZNames*>(element->value.pointer); znames->addAsMetaZoneIntoTrie(mzID, fNamesTrie, status); if (U_FAILURE(status)) { return; } } @@ -1450,8 +1444,8 @@ void TimeZoneNamesImpl::addAllNamesIntoTrie(UErrorCode& status) { pos = UHASH_FIRST; while ((element = uhash_nextElement(fTZNamesMap, &pos)) != nullptr) { if (element->value.pointer == EMPTY) { continue; } - char16_t* tzID = (char16_t*) element->key.pointer; - ZNames* znames = (ZNames*) element->value.pointer; + char16_t* tzID = static_cast<char16_t*>(element->key.pointer); + ZNames* znames = static_cast<ZNames*>(element->value.pointer); znames->addAsTimeZoneIntoTrie(tzID, fNamesTrie, status); if (U_FAILURE(status)) { return; } } @@ -1481,7 +1475,7 @@ struct TimeZoneNamesImpl::ZoneStringsLoader : public ResourceSink { void* createKey(const char* key, UErrorCode& status) { int32_t len = sizeof(char) * (static_cast<int32_t>(uprv_strlen(key)) + 1); - char* newKey = (char*) uprv_malloc(len); + char* newKey = static_cast<char*>(uprv_malloc(len)); if (newKey == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -1518,8 +1512,8 @@ struct TimeZoneNamesImpl::ZoneStringsLoader : public ResourceSink { const UHashElement* element; while ((element = uhash_nextElement(keyToLoader, &pos)) != nullptr) { if (element->value.pointer == DUMMY_LOADER) { continue; } - ZNames::ZNamesLoader* loader = (ZNames::ZNamesLoader*) element->value.pointer; - char* key = (char*) element->key.pointer; + ZNames::ZNamesLoader* loader = static_cast<ZNames::ZNamesLoader*>(element->value.pointer); + char* key = static_cast<char*>(element->key.pointer); if (isMetaZone(key)) { UnicodeString mzID = mzIDFromKey(key); @@ -1578,7 +1572,7 @@ struct TimeZoneNamesImpl::ZoneStringsLoader : public ResourceSink { if (loader != DUMMY_LOADER) { // Let the ZNamesLoader consume the names table. - ((ZNames::ZNamesLoader*)loader)->put(key, value, noFallback, status); + static_cast<ZNames::ZNamesLoader*>(loader)->put(key, value, noFallback, status); } } @@ -1634,7 +1628,7 @@ void TimeZoneNamesImpl::getDisplayNames(const UnicodeString& tzID, // Load the values into the dest array for (int i = 0; i < numTypes; i++) { UTimeZoneNameType type = types[i]; - const char16_t* name = ((ZNames*)tznames)->getName(type); + const char16_t* name = static_cast<ZNames*>(tznames)->getName(type); if (name == nullptr) { if (mznames == nullptr) { // Load the meta zone name @@ -1657,7 +1651,7 @@ void TimeZoneNamesImpl::getDisplayNames(const UnicodeString& tzID, } U_ASSERT(mznames != nullptr); if (mznames != EMPTY) { - name = ((ZNames*)mznames)->getName(type); + name = static_cast<ZNames*>(mznames)->getName(type); } } if (name != nullptr) { @@ -1716,11 +1710,11 @@ TimeZoneNamesImpl::getDefaultExemplarLocationName(const UnicodeString& tzID, Uni return name; } - int32_t sep = tzID.lastIndexOf((char16_t)0x2F /* '/' */); + int32_t sep = tzID.lastIndexOf(static_cast<char16_t>(0x2F) /* '/' */); if (sep > 0 && sep + 1 < tzID.length()) { name.setTo(tzID, sep + 1); - name.findAndReplace(UnicodeString((char16_t)0x5f /* _ */), - UnicodeString((char16_t)0x20 /* space */)); + name.findAndReplace(UnicodeString(static_cast<char16_t>(0x5f) /* _ */), + UnicodeString(static_cast<char16_t>(0x20) /* space */)); } else { name.setToBogus(); } @@ -1790,7 +1784,7 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) { return nullptr; } - names = (const char16_t **)uprv_malloc(sizeof(const char16_t*) * TZDBNAMES_KEYS_SIZE); + names = static_cast<const char16_t**>(uprv_malloc(sizeof(const char16_t*) * TZDBNAMES_KEYS_SIZE)); UBool isEmpty = true; if (names != nullptr) { for (int32_t i = 0; i < TZDBNAMES_KEYS_SIZE; i++) { @@ -1817,7 +1811,7 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) { if (U_SUCCESS(status)) { numRegions = ures_getSize(regionsRes); if (numRegions > 0) { - regions = (char**)uprv_malloc(sizeof(char*) * numRegions); + regions = static_cast<char**>(uprv_malloc(sizeof(char*) * numRegions)); if (regions != nullptr) { char **pRegion = regions; for (int32_t i = 0; i < numRegions; i++, pRegion++) { @@ -1832,7 +1826,7 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) { regionError = true; break; } - *pRegion = (char*)uprv_malloc(sizeof(char) * (len + 1)); + *pRegion = static_cast<char*>(uprv_malloc(sizeof(char) * (len + 1))); if (*pRegion == nullptr) { regionError = true; break; @@ -2316,7 +2310,7 @@ TZDBTimeZoneNames::getMetaZoneNames(const UnicodeString& mzID, UErrorCode& statu } ures_close(zoneStringsRes); } else if (cacheVal != EMPTY) { - tzdbNames = (TZDBNames *)cacheVal; + tzdbNames = static_cast<TZDBNames*>(cacheVal); } } umtx_unlock(&gTZDBNamesMapLock); diff --git a/deps/icu-small/source/i18n/tznames_impl.h b/deps/icu-small/source/i18n/tznames_impl.h index 3ab1e5cc94d13c..c628cd72edab3a 100644 --- a/deps/icu-small/source/i18n/tznames_impl.h +++ b/deps/icu-small/source/i18n/tznames_impl.h @@ -99,21 +99,21 @@ struct CharacterNode { }; inline UBool CharacterNode::hasValues() const { - return (UBool)(fValues != nullptr); + return fValues != nullptr; } inline int32_t CharacterNode::countValues() const { return fValues == nullptr ? 0 : !fHasValuesVector ? 1 : - ((const UVector *)fValues)->size(); + static_cast<const UVector*>(fValues)->size(); } inline const void *CharacterNode::getValue(int32_t index) const { if (!fHasValuesVector) { return fValues; // Assume index == 0. } else { - return ((const UVector *)fValues)->elementAt(index); + return static_cast<const UVector*>(fValues)->elementAt(index); } } diff --git a/deps/icu-small/source/i18n/tzrule.cpp b/deps/icu-small/source/i18n/tzrule.cpp index a3522f1d8b2d57..7507068c8807d8 100644 --- a/deps/icu-small/source/i18n/tzrule.cpp +++ b/deps/icu-small/source/i18n/tzrule.cpp @@ -356,7 +356,9 @@ AnnualTimeZoneRule::getNextStart(UDate base, UBool inclusive, UDate& result) const { int32_t year, month, dom, dow, doy, mid; - Grego::timeToFields(base, year, month, dom, dow, doy, mid); + UErrorCode status = U_ZERO_ERROR; + Grego::timeToFields(base, year, month, dom, dow, doy, mid, status); + U_ASSERT(U_SUCCESS(status)); if (year < fStartYear) { return getFirstStart(prevRawOffset, prevDSTSavings, result); } @@ -380,7 +382,9 @@ AnnualTimeZoneRule::getPreviousStart(UDate base, UBool inclusive, UDate& result) const { int32_t year, month, dom, dow, doy, mid; - Grego::timeToFields(base, year, month, dom, dow, doy, mid); + UErrorCode status = U_ZERO_ERROR; + Grego::timeToFields(base, year, month, dom, dow, doy, mid, status); + U_ASSERT(U_SUCCESS(status)); if (year > fEndYear) { return getFinalStart(prevRawOffset, prevDSTSavings, result); } @@ -587,7 +591,7 @@ TimeArrayTimeZoneRule::initStartTimes(const UDate source[], int32_t size, UError } // Allocate new one if needed if (size > TIMEARRAY_STACK_BUFFER_SIZE) { - fStartTimes = (UDate*)uprv_malloc(sizeof(UDate)*size); + fStartTimes = static_cast<UDate*>(uprv_malloc(sizeof(UDate) * size)); if (fStartTimes == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; fNumStartTimes = 0; @@ -599,7 +603,7 @@ TimeArrayTimeZoneRule::initStartTimes(const UDate source[], int32_t size, UError uprv_memcpy(fStartTimes, source, sizeof(UDate)*size); fNumStartTimes = size; // Sort dates - uprv_sortArray(fStartTimes, fNumStartTimes, (int32_t)sizeof(UDate), compareDates, nullptr, true, &status); + uprv_sortArray(fStartTimes, fNumStartTimes, static_cast<int32_t>(sizeof(UDate)), compareDates, nullptr, true, &status); if (U_FAILURE(status)) { if (fStartTimes != nullptr && fStartTimes != fLocalStartTimes) { uprv_free(fStartTimes); diff --git a/deps/icu-small/source/i18n/ucal.cpp b/deps/icu-small/source/i18n/ucal.cpp index 78d01763c74d8e..b8905fe9a3d19f 100644 --- a/deps/icu-small/source/i18n/ucal.cpp +++ b/deps/icu-small/source/i18n/ucal.cpp @@ -42,7 +42,7 @@ _createTimeZone(const char16_t* zoneID, int32_t len, UErrorCode* ec) { // failure we will see is a memory allocation failure. int32_t l = (len<0 ? u_strlen(zoneID) : len); UnicodeString zoneStrID; - zoneStrID.setTo((UBool)(len < 0), zoneID, l); /* temporary read-only alias */ + zoneStrID.setTo(static_cast<UBool>(len < 0), zoneID, l); /* temporary read-only alias */ zone = TimeZone::createTimeZone(zoneStrID); if (zone == nullptr) { *ec = U_MEMORY_ALLOCATION_ERROR; diff --git a/deps/icu-small/source/i18n/ucol_res.cpp b/deps/icu-small/source/i18n/ucol_res.cpp index aa0086802733a0..480575c6e50b18 100644 --- a/deps/icu-small/source/i18n/ucol_res.cpp +++ b/deps/icu-small/source/i18n/ucol_res.cpp @@ -654,7 +654,7 @@ struct KeywordsSink : public ResourceSink { } } } else if (type == URES_TABLE && uprv_strncmp(key, "private-", 8) != 0) { - if (!ulist_containsString(values, key, (int32_t)uprv_strlen(key))) { + if (!ulist_containsString(values, key, static_cast<int32_t>(uprv_strlen(key)))) { ulist_addItemEndList(values, key, false, &errorCode); } } diff --git a/deps/icu-small/source/i18n/ucol_sit.cpp b/deps/icu-small/source/i18n/ucol_sit.cpp index 490dbd57884b88..87387f879d8392 100644 --- a/deps/icu-small/source/i18n/ucol_sit.cpp +++ b/deps/icu-small/source/i18n/ucol_sit.cpp @@ -238,7 +238,7 @@ readHexCodeUnit(const char **string, UErrorCode *status) #endif return 0; } - result = (result << 4) | (char16_t)value; + result = (result << 4) | static_cast<char16_t>(value); noDigits++; (*string)++; } @@ -319,7 +319,7 @@ const char* ucol_sit_readOption(const char *start, CollatorSpec *spec, fprintf(stderr, "***Set %d to %s...\n", i, start); #endif // assume 'start' does not go away through all this - spec->entries[i].copyFrom(CharString(start, (int32_t)(end - start), *status), *status); + spec->entries[i].copyFrom(CharString(start, static_cast<int32_t>(end - start), *status), *status); return end; } } @@ -343,7 +343,7 @@ ucol_sit_readSpecs(CollatorSpec *s, const char *string, } } if(U_FAILURE(*status)) { - parseError->offset = (int32_t)(string - definition); + parseError->offset = static_cast<int32_t>(string - definition); } return string; } diff --git a/deps/icu-small/source/i18n/ucoleitr.cpp b/deps/icu-small/source/i18n/ucoleitr.cpp index 36b83c4c1043ad..429fd847c1ab5f 100644 --- a/deps/icu-small/source/i18n/ucoleitr.cpp +++ b/deps/icu-small/source/i18n/ucoleitr.cpp @@ -289,7 +289,7 @@ ucol_openElements(const UCollator *coll, return nullptr; } - UnicodeString s((UBool)(textLength < 0), text, textLength); + UnicodeString s(textLength < 0, text, textLength); CollationElementIterator *cei = rbc->createCollationElementIterator(s); if (cei == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -350,7 +350,7 @@ UCollationPCE::nextProcessed( break; } - result = processCE((uint32_t)ce); + result = processCE(static_cast<uint32_t>(ce)); } while (result == UCOL_IGNORABLE); if (ixLow != nullptr) { @@ -412,7 +412,7 @@ UCollationPCE::previousProcessed( goto finish; } - rceb.put((uint32_t)ce, low, high, *status); + rceb.put(static_cast<uint32_t>(ce), low, high, *status); } while (U_SUCCESS(*status) && ((ce & UCOL_PRIMARYORDERMASK) == 0 || isContinuation(ce))); // process the raw CEs @@ -488,7 +488,7 @@ ucol_setText( UCollationElements *elems, *status = U_ILLEGAL_ARGUMENT_ERROR; return; } - UnicodeString s((UBool)(textLength < 0), text, textLength); + UnicodeString s(textLength < 0, text, textLength); return CollationElementIterator::fromUCollationElements(elems)->setText(s, *status); } diff --git a/deps/icu-small/source/i18n/udat.cpp b/deps/icu-small/source/i18n/udat.cpp index b5e3d211358822..d9a3508a484344 100644 --- a/deps/icu-small/source/i18n/udat.cpp +++ b/deps/icu-small/source/i18n/udat.cpp @@ -162,7 +162,7 @@ udat_open(UDateFormatStyle timeStyle, } } else { - UnicodeString pat((UBool)(patternLength == -1), pattern, patternLength); + UnicodeString pat(patternLength == -1, pattern, patternLength); if (locale == nullptr) { fmt = new SimpleDateFormat(pat, *status); @@ -182,7 +182,7 @@ udat_open(UDateFormatStyle timeStyle, } if (tzID != nullptr) { - TimeZone *zone = TimeZone::createTimeZone(UnicodeString((UBool)(tzIDLength == -1), tzID, tzIDLength)); + TimeZone* zone = TimeZone::createTimeZone(UnicodeString(tzIDLength == -1, tzID, tzIDLength)); if (zone == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; delete fmt; @@ -359,7 +359,7 @@ udat_parse( const UDateFormat* format, { if(U_FAILURE(*status)) return (UDate)0; - const UnicodeString src((UBool)(textLength == -1), text, textLength); + const UnicodeString src(textLength == -1, text, textLength); ParsePosition pp; int32_t stackParsePos = 0; UDate res; @@ -392,7 +392,7 @@ udat_parseCalendar(const UDateFormat* format, { if(U_FAILURE(*status)) return; - const UnicodeString src((UBool)(textLength == -1), text, textLength); + const UnicodeString src(textLength == -1, text, textLength); ParsePosition pp; int32_t stackParsePos = 0; @@ -581,7 +581,7 @@ udat_applyPattern( UDateFormat *format, const char16_t *pattern, int32_t patternLength) { - const UnicodeString pat((UBool)(patternLength == -1), pattern, patternLength); + const UnicodeString pat(patternLength == -1, pattern, patternLength); UErrorCode status = U_ZERO_ERROR; verifyIsSimpleDateFormat(format, &status); @@ -1355,8 +1355,8 @@ udat_applyPatternRelative(UDateFormat *format, { verifyIsRelativeDateFormat(format, status); if(U_FAILURE(*status)) return; - const UnicodeString datePat((UBool)(datePatternLength == -1), datePattern, datePatternLength); - const UnicodeString timePat((UBool)(timePatternLength == -1), timePattern, timePatternLength); + const UnicodeString datePat(datePatternLength == -1, datePattern, datePatternLength); + const UnicodeString timePat(timePatternLength == -1, timePattern, timePatternLength); ((RelativeDateFormat*)format)->applyPatterns(datePat, timePat, *status); } diff --git a/deps/icu-small/source/i18n/udateintervalformat.cpp b/deps/icu-small/source/i18n/udateintervalformat.cpp index 1ab38136931330..b67ba05e1fe097 100644 --- a/deps/icu-small/source/i18n/udateintervalformat.cpp +++ b/deps/icu-small/source/i18n/udateintervalformat.cpp @@ -51,14 +51,14 @@ udtitvfmt_open(const char* locale, *status = U_ILLEGAL_ARGUMENT_ERROR; return nullptr; } - UnicodeString skel((UBool)(skeletonLength == -1), skeleton, skeletonLength); + UnicodeString skel(skeletonLength == -1, skeleton, skeletonLength); LocalPointer<DateIntervalFormat> formatter( DateIntervalFormat::createInstance(skel, Locale(locale), *status)); if (U_FAILURE(*status)) { return nullptr; } if (tzID != nullptr) { - TimeZone *zone = TimeZone::createTimeZone(UnicodeString((UBool)(tzIDLength == -1), tzID, tzIDLength)); + TimeZone* zone = TimeZone::createTimeZone(UnicodeString(tzIDLength == -1, tzID, tzIDLength)); if(zone == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; return nullptr; diff --git a/deps/icu-small/source/i18n/udatpg.cpp b/deps/icu-small/source/i18n/udatpg.cpp index 07aee36882dd5a..666dfba0aeda62 100644 --- a/deps/icu-small/source/i18n/udatpg.cpp +++ b/deps/icu-small/source/i18n/udatpg.cpp @@ -78,7 +78,7 @@ udatpg_getBestPatternWithOptions(UDateTimePatternGenerator *dtpg, *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } - UnicodeString skeletonString((UBool)(length<0), skeleton, length); + UnicodeString skeletonString(length < 0, skeleton, length); UnicodeString result=((DateTimePatternGenerator *)dtpg)->getBestPattern(skeletonString, options, *pErrorCode); return result.extract(bestPattern, capacity, *pErrorCode); } @@ -95,7 +95,7 @@ udatpg_getSkeleton(UDateTimePatternGenerator * /* dtpg */, *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } - UnicodeString patternString((UBool)(length<0), pattern, length); + UnicodeString patternString(length < 0, pattern, length); UnicodeString result=DateTimePatternGenerator::staticGetSkeleton( patternString, *pErrorCode); return result.extract(skeleton, capacity, *pErrorCode); @@ -113,7 +113,7 @@ udatpg_getBaseSkeleton(UDateTimePatternGenerator * /* dtpg */, *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } - UnicodeString patternString((UBool)(length<0), pattern, length); + UnicodeString patternString(length < 0, pattern, length); UnicodeString result=DateTimePatternGenerator::staticGetBaseSkeleton( patternString, *pErrorCode); return result.extract(skeleton, capacity, *pErrorCode); @@ -132,7 +132,7 @@ udatpg_addPattern(UDateTimePatternGenerator *dtpg, *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return UDATPG_NO_CONFLICT; } - UnicodeString patternString((UBool)(patternLength<0), pattern, patternLength); + UnicodeString patternString(patternLength < 0, pattern, patternLength); UnicodeString conflictingPatternString; UDateTimePatternConflict result=((DateTimePatternGenerator *)dtpg)-> addPattern(patternString, override, conflictingPatternString, *pErrorCode); @@ -147,7 +147,7 @@ U_CAPI void U_EXPORT2 udatpg_setAppendItemFormat(UDateTimePatternGenerator *dtpg, UDateTimePatternField field, const char16_t *value, int32_t length) { - UnicodeString valueString((UBool)(length<0), value, length); + UnicodeString valueString(length < 0, value, length); ((DateTimePatternGenerator *)dtpg)->setAppendItemFormat(field, valueString); } @@ -166,7 +166,7 @@ U_CAPI void U_EXPORT2 udatpg_setAppendItemName(UDateTimePatternGenerator *dtpg, UDateTimePatternField field, const char16_t *value, int32_t length) { - UnicodeString valueString((UBool)(length<0), value, length); + UnicodeString valueString(length < 0, value, length); ((DateTimePatternGenerator *)dtpg)->setAppendItemName(field, valueString); } @@ -203,7 +203,7 @@ udatpg_getFieldDisplayName(const UDateTimePatternGenerator *dtpg, U_CAPI void U_EXPORT2 udatpg_setDateTimeFormat(const UDateTimePatternGenerator *dtpg, const char16_t *dtFormat, int32_t length) { - UnicodeString dtFormatString((UBool)(length<0), dtFormat, length); + UnicodeString dtFormatString(length < 0, dtFormat, length); ((DateTimePatternGenerator *)dtpg)->setDateTimeFormat(dtFormatString); } @@ -226,7 +226,7 @@ udatpg_setDateTimeFormatForStyle(UDateTimePatternGenerator *udtpg, return; } DateTimePatternGenerator *dtpg = reinterpret_cast<DateTimePatternGenerator *>(udtpg); - UnicodeString dtFormatString((UBool)(length<0), dateTimeFormat, length); + UnicodeString dtFormatString(length < 0, dateTimeFormat, length); dtpg->setDateTimeFormat(style, dtFormatString, *pErrorCode); } @@ -255,7 +255,7 @@ udatpg_getDateTimeFormatForStyle(const UDateTimePatternGenerator *udtpg, U_CAPI void U_EXPORT2 udatpg_setDecimal(UDateTimePatternGenerator *dtpg, const char16_t *decimal, int32_t length) { - UnicodeString decimalString((UBool)(length<0), decimal, length); + UnicodeString decimalString(length < 0, decimal, length); ((DateTimePatternGenerator *)dtpg)->setDecimal(decimalString); } @@ -294,8 +294,8 @@ udatpg_replaceFieldTypesWithOptions(UDateTimePatternGenerator *dtpg, *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } - UnicodeString patternString((UBool)(patternLength<0), pattern, patternLength); - UnicodeString skeletonString((UBool)(skeletonLength<0), skeleton, skeletonLength); + UnicodeString patternString(patternLength < 0, pattern, patternLength); + UnicodeString skeletonString(skeletonLength < 0, skeleton, skeletonLength); UnicodeString result=((DateTimePatternGenerator *)dtpg)->replaceFieldTypes(patternString, skeletonString, options, *pErrorCode); return result.extract(dest, destCapacity, *pErrorCode); } @@ -318,7 +318,7 @@ U_CAPI const char16_t * U_EXPORT2 udatpg_getPatternForSkeleton(const UDateTimePatternGenerator *dtpg, const char16_t *skeleton, int32_t skeletonLength, int32_t *pLength) { - UnicodeString skeletonString((UBool)(skeletonLength<0), skeleton, skeletonLength); + UnicodeString skeletonString(skeletonLength < 0, skeleton, skeletonLength); const UnicodeString &result=((const DateTimePatternGenerator *)dtpg)->getPatternForSkeleton(skeletonString); if(pLength!=nullptr) { *pLength=result.length(); diff --git a/deps/icu-small/source/i18n/uitercollationiterator.cpp b/deps/icu-small/source/i18n/uitercollationiterator.cpp index 6f840f3fe5e04b..e0d91514852c3e 100644 --- a/deps/icu-small/source/i18n/uitercollationiterator.cpp +++ b/deps/icu-small/source/i18n/uitercollationiterator.cpp @@ -54,7 +54,7 @@ char16_t UIterCollationIterator::handleGetTrailSurrogate() { UChar32 trail = iter.next(&iter); if(!U16_IS_TRAIL(trail) && trail >= 0) { iter.previous(&iter); } - return (char16_t)trail; + return static_cast<char16_t>(trail); } UChar32 @@ -149,7 +149,7 @@ FCDUIterCollationIterator::handleGetTrailSurrogate() { } else if(trail >= 0) { iter.previous(&iter); } - return (char16_t)trail; + return static_cast<char16_t>(trail); } else { U_ASSERT(pos < normalized.length()); char16_t trail; @@ -315,7 +315,7 @@ FCDUIterCollationIterator::nextSegment(UErrorCode &errorCode) { UChar32 c = uiter_next32(&iter); if(c < 0) { break; } uint16_t fcd16 = nfcImpl.getFCD16(c); - uint8_t leadCC = (uint8_t)(fcd16 >> 8); + uint8_t leadCC = static_cast<uint8_t>(fcd16 >> 8); if(leadCC == 0 && !s.isEmpty()) { // FCD boundary before this character. uiter_previous32(&iter); @@ -340,7 +340,7 @@ FCDUIterCollationIterator::nextSegment(UErrorCode &errorCode) { pos = 0; return true; } - prevCC = (uint8_t)fcd16; + prevCC = static_cast<uint8_t>(fcd16); if(prevCC == 0) { // FCD boundary after the last character. break; @@ -396,7 +396,7 @@ FCDUIterCollationIterator::previousSegment(UErrorCode &errorCode) { UChar32 c = uiter_previous32(&iter); if(c < 0) { break; } uint16_t fcd16 = nfcImpl.getFCD16(c); - uint8_t trailCC = (uint8_t)fcd16; + uint8_t trailCC = static_cast<uint8_t>(fcd16); if(trailCC == 0 && !s.isEmpty()) { // FCD boundary after this character. uiter_next32(&iter); @@ -424,7 +424,7 @@ FCDUIterCollationIterator::previousSegment(UErrorCode &errorCode) { pos = normalized.length(); return true; } - nextCC = (uint8_t)(fcd16 >> 8); + nextCC = static_cast<uint8_t>(fcd16 >> 8); if(nextCC == 0) { // FCD boundary before the following character. break; diff --git a/deps/icu-small/source/i18n/umsg.cpp b/deps/icu-small/source/i18n/umsg.cpp index b1f279580721d5..292fa7b87687f1 100644 --- a/deps/icu-small/source/i18n/umsg.cpp +++ b/deps/icu-small/source/i18n/umsg.cpp @@ -558,7 +558,7 @@ umsg_vparse(const UMessageFormat *fmt, case Formattable::kLong: aInt = va_arg(ap, int32_t*); if(aInt){ - *aInt = (int32_t) args[i].getLong(); + *aInt = args[i].getLong(); }else{ *status=U_ILLEGAL_ARGUMENT_ERROR; } diff --git a/deps/icu-small/source/i18n/unesctrn.cpp b/deps/icu-small/source/i18n/unesctrn.cpp index cce191ca62e7e3..774d82a32e5699 100644 --- a/deps/icu-small/source/i18n/unesctrn.cpp +++ b/deps/icu-small/source/i18n/unesctrn.cpp @@ -84,7 +84,7 @@ static char16_t* copySpec(const char16_t* spec) { ++len; } ++len; - char16_t *result = (char16_t *)uprv_malloc(len*sizeof(char16_t)); + char16_t* result = static_cast<char16_t*>(uprv_malloc(len * sizeof(char16_t))); // Check for memory allocation error. if (result != nullptr) { uprv_memcpy(result, spec, (size_t)len*sizeof(result[0])); @@ -186,7 +186,7 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi // Read the header int32_t prefixLen = spec[ipat++]; int32_t suffixLen = spec[ipat++]; - int8_t radix = (int8_t) spec[ipat++]; + int8_t radix = static_cast<int8_t>(spec[ipat++]); int32_t minDigits = spec[ipat++]; int32_t maxDigits = spec[ipat++]; diff --git a/deps/icu-small/source/i18n/uni2name.cpp b/deps/icu-small/source/i18n/uni2name.cpp index 727f8953dbbfeb..5173ee1d0c7628 100644 --- a/deps/icu-small/source/i18n/uni2name.cpp +++ b/deps/icu-small/source/i18n/uni2name.cpp @@ -82,7 +82,7 @@ void UnicodeNameTransliterator::handleTransliterate(Replaceable& text, UTransPos } // Accommodate the longest possible name plus padding - char* buf = (char*) uprv_malloc(maxLen); + char* buf = static_cast<char*>(uprv_malloc(maxLen)); if (buf == nullptr) { offsets.start = offsets.limit; return; diff --git a/deps/icu-small/source/i18n/unicode/calendar.h b/deps/icu-small/source/i18n/unicode/calendar.h index fbe501c9d1ca69..a04f5b65bd5ba6 100644 --- a/deps/icu-small/source/i18n/unicode/calendar.h +++ b/deps/icu-small/source/i18n/unicode/calendar.h @@ -2045,9 +2045,11 @@ class U_I18N_API Calendar : public UObject { * taking currently-set year and era into account. Defaults to 1 for Gregorian. * @param eyear the extended year * @param month the month in the year + * @param status Output param set to failure code on function return + * when this function fails. * @internal */ - virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month); + virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month, UErrorCode& status); //------------------------------------------------------------------------- // Protected utility methods for use by subclasses. These are very handy @@ -2537,14 +2539,14 @@ Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode) inline void Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status) { - roll(field, (int32_t)(up ? +1 : -1), status); + roll(field, static_cast<int32_t>(up ? +1 : -1), status); } #ifndef U_HIDE_DEPRECATED_API inline void Calendar::roll(EDateFields field, UBool up, UErrorCode& status) { - roll((UCalendarDateFields) field, up, status); + roll(static_cast<UCalendarDateFields>(field), up, status); } #endif /* U_HIDE_DEPRECATED_API */ diff --git a/deps/icu-small/source/i18n/unicode/coleitr.h b/deps/icu-small/source/i18n/unicode/coleitr.h index 1b7fec0d1dc852..a147d6cfba1489 100644 --- a/deps/icu-small/source/i18n/unicode/coleitr.h +++ b/deps/icu-small/source/i18n/unicode/coleitr.h @@ -128,7 +128,7 @@ class U_I18N_API CollationElementIterator final : public UObject { * NULLORDER indicates that an error has occurred while processing * @stable ICU 2.0 */ - NULLORDER = (int32_t)0xffffffff + NULLORDER = static_cast<int32_t>(0xffffffff) }; // CollationElementIterator public constructor/destructor ------------------- diff --git a/deps/icu-small/source/i18n/unicode/coll.h b/deps/icu-small/source/i18n/unicode/coll.h index 4845e8f02cca52..2de467c4f074b5 100644 --- a/deps/icu-small/source/i18n/unicode/coll.h +++ b/deps/icu-small/source/i18n/unicode/coll.h @@ -58,12 +58,18 @@ #if !UCONFIG_NO_COLLATION +#include <functional> +#include <string_view> +#include <type_traits> + +#include "unicode/char16ptr.h" #include "unicode/uobject.h" #include "unicode/ucol.h" #include "unicode/unorm.h" #include "unicode/locid.h" #include "unicode/uniset.h" #include "unicode/umisc.h" +#include "unicode/unistr.h" #include "unicode/uiter.h" #include "unicode/stringpiece.h" @@ -588,6 +594,52 @@ class U_I18N_API Collator : public UObject { */ UBool equals(const UnicodeString& source, const UnicodeString& target) const; +#ifndef U_HIDE_DRAFT_API + + /** + * Creates a comparison function object that uses this collator. + * Like <code>std::equal_to</code> but uses the collator instead of <code>operator==</code>. + * @draft ICU 76 + */ + inline auto equal_to() const { return Predicate<std::equal_to, UCOL_EQUAL>(*this); } + + /** + * Creates a comparison function object that uses this collator. + * Like <code>std::greater</code> but uses the collator instead of <code>operator></code>. + * @draft ICU 76 + */ + inline auto greater() const { return Predicate<std::equal_to, UCOL_GREATER>(*this); } + + /** + * Creates a comparison function object that uses this collator. + * Like <code>std::less</code> but uses the collator instead of <code>operator<</code>. + * @draft ICU 76 + */ + inline auto less() const { return Predicate<std::equal_to, UCOL_LESS>(*this); } + + /** + * Creates a comparison function object that uses this collator. + * Like <code>std::not_equal_to</code> but uses the collator instead of <code>operator!=</code>. + * @draft ICU 76 + */ + inline auto not_equal_to() const { return Predicate<std::not_equal_to, UCOL_EQUAL>(*this); } + + /** + * Creates a comparison function object that uses this collator. + * Like <code>std::greater_equal</code> but uses the collator instead of <code>operator>=</code>. + * @draft ICU 76 + */ + inline auto greater_equal() const { return Predicate<std::not_equal_to, UCOL_LESS>(*this); } + + /** + * Creates a comparison function object that uses this collator. + * Like <code>std::less_equal</code> but uses the collator instead of <code>operator<=</code>. + * @draft ICU 76 + */ + inline auto less_equal() const { return Predicate<std::not_equal_to, UCOL_GREATER>(*this); } + +#endif // U_HIDE_DRAFT_API + #ifndef U_FORCE_HIDE_DEPRECATED_API /** * Determines the minimum strength that will be used in comparison or @@ -1210,6 +1262,47 @@ class U_I18N_API Collator : public UObject { friend class ICUCollatorService; static Collator* makeInstance(const Locale& desiredLocale, UErrorCode& status); + +#ifndef U_HIDE_DRAFT_API + /** + * Function object for performing comparisons using a Collator. + * @internal + */ + template <template <typename...> typename Compare, UCollationResult result> + class Predicate { + public: + explicit Predicate(const Collator& parent) : collator(parent) {} + + template < + typename T, typename U, + typename = std::enable_if_t<ConvertibleToU16StringView<T> && ConvertibleToU16StringView<U>>> + bool operator()(const T& lhs, const U& rhs) const { + UErrorCode status = U_ZERO_ERROR; + return compare( + collator.compare( + UnicodeString::readOnlyAlias(lhs), + UnicodeString::readOnlyAlias(rhs), + status), + result); + } + + bool operator()(std::string_view lhs, std::string_view rhs) const { + UErrorCode status = U_ZERO_ERROR; + return compare(collator.compareUTF8(lhs, rhs, status), result); + } + +#if defined(__cpp_char8_t) + bool operator()(std::u8string_view lhs, std::u8string_view rhs) const { + UErrorCode status = U_ZERO_ERROR; + return compare(collator.compareUTF8(lhs, rhs, status), result); + } +#endif + + private: + const Collator& collator; + static constexpr Compare<UCollationResult> compare{}; + }; +#endif // U_HIDE_DRAFT_API }; #if !UCONFIG_NO_SERVICE diff --git a/deps/icu-small/source/i18n/unicode/dcfmtsym.h b/deps/icu-small/source/i18n/unicode/dcfmtsym.h index 52f2268434da44..02e12f9c39b2dc 100644 --- a/deps/icu-small/source/i18n/unicode/dcfmtsym.h +++ b/deps/icu-small/source/i18n/unicode/dcfmtsym.h @@ -576,7 +576,7 @@ DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString fCodePointZero = sym; for ( int8_t i = 1 ; i<= 9 ; i++ ) { sym++; - fSymbols[(int)kOneDigitSymbol+i-1] = UnicodeString(sym); + fSymbols[static_cast<int>(kOneDigitSymbol) + i - 1] = UnicodeString(sym); } } else { fCodePointZero = -1; diff --git a/deps/icu-small/source/i18n/unicode/fmtable.h b/deps/icu-small/source/i18n/unicode/fmtable.h index d251d35ba88c36..1f6b43844a2718 100644 --- a/deps/icu-small/source/i18n/unicode/fmtable.h +++ b/deps/icu-small/source/i18n/unicode/fmtable.h @@ -311,7 +311,7 @@ class U_I18N_API Formattable : public UObject { * @return the long value of this object. * @stable ICU 2.0 */ - int32_t getLong() const { return (int32_t)fValue.fInt64; } + int32_t getLong() const { return static_cast<int32_t>(fValue.fInt64); } /** * Gets the long value of this object. If the magnitude is too diff --git a/deps/icu-small/source/i18n/unicode/measunit.h b/deps/icu-small/source/i18n/unicode/measunit.h index 9ce9b1a65d05a3..b23897192eb4cb 100644 --- a/deps/icu-small/source/i18n/unicode/measunit.h +++ b/deps/icu-small/source/i18n/unicode/measunit.h @@ -1568,6 +1568,24 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getNanosecond(); +#ifndef U_HIDE_DRAFT_API + /** + * Returns by pointer, unit of duration: night. + * Caller owns returned value and must free it. + * Also see {@link #getNight()}. + * @param status ICU error code. + * @draft ICU 76 + */ + static MeasureUnit *createNight(UErrorCode &status); + + /** + * Returns by value, unit of duration: night. + * Also see {@link #createNight()}. + * @draft ICU 76 + */ + static MeasureUnit getNight(); +#endif /* U_HIDE_DRAFT_API */ + /** * Returns by pointer, unit of duration: quarter. * Caller owns returned value and must free it. @@ -2624,30 +2642,6 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getKilogram(); - /** - * Returns by pointer, unit of mass: metric-ton - * (renamed to tonne in CLDR 42 / ICU 72). - * Caller owns returned value and must free it. - * Note: In ICU 74 this will be deprecated in favor of - * createTonne(), which is currently draft but will - * become stable in ICU 74, and which uses the preferred naming. - * Also see {@link #getMetricTon()} and {@link #createTonne()}. - * @param status ICU error code. - * @stable ICU 54 - */ - static MeasureUnit *createMetricTon(UErrorCode &status); - - /** - * Returns by value, unit of mass: metric-ton - * (renamed to tonne in CLDR 42 / ICU 72). - * Note: In ICU 74 this will be deprecated in favor of - * getTonne(), which is currently draft but will - * become stable in ICU 74, and which uses the preferred naming. - * Also see {@link #createMetricTon()} and {@link #getTonne()}. - * @stable ICU 64 - */ - static MeasureUnit getMetricTon(); - /** * Returns by pointer, unit of mass: microgram. * Caller owns returned value and must free it. @@ -2792,6 +2786,30 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getTonne(); + /** + * Returns by pointer, unit of mass: metric-ton + * (renamed to tonne in CLDR 42 / ICU 72). + * Caller owns returned value and must free it. + * Note: In ICU 74 this will be deprecated in favor of + * createTonne(), which is currently draft but will + * become stable in ICU 74, and which uses the preferred naming. + * Also see {@link #getMetricTon()} and {@link #createTonne()}. + * @param status ICU error code. + * @stable ICU 54 + */ + static MeasureUnit *createMetricTon(UErrorCode &status); + + /** + * Returns by value, unit of mass: metric-ton + * (renamed to tonne in CLDR 42 / ICU 72). + * Note: In ICU 74 this will be deprecated in favor of + * getTonne(), which is currently draft but will + * become stable in ICU 74, and which uses the preferred naming. + * Also see {@link #createMetricTon()} and {@link #getTonne()}. + * @stable ICU 64 + */ + static MeasureUnit getMetricTon(); + /** * Returns by pointer, unit of power: gigawatt. * Caller owns returned value and must free it. @@ -2920,23 +2938,21 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getBar(); -#ifndef U_HIDE_DRAFT_API /** * Returns by pointer, unit of pressure: gasoline-energy-density. * Caller owns returned value and must free it. * Also see {@link #getGasolineEnergyDensity()}. * @param status ICU error code. - * @draft ICU 74 + * @stable ICU 74 */ static MeasureUnit *createGasolineEnergyDensity(UErrorCode &status); /** * Returns by value, unit of pressure: gasoline-energy-density. * Also see {@link #createGasolineEnergyDensity()}. - * @draft ICU 74 + * @stable ICU 74 */ static MeasureUnit getGasolineEnergyDensity(); -#endif /* U_HIDE_DRAFT_API */ /** * Returns by pointer, unit of pressure: hectopascal. @@ -3114,6 +3130,24 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getKnot(); +#ifndef U_HIDE_DRAFT_API + /** + * Returns by pointer, unit of speed: light-speed. + * Caller owns returned value and must free it. + * Also see {@link #getLightSpeed()}. + * @param status ICU error code. + * @draft ICU 76 + */ + static MeasureUnit *createLightSpeed(UErrorCode &status); + + /** + * Returns by value, unit of speed: light-speed. + * Also see {@link #createLightSpeed()}. + * @draft ICU 76 + */ + static MeasureUnit getLightSpeed(); +#endif /* U_HIDE_DRAFT_API */ + /** * Returns by pointer, unit of speed: meter-per-second. * Caller owns returned value and must free it. diff --git a/deps/icu-small/source/i18n/unicode/measure.h b/deps/icu-small/source/i18n/unicode/measure.h index 86d7b512117595..b2812a6b879387 100644 --- a/deps/icu-small/source/i18n/unicode/measure.h +++ b/deps/icu-small/source/i18n/unicode/measure.h @@ -89,15 +89,13 @@ class U_I18N_API Measure: public UObject { */ bool operator==(const UObject& other) const; -#ifndef U_HIDE_DRAFT_API /** * Inequality operator. Returns true if this object is not equal to the other object. * @param other the object to compare with * @return true if the objects are not equal - * @draft ICU 74 + * @stable ICU 74 */ inline bool operator!=(const UObject& other) const { return !operator==(other); } -#endif // U_HIDE_DRAFT_API /** * Return a reference to the numeric value of this object. The diff --git a/deps/icu-small/source/i18n/unicode/messageformat2.h b/deps/icu-small/source/i18n/unicode/messageformat2.h index d23ac8409d8171..c5459f042f40f8 100644 --- a/deps/icu-small/source/i18n/unicode/messageformat2.h +++ b/deps/icu-small/source/i18n/unicode/messageformat2.h @@ -139,6 +139,31 @@ namespace message2 { */ const MFDataModel& getDataModel() const; + /** + * Used in conjunction with the + * MessageFormatter::Builder::setErrorHandlingBehavior() method. + * + * @internal ICU 76 technology preview + * @deprecated This API is for technology preview only. + */ + typedef enum UMFErrorHandlingBehavior { + /** + * Suppress errors and return best-effort output. + * + * @internal ICU 76 technology preview + * @deprecated This API is for technology preview only. + */ + U_MF_BEST_EFFORT = 0, + /** + * Signal all MessageFormat errors using the UErrorCode + * argument. + * + * @internal ICU 76 technology preview + * @deprecated This API is for technology preview only. + */ + U_MF_STRICT + } UMFErrorHandlingBehavior; + /** * The mutable Builder class allows each part of the MessageFormatter to be initialized * separately; calling its `build()` method yields an immutable MessageFormatter. @@ -166,7 +191,10 @@ namespace message2 { Locale locale; // Not owned const MFFunctionRegistry* customMFFunctionRegistry; + // Error behavior; see comment in `MessageFormatter` class + bool signalErrors = false; + void clearState(); public: /** * Sets the locale to use for formatting. @@ -218,6 +246,36 @@ namespace message2 { * @deprecated This API is for technology preview only. */ Builder& setDataModel(MFDataModel&& dataModel); + /** + * Set the error handling behavior for this formatter. + * + * "Strict" error behavior means that that formatting methods + * will set their UErrorCode arguments to signal MessageFormat + * data model, resolution, and runtime errors. Syntax errors are + * always signaled. + * + * "Best effort" error behavior means that MessageFormat errors are + * suppressed: formatting methods will _not_ set their + * UErrorCode arguments to signal MessageFormat data model, + * resolution, or runtime errors. Best-effort output + * will be returned. Syntax errors are always signaled. + * This is the default behavior. + * + * @param type An enum with type UMFErrorHandlingBehavior; + * if type == `U_MF_STRICT`, then + * errors are handled strictly. + * If type == `U_MF_BEST_EFFORT`, then + * best-effort output is returned. + * + * The default is to suppress all MessageFormat errors + * and return best-effort output. + * + * @return A reference to the builder. + * + * @internal ICU 76 technology preview + * @deprecated This API is for technology preview only. + */ + Builder& setErrorHandlingBehavior(UMFErrorHandlingBehavior type); /** * Constructs a new immutable MessageFormatter using the pattern or data model * that was previously set, and the locale (if it was previously set) @@ -378,8 +436,15 @@ namespace message2 { // Must be a raw pointer to avoid including the internal header file // defining StaticErrors // Owned by `this` - StaticErrors* errors; - + StaticErrors* errors = nullptr; + + // Error handling behavior. + // If true, then formatting methods set their UErrorCode arguments + // to signal MessageFormat errors, and no useful output is returned. + // If false, then MessageFormat errors are not signaled and the + // formatting methods return best-effort output. + // The default is false. + bool signalErrors = false; }; // class MessageFormatter } // namespace message2 diff --git a/deps/icu-small/source/i18n/unicode/messageformat2_arguments.h b/deps/icu-small/source/i18n/unicode/messageformat2_arguments.h index f79865a43ff6e7..c43d96191f16f1 100644 --- a/deps/icu-small/source/i18n/unicode/messageformat2_arguments.h +++ b/deps/icu-small/source/i18n/unicode/messageformat2_arguments.h @@ -73,7 +73,7 @@ namespace message2 { if (U_FAILURE(status)) { return; } - argumentNames = LocalArray<UnicodeString>(new UnicodeString[argsLen = (int32_t) args.size()]); + argumentNames = LocalArray<UnicodeString>(new UnicodeString[argsLen = static_cast<int32_t>(args.size())]); arguments = LocalArray<Formattable>(new Formattable[argsLen]); if (!argumentNames.isValid() || !arguments.isValid()) { status = U_MEMORY_ALLOCATION_ERROR; diff --git a/deps/icu-small/source/i18n/unicode/messageformat2_data_model.h b/deps/icu-small/source/i18n/unicode/messageformat2_data_model.h index 942a03f7359176..0c836af1bdfd35 100644 --- a/deps/icu-small/source/i18n/unicode/messageformat2_data_model.h +++ b/deps/icu-small/source/i18n/unicode/messageformat2_data_model.h @@ -62,163 +62,6 @@ namespace message2 { class Literal; class Operator; - /** - * The `Reserved` class represents a `reserved` annotation, as in the `reserved` nonterminal - * in the MessageFormat 2 grammar or the `Reserved` interface - * defined in - * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#expressions - * - * `Reserved` is immutable, copyable and movable. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - class U_I18N_API Reserved : public UMemory { - public: - /** - * A `Reserved` is a sequence of literals. - * - * @return The number of literals. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - int32_t numParts() const; - /** - * Indexes into the sequence. - * Precondition: i < numParts() - * - * @param i Index of the part being accessed. - * @return A reference to he i'th literal in the sequence - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - const Literal& getPart(int32_t i) const; - - /** - * The mutable `Reserved::Builder` class allows the reserved sequence to be - * constructed one part at a time. - * - * Builder is not copyable or movable. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - class U_I18N_API Builder : public UMemory { - private: - UVector* parts; // Not a LocalPointer for the same reason as in `SelectorKeys::Builder` - - public: - /** - * Adds a single literal to the reserved sequence. - * - * @param part The literal to be added. Passed by move. - * @param status Input/output error code - * @return A reference to the builder. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Builder& add(Literal&& part, UErrorCode& status) noexcept; - /** - * Constructs a new immutable `Reserved` using the list of parts - * set with previous `add()` calls. - * - * The builder object (`this`) can still be used after calling `build()`. - * - * param status Input/output error code - * @return The new Reserved object - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Reserved build(UErrorCode& status) const noexcept; - /** - * Default constructor. - * Returns a builder with an empty Reserved sequence. - * - * param status Input/output error code - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Builder(UErrorCode& status); - /** - * Destructor. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - virtual ~Builder(); - Builder(const Builder&) = delete; - Builder& operator=(const Builder&) = delete; - Builder(Builder&&) = delete; - Builder& operator=(Builder&&) = delete; - }; // class Reserved::Builder - /** - * Non-member swap function. - * @param r1 will get r2's contents - * @param r2 will get r1's contents - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - friend inline void swap(Reserved& r1, Reserved& r2) noexcept { - using std::swap; - - swap(r1.bogus, r2.bogus); - swap(r1.parts, r2.parts); - swap(r1.len, r2.len); - } - /** - * Copy constructor. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Reserved(const Reserved& other); - /** - * Assignment operator - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Reserved& operator=(Reserved) noexcept; - /** - * Default constructor. - * Puts the Reserved into a valid but undefined state. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Reserved() { parts = LocalArray<Literal>(); } - /** - * Destructor. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - virtual ~Reserved(); - private: - friend class Builder; - friend class Operator; - - // True if a copy failed; this has to be distinguished - // from a valid `Reserved` with empty parts - bool bogus = false; - - // Possibly-empty list of parts - // `literal` reserved as a quoted literal; `reserved-char` / `reserved-escape` - // strings represented as unquoted literals - /* const */ LocalArray<Literal> parts; - int32_t len = 0; - - Reserved(const UVector& parts, UErrorCode& status) noexcept; - // Helper - static void initLiterals(Reserved&, const Reserved&); - }; - /** * The `Literal` class corresponds to the `literal` nonterminal in the MessageFormat 2 grammar, * https://github.com/unicode-org/message-format-wg/blob/main/spec/message.abnf and the @@ -349,8 +192,6 @@ namespace message2 { virtual ~Literal(); private: - friend class Reserved::Builder; - /* const */ bool thisIsQuoted = false; /* const */ UnicodeString contents; }; @@ -986,60 +827,22 @@ namespace message2 { }; // class OptionMap #endif - // Internal use only - #ifndef U_IN_DOXYGEN - class U_I18N_API Callable : public UObject { - public: - friend inline void swap(Callable& c1, Callable& c2) noexcept { - using std::swap; - - swap(c1.name, c2.name); - swap(c1.options, c2.options); - } - const FunctionName& getName() const { return name; } - const OptionMap& getOptions() const { return options; } - Callable(const FunctionName& f, const OptionMap& opts) : name(f), options(opts) {} - Callable& operator=(Callable) noexcept; - Callable(const Callable&); - Callable() = default; - virtual ~Callable(); - private: - /* const */ FunctionName name; - /* const */ OptionMap options; - }; - #endif } // namespace data_model } // namespace message2 U_NAMESPACE_END -/// @cond DOXYGEN_IGNORE -// Export an explicit template instantiation of the std::variant that is used as a -// data member of various MFDataModel classes. -// (When building DLLs for Windows this is required.) -// (See measunit_impl.h, datefmt.h, collationiterator.h, erarules.h and others -// for similar examples.) -#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN -#if defined(U_REAL_MSVC) && defined(_MSVC_STL_VERSION) -template class U_I18N_API std::_Variant_storage_<false, icu::message2::data_model::Reserved,icu::message2::data_model::Callable>; -#endif -template class U_I18N_API std::variant<icu::message2::data_model::Reserved,icu::message2::data_model::Callable>; -#endif -/// @endcond - U_NAMESPACE_BEGIN namespace message2 { namespace data_model { /** - * The `Operator` class corresponds to the `FunctionRef | Reserved` type in the + * The `Operator` class corresponds to the `FunctionRef` type in the * `Expression` interface defined in * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model.md#patterns * - * It represents the annotation that an expression can have: either a function name paired - * with a map from option names to operands (possibly empty), - * or a reserved sequence, which has no meaning and results in an error if the formatter - * is invoked. + * It represents the annotation that an expression can have: a function name paired + * with a map from option names to operands (possibly empty). * * `Operator` is immutable, copyable and movable. * @@ -1048,18 +851,8 @@ namespace message2 { */ class U_I18N_API Operator : public UObject { public: - /** - * Determines if this operator is a reserved annotation. - * - * @return true if and only if this operator represents a reserved sequence. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - UBool isReserved() const { return std::holds_alternative<Reserved>(contents); } /** * Accesses the function name. - * Precondition: !isReserved() * * @return The function name of this operator. * @@ -1067,19 +860,8 @@ namespace message2 { * @deprecated This API is for technology preview only. */ const FunctionName& getFunctionName() const; - /** - * Accesses the underlying reserved sequence. - * Precondition: isReserved() - * - * @return The reserved sequence represented by this operator. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - const Reserved& asReserved() const; /** * Accesses function options. - * Precondition: !isReserved() * * @return A vector of function options for this operator. * @@ -1087,11 +869,7 @@ namespace message2 { * @deprecated This API is for technology preview only. */ std::vector<Option> getOptions() const { - const Callable* f = std::get_if<Callable>(&contents); - // This case should never happen, as the precondition is !isReserved() - if (f == nullptr) { return {}; } - const OptionMap& opts = f->getOptions(); - return opts.getOptions(); + return options.getOptions(); } /** * The mutable `Operator::Builder` class allows the operator to be constructed @@ -1105,30 +883,12 @@ namespace message2 { class U_I18N_API Builder : public UMemory { private: friend class Operator; - bool isReservedSequence = false; - bool hasFunctionName = false; - bool hasOptions = false; - Reserved asReserved; FunctionName functionName; OptionMap::Builder options; public: - /** - * Sets this operator to be a reserved sequence. - * If a function name and/or options were previously set, - * clears them. - * - * @param reserved The reserved sequence to set as the contents of this Operator. - * (Passed by move.) - * @return A reference to the builder. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Builder& setReserved(Reserved&& reserved); /** * Sets this operator to be a function annotation and sets its name * to `func`. - * If a reserved sequence was previously set, clears it. * * @param func The function name. * @return A reference to the builder. @@ -1140,7 +900,6 @@ namespace message2 { /** * Sets this operator to be a function annotation and adds a * single option. - * If a reserved sequence was previously set, clears it. * * @param key The name of the option. * @param value The value (right-hand side) of the option. @@ -1152,10 +911,8 @@ namespace message2 { */ Builder& addOption(const UnicodeString &key, Operand&& value, UErrorCode& status) noexcept; /** - * Constructs a new immutable `Operator` using the `reserved` annotation - * or the function name and options that were previously set. - * If neither `setReserved()` nor `setFunctionName()` was previously - * called, then `status` is set to U_INVALID_STATE_ERROR. + * Constructs a new immutable `Operator` using the + * function name and options that were previously set. * * The builder object (`this`) can still be used after calling `build()`. * @@ -1171,7 +928,7 @@ namespace message2 { Operator build(UErrorCode& status); /** * Default constructor. - * Returns a Builder with no function name or reserved sequence set. + * Returns a Builder with no function name or options set. * * @param status Input/output error code. * @@ -1209,7 +966,8 @@ namespace message2 { friend inline void swap(Operator& o1, Operator& o2) noexcept { using std::swap; - swap(o1.contents, o2.contents); + swap(o1.name, o2.name); + swap(o1.options, o2.options); } /** * Assignment operator. @@ -1225,7 +983,7 @@ namespace message2 { * @internal ICU 75 technology preview * @deprecated This API is for technology preview only. */ - Operator() : contents(Reserved()) {} + Operator() {} /** * Destructor. * @@ -1242,12 +1000,12 @@ namespace message2 { // Function call constructor Operator(const FunctionName& f, const UVector& options, UErrorCode&); - // Reserved sequence constructor - Operator(const Reserved& r) : contents(r) {} const OptionMap& getOptionsInternal() const; Operator(const FunctionName&, const OptionMap&); - /* const */ std::variant<Reserved, Callable> contents; + + /* const */ FunctionName name; + /* const */ OptionMap options; }; // class Operator } // namespace data_model } // namespace message2 @@ -1262,7 +1020,6 @@ U_NAMESPACE_END // for similar examples.) #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN template class U_I18N_API std::optional<icu::message2::data_model::Operator>; -template class U_I18N_API std::optional<icu::message2::data_model::Reserved>; #endif /// @endcond @@ -1520,8 +1277,7 @@ namespace message2 { UBool isStandaloneAnnotation() const; /** * Checks if this expression has a function - * annotation (with or without an operand). A reserved - * sequence is not a function annotation. + * annotation (with or without an operand). * * @return True if and only if the expression has an annotation * that is a function. @@ -1531,20 +1287,9 @@ namespace message2 { */ UBool isFunctionCall() const; /** - * Returns true if and only if this expression is - * annotated with a reserved sequence. - * - * @return True if and only if the expression has an - * annotation that is a reserved sequence, - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - UBool isReserved() const; - /** - * Accesses the function or reserved sequence + * Accesses the function * annotating this expression. - * If !(isFunctionCall() || isReserved()), sets + * If !(isFunctionCall()), sets * `status` to U_INVALID_STATE_ERROR. * * @param status Input/output error code. @@ -1751,203 +1496,6 @@ template class U_I18N_API LocalArray<message2::data_model::Expression>; namespace message2 { namespace data_model { - /** - * The `UnsupportedStatement` class corresponds to the `reserved-statement` nonterminal in the MessageFormat 2 - * grammar and the `unsupported-statement` type defined in: - * https://github.com/unicode-org/message-format-wg/blob/main/spec/data-model/message.json#L169 - * - * It represents a keyword (string) together with an optional - * `Reserved` annotation and a non-empty list of expressions. - * - * `UnsupportedStatement` is immutable, copyable and movable. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - class U_I18N_API UnsupportedStatement : public UObject { - public: - /** - * Accesses the keyword of this statement. - * - * @return A reference to a string. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - const UnicodeString& getKeyword() const { return keyword; } - /** - * Accesses the `reserved-body` of this statement. - * - * @param status Input/output error code. Set to U_ILLEGAL_ARGUMENT_ERROR - * if this unsupported statement has no body. - * @return A non-owned pointer to a `Reserved` annotation, - * which is non-null if U_SUCCESS(status). - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - const Reserved* getBody(UErrorCode& status) const; - /** - * Accesses the expressions of this statement. - * - * @return A vector of Expressions. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - std::vector<Expression> getExpressions() const { - if (expressionsLen <= 0 || !expressions.isValid()) { - // This case should never happen, but we can't use an assertion here - return {}; - } - return toStdVector<Expression>(expressions.getAlias(), expressionsLen); - } - /** - * The mutable `UnsupportedStatement::Builder` class allows the statement to be constructed - * incrementally. - * - * Builder is not copyable or movable. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - class U_I18N_API Builder : public UMemory { - private: - friend class UnsupportedStatement; - friend class message2::Parser; - - UnicodeString keyword; - std::optional<Reserved> body; - UVector* expressions; // Vector of expressions; - // not a LocalPointer for - // the same reason as in `SelectorKeys::builder` - public: - /** - * Sets the keyword of this statement. - * - * @param k The keyword to set. - * @return A reference to the builder. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Builder& setKeyword(const UnicodeString& k); - /** - * Sets the body of this statement. - * - * @param r The `Reserved` annotation to set as the body. Passed by move. - * @return A reference to the builder. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Builder& setBody(Reserved&& r); - /** - * Adds an expression to this statement. - * - * @param e The expression to add. Passed by move. - * @param status Input/output error code. - * @return A reference to the builder. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Builder& addExpression(Expression&& e, UErrorCode& status); - /** - * Constructs a new immutable `UnsupportedStatement` using the keyword, - * body and (if applicable) expressions that were previously set. - * If `setKeyword()` was never called, then `status` is set to - * U_INVALID_STATE_ERROR. If `setBody()` was never called, the body is - * treated as absent (not an error). If `addExpression()` was not called - * at least once, then `status` is set to U_INVALID_STATE_ERROR. - * - * The builder object (`this`) can still be used after calling `build()`. - * @param status Input/output error code. - * @return The new UnsupportedStatement - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - UnsupportedStatement build(UErrorCode& status) const; - /** - * Default constructor. - * Returns a Builder with no keyword or body set. - * - * @param status Input/output error code. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Builder(UErrorCode& status); - /** - * Destructor. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - virtual ~Builder(); - Builder(const Builder&) = delete; - Builder& operator=(const Builder&) = delete; - Builder(Builder&&) = delete; - Builder& operator=(Builder&&) = delete; - }; // class UnsupportedStatement::Builder - /** - * Non-member swap function. - * @param s1 will get s2's contents - * @param s2 will get s1's contents - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - friend inline void swap(UnsupportedStatement& s1, UnsupportedStatement& s2) noexcept { - using std::swap; - - swap(s1.keyword, s2.keyword); - swap(s1.body, s2.body); - swap(s1.expressions, s2.expressions); - swap(s1.expressionsLen, s2.expressionsLen); - } - /** - * Copy constructor. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - UnsupportedStatement(const UnsupportedStatement& other); - /** - * Assignment operator. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - UnsupportedStatement& operator=(UnsupportedStatement) noexcept; - /** - * Default constructor. - * Puts the UnsupportedStatement into a valid but undefined state. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - UnsupportedStatement() : expressions(LocalArray<Expression>()) {} - /** - * Destructor. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - virtual ~UnsupportedStatement(); - private: - friend class message2::Serializer; - - /* const */ UnicodeString keyword; - /* const */ std::optional<Reserved> body; - /* const */ LocalArray<Expression> expressions; - /* const */ int32_t expressionsLen = 0; - - const Expression* getExpressionsInternal() const { return expressions.getAlias(); } - - UnsupportedStatement(const UnicodeString&, const std::optional<Reserved>&, const UVector&, UErrorCode&); - }; // class UnsupportedStatement class Pattern; @@ -2110,8 +1658,6 @@ namespace message2 { #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN template class U_I18N_API LocalPointerBase<message2::data_model::PatternPart>; template class U_I18N_API LocalArray<message2::data_model::PatternPart>; -template class U_I18N_API LocalPointerBase<message2::data_model::UnsupportedStatement>; -template class U_I18N_API LocalArray<message2::data_model::UnsupportedStatement>; #endif /// @endcond @@ -2599,7 +2145,7 @@ namespace message2 { // If non-null, the referent is a member of `expr` so // its lifetime is the same as the lifetime of the enclosing Binding // (as long as there's no mutation) - const Callable* annotation = nullptr; + const Operator* annotation = nullptr; const OptionMap& getOptionsInternal() const; @@ -2808,21 +2354,6 @@ namespace message2 { return toStdVector<Variant>(match->variants.getAlias(), match->numVariants); return {}; } - /** - * Accesses the unsupported statements for this data model. - * - * @return A vector of unsupported statements. - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - std::vector<UnsupportedStatement> getUnsupportedStatements() const { - std::vector<UnsupportedStatement> result; - if (!bogus) { - return toStdVector<UnsupportedStatement>(unsupportedStatements.getAlias(), unsupportedStatementsLen); - } - return {}; - } /** * Accesses the pattern (in a message without selectors). * Returns a reference to an empty pattern if the message has selectors. @@ -2873,8 +2404,6 @@ namespace message2 { swap(m1.body, m2.body); swap(m1.bindings, m2.bindings); swap(m1.bindingsLen, m2.bindingsLen); - swap(m1.unsupportedStatements, m2.unsupportedStatements); - swap(m1.unsupportedStatementsLen, m2.unsupportedStatementsLen); } /** * Assignment operator @@ -2918,7 +2447,6 @@ namespace message2 { UVector* selectors = nullptr; UVector* variants = nullptr; UVector* bindings = nullptr; - UVector* unsupportedStatements = nullptr; public: /** * Adds a binding, There must not already be a binding @@ -2933,17 +2461,6 @@ namespace message2 { * @deprecated This API is for technology preview only. */ Builder& addBinding(Binding&& b, UErrorCode& status); - /** - * Adds an unsupported statement. - * - * @param s The statement. Passed by move. - * @param status Input/output error code. - * - * - * @internal ICU 75 technology preview - * @deprecated This API is for technology preview only. - */ - Builder& addUnsupportedStatement(UnsupportedStatement&& s, UErrorCode& status); /** * Adds a selector expression. Copies `expression`. * If a pattern was previously set, clears the pattern. @@ -3046,16 +2563,9 @@ namespace message2 { /* const */ LocalArray<Binding> bindings; int32_t bindingsLen = 0; - // Unsupported statements - // (Treated as a type of `declaration` in the data model spec; - // stored separately for convenience) - /* const */ LocalArray<UnsupportedStatement> unsupportedStatements; - int32_t unsupportedStatementsLen = 0; - const Binding* getLocalVariablesInternal() const; const Expression* getSelectorsInternal() const; const Variant* getVariantsInternal() const; - const UnsupportedStatement* getUnsupportedStatementsInternal() const; int32_t numSelectors() const { const Matcher* matcher = std::get_if<Matcher>(&body); diff --git a/deps/icu-small/source/i18n/unicode/reldatefmt.h b/deps/icu-small/source/i18n/unicode/reldatefmt.h index 5dc4905b12a825..25d5dffa105a2f 100644 --- a/deps/icu-small/source/i18n/unicode/reldatefmt.h +++ b/deps/icu-small/source/i18n/unicode/reldatefmt.h @@ -384,8 +384,10 @@ class U_I18N_API FormattedRelativeDateTime : public UMemory, public FormattedVal * </pre> * </blockquote> * <p> - * In the future, we may add more forms, such as abbreviated/short forms - * (3 secs ago), and relative day periods ("yesterday afternoon"), etc. + * The UDateRelativeDateTimeFormatterStyle parameter allows selection of + * different length styles: LONG ("3 seconds ago"), SHORT ("3 sec. ago"), + * NARROW ("3s ago"). In the future, we may add more forms, such as + * relative day periods ("yesterday afternoon"), etc. * * The RelativeDateTimeFormatter class is not intended for public subclassing. * diff --git a/deps/icu-small/source/i18n/unicode/simplenumberformatter.h b/deps/icu-small/source/i18n/unicode/simplenumberformatter.h index 5aa33c69468ae0..d0121c2b97ec52 100644 --- a/deps/icu-small/source/i18n/unicode/simplenumberformatter.h +++ b/deps/icu-small/source/i18n/unicode/simplenumberformatter.h @@ -87,16 +87,6 @@ class U_I18N_API SimpleNumber : public UMemory { void setMaximumIntegerDigits(uint32_t maximumIntegerDigits, UErrorCode& status); #endif // U_HIDE_DRAFT_API -#ifndef U_HIDE_DEPRECATED_API - /** - * Alias for setMaximumIntegerDigits. - * Will be removed after ICU 75. - * - * @deprecated ICU 75 - */ - void truncateStart(uint32_t maximumIntegerDigits, UErrorCode& status); -#endif // U_HIDE_DEPRECATED_API - /** * Pads the beginning of the number with zeros up to the given minimum number of integer digits. * diff --git a/deps/icu-small/source/i18n/unicode/sortkey.h b/deps/icu-small/source/i18n/unicode/sortkey.h index a9b6fee83b2f14..6679beb9357a74 100644 --- a/deps/icu-small/source/i18n/unicode/sortkey.h +++ b/deps/icu-small/source/i18n/unicode/sortkey.h @@ -264,7 +264,7 @@ class U_I18N_API CollationKey : public UObject { return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes; } int32_t getCapacity() const { - return (fFlagAndLength >= 0) ? (int32_t)sizeof(fUnion) : fUnion.fFields.fCapacity; + return fFlagAndLength >= 0 ? static_cast<int32_t>(sizeof(fUnion)) : fUnion.fFields.fCapacity; } int32_t getLength() const { return fFlagAndLength & 0x7fffffff; } diff --git a/deps/icu-small/source/i18n/unicode/tblcoll.h b/deps/icu-small/source/i18n/unicode/tblcoll.h index 0c018beb8138aa..0c65e897f501f3 100644 --- a/deps/icu-small/source/i18n/unicode/tblcoll.h +++ b/deps/icu-small/source/i18n/unicode/tblcoll.h @@ -843,14 +843,14 @@ class U_I18N_API RuleBasedCollator final : public Collator { const CollationSettings &getDefaultSettings() const; void setAttributeDefault(int32_t attribute) { - explicitlySetAttributes &= ~((uint32_t)1 << attribute); + explicitlySetAttributes &= ~(static_cast<uint32_t>(1) << attribute); } void setAttributeExplicitly(int32_t attribute) { - explicitlySetAttributes |= (uint32_t)1 << attribute; + explicitlySetAttributes |= static_cast<uint32_t>(1) << attribute; } UBool attributeHasBeenSetExplicitly(int32_t attribute) const { // assert(0 <= attribute < ATTR_LIMIT); - return (UBool)((explicitlySetAttributes & ((uint32_t)1 << attribute)) != 0); + return (explicitlySetAttributes & (static_cast<uint32_t>(1) << attribute)) != 0; } /** diff --git a/deps/icu-small/source/i18n/unicode/timezone.h b/deps/icu-small/source/i18n/unicode/timezone.h index 1c3be8e32c681b..b19900b76712c4 100644 --- a/deps/icu-small/source/i18n/unicode/timezone.h +++ b/deps/icu-small/source/i18n/unicode/timezone.h @@ -445,7 +445,6 @@ class U_I18N_API TimeZone : public UObject { UnicodeString& canonicalID, UBool& isSystemID, UErrorCode& status); -#ifndef U_HIDE_DRAFT_API /** * Returns the preferred time zone ID in the IANA time zone database for the given time zone ID. * There are two types of preferred IDs. The first type is the one defined in zone.tab file, @@ -469,11 +468,10 @@ class U_I18N_API TimeZone : public UObject { * @param status Receives the status. When the given time zone ID is not a known time zone * ID, U_ILLEGAL_ARGUMENT_ERROR is set. * @return A reference to the result. - * @draft ICU 74 + * @stable ICU 74 */ static UnicodeString& U_EXPORT2 getIanaID(const UnicodeString&id, UnicodeString& ianaID, UErrorCode& status); -#endif // U_HIDE_DRAFT_API /** * Converts a system time zone ID to an equivalent Windows time zone ID. For example, diff --git a/deps/icu-small/source/i18n/unicode/translit.h b/deps/icu-small/source/i18n/unicode/translit.h index cde8450c88916a..70ba1c87fa3863 100644 --- a/deps/icu-small/source/i18n/unicode/translit.h +++ b/deps/icu-small/source/i18n/unicode/translit.h @@ -1566,7 +1566,7 @@ inline int32_t Transliterator::getMaximumContextLength() const { inline void Transliterator::setID(const UnicodeString& id) { ID = id; // NUL-terminate the ID string, which is a non-aliased copy. - ID.append((char16_t)0); + ID.append(static_cast<char16_t>(0)); ID.truncate(ID.length()-1); } diff --git a/deps/icu-small/source/i18n/unicode/ucal.h b/deps/icu-small/source/i18n/unicode/ucal.h index 0eb4b21d326b36..d9bce21419a137 100644 --- a/deps/icu-small/source/i18n/unicode/ucal.h +++ b/deps/icu-small/source/i18n/unicode/ucal.h @@ -1387,7 +1387,6 @@ U_CAPI int32_t U_EXPORT2 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len, UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status); -#ifndef U_HIDE_DRAFT_API /** * Returns the preferred time zone ID in the IANA time zone database for the given time zone ID. * There are two types of preferred IDs. The first type is the one defined in zone.tab file, @@ -1411,12 +1410,11 @@ ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len, * @param status Receives the status. When the given time zone ID is not a known system time zone * ID, U_ILLEGAL_ARGUMENT_ERROR is set. * @return The result string length, not including the terminating null. - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI int32_t U_EXPORT2 ucal_getIanaTimeZoneID(const UChar* id, int32_t len, UChar* result, int32_t resultCapacity, UErrorCode* status); -#endif // U_HIDE_DRAFT_API /** * Get the resource keyword value string designating the calendar type for the UCalendar. diff --git a/deps/icu-small/source/i18n/unicode/ucol.h b/deps/icu-small/source/i18n/unicode/ucol.h index e4ec2f74185aee..ae4f29c3c6c4e6 100644 --- a/deps/icu-small/source/i18n/unicode/ucol.h +++ b/deps/icu-small/source/i18n/unicode/ucol.h @@ -418,7 +418,7 @@ ucol_open(const char *loc, UErrorCode *status); * Produce a UCollator instance according to the rules supplied. * The rules are used to change the default ordering, defined in the * UCA in a process called tailoring. The resulting UCollator pointer - * can be used in the same way as the one obtained by {@link #ucol_strcoll }. + * can be used in the same way as the one obtained by {@link #ucol_open }. * @param rules A string describing the collation rules. For the syntax * of the rules please see users guide. * @param rulesLength The length of rules, or -1 if null-terminated. @@ -1519,6 +1519,130 @@ ucol_openBinary(const uint8_t *bin, int32_t length, const UCollator *base, UErrorCode *status); +#if U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API + +#include <functional> +#include <string_view> +#include <type_traits> + +#include "unicode/char16ptr.h" +#include "unicode/stringpiece.h" +#include "unicode/unistr.h" + +namespace U_HEADER_ONLY_NAMESPACE { + +#ifndef U_HIDE_DRAFT_API + +namespace collator { + +namespace internal { + +/** + * Function object for performing comparisons using a UCollator. + * @internal + */ +template <template <typename...> typename Compare, UCollationResult result> +class Predicate { + public: + /** @internal */ + explicit Predicate(const UCollator* ucol) : collator(ucol) {} + + /** @internal */ + template < + typename T, typename U, + typename = std::enable_if_t<ConvertibleToU16StringView<T> && ConvertibleToU16StringView<U>>> + bool operator()(const T& lhs, const U& rhs) const { + return match(UnicodeString::readOnlyAlias(lhs), UnicodeString::readOnlyAlias(rhs)); + } + + /** @internal */ + bool operator()(std::string_view lhs, std::string_view rhs) const { + return match(lhs, rhs); + } + +#if defined(__cpp_char8_t) + /** @internal */ + bool operator()(std::u8string_view lhs, std::u8string_view rhs) const { + return match(lhs, rhs); + } +#endif + + private: + bool match(UnicodeString lhs, UnicodeString rhs) const { + return compare( + ucol_strcoll( + collator, + toUCharPtr(lhs.getBuffer()), lhs.length(), + toUCharPtr(rhs.getBuffer()), rhs.length()), + result); + } + + bool match(StringPiece lhs, StringPiece rhs) const { + UErrorCode status = U_ZERO_ERROR; + return compare( + ucol_strcollUTF8( + collator, + lhs.data(), lhs.length(), + rhs.data(), rhs.length(), + &status), + result); + } + + const UCollator* const collator; + static constexpr Compare<UCollationResult> compare{}; +}; + +} // namespace internal + +/** + * Function object for performing comparisons using this collator. + * Like <code>std::equal_to</code> but uses the collator instead of <code>operator==</code>. + * @draft ICU 76 + */ +using equal_to = internal::Predicate<std::equal_to, UCOL_EQUAL>; + +/** + * Function object for performing comparisons using this collator. + * Like <code>std::greater</code> but uses the collator instead of <code>operator></code>. + * @draft ICU 76 + */ +using greater = internal::Predicate<std::equal_to, UCOL_GREATER>; + +/** + * Function object for performing comparisons using this collator. + * Like <code>std::less</code> but uses the collator instead of <code>operator<</code>. + * @draft ICU 76 + */ +using less = internal::Predicate<std::equal_to, UCOL_LESS>; + +/** + * Function object for performing comparisons using this collator. + * Like <code>std::not_equal_to</code> but uses the collator instead of <code>operator!=</code>. + * @draft ICU 76 + */ +using not_equal_to = internal::Predicate<std::not_equal_to, UCOL_EQUAL>; + +/** + * Function object for performing comparisons using this collator. + * Like <code>std::greater_equal</code> but uses the collator instead of <code>operator>=</code>. + * @draft ICU 76 + */ +using greater_equal = internal::Predicate<std::not_equal_to, UCOL_LESS>; + +/** + * Function object for performing comparisons using this collator. + * Like <code>std::less_equal</code> but uses the collator instead of <code>operator<=</code>. + * @draft ICU 76 + */ +using less_equal = internal::Predicate<std::not_equal_to, UCOL_GREATER>; + +} // namespace collator + +#endif // U_HIDE_DRAFT_API + +} // namespace U_HEADER_ONLY_NAMESPACE + +#endif // U_SHOW_CPLUSPLUS_API || U_SHOW_CPLUSPLUS_HEADER_API #endif /* #if !UCONFIG_NO_COLLATION */ diff --git a/deps/icu-small/source/i18n/unicode/usimplenumberformatter.h b/deps/icu-small/source/i18n/unicode/usimplenumberformatter.h index b67d7e56d59981..22e81ba2c939b0 100644 --- a/deps/icu-small/source/i18n/unicode/usimplenumberformatter.h +++ b/deps/icu-small/source/i18n/unicode/usimplenumberformatter.h @@ -167,18 +167,6 @@ usnum_setMaximumIntegerDigits(USimpleNumber* unumber, int32_t maximumIntegerDigi #endif // U_HIDE_DRAFT_API -#ifndef U_HIDE_DEPRECATED_API -/** - * Alias for setMaximumIntegerDigits. - * Will be removed after ICU 75. - * - * @deprecated ICU 75 - */ -U_CAPI void U_EXPORT2 -usnum_truncateStart(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec); -#endif // U_HIDE_DEPRECATED_API - - /** * Sets the sign of the number: an explicit plus sign, explicit minus sign, or no sign. * diff --git a/deps/icu-small/source/i18n/unicode/uspoof.h b/deps/icu-small/source/i18n/unicode/uspoof.h index 20d29d62b23fd4..4e029fe951c9ac 100644 --- a/deps/icu-small/source/i18n/unicode/uspoof.h +++ b/deps/icu-small/source/i18n/unicode/uspoof.h @@ -1224,7 +1224,6 @@ uspoof_areConfusable(const USpoofChecker *sc, const UChar *id2, int32_t length2, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API /** * Check whether two specified strings are visually confusable when * displayed in a context with the given paragraph direction. @@ -1269,13 +1268,12 @@ uspoof_areConfusable(const USpoofChecker *sc, * enum USpoofChecks. Zero is returned if the identifiers * are not confusable. * - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusable(const USpoofChecker *sc, UBiDiDirection direction, const UChar *id1, int32_t length1, const UChar *id2, int32_t length2, UErrorCode *status); -#endif /* U_HIDE_DRAFT_API */ /** * A version of {@link uspoof_areConfusable} accepting strings in UTF-8 format. @@ -1308,7 +1306,6 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc, const char *id2, int32_t length2, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API /** * A version of {@link uspoof_areBidiConfusable} accepting strings in UTF-8 format. * @@ -1332,7 +1329,7 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc, * enum USpoofChecks. Zero is returned if the strings * are not confusable. * - * @draft ICU 74 + * @stable ICU 74 * * @see uspoof_areBidiConfusable */ @@ -1340,7 +1337,6 @@ U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUTF8(const USpoofChecker *sc, const char *id1, int32_t length1, const char *id2, int32_t length2, UErrorCode *status); -#endif /* U_HIDE_DRAFT_API */ /** * Get the "skeleton" for an identifier. @@ -1380,7 +1376,6 @@ uspoof_getSkeleton(const USpoofChecker *sc, UChar *dest, int32_t destCapacity, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API /** * Get the "bidiSkeleton" for an identifier and a direction. * Skeletons are a transformation of the input identifier; @@ -1410,14 +1405,13 @@ uspoof_getSkeleton(const USpoofChecker *sc, * is always that of the complete skeleton, even when the * supplied buffer is too small (or of zero length) * - * @draft ICU 74 + * @stable ICU 74 * @see uspoof_areBidiConfusable */ U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeleton(const USpoofChecker *sc, UBiDiDirection direction, const UChar *id, int32_t length, UChar *dest, int32_t destCapacity, UErrorCode *status); -#endif /* U_HIDE_DRAFT_API */ /** * Get the "skeleton" for an identifier. @@ -1459,7 +1453,6 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, char *dest, int32_t destCapacity, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API /** * Get the "bidiSkeleton" for an identifier and a direction. * Skeletons are a transformation of the input identifier; @@ -1492,12 +1485,11 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, * is always that of the complete skeleton, even when the * supplied buffer is too small (or of zero length) * - * @draft ICU 74 + * @stable ICU 74 */ U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeletonUTF8(const USpoofChecker *sc, UBiDiDirection direction, const char *id, int32_t length, char *dest, int32_t destCapacity, UErrorCode *status); -#endif /* U_HIDE_DRAFT_API */ /** * Get the set of Candidate Characters for Inclusion in Identifiers, as defined @@ -1736,7 +1728,6 @@ uspoof_areConfusableUnicodeString(const USpoofChecker *sc, const icu::UnicodeString &s2, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API /** * A version of {@link uspoof_areBidiConfusable} accepting UnicodeStrings. * @@ -1756,7 +1747,7 @@ uspoof_areConfusableUnicodeString(const USpoofChecker *sc, * enum USpoofChecks. Zero is returned if the identifiers * are not confusable. * - * @draft ICU 74 + * @stable ICU 74 * * @see uspoof_areBidiConfusable */ @@ -1765,7 +1756,6 @@ U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUnicodeString(const USpoofChec const icu::UnicodeString &s1, const icu::UnicodeString &s2, UErrorCode *status); -#endif /* U_HIDE_DRAFT_API */ /** * Get the "skeleton" for an identifier. @@ -1797,7 +1787,6 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, icu::UnicodeString &dest, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API /** * Get the "bidiSkeleton" for an identifier and a direction. * Skeletons are a transformation of the input identifier; @@ -1820,12 +1809,11 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, * perform the check. * @return A reference to the destination (skeleton) string. * - * @draft ICU 74 + * @stable ICU 74 */ U_I18N_API icu::UnicodeString &U_EXPORT2 uspoof_getBidiSkeletonUnicodeString( const USpoofChecker *sc, UBiDiDirection direction, const icu::UnicodeString &id, icu::UnicodeString &dest, UErrorCode *status); -#endif /* U_HIDE_DRAFT_API */ /** * Get the set of Candidate Characters for Inclusion in Identifiers, as defined diff --git a/deps/icu-small/source/i18n/units_converter.cpp b/deps/icu-small/source/i18n/units_converter.cpp index 84ea1c176132c3..3ccb0065bfca34 100644 --- a/deps/icu-small/source/i18n/units_converter.cpp +++ b/deps/icu-small/source/i18n/units_converter.cpp @@ -74,7 +74,8 @@ void U_I18N_API Factor::applyPrefix(UMeasurePrefix unitPrefix) { } int32_t prefixPower = umeas_getPrefixPower(unitPrefix); - double prefixFactor = std::pow((double)umeas_getPrefixBase(unitPrefix), (double)std::abs(prefixPower)); + double prefixFactor = std::pow(static_cast<double>(umeas_getPrefixBase(unitPrefix)), + static_cast<double>(std::abs(prefixPower))); if (prefixPower >= 0) { factorNum *= prefixFactor; } else { @@ -697,10 +698,10 @@ double UnitsConverter::scaleToBase(double scaleValue, double minBaseForScaleValu scaleValue = -scaleValue; } scaleValue += 0.5; // adjust up for later truncation - if (scaleValue > (double)scaleMax) { - scaleValue = (double)scaleMax; + if (scaleValue > static_cast<double>(scaleMax)) { + scaleValue = static_cast<double>(scaleMax); } - int scaleInt = (int)scaleValue; + int scaleInt = static_cast<int>(scaleValue); return (minBaseForScaleValues[scaleInt] + minBaseForScaleValues[scaleInt+1])/2.0; } @@ -737,7 +738,7 @@ double UnitsConverter::baseToScale(double baseValue, double minBaseForScaleValue baseValue = -baseValue; } int scaleIndex = bsearchRanges(minBaseForScaleValues, scaleMax, baseValue); - return (double)scaleIndex; + return static_cast<double>(scaleIndex); } double UnitsConverter::convert(double inputValue) const { diff --git a/deps/icu-small/source/i18n/unum.cpp b/deps/icu-small/source/i18n/unum.cpp index 7c35473f2d1328..d6d18abed1fa18 100644 --- a/deps/icu-small/source/i18n/unum.cpp +++ b/deps/icu-small/source/i18n/unum.cpp @@ -386,13 +386,13 @@ parseRes(Formattable& res, if(U_FAILURE(*status)) return; - const UnicodeString src((UBool)(textLength == -1), text, textLength); + const UnicodeString src(static_cast<UBool>(textLength == -1), text, textLength); ParsePosition pp; if (parsePos != nullptr) pp.setIndex(*parsePos); - ((const NumberFormat*)fmt)->parse(src, res, pp); + reinterpret_cast<const NumberFormat*>(fmt)->parse(src, res, pp); if(pp.getErrorIndex() != -1) { *status = U_PARSE_ERROR; @@ -485,7 +485,7 @@ unum_parseDoubleCurrency(const UNumberFormat* fmt, if (U_FAILURE(*status)) { return doubleVal; } - const UnicodeString src((UBool)(textLength == -1), text, textLength); + const UnicodeString src(textLength == -1, text, textLength); ParsePosition pp; if (parsePos != nullptr) { pp.setIndex(*parsePos); diff --git a/deps/icu-small/source/i18n/uregex.cpp b/deps/icu-small/source/i18n/uregex.cpp index 534310d609d0ac..5a5ff1d0387d6d 100644 --- a/deps/icu-small/source/i18n/uregex.cpp +++ b/deps/icu-small/source/i18n/uregex.cpp @@ -637,7 +637,7 @@ uregex_groupNumberFromName(URegularExpression *regexp2, const char16_t *groupName, int32_t nameLength, UErrorCode *status) { - RegularExpression *regexp = (RegularExpression*)regexp2; + RegularExpression* regexp = reinterpret_cast<RegularExpression*>(regexp2); if (validateRE(regexp, false, status) == false) { return 0; } @@ -650,7 +650,7 @@ uregex_groupNumberFromCName(URegularExpression *regexp2, const char *groupName, int32_t nameLength, UErrorCode *status) { - RegularExpression *regexp = (RegularExpression*)regexp2; + RegularExpression* regexp = reinterpret_cast<RegularExpression*>(regexp2); if (validateRE(regexp, false, status) == false) { return 0; } @@ -1389,8 +1389,8 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp, int32_t matchStart; int32_t lastMatchEnd; if (UTEXT_USES_U16(m->fInputText)) { - lastMatchEnd = (int32_t)m->fLastMatchEnd; - matchStart = (int32_t)m->fMatchStart; + lastMatchEnd = static_cast<int32_t>(m->fLastMatchEnd); + matchStart = static_cast<int32_t>(m->fMatchStart); } else { // !!!: Would like a better way to do this! UErrorCode tempStatus = U_ZERO_ERROR; @@ -1440,9 +1440,9 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp, replacementLength, // Length of replacement text (void *)replacementText); - if (escapedChar != (UChar32)0xFFFFFFFF) { + if (escapedChar != static_cast<UChar32>(0xFFFFFFFF)) { if (escapedChar <= 0xffff) { - appendToBuf((char16_t)escapedChar, &destIdx, dest, capacity); + appendToBuf(static_cast<char16_t>(escapedChar), &destIdx, dest, capacity); } else { appendToBuf(U16_LEAD(escapedChar), &destIdx, dest, capacity); appendToBuf(U16_TRAIL(escapedChar), &destIdx, dest, capacity); @@ -1527,7 +1527,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp, // Finally, append the capture group data to the destination. if (U_SUCCESS(*status)) { - destIdx += uregex_group((URegularExpression*)regexp, groupNum, + destIdx += uregex_group(reinterpret_cast<URegularExpression*>(regexp), groupNum, dest==nullptr?nullptr:&dest[destIdx], REMAINING_CAPACITY(destIdx, capacity), status); if (*status == U_BUFFER_OVERFLOW_ERROR) { // Ignore buffer overflow when extracting the group. We need to @@ -1653,7 +1653,7 @@ int32_t RegexCImpl::appendTail(RegularExpression *regexp, if (nativeIdx == -1) { srcIdx = 0; } else if (UTEXT_USES_U16(m->fInputText)) { - srcIdx = (int32_t)nativeIdx; + srcIdx = static_cast<int32_t>(nativeIdx); } else { UErrorCode newStatus = U_ZERO_ERROR; srcIdx = utext_extract(m->fInputText, 0, nativeIdx, nullptr, 0, &newStatus); @@ -1842,7 +1842,7 @@ int32_t RegexCImpl::split(RegularExpression *regexp, // No fields are left. Recycle the last one for holding the trailing part of // the input string. i = destFieldsCapacity-1; - destIdx = (int32_t)(destFields[i] - destFields[0]); + destIdx = static_cast<int32_t>(destFields[i] - destFields[0]); } destFields[i] = (destBuf == nullptr) ? nullptr : &destBuf[destIdx]; @@ -1879,7 +1879,7 @@ int32_t RegexCImpl::split(RegularExpression *regexp, // Set up to extract the capture group contents into the dest buffer. destFields[i] = &destBuf[destIdx]; tStatus = U_ZERO_ERROR; - int32_t t = uregex_group((URegularExpression*)regexp, + int32_t t = uregex_group(reinterpret_cast<URegularExpression*>(regexp), groupNum, destFields[i], REMAINING_CAPACITY(destIdx, destCapacity), diff --git a/deps/icu-small/source/i18n/usearch.cpp b/deps/icu-small/source/i18n/usearch.cpp index cc92b1ccaa539b..d296c2874026e5 100644 --- a/deps/icu-small/source/i18n/usearch.cpp +++ b/deps/icu-small/source/i18n/usearch.cpp @@ -111,7 +111,7 @@ uint16_t getFCD(const char16_t *str, int32_t *offset, { const char16_t *temp = str + *offset; uint16_t result = g_nfcImpl->nextFCD16(temp, str + strlength); - *offset = (int32_t)(temp - str); + *offset = static_cast<int32_t>(temp - str); return result; } @@ -162,7 +162,7 @@ inline int32_t getCE(const UStringSearch *strsrch, uint32_t sourcece) static inline void * allocateMemory(uint32_t size, UErrorCode *status) { - uint32_t *result = (uint32_t *)uprv_malloc(size); + uint32_t* result = static_cast<uint32_t*>(uprv_malloc(size)); if (result == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; } @@ -196,8 +196,8 @@ inline int32_t * addTouint32_tArray(int32_t *destination, uint32_t newlength = *destinationlength; if (offset + 1 == newlength) { newlength += increments; - int32_t *temp = (int32_t *)allocateMemory( - sizeof(int32_t) * newlength, status); + int32_t* temp = static_cast<int32_t*>(allocateMemory( + sizeof(int32_t) * newlength, status)); if (U_FAILURE(*status)) { return nullptr; } @@ -236,8 +236,8 @@ inline int64_t * addTouint64_tArray(int64_t *destination, uint32_t newlength = *destinationlength; if (offset + 1 == newlength) { newlength += increments; - int64_t *temp = (int64_t *)allocateMemory( - sizeof(int64_t) * newlength, status); + int64_t* temp = static_cast<int64_t*>(allocateMemory( + sizeof(int64_t) * newlength, status)); if (U_FAILURE(*status)) { return nullptr; @@ -1432,7 +1432,7 @@ CEIBuffer::CEIBuffer(UStringSearch *ss, UErrorCode *status) { if (!initTextProcessedIter(ss, status)) { return; } if (bufSize>DEFAULT_CEBUFFER_SIZE) { - buf = (CEI *)uprv_malloc(bufSize * sizeof(CEI)); + buf = static_cast<CEI*>(uprv_malloc(bufSize * sizeof(CEI))); if (buf == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; } @@ -1705,8 +1705,8 @@ static UCompareCEsResult compareCE64s(int64_t targCE, int64_t patCE, int16_t com int64_t mask; mask = 0xFFFF0000; - int32_t targLev1 = (int32_t)(targCEshifted & mask); - int32_t patLev1 = (int32_t)(patCEshifted & mask); + int32_t targLev1 = static_cast<int32_t>(targCEshifted & mask); + int32_t patLev1 = static_cast<int32_t>(patCEshifted & mask); if ( targLev1 != patLev1 ) { if ( targLev1 == 0 ) { return U_CE_SKIP_TARG; @@ -1718,8 +1718,8 @@ static UCompareCEsResult compareCE64s(int64_t targCE, int64_t patCE, int16_t com } mask = 0x0000FFFF; - int32_t targLev2 = (int32_t)(targCEshifted & mask); - int32_t patLev2 = (int32_t)(patCEshifted & mask); + int32_t targLev2 = static_cast<int32_t>(targCEshifted & mask); + int32_t patLev2 = static_cast<int32_t>(patCEshifted & mask); if ( targLev2 != patLev2 ) { if ( targLev2 == 0 ) { return U_CE_SKIP_TARG; @@ -1732,8 +1732,8 @@ static UCompareCEsResult compareCE64s(int64_t targCE, int64_t patCE, int16_t com } mask = 0xFFFF0000; - int32_t targLev3 = (int32_t)(targCE & mask); - int32_t patLev3 = (int32_t)(patCE & mask); + int32_t targLev3 = static_cast<int32_t>(targCE & mask); + int32_t patLev3 = static_cast<int32_t>(patCE & mask); if ( targLev3 != patLev3 ) { return (patLev3 == U_CE_LEVEL3_BASE || (compareType == USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD && targLev3 == U_CE_LEVEL3_BASE) )? U_CE_MATCH: U_CE_NO_MATCH; diff --git a/deps/icu-small/source/i18n/uspoof_conf.cpp b/deps/icu-small/source/i18n/uspoof_conf.cpp index dbbf627286a992..09e104ba5d8f98 100644 --- a/deps/icu-small/source/i18n/uspoof_conf.cpp +++ b/deps/icu-small/source/i18n/uspoof_conf.cpp @@ -79,7 +79,7 @@ SPUStringPool::SPUStringPool(UErrorCode &status) : fVec(nullptr), fHash(nullptr) return; } vec->setDeleter( - [](void *obj) {delete (SPUString *)obj;}); + [](void *obj) {delete static_cast<SPUString*>(obj);}); fVec = vec.orphan(); fHash = uhash_open(uhash_hashUnicodeString, // key hash function uhash_compareUnicodeString, // Key Comparator @@ -99,7 +99,7 @@ int32_t SPUStringPool::size() { } SPUString *SPUStringPool::getByIndex(int32_t index) { - SPUString *retString = (SPUString *)fVec->elementAt(index); + SPUString* retString = static_cast<SPUString*>(fVec->elementAt(index)); return retString; } @@ -430,7 +430,7 @@ void ConfusabledataBuilder::outputData(UErrorCode &status) { previousCodePoint = codePoint; } SpoofDataHeader *rawData = fSpoofImpl->fSpoofData->fRawData; - rawData->fCFUKeys = (int32_t)((char *)keys - (char *)rawData); + rawData->fCFUKeys = static_cast<int32_t>(reinterpret_cast<char*>(keys) - reinterpret_cast<char*>(rawData)); rawData->fCFUKeysSize = numKeys; fSpoofImpl->fSpoofData->fCFUKeys = keys; @@ -449,7 +449,7 @@ void ConfusabledataBuilder::outputData(UErrorCode &status) { values[i] = static_cast<uint16_t>(value); } rawData = fSpoofImpl->fSpoofData->fRawData; - rawData->fCFUStringIndex = (int32_t)((char *)values - (char *)rawData); + rawData->fCFUStringIndex = static_cast<int32_t>(reinterpret_cast<char*>(values) - reinterpret_cast<char*>(rawData)); rawData->fCFUStringIndexSize = numValues; fSpoofImpl->fSpoofData->fCFUValues = values; @@ -466,7 +466,7 @@ void ConfusabledataBuilder::outputData(UErrorCode &status) { fStringTable->extract(strings, stringsLength+1, status); rawData = fSpoofImpl->fSpoofData->fRawData; U_ASSERT(rawData->fCFUStringTable == 0); - rawData->fCFUStringTable = (int32_t)((char *)strings - (char *)rawData); + rawData->fCFUStringTable = static_cast<int32_t>(reinterpret_cast<char*>(strings) - reinterpret_cast<char*>(rawData)); rawData->fCFUStringTableLen = stringsLength; fSpoofImpl->fSpoofData->fCFUStrings = strings; } diff --git a/deps/icu-small/source/i18n/uspoof_impl.cpp b/deps/icu-small/source/i18n/uspoof_impl.cpp index 93402e670be229..c727fafb37b1ea 100644 --- a/deps/icu-small/source/i18n/uspoof_impl.cpp +++ b/deps/icu-small/source/i18n/uspoof_impl.cpp @@ -148,7 +148,7 @@ void SpoofImpl::setAllowedLocales(const char *localesList, UErrorCode &status) { if (trimmedEnd <= locStart) { break; } - const char *locale = uprv_strndup(locStart, (int32_t)(trimmedEnd + 1 - locStart)); + const char* locale = uprv_strndup(locStart, static_cast<int32_t>(trimmedEnd + 1 - locStart)); localeListCount++; // We have one locale from the locales list. @@ -305,7 +305,7 @@ void SpoofImpl::getNumerics(const UnicodeString& input, UnicodeSet& result, UErr if (u_charType(codePoint) == U_DECIMAL_DIGIT_NUMBER) { // Store the zero character as a representative for comparison. // Unicode guarantees it is codePoint - value - result.add(codePoint - (UChar32)u_getNumericValue(codePoint)); + result.add(codePoint - static_cast<UChar32>(u_getNumericValue(codePoint))); } } } @@ -432,7 +432,7 @@ UChar32 SpoofImpl::ScanHex(const char16_t *s, int32_t start, int32_t limit, UErr status = U_PARSE_ERROR; val = 0; } - return (UChar32)val; + return static_cast<UChar32>(val); } @@ -601,7 +601,7 @@ SpoofData::SpoofData(const void *data, int32_t length, UErrorCode &status) if (U_FAILURE(status)) { return; } - if ((size_t)length < sizeof(SpoofDataHeader)) { + if (static_cast<size_t>(length) < sizeof(SpoofDataHeader)) { status = U_INVALID_FORMAT_ERROR; return; } @@ -688,13 +688,13 @@ void SpoofData::initPtrs(UErrorCode &status) { return; } if (fRawData->fCFUKeys != 0) { - fCFUKeys = (int32_t *)((char *)fRawData + fRawData->fCFUKeys); + fCFUKeys = reinterpret_cast<int32_t*>(reinterpret_cast<char*>(fRawData) + fRawData->fCFUKeys); } if (fRawData->fCFUStringIndex != 0) { - fCFUValues = (uint16_t *)((char *)fRawData + fRawData->fCFUStringIndex); + fCFUValues = reinterpret_cast<uint16_t*>(reinterpret_cast<char*>(fRawData) + fRawData->fCFUStringIndex); } if (fRawData->fCFUStringTable != 0) { - fCFUStrings = (char16_t *)((char *)fRawData + fRawData->fCFUStringTable); + fCFUStrings = reinterpret_cast<char16_t*>(reinterpret_cast<char*>(fRawData) + fRawData->fCFUStringTable); } } @@ -739,7 +739,7 @@ void *SpoofData::reserveSpace(int32_t numBytes, UErrorCode &status) { fRawData->fLength = fMemLimit; uprv_memset((char *)fRawData + returnOffset, 0, numBytes); initPtrs(status); - return (char *)fRawData + returnOffset; + return reinterpret_cast<char*>(fRawData) + returnOffset; } int32_t SpoofData::serialize(void *buf, int32_t capacity, UErrorCode &status) const { @@ -806,7 +806,7 @@ int32_t SpoofData::appendValueTo(int32_t index, UnicodeString& dest) const { // an index into the string table (for longer strings) uint16_t value = fCFUValues[index]; if (stringLength == 1) { - dest.append((char16_t)value); + dest.append(static_cast<char16_t>(value)); } else { dest.append(fCFUStrings + value, stringLength); } diff --git a/deps/icu-small/source/i18n/utf16collationiterator.cpp b/deps/icu-small/source/i18n/utf16collationiterator.cpp index e04721f7d7d4c8..64c454b5d36807 100644 --- a/deps/icu-small/source/i18n/utf16collationiterator.cpp +++ b/deps/icu-small/source/i18n/utf16collationiterator.cpp @@ -53,7 +53,7 @@ UTF16CollationIterator::resetToOffset(int32_t newOffset) { int32_t UTF16CollationIterator::getOffset() const { - return (int32_t)(pos - start); + return static_cast<int32_t>(pos - start); } uint32_t @@ -198,11 +198,11 @@ FCDUTF16CollationIterator::resetToOffset(int32_t newOffset) { int32_t FCDUTF16CollationIterator::getOffset() const { if(checkDir != 0 || start == segmentStart) { - return (int32_t)(pos - rawStart); + return static_cast<int32_t>(pos - rawStart); } else if(pos == start) { - return (int32_t)(segmentStart - rawStart); + return static_cast<int32_t>(segmentStart - rawStart); } else { - return (int32_t)(segmentLimit - rawStart); + return static_cast<int32_t>(segmentLimit - rawStart); } } @@ -381,7 +381,7 @@ FCDUTF16CollationIterator::nextSegment(UErrorCode &errorCode) { // Fetch the next character's fcd16 value. const char16_t *q = p; uint16_t fcd16 = nfcImpl.nextFCD16(p, rawLimit); - uint8_t leadCC = (uint8_t)(fcd16 >> 8); + uint8_t leadCC = static_cast<uint8_t>(fcd16 >> 8); if(leadCC == 0 && q != pos) { // FCD boundary before the [q, p[ character. limit = segmentLimit = q; @@ -396,7 +396,7 @@ FCDUTF16CollationIterator::nextSegment(UErrorCode &errorCode) { pos = start; break; } - prevCC = (uint8_t)fcd16; + prevCC = static_cast<uint8_t>(fcd16); if(p == rawLimit || prevCC == 0) { // FCD boundary after the last character. limit = segmentLimit = p; @@ -445,7 +445,7 @@ FCDUTF16CollationIterator::previousSegment(UErrorCode &errorCode) { // Fetch the previous character's fcd16 value. const char16_t *q = p; uint16_t fcd16 = nfcImpl.previousFCD16(rawStart, p); - uint8_t trailCC = (uint8_t)fcd16; + uint8_t trailCC = static_cast<uint8_t>(fcd16); if(trailCC == 0 && q != pos) { // FCD boundary after the [p, q[ character. start = segmentStart = q; @@ -462,7 +462,7 @@ FCDUTF16CollationIterator::previousSegment(UErrorCode &errorCode) { pos = limit; break; } - nextCC = (uint8_t)(fcd16 >> 8); + nextCC = static_cast<uint8_t>(fcd16 >> 8); if(p == rawStart || nextCC == 0) { // FCD boundary before the following character. start = segmentStart = p; @@ -478,7 +478,7 @@ UBool FCDUTF16CollationIterator::normalize(const char16_t *from, const char16_t *to, UErrorCode &errorCode) { // NFD without argument checking. U_ASSERT(U_SUCCESS(errorCode)); - nfcImpl.decompose(from, to, normalized, (int32_t)(to - from), errorCode); + nfcImpl.decompose(from, to, normalized, static_cast<int32_t>(to - from), errorCode); if(U_FAILURE(errorCode)) { return false; } // Switch collation processing into the FCD buffer // with the result of normalizing [segmentStart, segmentLimit[. diff --git a/deps/icu-small/source/i18n/utf8collationiterator.cpp b/deps/icu-small/source/i18n/utf8collationiterator.cpp index ea7278afc6ca66..470a757accd858 100644 --- a/deps/icu-small/source/i18n/utf8collationiterator.cpp +++ b/deps/icu-small/source/i18n/utf8collationiterator.cpp @@ -396,7 +396,7 @@ FCDUTF8CollationIterator::nextSegment(UErrorCode &errorCode) { UChar32 c; U8_NEXT_OR_FFFD(u8, pos, length, c); uint16_t fcd16 = nfcImpl.getFCD16(c); - uint8_t leadCC = (uint8_t)(fcd16 >> 8); + uint8_t leadCC = static_cast<uint8_t>(fcd16 >> 8); if(leadCC == 0 && cpStart != segmentStart) { // FCD boundary before this character. pos = cpStart; @@ -421,7 +421,7 @@ FCDUTF8CollationIterator::nextSegment(UErrorCode &errorCode) { pos = 0; return true; } - prevCC = (uint8_t)fcd16; + prevCC = static_cast<uint8_t>(fcd16); if(pos == length || prevCC == 0) { // FCD boundary after the last character. break; @@ -475,7 +475,7 @@ FCDUTF8CollationIterator::previousSegment(UErrorCode &errorCode) { UChar32 c; U8_PREV_OR_FFFD(u8, 0, pos, c); uint16_t fcd16 = nfcImpl.getFCD16(c); - uint8_t trailCC = (uint8_t)fcd16; + uint8_t trailCC = static_cast<uint8_t>(fcd16); if(trailCC == 0 && cpLimit != segmentLimit) { // FCD boundary after this character. pos = cpLimit; @@ -503,7 +503,7 @@ FCDUTF8CollationIterator::previousSegment(UErrorCode &errorCode) { pos = normalized.length(); return true; } - nextCC = (uint8_t)(fcd16 >> 8); + nextCC = static_cast<uint8_t>(fcd16 >> 8); if(pos == 0 || nextCC == 0) { // FCD boundary before the following character. break; diff --git a/deps/icu-small/source/i18n/vtzone.cpp b/deps/icu-small/source/i18n/vtzone.cpp index 31ad09c721f371..6067c5490e8d46 100644 --- a/deps/icu-small/source/i18n/vtzone.cpp +++ b/deps/icu-small/source/i18n/vtzone.cpp @@ -139,7 +139,7 @@ static UnicodeString& appendAsciiDigits(int32_t number, uint8_t length, UnicodeS str.append(MINUS); } for (i = length - 1; i >= 0; i--) { - str.append((char16_t)(digits[i] + 0x0030)); + str.append(static_cast<char16_t>(digits[i] + 0x0030)); } return str; } @@ -151,11 +151,11 @@ static UnicodeString& appendMillis(UDate date, UnicodeString& str) { int64_t number; if (date < MIN_MILLIS) { - number = (int64_t)MIN_MILLIS; + number = static_cast<int64_t>(MIN_MILLIS); } else if (date > MAX_MILLIS) { - number = (int64_t)MAX_MILLIS; + number = static_cast<int64_t>(MAX_MILLIS); } else { - number = (int64_t)date; + number = static_cast<int64_t>(date); } if (number < 0) { negative = true; @@ -163,7 +163,7 @@ static UnicodeString& appendMillis(UDate date, UnicodeString& str) { } i = 0; do { - digits[i++] = (int32_t)(number % 10); + digits[i++] = static_cast<int32_t>(number % 10); number /= 10; } while (number != 0); @@ -172,7 +172,7 @@ static UnicodeString& appendMillis(UDate date, UnicodeString& str) { } i--; while (i >= 0) { - str.append((char16_t)(digits[i--] + 0x0030)); + str.append(static_cast<char16_t>(digits[i--] + 0x0030)); } return str; } @@ -180,15 +180,17 @@ static UnicodeString& appendMillis(UDate date, UnicodeString& str) { /* * Convert date/time to RFC2445 Date-Time form #1 DATE WITH LOCAL TIME */ -static UnicodeString& getDateTimeString(UDate time, UnicodeString& str) { +static UnicodeString& getDateTimeString(UDate time, UnicodeString& str, UErrorCode& status) { + if (U_FAILURE(status)) {return str;} int32_t year, month, dom, dow, doy, mid; - Grego::timeToFields(time, year, month, dom, dow, doy, mid); + Grego::timeToFields(time, year, month, dom, dow, doy, mid, status); + if (U_FAILURE(status)) {return str;} str.remove(); appendAsciiDigits(year, 4, str); appendAsciiDigits(month + 1, 2, str); appendAsciiDigits(dom, 2, str); - str.append((char16_t)0x0054 /*'T'*/); + str.append(static_cast<char16_t>(0x0054) /*'T'*/); int32_t t = mid; int32_t hour = t / U_MILLIS_PER_HOUR; @@ -206,9 +208,9 @@ static UnicodeString& getDateTimeString(UDate time, UnicodeString& str) { /* * Convert date/time to RFC2445 Date-Time form #2 DATE WITH UTC TIME */ -static UnicodeString& getUTCDateTimeString(UDate time, UnicodeString& str) { - getDateTimeString(time, str); - str.append((char16_t)0x005A /*'Z'*/); +static UnicodeString& getUTCDateTimeString(UDate time, UnicodeString& str, UErrorCode& status) { + getDateTimeString(time, str, status); + str.append(static_cast<char16_t>(0x005A) /*'Z'*/); return str; } @@ -529,7 +531,7 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff DateTimeRule *adtr = nullptr; // Parse the first rule - UnicodeString rrule = *((UnicodeString*)dates->elementAt(0)); + UnicodeString rrule = *static_cast<UnicodeString*>(dates->elementAt(0)); int32_t month, dayOfWeek, nthDayOfWeek, dayOfMonth = 0; int32_t days[7]; int32_t daysCount = UPRV_LENGTHOF(days); @@ -605,7 +607,7 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff int32_t anotherMonth = -1; for (i = 1; i < dates->size(); i++) { - rrule = *((UnicodeString*)dates->elementAt(i)); + rrule = *static_cast<UnicodeString*>(dates->elementAt(i)); UDate tmp_until; int32_t tmp_month, tmp_dayOfWeek, tmp_nthDayOfWeek; int32_t tmp_days[7]; @@ -675,7 +677,10 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff // Calculate start/end year and missing fields int32_t startYear, startMonth, startDOM, startDOW, startDOY, startMID; Grego::timeToFields(start + fromOffset, startYear, startMonth, startDOM, - startDOW, startDOY, startMID); + startDOW, startDOY, startMID, status); + if (U_FAILURE(status)) { + return nullptr; + } if (month == -1) { // If BYMONTH is not set, use the month of DTSTART month = startMonth; @@ -688,7 +693,8 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff int32_t endYear; if (until != MIN_MILLIS) { int32_t endMonth, endDOM, endDOW, endDOY, endMID; - Grego::timeToFields(until, endYear, endMonth, endDOM, endDOW, endDOY, endMID); + Grego::timeToFields(until, endYear, endMonth, endDOM, endDOW, endDOY, endMID, status); + if (U_FAILURE(status)) return nullptr; } else { endYear = AnnualTimeZoneRule::MAX_YEAR; } @@ -731,13 +737,13 @@ static TimeZoneRule* createRuleByRDATE(const UnicodeString& zonename, int32_t ra } else { // Create an array of transition times int32_t size = dates->size(); - UDate* times = (UDate*)uprv_malloc(sizeof(UDate) * size); + UDate* times = static_cast<UDate*>(uprv_malloc(sizeof(UDate) * size)); if (times == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } for (int32_t i = 0; i < size; i++) { - UnicodeString *datestr = (UnicodeString*)dates->elementAt(i); + UnicodeString* datestr = static_cast<UnicodeString*>(dates->elementAt(i)); times[i] = parseDateTimeString(*datestr, fromOffset, status); if (U_FAILURE(status)) { uprv_free(times); @@ -974,7 +980,7 @@ VTimeZone::VTimeZone(const VTimeZone& source) return; } for (int32_t i = 0; i < size; i++) { - UnicodeString *line = ((UnicodeString*)source.vtzlines->elementAt(i))->clone(); + UnicodeString* line = static_cast<UnicodeString*>(source.vtzlines->elementAt(i))->clone(); lpVtzLines->adoptElement(line, status); if (U_FAILURE(status) || line == nullptr) { return; @@ -1015,7 +1021,7 @@ VTimeZone::operator=(const VTimeZone& right) { if (U_SUCCESS(status)) { for (int32_t i = 0; i < size; i++) { LocalPointer<UnicodeString> line( - ((UnicodeString*)right.vtzlines->elementAt(i))->clone(), status); + static_cast<UnicodeString*>(right.vtzlines->elementAt(i))->clone(), status); lpVtzLines->adoptElement(line.orphan(), status); if (U_FAILURE(status)) { break; @@ -1395,7 +1401,7 @@ VTimeZone::parse(UErrorCode& status) { } for (n = 0; n < vtzlines->size(); n++) { - UnicodeString *line = (UnicodeString*)vtzlines->elementAt(n); + UnicodeString* line = static_cast<UnicodeString*>(vtzlines->elementAt(n)); int32_t valueSep = line->indexOf(COLON); if (valueSep < 0) { continue; @@ -1606,7 +1612,7 @@ VTimeZone::parse(UErrorCode& status) { } for (n = 0; n < rules.size(); n++) { - TimeZoneRule *r = (TimeZoneRule*)rules.elementAt(n); + TimeZoneRule* r = static_cast<TimeZoneRule*>(rules.elementAt(n)); AnnualTimeZoneRule *atzrule = dynamic_cast<AnnualTimeZoneRule *>(r); if (atzrule != nullptr) { if (atzrule->getEndYear() == AnnualTimeZoneRule::MAX_YEAR) { @@ -1629,7 +1635,7 @@ VTimeZone::parse(UErrorCode& status) { rules.removeAllElements(); } else { // Normalize the final rule - AnnualTimeZoneRule *finalRule = (AnnualTimeZoneRule*)rules.elementAt(finalRuleIdx); + AnnualTimeZoneRule* finalRule = static_cast<AnnualTimeZoneRule*>(rules.elementAt(finalRuleIdx)); int32_t tmpRaw = finalRule->getRawOffset(); int32_t tmpDST = finalRule->getDSTSavings(); @@ -1641,7 +1647,7 @@ VTimeZone::parse(UErrorCode& status) { if (finalRuleIdx == n) { continue; } - TimeZoneRule *r = (TimeZoneRule*)rules.elementAt(n); + TimeZoneRule* r = static_cast<TimeZoneRule*>(rules.elementAt(n)); UDate lastStart; r->getFinalStart(tmpRaw, tmpDST, lastStart); if (lastStart > start) { @@ -1669,7 +1675,8 @@ VTimeZone::parse(UErrorCode& status) { } else { // Update the end year int32_t y, m, d, dow, doy, mid; - Grego::timeToFields(start, y, m, d, dow, doy, mid); + Grego::timeToFields(start, y, m, d, dow, doy, mid, status); + if (U_FAILURE(status)) return; newRule.adoptInsteadAndCheckErrorCode( new AnnualTimeZoneRule( finalRule->getName(tznam), @@ -1692,7 +1699,7 @@ VTimeZone::parse(UErrorCode& status) { } while (!rules.isEmpty()) { - TimeZoneRule *tzr = (TimeZoneRule*)rules.orphanElementAt(0); + TimeZoneRule* tzr = static_cast<TimeZoneRule*>(rules.orphanElementAt(0)); rbtz->addTransitionRule(tzr, status); if (U_FAILURE(status)) { return; @@ -1709,9 +1716,10 @@ VTimeZone::parse(UErrorCode& status) { void VTimeZone::write(VTZWriter& writer, UErrorCode& status) const { + if (U_FAILURE(status)) return; if (vtzlines != nullptr) { for (int32_t i = 0; i < vtzlines->size(); i++) { - UnicodeString *line = (UnicodeString*)vtzlines->elementAt(i); + UnicodeString* line = static_cast<UnicodeString*>(vtzlines->elementAt(i)); if (line->startsWith(ICAL_TZURL, -1) && line->charAt(u_strlen(ICAL_TZURL)) == COLON) { writer.write(ICAL_TZURL); @@ -1723,7 +1731,8 @@ VTimeZone::write(VTZWriter& writer, UErrorCode& status) const { UnicodeString utcString; writer.write(ICAL_LASTMOD); writer.write(COLON); - writer.write(getUTCDateTimeString(lastmod, utcString)); + writer.write(getUTCDateTimeString(lastmod, utcString, status)); + if (U_FAILURE(status)) return; writer.write(ICAL_NEWLINE); } else { writer.write(*line); @@ -1768,7 +1777,7 @@ VTimeZone::write(UDate start, VTZWriter& writer, UErrorCode& status) const { if (lpTransitionRules.isValid()) { U_ASSERT(transitionRules->hasDeleter()); // Assumed for U_FAILURE early return, below. while (!lpTransitionRules->isEmpty()) { - TimeZoneRule *tr = (TimeZoneRule*)lpTransitionRules->orphanElementAt(0); + TimeZoneRule* tr = static_cast<TimeZoneRule*>(lpTransitionRules->orphanElementAt(0)); rbtz.addTransitionRule(tr, status); if (U_FAILURE(status)) { return; @@ -1787,11 +1796,11 @@ VTimeZone::write(UDate start, VTZWriter& writer, UErrorCode& status) const { return; } icutzprop->append(olsonzid); - icutzprop->append((char16_t)0x005B/*'['*/); + icutzprop->append(static_cast<char16_t>(0x005B)/*'['*/); icutzprop->append(icutzver); icutzprop->append(ICU_TZINFO_PARTIAL, -1); appendMillis(start, *icutzprop); - icutzprop->append((char16_t)0x005D/*']'*/); + icutzprop->append(static_cast<char16_t>(0x005D)/*']'*/); customProps.adoptElement(icutzprop, status); if (U_FAILURE(status)) { return; @@ -1834,11 +1843,11 @@ VTimeZone::writeSimple(UDate time, VTZWriter& writer, UErrorCode& status) const return; } icutzprop->append(olsonzid); - icutzprop->append((char16_t)0x005B/*'['*/); + icutzprop->append(static_cast<char16_t>(0x005B)/*'['*/); icutzprop->append(icutzver); icutzprop->append(ICU_TZINFO_SIMPLE, -1); appendMillis(time, *icutzprop); - icutzprop->append((char16_t)0x005D/*']'*/); + icutzprop->append(static_cast<char16_t>(0x005D)/*']'*/); customProps.adoptElement(icutzprop.orphan(), status); } writeZone(writer, rbtz, &customProps, status); @@ -1858,7 +1867,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz, if (customProps != nullptr) { for (int32_t i = 0; i < customProps->size(); i++) { - UnicodeString *custprop = (UnicodeString*)customProps->elementAt(i); + UnicodeString* custprop = static_cast<UnicodeString*>(customProps->elementAt(i)); w.write(*custprop); w.write(ICAL_NEWLINE); } @@ -1913,7 +1922,8 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz, int32_t fromOffset = tzt.getFrom()->getRawOffset() + tzt.getFrom()->getDSTSavings(); int32_t fromDSTSavings = tzt.getFrom()->getDSTSavings(); int32_t toOffset = tzt.getTo()->getRawOffset() + tzt.getTo()->getDSTSavings(); - Grego::timeToFields(tzt.getTime() + fromOffset, year, month, dom, dow, doy, mid); + Grego::timeToFields(tzt.getTime() + fromOffset, year, month, dom, dow, doy, mid, status); + if (U_FAILURE(status)) return; int32_t weekInMonth = Grego::dayOfWeekInMonth(year, month, dom); UBool sameRule = false; const AnnualTimeZoneRule *atzrule; @@ -2158,7 +2168,7 @@ VTimeZone::writeHeaders(VTZWriter& writer, UErrorCode& status) const { UnicodeString lastmodStr; writer.write(ICAL_LASTMOD); writer.write(COLON); - writer.write(getUTCDateTimeString(lastmod, lastmodStr)); + writer.write(getUTCDateTimeString(lastmod, lastmodStr, status)); writer.write(ICAL_NEWLINE); } } @@ -2195,8 +2205,11 @@ VTimeZone::writeZonePropsByTime(VTZWriter& writer, UBool isDst, const UnicodeStr writer.write(ICAL_RDATE); writer.write(COLON); UnicodeString timestr; - writer.write(getDateTimeString(time + fromOffset, timestr)); + writer.write(getDateTimeString(time + fromOffset, timestr, status)); writer.write(ICAL_NEWLINE); + if (U_FAILURE(status)) { + return; + } } endZoneProps(writer, isDst, status); if (U_FAILURE(status)) { @@ -2229,7 +2242,7 @@ VTimeZone::writeZonePropsByDOM(VTZWriter& writer, UBool isDst, const UnicodeStri appendAsciiDigits(dayOfMonth, 0, dstr); writer.write(dstr); if (untilTime != MAX_MILLIS) { - appendUNTIL(writer, getDateTimeString(untilTime + fromOffset, dstr), status); + appendUNTIL(writer, getDateTimeString(untilTime + fromOffset, dstr, status), status); if (U_FAILURE(status)) { return; } @@ -2265,7 +2278,7 @@ VTimeZone::writeZonePropsByDOW(VTZWriter& writer, UBool isDst, const UnicodeStri writer.write(ICAL_DOW_NAMES[dayOfWeek - 1]); // SU, MO, TU... if (untilTime != MAX_MILLIS) { - appendUNTIL(writer, getDateTimeString(untilTime + fromOffset, dstr), status); + appendUNTIL(writer, getDateTimeString(untilTime + fromOffset, dstr, status), status); if (U_FAILURE(status)) { return; } @@ -2390,7 +2403,7 @@ VTimeZone::writeZonePropsByDOW_GEQ_DOM_sub(VTZWriter& writer, int32_t month, int } if (untilTime != MAX_MILLIS) { - appendUNTIL(writer, getDateTimeString(untilTime + fromOffset, dstr), status); + appendUNTIL(writer, getDateTimeString(untilTime + fromOffset, dstr, status), status); if (U_FAILURE(status)) { return; } @@ -2529,7 +2542,10 @@ VTimeZone::beginZoneProps(VTZWriter& writer, UBool isDst, const UnicodeString& z // DTSTART writer.write(ICAL_DTSTART); writer.write(COLON); - writer.write(getDateTimeString(startTime + fromOffset, dstr)); + writer.write(getDateTimeString(startTime + fromOffset, dstr, status)); + if (U_FAILURE(status)) { + return; + } writer.write(ICAL_NEWLINE); } diff --git a/deps/icu-small/source/i18n/zonemeta.cpp b/deps/icu-small/source/i18n/zonemeta.cpp index 78d2391479f2ef..6257d4a2b9ca8e 100644 --- a/deps/icu-small/source/i18n/zonemeta.cpp +++ b/deps/icu-small/source/i18n/zonemeta.cpp @@ -258,7 +258,7 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) { // Check if it was already cached umtx_lock(&gZoneMetaLock); { - canonicalID = (const char16_t *)uhash_get(gCanonicalIDCache, utzid); + canonicalID = static_cast<const char16_t*>(uhash_get(gCanonicalIDCache, utzid)); } umtx_unlock(&gZoneMetaLock); @@ -309,7 +309,7 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) { } else { int32_t len = u_strlen(derefer); u_UCharsToChars(derefer,id,len); - id[len] = (char) 0; // Make sure it is null terminated. + id[len] = static_cast<char>(0); // Make sure it is null terminated. // replace '/' with ':' char *q = id; @@ -343,20 +343,20 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) { // Put the resolved canonical ID to the cache umtx_lock(&gZoneMetaLock); { - const char16_t* idInCache = (const char16_t *)uhash_get(gCanonicalIDCache, utzid); + const char16_t* idInCache = static_cast<const char16_t*>(uhash_get(gCanonicalIDCache, utzid)); if (idInCache == nullptr) { const char16_t* key = ZoneMeta::findTimeZoneID(tzid); U_ASSERT(key != nullptr); if (key != nullptr) { - idInCache = (const char16_t *)uhash_put(gCanonicalIDCache, (void *)key, (void *)canonicalID, &status); + idInCache = static_cast<const char16_t*>(uhash_put(gCanonicalIDCache, const_cast<char16_t*>(key), const_cast<char16_t*>(canonicalID), &status)); U_ASSERT(idInCache == nullptr); } } if (U_SUCCESS(status) && isInputCanonical) { // Also put canonical ID itself into the cache if not exist - const char16_t *canonicalInCache = (const char16_t*)uhash_get(gCanonicalIDCache, canonicalID); + const char16_t* canonicalInCache = static_cast<const char16_t*>(uhash_get(gCanonicalIDCache, canonicalID)); if (canonicalInCache == nullptr) { - canonicalInCache = (const char16_t *)uhash_put(gCanonicalIDCache, (void *)canonicalID, (void *)canonicalID, &status); + canonicalInCache = static_cast<const char16_t*>(uhash_put(gCanonicalIDCache, const_cast<char16_t*>(canonicalID), const_cast<char16_t*>(canonicalID), &status)); U_ASSERT(canonicalInCache == nullptr); } } @@ -550,7 +550,7 @@ ZoneMeta::getMetazoneID(const UnicodeString &tzid, UDate date, UnicodeString &re const UVector *mappings = getMetazoneMappings(tzid); if (mappings != nullptr) { for (int32_t i = 0; i < mappings->size(); i++) { - OlsonToMetaMappingEntry *mzm = (OlsonToMetaMappingEntry*)mappings->elementAt(i); + OlsonToMetaMappingEntry* mzm = static_cast<OlsonToMetaMappingEntry*>(mappings->elementAt(i)); if (mzm->from <= date && mzm->to > date) { result.setTo(mzm->mzid, -1); isSet = true; @@ -596,7 +596,7 @@ ZoneMeta::getMetazoneMappings(const UnicodeString &tzid) { umtx_lock(&gZoneMetaLock); { - result = (UVector*) uhash_get(gOlsonToMeta, tzidUChars); + result = static_cast<UVector*>(uhash_get(gOlsonToMeta, tzidUChars)); } umtx_unlock(&gZoneMetaLock); @@ -615,11 +615,11 @@ ZoneMeta::getMetazoneMappings(const UnicodeString &tzid) { umtx_lock(&gZoneMetaLock); { // make sure it's already created - result = (UVector*) uhash_get(gOlsonToMeta, tzidUChars); + result = static_cast<UVector*>(uhash_get(gOlsonToMeta, tzidUChars)); if (result == nullptr) { // add the one just created int32_t tzidLen = tzid.length() + 1; - char16_t *key = (char16_t*)uprv_malloc(tzidLen * sizeof(char16_t)); + char16_t* key = static_cast<char16_t*>(uprv_malloc(tzidLen * sizeof(char16_t))); if (key == nullptr) { // memory allocation error.. just return nullptr result = nullptr; @@ -806,7 +806,7 @@ static void U_CALLCONV initAvailableMetaZoneIDs () { } const char *mzID = ures_getKey(res.getAlias()); int32_t len = static_cast<int32_t>(uprv_strlen(mzID)); - LocalMemory<char16_t> uMzID((char16_t*)uprv_malloc(sizeof(char16_t) * (len + 1))); + LocalMemory<char16_t> uMzID(static_cast<char16_t*>(uprv_malloc(sizeof(char16_t) * (len + 1)))); if (uMzID.isNull()) { status = U_MEMORY_ALLOCATION_ERROR; break; @@ -847,7 +847,7 @@ ZoneMeta::findMetaZoneID(const UnicodeString& mzid) { if (gMetaZoneIDTable == nullptr) { return nullptr; } - return (const char16_t*)uhash_get(gMetaZoneIDTable, &mzid); + return static_cast<const char16_t*>(uhash_get(gMetaZoneIDTable, &mzid)); } const char16_t* @@ -883,20 +883,20 @@ ZoneMeta::formatCustomID(uint8_t hour, uint8_t min, uint8_t sec, UBool negative, id.setTo(gCustomTzPrefix, -1); if (hour != 0 || min != 0) { if (negative) { - id.append((char16_t)0x2D); // '-' + id.append(static_cast<char16_t>(0x2D)); // '-' } else { - id.append((char16_t)0x2B); // '+' + id.append(static_cast<char16_t>(0x2B)); // '+' } // Always use US-ASCII digits - id.append((char16_t)(0x30 + (hour%100)/10)); - id.append((char16_t)(0x30 + (hour%10))); - id.append((char16_t)0x3A); // ':' - id.append((char16_t)(0x30 + (min%100)/10)); - id.append((char16_t)(0x30 + (min%10))); + id.append(static_cast<char16_t>(0x30 + (hour % 100) / 10)); + id.append(static_cast<char16_t>(0x30 + (hour % 10))); + id.append(static_cast<char16_t>(0x3A)); // ':' + id.append(static_cast<char16_t>(0x30 + (min % 100) / 10)); + id.append(static_cast<char16_t>(0x30 + (min % 10))); if (sec != 0) { - id.append((char16_t)0x3A); // ':' - id.append((char16_t)(0x30 + (sec%100)/10)); - id.append((char16_t)(0x30 + (sec%10))); + id.append(static_cast<char16_t>(0x3A)); // ':' + id.append(static_cast<char16_t>(0x30 + (sec % 100) / 10)); + id.append(static_cast<char16_t>(0x30 + (sec % 10))); } } return id; @@ -933,7 +933,7 @@ ZoneMeta::getShortIDFromCanonical(const char16_t* canonicalID) { char tzidKey[ZID_KEY_MAX + 1]; u_UCharsToChars(canonicalID, tzidKey, len); - tzidKey[len] = (char) 0; // Make sure it is null terminated. + tzidKey[len] = static_cast<char>(0); // Make sure it is null terminated. // replace '/' with ':' char *p = tzidKey; diff --git a/deps/icu-small/source/tools/escapesrc/cptbl.h b/deps/icu-small/source/tools/escapesrc/cptbl.h index 898e16c925d2f0..6c82ff1b51ab51 100644 --- a/deps/icu-small/source/tools/escapesrc/cptbl.h +++ b/deps/icu-small/source/tools/escapesrc/cptbl.h @@ -1,263 +1,263 @@ // Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html // generated by tblgen. You weren't going to edit it by hand, were you? -static const char cp1047_8859_1[256] = { - (char)0x00, /* 00 */ - (char)0x01, /* 01 */ - (char)0x02, /* 02 */ - (char)0x03, /* 03 */ - (char)0x9C, /* 04 */ - (char)0x09, /* 05 */ - (char)0x86, /* 06 */ - (char)0x7F, /* 07 */ - (char)0x97, /* 08 */ - (char)0x8D, /* 09 */ - (char)0x8E, /* 0A */ - (char)0x0B, /* 0B */ - (char)0x0C, /* 0C */ - (char)0x0D, /* 0D */ - (char)0x0E, /* 0E */ - (char)0x0F, /* 0F */ - (char)0x10, /* 10 */ - (char)0x11, /* 11 */ - (char)0x12, /* 12 */ - (char)0x13, /* 13 */ - (char)0x9D, /* 14 */ - (char)0x85, /* 15 */ - (char)0x08, /* 16 */ - (char)0x87, /* 17 */ - (char)0x18, /* 18 */ - (char)0x19, /* 19 */ - (char)0x92, /* 1A */ - (char)0x8F, /* 1B */ - (char)0x1C, /* 1C */ - (char)0x1D, /* 1D */ - (char)0x1E, /* 1E */ - (char)0x1F, /* 1F */ - (char)0x80, /* 20 */ - (char)0x81, /* 21 */ - (char)0x82, /* 22 */ - (char)0x83, /* 23 */ - (char)0x84, /* 24 */ - (char)0x0A, /* 25 */ - (char)0x17, /* 26 */ - (char)0x1B, /* 27 */ - (char)0x88, /* 28 */ - (char)0x89, /* 29 */ - (char)0x8A, /* 2A */ - (char)0x8B, /* 2B */ - (char)0x8C, /* 2C */ - (char)0x05, /* 2D */ - (char)0x06, /* 2E */ - (char)0x07, /* 2F */ - (char)0x90, /* 30 */ - (char)0x91, /* 31 */ - (char)0x16, /* 32 */ - (char)0x93, /* 33 */ - (char)0x94, /* 34 */ - (char)0x95, /* 35 */ - (char)0x96, /* 36 */ - (char)0x04, /* 37 */ - (char)0x98, /* 38 */ - (char)0x99, /* 39 */ - (char)0x9A, /* 3A */ - (char)0x9B, /* 3B */ - (char)0x14, /* 3C */ - (char)0x15, /* 3D */ - (char)0x9E, /* 3E */ - (char)0x1A, /* 3F */ - (char)0x20, /* 40 */ - (char)0xA0, /* 41 */ - (char)0xE2, /* 42 */ - (char)0xE4, /* 43 */ - (char)0xE0, /* 44 */ - (char)0xE1, /* 45 */ - (char)0xE3, /* 46 */ - (char)0xE5, /* 47 */ - (char)0xE7, /* 48 */ - (char)0xF1, /* 49 */ - (char)0xA2, /* 4A */ - (char)0x2E, /* 4B */ - (char)0x3C, /* 4C */ - (char)0x28, /* 4D */ - (char)0x2B, /* 4E */ - (char)0x7C, /* 4F */ - (char)0x26, /* 50 */ - (char)0xE9, /* 51 */ - (char)0xEA, /* 52 */ - (char)0xEB, /* 53 */ - (char)0xE8, /* 54 */ - (char)0xED, /* 55 */ - (char)0xEE, /* 56 */ - (char)0xEF, /* 57 */ - (char)0xEC, /* 58 */ - (char)0xDF, /* 59 */ - (char)0x21, /* 5A */ - (char)0x24, /* 5B */ - (char)0x2A, /* 5C */ - (char)0x29, /* 5D */ - (char)0x3B, /* 5E */ - (char)0x5E, /* 5F */ - (char)0x2D, /* 60 */ - (char)0x2F, /* 61 */ - (char)0xC2, /* 62 */ - (char)0xC4, /* 63 */ - (char)0xC0, /* 64 */ - (char)0xC1, /* 65 */ - (char)0xC3, /* 66 */ - (char)0xC5, /* 67 */ - (char)0xC7, /* 68 */ - (char)0xD1, /* 69 */ - (char)0xA6, /* 6A */ - (char)0x2C, /* 6B */ - (char)0x25, /* 6C */ - (char)0x5F, /* 6D */ - (char)0x3E, /* 6E */ - (char)0x3F, /* 6F */ - (char)0xF8, /* 70 */ - (char)0xC9, /* 71 */ - (char)0xCA, /* 72 */ - (char)0xCB, /* 73 */ - (char)0xC8, /* 74 */ - (char)0xCD, /* 75 */ - (char)0xCE, /* 76 */ - (char)0xCF, /* 77 */ - (char)0xCC, /* 78 */ - (char)0x60, /* 79 */ - (char)0x3A, /* 7A */ - (char)0x23, /* 7B */ - (char)0x40, /* 7C */ - (char)0x27, /* 7D */ - (char)0x3D, /* 7E */ - (char)0x22, /* 7F */ - (char)0xD8, /* 80 */ - (char)0x61, /* 81 */ - (char)0x62, /* 82 */ - (char)0x63, /* 83 */ - (char)0x64, /* 84 */ - (char)0x65, /* 85 */ - (char)0x66, /* 86 */ - (char)0x67, /* 87 */ - (char)0x68, /* 88 */ - (char)0x69, /* 89 */ - (char)0xAB, /* 8A */ - (char)0xBB, /* 8B */ - (char)0xF0, /* 8C */ - (char)0xFD, /* 8D */ - (char)0xFE, /* 8E */ - (char)0xB1, /* 8F */ - (char)0xB0, /* 90 */ - (char)0x6A, /* 91 */ - (char)0x6B, /* 92 */ - (char)0x6C, /* 93 */ - (char)0x6D, /* 94 */ - (char)0x6E, /* 95 */ - (char)0x6F, /* 96 */ - (char)0x70, /* 97 */ - (char)0x71, /* 98 */ - (char)0x72, /* 99 */ - (char)0xAA, /* 9A */ - (char)0xBA, /* 9B */ - (char)0xE6, /* 9C */ - (char)0xB8, /* 9D */ - (char)0xC6, /* 9E */ - (char)0xA4, /* 9F */ - (char)0xB5, /* A0 */ - (char)0x7E, /* A1 */ - (char)0x73, /* A2 */ - (char)0x74, /* A3 */ - (char)0x75, /* A4 */ - (char)0x76, /* A5 */ - (char)0x77, /* A6 */ - (char)0x78, /* A7 */ - (char)0x79, /* A8 */ - (char)0x7A, /* A9 */ - (char)0xA1, /* AA */ - (char)0xBF, /* AB */ - (char)0xD0, /* AC */ - (char)0x5B, /* AD */ - (char)0xDE, /* AE */ - (char)0xAE, /* AF */ - (char)0xAC, /* B0 */ - (char)0xA3, /* B1 */ - (char)0xA5, /* B2 */ - (char)0xB7, /* B3 */ - (char)0xA9, /* B4 */ - (char)0xA7, /* B5 */ - (char)0xB6, /* B6 */ - (char)0xBC, /* B7 */ - (char)0xBD, /* B8 */ - (char)0xBE, /* B9 */ - (char)0xDD, /* BA */ - (char)0xA8, /* BB */ - (char)0xAF, /* BC */ - (char)0x5D, /* BD */ - (char)0xB4, /* BE */ - (char)0xD7, /* BF */ - (char)0x7B, /* C0 */ - (char)0x41, /* C1 */ - (char)0x42, /* C2 */ - (char)0x43, /* C3 */ - (char)0x44, /* C4 */ - (char)0x45, /* C5 */ - (char)0x46, /* C6 */ - (char)0x47, /* C7 */ - (char)0x48, /* C8 */ - (char)0x49, /* C9 */ - (char)0xAD, /* CA */ - (char)0xF4, /* CB */ - (char)0xF6, /* CC */ - (char)0xF2, /* CD */ - (char)0xF3, /* CE */ - (char)0xF5, /* CF */ - (char)0x7D, /* D0 */ - (char)0x4A, /* D1 */ - (char)0x4B, /* D2 */ - (char)0x4C, /* D3 */ - (char)0x4D, /* D4 */ - (char)0x4E, /* D5 */ - (char)0x4F, /* D6 */ - (char)0x50, /* D7 */ - (char)0x51, /* D8 */ - (char)0x52, /* D9 */ - (char)0xB9, /* DA */ - (char)0xFB, /* DB */ - (char)0xFC, /* DC */ - (char)0xF9, /* DD */ - (char)0xFA, /* DE */ - (char)0xFF, /* DF */ - (char)0x5C, /* E0 */ - (char)0xF7, /* E1 */ - (char)0x53, /* E2 */ - (char)0x54, /* E3 */ - (char)0x55, /* E4 */ - (char)0x56, /* E5 */ - (char)0x57, /* E6 */ - (char)0x58, /* E7 */ - (char)0x59, /* E8 */ - (char)0x5A, /* E9 */ - (char)0xB2, /* EA */ - (char)0xD4, /* EB */ - (char)0xD6, /* EC */ - (char)0xD2, /* ED */ - (char)0xD3, /* EE */ - (char)0xD5, /* EF */ - (char)0x30, /* F0 */ - (char)0x31, /* F1 */ - (char)0x32, /* F2 */ - (char)0x33, /* F3 */ - (char)0x34, /* F4 */ - (char)0x35, /* F5 */ - (char)0x36, /* F6 */ - (char)0x37, /* F7 */ - (char)0x38, /* F8 */ - (char)0x39, /* F9 */ - (char)0xB3, /* FA */ - (char)0xDB, /* FB */ - (char)0xDC, /* FC */ - (char)0xD9, /* FD */ - (char)0xDA, /* FE */ - (char)0x9F, /* FF */ +static const char cp1047_8859_1[256] = { + static_cast<char>(0x00), /* 00 */ + static_cast<char>(0x01), /* 01 */ + static_cast<char>(0x02), /* 02 */ + static_cast<char>(0x03), /* 03 */ + static_cast<char>(0x9C), /* 04 */ + static_cast<char>(0x09), /* 05 */ + static_cast<char>(0x86), /* 06 */ + static_cast<char>(0x7F), /* 07 */ + static_cast<char>(0x97), /* 08 */ + static_cast<char>(0x8D), /* 09 */ + static_cast<char>(0x8E), /* 0A */ + static_cast<char>(0x0B), /* 0B */ + static_cast<char>(0x0C), /* 0C */ + static_cast<char>(0x0D), /* 0D */ + static_cast<char>(0x0E), /* 0E */ + static_cast<char>(0x0F), /* 0F */ + static_cast<char>(0x10), /* 10 */ + static_cast<char>(0x11), /* 11 */ + static_cast<char>(0x12), /* 12 */ + static_cast<char>(0x13), /* 13 */ + static_cast<char>(0x9D), /* 14 */ + static_cast<char>(0x85), /* 15 */ + static_cast<char>(0x08), /* 16 */ + static_cast<char>(0x87), /* 17 */ + static_cast<char>(0x18), /* 18 */ + static_cast<char>(0x19), /* 19 */ + static_cast<char>(0x92), /* 1A */ + static_cast<char>(0x8F), /* 1B */ + static_cast<char>(0x1C), /* 1C */ + static_cast<char>(0x1D), /* 1D */ + static_cast<char>(0x1E), /* 1E */ + static_cast<char>(0x1F), /* 1F */ + static_cast<char>(0x80), /* 20 */ + static_cast<char>(0x81), /* 21 */ + static_cast<char>(0x82), /* 22 */ + static_cast<char>(0x83), /* 23 */ + static_cast<char>(0x84), /* 24 */ + static_cast<char>(0x0A), /* 25 */ + static_cast<char>(0x17), /* 26 */ + static_cast<char>(0x1B), /* 27 */ + static_cast<char>(0x88), /* 28 */ + static_cast<char>(0x89), /* 29 */ + static_cast<char>(0x8A), /* 2A */ + static_cast<char>(0x8B), /* 2B */ + static_cast<char>(0x8C), /* 2C */ + static_cast<char>(0x05), /* 2D */ + static_cast<char>(0x06), /* 2E */ + static_cast<char>(0x07), /* 2F */ + static_cast<char>(0x90), /* 30 */ + static_cast<char>(0x91), /* 31 */ + static_cast<char>(0x16), /* 32 */ + static_cast<char>(0x93), /* 33 */ + static_cast<char>(0x94), /* 34 */ + static_cast<char>(0x95), /* 35 */ + static_cast<char>(0x96), /* 36 */ + static_cast<char>(0x04), /* 37 */ + static_cast<char>(0x98), /* 38 */ + static_cast<char>(0x99), /* 39 */ + static_cast<char>(0x9A), /* 3A */ + static_cast<char>(0x9B), /* 3B */ + static_cast<char>(0x14), /* 3C */ + static_cast<char>(0x15), /* 3D */ + static_cast<char>(0x9E), /* 3E */ + static_cast<char>(0x1A), /* 3F */ + static_cast<char>(0x20), /* 40 */ + static_cast<char>(0xA0), /* 41 */ + static_cast<char>(0xE2), /* 42 */ + static_cast<char>(0xE4), /* 43 */ + static_cast<char>(0xE0), /* 44 */ + static_cast<char>(0xE1), /* 45 */ + static_cast<char>(0xE3), /* 46 */ + static_cast<char>(0xE5), /* 47 */ + static_cast<char>(0xE7), /* 48 */ + static_cast<char>(0xF1), /* 49 */ + static_cast<char>(0xA2), /* 4A */ + static_cast<char>(0x2E), /* 4B */ + static_cast<char>(0x3C), /* 4C */ + static_cast<char>(0x28), /* 4D */ + static_cast<char>(0x2B), /* 4E */ + static_cast<char>(0x7C), /* 4F */ + static_cast<char>(0x26), /* 50 */ + static_cast<char>(0xE9), /* 51 */ + static_cast<char>(0xEA), /* 52 */ + static_cast<char>(0xEB), /* 53 */ + static_cast<char>(0xE8), /* 54 */ + static_cast<char>(0xED), /* 55 */ + static_cast<char>(0xEE), /* 56 */ + static_cast<char>(0xEF), /* 57 */ + static_cast<char>(0xEC), /* 58 */ + static_cast<char>(0xDF), /* 59 */ + static_cast<char>(0x21), /* 5A */ + static_cast<char>(0x24), /* 5B */ + static_cast<char>(0x2A), /* 5C */ + static_cast<char>(0x29), /* 5D */ + static_cast<char>(0x3B), /* 5E */ + static_cast<char>(0x5E), /* 5F */ + static_cast<char>(0x2D), /* 60 */ + static_cast<char>(0x2F), /* 61 */ + static_cast<char>(0xC2), /* 62 */ + static_cast<char>(0xC4), /* 63 */ + static_cast<char>(0xC0), /* 64 */ + static_cast<char>(0xC1), /* 65 */ + static_cast<char>(0xC3), /* 66 */ + static_cast<char>(0xC5), /* 67 */ + static_cast<char>(0xC7), /* 68 */ + static_cast<char>(0xD1), /* 69 */ + static_cast<char>(0xA6), /* 6A */ + static_cast<char>(0x2C), /* 6B */ + static_cast<char>(0x25), /* 6C */ + static_cast<char>(0x5F), /* 6D */ + static_cast<char>(0x3E), /* 6E */ + static_cast<char>(0x3F), /* 6F */ + static_cast<char>(0xF8), /* 70 */ + static_cast<char>(0xC9), /* 71 */ + static_cast<char>(0xCA), /* 72 */ + static_cast<char>(0xCB), /* 73 */ + static_cast<char>(0xC8), /* 74 */ + static_cast<char>(0xCD), /* 75 */ + static_cast<char>(0xCE), /* 76 */ + static_cast<char>(0xCF), /* 77 */ + static_cast<char>(0xCC), /* 78 */ + static_cast<char>(0x60), /* 79 */ + static_cast<char>(0x3A), /* 7A */ + static_cast<char>(0x23), /* 7B */ + static_cast<char>(0x40), /* 7C */ + static_cast<char>(0x27), /* 7D */ + static_cast<char>(0x3D), /* 7E */ + static_cast<char>(0x22), /* 7F */ + static_cast<char>(0xD8), /* 80 */ + static_cast<char>(0x61), /* 81 */ + static_cast<char>(0x62), /* 82 */ + static_cast<char>(0x63), /* 83 */ + static_cast<char>(0x64), /* 84 */ + static_cast<char>(0x65), /* 85 */ + static_cast<char>(0x66), /* 86 */ + static_cast<char>(0x67), /* 87 */ + static_cast<char>(0x68), /* 88 */ + static_cast<char>(0x69), /* 89 */ + static_cast<char>(0xAB), /* 8A */ + static_cast<char>(0xBB), /* 8B */ + static_cast<char>(0xF0), /* 8C */ + static_cast<char>(0xFD), /* 8D */ + static_cast<char>(0xFE), /* 8E */ + static_cast<char>(0xB1), /* 8F */ + static_cast<char>(0xB0), /* 90 */ + static_cast<char>(0x6A), /* 91 */ + static_cast<char>(0x6B), /* 92 */ + static_cast<char>(0x6C), /* 93 */ + static_cast<char>(0x6D), /* 94 */ + static_cast<char>(0x6E), /* 95 */ + static_cast<char>(0x6F), /* 96 */ + static_cast<char>(0x70), /* 97 */ + static_cast<char>(0x71), /* 98 */ + static_cast<char>(0x72), /* 99 */ + static_cast<char>(0xAA), /* 9A */ + static_cast<char>(0xBA), /* 9B */ + static_cast<char>(0xE6), /* 9C */ + static_cast<char>(0xB8), /* 9D */ + static_cast<char>(0xC6), /* 9E */ + static_cast<char>(0xA4), /* 9F */ + static_cast<char>(0xB5), /* A0 */ + static_cast<char>(0x7E), /* A1 */ + static_cast<char>(0x73), /* A2 */ + static_cast<char>(0x74), /* A3 */ + static_cast<char>(0x75), /* A4 */ + static_cast<char>(0x76), /* A5 */ + static_cast<char>(0x77), /* A6 */ + static_cast<char>(0x78), /* A7 */ + static_cast<char>(0x79), /* A8 */ + static_cast<char>(0x7A), /* A9 */ + static_cast<char>(0xA1), /* AA */ + static_cast<char>(0xBF), /* AB */ + static_cast<char>(0xD0), /* AC */ + static_cast<char>(0x5B), /* AD */ + static_cast<char>(0xDE), /* AE */ + static_cast<char>(0xAE), /* AF */ + static_cast<char>(0xAC), /* B0 */ + static_cast<char>(0xA3), /* B1 */ + static_cast<char>(0xA5), /* B2 */ + static_cast<char>(0xB7), /* B3 */ + static_cast<char>(0xA9), /* B4 */ + static_cast<char>(0xA7), /* B5 */ + static_cast<char>(0xB6), /* B6 */ + static_cast<char>(0xBC), /* B7 */ + static_cast<char>(0xBD), /* B8 */ + static_cast<char>(0xBE), /* B9 */ + static_cast<char>(0xDD), /* BA */ + static_cast<char>(0xA8), /* BB */ + static_cast<char>(0xAF), /* BC */ + static_cast<char>(0x5D), /* BD */ + static_cast<char>(0xB4), /* BE */ + static_cast<char>(0xD7), /* BF */ + static_cast<char>(0x7B), /* C0 */ + static_cast<char>(0x41), /* C1 */ + static_cast<char>(0x42), /* C2 */ + static_cast<char>(0x43), /* C3 */ + static_cast<char>(0x44), /* C4 */ + static_cast<char>(0x45), /* C5 */ + static_cast<char>(0x46), /* C6 */ + static_cast<char>(0x47), /* C7 */ + static_cast<char>(0x48), /* C8 */ + static_cast<char>(0x49), /* C9 */ + static_cast<char>(0xAD), /* CA */ + static_cast<char>(0xF4), /* CB */ + static_cast<char>(0xF6), /* CC */ + static_cast<char>(0xF2), /* CD */ + static_cast<char>(0xF3), /* CE */ + static_cast<char>(0xF5), /* CF */ + static_cast<char>(0x7D), /* D0 */ + static_cast<char>(0x4A), /* D1 */ + static_cast<char>(0x4B), /* D2 */ + static_cast<char>(0x4C), /* D3 */ + static_cast<char>(0x4D), /* D4 */ + static_cast<char>(0x4E), /* D5 */ + static_cast<char>(0x4F), /* D6 */ + static_cast<char>(0x50), /* D7 */ + static_cast<char>(0x51), /* D8 */ + static_cast<char>(0x52), /* D9 */ + static_cast<char>(0xB9), /* DA */ + static_cast<char>(0xFB), /* DB */ + static_cast<char>(0xFC), /* DC */ + static_cast<char>(0xF9), /* DD */ + static_cast<char>(0xFA), /* DE */ + static_cast<char>(0xFF), /* DF */ + static_cast<char>(0x5C), /* E0 */ + static_cast<char>(0xF7), /* E1 */ + static_cast<char>(0x53), /* E2 */ + static_cast<char>(0x54), /* E3 */ + static_cast<char>(0x55), /* E4 */ + static_cast<char>(0x56), /* E5 */ + static_cast<char>(0x57), /* E6 */ + static_cast<char>(0x58), /* E7 */ + static_cast<char>(0x59), /* E8 */ + static_cast<char>(0x5A), /* E9 */ + static_cast<char>(0xB2), /* EA */ + static_cast<char>(0xD4), /* EB */ + static_cast<char>(0xD6), /* EC */ + static_cast<char>(0xD2), /* ED */ + static_cast<char>(0xD3), /* EE */ + static_cast<char>(0xD5), /* EF */ + static_cast<char>(0x30), /* F0 */ + static_cast<char>(0x31), /* F1 */ + static_cast<char>(0x32), /* F2 */ + static_cast<char>(0x33), /* F3 */ + static_cast<char>(0x34), /* F4 */ + static_cast<char>(0x35), /* F5 */ + static_cast<char>(0x36), /* F6 */ + static_cast<char>(0x37), /* F7 */ + static_cast<char>(0x38), /* F8 */ + static_cast<char>(0x39), /* F9 */ + static_cast<char>(0xB3), /* FA */ + static_cast<char>(0xDB), /* FB */ + static_cast<char>(0xDC), /* FC */ + static_cast<char>(0xD9), /* FD */ + static_cast<char>(0xDA), /* FE */ + static_cast<char>(0x9F), /* FF */ }; static const bool oldIllegal[256] = { diff --git a/deps/icu-small/source/tools/escapesrc/escapesrc.cpp b/deps/icu-small/source/tools/escapesrc/escapesrc.cpp index 10ac3d1aef04d6..215be86e1241bd 100644 --- a/deps/icu-small/source/tools/escapesrc/escapesrc.cpp +++ b/deps/icu-small/source/tools/escapesrc/escapesrc.cpp @@ -113,7 +113,7 @@ inline const char *skipws(const char *p, const char *e) { void appendByte(std::string &outstr, uint8_t byte) { char tmp2[5]; - snprintf(tmp2, sizeof(tmp2), "\\x%02X", 0xFF & (int)(byte)); + snprintf(tmp2, sizeof(tmp2), "\\x%02X", 0xFF & static_cast<int>(byte)); outstr += tmp2; } @@ -270,7 +270,7 @@ bool fixAt(std::string &linestr, size_t pos) { #endif // Proceed to decode utf-8 - const uint8_t *s = (const uint8_t*) (linestr.c_str()); + const uint8_t* s = reinterpret_cast<const uint8_t*>(linestr.c_str()); int32_t length = linestr.size(); UChar32 c; if(U8_IS_SINGLE((uint8_t)s[i]) && oldIllegal[s[i]]) { @@ -285,7 +285,7 @@ bool fixAt(std::string &linestr, size_t pos) { U8_NEXT(s, i, length, c); } if(c<0) { - fprintf(stderr, "Illegal utf-8 sequence at Column: %d\n", (int)old_pos); + fprintf(stderr, "Illegal utf-8 sequence at Column: %d\n", static_cast<int>(old_pos)); fprintf(stderr, "Line: >>%s<<\n", linestr.c_str()); return true; } diff --git a/deps/icu-small/source/tools/genccode/genccode.c b/deps/icu-small/source/tools/genccode/genccode.c index 9fb7dbcdf2eb95..0f243952a7d452 100644 --- a/deps/icu-small/source/tools/genccode/genccode.c +++ b/deps/icu-small/source/tools/genccode/genccode.c @@ -70,6 +70,7 @@ enum { #ifdef CAN_GENERATE_OBJECTS kOptObject, kOptMatchArch, + kOptCpuArch, kOptSkipDllExport, #endif kOptFilename, @@ -86,6 +87,7 @@ static UOption options[]={ #ifdef CAN_GENERATE_OBJECTS /*6*/UOPTION_DEF("object", 'o', UOPT_NO_ARG), UOPTION_DEF("match-arch", 'm', UOPT_REQUIRES_ARG), + UOPTION_DEF("cpu-arch", 'c', UOPT_REQUIRES_ARG), UOPTION_DEF("skip-dll-export", '\0', UOPT_NO_ARG), #endif UOPTION_DEF("filename", 'f', UOPT_REQUIRES_ARG), @@ -131,6 +133,8 @@ main(int argc, char* argv[]) { "\t-o or --object write a .obj file instead of .c\n" "\t-m or --match-arch file.o match the architecture (CPU, 32/64 bits) of the specified .o\n" "\t ELF format defaults to i386. Windows defaults to the native platform.\n" + "\t-c or --cpu-arch Specify a CPU architecture for which to write a .obj file for ClangCL on Windows\n" + "\t Valid values for this opton are x64, x86 and arm64.\n" "\t--skip-dll-export Don't export the ICU data entry point symbol (for use when statically linking)\n"); #endif fprintf(stderr, @@ -193,9 +197,17 @@ main(int argc, char* argv[]) { break; #ifdef CAN_GENERATE_OBJECTS case CALL_WRITEOBJECT: + if(options[kOptCpuArch].doesOccur) { + if (!checkCpuArchitecture(options[kOptCpuArch].value)) { + fprintf(stderr, + "CPU architecture \"%s\" is unknown.\n", options[kOptCpuArch].value); + return -1; + } + } writeObjectCode(filename, options[kOptDestDir].value, options[kOptEntryPoint].doesOccur ? options[kOptEntryPoint].value : NULL, options[kOptMatchArch].doesOccur ? options[kOptMatchArch].value : NULL, + options[kOptCpuArch].doesOccur ? options[kOptCpuArch].value : NULL, options[kOptFilename].doesOccur ? options[kOptFilename].value : NULL, NULL, 0, diff --git a/deps/icu-small/source/tools/genrb/derb.cpp b/deps/icu-small/source/tools/genrb/derb.cpp index 7ff877201a8eb6..a53d1931903ac2 100644 --- a/deps/icu-small/source/tools/genrb/derb.cpp +++ b/deps/icu-small/source/tools/genrb/derb.cpp @@ -194,7 +194,7 @@ main(int argc, char* argv[]) { if (q == nullptr) { locale.append(p, status); } else { - locale.append(p, (int32_t)(q - p), status); + locale.append(p, static_cast<int32_t>(q - p), status); } } if (U_FAILURE(status)) { @@ -223,7 +223,7 @@ main(int argc, char* argv[]) { #endif infile.append(inputDir, status); if(q != nullptr) { - infile.appendPathPart(icu::StringPiece(arg, (int32_t)(q - arg)), status); + infile.appendPathPart(icu::StringPiece(arg, static_cast<int32_t>(q - arg)), status); } if (U_FAILURE(status)) { return status; @@ -259,7 +259,7 @@ main(int argc, char* argv[]) { } thefile.appendPathPart(filename, status); if (*ext) { - thefile.truncate(thefile.length() - (int32_t)uprv_strlen(ext)); + thefile.truncate(thefile.length() - static_cast<int32_t>(uprv_strlen(ext))); } thefile.append(".txt", status); if (U_FAILURE(status)) { @@ -301,7 +301,7 @@ main(int argc, char* argv[]) { if (!locale.isEmpty()) { u_fprintf(out, "%s", locale.data()); } else { - u_fprintf(out, "%.*s%.*S", (int32_t)(ext - filename), filename, UPRV_LENGTHOF(sp), sp); + u_fprintf(out, "%.*s%.*S", static_cast<int32_t>(ext - filename), filename, UPRV_LENGTHOF(sp), sp); } printOutBundle(out, bundle, 0, pname, &status); @@ -334,7 +334,7 @@ static char16_t *quotedString(const char16_t *string) { } } - newstr = (char16_t *) uprv_malloc((1 + alen) * U_SIZEOF_UCHAR); + newstr = static_cast<char16_t*>(uprv_malloc((1 + alen) * U_SIZEOF_UCHAR)); for (sp = string, np = newstr; *sp; ++sp) { switch (*sp) { case '\n': @@ -392,7 +392,7 @@ static void printOutAlias(UFILE *out, UResourceBundle *parent, Resource r, cons char msg[128]; printIndent(out, indent); snprintf(msg, sizeof(msg), "// WARNING: this resource, size %li is truncated to %li\n", - (long)len, (long)truncsize/2); + static_cast<long>(len), static_cast<long>(truncsize) / 2); printCString(out, msg, -1); len = truncsize; } @@ -436,7 +436,7 @@ static void printOutBundle(UFILE *out, UResourceBundle *resource, int32_t indent char msg[128]; printIndent(out, indent); snprintf(msg, sizeof(msg), "// WARNING: this resource, size %li is truncated to %li\n", - (long)len, (long)(truncsize/2)); + static_cast<long>(len), static_cast<long>(truncsize / 2)); printCString(out, msg, -1); len = truncsize/2; } @@ -444,7 +444,7 @@ static void printOutBundle(UFILE *out, UResourceBundle *resource, int32_t indent if(key != nullptr) { static const char16_t openStr[] = { 0x0020, 0x007B, 0x0020, 0x0022 }; /* " { \"" */ static const char16_t closeStr[] = { 0x0022, 0x0020, 0x007D }; /* "\" }" */ - printCString(out, key, (int32_t)uprv_strlen(key)); + printCString(out, key, static_cast<int32_t>(uprv_strlen(key))); printString(out, openStr, UPRV_LENGTHOF(openStr)); printString(out, string, len); printString(out, closeStr, UPRV_LENGTHOF(closeStr)); @@ -453,7 +453,7 @@ static void printOutBundle(UFILE *out, UResourceBundle *resource, int32_t indent static const char16_t closeStr[] = { 0x0022, 0x002C }; /* "\"," */ printString(out, openStr, UPRV_LENGTHOF(openStr)); - printString(out, string, (int32_t)(u_strlen(string))); + printString(out, string, u_strlen(string)); printString(out, closeStr, UPRV_LENGTHOF(closeStr)); } @@ -490,12 +490,12 @@ static void printOutBundle(UFILE *out, UResourceBundle *resource, int32_t indent case URES_BINARY : { int32_t len = 0; - const int8_t *data = (const int8_t *)ures_getBinary(resource, &len, status); + const int8_t* data = reinterpret_cast<const int8_t*>(ures_getBinary(resource, &len, status)); if(opt_truncate && len > truncsize) { char msg[128]; printIndent(out, indent); snprintf(msg, sizeof(msg), "// WARNING: this resource, size %li is truncated to %li\n", - (long)len, (long)(truncsize/2)); + static_cast<long>(len), static_cast<long>(truncsize / 2)); printCString(out, msg, -1); len = truncsize; } @@ -590,7 +590,7 @@ static void printOutBundle(UFILE *out, UResourceBundle *resource, int32_t indent } else { /* we have to use low level access to do this */ Resource r; int32_t resSize = ures_getSize(resource); - UBool isTable = (UBool)(ures_getType(resource) == URES_TABLE); + UBool isTable = static_cast<UBool>(ures_getType(resource) == URES_TABLE); for(i = 0; i < resSize; i++) { /* need to know if it's an alias */ if(isTable) { diff --git a/deps/icu-small/source/tools/genrb/genrb.cpp b/deps/icu-small/source/tools/genrb/genrb.cpp index b356e2248ad119..df3987b5819d5f 100644 --- a/deps/icu-small/source/tools/genrb/genrb.cpp +++ b/deps/icu-small/source/tools/genrb/genrb.cpp @@ -411,13 +411,13 @@ main(int argc, poolFileName.data(), u_errorName(status)); return status; } - header = (const DataHeader *)poolBundle.fBytes; + header = reinterpret_cast<const DataHeader*>(poolBundle.fBytes); if (header->info.formatVersion[0] < 2) { fprintf(stderr, "invalid format of pool bundle file %s\n", poolFileName.data()); return U_INVALID_FORMAT_ERROR; } - const int32_t *pRoot = (const int32_t *)( - (const char *)header + header->dataHeader.headerSize); + const int32_t* pRoot = reinterpret_cast<const int32_t*>( + reinterpret_cast<const char*>(header) + header->dataHeader.headerSize); poolBundle.fIndexes = pRoot + 1; indexLength = poolBundle.fIndexes[URES_INDEX_LENGTH] & 0xff; if (indexLength <= URES_INDEX_POOL_CHECKSUM) { @@ -426,7 +426,7 @@ main(int argc, } int32_t keysBottom = 1 + indexLength; int32_t keysTop = poolBundle.fIndexes[URES_INDEX_KEYS_TOP]; - poolBundle.fKeys = (const char *)(pRoot + keysBottom); + poolBundle.fKeys = reinterpret_cast<const char*>(pRoot + keysBottom); poolBundle.fKeysLength = (keysTop - keysBottom) * 4; poolBundle.fChecksum = poolBundle.fIndexes[URES_INDEX_POOL_CHECKSUM]; @@ -449,7 +449,7 @@ main(int argc, } // The PseudoListResource constructor call did not allocate further memory. assert(U_SUCCESS(status)); - const char16_t *p = (const char16_t *)(pRoot + keysTop); + const char16_t* p = reinterpret_cast<const char16_t*>(pRoot + keysTop); int32_t remaining = stringUnitsLength; do { int32_t first = *p; @@ -469,7 +469,7 @@ main(int argc, length = ((first - 0xdfef) << 16) | p[1]; } else if (first == 0xdfff && remaining >= 3) { numCharsForLength = 3; - length = ((int32_t)p[1] << 16) | p[2]; + length = (static_cast<int32_t>(p[1]) << 16) | p[2]; } else { break; // overrun } @@ -514,10 +514,10 @@ main(int argc, T_FileStream_close(poolFile); setUsePoolBundle(true); if (isVerbose() && poolBundle.fStrings != nullptr) { - printf("number of shared strings: %d\n", (int)poolBundle.fStrings->fCount); + printf("number of shared strings: %d\n", static_cast<int>(poolBundle.fStrings->fCount)); int32_t length = poolBundle.fStringIndexLimit + 1; // incl. last NUL printf("16-bit units for strings: %6d = %6d bytes\n", - (int)length, (int)length * 2); + static_cast<int>(length), static_cast<int>(length) * 2); } } @@ -622,14 +622,14 @@ processFile(const char *filename, const char *cp, * This is very important when the resource file includes * another file, like UCARules.txt or thaidict.brk. */ - int32_t filenameSize = (int32_t)(filenameBegin - filename + 1); + int32_t filenameSize = static_cast<int32_t>(filenameBegin - filename + 1); inputDirBuf.append(filename, filenameSize, status); inputDir = inputDirBuf.data(); dirlen = inputDirBuf.length(); } }else{ - dirlen = (int32_t)uprv_strlen(inputDir); + dirlen = static_cast<int32_t>(uprv_strlen(inputDir)); if(inputDir[dirlen-1] != U_FILE_SEP_CHAR) { /* @@ -784,14 +784,14 @@ make_res_filename(const char *filename, if(packageName != nullptr) { - pkgLen = (int32_t)(1 + uprv_strlen(packageName)); + pkgLen = static_cast<int32_t>(1 + uprv_strlen(packageName)); } /* setup */ basename = dirname = resName = nullptr; /* determine basename, and compiled file names */ - basename = (char*) uprv_malloc(sizeof(char) * (uprv_strlen(filename) + 1)); + basename = static_cast<char*>(uprv_malloc(sizeof(char) * (uprv_strlen(filename) + 1))); if (basename == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; goto finish; @@ -799,7 +799,7 @@ make_res_filename(const char *filename, get_basename(basename, filename); - dirname = (char*) uprv_malloc(sizeof(char) * (uprv_strlen(filename) + 1)); + dirname = static_cast<char*>(uprv_malloc(sizeof(char) * (uprv_strlen(filename) + 1))); if (dirname == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; goto finish; @@ -809,10 +809,10 @@ make_res_filename(const char *filename, if (outputDir == nullptr) { /* output in same dir as .txt */ - resName = (char*) uprv_malloc(sizeof(char) * (uprv_strlen(dirname) + resName = static_cast<char*>(uprv_malloc(sizeof(char) * (uprv_strlen(dirname) + pkgLen + uprv_strlen(basename) - + uprv_strlen(RES_SUFFIX) + 8)); + + uprv_strlen(RES_SUFFIX) + 8))); if (resName == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; goto finish; @@ -829,10 +829,10 @@ make_res_filename(const char *filename, uprv_strcat(resName, basename); } else { - int32_t dirlen = (int32_t)uprv_strlen(outputDir); - int32_t basenamelen = (int32_t)uprv_strlen(basename); + int32_t dirlen = static_cast<int32_t>(uprv_strlen(outputDir)); + int32_t basenamelen = static_cast<int32_t>(uprv_strlen(basename)); - resName = (char*) uprv_malloc(sizeof(char) * (dirlen + pkgLen + basenamelen + 8)); + resName = static_cast<char*>(uprv_malloc(sizeof(char) * (dirlen + pkgLen + basenamelen + 8))); if (resName == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; diff --git a/deps/icu-small/source/tools/genrb/parse.cpp b/deps/icu-small/source/tools/genrb/parse.cpp index a6c59948d80576..f487241cc18990 100644 --- a/deps/icu-small/source/tools/genrb/parse.cpp +++ b/deps/icu-small/source/tools/genrb/parse.cpp @@ -335,7 +335,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt expect(state, TOK_STRING, &tokenValue, nullptr, &line, status); if(isVerbose()){ - printf(" %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } if (U_FAILURE(*status)) @@ -379,7 +379,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt * is not known in UTF-8 byte stream */ size = ucbuf_size(ucbuf) + 1; - pTarget = (char16_t*) uprv_malloc(U_SIZEOF_UCHAR * size); + pTarget = static_cast<char16_t*>(uprv_malloc(U_SIZEOF_UCHAR * size)); uprv_memset(pTarget, 0, size*U_SIZEOF_UCHAR); target = pTarget; targetLimit = pTarget+size; @@ -389,7 +389,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt { c = ucbuf_getc(ucbuf, status); if(c == QUOTE) { - quoted = (UBool)!quoted; + quoted = static_cast<UBool>(!quoted); } /* weiv (06/26/2002): adding the following: * - preserving spaces in commands [...] @@ -417,7 +417,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt { c = unescape(ucbuf, status); - if (c == (UChar32)U_ERR) + if (c == static_cast<UChar32>(U_ERR)) { uprv_free(pTarget); T_FileStream_close(file); @@ -433,7 +433,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt } /* Append char16_t * after dissembling if c > 0xffff*/ - if (c != (UChar32)U_EOF) + if (c != static_cast<UChar32>(U_EOF)) { U_APPEND_CHAR32_ONLY(c, target); } @@ -448,7 +448,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt *target = 0x0000; } - result = string_open(state->bundle, tag, pTarget, (int32_t)(target - pTarget), nullptr, status); + result = string_open(state->bundle, tag, pTarget, static_cast<int32_t>(target - pTarget), nullptr, status); ucbuf_close(ucbuf); @@ -476,7 +476,7 @@ parseTransliterator(ParseState* state, char *tag, uint32_t startline, const stru expect(state, TOK_STRING, &tokenValue, nullptr, &line, status); if(isVerbose()){ - printf(" %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } if (U_FAILURE(*status)) @@ -517,7 +517,7 @@ parseTransliterator(ParseState* state, char *tag, uint32_t startline, const stru * is not known in UTF-8 byte stream */ pSource = ucbuf_getBuffer(ucbuf, &size, status); - pTarget = (char16_t*) uprv_malloc(U_SIZEOF_UCHAR * (size + 1)); + pTarget = static_cast<char16_t*>(uprv_malloc(U_SIZEOF_UCHAR * (size + 1))); uprv_memset(pTarget, 0, size*U_SIZEOF_UCHAR); #if !UCONFIG_NO_TRANSLITERATION @@ -549,7 +549,7 @@ parseDependency(ParseState* state, char *tag, uint32_t startline, const struct U expect(state, TOK_STRING, &tokenValue, nullptr, &line, status); if(isVerbose()){ - printf(" %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } if (U_FAILURE(*status)) @@ -609,7 +609,7 @@ parseString(ParseState* state, char *tag, uint32_t startline, const struct UStri return parseUCARules(tag, startline, status); }*/ if(isVerbose()){ - printf(" string %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" string %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } expect(state, TOK_STRING, &tokenValue, nullptr, nullptr, status); @@ -642,7 +642,7 @@ parseAlias(ParseState* state, char *tag, uint32_t startline, const struct UStrin expect(state, TOK_STRING, &tokenValue, nullptr, nullptr, status); if(isVerbose()){ - printf(" alias %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" alias %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } if (U_SUCCESS(*status)) @@ -728,12 +728,12 @@ GenrbImporter::getRules( */ StringPiece dir = filename.toStringPiece(); const char *filenameLimit = filename.data() + filename.length(); - dir.remove_suffix((int32_t)(filenameLimit - filenameBegin)); + dir.remove_suffix(static_cast<int32_t>(filenameLimit - filenameBegin)); inputDirBuf.append(dir, errorCode); inputDir = inputDirBuf.data(); } }else{ - int32_t dirlen = (int32_t)uprv_strlen(inputDir); + int32_t dirlen = static_cast<int32_t>(uprv_strlen(inputDir)); if((filename[0] != U_FILE_SEP_CHAR) && (inputDir[dirlen-1] !='.')) { /* @@ -806,9 +806,9 @@ escape(const char16_t *s, char *buffer, size_t n) { return; } else if (0x20 <= c && c <= 0x7e) { // printable ASCII - *buffer++ = (char)c; // assumes ASCII-based platform + *buffer++ = static_cast<char>(c); // assumes ASCII-based platform } else { - buffer += snprintf(buffer, n, "\\u%04X", (int)c); + buffer += snprintf(buffer, n, "\\u%04X", static_cast<int>(c)); } } } @@ -882,14 +882,14 @@ writeCollationDiacriticsTOML(const char* outputdir, const char* name, const char limit = c; break; } else { - uint64_t ce = uint64_t(icu::Collation::ceFromCE32(ce32)); - if ((ce & 0xFFFFFFFF0000FFFF) != uint64_t(icu::Collation::COMMON_TERTIARY_CE)) { + uint64_t ce = static_cast<uint64_t>(icu::Collation::ceFromCE32(ce32)); + if ((ce & 0xFFFFFFFF0000FFFF) != static_cast<uint64_t>(icu::Collation::COMMON_TERTIARY_CE)) { // Not a CE where only the secondary weight differs from the expected // pattern. limit = c; break; } - secondary = uint16_t(ce >> 16); + secondary = static_cast<uint16_t>(ce >> 16); } secondaries[c - ICU4X_DIACRITIC_BASE] = secondary; @@ -1023,7 +1023,7 @@ writeCollationSpecialPrimariesTOML(const char* outputdir, const char* name, cons for (int32_t i = 0; i < 4; ++i) { // getLastPrimaryForGroup subtracts one from a 16-bit value, so we add one // back to get a value that fits in 16 bits. - lastPrimaries[i] = (uint16_t)((data->getLastPrimaryForGroup(UCOL_REORDER_CODE_FIRST + i) + 1) >> 16); + lastPrimaries[i] = static_cast<uint16_t>((data->getLastPrimaryForGroup(UCOL_REORDER_CODE_FIRST + i) + 1) >> 16); } uint32_t numericPrimary = data->numericPrimary; @@ -1098,7 +1098,7 @@ writeCollationTOML(const char* outputdir, const char* name, const char* collatio } } - uint32_t maxVariable = (uint32_t)settings->getMaxVariable(); + uint32_t maxVariable = static_cast<uint32_t>(settings->getMaxVariable()); if (maxVariable >= 4) { printf("Max variable out of range"); *status = U_INTERNAL_PROGRAM_ERROR; @@ -1298,7 +1298,7 @@ addCollation(ParseState* state, TableResource *result, const char *collationTyp if(reason == nullptr) { reason = ""; } error(line, "CollationBuilder failed at %s~%s/Sequence rule offset %ld: %s %s", state->filename, collationType, - (long)parseError.offset, u_errorName(intStatus), reason); + static_cast<long>(parseError.offset), u_errorName(intStatus), reason); if(parseError.preContext[0] != 0 || parseError.postContext[0] != 0) { // Print pre- and post-context. char preBuffer[100], postBuffer[100]; @@ -1330,7 +1330,7 @@ addCollation(ParseState* state, TableResource *result, const char *collationTyp uint8_t *dest = buffer.allocateInsteadAndCopy(capacity); if(dest == nullptr) { fprintf(stderr, "memory allocation (%ld bytes) for file contents failed\n", - (long)capacity); + static_cast<long>(capacity)); *status = U_MEMORY_ALLOCATION_ERROR; res_close(result); return nullptr; @@ -1344,7 +1344,7 @@ addCollation(ParseState* state, TableResource *result, const char *collationTyp dest = buffer.allocateInsteadAndCopy(capacity); if(dest == nullptr) { fprintf(stderr, "memory allocation (%ld bytes) for file contents failed\n", - (long)capacity); + static_cast<long>(capacity)); *status = U_MEMORY_ALLOCATION_ERROR; res_close(result); return nullptr; @@ -1405,7 +1405,7 @@ parseCollationElements(ParseState* state, char *tag, uint32_t startline, UBool n return nullptr; } if(isVerbose()){ - printf(" collation elements %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" collation elements %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } if(!newCollation) { return addCollation(state, result, "(no type)", startline, status); @@ -1530,7 +1530,7 @@ realParseTable(ParseState* state, TableResource *table, char *tag, uint32_t star /* '{' . (name resource)* '}' */ if(isVerbose()){ - printf(" parsing table %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" parsing table %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } for (;;) { @@ -1612,7 +1612,7 @@ parseTable(ParseState* state, char *tag, uint32_t startline, const struct UStrin return parseCollationElements(state, tag, startline, true, status); } if(isVerbose()){ - printf(" table %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" table %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } TableResource *result = table_open(state->bundle, tag, comment, status); @@ -1640,7 +1640,7 @@ parseArray(ParseState* state, char *tag, uint32_t startline, const struct UStrin return nullptr; } if(isVerbose()){ - printf(" array %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" array %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } ustr_init(&memberComments); @@ -1729,7 +1729,7 @@ parseIntVector(ParseState* state, char *tag, uint32_t startline, const struct US } if(isVerbose()){ - printf(" vector %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" vector %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } ustr_init(&memberComments); /* '{' . string [','] '}' */ @@ -1762,7 +1762,7 @@ parseIntVector(ParseState* state, char *tag, uint32_t startline, const struct US /* For handling illegal char in the Intvector */ value = uprv_strtoul(string, &stopstring, 0);/* make intvector support decimal,hexdigit,octal digit ranging from -2^31-2^32-1*/ - int32_t len = (int32_t)(stopstring-string); + int32_t len = static_cast<int32_t>(stopstring - string); if(len==stringLength) { @@ -1816,7 +1816,7 @@ parseBinary(ParseState* state, char *tag, uint32_t startline, const struct UStri } if(isVerbose()){ - printf(" binary %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" binary %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } LocalMemory<uint8_t> value; @@ -1842,8 +1842,8 @@ parseBinary(ParseState* state, char *tag, uint32_t startline, const struct UStri toConv[1] = string[i++]; char *stopstring; - value[count++] = (uint8_t) uprv_strtoul(toConv, &stopstring, 16); - uint32_t len=(uint32_t)(stopstring-toConv); + value[count++] = static_cast<uint8_t>(uprv_strtoul(toConv, &stopstring, 16)); + uint32_t len = static_cast<uint32_t>(stopstring - toConv); if(len!=2) { @@ -1886,7 +1886,7 @@ parseInteger(ParseState* state, char *tag, uint32_t startline, const struct UStr } if(isVerbose()){ - printf(" integer %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" integer %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } if (stringLength == 0) @@ -1897,7 +1897,7 @@ parseInteger(ParseState* state, char *tag, uint32_t startline, const struct UStr /* Allow integer support for hexdecimal, octal digit and decimal*/ /* and handle illegal char in the integer*/ value = uprv_strtoul(string, &stopstring, 0); - int32_t len = (int32_t)(stopstring-string); + int32_t len = static_cast<int32_t>(stopstring - string); if(len==stringLength) { result = int_open(state->bundle, tag, value, comment, status); @@ -1930,7 +1930,7 @@ parseImport(ParseState* state, char *tag, uint32_t startline, const struct UStri } if(isVerbose()){ - printf(" import %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" import %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } /* Open the input file for reading */ @@ -1997,10 +1997,10 @@ parseInclude(ParseState* state, char *tag, uint32_t startline, const struct UStr } if(isVerbose()){ - printf(" include %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" include %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } - fullname = (char *) uprv_malloc(state->inputdirLength + stringLength + 2); + fullname = static_cast<char*>(uprv_malloc(state->inputdirLength + stringLength + 2)); /* test for nullptr */ if(fullname == nullptr) { @@ -2137,7 +2137,7 @@ void initParser() } static inline UBool isTable(enum EResourceType type) { - return (UBool)(type==RESTYPE_TABLE || type==RESTYPE_TABLE_NO_FALLBACK); + return type == RESTYPE_TABLE || type == RESTYPE_TABLE_NO_FALLBACK; } static enum EResourceType @@ -2159,7 +2159,7 @@ parseResourceType(ParseState* state, UErrorCode *status) /* Search for normal types */ result=RESTYPE_UNKNOWN; - while ((result=(EResourceType)(result+1)) < RESTYPE_RESERVED) { + while ((result = static_cast<EResourceType>(result + 1)) < RESTYPE_RESERVED) { if (u_strcmp(tokenValue->fChars, gResourceTypes[result].nameUChars) == 0) { break; } @@ -2197,7 +2197,7 @@ parseResource(ParseState* state, char *tag, const struct UString *comment, UErro token = getToken(state, &tokenValue, nullptr, &startline, status); if(isVerbose()){ - printf(" resource %s at line %i \n", (tag == nullptr) ? "(null)" : tag, (int)startline); + printf(" resource %s at line %i \n", tag == nullptr ? "(null)" : tag, static_cast<int>(startline)); } /* name . [ ':' type ] '{' resource '}' */ @@ -2334,9 +2334,9 @@ parse(UCHARBUF *buf, const char *inputDir, const char *outputDir, const char *fi initLookahead(&state, buf, status); state.inputdir = inputDir; - state.inputdirLength = (state.inputdir != nullptr) ? (uint32_t)uprv_strlen(state.inputdir) : 0; + state.inputdirLength = state.inputdir != nullptr ? static_cast<uint32_t>(uprv_strlen(state.inputdir)) : 0; state.outputdir = outputDir; - state.outputdirLength = (state.outputdir != nullptr) ? (uint32_t)uprv_strlen(state.outputdir) : 0; + state.outputdirLength = state.outputdir != nullptr ? static_cast<uint32_t>(uprv_strlen(state.outputdir)) : 0; state.filename = filename; state.makeBinaryCollation = makeBinaryCollation; state.omitCollationRules = omitCollationRules; diff --git a/deps/icu-small/source/tools/genrb/reslist.cpp b/deps/icu-small/source/tools/genrb/reslist.cpp index e1c2d25061cd34..c6748a33b909c1 100644 --- a/deps/icu-small/source/tools/genrb/reslist.cpp +++ b/deps/icu-small/source/tools/genrb/reslist.cpp @@ -118,7 +118,7 @@ static const UVersionInfo gFormatVersions[4] = { /* indexed by a major-formatVe static uint8_t calcPadding(uint32_t size) { /* returns space we need to pad */ - return (uint8_t) ((size % sizeof(uint32_t)) ? (sizeof(uint32_t) - (size % sizeof(uint32_t))) : 0); + return static_cast<uint8_t>(size % sizeof(uint32_t) ? sizeof(uint32_t) - (size % sizeof(uint32_t)) : 0); } @@ -416,7 +416,7 @@ StringResource::handlePreflightStrings(SRBRoot *bundle, UHashtable *stringSet, // This is a duplicate of a pool bundle string or of an earlier-visited string. if (++fSame->fNumCopies == 1) { assert(fSame->fWritten); - int32_t poolStringIndex = (int32_t)RES_GET_OFFSET(fSame->fRes); + int32_t poolStringIndex = static_cast<int32_t>(RES_GET_OFFSET(fSame->fRes)); if (poolStringIndex >= bundle->fPoolStringIndexLimit) { bundle->fPoolStringIndexLimit = poolStringIndex + 1; } @@ -430,7 +430,7 @@ StringResource::handlePreflightStrings(SRBRoot *bundle, UHashtable *stringSet, if (bundle->fStringsForm != STRINGS_UTF16_V1) { int32_t len = length(); if (len <= MAX_IMPLICIT_STRING_LENGTH && - !U16_IS_TRAIL(fString[0]) && fString.indexOf((char16_t)0) < 0) { + !U16_IS_TRAIL(fString[0]) && fString.indexOf(static_cast<char16_t>(0)) < 0) { /* * This string will be stored without an explicit length. * Runtime will detect !U16_IS_TRAIL(s[0]) and call u_strlen(). @@ -483,7 +483,7 @@ SRBRoot::makeRes16(uint32_t resWord) const { return 0; /* empty string */ } uint32_t type = RES_GET_TYPE(resWord); - int32_t offset = (int32_t)RES_GET_OFFSET(resWord); + int32_t offset = static_cast<int32_t>(RES_GET_OFFSET(resWord)); if (type == URES_STRING_V2) { assert(offset > 0); if (offset < fPoolStringIndexLimit) { @@ -542,7 +542,7 @@ StringResource::handleWrite16(SRBRoot * /*bundle*/) { void ContainerResource::writeAllRes16(SRBRoot *bundle) { for (SResource *current = fFirst; current != nullptr; current = current->fNext) { - bundle->f16BitUnits.append((char16_t)current->fRes16); + bundle->f16BitUnits.append(static_cast<char16_t>(current->fRes16)); } fWritten = true; } @@ -562,7 +562,7 @@ ArrayResource::handleWrite16(SRBRoot *bundle) { } if (fCount <= 0xffff && res16 >= 0 && gFormatVersion > 1) { fRes = URES_MAKE_RESOURCE(URES_ARRAY16, bundle->f16BitUnits.length()); - bundle->f16BitUnits.append((char16_t)fCount); + bundle->f16BitUnits.append(static_cast<char16_t>(fCount)); writeAllRes16(bundle); } } @@ -582,16 +582,16 @@ TableResource::handleWrite16(SRBRoot *bundle) { key16 |= current->fKey16; res16 |= current->fRes16; } - if(fCount > (uint32_t)bundle->fMaxTableLength) { + if (fCount > static_cast<uint32_t>(bundle->fMaxTableLength)) { bundle->fMaxTableLength = fCount; } if (fCount <= 0xffff && key16 >= 0) { if (res16 >= 0 && gFormatVersion > 1) { /* 16-bit count, key offsets and values */ fRes = URES_MAKE_RESOURCE(URES_TABLE16, bundle->f16BitUnits.length()); - bundle->f16BitUnits.append((char16_t)fCount); + bundle->f16BitUnits.append(static_cast<char16_t>(fCount)); for (SResource *current = fFirst; current != nullptr; current = current->fNext) { - bundle->f16BitUnits.append((char16_t)current->fKey16); + bundle->f16BitUnits.append(static_cast<char16_t>(current->fKey16)); } writeAllRes16(bundle); } else { @@ -807,7 +807,7 @@ void TableResource::handleWrite(UNewDataMemory *mem, uint32_t *byteOffset) { writeAllRes(mem, byteOffset); if(fTableType == URES_TABLE) { - udata_write16(mem, (uint16_t)fCount); + udata_write16(mem, static_cast<uint16_t>(fCount)); for (SResource *current = fFirst; current != nullptr; current = current->fNext) { udata_write16(mem, current->fKey16); } @@ -820,7 +820,7 @@ TableResource::handleWrite(UNewDataMemory *mem, uint32_t *byteOffset) { } else /* URES_TABLE32 */ { udata_write32(mem, fCount); for (SResource *current = fFirst; current != nullptr; current = current->fNext) { - udata_write32(mem, (uint32_t)current->fKey); + udata_write32(mem, static_cast<uint32_t>(current->fKey)); } *byteOffset += (1 + fCount)* 4; } @@ -862,7 +862,7 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg, * Safe because the capacity is a multiple of 4. */ while (fKeysTop & 3) { - fKeys[fKeysTop++] = (char)0xaa; + fKeys[fKeysTop++] = static_cast<char>(0xaa); } /* * In URES_TABLE, use all local key offsets that fit into 16 bits, @@ -921,8 +921,8 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg, } else { // Set the pool index threshold so that 16-bit indexes work // for some pool strings and some local strings. - fPoolStringIndex16Limit = (int32_t)( - ((int64_t)fPoolStringIndexLimit * 0xffff) / sum); + fPoolStringIndex16Limit = static_cast<int32_t>( + (static_cast<int64_t>(fPoolStringIndexLimit) * 0xffff) / sum); } } else if (gIsDefaultFormatVersion && formatVersion == 3 && !fIsPoolBundle) { // If we just default to formatVersion 3 @@ -938,7 +938,7 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg, return; } if (f16BitUnits.length() & 1) { - f16BitUnits.append((char16_t)0xaaaa); /* pad to multiple of 4 bytes */ + f16BitUnits.append(static_cast<char16_t>(0xaaaa)); /* pad to multiple of 4 bytes */ } byteOffset = fKeysTop + f16BitUnits.length() * 2; @@ -964,12 +964,12 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg, if(outputPkg != nullptr) { uprv_strcpy(writtenFilename+off, outputPkg); - off += (int32_t)uprv_strlen(outputPkg); + off += static_cast<int32_t>(uprv_strlen(outputPkg)); writtenFilename[off] = '_'; ++off; } - len = (int32_t)uprv_strlen(fLocale); + len = static_cast<int32_t>(uprv_strlen(fLocale)); if (len > writtenFilenameLen) { len = writtenFilenameLen; } @@ -1012,7 +1012,7 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg, uprv_memset(indexes, 0, sizeof(indexes)); indexes[URES_INDEX_LENGTH]= fIndexLength; indexes[URES_INDEX_KEYS_TOP]= fKeysTop>>2; - indexes[URES_INDEX_RESOURCES_TOP]= (int32_t)(top>>2); + indexes[URES_INDEX_RESOURCES_TOP] = static_cast<int32_t>(top >> 2); indexes[URES_INDEX_BUNDLE_TOP]= indexes[URES_INDEX_RESOURCES_TOP]; indexes[URES_INDEX_MAX_TABLE_LENGTH]= fMaxTableLength; @@ -1034,13 +1034,13 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg, if (URES_INDEX_POOL_CHECKSUM < fIndexLength) { if (fIsPoolBundle) { indexes[URES_INDEX_ATTRIBUTES] |= URES_ATT_IS_POOL_BUNDLE | URES_ATT_NO_FALLBACK; - uint32_t checksum = computeCRC((const char *)(fKeys + fKeysBottom), - (uint32_t)(fKeysTop - fKeysBottom), 0); + uint32_t checksum = computeCRC(static_cast<const char*>(fKeys + fKeysBottom), + static_cast<uint32_t>(fKeysTop - fKeysBottom), 0); if (f16BitUnits.length() <= 1) { // no pool strings to checksum } else if (U_IS_BIG_ENDIAN) { checksum = computeCRC(reinterpret_cast<const char *>(f16BitUnits.getBuffer()), - (uint32_t)f16BitUnits.length() * 2, checksum); + static_cast<uint32_t>(f16BitUnits.length()) * 2, checksum); } else { // Swap to big-endian so we get the same checksum on all platforms // (except for charset family, due to the key strings). @@ -1050,13 +1050,13 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg, char16_t* p = s.getBuffer(f16BitUnits.length()); for (int32_t count = f16BitUnits.length(); count > 0; --count) { uint16_t x = *p; - *p++ = (uint16_t)((x << 8) | (x >> 8)); + *p++ = static_cast<uint16_t>((x << 8) | (x >> 8)); } s.releaseBuffer(f16BitUnits.length()); - checksum = computeCRC((const char *)s.getBuffer(), - (uint32_t)f16BitUnits.length() * 2, checksum); + checksum = computeCRC(reinterpret_cast<const char*>(s.getBuffer()), + static_cast<uint32_t>(f16BitUnits.length()) * 2, checksum); } - indexes[URES_INDEX_POOL_CHECKSUM] = (int32_t)checksum; + indexes[URES_INDEX_POOL_CHECKSUM] = static_cast<int32_t>(checksum); } else if (gUsePoolBundle) { indexes[URES_INDEX_ATTRIBUTES] |= URES_ATT_USES_POOL_BUNDLE; indexes[URES_INDEX_POOL_CHECKSUM] = fUsePoolBundle->fChecksum; @@ -1086,7 +1086,7 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg, size = udata_finish(mem, &errorCode); if(top != size) { fprintf(stderr, "genrb error: wrote %u bytes but counted %u\n", - (int)size, (int)top); + static_cast<int>(size), static_cast<int>(top)); errorCode = U_INTERNAL_PROGRAM_ERROR; } } @@ -1149,10 +1149,10 @@ SRBRoot::SRBRoot(const UString *comment, UBool isPoolBundle, UErrorCode &errorCo if (gFormatVersion > 1) { // f16BitUnits must start with a zero for empty resources. // We might be able to omit it if there are no empty 16-bit resources. - f16BitUnits.append((char16_t)0); + f16BitUnits.append(static_cast<char16_t>(0)); } - fKeys = (char *) uprv_malloc(sizeof(char) * KEY_SPACE_SIZE); + fKeys = static_cast<char*>(uprv_malloc(sizeof(char) * KEY_SPACE_SIZE)); if (isPoolBundle) { fRoot = new PseudoListResource(this, errorCode); } else { @@ -1206,7 +1206,7 @@ void SRBRoot::setLocale(char16_t *locale, UErrorCode &errorCode) { } uprv_free(fLocale); - fLocale = (char*) uprv_malloc(sizeof(char) * (u_strlen(locale)+1)); + fLocale = static_cast<char*>(uprv_malloc(sizeof(char) * (u_strlen(locale) + 1))); if(fLocale == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; return; @@ -1286,7 +1286,7 @@ SRBRoot::addTag(const char *tag, UErrorCode &errorCode) { return -1; } - keypos = addKeyBytes(tag, (int32_t)(uprv_strlen(tag) + 1), errorCode); + keypos = addKeyBytes(tag, static_cast<int32_t>(uprv_strlen(tag) + 1), errorCode); if (U_SUCCESS(errorCode)) { ++fKeysCount; } @@ -1310,9 +1310,9 @@ compareInt32(int32_t lPos, int32_t rPos) { static int32_t U_CALLCONV compareKeySuffixes(const void *context, const void *l, const void *r) { - const struct SRBRoot *bundle=(const struct SRBRoot *)context; - int32_t lPos = ((const KeyMapEntry *)l)->oldpos; - int32_t rPos = ((const KeyMapEntry *)r)->oldpos; + const struct SRBRoot* bundle = static_cast<const struct SRBRoot*>(context); + int32_t lPos = static_cast<const KeyMapEntry*>(l)->oldpos; + int32_t rPos = static_cast<const KeyMapEntry*>(r)->oldpos; const char *lStart = bundle->getKeyString(lPos); const char *lLimit = lStart; const char *rStart = bundle->getKeyString(rPos); @@ -1322,13 +1322,13 @@ compareKeySuffixes(const void *context, const void *l, const void *r) { while (*rLimit != 0) { ++rLimit; } /* compare keys in reverse character order */ while (lStart < lLimit && rStart < rLimit) { - diff = (int32_t)(uint8_t)*--lLimit - (int32_t)(uint8_t)*--rLimit; + diff = static_cast<int32_t>(static_cast<uint8_t>(*--lLimit)) - static_cast<int32_t>(static_cast<uint8_t>(*--rLimit)); if (diff != 0) { return diff; } } /* sort equal suffixes by descending key length */ - diff = (int32_t)(rLimit - rStart) - (int32_t)(lLimit - lStart); + diff = static_cast<int32_t>(rLimit - rStart) - static_cast<int32_t>(lLimit - lStart); if (diff != 0) { return diff; } @@ -1338,12 +1338,14 @@ compareKeySuffixes(const void *context, const void *l, const void *r) { static int32_t U_CALLCONV compareKeyNewpos(const void * /*context*/, const void *l, const void *r) { - return compareInt32(((const KeyMapEntry *)l)->newpos, ((const KeyMapEntry *)r)->newpos); + return compareInt32(static_cast<const KeyMapEntry*>(l)->newpos, + static_cast<const KeyMapEntry*>(r)->newpos); } static int32_t U_CALLCONV compareKeyOldpos(const void * /*context*/, const void *l, const void *r) { - return compareInt32(((const KeyMapEntry *)l)->oldpos, ((const KeyMapEntry *)r)->oldpos); + return compareInt32(static_cast<const KeyMapEntry*>(l)->oldpos, + static_cast<const KeyMapEntry*>(r)->oldpos); } void SResource::collectKeys(std::function<void(int32_t)> collector) const { @@ -1379,15 +1381,15 @@ SRBRoot::compactKeys(UErrorCode &errorCode) { if (U_FAILURE(errorCode) || fKeyMap != nullptr) { return; } - map = (KeyMapEntry *)uprv_malloc(keysCount * sizeof(KeyMapEntry)); + map = static_cast<KeyMapEntry*>(uprv_malloc(keysCount * sizeof(KeyMapEntry))); if (map == nullptr) { errorCode = U_MEMORY_ALLOCATION_ERROR; return; } - keys = (char *)fUsePoolBundle->fKeys; + keys = const_cast<char*>(fUsePoolBundle->fKeys); for (i = 0; i < fUsePoolBundle->fKeysCount; ++i) { map[i].oldpos = - (int32_t)(keys - fUsePoolBundle->fKeys) | 0x80000000; /* negative oldpos */ + static_cast<int32_t>(keys - fUsePoolBundle->fKeys) | 0x80000000; /* negative oldpos */ map[i].newpos = 0; while (*keys != 0) { ++keys; } /* skip the key */ ++keys; /* skip the NUL */ @@ -1412,7 +1414,7 @@ SRBRoot::compactKeys(UErrorCode &errorCode) { fKeysTop = static_cast<int32_t>(keys - fKeys); } /* Sort the keys so that each one is immediately followed by all of its suffixes. */ - uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry), + uprv_sortArray(map, keysCount, static_cast<int32_t>(sizeof(KeyMapEntry)), compareKeySuffixes, this, false, &errorCode); /* * Make suffixes point into earlier, longer strings that contain them @@ -1465,7 +1467,7 @@ SRBRoot::compactKeys(UErrorCode &errorCode) { * Re-sort by newpos, then modify the key characters array in-place * to squeeze out unused bytes, and readjust the newpos offsets. */ - uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry), + uprv_sortArray(map, keysCount, static_cast<int32_t>(sizeof(KeyMapEntry)), compareKeyNewpos, nullptr, false, &errorCode); if (U_SUCCESS(errorCode)) { int32_t oldpos, newpos, limit; @@ -1490,7 +1492,7 @@ SRBRoot::compactKeys(UErrorCode &errorCode) { } fKeysTop = newpos; /* Re-sort once more, by old offsets for binary searching. */ - uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry), + uprv_sortArray(map, keysCount, static_cast<int32_t>(sizeof(KeyMapEntry)), compareKeyOldpos, nullptr, false, &errorCode); if (U_SUCCESS(errorCode)) { /* key size reduction by limit - newpos */ @@ -1504,8 +1506,8 @@ SRBRoot::compactKeys(UErrorCode &errorCode) { static int32_t U_CALLCONV compareStringSuffixes(const void * /*context*/, const void *l, const void *r) { - const StringResource *left = *((const StringResource **)l); - const StringResource *right = *((const StringResource **)r); + const StringResource *left = *static_cast<const StringResource* const*>(l); + const StringResource *right = *static_cast<const StringResource* const*>(r); const char16_t *lStart = left->getBuffer(); const char16_t *lLimit = lStart + left->length(); const char16_t *rStart = right->getBuffer(); @@ -1513,7 +1515,7 @@ compareStringSuffixes(const void * /*context*/, const void *l, const void *r) { int32_t diff; /* compare keys in reverse character order */ while (lStart < lLimit && rStart < rLimit) { - diff = (int32_t)*--lLimit - (int32_t)*--rLimit; + diff = static_cast<int32_t>(*--lLimit) - static_cast<int32_t>(*--rLimit); if (diff != 0) { return diff; } @@ -1524,11 +1526,11 @@ compareStringSuffixes(const void * /*context*/, const void *l, const void *r) { static int32_t U_CALLCONV compareStringLengths(const void * /*context*/, const void *l, const void *r) { - const StringResource *left = *((const StringResource **)l); - const StringResource *right = *((const StringResource **)r); + const StringResource *left = *static_cast<const StringResource* const*>(l); + const StringResource *right = *static_cast<const StringResource* const*>(r); int32_t diff; /* Make "is suffix of another string" compare greater than a non-suffix. */ - diff = (int)(left->fSame != nullptr) - (int)(right->fSame != nullptr); + diff = static_cast<int>(left->fSame != nullptr) - static_cast<int>(right->fSame != nullptr); if (diff != 0) { return diff; } @@ -1555,22 +1557,22 @@ StringResource::writeUTF16v2(int32_t base, UnicodeString &dest) { case 0: break; case 1: - dest.append((char16_t)(0xdc00 + len)); + dest.append(static_cast<char16_t>(0xdc00 + len)); break; case 2: - dest.append((char16_t)(0xdfef + (len >> 16))); - dest.append((char16_t)len); + dest.append(static_cast<char16_t>(0xdfef + (len >> 16))); + dest.append(static_cast<char16_t>(len)); break; case 3: - dest.append((char16_t)0xdfff); - dest.append((char16_t)(len >> 16)); - dest.append((char16_t)len); + dest.append(static_cast<char16_t>(0xdfff)); + dest.append(static_cast<char16_t>(len >> 16)); + dest.append(static_cast<char16_t>(len)); break; default: break; /* will not occur */ } dest.append(fString); - dest.append((char16_t)0); + dest.append(static_cast<char16_t>(0)); } void @@ -1587,10 +1589,10 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) { return; } for (int32_t pos = UHASH_FIRST, i = 0; i < count; ++i) { - array[i] = (StringResource *)uhash_nextElement(stringSet, &pos)->key.pointer; + array[i] = static_cast<StringResource*>(uhash_nextElement(stringSet, &pos)->key.pointer); } /* Sort the strings so that each one is immediately followed by all of its suffixes. */ - uprv_sortArray(array.getAlias(), count, (int32_t)sizeof(struct SResource **), + uprv_sortArray(array.getAlias(), count, static_cast<int32_t>(sizeof(struct SResource**)), compareStringSuffixes, nullptr, false, &errorCode); if (U_FAILURE(errorCode)) { return; @@ -1627,7 +1629,7 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) { // Compute the resource word and collect the maximum. suffixRes->fRes = res->fRes + res->fNumCharsForLength + suffixRes->fSuffixOffset; - int32_t poolStringIndex = (int32_t)RES_GET_OFFSET(suffixRes->fRes); + int32_t poolStringIndex = static_cast<int32_t>(RES_GET_OFFSET(suffixRes->fRes)); if (poolStringIndex >= fPoolStringIndexLimit) { fPoolStringIndexLimit = poolStringIndex + 1; } @@ -1648,7 +1650,7 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) { * to optimize for URES_TABLE16 and URES_ARRAY16: * Keep as many as possible within reach of 16-bit offsets. */ - uprv_sortArray(array.getAlias(), count, (int32_t)sizeof(struct SResource **), + uprv_sortArray(array.getAlias(), count, static_cast<int32_t>(sizeof(struct SResource**)), compareStringLengths, nullptr, false, &errorCode); if (U_FAILURE(errorCode)) { return; @@ -1679,13 +1681,13 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) { errorCode = U_MEMORY_ALLOCATION_ERROR; } if (getShowWarning()) { // not quiet - printf("number of shared strings: %d\n", (int)numStringsWritten); + printf("number of shared strings: %d\n", static_cast<int>(numStringsWritten)); printf("16-bit units for strings: %6d = %6d bytes\n", - (int)f16BitUnits.length(), (int)f16BitUnits.length() * 2); + static_cast<int>(f16BitUnits.length()), static_cast<int>(f16BitUnits.length()) * 2); printf("16-bit units saved: %6d = %6d bytes\n", - (int)numUnitsSaved, (int)numUnitsSaved * 2); + static_cast<int>(numUnitsSaved), static_cast<int>(numUnitsSaved) * 2); printf("16-bit units not saved: %6d = %6d bytes\n", - (int)numUnitsNotSaved, (int)numUnitsNotSaved * 2); + static_cast<int>(numUnitsNotSaved), static_cast<int>(numUnitsNotSaved) * 2); } } else { assert(fPoolStringIndexLimit <= fUsePoolBundle->fStringIndexLimit); @@ -1728,7 +1730,7 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) { StringResource *same = res->fSame; assert(res->length() != same->length()); // Set strings are unique. res->fRes = same->fRes + same->fNumCharsForLength + res->fSuffixOffset; - int32_t localStringIndex = (int32_t)RES_GET_OFFSET(res->fRes) - fPoolStringIndexLimit; + int32_t localStringIndex = static_cast<int32_t>(RES_GET_OFFSET(res->fRes)) - fPoolStringIndexLimit; // Suffixes of pool strings have been set already. assert(localStringIndex >= 0); if (localStringIndex >= fLocalStringIndexLimit) { diff --git a/deps/icu-small/source/tools/genrb/rle.c b/deps/icu-small/source/tools/genrb/rle.c index 0025be207e945f..68427764aca362 100644 --- a/deps/icu-small/source/tools/genrb/rle.c +++ b/deps/icu-small/source/tools/genrb/rle.c @@ -162,12 +162,12 @@ usArrayToRLEString(const uint16_t* src,int32_t srcLen,uint16_t* buffer, int32_t if (s == runValue && runLength < 0xFFFF){ ++runLength; }else { - buffer = encodeRunShort(buffer,bufLimit, (uint16_t)runValue, runLength,status); + buffer = encodeRunShort(buffer, bufLimit, runValue, runLength, status); runValue = s; runLength = 1; } } - buffer= encodeRunShort(buffer,bufLimit,(uint16_t)runValue, runLength,status); + buffer = encodeRunShort(buffer, bufLimit, runValue, runLength, status); }else{ *status = U_BUFFER_OVERFLOW_ERROR; } diff --git a/deps/icu-small/source/tools/genrb/wrtjava.cpp b/deps/icu-small/source/tools/genrb/wrtjava.cpp index 65a1920ad77507..adaf4602109057 100644 --- a/deps/icu-small/source/tools/genrb/wrtjava.cpp +++ b/deps/icu-small/source/tools/genrb/wrtjava.cpp @@ -122,18 +122,18 @@ uCharsToChars(char *target, int32_t targetLen, const char16_t *source, int32_t s if(source[i-1]=='\''){ if(j+2<targetLen){ uprv_strcat(target,"\\"); - target[j+1]= (char)source[i]; + target[j + 1] = static_cast<char>(source[i]); } j+=2; }else if(source[i-1]!='\\'){ if(j+2<targetLen){ uprv_strcat(target,"\\"); - target[j+1]= (char)source[i]; + target[j + 1] = static_cast<char>(source[i]); } j+=2; }else if(source[i-1]=='\\'){ - target[j++]= (char)source[i]; + target[j++] = static_cast<char>(source[i]); } }else if(source[i]=='\\'){ if(i+1<sourceLen){ @@ -161,7 +161,7 @@ uCharsToChars(char *target, int32_t targetLen, const char16_t *source, int32_t s break; default : if(j<targetLen){ - target[j]=(char)source[i]; + target[j] = static_cast<char>(source[i]); } j++; break; @@ -174,7 +174,7 @@ uCharsToChars(char *target, int32_t targetLen, const char16_t *source, int32_t s } }else if(source[i]>=0x20 && source[i]<0x7F/*ASCII*/){ if(j<targetLen){ - target[j] = (char) source[i]; + target[j] = static_cast<char>(source[i]); } j++; }else{ @@ -208,11 +208,11 @@ strrch(const char* source,uint32_t sourceLen,char find){ const char* tSourceEnd =source + (sourceLen-1); while(tSourceEnd>= source){ if(*tSourceEnd==find){ - return (uint32_t)(tSourceEnd-source); + return static_cast<uint32_t>(tSourceEnd - source); } tSourceEnd--; } - return (uint32_t)(tSourceEnd-source); + return static_cast<uint32_t>(tSourceEnd - source); } static int32_t getColumnCount(int32_t len){ @@ -234,7 +234,7 @@ str_write_java(const char16_t *src, int32_t srcLen, UBool printEndLine, UErrorCo uint32_t length = srcLen*8; uint32_t bufLen = 0; uint32_t columnCount; - char* buf = (char*) malloc(sizeof(char)*length); + char* buf = static_cast<char*>(malloc(sizeof(char) * length)); if(buf == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; @@ -353,11 +353,11 @@ array_write_java(const ArrayResource *res, UErrorCode *status) { if(allStrings==false){ const char* object = "new Object[]{\n"; write_tabs(out); - T_FileStream_write(out, object, (int32_t)uprv_strlen(object)); + T_FileStream_write(out, object, static_cast<int32_t>(uprv_strlen(object))); tabCount++; }else{ write_tabs(out); - T_FileStream_write(out, arr, (int32_t)uprv_strlen(arr)); + T_FileStream_write(out, arr, static_cast<int32_t>(uprv_strlen(arr))); tabCount++; } while (current != nullptr) { @@ -378,7 +378,7 @@ array_write_java(const ArrayResource *res, UErrorCode *status) { } else { write_tabs(out); - T_FileStream_write(out,arr,(int32_t)uprv_strlen(arr)); + T_FileStream_write(out, arr, static_cast<int32_t>(uprv_strlen(arr))); write_tabs(out); T_FileStream_write(out,"},\n",3); } @@ -397,7 +397,7 @@ intvector_write_java(const IntVectorResource *res, UErrorCode * /*status*/) { write_tabs(out); if(resname != nullptr && uprv_strcmp(resname,"DateTimeElements")==0){ - T_FileStream_write(out, stringArr, (int32_t)uprv_strlen(stringArr)); + T_FileStream_write(out, stringArr, static_cast<int32_t>(uprv_strlen(stringArr))); tabCount++; for(i = 0; i<res->fCount; i++) { write_tabs(out); @@ -408,7 +408,7 @@ intvector_write_java(const IntVectorResource *res, UErrorCode * /*status*/) { T_FileStream_write(out,"\n",1); } }else{ - T_FileStream_write(out, intArr, (int32_t)uprv_strlen(intArr)); + T_FileStream_write(out, intArr, static_cast<int32_t>(uprv_strlen(intArr))); tabCount++; for(i = 0; i<res->fCount; i++) { write_tabs(out); @@ -434,7 +434,7 @@ int_write_java(const IntResource *res, UErrorCode * /*status*/) { /* write the binary data */ write_tabs(out); - T_FileStream_write(out, intC, (int32_t)uprv_strlen(intC)); + T_FileStream_write(out, intC, static_cast<int32_t>(uprv_strlen(intC))); len=itostr(buf, res->fValue, 10, 0); T_FileStream_write(out,buf,len); T_FileStream_write(out,"),\n",3 ); @@ -454,7 +454,7 @@ bytes_write_java(const BinaryResource *res, UErrorCode * /*status*/) { byteArray = res->fData; write_tabs(out); - T_FileStream_write(out, type, (int32_t)uprv_strlen(type)); + T_FileStream_write(out, type, static_cast<int32_t>(uprv_strlen(type))); T_FileStream_write(out, "\n", 1); tabCount++; @@ -474,7 +474,7 @@ bytes_write_java(const BinaryResource *res, UErrorCode * /*status*/) { snprintf(byteBuffer, sizeof(byteBuffer), byteDecl, (byteArray[byteIterator]-256)); } - T_FileStream_write(out, byteBuffer, (int32_t)uprv_strlen(byteBuffer)); + T_FileStream_write(out, byteBuffer, static_cast<int32_t>(uprv_strlen(byteBuffer))); if (byteIterator%16 == 15) { @@ -497,7 +497,7 @@ bytes_write_java(const BinaryResource *res, UErrorCode * /*status*/) { { /* Empty array */ write_tabs(out); - T_FileStream_write(out,type,(int32_t)uprv_strlen(type)); + T_FileStream_write(out, type, static_cast<int32_t>(uprv_strlen(type))); T_FileStream_write(out,"},\n",3); } @@ -518,7 +518,7 @@ table_write_java(const TableResource *res, UErrorCode *status) { if (res->fCount > 0) { if(start==false){ write_tabs(out); - T_FileStream_write(out, obj, (int32_t)uprv_strlen(obj)); + T_FileStream_write(out, obj, static_cast<int32_t>(uprv_strlen(obj))); tabCount++; } start = false; @@ -541,7 +541,7 @@ table_write_java(const TableResource *res, UErrorCode *status) { if(currentKeyString != nullptr) { T_FileStream_write(out, "\"", 1); T_FileStream_write(out, currentKeyString, - (int32_t)uprv_strlen(currentKeyString)); + static_cast<int32_t>(uprv_strlen(currentKeyString))); T_FileStream_write(out, "\",\n", 2); T_FileStream_write(out, "\n", 1); @@ -564,7 +564,7 @@ table_write_java(const TableResource *res, UErrorCode *status) { } else { write_tabs(out); - T_FileStream_write(out,obj,(int32_t)uprv_strlen(obj)); + T_FileStream_write(out, obj, static_cast<int32_t>(uprv_strlen(obj))); write_tabs(out); T_FileStream_write(out,"},\n",3); @@ -662,15 +662,15 @@ bundle_write_java(struct SRBRoot *bundle, const char *outputDir,const char* outp return; } if(getIncludeCopyright()){ - T_FileStream_write(out, copyRight, (int32_t)uprv_strlen(copyRight)); - T_FileStream_write(out, warningMsg, (int32_t)uprv_strlen(warningMsg)); + T_FileStream_write(out, copyRight, static_cast<int32_t>(uprv_strlen(copyRight))); + T_FileStream_write(out, warningMsg, static_cast<int32_t>(uprv_strlen(warningMsg))); } - T_FileStream_write(out,"package ",(int32_t)uprv_strlen("package ")); - T_FileStream_write(out,pName,(int32_t)uprv_strlen(pName)); + T_FileStream_write(out, "package ", static_cast<int32_t>(uprv_strlen("package "))); + T_FileStream_write(out, pName, static_cast<int32_t>(uprv_strlen(pName))); T_FileStream_write(out,";\n\n",3); - T_FileStream_write(out, javaClass, (int32_t)uprv_strlen(javaClass)); - T_FileStream_write(out, className, (int32_t)uprv_strlen(className)); - T_FileStream_write(out, javaClass1, (int32_t)uprv_strlen(javaClass1)); + T_FileStream_write(out, javaClass, static_cast<int32_t>(uprv_strlen(javaClass))); + T_FileStream_write(out, className, static_cast<int32_t>(uprv_strlen(className))); + T_FileStream_write(out, javaClass1, static_cast<int32_t>(uprv_strlen(javaClass1))); /* if(j1){ T_FileStream_write(out, javaClass1, (int32_t)uprv_strlen(javaClass1)); @@ -690,7 +690,7 @@ bundle_write_java(struct SRBRoot *bundle, const char *outputDir,const char* outp } res_write_java(bundle->fRoot, status); - T_FileStream_write(out, closeClass, (int32_t)uprv_strlen(closeClass)); + T_FileStream_write(out, closeClass, static_cast<int32_t>(uprv_strlen(closeClass))); T_FileStream_close(out); diff --git a/deps/icu-small/source/tools/genrb/wrtxml.cpp b/deps/icu-small/source/tools/genrb/wrtxml.cpp index 0efed8e6bd415d..24ddf52e07892b 100644 --- a/deps/icu-small/source/tools/genrb/wrtxml.cpp +++ b/deps/icu-small/source/tools/genrb/wrtxml.cpp @@ -78,7 +78,7 @@ static int32_t write_utf8_file(FileStream* fileStream, UnicodeString outString) &status); // allocate the buffer - char* dest = (char*)uprv_malloc(len); + char* dest = static_cast<char*>(uprv_malloc(len)); status = U_ZERO_ERROR; // convert the data @@ -106,11 +106,11 @@ static void write_tabs(FileStream* os){ /*get ID for each element. ID is globally unique.*/ static char* getID(const char* id, const char* curKey, char* result) { if(curKey == nullptr) { - result = (char *)uprv_malloc(sizeof(char)*uprv_strlen(id) + 1); + result = static_cast<char*>(uprv_malloc(sizeof(char) * uprv_strlen(id) + 1)); uprv_memset(result, 0, sizeof(char)*uprv_strlen(id) + 1); uprv_strcpy(result, id); } else { - result = (char *)uprv_malloc(sizeof(char)*(uprv_strlen(id) + 1 + uprv_strlen(curKey)) + 1); + result = static_cast<char*>(uprv_malloc(sizeof(char) * (uprv_strlen(id) + 1 + uprv_strlen(curKey)) + 1)); uprv_memset(result, 0, sizeof(char)*(uprv_strlen(id) + 1 + uprv_strlen(curKey)) + 1); if(id[0]!='\0'){ uprv_strcpy(result, id); @@ -165,7 +165,7 @@ uint32_t computeCRC(const char *ptr, uint32_t len, uint32_t lastcrc){ crc = lastcrc; while(len--!=0) { - temp1 = (uint32_t)crc>>8; + temp1 = static_cast<uint32_t>(crc) >> 8; temp2 = crc_ta[(crc^*ptr) & 0xFF]; crc = temp1^temp2; ptr++; @@ -186,8 +186,8 @@ static void strnrepchr(char* src, int32_t srcLen, char s, char r){ * use "en" as the default value for language */ static char* parseFilename(const char* id, char* /*lang*/) { - int idLen = (int) uprv_strlen(id); - char* localeID = (char*) uprv_malloc(idLen); + int idLen = static_cast<int>(uprv_strlen(id)); + char* localeID = static_cast<char*>(uprv_malloc(idLen+1)); int pos = 0; int canonCapacity = 0; char* canon = nullptr; @@ -197,7 +197,7 @@ static char* parseFilename(const char* id, char* /*lang*/) { const char *ext = uprv_strchr(id, '.'); if(ext != nullptr){ - pos = (int) (ext - id); + pos = static_cast<int>(ext - id); } else { pos = idLen; } @@ -205,7 +205,7 @@ static char* parseFilename(const char* id, char* /*lang*/) { localeID[pos]=0; /* NUL terminate the string */ canonCapacity =pos*3; - canon = (char*) uprv_malloc(canonCapacity); + canon = static_cast<char*>(uprv_malloc(canonCapacity)); canonLen = uloc_canonicalize(localeID, canon, canonCapacity, &status); if(U_FAILURE(status)){ @@ -246,7 +246,7 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength dest =*pDest; if(dest==nullptr || destCap <=0){ destCap = srcLen * 8; - dest = (char*) uprv_malloc(sizeof(char) * destCap); + dest = static_cast<char*>(uprv_malloc(sizeof(char) * destCap)); if(dest==nullptr){ *status=U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -272,23 +272,23 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength switch(c) { case '\x26': uprv_strcpy(dest+( destLen),"\x26\x61\x6d\x70\x3b"); /* &*/ - destLen+=(int32_t)uprv_strlen("\x26\x61\x6d\x70\x3b"); + destLen += static_cast<int32_t>(uprv_strlen("\x26\x61\x6d\x70\x3b")); break; case '\x3c': uprv_strcpy(dest+(destLen),"\x26\x6c\x74\x3b"); /* <*/ - destLen+=(int32_t)uprv_strlen("\x26\x6c\x74\x3b"); + destLen += static_cast<int32_t>(uprv_strlen("\x26\x6c\x74\x3b")); break; case '\x3e': uprv_strcpy(dest+(destLen),"\x26\x67\x74\x3b"); /* >*/ - destLen+=(int32_t)uprv_strlen("\x26\x67\x74\x3b"); + destLen += static_cast<int32_t>(uprv_strlen("\x26\x67\x74\x3b")); break; case '\x22': uprv_strcpy(dest+(destLen),"\x26\x71\x75\x6f\x74\x3b"); /* "*/ - destLen+=(int32_t)uprv_strlen("\x26\x71\x75\x6f\x74\x3b"); + destLen += static_cast<int32_t>(uprv_strlen("\x26\x71\x75\x6f\x74\x3b")); break; case '\x27': uprv_strcpy(dest+(destLen),"\x26\x61\x70\x6f\x73\x3b"); /* ' */ - destLen+=(int32_t)uprv_strlen("\x26\x61\x70\x6f\x73\x3b"); + destLen += static_cast<int32_t>(uprv_strlen("\x26\x61\x70\x6f\x73\x3b")); break; /* Disallow C0 controls except TAB, CR, LF*/ @@ -325,18 +325,18 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength case 0x1E: case 0x1F: *status = U_ILLEGAL_CHAR_FOUND; - fprintf(stderr, "Illegal Character \\u%04X!\n",(int)c); + fprintf(stderr, "Illegal Character \\u%04X!\n", static_cast<int>(c)); uprv_free(dest); return nullptr; default: - dest[destLen++]=(char)c; + dest[destLen++] = static_cast<char>(c); } }else{ UBool isError = false; U8_APPEND((unsigned char*)dest,destLen,destCap,c,isError); if(isError){ *status = U_ILLEGAL_CHAR_FOUND; - fprintf(stderr, "Illegal Character \\U%08X!\n",(int)c); + fprintf(stderr, "Illegal Character \\U%08X!\n", static_cast<int>(c)); uprv_free(dest); return nullptr; } @@ -344,7 +344,7 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength }else{ destCap += destLen; - temp = (char*) uprv_malloc(sizeof(char)*destCap); + temp = static_cast<char*>(uprv_malloc(sizeof(char) * destCap)); if(temp==nullptr){ *status=U_MEMORY_ALLOCATION_ERROR; uprv_free(dest); @@ -406,7 +406,7 @@ print(char16_t* src, int32_t srcLen,const char *tagStart,const char *tagEnd, UE return; } - buf = (char*) (uprv_malloc(bufCapacity)); + buf = static_cast<char*>(uprv_malloc(bufCapacity)); if (buf == nullptr) { fprintf(stderr, "Could not allocate memory!!"); exit(U_MEMORY_ALLOCATION_ERROR); @@ -438,7 +438,7 @@ printNoteElements(const UString *src, UErrorCode *status){ } capacity = src->fLength; - note = (char16_t*) uprv_malloc(U_SIZEOF_UCHAR * capacity); + note = static_cast<char16_t*>(uprv_malloc(U_SIZEOF_UCHAR * capacity)); count = getCount(src->fChars,src->fLength, UPC_NOTE, status); if(U_FAILURE(*status)){ @@ -497,8 +497,8 @@ printComments(struct UString *src, const char *resName, UBool printTranslate, UE int32_t capacity = src->fLength + 1; char* buf = nullptr; int32_t bufLen = 0; - char16_t* desc = (char16_t*) uprv_malloc(U_SIZEOF_UCHAR * capacity); - char16_t* trans = (char16_t*) uprv_malloc(U_SIZEOF_UCHAR * capacity); + char16_t* desc = static_cast<char16_t*>(uprv_malloc(U_SIZEOF_UCHAR * capacity)); + char16_t* trans = static_cast<char16_t*>(uprv_malloc(U_SIZEOF_UCHAR * capacity)); int32_t descLen = 0, transLen=0; if(desc==nullptr || trans==nullptr){ @@ -567,18 +567,18 @@ static char *printContainer(SResource *res, const char *container, const char *r write_utf8_file(out, UnicodeString("<")); write_utf8_file(out, UnicodeString(container)); - printAttribute("id", sid, (int32_t) uprv_strlen(sid)); + printAttribute("id", sid, static_cast<int32_t>(uprv_strlen(sid))); if (resname != nullptr) { - printAttribute("resname", resname, (int32_t) uprv_strlen(resname)); + printAttribute("resname", resname, static_cast<int32_t>(uprv_strlen(resname))); } if (mimetype != nullptr) { - printAttribute("mime-type", mimetype, (int32_t) uprv_strlen(mimetype)); + printAttribute("mime-type", mimetype, static_cast<int32_t>(uprv_strlen(mimetype))); } if (restype != nullptr) { - printAttribute("restype", restype, (int32_t) uprv_strlen(restype)); + printAttribute("restype", restype, static_cast<int32_t>(uprv_strlen(restype))); } tabCount += 1; @@ -639,6 +639,8 @@ string_write_xml(StringResource *res, const char* id, const char* /*language*/, buf = convertAndEscape(&buf, 0, &bufLen, res->getBuffer(), res->length(), status); if (U_FAILURE(*status)) { + uprv_free(buf); + uprv_free(sid); return; } @@ -671,6 +673,8 @@ alias_write_xml(AliasResource *res, const char* id, const char* /*language*/, UE buf = convertAndEscape(&buf, 0, &bufLen, res->getBuffer(), res->length(), status); if(U_FAILURE(*status)){ + uprv_free(buf); + uprv_free(sid); return; } write_utf8_file(out, UnicodeString(buf, bufLen, "UTF-8")); @@ -711,6 +715,7 @@ array_write_xml(ArrayResource *res, const char* id, const char* language, UError subId = nullptr; if(U_FAILURE(*status)){ + uprv_free(sid); return; } @@ -745,8 +750,8 @@ intvector_write_xml(IntVectorResource *res, const char* id, const char* /*langua write_utf8_file(out, UnicodeString("<")); write_utf8_file(out, UnicodeString(trans_unit)); - printAttribute("id", ivd, (int32_t)uprv_strlen(ivd)); - printAttribute("restype", integer_restype, (int32_t) strlen(integer_restype)); + printAttribute("id", ivd, static_cast<int32_t>(uprv_strlen(ivd))); + printAttribute("restype", integer_restype, static_cast<int32_t>(strlen(integer_restype))); write_utf8_file(out, UnicodeString(">\n")); @@ -808,10 +813,10 @@ bin_write_xml(BinaryResource *res, const char* id, const char* /*language*/, UEr uint32_t crc = 0xFFFFFFFF; char fileName[1024] ={0}; - int32_t tLen = ( outDir == nullptr) ? 0 :(int32_t)uprv_strlen(outDir); - char* fn = (char*) uprv_malloc(sizeof(char) * (tLen+1024 + + int32_t tLen = outDir == nullptr ? 0 : static_cast<int32_t>(uprv_strlen(outDir)); + char* fn = static_cast<char*>(uprv_malloc(sizeof(char) * (tLen + 1024 + (res->fFileName !=nullptr ? - uprv_strlen(res->fFileName) :0))); + uprv_strlen(res->fFileName) :0)))); const char* ext = nullptr; char* f = nullptr; @@ -855,7 +860,7 @@ bin_write_xml(BinaryResource *res, const char* id, const char* /*language*/, UEr write_tabs(out); write_utf8_file(out, UnicodeString(external_file)); - printAttribute("href", f, (int32_t)uprv_strlen(f)); + printAttribute("href", f, static_cast<int32_t>(uprv_strlen(f))); write_utf8_file(out, UnicodeString("/>\n")); tabCount -= 1; write_tabs(out); @@ -880,7 +885,7 @@ bin_write_xml(BinaryResource *res, const char* id, const char* /*language*/, UEr write_tabs(out); write_utf8_file(out, UnicodeString(internal_file)); - printAttribute("form", application_mimetype, (int32_t) uprv_strlen(application_mimetype)); + printAttribute("form", application_mimetype, static_cast<int32_t>(uprv_strlen(application_mimetype))); while(i <res->fLength){ len = itostr(temp, res->fData[i], 16, 2); @@ -943,6 +948,7 @@ table_write_xml(TableResource *res, const char* id, const char* language, UBool res_write_xml(current, sid, language, false, status); if(U_FAILURE(*status)){ + uprv_free(sid); return; } @@ -1038,12 +1044,12 @@ bundle_write_xml(struct SRBRoot *bundle, const char *outputDir,const char* outpu pos = uprv_strrchr(filename, '\\'); if(pos != nullptr) { - first = (int32_t)(pos - filename + 1); + first = static_cast<int32_t>(pos - filename + 1); } else { first = 0; } - index = (int32_t)(uprv_strlen(filename) - uprv_strlen(textExt) - first); - originalFileName = (char *)uprv_malloc(sizeof(char)*index+1); + index = static_cast<int32_t>(uprv_strlen(filename) - uprv_strlen(textExt) - first); + originalFileName = static_cast<char*>(uprv_malloc(sizeof(char) * index + 1)); uprv_memset(originalFileName, 0, sizeof(char)*index+1); uprv_strncpy(originalFileName, filename + first, index); @@ -1052,7 +1058,7 @@ bundle_write_xml(struct SRBRoot *bundle, const char *outputDir,const char* outpu } temp = originalFileName; - originalFileName = (char *)uprv_malloc(sizeof(char)* (uprv_strlen(temp)+uprv_strlen(textExt)) + 1); + originalFileName = static_cast<char*>(uprv_malloc(sizeof(char) * (uprv_strlen(temp) + uprv_strlen(textExt)) + 1)); uprv_memset(originalFileName, 0, sizeof(char)* (uprv_strlen(temp)+uprv_strlen(textExt)) + 1); uprv_strcat(originalFileName, temp); uprv_strcat(originalFileName, textExt); @@ -1088,26 +1094,26 @@ bundle_write_xml(struct SRBRoot *bundle, const char *outputDir,const char* outpu } /* }*/ } else { - lang = (char *)uprv_malloc(sizeof(char)*uprv_strlen(language) +1); + lang = static_cast<char*>(uprv_malloc(sizeof(char) * uprv_strlen(language) + 1)); uprv_memset(lang, 0, sizeof(char)*uprv_strlen(language) +1); uprv_strcpy(lang, language); } if(outFileName) { - outputFileName = (char *)uprv_malloc(sizeof(char)*uprv_strlen(outFileName) + 1); + outputFileName = static_cast<char*>(uprv_malloc(sizeof(char) * uprv_strlen(outFileName) + 1)); uprv_memset(outputFileName, 0, sizeof(char)*uprv_strlen(outFileName) + 1); uprv_strcpy(outputFileName,outFileName); } else { - outputFileName = (char *)uprv_malloc(sizeof(char)*uprv_strlen(srBundle->fLocale) + 1); + outputFileName = static_cast<char*>(uprv_malloc(sizeof(char) * uprv_strlen(srBundle->fLocale) + 1)); uprv_memset(outputFileName, 0, sizeof(char)*uprv_strlen(srBundle->fLocale) + 1); uprv_strcpy(outputFileName,srBundle->fLocale); } if(outputDir) { - xmlfileName = (char *)uprv_malloc(sizeof(char)*(uprv_strlen(outputDir) + uprv_strlen(outputFileName) + uprv_strlen(xliffExt) + 1) +1); + xmlfileName = static_cast<char*>(uprv_malloc(sizeof(char) * (uprv_strlen(outputDir) + uprv_strlen(outputFileName) + uprv_strlen(xliffExt) + 1) + 1)); uprv_memset(xmlfileName, 0, sizeof(char)*(uprv_strlen(outputDir)+ uprv_strlen(outputFileName) + uprv_strlen(xliffExt) + 1) +1); } else { - xmlfileName = (char *)uprv_malloc(sizeof(char)*(uprv_strlen(outputFileName) + uprv_strlen(xliffExt)) +1); + xmlfileName = static_cast<char*>(uprv_malloc(sizeof(char) * (uprv_strlen(outputFileName) + uprv_strlen(xliffExt)) + 1)); uprv_memset(xmlfileName, 0, sizeof(char)*(uprv_strlen(outputFileName) + uprv_strlen(xliffExt)) +1); } @@ -1170,8 +1176,8 @@ bundle_write_xml(struct SRBRoot *bundle, const char *outputDir,const char* outpu write_tabs(out); write_utf8_file(out, UnicodeString(tool_start)); - printAttribute("tool-id", tool_id, (int32_t) uprv_strlen(tool_id)); - printAttribute("tool-name", tool_name, (int32_t) uprv_strlen(tool_name)); + printAttribute("tool-id", tool_id, static_cast<int32_t>(uprv_strlen(tool_id))); + printAttribute("tool-name", tool_name, static_cast<int32_t>(uprv_strlen(tool_name))); write_utf8_file(out, UnicodeString("/>\n")); tabCount -= 1; diff --git a/deps/icu-small/source/tools/icuexportdata/icuexportdata.cpp b/deps/icu-small/source/tools/icuexportdata/icuexportdata.cpp index 4aea2c1e285ac8..987a6bc7f6f8f1 100644 --- a/deps/icu-small/source/tools/icuexportdata/icuexportdata.cpp +++ b/deps/icu-small/source/tools/icuexportdata/icuexportdata.cpp @@ -110,9 +110,9 @@ int32_t scxCodePoints[] = { 2386, 2385, 43059, 43060, 43061, 43056, 43057, 43058, 2404, 2405 }; -void handleError(ErrorCode& status, const char* context) { +void handleError(ErrorCode& status, int line, const char* context) { if (status.isFailure()) { - std::cerr << "Error: " << context << ": " << status.errorName() << std::endl; + std::cerr << "Error[" << line << "]: " << context << ": " << status.errorName() << std::endl; exit(status.reset()); } } @@ -138,7 +138,7 @@ void dumpPropertyAliases(UProperty uproperty, FILE* f) { while(true) { // The API works by having extra names after U_LONG_PROPERTY_NAME, sequentially, // and returning null after that - const char* alias = u_getPropertyName(uproperty, (UPropertyNameChoice) i); + const char* alias = u_getPropertyName(uproperty, static_cast<UPropertyNameChoice>(i)); if (!alias) { break; } @@ -159,7 +159,7 @@ void dumpBinaryProperty(UProperty uproperty, FILE* f) { const char* fullPropName = u_getPropertyName(uproperty, U_LONG_PROPERTY_NAME); const char* shortPropName = u_getPropertyName(uproperty, U_SHORT_PROPERTY_NAME); const USet* uset = u_getBinaryPropertySet(uproperty, status); - handleError(status, fullPropName); + handleError(status, __LINE__, fullPropName); fputs("[[binary_property]]\n", f); fprintf(f, "long_name = \"%s\"\n", fullPropName); @@ -190,7 +190,7 @@ void dumpValueEntry(UProperty uproperty, int v, bool is_mask, FILE* f) { while(true) { // The API works by having extra names after U_LONG_PROPERTY_NAME, sequentially, // and returning null after that - const char* alias = u_getPropertyValueName(uproperty, v, (UPropertyNameChoice) i); + const char* alias = u_getPropertyValueName(uproperty, v, static_cast<UPropertyNameChoice>(i)); if (!alias) { break; } @@ -212,7 +212,7 @@ void dumpEnumeratedProperty(UProperty uproperty, FILE* f) { const char* fullPropName = u_getPropertyName(uproperty, U_LONG_PROPERTY_NAME); const char* shortPropName = u_getPropertyName(uproperty, U_SHORT_PROPERTY_NAME); const UCPMap* umap = u_getIntPropertyMap(uproperty, status); - handleError(status, fullPropName); + handleError(status, __LINE__, fullPropName); fputs("[[enum_property]]\n", f); fprintf(f, "long_name = \"%s\"\n", fullPropName); @@ -248,7 +248,7 @@ void dumpEnumeratedProperty(UProperty uproperty, FILE* f) { trieType, width, status)); - handleError(status, fullPropName); + handleError(status, __LINE__, fullPropName); fputs("[enum_property.code_point_trie]\n", f); usrc_writeUCPTrie(f, shortPropName, utrie.getAlias(), UPRV_TARGET_SYNTAX_TOML); @@ -265,7 +265,7 @@ void dumpBidiMirroringGlyph(FILE* f) { IcuToolErrorCode status("icuexportdata: dumpBidiMirroringGlyph"); const char* fullPropName = u_getPropertyName(uproperty, U_LONG_PROPERTY_NAME); const char* shortPropName = u_getPropertyName(uproperty, U_SHORT_PROPERTY_NAME); - handleError(status, fullPropName); + handleError(status, __LINE__, fullPropName); // Store 21-bit code point as is UCPTrieValueWidth width = UCPTRIE_VALUE_BITS_32; @@ -290,7 +290,7 @@ void dumpBidiMirroringGlyph(FILE* f) { trieType, width, status)); - handleError(status, fullPropName); + handleError(status, __LINE__, fullPropName); // currently a trie and inversion map are the same (as relied upon in characterproperties.cpp) const UCPMap* umap = reinterpret_cast<UCPMap *>(utrie.getAlias()); @@ -372,9 +372,9 @@ void dumpScriptExtensions(FILE* f) { // Create a mutable UCPTrie builder populated with Script property values data. const UCPMap* scInvMap = u_getIntPropertyMap(UCHAR_SCRIPT, status); - handleError(status, scxFullPropName); + handleError(status, __LINE__, scxFullPropName); LocalUMutableCPTriePointer builder(umutablecptrie_fromUCPMap(scInvMap, status)); - handleError(status, scxFullPropName); + handleError(status, __LINE__, scxFullPropName); // The values for the output scx companion array. // Invariant is that all subvectors are distinct. @@ -389,7 +389,7 @@ void dumpScriptExtensions(FILE* f) { const int32_t SCX_ARRAY_CAPACITY = 32; UScriptCode scxValArray[SCX_ARRAY_CAPACITY]; int32_t numScripts = uscript_getScriptExtensions(cp, scxValArray, SCX_ARRAY_CAPACITY, status); - handleError(status, scxFullPropName); + handleError(status, __LINE__, scxFullPropName); // Convert the scx array into a vector std::vector<uint16_t> scxValVec; @@ -444,7 +444,7 @@ void dumpScriptExtensions(FILE* f) { // Update the code point in the mutable trie builder with the trie value umutablecptrie_set(builder.getAlias(), cp, newScVal, status); - handleError(status, scxFullPropName); + handleError(status, __LINE__, scxFullPropName); } fputs("]\n\n", f); // Print the TOML close delimiter for the outer array. @@ -454,7 +454,7 @@ void dumpScriptExtensions(FILE* f) { trieType, scWidth, status)); - handleError(status, scxFullPropName); + handleError(status, __LINE__, scxFullPropName); fputs("[script_extensions.code_point_trie]\n", f); usrc_writeUCPTrie(f, scxShortPropName, utrie.getAlias(), UPRV_TARGET_SYNTAX_TOML); @@ -468,7 +468,7 @@ FILE* prepareOutputFile(const char* basename) { } outFileName.append(basename, status); outFileName.append(".toml", status); - handleError(status, basename); + handleError(status, __LINE__, basename); FILE* f = fopen(outFileName.data(), "w"); if (f == nullptr) { @@ -527,7 +527,7 @@ void writeCanonicalCompositions(USet* backwardCombiningStarters) { } if (c != composite) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } if (!u_getCombiningClass(second)) { uset_add(backwardCombiningStarters, second); @@ -540,14 +540,14 @@ void writeCanonicalCompositions(USet* backwardCombiningStarters) { UnicodeString backward; backward.append(second); backward.append(starter); - backwardBuilder->add(backward, int32_t(composite), status); + backwardBuilder->add(backward, static_cast<int32_t>(composite), status); } UnicodeString canonicalCompositionTrie; backwardBuilder->buildUnicodeString(USTRINGTRIE_BUILD_SMALL, canonicalCompositionTrie, status); usrc_writeArray(f, "compositions = [\n ", canonicalCompositionTrie.getBuffer(), 16, canonicalCompositionTrie.length(), " ", "\n]\n"); fclose(f); - handleError(status, basename); + handleError(status, __LINE__, basename); } void writeDecompositionTables(const char* basename, const uint16_t* ptr16, size_t len16, const uint32_t* ptr32, size_t len32) { @@ -569,7 +569,7 @@ void writeDecompositionData(const char* basename, uint32_t baseSize16, uint32_t for (int32_t i = pendingTrieInsertions.size() - 1; i >= 0; --i) { const PendingDescriptor& pending = pendingTrieInsertions[i]; uint32_t additional = 0; - if (!(pending.descriptor & 0xFFFE0000)) { + if (!(pending.descriptor & 0xFFFC0000)) { uint32_t offset = pending.descriptor & 0xFFF; if (!pending.supplementary) { if (offset >= baseSize16) { @@ -593,7 +593,7 @@ void writeDecompositionData(const char* basename, uint32_t baseSize16, uint32_t } if (offset + additional > 0xFFF) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } } // It turns out it's better to swap the halves compared to the initial @@ -611,14 +611,14 @@ void writeDecompositionData(const char* basename, uint32_t baseSize16, uint32_t trieType, UCPTRIE_VALUE_BITS_32, status)); - handleError(status, basename); + handleError(status, __LINE__, basename); if (reference) { if (uset_contains(reference, 0xFF9E) || uset_contains(reference, 0xFF9F) || !uset_contains(reference, 0x0345)) { // NFD expectations don't hold. The set must not contain the half-width // kana voicing marks and must contain iota subscript. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } USet* halfWidthVoicing = uset_openEmpty(); @@ -639,7 +639,7 @@ void writeDecompositionData(const char* basename, uint32_t baseSize16, uint32_t // the two half-width voicing marks. The ICU4X // normalizer doesn't know how to deal with this case. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } uset_close(halfWidthCheck); @@ -650,7 +650,7 @@ void writeDecompositionData(const char* basename, uint32_t baseSize16, uint32_t // the iota subscript. The ICU4X normalizer doesn't // know how to deal with this case. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } uset_close(iotaSubscript); @@ -662,7 +662,7 @@ void writeDecompositionData(const char* basename, uint32_t baseSize16, uint32_t fprintf(f, "[trie]\n"); usrc_writeUCPTrie(f, "trie", utrie.getAlias(), UPRV_TARGET_SYNTAX_TOML); fclose(f); - handleError(status, basename); + handleError(status, __LINE__, basename); } // Special marker for the NFKD form of U+FDFA @@ -678,8 +678,19 @@ const int32_t BACKWARD_COMBINING_STARTER_MARKER = 1; /// Marker that a complex decomposition isn't round-trippable /// under re-composition. +/// +/// TODO: When taking a data format break, swap this around with +/// `BACKWARD_COMBINING_STARTER_DECOMPOSITION_MARKER`. const uint32_t NON_ROUND_TRIP_MARKER = 1; +/// Marker that a complex decomposition starts with a starter +/// that can combine backwards. +/// +/// TODO: When taking a data format break, swap this around with +/// `NON_ROUND_TRIP_MARKER` to use the same bit as with characters +/// that decompose to self but can combine backwards. +const uint32_t BACKWARD_COMBINING_STARTER_DECOMPOSITION_MARKER = 2; + UBool permissibleBmpPair(UBool knownToRoundTrip, UChar32 c, UChar32 second) { if (knownToRoundTrip) { return true; @@ -722,7 +733,7 @@ size_t findOrAppend(std::vector<T>& storage, const UChar32* needle, size_t needl if (j == needleLen) { return i; // found a match } - if (storage[i + j] != uint32_t(needle[j])) { + if (storage[i + j] != static_cast<uint32_t>(needle[j])) { break; } } @@ -730,7 +741,7 @@ size_t findOrAppend(std::vector<T>& storage, const UChar32* needle, size_t needl // We didn't find anything. Append, keeping the append index in mind. size_t index = storage.size(); for(size_t i = 0; i < needleLen; i++) { - storage.push_back(T(needle[i])); + storage.push_back(static_cast<T>(needle[i])); } return index; @@ -755,9 +766,12 @@ void computeDecompositions(const char* basename, std::vector<uint32_t> nonRecursive32; LocalUMutableCPTriePointer nonRecursiveBuilder(umutablecptrie_open(0, 0, status)); + UBool uts46 = false; + if (uprv_strcmp(basename, "nfkd") == 0) { mainNormalizer = Normalizer2::getNFKDInstance(status); } else if (uprv_strcmp(basename, "uts46d") == 0) { + uts46 = true; mainNormalizer = Normalizer2::getInstance(nullptr, "uts46", UNORM2_COMPOSE, status); } else { mainNormalizer = nfdNormalizer; @@ -817,30 +831,46 @@ void computeDecompositions(const char* basename, nfcNormalizer->normalize(dst, nfc, status); nonNfdOrRoundTrips = (src == nfc); } + if (uts46) { + // Work around https://unicode-org.atlassian.net/browse/ICU-22658 + // TODO: Remove the workaround after data corresponding to + // https://www.unicode.org/L2/L2024/24061.htm#179-C36 lands + // for Unicode 16. + switch (c) { + case 0x2F868: + dst.truncate(0); + dst.append(static_cast<UChar32>(0x36FC)); + break; + case 0x2F874: + dst.truncate(0); + dst.append(static_cast<UChar32>(0x5F53)); + break; + case 0x2F91F: + dst.truncate(0); + dst.append(static_cast<UChar32>(0x243AB)); + break; + case 0x2F95F: + dst.truncate(0); + dst.append(static_cast<UChar32>(0x7AEE)); + break; + case 0x2F9BF: + dst.truncate(0); + dst.append(static_cast<UChar32>(0x45D7)); + break; + } + } + int32_t len = dst.toUTF32(utf32, DECOMPOSITION_BUFFER_SIZE, status); + if (!len || (len == 1 && utf32[0] == 0xFFFD && c != 0xFFFD)) { - // Characters that normalize to nothing or to U+FFFD (without the - // input being U+FFFD) in ICU4C's UTS 46 normalization normalize - // as in NFD in ICU4X's UTF 46 normalization in the interest - // of data size and ICU4X's normalizer being unable to handle - // normalizing to nothing. - // When UTS 46 is implemented on top of ICU4X, a preprocessing - // step is supposed to remove these characters before the - // normalization step. - if (uprv_strcmp(basename, "uts46d") != 0) { + if (!uts46) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); - } - nfdNormalizer->normalize(src, dst, status); - len = dst.toUTF32(utf32, DECOMPOSITION_BUFFER_SIZE, status); - if (!len || (len == 1 && utf32[0] == 0xFFFD && c != 0xFFFD)) { - status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } } if (len > DECOMPOSITION_BUFFER_SIZE) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } uint8_t firstCombiningClass = u_getCombiningClass(utf32[0]); bool specialNonStarterDecomposition = false; @@ -855,7 +885,7 @@ void computeDecompositions(const char* basename, } else { // A character whose decomposition starts with a non-starter and isn't the same as the character itself and isn't already hard-coded into ICU4X. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } } } else if (uset_contains(backwardCombiningStarters, utf32[0])) { @@ -865,15 +895,15 @@ void computeDecompositions(const char* basename, } if (c != BACKWARD_COMBINING_STARTER_MARKER && len == 1 && utf32[0] == BACKWARD_COMBINING_STARTER_MARKER) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } if (c != SPECIAL_NON_STARTER_DECOMPOSITION_MARKER && len == 1 && utf32[0] == SPECIAL_NON_STARTER_DECOMPOSITION_MARKER) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } if (c != FDFA_MARKER && len == 1 && utf32[0] == FDFA_MARKER) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } if (mainNormalizer != nfdNormalizer) { UnicodeString nfd; @@ -889,7 +919,7 @@ void computeDecompositions(const char* basename, utf32[0] = SPECIAL_NON_STARTER_DECOMPOSITION_MARKER; // magic value } else { // Use the surrogate range to store the canonical combining class - utf32[0] = 0xD800 | UChar32(firstCombiningClass); + utf32[0] = 0xD800 | static_cast<UChar32>(firstCombiningClass); } } else { if (src == dst) { @@ -906,7 +936,7 @@ void computeDecompositions(const char* basename, // We're always supposed to have a non-recursive decomposition // if we had a recursive one. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } // In addition to actual difference, put the whole range that contains characters // with oxia into the non-recursive trie in order to catch cases where characters @@ -917,31 +947,31 @@ void computeDecompositions(const char* basename, int32_t rawLen = raw.toUTF32(rawUtf32, RAW_DECOMPOSITION_BUFFER_SIZE, status); if (!rawLen) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } if (rawLen == 1) { if (c >= 0xFFFF) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } - umutablecptrie_set(nonRecursiveBuilder.getAlias(), c, uint32_t(rawUtf32[0]), status); + umutablecptrie_set(nonRecursiveBuilder.getAlias(), c, static_cast<uint32_t>(rawUtf32[0]), status); } else if (rawUtf32[0] <= 0xFFFF && rawUtf32[1] <= 0xFFFF) { if (!rawUtf32[0] || !rawUtf32[1]) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } // Swapped for consistency with the primary trie - uint32_t bmpPair = uint32_t(rawUtf32[1]) << 16 | uint32_t(rawUtf32[0]); + uint32_t bmpPair = static_cast<uint32_t>(rawUtf32[1]) << 16 | static_cast<uint32_t>(rawUtf32[0]); umutablecptrie_set(nonRecursiveBuilder.getAlias(), c, bmpPair, status); } else { // Let's add 1 to index to make it always non-zero to distinguish // it from the default zero. uint32_t index = nonRecursive32.size() + 1; - nonRecursive32.push_back(uint32_t(rawUtf32[0])); - nonRecursive32.push_back(uint32_t(rawUtf32[1])); + nonRecursive32.push_back(static_cast<uint32_t>(rawUtf32[0])); + nonRecursive32.push_back(static_cast<uint32_t>(rawUtf32[1])); if (index > 0xFFFF) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } umutablecptrie_set(nonRecursiveBuilder.getAlias(), c, index << 16, status); } @@ -951,21 +981,24 @@ void computeDecompositions(const char* basename, if (!nonNfdOrRoundTrips) { compositionPassthroughBound = c; } - if (len == 1 && utf32[0] <= 0xFFFF) { - if (startsWithBackwardCombiningStarter) { - if (mainNormalizer == nfdNormalizer) { - // Not supposed to happen in NFD - status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); - } else if (!((utf32[0] >= 0x1161 && utf32[0] <= 0x1175) || (utf32[0] >= 0x11A8 && utf32[0] <= 0x11C2))) { - // Other than conjoining jamo vowels and trails - // unsupported for non-NFD. - status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); - } + if (!len) { + if (!uts46) { + status.set(U_INTERNAL_PROGRAM_ERROR); + handleError(status, __LINE__, basename); + } + pendingTrieInsertions.push_back({c, 0xFFFFFFFF, false}); + } else if (len == 1 && ((utf32[0] >= 0x1161 && utf32[0] <= 0x1175) || (utf32[0] >= 0x11A8 && utf32[0] <= 0x11C2))) { + // Singleton decompositions to conjoining jamo. + if (mainNormalizer == nfdNormalizer) { + // Not supposed to happen in NFD + status.set(U_INTERNAL_PROGRAM_ERROR); + handleError(status, __LINE__, basename); } - pendingTrieInsertions.push_back({c, uint32_t(utf32[0]) << 16, false}); - } else if (len == 2 && + pendingTrieInsertions.push_back({c, static_cast<uint32_t>(utf32[0]) << 16, false}); + } else if (!startsWithBackwardCombiningStarter && len == 1 && utf32[0] <= 0xFFFF) { + pendingTrieInsertions.push_back({c, static_cast<uint32_t>(utf32[0]) << 16, false}); + } else if (!startsWithBackwardCombiningStarter && + len == 2 && utf32[0] <= 0xFFFF && utf32[1] <= 0xFFFF && !u_getCombiningClass(utf32[0]) && @@ -976,20 +1009,11 @@ void computeDecompositions(const char* basename, // Assert that iota subscript and half-width voicing marks never occur in these // expansions in the normalization forms where they are special. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } } - if (startsWithBackwardCombiningStarter) { - status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); - } - pendingTrieInsertions.push_back({c, (uint32_t(utf32[0]) << 16) | uint32_t(utf32[1]), false}); + pendingTrieInsertions.push_back({c, (static_cast<uint32_t>(utf32[0]) << 16) | static_cast<uint32_t>(utf32[1]), false}); } else { - if (startsWithBackwardCombiningStarter) { - status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); - } - UBool supplementary = false; UBool nonInitialStarter = false; for (int32_t i = 0; i < len; ++i) { @@ -997,7 +1021,7 @@ void computeDecompositions(const char* basename, // Assert that iota subscript and half-width voicing marks never occur in these // expansions in the normalization forms where they are special. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } if (utf32[i] > 0xFFFF) { @@ -1005,12 +1029,19 @@ void computeDecompositions(const char* basename, } if (utf32[i] == 0) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } if (i != 0 && !u_getCombiningClass(utf32[i])) { nonInitialStarter = true; } } + if (len == 1) { + // The format doesn't allow for length 1 for BMP, + // so if these ever occur, they need to be promoted + // to wider storage. As of Unicode 16 alpha, this + // case does not arise. + supplementary = true; + } if (!supplementary) { if (len > LONGEST_ENCODABLE_LENGTH_16 || !len || len == 1) { if (len == 18 && c == 0xFDFA) { @@ -1020,12 +1051,12 @@ void computeDecompositions(const char* basename, continue; } else { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } } } else if (len > LONGEST_ENCODABLE_LENGTH_32 || !len) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } // Complex decomposition // Format for 16-bit value: @@ -1043,15 +1074,15 @@ void computeDecompositions(const char* basename, // 11..0: Start offset in storage. The offset is to the logical // sequence of scalars16, scalars32, supplementary_scalars16, // supplementary_scalars32. - uint32_t descriptor = uint32_t(!nonInitialStarter) << 12; + uint32_t descriptor = static_cast<uint32_t>(!nonInitialStarter) << 12; if (!supplementary) { - descriptor |= (uint32_t(len) - 2) << 13; + descriptor |= (static_cast<uint32_t>(len) - 2) << 13; } else { - descriptor |= (uint32_t(len) - 1) << 13; + descriptor |= (static_cast<uint32_t>(len) - 1) << 13; } if (descriptor & 0xFFF) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } size_t index = 0; if (!supplementary) { @@ -1061,20 +1092,24 @@ void computeDecompositions(const char* basename, } if (index > 0xFFF) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } - descriptor |= uint32_t(index); + descriptor |= static_cast<uint32_t>(index); if (!descriptor || descriptor > 0xFFFF) { // > 0xFFFF should never happen if the code above is correct. // == 0 should not happen due to the nature of the data. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, basename); + handleError(status, __LINE__, basename); } uint32_t nonRoundTripMarker = 0; if (!nonNfdOrRoundTrips) { nonRoundTripMarker = (NON_ROUND_TRIP_MARKER << 16); } - pendingTrieInsertions.push_back({c, descriptor | nonRoundTripMarker, supplementary}); + uint32_t canCombineBackwardsMarker = 0; + if (startsWithBackwardCombiningStarter) { + canCombineBackwardsMarker = (BACKWARD_COMBINING_STARTER_DECOMPOSITION_MARKER << 16); + } + pendingTrieInsertions.push_back({c, descriptor | nonRoundTripMarker | canCombineBackwardsMarker, supplementary}); } } if (storage16.size() + storage32.size() > 0xFFF) { @@ -1088,14 +1123,14 @@ void computeDecompositions(const char* basename, trieType, UCPTRIE_VALUE_BITS_32, status)); - handleError(status, basename); + handleError(status, __LINE__, basename); fprintf(f, "[trie]\n"); usrc_writeUCPTrie(f, "trie", utrie.getAlias(), UPRV_TARGET_SYNTAX_TOML); fclose(f); } - handleError(status, basename); + handleError(status, __LINE__, basename); } #endif // !UCONFIG_NO_NORMALIZATION @@ -1290,9 +1325,9 @@ struct AddRangeHelper { static UBool U_CALLCONV addRangeToUCPTrie(const void* context, UChar32 start, UChar32 end, uint32_t value) { IcuToolErrorCode status("addRangeToUCPTrie"); - UMutableCPTrie* ucptrie = ((const AddRangeHelper*) context)->ucptrie; + UMutableCPTrie* ucptrie = static_cast<const AddRangeHelper*>(context)->ucptrie; umutablecptrie_setRange(ucptrie, start, end, value, status); - handleError(status, "setRange"); + handleError(status, __LINE__, "setRange"); return true; } @@ -1306,7 +1341,7 @@ int exportCase(int argc, char* argv[]) { IcuToolErrorCode status("icuexportdata"); LocalUMutableCPTriePointer builder(umutablecptrie_open(0, 0, status)); - handleError(status, "exportCase"); + handleError(status, __LINE__, "exportCase"); int32_t exceptionsLength, unfoldLength; const UCaseProps *caseProps = ucase_getSingleton(&exceptionsLength, &unfoldLength); @@ -1321,7 +1356,7 @@ int exportCase(int argc, char* argv[]) { trieType, width, status)); - handleError(status, "exportCase"); + handleError(status, __LINE__, "exportCase"); FILE* f = prepareOutputFile("ucase"); @@ -1385,7 +1420,7 @@ int exportNorm() { if (!(nfdBound == 0xC0 && nfcBound == 0x300)) { // Unexpected bounds for NFD/NFC. status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, "exportNorm"); + handleError(status, __LINE__, "exportNorm"); } uint32_t baseSize16 = storage16.size(); @@ -1407,17 +1442,17 @@ int exportNorm() { nfkcBound); if (!(nfkdBound <= 0xC0 && nfkcBound <= 0x300)) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, "exportNorm"); + handleError(status, __LINE__, "exportNorm"); } if (nfkcBound > 0xC0) { if (nfkdBound != 0xC0) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, "exportNorm"); + handleError(status, __LINE__, "exportNorm"); } } else { if (nfkdBound != nfkcBound) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, "exportNorm"); + handleError(status, __LINE__, "exportNorm"); } } @@ -1437,26 +1472,26 @@ int exportNorm() { uts46Bound); if (!(uts46dBound <= 0xC0 && uts46Bound <= 0x300)) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, "exportNorm"); + handleError(status, __LINE__, "exportNorm"); } if (uts46Bound > 0xC0) { if (uts46dBound != 0xC0) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, "exportNorm"); + handleError(status, __LINE__, "exportNorm"); } } else { if (uts46dBound != uts46Bound) { status.set(U_INTERNAL_PROGRAM_ERROR); - handleError(status, "exportNorm"); + handleError(status, __LINE__, "exportNorm"); } } uint32_t supplementSize16 = storage16.size() - baseSize16; uint32_t supplementSize32 = storage32.size() - baseSize32; - writeDecompositionData("nfd", baseSize16, baseSize32, supplementSize16, nfdDecompositionStartsWithNonStarter, nullptr, nfdPendingTrieInsertions, char16_t(nfcBound)); - writeDecompositionData("nfkd", baseSize16, baseSize32, supplementSize16, nfkdDecompositionStartsWithNonStarter, nfdDecompositionStartsWithNonStarter, nfkdPendingTrieInsertions, char16_t(nfkcBound)); - writeDecompositionData("uts46d", baseSize16, baseSize32, supplementSize16, uts46DecompositionStartsWithNonStarter, nfdDecompositionStartsWithNonStarter, uts46PendingTrieInsertions, char16_t(uts46Bound)); + writeDecompositionData("nfd", baseSize16, baseSize32, supplementSize16, nfdDecompositionStartsWithNonStarter, nullptr, nfdPendingTrieInsertions, static_cast<char16_t>(nfcBound)); + writeDecompositionData("nfkd", baseSize16, baseSize32, supplementSize16, nfkdDecompositionStartsWithNonStarter, nfdDecompositionStartsWithNonStarter, nfkdPendingTrieInsertions, static_cast<char16_t>(nfkcBound)); + writeDecompositionData("uts46d", baseSize16, baseSize32, supplementSize16, uts46DecompositionStartsWithNonStarter, nfdDecompositionStartsWithNonStarter, uts46PendingTrieInsertions, static_cast<char16_t>(uts46Bound)); writeDecompositionTables("nfdex", storage16.data(), baseSize16, storage32.data(), baseSize32); writeDecompositionTables("nfkdex", storage16.data() + baseSize16, supplementSize16, storage32.data() + baseSize32, supplementSize32); @@ -1470,7 +1505,7 @@ int exportNorm() { uset_close(uts46DecompositionStartsWithBackwardCombiningStarter); uset_close(backwardCombiningStarters); - handleError(status, "exportNorm"); + handleError(status, __LINE__, "exportNorm"); return 0; } diff --git a/deps/icu-small/source/tools/icupkg/icupkg.cpp b/deps/icu-small/source/tools/icupkg/icupkg.cpp index 392ed588991270..3da4af7457863a 100644 --- a/deps/icu-small/source/tools/icupkg/icupkg.cpp +++ b/deps/icu-small/source/tools/icupkg/icupkg.cpp @@ -252,8 +252,8 @@ static UBool isPackageName(const char *filename) { int32_t len; - len=(int32_t)strlen(filename)-4; /* -4: subtract the length of ".dat" */ - return (UBool)(len>0 && 0==strcmp(filename+len, ".dat")); + len = static_cast<int32_t>(strlen(filename)) - 4; /* -4: subtract the length of ".dat" */ + return len > 0 && 0 == strcmp(filename + len, ".dat"); } /* This line is required by MinGW because it incorrectly globs the arguments. @@ -350,7 +350,7 @@ main(int argc, char *argv[]) { outFilename=nullptr; } else /* !isPackage */ { outFilename=inFilename; - isModified=(UBool)(sourcePath!=destPath); + isModified = static_cast<UBool>(sourcePath != destPath); } /* parse the output type option */ @@ -378,7 +378,7 @@ main(int argc, char *argv[]) { * If we swap a single file, just assume that we are modifying it. * The Package class does not give us access to the item and its type. */ - isModified|=(UBool)(!isPackage || outType!=pkg->getInType()); + isModified |= static_cast<UBool>(!isPackage || outType != pkg->getInType()); } else if(isPackage) { outType=pkg->getInType(); // default to input type } else /* !isPackage: swap single file */ { diff --git a/deps/icu-small/source/tools/pkgdata/pkgdata.cpp b/deps/icu-small/source/tools/pkgdata/pkgdata.cpp index 03e6469a67c42b..3e4cfd7b326768 100644 --- a/deps/icu-small/source/tools/pkgdata/pkgdata.cpp +++ b/deps/icu-small/source/tools/pkgdata/pkgdata.cpp @@ -374,11 +374,11 @@ main(int argc, char* argv[]) { o.shortName = options[NAME].value; { - int32_t len = (int32_t)uprv_strlen(o.shortName); + int32_t len = static_cast<int32_t>(uprv_strlen(o.shortName)); char *csname, *cp; const char *sp; - cp = csname = (char *) uprv_malloc((len + 1 + 1) * sizeof(*o.cShortName)); + cp = csname = static_cast<char*>(uprv_malloc((len + 1 + 1) * sizeof(*o.cShortName))); if (*(sp = o.shortName)) { *cp++ = isalpha(*sp) ? * sp : '_'; for (++sp; *sp; ++sp) { @@ -501,7 +501,7 @@ main(int argc, char* argv[]) { } if (o.cShortName != nullptr) { - uprv_free((char *)o.cShortName); + uprv_free(const_cast<char*>(o.cShortName)); } if (o.fileListFiles != nullptr) { pkg_deleteList(o.fileListFiles); @@ -547,7 +547,7 @@ static int runCommand(const char* command, UBool specialHandling) { #if !(defined(USING_CYGWIN) || U_PLATFORM == U_PF_MINGW || U_PLATFORM == U_PF_OS400) normal_command_mode: #endif - cmd = (char *)command; + cmd = const_cast<char*>(command); } printf("pkgdata: %s\n", cmd); @@ -776,6 +776,7 @@ static int32_t pkg_executeOptions(UPKGOptions *o) { o->entryName, (optMatchArch[0] == 0 ? nullptr : optMatchArch), nullptr, + nullptr, gencFilePath, sizeof(gencFilePath), true); @@ -852,7 +853,7 @@ static int32_t initializePkgDataFlags(UPKGOptions *o) { int32_t tmpResult = 0; /* Initialize pkgdataFlags */ - pkgDataFlags = (char**)uprv_malloc(sizeof(char*) * PKGDATA_FLAGS_SIZE); + pkgDataFlags = static_cast<char**>(uprv_malloc(sizeof(char*) * PKGDATA_FLAGS_SIZE)); /* If we run out of space, allocate more */ #if !defined(WINDOWS_WITH_MSVC) || defined(USING_CYGWIN) @@ -860,7 +861,7 @@ static int32_t initializePkgDataFlags(UPKGOptions *o) { #endif if (pkgDataFlags != nullptr) { for (int32_t i = 0; i < PKGDATA_FLAGS_SIZE; i++) { - pkgDataFlags[i] = (char*)uprv_malloc(sizeof(char) * currentBufferSize); + pkgDataFlags[i] = static_cast<char*>(uprv_malloc(sizeof(char) * currentBufferSize)); if (pkgDataFlags[i] != nullptr) { pkgDataFlags[i][0] = 0; } else { @@ -887,7 +888,7 @@ static int32_t initializePkgDataFlags(UPKGOptions *o) { fprintf(stdout, "# Reading options file %s\n", o->options); } status = U_ZERO_ERROR; - tmpResult = parseFlagsFile(o->options, pkgDataFlags, currentBufferSize, FLAG_NAMES, (int32_t)PKGDATA_FLAGS_SIZE, &status); + tmpResult = parseFlagsFile(o->options, pkgDataFlags, currentBufferSize, FLAG_NAMES, static_cast<int32_t>(PKGDATA_FLAGS_SIZE), &status); if (status == U_BUFFER_OVERFLOW_ERROR) { for (int32_t i = 0; i < PKGDATA_FLAGS_SIZE; i++) { if (pkgDataFlags[i]) { @@ -923,6 +924,10 @@ static int32_t initializePkgDataFlags(UPKGOptions *o) { static void createFileNames(UPKGOptions *o, const char mode, const char *version_major, const char *version, const char *libName, UBool reverseExt, UBool noVersion) { const char* FILE_EXTENSION_SEP = uprv_strlen(pkgDataFlags[SO_EXT]) == 0 ? "" : "."; const char* FILE_SUFFIX = pkgDataFlags[LIB_EXT_ORDER][0] == '.' ? "." : ""; +#if defined(__GNUC__) && !defined(__clang__) + _Pragma("GCC diagnostic push") + _Pragma("GCC diagnostic ignored \"-Wformat-truncation\"") +#endif #if U_PLATFORM == U_PF_MINGW /* MinGW does not need the library prefix when building in dll mode. */ @@ -1036,6 +1041,10 @@ static void createFileNames(UPKGOptions *o, const char mode, const char *version fprintf(stdout, "# libFileName[LIB_FILE_VERSION] = %s (static)\n", libFileNames[LIB_FILE_VERSION]); } } +#if defined(__GNUC__) && !defined(__clang__) + _Pragma("GCC diagnostic pop") +#endif + } /* Create the symbolic links for the final library file. */ @@ -1132,7 +1141,7 @@ static int32_t pkg_createSymLinks(const char *targetDir, UBool specialHandling) static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) { int32_t result = 0; - char cmd[SMALL_BUFFER_MAX_SIZE]; + char cmd[LARGE_BUFFER_MAX_SIZE]; auto ret = snprintf(cmd, sizeof(cmd), @@ -1203,7 +1212,7 @@ static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, static int32_t pkg_installCommonMode(const char *installDir, const char *fileName) { int32_t result = 0; - char cmd[SMALL_BUFFER_MAX_SIZE] = ""; + char cmd[LARGE_BUFFER_MAX_SIZE] = ""; if (!T_FileStream_file_exists(installDir)) { UErrorCode status = U_ZERO_ERROR; @@ -1235,7 +1244,7 @@ static int32_t pkg_installCommonMode(const char *installDir, const char *fileNam #endif static int32_t pkg_installFileMode(const char *installDir, const char *srcDir, const char *fileListName) { int32_t result = 0; - char cmd[SMALL_BUFFER_MAX_SIZE] = ""; + char cmd[LARGE_BUFFER_MAX_SIZE] = ""; if (!T_FileStream_file_exists(installDir)) { UErrorCode status = U_ZERO_ERROR; @@ -1309,11 +1318,19 @@ static int32_t pkg_archiveLibrary(const char *targetDir, const char *version, UB * archive file suffix is the same, then the final library needs to be archived. */ if (uprv_strcmp(pkgDataFlags[SOBJ_EXT], pkgDataFlags[SO_EXT]) != 0 && uprv_strcmp(pkgDataFlags[A_EXT], pkgDataFlags[SO_EXT]) == 0) { +#if defined(__GNUC__) && !defined(__clang__) + _Pragma("GCC diagnostic push") + _Pragma("GCC diagnostic ignored \"-Wformat-truncation\"") +#endif + snprintf(libFileNames[LIB_FILE_VERSION], sizeof(libFileNames[LIB_FILE_VERSION]), "%s%s%s.%s", libFileNames[LIB_FILE], pkgDataFlags[LIB_EXT_ORDER][0] == '.' ? "." : "", reverseExt ? version : pkgDataFlags[SO_EXT], reverseExt ? pkgDataFlags[SO_EXT] : version); +#if defined(__GNUC__) && !defined(__clang__) + _Pragma("GCC diagnostic pop") +#endif snprintf(cmd, sizeof(cmd), "%s %s %s%s %s%s", pkgDataFlags[AR], @@ -1384,7 +1401,7 @@ static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, c if (cmd == nullptr) { length = static_cast<int32_t>(uprv_strlen(pkgDataFlags[AR]) + uprv_strlen(pkgDataFlags[ARFLAGS]) + uprv_strlen(targetDir) + uprv_strlen(libFileNames[LIB_FILE_VERSION]) + uprv_strlen(objectFile) + uprv_strlen(pkgDataFlags[RANLIB]) + BUFFER_PADDING_SIZE); - if ((cmd = (char *)uprv_malloc(sizeof(char) * length)) == nullptr) { + if ((cmd = static_cast<char*>(uprv_malloc(sizeof(char) * length))) == nullptr) { fprintf(stderr, "Unable to allocate memory for command.\n"); return -1; } @@ -1418,7 +1435,7 @@ static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, c #elif U_PLATFORM == U_PF_MINGW length += static_cast<int32_t>(uprv_strlen(targetDir) + uprv_strlen(libFileNames[LIB_FILE_MINGW])); #endif - if ((cmd = (char *)uprv_malloc(sizeof(char) * length)) == nullptr) { + if ((cmd = static_cast<char*>(uprv_malloc(sizeof(char) * length))) == nullptr) { fprintf(stderr, "Unable to allocate memory for command.\n"); return -1; } @@ -1466,63 +1483,12 @@ static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, c result = runCommand(cmd); #if U_PLATFORM == U_PF_OS390 - char *env_tmp; - char PDS_LibName[512]; - char PDS_Name[512]; - - PDS_Name[0] = 0; - PDS_LibName[0] = 0; - if (specialHandling && uprv_strcmp(libFileNames[LIB_FILE],"libicudata") == 0) { - if (env_tmp = getenv("ICU_PDS_NAME")) { - sprintf(PDS_Name, "%s%s", - env_tmp, - "DA"); - strcat(PDS_Name, getenv("ICU_PDS_NAME_SUFFIX")); - } else if (env_tmp = getenv("PDS_NAME_PREFIX")) { - sprintf(PDS_Name, "%s%s", - env_tmp, - U_ICU_VERSION_SHORT "DA"); - } else { - sprintf(PDS_Name, "%s%s", - "IXMI", - U_ICU_VERSION_SHORT "DA"); - } - } else if (!specialHandling && uprv_strcmp(libFileNames[LIB_FILE],"libicudata_stub") == 0) { - if (env_tmp = getenv("ICU_PDS_NAME")) { - sprintf(PDS_Name, "%s%s", - env_tmp, - "D1"); - strcat(PDS_Name, getenv("ICU_PDS_NAME_SUFFIX")); - } else if (env_tmp = getenv("PDS_NAME_PREFIX")) { - sprintf(PDS_Name, "%s%s", - env_tmp, - U_ICU_VERSION_SHORT "D1"); - } else { - sprintf(PDS_Name, "%s%s", - "IXMI", - U_ICU_VERSION_SHORT "D1"); - } - } - - if (PDS_Name[0]) { - sprintf(PDS_LibName,"%s%s%s%s%s", - "\"//'", - getenv("LOADMOD"), - "(", - PDS_Name, - ")'\""); - sprintf(cmd, "%s %s -o %s %s %s%s %s %s", - pkgDataFlags[GENLIB], - pkgDataFlags[LDICUDTFLAGS], - PDS_LibName, - objectFile, - pkgDataFlags[LD_SONAME], - pkgDataFlags[LD_SONAME][0] == 0 ? "" : libFileNames[LIB_FILE_VERSION_MAJOR], - pkgDataFlags[RPATH_FLAGS], - pkgDataFlags[BIR_FLAGS]); + sprintf(cmd, "%s %s -o %s%s %s %s%s %s %s", pkgDataFlags[GENLIB], pkgDataFlags[LDICUDTFLAGS], + targetDir, BATCH_STUB_TARGET, objectFile, pkgDataFlags[LD_SONAME], + pkgDataFlags[LD_SONAME][0] == 0 ? "" : libFileNames[LIB_FILE_VERSION_MAJOR], + pkgDataFlags[RPATH_FLAGS], pkgDataFlags[BIR_FLAGS]); - result = runCommand(cmd); - } + result = runCommand(cmd); #endif } @@ -1549,7 +1515,7 @@ static int32_t pkg_createWithAssemblyCode(const char *targetDir, const char mode length = static_cast<int32_t>(uprv_strlen(pkgDataFlags[COMPILER]) + uprv_strlen(pkgDataFlags[LIBFLAGS]) + uprv_strlen(tempObjectFile) + uprv_strlen(gencFilePath) + BUFFER_PADDING_SIZE); - LocalMemory<char> cmd((char *)uprv_malloc(sizeof(char) * length)); + LocalMemory<char> cmd(static_cast<char*>(uprv_malloc(sizeof(char) * length))); if (cmd.isNull()) { return -1; } @@ -1638,10 +1604,10 @@ static int32_t pkg_createWithoutAssemblyCode(UPKGOptions *o, const char *targetD return -1; } - if ((cmd = (char *)uprv_malloc((listSize + 2) * SMALL_BUFFER_MAX_SIZE)) == nullptr) { + if ((cmd = static_cast<char*>(uprv_malloc((listSize + 2) * SMALL_BUFFER_MAX_SIZE))) == nullptr) { fprintf(stderr, "Unable to allocate memory for cmd.\n"); return -1; - } else if ((buffer = (char *)uprv_malloc((listSize + 1) * SMALL_BUFFER_MAX_SIZE)) == nullptr) { + } else if ((buffer = static_cast<char*>(uprv_malloc((listSize + 1) * SMALL_BUFFER_MAX_SIZE))) == nullptr) { fprintf(stderr, "Unable to allocate memory for buffer.\n"); uprv_free(cmd); return -1; @@ -2092,7 +2058,7 @@ static void loadLists(UPKGOptions *o, UErrorCode *status) while(T_FileStream_readLine(in, line, sizeof(line))!=nullptr) { /* for each line */ ln++; if(uprv_strlen(line)>lineMax) { - fprintf(stderr, "%s:%d - line too long (over %d chars)\n", l->str, (int)ln, (int)lineMax); + fprintf(stderr, "%s:%d - line too long (over %d chars)\n", l->str, static_cast<int>(ln), static_cast<int>(lineMax)); exit(1); } /* remove spaces at the beginning */ @@ -2129,14 +2095,14 @@ static void loadLists(UPKGOptions *o, UErrorCode *status) lineNext = uprv_strchr(linePtr+1, '"'); if(lineNext == nullptr) { fprintf(stderr, "%s:%d - missing trailing double quote (\")\n", - l->str, (int)ln); + l->str, static_cast<int>(ln)); exit(1); } else { lineNext++; if(*lineNext) { if(*lineNext != ' ') { fprintf(stderr, "%s:%d - malformed quoted line at position %d, expected ' ' got '%c'\n", - l->str, (int)ln, (int)(lineNext-line), (*lineNext)?*lineNext:'0'); + l->str, static_cast<int>(ln), static_cast<int>(lineNext - line), *lineNext ? *lineNext : '0'); exit(1); } *lineNext = 0; @@ -2152,7 +2118,7 @@ static void loadLists(UPKGOptions *o, UErrorCode *status) } /* add the file */ - s = (char*)getLongPathname(linePtr); + s = const_cast<char*>(getLongPathname(linePtr)); /* normal mode.. o->files is just the bare list without package names */ o->files = pkg_appendToList(o->files, &tail, uprv_strdup(linePtr)); @@ -2162,7 +2128,7 @@ static void loadLists(UPKGOptions *o, UErrorCode *status) } /* The +5 is to add a little extra space for, among other things, PKGDATA_FILE_SEP_STRING */ tmpLength = static_cast<int32_t>(uprv_strlen(o->srcDir) + uprv_strlen(s) + 5); - if((tmp = (char *)uprv_malloc(tmpLength)) == nullptr) { + if ((tmp = static_cast<char*>(uprv_malloc(tmpLength))) == nullptr) { fprintf(stderr, "pkgdata: Error: Unable to allocate tmp buffer size: %d\n", tmpLength); exit(U_MEMORY_ALLOCATION_ERROR); } diff --git a/deps/icu-small/source/tools/toolutil/collationinfo.cpp b/deps/icu-small/source/tools/toolutil/collationinfo.cpp index 6bad90e13331c7..fead7ca4028534 100644 --- a/deps/icu-small/source/tools/toolutil/collationinfo.cpp +++ b/deps/icu-small/source/tools/toolutil/collationinfo.cpp @@ -30,85 +30,85 @@ void CollationInfo::printSizes(int32_t sizeWithHeader, const int32_t indexes[]) { int32_t totalSize = indexes[CollationDataReader::IX_TOTAL_SIZE]; if(sizeWithHeader > totalSize) { - printf(" header size: %6ld\n", (long)(sizeWithHeader - totalSize)); + printf(" header size: %6ld\n", static_cast<long>(sizeWithHeader - totalSize)); } int32_t length = indexes[CollationDataReader::IX_INDEXES_LENGTH]; - printf(" indexes: %6ld *4 = %6ld\n", (long)length, (long)length * 4); + printf(" indexes: %6ld *4 = %6ld\n", static_cast<long>(length), static_cast<long>(length) * 4); length = getDataLength(indexes, CollationDataReader::IX_REORDER_CODES_OFFSET); if(length != 0) { - printf(" reorder codes: %6ld *4 = %6ld\n", (long)length / 4, (long)length); + printf(" reorder codes: %6ld *4 = %6ld\n", static_cast<long>(length) / 4, static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_REORDER_TABLE_OFFSET); if(length != 0) { U_ASSERT(length >= 256); - printf(" reorder table: %6ld\n", (long)length); + printf(" reorder table: %6ld\n", static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_TRIE_OFFSET); if(length != 0) { - printf(" trie size: %6ld\n", (long)length); + printf(" trie size: %6ld\n", static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_RESERVED8_OFFSET); if(length != 0) { - printf(" reserved (offset 8): %6ld\n", (long)length); + printf(" reserved (offset 8): %6ld\n", static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_CES_OFFSET); if(length != 0) { - printf(" CEs: %6ld *8 = %6ld\n", (long)length / 8, (long)length); + printf(" CEs: %6ld *8 = %6ld\n", static_cast<long>(length) / 8, static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_RESERVED10_OFFSET); if(length != 0) { - printf(" reserved (offset 10): %6ld\n", (long)length); + printf(" reserved (offset 10): %6ld\n", static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_CE32S_OFFSET); if(length != 0) { - printf(" CE32s: %6ld *4 = %6ld\n", (long)length / 4, (long)length); + printf(" CE32s: %6ld *4 = %6ld\n", static_cast<long>(length) / 4, static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_ROOT_ELEMENTS_OFFSET); if(length != 0) { - printf(" rootElements: %6ld *4 = %6ld\n", (long)length / 4, (long)length); + printf(" rootElements: %6ld *4 = %6ld\n", static_cast<long>(length) / 4, static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_CONTEXTS_OFFSET); if(length != 0) { - printf(" contexts: %6ld *2 = %6ld\n", (long)length / 2, (long)length); + printf(" contexts: %6ld *2 = %6ld\n", static_cast<long>(length) / 2, static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_UNSAFE_BWD_OFFSET); if(length != 0) { - printf(" unsafeBwdSet: %6ld *2 = %6ld\n", (long)length / 2, (long)length); + printf(" unsafeBwdSet: %6ld *2 = %6ld\n", static_cast<long>(length) / 2, static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_FAST_LATIN_TABLE_OFFSET); if(length != 0) { - printf(" fastLatin table: %6ld *2 = %6ld\n", (long)length / 2, (long)length); + printf(" fastLatin table: %6ld *2 = %6ld\n", static_cast<long>(length) / 2, static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_SCRIPTS_OFFSET); if(length != 0) { - printf(" scripts data: %6ld *2 = %6ld\n", (long)length / 2, (long)length); + printf(" scripts data: %6ld *2 = %6ld\n", static_cast<long>(length) / 2, static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_COMPRESSIBLE_BYTES_OFFSET); if(length != 0) { U_ASSERT(length >= 256); - printf(" compressibleBytes: %6ld\n", (long)length); + printf(" compressibleBytes: %6ld\n", static_cast<long>(length)); } length = getDataLength(indexes, CollationDataReader::IX_RESERVED18_OFFSET); if(length != 0) { - printf(" reserved (offset 18): %6ld\n", (long)length); + printf(" reserved (offset 18): %6ld\n", static_cast<long>(length)); } - printf(" collator binary total size: %6ld\n", (long)sizeWithHeader); + printf(" collator binary total size: %6ld\n", static_cast<long>(sizeWithHeader)); } int32_t @@ -130,7 +130,7 @@ CollationInfo::printReorderRanges(const CollationData &data, const int32_t *code for(int32_t i = 0; i < ranges.size(); ++i) { int32_t pair = ranges.elementAti(i); int32_t limit = (pair >> 16) & 0xffff; - int16_t offset = (int16_t)pair; + int16_t offset = static_cast<int16_t>(pair); if(offset == 0) { // [inclusive-start, exclusive-limit[ printf(" [%04x, %04x[\n", start, limit); diff --git a/deps/icu-small/source/tools/toolutil/dbgutil.cpp b/deps/icu-small/source/tools/toolutil/dbgutil.cpp index d42b267f730252..824c6c8ba8cc7c 100644 --- a/deps/icu-small/source/tools/toolutil/dbgutil.cpp +++ b/deps/icu-small/source/tools/toolutil/dbgutil.cpp @@ -62,10 +62,10 @@ static void udbg_setup() { //fflush(stderr); UnicodeString **newStrs = new UnicodeString*[UDBG_ENUM_COUNT+1]; for(int t=0;t<UDBG_ENUM_COUNT;t++) { - int32_t c = udbg_enumCount((UDebugEnumType)t); + int32_t c = udbg_enumCount(static_cast<UDebugEnumType>(t)); newStrs[t] = new UnicodeString[c+1]; for(int f=0;f<=c;f++) { - _fieldString((UDebugEnumType)t, f, newStrs[t][f]); + _fieldString(static_cast<UDebugEnumType>(t), f, newStrs[t][f]); } } newStrs[UDBG_ENUM_COUNT] = new UnicodeString[1]; // empty string diff --git a/deps/icu-small/source/tools/toolutil/json-json.hpp b/deps/icu-small/source/tools/toolutil/json-json.hpp new file mode 100644 index 00000000000000..bc16fcef6d4a17 --- /dev/null +++ b/deps/icu-small/source/tools/toolutil/json-json.hpp @@ -0,0 +1,24793 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +// +// From the nlohmann/json library. Original license: +// +// MIT License +// +// Copyright (c) 2013-2022 Niels Lohmann +// +// 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. + + +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + +/****************************************************************************\ + * Note on documentation: The source files contain links to the online * + * documentation of the public API at https://json.nlohmann.me. This URL * + * contains the most recent documentation and should also be applicable to * + * previous versions; documentation for deprecated functions is not * + * removed, but marked deprecated. See "Generate documentation" section in * + * file docs/README.md. * +\****************************************************************************/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#include <algorithm> // all_of, find, for_each +#include <cstddef> // nullptr_t, ptrdiff_t, size_t +#include <functional> // hash, less +#include <initializer_list> // initializer_list +#ifndef JSON_NO_IO + #include <iosfwd> // istream, ostream +#endif // JSON_NO_IO +#include <iterator> // random_access_iterator_tag +#include <memory> // unique_ptr +#include <string> // string, stoi, to_string +#include <utility> // declval, forward, move, pair, swap +#include <vector> // vector + +// #include <nlohmann/adl_serializer.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <utility> + +// #include <nlohmann/detail/abi_macros.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// This file contains all macro definitions affecting or depending on the ABI + +#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK + #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) + #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3 + #warning "Already included a different version of the library!" + #endif + #endif +#endif + +#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum) + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + +#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 +#endif + +#if JSON_DIAGNOSTICS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS +#endif + +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp +#else + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION + #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 +#endif + +// Construct the namespace ABI tags component +#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b +#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ + NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) + +#define NLOHMANN_JSON_ABI_TAGS \ + NLOHMANN_JSON_ABI_TAGS_CONCAT( \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ + NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) + +// Construct the namespace version component +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ + _v ## major ## _ ## minor ## _ ## patch +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) + +#if NLOHMANN_JSON_NAMESPACE_NO_VERSION +#define NLOHMANN_JSON_NAMESPACE_VERSION +#else +#define NLOHMANN_JSON_NAMESPACE_VERSION \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ + NLOHMANN_JSON_VERSION_MINOR, \ + NLOHMANN_JSON_VERSION_PATCH) +#endif + +// Combine namespace components +#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b +#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ + NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) + +#ifndef NLOHMANN_JSON_NAMESPACE +#define NLOHMANN_JSON_NAMESPACE \ + nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN +#define NLOHMANN_JSON_NAMESPACE_BEGIN \ + namespace nlohmann \ + { \ + inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) \ + { +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_END +#define NLOHMANN_JSON_NAMESPACE_END \ + } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ + } // namespace nlohmann +#endif + +// #include <nlohmann/detail/conversions/from_json.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <algorithm> // transform +#include <array> // array +#include <forward_list> // forward_list +#include <iterator> // inserter, front_inserter, end +#include <map> // map +#include <string> // string +#include <tuple> // tuple, make_tuple +#include <type_traits> // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include <unordered_map> // unordered_map +#include <utility> // pair, declval +#include <valarray> // valarray + +// #include <nlohmann/detail/exceptions.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstddef> // nullptr_t +#include <exception> // exception +#if JSON_DIAGNOSTICS + #include <numeric> // accumulate +#endif +#include <stdexcept> // runtime_error +#include <string> // to_string +#include <vector> // vector + +// #include <nlohmann/detail/value_t.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <array> // array +#include <cstddef> // size_t +#include <cstdint> // uint8_t +#include <string> // string + +// #include <nlohmann/detail/macro_scope.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <utility> // declval, pair +// #include <nlohmann/detail/meta/detected.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <type_traits> + +// #include <nlohmann/detail/meta/void_t.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// #include <nlohmann/detail/abi_macros.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template<typename ...Ts> struct make_void +{ + using type = void; +}; +template<typename ...Ts> using void_t = typename make_void<Ts...>::type; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// https://en.cppreference.com/w/cpp/experimental/is_detected +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template<class Default, + class AlwaysVoid, + template<class...> class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template<class Default, template<class...> class Op, class... Args> +struct detector<Default, void_t<Op<Args...>>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op<Args...>; +}; + +template<template<class...> class Op, class... Args> +using is_detected = typename detector<nonesuch, void, Op, Args...>::value_t; + +template<template<class...> class Op, class... Args> +struct is_detected_lazy : is_detected<Op, Args...> { }; + +template<template<class...> class Op, class... Args> +using detected_t = typename detector<nonesuch, void, Op, Args...>::type; + +template<class Default, template<class...> class Op, class... Args> +using detected_or = detector<Default, void, Op, Args...>; + +template<class Default, template<class...> class Op, class... Args> +using detected_or_t = typename detected_or<Default, Op, Args...>::type; + +template<class Expected, template<class...> class Op, class... Args> +using is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>; + +template<class To, template<class...> class Op, class... Args> +using is_detected_convertible = + std::is_convertible<detected_t<Op, Args...>, To>; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/thirdparty/hedley/hedley.hpp> + + +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-FileCopyrightText: 2016-2021 Evan Nemerson <evan@nemerson.com> +// SPDX-License-Identifier: MIT + +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson <evan@nemerson.com> + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) +#if defined(JSON_HEDLEY_VERSION) + #undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 15 + +#if defined(JSON_HEDLEY_STRINGIFY_EX) + #undef JSON_HEDLEY_STRINGIFY_EX +#endif +#define JSON_HEDLEY_STRINGIFY_EX(x) #x + +#if defined(JSON_HEDLEY_STRINGIFY) + #undef JSON_HEDLEY_STRINGIFY +#endif +#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) + +#if defined(JSON_HEDLEY_CONCAT_EX) + #undef JSON_HEDLEY_CONCAT_EX +#endif +#define JSON_HEDLEY_CONCAT_EX(a,b) a##b + +#if defined(JSON_HEDLEY_CONCAT) + #undef JSON_HEDLEY_CONCAT +#endif +#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) + +#if defined(JSON_HEDLEY_CONCAT3_EX) + #undef JSON_HEDLEY_CONCAT3_EX +#endif +#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c + +#if defined(JSON_HEDLEY_CONCAT3) + #undef JSON_HEDLEY_CONCAT3 +#endif +#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) + +#if defined(JSON_HEDLEY_VERSION_ENCODE) + #undef JSON_HEDLEY_VERSION_ENCODE +#endif +#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) + #undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) + #undef JSON_HEDLEY_VERSION_DECODE_MINOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) + #undef JSON_HEDLEY_VERSION_DECODE_REVISION +#endif +#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) + +#if defined(JSON_HEDLEY_GNUC_VERSION) + #undef JSON_HEDLEY_GNUC_VERSION +#endif +#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#elif defined(__GNUC__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) +#endif + +#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) + #undef JSON_HEDLEY_GNUC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GNUC_VERSION) + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION) + #undef JSON_HEDLEY_MSVC_VERSION +#endif +#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) +#elif defined(_MSC_FULL_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) +#elif defined(_MSC_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) + #undef JSON_HEDLEY_MSVC_VERSION_CHECK +#endif +#if !defined(JSON_HEDLEY_MSVC_VERSION) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) +#elif defined(_MSC_VER) && (_MSC_VER >= 1200) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) +#else + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION) + #undef JSON_HEDLEY_INTEL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_VERSION) + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #undef JSON_HEDLEY_INTEL_CL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) + #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION) + #undef JSON_HEDLEY_PGI_VERSION +#endif +#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) + #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) + #undef JSON_HEDLEY_PGI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PGI_VERSION) + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #undef JSON_HEDLEY_SUNPRO_VERSION +#endif +#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) +#elif defined(__SUNPRO_C) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) +#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) +#elif defined(__SUNPRO_CC) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) + #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#endif +#if defined(__EMSCRIPTEN__) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION) + #undef JSON_HEDLEY_ARM_VERSION +#endif +#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) +#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) + #undef JSON_HEDLEY_ARM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_ARM_VERSION) + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION) + #undef JSON_HEDLEY_IBM_VERSION +#endif +#if defined(__ibmxl__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) +#elif defined(__xlC__) && defined(__xlC_ver__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) +#elif defined(__xlC__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) + #undef JSON_HEDLEY_IBM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IBM_VERSION) + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION) + #undef JSON_HEDLEY_TI_VERSION +#endif +#if \ + defined(__TI_COMPILER_VERSION__) && \ + ( \ + defined(__TMS470__) || defined(__TI_ARM__) || \ + defined(__MSP430__) || \ + defined(__TMS320C2000__) \ + ) +#if (__TI_COMPILER_VERSION__ >= 16000000) + #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif +#endif + +#if defined(JSON_HEDLEY_TI_VERSION_CHECK) + #undef JSON_HEDLEY_TI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_VERSION) + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #undef JSON_HEDLEY_TI_CL2000_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) + #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #undef JSON_HEDLEY_TI_CL430_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) + #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #undef JSON_HEDLEY_TI_ARMCL_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) + #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) + #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #undef JSON_HEDLEY_TI_CL6X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) + #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #undef JSON_HEDLEY_TI_CL7X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) + #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #undef JSON_HEDLEY_TI_CLPRU_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) + #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION) + #undef JSON_HEDLEY_CRAY_VERSION +#endif +#if defined(_CRAYC) + #if defined(_RELEASE_PATCHLEVEL) + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) + #else + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) + #undef JSON_HEDLEY_CRAY_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_CRAY_VERSION) + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION) + #undef JSON_HEDLEY_IAR_VERSION +#endif +#if defined(__IAR_SYSTEMS_ICC__) + #if __VER__ > 1000 + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) + #else + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) + #undef JSON_HEDLEY_IAR_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IAR_VERSION) + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION) + #undef JSON_HEDLEY_TINYC_VERSION +#endif +#if defined(__TINYC__) + #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) + #undef JSON_HEDLEY_TINYC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION) + #undef JSON_HEDLEY_DMC_VERSION +#endif +#if defined(__DMC__) + #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) + #undef JSON_HEDLEY_DMC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_DMC_VERSION) + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #undef JSON_HEDLEY_COMPCERT_VERSION +#endif +#if defined(__COMPCERT_VERSION__) + #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) + #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION) + #undef JSON_HEDLEY_PELLES_VERSION +#endif +#if defined(__POCC__) + #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) + #undef JSON_HEDLEY_PELLES_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PELLES_VERSION) + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #undef JSON_HEDLEY_MCST_LCC_VERSION +#endif +#if defined(__LCC__) && defined(__LCC_MINOR__) + #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) + #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION) + #undef JSON_HEDLEY_GCC_VERSION +#endif +#if \ + defined(JSON_HEDLEY_GNUC_VERSION) && \ + !defined(__clang__) && \ + !defined(JSON_HEDLEY_INTEL_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_ARM_VERSION) && \ + !defined(JSON_HEDLEY_CRAY_VERSION) && \ + !defined(JSON_HEDLEY_TI_VERSION) && \ + !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ + !defined(__COMPCERT__) && \ + !defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_ATTRIBUTE +#endif +#if \ + defined(__has_attribute) && \ + ( \ + (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \ + ) +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) +#else +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#endif +#if \ + defined(__has_cpp_attribute) && \ + defined(__cplusplus) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#endif +#if !defined(__cplusplus) || !defined(__has_cpp_attribute) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#elif \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ + (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_BUILTIN) + #undef JSON_HEDLEY_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) +#else + #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) + #undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) + #undef JSON_HEDLEY_GCC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_FEATURE) + #undef JSON_HEDLEY_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) +#else + #define JSON_HEDLEY_HAS_FEATURE(feature) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) + #undef JSON_HEDLEY_GNUC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) + #undef JSON_HEDLEY_GCC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_EXTENSION) + #undef JSON_HEDLEY_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) +#else + #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) + #undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) + #undef JSON_HEDLEY_GCC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_WARNING) + #undef JSON_HEDLEY_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) +#else + #define JSON_HEDLEY_HAS_WARNING(warning) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) + #undef JSON_HEDLEY_GNUC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_WARNING) + #undef JSON_HEDLEY_GCC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + defined(__clang__) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) + #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_PRAGMA(value) __pragma(value) +#else + #define JSON_HEDLEY_PRAGMA(value) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) + #undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#endif +#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) + #undef JSON_HEDLEY_DIAGNOSTIC_POP +#endif +#if defined(__clang__) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) + #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) +#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_PUSH + #define JSON_HEDLEY_DIAGNOSTIC_POP +#endif + +/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") +# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") +# if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions") +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# endif +#endif +#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x +#endif + +#if defined(JSON_HEDLEY_CONST_CAST) + #undef JSON_HEDLEY_CONST_CAST +#endif +#if defined(__cplusplus) +# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast<T>(expr)) +#elif \ + JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_REINTERPRET_CAST) + #undef JSON_HEDLEY_REINTERPRET_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast<T>(expr)) +#else + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_STATIC_CAST) + #undef JSON_HEDLEY_STATIC_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast<T>(expr)) +#else + #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_CPP_CAST) + #undef JSON_HEDLEY_CPP_CAST +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ + ((T) (expr)) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("diag_suppress=Pe137") \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) +# endif +#else +# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif + +#if defined(JSON_HEDLEY_DEPRECATED) + #undef JSON_HEDLEY_DEPRECATED +#endif +#if defined(JSON_HEDLEY_DEPRECATED_FOR) + #undef JSON_HEDLEY_DEPRECATED_FOR +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif \ + (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) +#elif defined(__cplusplus) && (__cplusplus >= 201402L) + #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") +#else + #define JSON_HEDLEY_DEPRECATED(since) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) +#endif + +#if defined(JSON_HEDLEY_UNAVAILABLE) + #undef JSON_HEDLEY_UNAVAILABLE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) +#else + #define JSON_HEDLEY_UNAVAILABLE(available_since) +#endif + +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT +#endif +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) +#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) +#elif defined(_Check_return_) /* SAL */ + #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ +#else + #define JSON_HEDLEY_WARN_UNUSED_RESULT + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) +#endif + +#if defined(JSON_HEDLEY_SENTINEL) + #undef JSON_HEDLEY_SENTINEL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) +#else + #define JSON_HEDLEY_SENTINEL(position) +#endif + +#if defined(JSON_HEDLEY_NO_RETURN) + #undef JSON_HEDLEY_NO_RETURN +#endif +#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NO_RETURN __noreturn +#elif \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L + #define JSON_HEDLEY_NO_RETURN _Noreturn +#elif defined(__cplusplus) && (__cplusplus >= 201103L) + #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#else + #define JSON_HEDLEY_NO_RETURN +#endif + +#if defined(JSON_HEDLEY_NO_ESCAPE) + #undef JSON_HEDLEY_NO_ESCAPE +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) + #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) +#else + #define JSON_HEDLEY_NO_ESCAPE +#endif + +#if defined(JSON_HEDLEY_UNREACHABLE) + #undef JSON_HEDLEY_UNREACHABLE +#endif +#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) + #undef JSON_HEDLEY_UNREACHABLE_RETURN +#endif +#if defined(JSON_HEDLEY_ASSUME) + #undef JSON_HEDLEY_ASSUME +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_ASSUME(expr) __assume(expr) +#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) + #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) +#elif \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #if defined(__cplusplus) + #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) + #else + #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) + #endif +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() +#elif defined(JSON_HEDLEY_ASSUME) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif +#if !defined(JSON_HEDLEY_ASSUME) + #if defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) + #else + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) + #endif +#endif +#if defined(JSON_HEDLEY_UNREACHABLE) + #if \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) + #else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() + #endif +#else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) +#endif +#if !defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif + +JSON_HEDLEY_DIAGNOSTIC_PUSH +#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") + #pragma clang diagnostic ignored "-Wpedantic" +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) + #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) + #if defined(__clang__) + #pragma clang diagnostic ignored "-Wvariadic-macros" + #elif defined(JSON_HEDLEY_GCC_VERSION) + #pragma GCC diagnostic ignored "-Wvariadic-macros" + #endif +#endif +#if defined(JSON_HEDLEY_NON_NULL) + #undef JSON_HEDLEY_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else + #define JSON_HEDLEY_NON_NULL(...) +#endif +JSON_HEDLEY_DIAGNOSTIC_POP + +#if defined(JSON_HEDLEY_PRINTF_FORMAT) + #undef JSON_HEDLEY_PRINTF_FORMAT +#endif +#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) +#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) +#else + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) +#endif + +#if defined(JSON_HEDLEY_CONSTEXPR) + #undef JSON_HEDLEY_CONSTEXPR +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) + #endif +#endif +#if !defined(JSON_HEDLEY_CONSTEXPR) + #define JSON_HEDLEY_CONSTEXPR +#endif + +#if defined(JSON_HEDLEY_PREDICT) + #undef JSON_HEDLEY_PREDICT +#endif +#if defined(JSON_HEDLEY_LIKELY) + #undef JSON_HEDLEY_LIKELY +#endif +#if defined(JSON_HEDLEY_UNLIKELY) + #undef JSON_HEDLEY_UNLIKELY +#endif +#if defined(JSON_HEDLEY_UNPREDICTABLE) + #undef JSON_HEDLEY_UNPREDICTABLE +#endif +#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) + #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) +#elif \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ + (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ + })) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ + })) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#else +# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) +# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) +#endif +#if !defined(JSON_HEDLEY_UNPREDICTABLE) + #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) +#endif + +#if defined(JSON_HEDLEY_MALLOC) + #undef JSON_HEDLEY_MALLOC +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_MALLOC __declspec(restrict) +#else + #define JSON_HEDLEY_MALLOC +#endif + +#if defined(JSON_HEDLEY_PURE) + #undef JSON_HEDLEY_PURE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PURE __attribute__((__pure__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ + ) +# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") +#else +# define JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_CONST) + #undef JSON_HEDLEY_CONST +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_CONST __attribute__((__const__)) +#elif \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_CONST _Pragma("no_side_effect") +#else + #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_RESTRICT) + #undef JSON_HEDLEY_RESTRICT +#endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT restrict +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + defined(__clang__) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RESTRICT __restrict +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT _Restrict +#else + #define JSON_HEDLEY_RESTRICT +#endif + +#if defined(JSON_HEDLEY_INLINE) + #undef JSON_HEDLEY_INLINE +#endif +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + (defined(__cplusplus) && (__cplusplus >= 199711L)) + #define JSON_HEDLEY_INLINE inline +#elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) + #define JSON_HEDLEY_INLINE __inline__ +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_INLINE __inline +#else + #define JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_ALWAYS_INLINE) + #undef JSON_HEDLEY_ALWAYS_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) +# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_ALWAYS_INLINE __forceinline +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ + ) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") +#else +# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_NEVER_INLINE) + #undef JSON_HEDLEY_NEVER_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#else + #define JSON_HEDLEY_NEVER_INLINE +#endif + +#if defined(JSON_HEDLEY_PRIVATE) + #undef JSON_HEDLEY_PRIVATE +#endif +#if defined(JSON_HEDLEY_PUBLIC) + #undef JSON_HEDLEY_PUBLIC +#endif +#if defined(JSON_HEDLEY_IMPORT) + #undef JSON_HEDLEY_IMPORT +#endif +#if defined(_WIN32) || defined(__CYGWIN__) +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC __declspec(dllexport) +# define JSON_HEDLEY_IMPORT __declspec(dllimport) +#else +# if \ + JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + ( \ + defined(__TI_EABI__) && \ + ( \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ + ) \ + ) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) +# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) +# else +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC +# endif +# define JSON_HEDLEY_IMPORT extern +#endif + +#if defined(JSON_HEDLEY_NO_THROW) + #undef JSON_HEDLEY_NO_THROW +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NO_THROW __declspec(nothrow) +#else + #define JSON_HEDLEY_NO_THROW +#endif + +#if defined(JSON_HEDLEY_FALL_THROUGH) + #undef JSON_HEDLEY_FALL_THROUGH +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) +#elif defined(__fallthrough) /* SAL */ + #define JSON_HEDLEY_FALL_THROUGH __fallthrough +#else + #define JSON_HEDLEY_FALL_THROUGH +#endif + +#if defined(JSON_HEDLEY_RETURNS_NON_NULL) + #undef JSON_HEDLEY_RETURNS_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) +#elif defined(_Ret_notnull_) /* SAL */ + #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ +#else + #define JSON_HEDLEY_RETURNS_NON_NULL +#endif + +#if defined(JSON_HEDLEY_ARRAY_PARAM) + #undef JSON_HEDLEY_ARRAY_PARAM +#endif +#if \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(__STDC_NO_VLA__) && \ + !defined(__cplusplus) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_ARRAY_PARAM(name) (name) +#else + #define JSON_HEDLEY_ARRAY_PARAM(name) +#endif + +#if defined(JSON_HEDLEY_IS_CONSTANT) + #undef JSON_HEDLEY_IS_CONSTANT +#endif +#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) + #undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#endif +/* JSON_HEDLEY_IS_CONSTEXPR_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #undef JSON_HEDLEY_IS_CONSTEXPR_ +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) +#endif +#if !defined(__cplusplus) +# if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) +#else + #include <stdint.h> + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) +#endif +# elif \ + ( \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION)) || \ + (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) +#else + #include <stdint.h> + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) +#endif +# elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + defined(JSON_HEDLEY_INTEL_VERSION) || \ + defined(JSON_HEDLEY_TINYC_VERSION) || \ + defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ + defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ + defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ + defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ + defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ + defined(__clang__) +# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ + sizeof(void) != \ + sizeof(*( \ + 1 ? \ + ((void*) ((expr) * 0L) ) : \ +((struct { char v[sizeof(void) * 2]; } *) 1) \ + ) \ + ) \ + ) +# endif +#endif +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) +#else + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) (0) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) +#endif + +#if defined(JSON_HEDLEY_BEGIN_C_DECLS) + #undef JSON_HEDLEY_BEGIN_C_DECLS +#endif +#if defined(JSON_HEDLEY_END_C_DECLS) + #undef JSON_HEDLEY_END_C_DECLS +#endif +#if defined(JSON_HEDLEY_C_DECL) + #undef JSON_HEDLEY_C_DECL +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { + #define JSON_HEDLEY_END_C_DECLS } + #define JSON_HEDLEY_C_DECL extern "C" +#else + #define JSON_HEDLEY_BEGIN_C_DECLS + #define JSON_HEDLEY_END_C_DECLS + #define JSON_HEDLEY_C_DECL +#endif + +#if defined(JSON_HEDLEY_STATIC_ASSERT) + #undef JSON_HEDLEY_STATIC_ASSERT +#endif +#if \ + !defined(__cplusplus) && ( \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ + (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + defined(_Static_assert) \ + ) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) +#elif \ + (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) +#else +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) +#endif + +#if defined(JSON_HEDLEY_NULL) + #undef JSON_HEDLEY_NULL +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) + #elif defined(NULL) + #define JSON_HEDLEY_NULL NULL + #else + #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) + #endif +#elif defined(NULL) + #define JSON_HEDLEY_NULL NULL +#else + #define JSON_HEDLEY_NULL ((void*) 0) +#endif + +#if defined(JSON_HEDLEY_MESSAGE) + #undef JSON_HEDLEY_MESSAGE +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_MESSAGE(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(message msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) +#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_WARNING) + #undef JSON_HEDLEY_WARNING +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_WARNING(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(clang warning msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_REQUIRE) + #undef JSON_HEDLEY_REQUIRE +#endif +#if defined(JSON_HEDLEY_REQUIRE_MSG) + #undef JSON_HEDLEY_REQUIRE_MSG +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) +# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") +# define JSON_HEDLEY_REQUIRE(expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), #expr, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), msg, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) +# endif +#else +# define JSON_HEDLEY_REQUIRE(expr) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) +#endif + +#if defined(JSON_HEDLEY_FLAGS) + #undef JSON_HEDLEY_FLAGS +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) + #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#else + #define JSON_HEDLEY_FLAGS +#endif + +#if defined(JSON_HEDLEY_FLAGS_CAST) + #undef JSON_HEDLEY_FLAGS_CAST +#endif +#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) +# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("warning(disable:188)") \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) +#endif + +#if defined(JSON_HEDLEY_EMPTY_BASES) + #undef JSON_HEDLEY_EMPTY_BASES +#endif +#if \ + (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) +#else + #define JSON_HEDLEY_EMPTY_BASES +#endif + +/* Remaining macros are deprecated. */ + +#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#endif +#if defined(__clang__) + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) +#else + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) + #undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#endif +#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) + +#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) + #undef JSON_HEDLEY_CLANG_HAS_FEATURE +#endif +#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) + +#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) + #undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#endif +#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) + +#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) + #undef JSON_HEDLEY_CLANG_HAS_WARNING +#endif +#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) + +#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ + + +// This file contains all internal macro definitions (except those affecting ABI) +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// #include <nlohmann/detail/abi_macros.hpp> + + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// C++ language standard detection +// if the user manually specified the used c++ version this is skipped +#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 + #endif + // the cpp 11 flag is always specified because it is the minimal required version + #define JSON_HAS_CPP_11 +#endif + +#ifdef __has_include + #if __has_include(<version>) + #include <version> + #endif +#endif + +#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) + #ifdef JSON_HAS_CPP_17 + #if defined(__cpp_lib_filesystem) + #define JSON_HAS_FILESYSTEM 1 + #elif defined(__cpp_lib_experimental_filesystem) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif !defined(__has_include) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif __has_include(<filesystem>) + #define JSON_HAS_FILESYSTEM 1 + #elif __has_include(<experimental/filesystem>) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #endif + + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__clang_major__) && __clang_major__ < 7 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support + #if defined(_MSC_VER) && _MSC_VER < 1914 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before iOS 13 + #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before macOS Catalina + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + #endif +#endif + +#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_FILESYSTEM + #define JSON_HAS_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_THREE_WAY_COMPARISON + #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ + && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L + #define JSON_HAS_THREE_WAY_COMPARISON 1 + #else + #define JSON_HAS_THREE_WAY_COMPARISON 0 + #endif +#endif + +#ifndef JSON_HAS_RANGES + // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error + #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 + #define JSON_HAS_RANGES 0 + #elif defined(__cpp_lib_ranges) + #define JSON_HAS_RANGES 1 + #else + #define JSON_HAS_RANGES 0 + #endif +#endif + +#ifndef JSON_HAS_STATIC_RTTI + #if !defined(_HAS_STATIC_RTTI) || _HAS_STATIC_RTTI != 0 + #define JSON_HAS_STATIC_RTTI 1 + #else + #define JSON_HAS_STATIC_RTTI 0 + #endif +#endif + +#ifdef JSON_HAS_CPP_17 + #define JSON_INLINE_VARIABLE inline +#else + #define JSON_INLINE_VARIABLE +#endif + +#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) + #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] +#else + #define JSON_NO_UNIQUE_ADDRESS +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdocumentation" + #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +#endif + +// allow disabling exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include <cstdlib> + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// allow overriding assert +#if !defined(JSON_ASSERT) + #include <cassert> // assert + #define JSON_ASSERT(x) assert(x) +#endif + +// allow to access some private functions (needed by the test suite) +#if defined(JSON_TESTS_PRIVATE) + #define JSON_PRIVATE_UNLESS_TESTED public +#else + #define JSON_PRIVATE_UNLESS_TESTED private +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template<typename BasicJsonType> \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template<typename BasicJsonType> \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template<template<typename, typename, typename...> class ObjectType, \ + template<typename, typename...> class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template<typename> class AllocatorType, \ + template<typename, typename = void> class JSONSerializer, \ + class BinaryType, \ + class CustomBaseClass> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json<ObjectType, ArrayType, StringType, BooleanType, \ + NumberIntegerType, NumberUnsignedType, NumberFloatType, \ + AllocatorType, JSONSerializer, BinaryType, CustomBaseClass> + +// Macros to simplify conversion from/to types + +#define NLOHMANN_JSON_EXPAND( x ) x +#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME +#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ + NLOHMANN_JSON_PASTE64, \ + NLOHMANN_JSON_PASTE63, \ + NLOHMANN_JSON_PASTE62, \ + NLOHMANN_JSON_PASTE61, \ + NLOHMANN_JSON_PASTE60, \ + NLOHMANN_JSON_PASTE59, \ + NLOHMANN_JSON_PASTE58, \ + NLOHMANN_JSON_PASTE57, \ + NLOHMANN_JSON_PASTE56, \ + NLOHMANN_JSON_PASTE55, \ + NLOHMANN_JSON_PASTE54, \ + NLOHMANN_JSON_PASTE53, \ + NLOHMANN_JSON_PASTE52, \ + NLOHMANN_JSON_PASTE51, \ + NLOHMANN_JSON_PASTE50, \ + NLOHMANN_JSON_PASTE49, \ + NLOHMANN_JSON_PASTE48, \ + NLOHMANN_JSON_PASTE47, \ + NLOHMANN_JSON_PASTE46, \ + NLOHMANN_JSON_PASTE45, \ + NLOHMANN_JSON_PASTE44, \ + NLOHMANN_JSON_PASTE43, \ + NLOHMANN_JSON_PASTE42, \ + NLOHMANN_JSON_PASTE41, \ + NLOHMANN_JSON_PASTE40, \ + NLOHMANN_JSON_PASTE39, \ + NLOHMANN_JSON_PASTE38, \ + NLOHMANN_JSON_PASTE37, \ + NLOHMANN_JSON_PASTE36, \ + NLOHMANN_JSON_PASTE35, \ + NLOHMANN_JSON_PASTE34, \ + NLOHMANN_JSON_PASTE33, \ + NLOHMANN_JSON_PASTE32, \ + NLOHMANN_JSON_PASTE31, \ + NLOHMANN_JSON_PASTE30, \ + NLOHMANN_JSON_PASTE29, \ + NLOHMANN_JSON_PASTE28, \ + NLOHMANN_JSON_PASTE27, \ + NLOHMANN_JSON_PASTE26, \ + NLOHMANN_JSON_PASTE25, \ + NLOHMANN_JSON_PASTE24, \ + NLOHMANN_JSON_PASTE23, \ + NLOHMANN_JSON_PASTE22, \ + NLOHMANN_JSON_PASTE21, \ + NLOHMANN_JSON_PASTE20, \ + NLOHMANN_JSON_PASTE19, \ + NLOHMANN_JSON_PASTE18, \ + NLOHMANN_JSON_PASTE17, \ + NLOHMANN_JSON_PASTE16, \ + NLOHMANN_JSON_PASTE15, \ + NLOHMANN_JSON_PASTE14, \ + NLOHMANN_JSON_PASTE13, \ + NLOHMANN_JSON_PASTE12, \ + NLOHMANN_JSON_PASTE11, \ + NLOHMANN_JSON_PASTE10, \ + NLOHMANN_JSON_PASTE9, \ + NLOHMANN_JSON_PASTE8, \ + NLOHMANN_JSON_PASTE7, \ + NLOHMANN_JSON_PASTE6, \ + NLOHMANN_JSON_PASTE5, \ + NLOHMANN_JSON_PASTE4, \ + NLOHMANN_JSON_PASTE3, \ + NLOHMANN_JSON_PASTE2, \ + NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) +#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) +#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) +#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) +#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) +#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) +#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) +#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) +#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) +#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) +#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) +#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) +#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) +#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) +#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) +#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) +#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) +#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) +#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) +#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) +#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) +#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) +#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) +#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) +#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) +#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) +#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) +#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) +#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) +#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) +#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) +#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) +#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) +#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) +#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) +#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) +#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) +#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) +#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) +#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) +#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) +#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) +#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) +#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) +#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) +#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) +#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) +#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) +#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) +#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) +#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) +#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) +#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) +#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) +#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) +#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) +#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) +#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) +#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) +#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) +#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) +#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) +#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) +#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) + +#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; +#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); +#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1); + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ + friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ + inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +// inspired from https://stackoverflow.com/a/26745591 +// allows to call any std function as if (e.g. with begin): +// using std::begin; begin(x); +// +// it allows using the detected idiom to retrieve the return type +// of such an expression +#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ + namespace detail { \ + using std::std_name; \ + \ + template<typename... T> \ + using result_of_##std_name = decltype(std_name(std::declval<T>()...)); \ + } \ + \ + namespace detail2 { \ + struct std_name##_tag \ + { \ + }; \ + \ + template<typename... T> \ + std_name##_tag std_name(T&&...); \ + \ + template<typename... T> \ + using result_of_##std_name = decltype(std_name(std::declval<T>()...)); \ + \ + template<typename... T> \ + struct would_call_std_##std_name \ + { \ + static constexpr auto const value = ::nlohmann::detail:: \ + is_detected_exact<std_name##_tag, result_of_##std_name, T...>::value; \ + }; \ + } /* namespace detail2 */ \ + \ + template<typename... T> \ + struct would_call_std_##std_name : detail2::would_call_std_##std_name<T...> \ + { \ + } + +#ifndef JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_USE_IMPLICIT_CONVERSIONS 1 +#endif + +#if JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_EXPLICIT +#else + #define JSON_EXPLICIT explicit +#endif + +#ifndef JSON_DISABLE_ENUM_SERIALIZATION + #define JSON_DISABLE_ENUM_SERIALIZATION 0 +#endif + +#ifndef JSON_USE_GLOBAL_UDLS + #define JSON_USE_GLOBAL_UDLS 1 +#endif + +#if JSON_HAS_THREE_WAY_COMPARISON + #include <compare> // partial_ordering +#endif + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + binary, ///< binary array (ordered collection of bytes) + discarded ///< discarded by the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string < binary +- furthermore, each type is not smaller than itself +- discarded values are not comparable +- binary is represented as a b"" string in python and directly comparable to a + string; however, making a binary array directly comparable with a string would + be surprising behavior in a JSON file. + +@since version 1.0.0 +*/ +#if JSON_HAS_THREE_WAY_COMPARISON + inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD* +#else + inline bool operator<(const value_t lhs, const value_t rhs) noexcept +#endif +{ + static constexpr std::array<std::uint8_t, 9> order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, + 6 /* binary */ + } + }; + + const auto l_index = static_cast<std::size_t>(lhs); + const auto r_index = static_cast<std::size_t>(rhs); +#if JSON_HAS_THREE_WAY_COMPARISON + if (l_index < order.size() && r_index < order.size()) + { + return order[l_index] <=> order[r_index]; // *NOPAD* + } + return std::partial_ordering::unordered; +#else + return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; +#endif +} + +// GCC selects the built-in operator< over an operator rewritten from +// a user-defined spaceship operator +// Clang, MSVC, and ICC select the rewritten candidate +// (see GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200) +#if JSON_HAS_THREE_WAY_COMPARISON && defined(__GNUC__) +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + return std::is_lt(lhs <=> rhs); // *NOPAD* +} +#endif + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/string_escape.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// #include <nlohmann/detail/abi_macros.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief replace all occurrences of a substring by another string + +@param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t +@param[in] f the substring to replace with @a t +@param[in] t the string to replace @a f + +@pre The search string @a f must not be empty. **This precondition is +enforced with an assertion.** + +@since version 2.0.0 +*/ +template<typename StringType> +inline void replace_substring(StringType& s, const StringType& f, + const StringType& t) +{ + JSON_ASSERT(!f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != StringType::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} +} + +/*! + * @brief string escaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to escape + * @return escaped string + * + * Note the order of escaping "~" to "~0" and "/" to "~1" is important. + */ +template<typename StringType> +inline StringType escape(StringType s) +{ + replace_substring(s, StringType{"~"}, StringType{"~0"}); + replace_substring(s, StringType{"/"}, StringType{"~1"}); + return s; +} + +/*! + * @brief string unescaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to unescape + * @return unescaped string + * + * Note the order of escaping "~1" to "/" and "~0" to "~" is important. + */ +template<typename StringType> +static void unescape(StringType& s) +{ + replace_substring(s, StringType{"~1"}, StringType{"/"}); + replace_substring(s, StringType{"~0"}, StringType{"~"}); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/input/position_t.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstddef> // size_t + +// #include <nlohmann/detail/abi_macros.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-FileCopyrightText: 2018 The Abseil Authors +// SPDX-License-Identifier: MIT + + + +#include <array> // array +#include <cstddef> // size_t +#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type +#include <utility> // index_sequence, make_index_sequence, index_sequence_for + +// #include <nlohmann/detail/macro_scope.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template<typename T> +using uncvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type; + +#ifdef JSON_HAS_CPP_14 + +// the following utilities are natively available in C++14 +using std::enable_if_t; +using std::index_sequence; +using std::make_index_sequence; +using std::index_sequence_for; + +#else + +// alias templates to reduce boilerplate +template<bool B, typename T = void> +using enable_if_t = typename std::enable_if<B, T>::type; + +// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h +// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. + +//// START OF CODE FROM GOOGLE ABSEIL + +// integer_sequence +// +// Class template representing a compile-time integer sequence. An instantiation +// of `integer_sequence<T, Ints...>` has a sequence of integers encoded in its +// type through its template arguments (which is a common need when +// working with C++11 variadic templates). `absl::integer_sequence` is designed +// to be a drop-in replacement for C++14's `std::integer_sequence`. +// +// Example: +// +// template< class T, T... Ints > +// void user_function(integer_sequence<T, Ints...>); +// +// int main() +// { +// // user_function's `T` will be deduced to `int` and `Ints...` +// // will be deduced to `0, 1, 2, 3, 4`. +// user_function(make_integer_sequence<int, 5>()); +// } +template <typename T, T... Ints> +struct integer_sequence +{ + using value_type = T; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +// index_sequence +// +// A helper template for an `integer_sequence` of `size_t`, +// `absl::index_sequence` is designed to be a drop-in replacement for C++14's +// `std::index_sequence`. +template <size_t... Ints> +using index_sequence = integer_sequence<size_t, Ints...>; + +namespace utility_internal +{ + +template <typename Seq, size_t SeqSize, size_t Rem> +struct Extend; + +// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. +template <typename T, T... Ints, size_t SeqSize> +struct Extend<integer_sequence<T, Ints...>, SeqSize, 0> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; +}; + +template <typename T, T... Ints, size_t SeqSize> +struct Extend<integer_sequence<T, Ints...>, SeqSize, 1> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; +}; + +// Recursion helper for 'make_integer_sequence<T, N>'. +// 'Gen<T, N>::type' is an alias for 'integer_sequence<T, 0, 1, ... N-1>'. +template <typename T, size_t N> +struct Gen +{ + using type = + typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; +}; + +template <typename T> +struct Gen<T, 0> +{ + using type = integer_sequence<T>; +}; + +} // namespace utility_internal + +// Compile-time sequences of integers + +// make_integer_sequence +// +// This template alias is equivalent to +// `integer_sequence<int, 0, 1, ..., N-1>`, and is designed to be a drop-in +// replacement for C++14's `std::make_integer_sequence`. +template <typename T, T N> +using make_integer_sequence = typename utility_internal::Gen<T, N>::type; + +// make_index_sequence +// +// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, +// and is designed to be a drop-in replacement for C++14's +// `std::make_index_sequence`. +template <size_t N> +using make_index_sequence = make_integer_sequence<size_t, N>; + +// index_sequence_for +// +// Converts a typename pack into an index sequence of the same length, and +// is designed to be a drop-in replacement for C++14's +// `std::index_sequence_for()` +template <typename... Ts> +using index_sequence_for = make_index_sequence<sizeof...(Ts)>; + +//// END OF CODE FROM GOOGLE ABSEIL + +#endif + +// dispatch utility (taken from ranges-v3) +template<unsigned N> struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template<typename T> +struct static_const +{ + static JSON_INLINE_VARIABLE constexpr T value{}; +}; + +#ifndef JSON_HAS_CPP_17 + template<typename T> + constexpr T static_const<T>::value; +#endif + +template<typename T, typename... Args> +inline constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args) +{ + return std::array<T, sizeof...(Args)> {{static_cast<T>(std::forward<Args>(args))...}}; +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/meta/type_traits.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <limits> // numeric_limits +#include <type_traits> // false_type, is_constructible, is_integral, is_same, true_type +#include <utility> // declval +#include <tuple> // tuple +#include <string> // char_traits + +// #include <nlohmann/detail/iterators/iterator_traits.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <iterator> // random_access_iterator_tag + +// #include <nlohmann/detail/abi_macros.hpp> + +// #include <nlohmann/detail/meta/void_t.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template<typename It, typename = void> +struct iterator_types {}; + +template<typename It> +struct iterator_types < + It, + void_t<typename It::difference_type, typename It::value_type, typename It::pointer, + typename It::reference, typename It::iterator_category >> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template<typename T, typename = void> +struct iterator_traits +{ +}; + +template<typename T> +struct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >> + : iterator_types<T> +{ +}; + +template<typename T> +struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/call_std/begin.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// #include <nlohmann/detail/macro_scope.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); + +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/meta/call_std/end.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// #include <nlohmann/detail/macro_scope.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); + +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/detected.hpp> + +// #include <nlohmann/json_fwd.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + +#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ + #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + #include <cstdint> // int64_t, uint64_t + #include <map> // map + #include <memory> // allocator + #include <string> // string + #include <vector> // vector + + // #include <nlohmann/detail/abi_macros.hpp> + + + /*! + @brief namespace for Niels Lohmann + @see https://github.com/nlohmann + @since version 1.0.0 + */ + NLOHMANN_JSON_NAMESPACE_BEGIN + + /*! + @brief default JSONSerializer template argument + + This serializer ignores the template arguments and uses ADL + ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) + for serialization. + */ + template<typename T = void, typename SFINAE = void> + struct adl_serializer; + + /// a class to store JSON values + /// @sa https://json.nlohmann.me/api/basic_json/ + template<template<typename U, typename V, typename... Args> class ObjectType = + std::map, + template<typename U, typename... Args> class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template<typename U> class AllocatorType = std::allocator, + template<typename T, typename SFINAE = void> class JSONSerializer = + adl_serializer, + class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError + class CustomBaseClass = void> + class basic_json; + + /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document + /// @sa https://json.nlohmann.me/api/json_pointer/ + template<typename RefStringType> + class json_pointer; + + /*! + @brief default specialization + @sa https://json.nlohmann.me/api/json/ + */ + using json = basic_json<>; + + /// @brief a minimal map-like container that preserves insertion order + /// @sa https://json.nlohmann.me/api/ordered_map/ + template<class Key, class T, class IgnoredLess, class Allocator> + struct ordered_map; + + /// @brief specialization that maintains the insertion order of object keys + /// @sa https://json.nlohmann.me/api/ordered_json/ + using ordered_json = basic_json<nlohmann::ordered_map>; + + NLOHMANN_JSON_NAMESPACE_END + +#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + +NLOHMANN_JSON_NAMESPACE_BEGIN +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ + +///////////// +// helpers // +///////////// + +// Note to maintainers: +// +// Every trait in this file expects a non CV-qualified type. +// The only exceptions are in the 'aliases for detected' section +// (i.e. those of the form: decltype(T::member_function(std::declval<T>()))) +// +// In this case, T has to be properly CV-qualified to constraint the function arguments +// (e.g. to_json(BasicJsonType&, const T&)) + +template<typename> struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {}; + +// used by exceptions create() member functions +// true_type for pointer to possibly cv-qualified basic_json or std::nullptr_t +// false_type otherwise +template<typename BasicJsonContext> +struct is_basic_json_context : + std::integral_constant < bool, + is_basic_json<typename std::remove_cv<typename std::remove_pointer<BasicJsonContext>::type>::type>::value + || std::is_same<BasicJsonContext, std::nullptr_t>::value > +{}; + +////////////////////// +// json_ref helpers // +////////////////////// + +template<typename> +class json_ref; + +template<typename> +struct is_json_ref : std::false_type {}; + +template<typename T> +struct is_json_ref<json_ref<T>> : std::true_type {}; + +////////////////////////// +// aliases for detected // +////////////////////////// + +template<typename T> +using mapped_type_t = typename T::mapped_type; + +template<typename T> +using key_type_t = typename T::key_type; + +template<typename T> +using value_type_t = typename T::value_type; + +template<typename T> +using difference_type_t = typename T::difference_type; + +template<typename T> +using pointer_t = typename T::pointer; + +template<typename T> +using reference_t = typename T::reference; + +template<typename T> +using iterator_category_t = typename T::iterator_category; + +template<typename T, typename... Args> +using to_json_function = decltype(T::to_json(std::declval<Args>()...)); + +template<typename T, typename... Args> +using from_json_function = decltype(T::from_json(std::declval<Args>()...)); + +template<typename T, typename U> +using get_template_function = decltype(std::declval<T>().template get<U>()); + +// trait checking if JSONSerializer<T>::from_json(json const&, udt&) exists +template<typename BasicJsonType, typename T, typename = void> +struct has_from_json : std::false_type {}; + +// trait checking if j.get<T> is valid +// use this trait instead of std::is_constructible or std::is_convertible, +// both rely on, or make use of implicit conversions, and thus fail when T +// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) +template <typename BasicJsonType, typename T> +struct is_getable +{ + static constexpr bool value = is_detected<get_template_function, const BasicJsonType&, T>::value; +}; + +template<typename BasicJsonType, typename T> +struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >> +{ + using serializer = typename BasicJsonType::template json_serializer<T, void>; + + static constexpr bool value = + is_detected_exact<void, from_json_function, serializer, + const BasicJsonType&, T&>::value; +}; + +// This trait checks if JSONSerializer<T>::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template<typename BasicJsonType, typename T, typename = void> +struct has_non_default_from_json : std::false_type {}; + +template<typename BasicJsonType, typename T> +struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >> +{ + using serializer = typename BasicJsonType::template json_serializer<T, void>; + + static constexpr bool value = + is_detected_exact<T, from_json_function, serializer, + const BasicJsonType&>::value; +}; + +// This trait checks if BasicJsonType::json_serializer<T>::to_json exists +// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. +template<typename BasicJsonType, typename T, typename = void> +struct has_to_json : std::false_type {}; + +template<typename BasicJsonType, typename T> +struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >> +{ + using serializer = typename BasicJsonType::template json_serializer<T, void>; + + static constexpr bool value = + is_detected_exact<void, to_json_function, serializer, BasicJsonType&, + T>::value; +}; + +template<typename T> +using detect_key_compare = typename T::key_compare; + +template<typename T> +struct has_key_compare : std::integral_constant<bool, is_detected<detect_key_compare, T>::value> {}; + +// obtains the actual object key comparator +template<typename BasicJsonType> +struct actual_object_comparator +{ + using object_t = typename BasicJsonType::object_t; + using object_comparator_t = typename BasicJsonType::default_object_comparator_t; + using type = typename std::conditional < has_key_compare<object_t>::value, + typename object_t::key_compare, object_comparator_t>::type; +}; + +template<typename BasicJsonType> +using actual_object_comparator_t = typename actual_object_comparator<BasicJsonType>::type; + +///////////////// +// char_traits // +///////////////// + +// Primary template of char_traits calls std char_traits +template<typename T> +struct char_traits : std::char_traits<T> +{}; + +// Explicitly define char traits for unsigned char since it is not standard +template<> +struct char_traits<unsigned char> : std::char_traits<char> +{ + using char_type = unsigned char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast<int_type>(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast<char_type>(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast<int_type>(EOF); + } +}; + +// Explicitly define char traits for signed char since it is not standard +template<> +struct char_traits<signed char> : std::char_traits<char> +{ + using char_type = signed char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast<int_type>(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast<char_type>(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast<int_type>(EOF); + } +}; + +/////////////////// +// is_ functions // +/////////////////// + +// https://en.cppreference.com/w/cpp/types/conjunction +template<class...> struct conjunction : std::true_type { }; +template<class B> struct conjunction<B> : B { }; +template<class B, class... Bn> +struct conjunction<B, Bn...> +: std::conditional<static_cast<bool>(B::value), conjunction<Bn...>, B>::type {}; + +// https://en.cppreference.com/w/cpp/types/negation +template<class B> struct negation : std::integral_constant < bool, !B::value > { }; + +// Reimplementation of is_constructible and is_default_constructible, due to them being broken for +// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). +// This causes compile errors in e.g. clang 3.5 or gcc 4.9. +template <typename T> +struct is_default_constructible : std::is_default_constructible<T> {}; + +template <typename T1, typename T2> +struct is_default_constructible<std::pair<T1, T2>> + : conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {}; + +template <typename T1, typename T2> +struct is_default_constructible<const std::pair<T1, T2>> + : conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {}; + +template <typename... Ts> +struct is_default_constructible<std::tuple<Ts...>> + : conjunction<is_default_constructible<Ts>...> {}; + +template <typename... Ts> +struct is_default_constructible<const std::tuple<Ts...>> + : conjunction<is_default_constructible<Ts>...> {}; + +template <typename T, typename... Args> +struct is_constructible : std::is_constructible<T, Args...> {}; + +template <typename T1, typename T2> +struct is_constructible<std::pair<T1, T2>> : is_default_constructible<std::pair<T1, T2>> {}; + +template <typename T1, typename T2> +struct is_constructible<const std::pair<T1, T2>> : is_default_constructible<const std::pair<T1, T2>> {}; + +template <typename... Ts> +struct is_constructible<std::tuple<Ts...>> : is_default_constructible<std::tuple<Ts...>> {}; + +template <typename... Ts> +struct is_constructible<const std::tuple<Ts...>> : is_default_constructible<const std::tuple<Ts...>> {}; + +template<typename T, typename = void> +struct is_iterator_traits : std::false_type {}; + +template<typename T> +struct is_iterator_traits<iterator_traits<T>> +{ + private: + using traits = iterator_traits<T>; + + public: + static constexpr auto value = + is_detected<value_type_t, traits>::value && + is_detected<difference_type_t, traits>::value && + is_detected<pointer_t, traits>::value && + is_detected<iterator_category_t, traits>::value && + is_detected<reference_t, traits>::value; +}; + +template<typename T> +struct is_range +{ + private: + using t_ref = typename std::add_lvalue_reference<T>::type; + + using iterator = detected_t<result_of_begin, t_ref>; + using sentinel = detected_t<result_of_end, t_ref>; + + // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator + // and https://en.cppreference.com/w/cpp/iterator/sentinel_for + // but reimplementing these would be too much work, as a lot of other concepts are used underneath + static constexpr auto is_iterator_begin = + is_iterator_traits<iterator_traits<iterator>>::value; + + public: + static constexpr bool value = !std::is_same<iterator, nonesuch>::value && !std::is_same<sentinel, nonesuch>::value && is_iterator_begin; +}; + +template<typename R> +using iterator_t = enable_if_t<is_range<R>::value, result_of_begin<decltype(std::declval<R&>())>>; + +template<typename T> +using range_value_t = value_type_t<iterator_traits<iterator_t<T>>>; + +// The following implementation of is_complete_type is taken from +// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ +// and is written by Xiang Fan who agreed to using it in this library. + +template<typename T, typename = void> +struct is_complete_type : std::false_type {}; + +template<typename T> +struct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {}; + +template<typename BasicJsonType, typename CompatibleObjectType, + typename = void> +struct is_compatible_object_type_impl : std::false_type {}; + +template<typename BasicJsonType, typename CompatibleObjectType> +struct is_compatible_object_type_impl < + BasicJsonType, CompatibleObjectType, + enable_if_t < is_detected<mapped_type_t, CompatibleObjectType>::value&& + is_detected<key_type_t, CompatibleObjectType>::value >> +{ + using object_t = typename BasicJsonType::object_t; + + // macOS's is_constructible does not play well with nonesuch... + static constexpr bool value = + is_constructible<typename object_t::key_type, + typename CompatibleObjectType::key_type>::value && + is_constructible<typename object_t::mapped_type, + typename CompatibleObjectType::mapped_type>::value; +}; + +template<typename BasicJsonType, typename CompatibleObjectType> +struct is_compatible_object_type + : is_compatible_object_type_impl<BasicJsonType, CompatibleObjectType> {}; + +template<typename BasicJsonType, typename ConstructibleObjectType, + typename = void> +struct is_constructible_object_type_impl : std::false_type {}; + +template<typename BasicJsonType, typename ConstructibleObjectType> +struct is_constructible_object_type_impl < + BasicJsonType, ConstructibleObjectType, + enable_if_t < is_detected<mapped_type_t, ConstructibleObjectType>::value&& + is_detected<key_type_t, ConstructibleObjectType>::value >> +{ + using object_t = typename BasicJsonType::object_t; + + static constexpr bool value = + (is_default_constructible<ConstructibleObjectType>::value && + (std::is_move_assignable<ConstructibleObjectType>::value || + std::is_copy_assignable<ConstructibleObjectType>::value) && + (is_constructible<typename ConstructibleObjectType::key_type, + typename object_t::key_type>::value && + std::is_same < + typename object_t::mapped_type, + typename ConstructibleObjectType::mapped_type >::value)) || + (has_from_json<BasicJsonType, + typename ConstructibleObjectType::mapped_type>::value || + has_non_default_from_json < + BasicJsonType, + typename ConstructibleObjectType::mapped_type >::value); +}; + +template<typename BasicJsonType, typename ConstructibleObjectType> +struct is_constructible_object_type + : is_constructible_object_type_impl<BasicJsonType, + ConstructibleObjectType> {}; + +template<typename BasicJsonType, typename CompatibleStringType> +struct is_compatible_string_type +{ + static constexpr auto value = + is_constructible<typename BasicJsonType::string_t, CompatibleStringType>::value; +}; + +template<typename BasicJsonType, typename ConstructibleStringType> +struct is_constructible_string_type +{ + // launder type through decltype() to fix compilation failure on ICPC +#ifdef __INTEL_COMPILER + using laundered_type = decltype(std::declval<ConstructibleStringType>()); +#else + using laundered_type = ConstructibleStringType; +#endif + + static constexpr auto value = + conjunction < + is_constructible<laundered_type, typename BasicJsonType::string_t>, + is_detected_exact<typename BasicJsonType::string_t::value_type, + value_type_t, laundered_type >>::value; +}; + +template<typename BasicJsonType, typename CompatibleArrayType, typename = void> +struct is_compatible_array_type_impl : std::false_type {}; + +template<typename BasicJsonType, typename CompatibleArrayType> +struct is_compatible_array_type_impl < + BasicJsonType, CompatibleArrayType, + enable_if_t < + is_detected<iterator_t, CompatibleArrayType>::value&& + is_iterator_traits<iterator_traits<detected_t<iterator_t, CompatibleArrayType>>>::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 + !std::is_same<CompatibleArrayType, detected_t<range_value_t, CompatibleArrayType>>::value >> +{ + static constexpr bool value = + is_constructible<BasicJsonType, + range_value_t<CompatibleArrayType>>::value; +}; + +template<typename BasicJsonType, typename CompatibleArrayType> +struct is_compatible_array_type + : is_compatible_array_type_impl<BasicJsonType, CompatibleArrayType> {}; + +template<typename BasicJsonType, typename ConstructibleArrayType, typename = void> +struct is_constructible_array_type_impl : std::false_type {}; + +template<typename BasicJsonType, typename ConstructibleArrayType> +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t<std::is_same<ConstructibleArrayType, + typename BasicJsonType::value_type>::value >> + : std::true_type {}; + +template<typename BasicJsonType, typename ConstructibleArrayType> +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t < !std::is_same<ConstructibleArrayType, + typename BasicJsonType::value_type>::value&& + !is_compatible_string_type<BasicJsonType, ConstructibleArrayType>::value&& + is_default_constructible<ConstructibleArrayType>::value&& +(std::is_move_assignable<ConstructibleArrayType>::value || + std::is_copy_assignable<ConstructibleArrayType>::value)&& +is_detected<iterator_t, ConstructibleArrayType>::value&& +is_iterator_traits<iterator_traits<detected_t<iterator_t, ConstructibleArrayType>>>::value&& +is_detected<range_value_t, ConstructibleArrayType>::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 +!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&& + is_complete_type < + detected_t<range_value_t, ConstructibleArrayType >>::value >> +{ + using value_type = range_value_t<ConstructibleArrayType>; + + static constexpr bool value = + std::is_same<value_type, + typename BasicJsonType::array_t::value_type>::value || + has_from_json<BasicJsonType, + value_type>::value || + has_non_default_from_json < + BasicJsonType, + value_type >::value; +}; + +template<typename BasicJsonType, typename ConstructibleArrayType> +struct is_constructible_array_type + : is_constructible_array_type_impl<BasicJsonType, ConstructibleArrayType> {}; + +template<typename RealIntegerType, typename CompatibleNumberIntegerType, + typename = void> +struct is_compatible_integer_type_impl : std::false_type {}; + +template<typename RealIntegerType, typename CompatibleNumberIntegerType> +struct is_compatible_integer_type_impl < + RealIntegerType, CompatibleNumberIntegerType, + enable_if_t < std::is_integral<RealIntegerType>::value&& + std::is_integral<CompatibleNumberIntegerType>::value&& + !std::is_same<bool, CompatibleNumberIntegerType>::value >> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits<RealIntegerType>; + using CompatibleLimits = std::numeric_limits<CompatibleNumberIntegerType>; + + static constexpr auto value = + is_constructible<RealIntegerType, + CompatibleNumberIntegerType>::value && + CompatibleLimits::is_integer && + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template<typename RealIntegerType, typename CompatibleNumberIntegerType> +struct is_compatible_integer_type + : is_compatible_integer_type_impl<RealIntegerType, + CompatibleNumberIntegerType> {}; + +template<typename BasicJsonType, typename CompatibleType, typename = void> +struct is_compatible_type_impl: std::false_type {}; + +template<typename BasicJsonType, typename CompatibleType> +struct is_compatible_type_impl < + BasicJsonType, CompatibleType, + enable_if_t<is_complete_type<CompatibleType>::value >> +{ + static constexpr bool value = + has_to_json<BasicJsonType, CompatibleType>::value; +}; + +template<typename BasicJsonType, typename CompatibleType> +struct is_compatible_type + : is_compatible_type_impl<BasicJsonType, CompatibleType> {}; + +template<typename T1, typename T2> +struct is_constructible_tuple : std::false_type {}; + +template<typename T1, typename... Args> +struct is_constructible_tuple<T1, std::tuple<Args...>> : conjunction<is_constructible<T1, Args>...> {}; + +template<typename BasicJsonType, typename T> +struct is_json_iterator_of : std::false_type {}; + +template<typename BasicJsonType> +struct is_json_iterator_of<BasicJsonType, typename BasicJsonType::iterator> : std::true_type {}; + +template<typename BasicJsonType> +struct is_json_iterator_of<BasicJsonType, typename BasicJsonType::const_iterator> : std::true_type +{}; + +// checks if a given type T is a template specialization of Primary +template<template <typename...> class Primary, typename T> +struct is_specialization_of : std::false_type {}; + +template<template <typename...> class Primary, typename... Args> +struct is_specialization_of<Primary, Primary<Args...>> : std::true_type {}; + +template<typename T> +using is_json_pointer = is_specialization_of<::nlohmann::json_pointer, uncvref_t<T>>; + +// checks if A and B are comparable using Compare functor +template<typename Compare, typename A, typename B, typename = void> +struct is_comparable : std::false_type {}; + +template<typename Compare, typename A, typename B> +struct is_comparable<Compare, A, B, void_t< +decltype(std::declval<Compare>()(std::declval<A>(), std::declval<B>())), +decltype(std::declval<Compare>()(std::declval<B>(), std::declval<A>())) +>> : std::true_type {}; + +template<typename T> +using detect_is_transparent = typename T::is_transparent; + +// type trait to check if KeyType can be used as object key (without a BasicJsonType) +// see is_usable_as_basic_json_key_type below +template<typename Comparator, typename ObjectKeyType, typename KeyTypeCVRef, bool RequireTransparentComparator = true, + bool ExcludeObjectKeyType = RequireTransparentComparator, typename KeyType = uncvref_t<KeyTypeCVRef>> +using is_usable_as_key_type = typename std::conditional < + is_comparable<Comparator, ObjectKeyType, KeyTypeCVRef>::value + && !(ExcludeObjectKeyType && std::is_same<KeyType, + ObjectKeyType>::value) + && (!RequireTransparentComparator + || is_detected <detect_is_transparent, Comparator>::value) + && !is_json_pointer<KeyType>::value, + std::true_type, + std::false_type >::type; + +// type trait to check if KeyType can be used as object key +// true if: +// - KeyType is comparable with BasicJsonType::object_t::key_type +// - if ExcludeObjectKeyType is true, KeyType is not BasicJsonType::object_t::key_type +// - the comparator is transparent or RequireTransparentComparator is false +// - KeyType is not a JSON iterator or json_pointer +template<typename BasicJsonType, typename KeyTypeCVRef, bool RequireTransparentComparator = true, + bool ExcludeObjectKeyType = RequireTransparentComparator, typename KeyType = uncvref_t<KeyTypeCVRef>> +using is_usable_as_basic_json_key_type = typename std::conditional < + is_usable_as_key_type<typename BasicJsonType::object_comparator_t, + typename BasicJsonType::object_t::key_type, KeyTypeCVRef, + RequireTransparentComparator, ExcludeObjectKeyType>::value + && !is_json_iterator_of<BasicJsonType, KeyType>::value, + std::true_type, + std::false_type >::type; + +template<typename ObjectType, typename KeyType> +using detect_erase_with_key_type = decltype(std::declval<ObjectType&>().erase(std::declval<KeyType>())); + +// type trait to check if object_t has an erase() member functions accepting KeyType +template<typename BasicJsonType, typename KeyType> +using has_erase_with_key_type = typename std::conditional < + is_detected < + detect_erase_with_key_type, + typename BasicJsonType::object_t, KeyType >::value, + std::true_type, + std::false_type >::type; + +// a naive helper to check if a type is an ordered_map (exploits the fact that +// ordered_map inherits capacity() from std::vector) +template <typename T> +struct is_ordered_map +{ + using one = char; + + struct two + { + char x[2]; // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + }; + + template <typename C> static one test( decltype(&C::capacity) ) ; + template <typename C> static two test(...); + + enum { value = sizeof(test<T>(nullptr)) == sizeof(char) }; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) +}; + +// to avoid useless casts (see https://github.com/nlohmann/json/issues/2893#issuecomment-889152324) +template < typename T, typename U, enable_if_t < !std::is_same<T, U>::value, int > = 0 > +T conditional_static_cast(U value) +{ + return static_cast<T>(value); +} + +template<typename T, typename U, enable_if_t<std::is_same<T, U>::value, int> = 0> +T conditional_static_cast(U value) +{ + return value; +} + +template<typename... Types> +using all_integral = conjunction<std::is_integral<Types>...>; + +template<typename... Types> +using all_signed = conjunction<std::is_signed<Types>...>; + +template<typename... Types> +using all_unsigned = conjunction<std::is_unsigned<Types>...>; + +// there's a disjunction trait in another PR; replace when merged +template<typename... Types> +using same_sign = std::integral_constant < bool, + all_signed<Types...>::value || all_unsigned<Types...>::value >; + +template<typename OfType, typename T> +using never_out_of_range = std::integral_constant < bool, + (std::is_signed<OfType>::value && (sizeof(T) < sizeof(OfType))) + || (same_sign<OfType, T>::value && sizeof(OfType) == sizeof(T)) >; + +template<typename OfType, typename T, + bool OfTypeSigned = std::is_signed<OfType>::value, + bool TSigned = std::is_signed<T>::value> +struct value_in_range_of_impl2; + +template<typename OfType, typename T> +struct value_in_range_of_impl2<OfType, T, false, false> +{ + static constexpr bool test(T val) + { + using CommonType = typename std::common_type<OfType, T>::type; + return static_cast<CommonType>(val) <= static_cast<CommonType>((std::numeric_limits<OfType>::max)()); + } +}; + +template<typename OfType, typename T> +struct value_in_range_of_impl2<OfType, T, true, false> +{ + static constexpr bool test(T val) + { + using CommonType = typename std::common_type<OfType, T>::type; + return static_cast<CommonType>(val) <= static_cast<CommonType>((std::numeric_limits<OfType>::max)()); + } +}; + +template<typename OfType, typename T> +struct value_in_range_of_impl2<OfType, T, false, true> +{ + static constexpr bool test(T val) + { + using CommonType = typename std::common_type<OfType, T>::type; + return val >= 0 && static_cast<CommonType>(val) <= static_cast<CommonType>((std::numeric_limits<OfType>::max)()); + } +}; + +template<typename OfType, typename T> +struct value_in_range_of_impl2<OfType, T, true, true> +{ + static constexpr bool test(T val) + { + using CommonType = typename std::common_type<OfType, T>::type; + return static_cast<CommonType>(val) >= static_cast<CommonType>((std::numeric_limits<OfType>::min)()) + && static_cast<CommonType>(val) <= static_cast<CommonType>((std::numeric_limits<OfType>::max)()); + } +}; + +template<typename OfType, typename T, + bool NeverOutOfRange = never_out_of_range<OfType, T>::value, + typename = detail::enable_if_t<all_integral<OfType, T>::value>> +struct value_in_range_of_impl1; + +template<typename OfType, typename T> +struct value_in_range_of_impl1<OfType, T, false> +{ + static constexpr bool test(T val) + { + return value_in_range_of_impl2<OfType, T>::test(val); + } +}; + +template<typename OfType, typename T> +struct value_in_range_of_impl1<OfType, T, true> +{ + static constexpr bool test(T /*val*/) + { + return true; + } +}; + +template<typename OfType, typename T> +inline constexpr bool value_in_range_of(T val) +{ + return value_in_range_of_impl1<OfType, T>::test(val); +} + +template<bool Value> +using bool_constant = std::integral_constant<bool, Value>; + +/////////////////////////////////////////////////////////////////////////////// +// is_c_string +/////////////////////////////////////////////////////////////////////////////// + +namespace impl +{ + +template<typename T> +inline constexpr bool is_c_string() +{ + using TUnExt = typename std::remove_extent<T>::type; + using TUnCVExt = typename std::remove_cv<TUnExt>::type; + using TUnPtr = typename std::remove_pointer<T>::type; + using TUnCVPtr = typename std::remove_cv<TUnPtr>::type; + return + (std::is_array<T>::value && std::is_same<TUnCVExt, char>::value) + || (std::is_pointer<T>::value && std::is_same<TUnCVPtr, char>::value); +} + +} // namespace impl + +// checks whether T is a [cv] char */[cv] char[] C string +template<typename T> +struct is_c_string : bool_constant<impl::is_c_string<T>()> {}; + +template<typename T> +using is_c_string_uncvref = is_c_string<uncvref_t<T>>; + +/////////////////////////////////////////////////////////////////////////////// +// is_transparent +/////////////////////////////////////////////////////////////////////////////// + +namespace impl +{ + +template<typename T> +inline constexpr bool is_transparent() +{ + return is_detected<detect_is_transparent, T>::value; +} + +} // namespace impl + +// checks whether T has a member named is_transparent +template<typename T> +struct is_transparent : bool_constant<impl::is_transparent<T>()> {}; + +/////////////////////////////////////////////////////////////////////////////// + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/string_concat.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstring> // strlen +#include <string> // string +#include <utility> // forward + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/detected.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +inline std::size_t concat_length() +{ + return 0; +} + +template<typename... Args> +inline std::size_t concat_length(const char* cstr, const Args& ... rest); + +template<typename StringType, typename... Args> +inline std::size_t concat_length(const StringType& str, const Args& ... rest); + +template<typename... Args> +inline std::size_t concat_length(const char /*c*/, const Args& ... rest) +{ + return 1 + concat_length(rest...); +} + +template<typename... Args> +inline std::size_t concat_length(const char* cstr, const Args& ... rest) +{ + // cppcheck-suppress ignoredReturnValue + return ::strlen(cstr) + concat_length(rest...); +} + +template<typename StringType, typename... Args> +inline std::size_t concat_length(const StringType& str, const Args& ... rest) +{ + return str.size() + concat_length(rest...); +} + +template<typename OutStringType> +inline void concat_into(OutStringType& /*out*/) +{} + +template<typename StringType, typename Arg> +using string_can_append = decltype(std::declval<StringType&>().append(std::declval < Arg && > ())); + +template<typename StringType, typename Arg> +using detect_string_can_append = is_detected<string_can_append, StringType, Arg>; + +template<typename StringType, typename Arg> +using string_can_append_op = decltype(std::declval<StringType&>() += std::declval < Arg && > ()); + +template<typename StringType, typename Arg> +using detect_string_can_append_op = is_detected<string_can_append_op, StringType, Arg>; + +template<typename StringType, typename Arg> +using string_can_append_iter = decltype(std::declval<StringType&>().append(std::declval<const Arg&>().begin(), std::declval<const Arg&>().end())); + +template<typename StringType, typename Arg> +using detect_string_can_append_iter = is_detected<string_can_append_iter, StringType, Arg>; + +template<typename StringType, typename Arg> +using string_can_append_data = decltype(std::declval<StringType&>().append(std::declval<const Arg&>().data(), std::declval<const Arg&>().size())); + +template<typename StringType, typename Arg> +using detect_string_can_append_data = is_detected<string_can_append_data, StringType, Arg>; + +template < typename OutStringType, typename Arg, typename... Args, + enable_if_t < !detect_string_can_append<OutStringType, Arg>::value + && detect_string_can_append_op<OutStringType, Arg>::value, int > = 0 > +inline void concat_into(OutStringType& out, Arg && arg, Args && ... rest); + +template < typename OutStringType, typename Arg, typename... Args, + enable_if_t < !detect_string_can_append<OutStringType, Arg>::value + && !detect_string_can_append_op<OutStringType, Arg>::value + && detect_string_can_append_iter<OutStringType, Arg>::value, int > = 0 > +inline void concat_into(OutStringType& out, const Arg& arg, Args && ... rest); + +template < typename OutStringType, typename Arg, typename... Args, + enable_if_t < !detect_string_can_append<OutStringType, Arg>::value + && !detect_string_can_append_op<OutStringType, Arg>::value + && !detect_string_can_append_iter<OutStringType, Arg>::value + && detect_string_can_append_data<OutStringType, Arg>::value, int > = 0 > +inline void concat_into(OutStringType& out, const Arg& arg, Args && ... rest); + +template<typename OutStringType, typename Arg, typename... Args, + enable_if_t<detect_string_can_append<OutStringType, Arg>::value, int> = 0> +inline void concat_into(OutStringType& out, Arg && arg, Args && ... rest) +{ + out.append(std::forward<Arg>(arg)); + concat_into(out, std::forward<Args>(rest)...); +} + +template < typename OutStringType, typename Arg, typename... Args, + enable_if_t < !detect_string_can_append<OutStringType, Arg>::value + && detect_string_can_append_op<OutStringType, Arg>::value, int > > +inline void concat_into(OutStringType& out, Arg&& arg, Args&& ... rest) +{ + out += std::forward<Arg>(arg); + concat_into(out, std::forward<Args>(rest)...); +} + +template < typename OutStringType, typename Arg, typename... Args, + enable_if_t < !detect_string_can_append<OutStringType, Arg>::value + && !detect_string_can_append_op<OutStringType, Arg>::value + && detect_string_can_append_iter<OutStringType, Arg>::value, int > > +inline void concat_into(OutStringType& out, const Arg& arg, Args&& ... rest) +{ + out.append(arg.begin(), arg.end()); + concat_into(out, std::forward<Args>(rest)...); +} + +template < typename OutStringType, typename Arg, typename... Args, + enable_if_t < !detect_string_can_append<OutStringType, Arg>::value + && !detect_string_can_append_op<OutStringType, Arg>::value + && !detect_string_can_append_iter<OutStringType, Arg>::value + && detect_string_can_append_data<OutStringType, Arg>::value, int > > +inline void concat_into(OutStringType& out, const Arg& arg, Args&& ... rest) +{ + out.append(arg.data(), arg.size()); + concat_into(out, std::forward<Args>(rest)...); +} + +template<typename OutStringType = std::string, typename... Args> +inline OutStringType concat(Args && ... args) +{ + OutStringType str; + str.reserve(concat_length(args...)); + concat_into(str, std::forward<Args>(args)...); + return str; +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +//////////////// +// exceptions // +//////////////// + +/// @brief general exception of the @ref basic_json class +/// @sa https://json.nlohmann.me/api/basic_json/exception/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; // NOLINT(cppcoreguidelines-non-private-member-variables-in-classes) + + protected: + JSON_HEDLEY_NON_NULL(3) + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} // NOLINT(bugprone-throw-keyword-missing) + + static std::string name(const std::string& ename, int id_) + { + return concat("[json.exception.", ename, '.', std::to_string(id_), "] "); + } + + static std::string diagnostics(std::nullptr_t /*leaf_element*/) + { + return ""; + } + + template<typename BasicJsonType> + static std::string diagnostics(const BasicJsonType* leaf_element) + { +#if JSON_DIAGNOSTICS + std::vector<std::string> tokens; + for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent) + { + switch (current->m_parent->type()) + { + case value_t::array: + { + for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i) + { + if (¤t->m_parent->m_data.m_value.array->operator[](i) == current) + { + tokens.emplace_back(std::to_string(i)); + break; + } + } + break; + } + + case value_t::object: + { + for (const auto& element : *current->m_parent->m_data.m_value.object) + { + if (&element.second == current) + { + tokens.emplace_back(element.first.c_str()); + break; + } + } + break; + } + + case value_t::null: // LCOV_EXCL_LINE + case value_t::string: // LCOV_EXCL_LINE + case value_t::boolean: // LCOV_EXCL_LINE + case value_t::number_integer: // LCOV_EXCL_LINE + case value_t::number_unsigned: // LCOV_EXCL_LINE + case value_t::number_float: // LCOV_EXCL_LINE + case value_t::binary: // LCOV_EXCL_LINE + case value_t::discarded: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + break; // LCOV_EXCL_LINE + } + } + + if (tokens.empty()) + { + return ""; + } + + auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{}, + [](const std::string & a, const std::string & b) + { + return concat(a, '/', detail::escape(b)); + }); + return concat('(', str, ") "); +#else + static_cast<void>(leaf_element); + return ""; +#endif + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/// @brief exception indicating a parse error +/// @sa https://json.nlohmann.me/api/basic_json/parse_error/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] pos the position where the error occurred (or with + chars_read_total=0 if the position cannot be + determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> + static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("parse_error", id_), "parse error", + position_string(pos), ": ", exception::diagnostics(context), what_arg); + return {id_, pos.chars_read_total, w.c_str()}; + } + + template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("parse_error", id_), "parse error", + (byte_ != 0 ? (concat(" at byte ", std::to_string(byte_))) : ""), + ": ", exception::diagnostics(context), what_arg); + return {id_, byte_, w.c_str()}; + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} + + static std::string position_string(const position_t& pos) + { + return concat(" at line ", std::to_string(pos.lines_read + 1), + ", column ", std::to_string(pos.chars_read_current_line)); + } +}; + +/// @brief exception indicating errors with iterators +/// @sa https://json.nlohmann.me/api/basic_json/invalid_iterator/ +class invalid_iterator : public exception +{ + public: + template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> + static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/// @brief exception indicating executing a member function with a wrong type +/// @sa https://json.nlohmann.me/api/basic_json/type_error/ +class type_error : public exception +{ + public: + template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> + static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/// @brief exception indicating access out of the defined range +/// @sa https://json.nlohmann.me/api/basic_json/out_of_range/ +class out_of_range : public exception +{ + public: + template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> + static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg); + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/// @brief exception indicating other library errors +/// @sa https://json.nlohmann.me/api/basic_json/other_error/ +class other_error : public exception +{ + public: + template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0> + static other_error create(int id_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg); + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/identity_tag.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// #include <nlohmann/detail/abi_macros.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// dispatching helper struct +template <class T> struct identity_tag {}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/meta/std_fs.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// #include <nlohmann/detail/macro_scope.hpp> + + +#if JSON_HAS_EXPERIMENTAL_FILESYSTEM +#include <experimental/filesystem> +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ +namespace std_fs = std::experimental::filesystem; +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END +#elif JSON_HAS_FILESYSTEM +#include <filesystem> +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ +namespace std_fs = std::filesystem; +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END +#endif + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/string_concat.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template<typename BasicJsonType> +inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_null())) + { + JSON_THROW(type_error::create(302, concat("type must be null, but is ", j.type_name()), &j)); + } + n = nullptr; +} + +// overloads for basic_json template parameters +template < typename BasicJsonType, typename ArithmeticType, + enable_if_t < std::is_arithmetic<ArithmeticType>::value&& + !std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, + int > = 0 > +void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast<value_t>(j)) + { + case value_t::number_unsigned: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); + break; + } + case value_t::number_integer: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); + break; + } + case value_t::number_float: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); + break; + } + + case value_t::null: + case value_t::object: + case value_t::array: + case value_t::string: + case value_t::boolean: + case value_t::binary: + case value_t::discarded: + default: + JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); + } +} + +template<typename BasicJsonType> +inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_boolean())) + { + JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j)); + } + b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(); +} + +template<typename BasicJsonType> +inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); + } + s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); +} + +template < + typename BasicJsonType, typename StringType, + enable_if_t < + std::is_assignable<StringType&, const typename BasicJsonType::string_t>::value + && is_detected_exact<typename BasicJsonType::string_t::value_type, value_type_t, StringType>::value + && !std::is_same<typename BasicJsonType::string_t, StringType>::value + && !is_json_ref<StringType>::value, int > = 0 > +inline void from_json(const BasicJsonType& j, StringType& s) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); + } + + s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); +} + +template<typename BasicJsonType> +inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType> +inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType> +inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) +{ + get_arithmetic_value(j, val); +} + +#if !JSON_DISABLE_ENUM_SERIALIZATION +template<typename BasicJsonType, typename EnumType, + enable_if_t<std::is_enum<EnumType>::value, int> = 0> +inline void from_json(const BasicJsonType& j, EnumType& e) +{ + typename std::underlying_type<EnumType>::type val; + get_arithmetic_value(j, val); + e = static_cast<EnumType>(val); +} +#endif // JSON_DISABLE_ENUM_SERIALIZATION + +// forward_list doesn't have an insert method +template<typename BasicJsonType, typename T, typename Allocator, + enable_if_t<is_getable<BasicJsonType, T>::value, int> = 0> +inline void from_json(const BasicJsonType& j, std::forward_list<T, Allocator>& l) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + l.clear(); + std::transform(j.rbegin(), j.rend(), + std::front_inserter(l), [](const BasicJsonType & i) + { + return i.template get<T>(); + }); +} + +// valarray doesn't have an insert method +template<typename BasicJsonType, typename T, + enable_if_t<is_getable<BasicJsonType, T>::value, int> = 0> +inline void from_json(const BasicJsonType& j, std::valarray<T>& l) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + l.resize(j.size()); + std::transform(j.begin(), j.end(), std::begin(l), + [](const BasicJsonType & elem) + { + return elem.template get<T>(); + }); +} + +template<typename BasicJsonType, typename T, std::size_t N> +auto from_json(const BasicJsonType& j, T (&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +-> decltype(j.template get<T>(), void()) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get<T>(); + } +} + +template<typename BasicJsonType> +inline void from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/) +{ + arr = *j.template get_ptr<const typename BasicJsonType::array_t*>(); +} + +template<typename BasicJsonType, typename T, std::size_t N> +auto from_json_array_impl(const BasicJsonType& j, std::array<T, N>& arr, + priority_tag<2> /*unused*/) +-> decltype(j.template get<T>(), void()) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get<T>(); + } +} + +template<typename BasicJsonType, typename ConstructibleArrayType, + enable_if_t< + std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value, + int> = 0> +auto from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, priority_tag<1> /*unused*/) +-> decltype( + arr.reserve(std::declval<typename ConstructibleArrayType::size_type>()), + j.template get<typename ConstructibleArrayType::value_type>(), + void()) +{ + using std::end; + + ConstructibleArrayType ret; + ret.reserve(j.size()); + std::transform(j.begin(), j.end(), + std::inserter(ret, end(ret)), [](const BasicJsonType & i) + { + // get<BasicJsonType>() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get<typename ConstructibleArrayType::value_type>(); + }); + arr = std::move(ret); +} + +template<typename BasicJsonType, typename ConstructibleArrayType, + enable_if_t< + std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value, + int> = 0> +inline void from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, + priority_tag<0> /*unused*/) +{ + using std::end; + + ConstructibleArrayType ret; + std::transform( + j.begin(), j.end(), std::inserter(ret, end(ret)), + [](const BasicJsonType & i) + { + // get<BasicJsonType>() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get<typename ConstructibleArrayType::value_type>(); + }); + arr = std::move(ret); +} + +template < typename BasicJsonType, typename ConstructibleArrayType, + enable_if_t < + is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value&& + !is_constructible_object_type<BasicJsonType, ConstructibleArrayType>::value&& + !is_constructible_string_type<BasicJsonType, ConstructibleArrayType>::value&& + !std::is_same<ConstructibleArrayType, typename BasicJsonType::binary_t>::value&& + !is_basic_json<ConstructibleArrayType>::value, + int > = 0 > +auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) +-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), +j.template get<typename ConstructibleArrayType::value_type>(), +void()) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + + from_json_array_impl(j, arr, priority_tag<3> {}); +} + +template < typename BasicJsonType, typename T, std::size_t... Idx > +std::array<T, sizeof...(Idx)> from_json_inplace_array_impl(BasicJsonType&& j, + identity_tag<std::array<T, sizeof...(Idx)>> /*unused*/, index_sequence<Idx...> /*unused*/) +{ + return { { std::forward<BasicJsonType>(j).at(Idx).template get<T>()... } }; +} + +template < typename BasicJsonType, typename T, std::size_t N > +auto from_json(BasicJsonType&& j, identity_tag<std::array<T, N>> tag) +-> decltype(from_json_inplace_array_impl(std::forward<BasicJsonType>(j), tag, make_index_sequence<N> {})) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + + return from_json_inplace_array_impl(std::forward<BasicJsonType>(j), tag, make_index_sequence<N> {}); +} + +template<typename BasicJsonType> +inline void from_json(const BasicJsonType& j, typename BasicJsonType::binary_t& bin) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_binary())) + { + JSON_THROW(type_error::create(302, concat("type must be binary, but is ", j.type_name()), &j)); + } + + bin = *j.template get_ptr<const typename BasicJsonType::binary_t*>(); +} + +template<typename BasicJsonType, typename ConstructibleObjectType, + enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value, int> = 0> +inline void from_json(const BasicJsonType& j, ConstructibleObjectType& obj) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_object())) + { + JSON_THROW(type_error::create(302, concat("type must be object, but is ", j.type_name()), &j)); + } + + ConstructibleObjectType ret; + const auto* inner_object = j.template get_ptr<const typename BasicJsonType::object_t*>(); + using value_type = typename ConstructibleObjectType::value_type; + std::transform( + inner_object->begin(), inner_object->end(), + std::inserter(ret, ret.begin()), + [](typename BasicJsonType::object_t::value_type const & p) + { + return value_type(p.first, p.second.template get<typename ConstructibleObjectType::mapped_type>()); + }); + obj = std::move(ret); +} + +// overload for arithmetic types, not chosen for basic_json template arguments +// (BooleanType, etc..); note: Is it really necessary to provide explicit +// overloads for boolean_t etc. in case of a custom BooleanType which is not +// an arithmetic type? +template < typename BasicJsonType, typename ArithmeticType, + enable_if_t < + std::is_arithmetic<ArithmeticType>::value&& + !std::is_same<ArithmeticType, typename BasicJsonType::number_unsigned_t>::value&& + !std::is_same<ArithmeticType, typename BasicJsonType::number_integer_t>::value&& + !std::is_same<ArithmeticType, typename BasicJsonType::number_float_t>::value&& + !std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, + int > = 0 > +inline void from_json(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast<value_t>(j)) + { + case value_t::number_unsigned: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); + break; + } + case value_t::number_integer: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); + break; + } + case value_t::number_float: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); + break; + } + case value_t::boolean: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>()); + break; + } + + case value_t::null: + case value_t::object: + case value_t::array: + case value_t::string: + case value_t::binary: + case value_t::discarded: + default: + JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); + } +} + +template<typename BasicJsonType, typename... Args, std::size_t... Idx> +std::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> /*unused*/) +{ + return std::make_tuple(std::forward<BasicJsonType>(j).at(Idx).template get<Args>()...); +} + +template < typename BasicJsonType, class A1, class A2 > +std::pair<A1, A2> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::pair<A1, A2>> /*unused*/, priority_tag<0> /*unused*/) +{ + return {std::forward<BasicJsonType>(j).at(0).template get<A1>(), + std::forward<BasicJsonType>(j).at(1).template get<A2>()}; +} + +template<typename BasicJsonType, typename A1, typename A2> +inline void from_json_tuple_impl(BasicJsonType&& j, std::pair<A1, A2>& p, priority_tag<1> /*unused*/) +{ + p = from_json_tuple_impl(std::forward<BasicJsonType>(j), identity_tag<std::pair<A1, A2>> {}, priority_tag<0> {}); +} + +template<typename BasicJsonType, typename... Args> +std::tuple<Args...> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::tuple<Args...>> /*unused*/, priority_tag<2> /*unused*/) +{ + return from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {}); +} + +template<typename BasicJsonType, typename... Args> +inline void from_json_tuple_impl(BasicJsonType&& j, std::tuple<Args...>& t, priority_tag<3> /*unused*/) +{ + t = from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {}); +} + +template<typename BasicJsonType, typename TupleRelated> +auto from_json(BasicJsonType&& j, TupleRelated&& t) +-> decltype(from_json_tuple_impl(std::forward<BasicJsonType>(j), std::forward<TupleRelated>(t), priority_tag<3> {})) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + + return from_json_tuple_impl(std::forward<BasicJsonType>(j), std::forward<TupleRelated>(t), priority_tag<3> {}); +} + +template < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator, + typename = enable_if_t < !std::is_constructible < + typename BasicJsonType::string_t, Key >::value >> +inline void from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + m.clear(); + for (const auto& p : j) + { + if (JSON_HEDLEY_UNLIKELY(!p.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", p.type_name()), &j)); + } + m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>()); + } +} + +template < typename BasicJsonType, typename Key, typename Value, typename Hash, typename KeyEqual, typename Allocator, + typename = enable_if_t < !std::is_constructible < + typename BasicJsonType::string_t, Key >::value >> +inline void from_json(const BasicJsonType& j, std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>& m) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + m.clear(); + for (const auto& p : j) + { + if (JSON_HEDLEY_UNLIKELY(!p.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", p.type_name()), &j)); + } + m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>()); + } +} + +#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM +template<typename BasicJsonType> +inline void from_json(const BasicJsonType& j, std_fs::path& p) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); + } + p = *j.template get_ptr<const typename BasicJsonType::string_t*>(); +} +#endif + +struct from_json_fn +{ + template<typename BasicJsonType, typename T> + auto operator()(const BasicJsonType& j, T&& val) const + noexcept(noexcept(from_json(j, std::forward<T>(val)))) + -> decltype(from_json(j, std::forward<T>(val))) + { + return from_json(j, std::forward<T>(val)); + } +}; + +} // namespace detail + +#ifndef JSON_HAS_CPP_17 +/// namespace to hold default `from_json` function +/// to see why this is required: +/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html +namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces) +{ +#endif +JSON_INLINE_VARIABLE constexpr const auto& from_json = // NOLINT(misc-definitions-in-headers) + detail::static_const<detail::from_json_fn>::value; +#ifndef JSON_HAS_CPP_17 +} // namespace +#endif + +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/conversions/to_json.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <algorithm> // copy +#include <iterator> // begin, end +#include <string> // string +#include <tuple> // tuple, get +#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type +#include <utility> // move, forward, declval, pair +#include <valarray> // valarray +#include <vector> // vector + +// #include <nlohmann/detail/iterators/iteration_proxy.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstddef> // size_t +#include <iterator> // input_iterator_tag +#include <string> // string, to_string +#include <tuple> // tuple_size, get, tuple_element +#include <utility> // move + +#if JSON_HAS_RANGES + #include <ranges> // enable_borrowed_range +#endif + +// #include <nlohmann/detail/abi_macros.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template<typename string_type> +void int_to_string( string_type& target, std::size_t value ) +{ + // For ADL + using std::to_string; + target = to_string(value); +} +template<typename IteratorType> class iteration_proxy_value +{ + public: + using difference_type = std::ptrdiff_t; + using value_type = iteration_proxy_value; + using pointer = value_type *; + using reference = value_type &; + using iterator_category = std::input_iterator_tag; + using string_type = typename std::remove_cv< typename std::remove_reference<decltype( std::declval<IteratorType>().key() ) >::type >::type; + + private: + /// the iterator + IteratorType anchor{}; + /// an index for arrays (used to create key names) + std::size_t array_index = 0; + /// last stringified array index + mutable std::size_t array_index_last = 0; + /// a string representation of the array index + mutable string_type array_index_str = "0"; + /// an empty string (to return a reference for primitive values) + string_type empty_str{}; + + public: + explicit iteration_proxy_value() = default; + explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) + noexcept(std::is_nothrow_move_constructible<IteratorType>::value + && std::is_nothrow_default_constructible<string_type>::value) + : anchor(std::move(it)) + , array_index(array_index_) + {} + + iteration_proxy_value(iteration_proxy_value const&) = default; + iteration_proxy_value& operator=(iteration_proxy_value const&) = default; + // older GCCs are a bit fussy and require explicit noexcept specifiers on defaulted functions + iteration_proxy_value(iteration_proxy_value&&) + noexcept(std::is_nothrow_move_constructible<IteratorType>::value + && std::is_nothrow_move_constructible<string_type>::value) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor,cppcoreguidelines-noexcept-move-operations) + iteration_proxy_value& operator=(iteration_proxy_value&&) + noexcept(std::is_nothrow_move_assignable<IteratorType>::value + && std::is_nothrow_move_assignable<string_type>::value) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor,cppcoreguidelines-noexcept-move-operations) + ~iteration_proxy_value() = default; + + /// dereference operator (needed for range-based for) + const iteration_proxy_value& operator*() const + { + return *this; + } + + /// increment operator (needed for range-based for) + iteration_proxy_value& operator++() + { + ++anchor; + ++array_index; + + return *this; + } + + iteration_proxy_value operator++(int)& // NOLINT(cert-dcl21-cpp) + { + auto tmp = iteration_proxy_value(anchor, array_index); + ++anchor; + ++array_index; + return tmp; + } + + /// equality operator (needed for InputIterator) + bool operator==(const iteration_proxy_value& o) const + { + return anchor == o.anchor; + } + + /// inequality operator (needed for range-based for) + bool operator!=(const iteration_proxy_value& o) const + { + return anchor != o.anchor; + } + + /// return key of the iterator + const string_type& key() const + { + JSON_ASSERT(anchor.m_object != nullptr); + + switch (anchor.m_object->type()) + { + // use integer array index as key + case value_t::array: + { + if (array_index != array_index_last) + { + int_to_string( array_index_str, array_index ); + array_index_last = array_index; + } + return array_index_str; + } + + // use key from the object + case value_t::object: + return anchor.key(); + + // use an empty key for all primitive types + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return empty_str; + } + } + + /// return value of the iterator + typename IteratorType::reference value() const + { + return anchor.value(); + } +}; + +/// proxy class for the items() function +template<typename IteratorType> class iteration_proxy +{ + private: + /// the container to iterate + typename IteratorType::pointer container = nullptr; + + public: + explicit iteration_proxy() = default; + + /// construct iteration proxy from a container + explicit iteration_proxy(typename IteratorType::reference cont) noexcept + : container(&cont) {} + + iteration_proxy(iteration_proxy const&) = default; + iteration_proxy& operator=(iteration_proxy const&) = default; + iteration_proxy(iteration_proxy&&) noexcept = default; + iteration_proxy& operator=(iteration_proxy&&) noexcept = default; + ~iteration_proxy() = default; + + /// return iterator begin (needed for range-based for) + iteration_proxy_value<IteratorType> begin() const noexcept + { + return iteration_proxy_value<IteratorType>(container->begin()); + } + + /// return iterator end (needed for range-based for) + iteration_proxy_value<IteratorType> end() const noexcept + { + return iteration_proxy_value<IteratorType>(container->end()); + } +}; + +// Structured Bindings Support +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +template<std::size_t N, typename IteratorType, enable_if_t<N == 0, int> = 0> +auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.key()) +{ + return i.key(); +} +// Structured Bindings Support +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +template<std::size_t N, typename IteratorType, enable_if_t<N == 1, int> = 0> +auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.value()) +{ + return i.value(); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// The Addition to the STD Namespace is required to add +// Structured Bindings Support to the iteration_proxy_value class +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +namespace std +{ + +#if defined(__clang__) + // Fix: https://github.com/nlohmann/json/issues/1401 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wmismatched-tags" +#endif +template<typename IteratorType> +class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>> // NOLINT(cert-dcl58-cpp) + : public std::integral_constant<std::size_t, 2> {}; + +template<std::size_t N, typename IteratorType> +class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >> // NOLINT(cert-dcl58-cpp) +{ + public: + using type = decltype( + get<N>(std::declval < + ::nlohmann::detail::iteration_proxy_value<IteratorType >> ())); +}; +#if defined(__clang__) + #pragma clang diagnostic pop +#endif + +} // namespace std + +#if JSON_HAS_RANGES + template <typename IteratorType> + inline constexpr bool ::std::ranges::enable_borrowed_range<::nlohmann::detail::iteration_proxy<IteratorType>> = true; +#endif + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/std_fs.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +////////////////// +// constructors // +////////////////// + +/* + * Note all external_constructor<>::construct functions need to call + * j.m_data.m_value.destroy(j.m_data.m_type) to avoid a memory leak in case j contains an + * allocated value (e.g., a string). See bug issue + * https://github.com/nlohmann/json/issues/2865 for more information. + */ + +template<value_t> struct external_constructor; + +template<> +struct external_constructor<value_t::boolean> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::boolean; + j.m_data.m_value = b; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::string> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::string; + j.m_data.m_value = s; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::string; + j.m_data.m_value = std::move(s); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleStringType, + enable_if_t < !std::is_same<CompatibleStringType, typename BasicJsonType::string_t>::value, + int > = 0 > + static void construct(BasicJsonType& j, const CompatibleStringType& str) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::string; + j.m_data.m_value.string = j.template create<typename BasicJsonType::string_t>(str); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::binary> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::binary_t& b) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::binary; + j.m_data.m_value = typename BasicJsonType::binary_t(b); + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::binary_t&& b) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::binary; + j.m_data.m_value = typename BasicJsonType::binary_t(std::move(b)); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_float> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::number_float; + j.m_data.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_unsigned> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::number_unsigned; + j.m_data.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_integer> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::number_integer; + j.m_data.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::array> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value = arr; + j.set_parents(); + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value = std::move(arr); + j.set_parents(); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleArrayType, + enable_if_t < !std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value, + int > = 0 > + static void construct(BasicJsonType& j, const CompatibleArrayType& arr) + { + using std::begin; + using std::end; + + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr)); + j.set_parents(); + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const std::vector<bool>& arr) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value = value_t::array; + j.m_data.m_value.array->reserve(arr.size()); + for (const bool x : arr) + { + j.m_data.m_value.array->push_back(x); + j.set_parent(j.m_data.m_value.array->back()); + } + j.assert_invariant(); + } + + template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> + static void construct(BasicJsonType& j, const std::valarray<T>& arr) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value = value_t::array; + j.m_data.m_value.array->resize(arr.size()); + if (arr.size() > 0) + { + std::copy(std::begin(arr), std::end(arr), j.m_data.m_value.array->begin()); + } + j.set_parents(); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::object> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::object; + j.m_data.m_value = obj; + j.set_parents(); + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::object; + j.m_data.m_value = std::move(obj); + j.set_parents(); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleObjectType, + enable_if_t < !std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value, int > = 0 > + static void construct(BasicJsonType& j, const CompatibleObjectType& obj) + { + using std::begin; + using std::end; + + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::object; + j.m_data.m_value.object = j.template create<typename BasicJsonType::object_t>(begin(obj), end(obj)); + j.set_parents(); + j.assert_invariant(); + } +}; + +///////////// +// to_json // +///////////// + +template<typename BasicJsonType, typename T, + enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value, int> = 0> +inline void to_json(BasicJsonType& j, T b) noexcept +{ + external_constructor<value_t::boolean>::construct(j, b); +} + +template < typename BasicJsonType, typename BoolRef, + enable_if_t < + ((std::is_same<std::vector<bool>::reference, BoolRef>::value + && !std::is_same <std::vector<bool>::reference, typename BasicJsonType::boolean_t&>::value) + || (std::is_same<std::vector<bool>::const_reference, BoolRef>::value + && !std::is_same <detail::uncvref_t<std::vector<bool>::const_reference>, + typename BasicJsonType::boolean_t >::value)) + && std::is_convertible<const BoolRef&, typename BasicJsonType::boolean_t>::value, int > = 0 > +inline void to_json(BasicJsonType& j, const BoolRef& b) noexcept +{ + external_constructor<value_t::boolean>::construct(j, static_cast<typename BasicJsonType::boolean_t>(b)); +} + +template<typename BasicJsonType, typename CompatibleString, + enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value, int> = 0> +inline void to_json(BasicJsonType& j, const CompatibleString& s) +{ + external_constructor<value_t::string>::construct(j, s); +} + +template<typename BasicJsonType> +inline void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) +{ + external_constructor<value_t::string>::construct(j, std::move(s)); +} + +template<typename BasicJsonType, typename FloatType, + enable_if_t<std::is_floating_point<FloatType>::value, int> = 0> +inline void to_json(BasicJsonType& j, FloatType val) noexcept +{ + external_constructor<value_t::number_float>::construct(j, static_cast<typename BasicJsonType::number_float_t>(val)); +} + +template<typename BasicJsonType, typename CompatibleNumberUnsignedType, + enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value, int> = 0> +inline void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept +{ + external_constructor<value_t::number_unsigned>::construct(j, static_cast<typename BasicJsonType::number_unsigned_t>(val)); +} + +template<typename BasicJsonType, typename CompatibleNumberIntegerType, + enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value, int> = 0> +inline void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept +{ + external_constructor<value_t::number_integer>::construct(j, static_cast<typename BasicJsonType::number_integer_t>(val)); +} + +#if !JSON_DISABLE_ENUM_SERIALIZATION +template<typename BasicJsonType, typename EnumType, + enable_if_t<std::is_enum<EnumType>::value, int> = 0> +inline void to_json(BasicJsonType& j, EnumType e) noexcept +{ + using underlying_type = typename std::underlying_type<EnumType>::type; + external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e)); +} +#endif // JSON_DISABLE_ENUM_SERIALIZATION + +template<typename BasicJsonType> +inline void to_json(BasicJsonType& j, const std::vector<bool>& e) +{ + external_constructor<value_t::array>::construct(j, e); +} + +template < typename BasicJsonType, typename CompatibleArrayType, + enable_if_t < is_compatible_array_type<BasicJsonType, + CompatibleArrayType>::value&& + !is_compatible_object_type<BasicJsonType, CompatibleArrayType>::value&& + !is_compatible_string_type<BasicJsonType, CompatibleArrayType>::value&& + !std::is_same<typename BasicJsonType::binary_t, CompatibleArrayType>::value&& + !is_basic_json<CompatibleArrayType>::value, + int > = 0 > +inline void to_json(BasicJsonType& j, const CompatibleArrayType& arr) +{ + external_constructor<value_t::array>::construct(j, arr); +} + +template<typename BasicJsonType> +inline void to_json(BasicJsonType& j, const typename BasicJsonType::binary_t& bin) +{ + external_constructor<value_t::binary>::construct(j, bin); +} + +template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> +inline void to_json(BasicJsonType& j, const std::valarray<T>& arr) +{ + external_constructor<value_t::array>::construct(j, std::move(arr)); +} + +template<typename BasicJsonType> +inline void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) +{ + external_constructor<value_t::array>::construct(j, std::move(arr)); +} + +template < typename BasicJsonType, typename CompatibleObjectType, + enable_if_t < is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value&& !is_basic_json<CompatibleObjectType>::value, int > = 0 > +inline void to_json(BasicJsonType& j, const CompatibleObjectType& obj) +{ + external_constructor<value_t::object>::construct(j, obj); +} + +template<typename BasicJsonType> +inline void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) +{ + external_constructor<value_t::object>::construct(j, std::move(obj)); +} + +template < + typename BasicJsonType, typename T, std::size_t N, + enable_if_t < !std::is_constructible<typename BasicJsonType::string_t, + const T(&)[N]>::value, // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + int > = 0 > +inline void to_json(BasicJsonType& j, const T(&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +{ + external_constructor<value_t::array>::construct(j, arr); +} + +template < typename BasicJsonType, typename T1, typename T2, enable_if_t < std::is_constructible<BasicJsonType, T1>::value&& std::is_constructible<BasicJsonType, T2>::value, int > = 0 > +inline void to_json(BasicJsonType& j, const std::pair<T1, T2>& p) +{ + j = { p.first, p.second }; +} + +// for https://github.com/nlohmann/json/pull/1134 +template<typename BasicJsonType, typename T, + enable_if_t<std::is_same<T, iteration_proxy_value<typename BasicJsonType::iterator>>::value, int> = 0> +inline void to_json(BasicJsonType& j, const T& b) +{ + j = { {b.key(), b.value()} }; +} + +template<typename BasicJsonType, typename Tuple, std::size_t... Idx> +inline void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...> /*unused*/) +{ + j = { std::get<Idx>(t)... }; +} + +template<typename BasicJsonType, typename T, enable_if_t<is_constructible_tuple<BasicJsonType, T>::value, int > = 0> +inline void to_json(BasicJsonType& j, const T& t) +{ + to_json_tuple_impl(j, t, make_index_sequence<std::tuple_size<T>::value> {}); +} + +#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM +template<typename BasicJsonType> +inline void to_json(BasicJsonType& j, const std_fs::path& p) +{ + j = p.string(); +} +#endif + +struct to_json_fn +{ + template<typename BasicJsonType, typename T> + auto operator()(BasicJsonType& j, T&& val) const noexcept(noexcept(to_json(j, std::forward<T>(val)))) + -> decltype(to_json(j, std::forward<T>(val)), void()) + { + return to_json(j, std::forward<T>(val)); + } +}; +} // namespace detail + +#ifndef JSON_HAS_CPP_17 +/// namespace to hold default `to_json` function +/// to see why this is required: +/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html +namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces) +{ +#endif +JSON_INLINE_VARIABLE constexpr const auto& to_json = // NOLINT(misc-definitions-in-headers) + detail::static_const<detail::to_json_fn>::value; +#ifndef JSON_HAS_CPP_17 +} // namespace +#endif + +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/meta/identity_tag.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/// @sa https://json.nlohmann.me/api/adl_serializer/ +template<typename ValueType, typename> +struct adl_serializer +{ + /// @brief convert a JSON value to any value type + /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ + template<typename BasicJsonType, typename TargetType = ValueType> + static auto from_json(BasicJsonType && j, TargetType& val) noexcept( + noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val))) + -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void()) + { + ::nlohmann::from_json(std::forward<BasicJsonType>(j), val); + } + + /// @brief convert a JSON value to any value type + /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ + template<typename BasicJsonType, typename TargetType = ValueType> + static auto from_json(BasicJsonType && j) noexcept( + noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))) + -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {})) + { + return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}); + } + + /// @brief convert any value type to a JSON value + /// @sa https://json.nlohmann.me/api/adl_serializer/to_json/ + template<typename BasicJsonType, typename TargetType = ValueType> + static auto to_json(BasicJsonType& j, TargetType && val) noexcept( + noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val)))) + -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void()) + { + ::nlohmann::to_json(j, std::forward<TargetType>(val)); + } +}; + +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/byte_container_with_subtype.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstdint> // uint8_t, uint64_t +#include <tuple> // tie +#include <utility> // move + +// #include <nlohmann/detail/abi_macros.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/// @brief an internal type for a backed binary type +/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/ +template<typename BinaryType> +class byte_container_with_subtype : public BinaryType +{ + public: + using container_type = BinaryType; + using subtype_type = std::uint64_t; + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype() noexcept(noexcept(container_type())) + : container_type() + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(const container_type& b) noexcept(noexcept(container_type(b))) + : container_type(b) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(container_type&& b) noexcept(noexcept(container_type(std::move(b)))) + : container_type(std::move(b)) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(const container_type& b, subtype_type subtype_) noexcept(noexcept(container_type(b))) + : container_type(b) + , m_subtype(subtype_) + , m_has_subtype(true) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(container_type&& b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b)))) + : container_type(std::move(b)) + , m_subtype(subtype_) + , m_has_subtype(true) + {} + + bool operator==(const byte_container_with_subtype& rhs) const + { + return std::tie(static_cast<const BinaryType&>(*this), m_subtype, m_has_subtype) == + std::tie(static_cast<const BinaryType&>(rhs), rhs.m_subtype, rhs.m_has_subtype); + } + + bool operator!=(const byte_container_with_subtype& rhs) const + { + return !(rhs == *this); + } + + /// @brief sets the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/set_subtype/ + void set_subtype(subtype_type subtype_) noexcept + { + m_subtype = subtype_; + m_has_subtype = true; + } + + /// @brief return the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/subtype/ + constexpr subtype_type subtype() const noexcept + { + return m_has_subtype ? m_subtype : static_cast<subtype_type>(-1); + } + + /// @brief return whether the value has a subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/has_subtype/ + constexpr bool has_subtype() const noexcept + { + return m_has_subtype; + } + + /// @brief clears the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/clear_subtype/ + void clear_subtype() noexcept + { + m_subtype = 0; + m_has_subtype = false; + } + + private: + subtype_type m_subtype = 0; + bool m_has_subtype = false; +}; + +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/conversions/from_json.hpp> + +// #include <nlohmann/detail/conversions/to_json.hpp> + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/hash.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstdint> // uint8_t +#include <cstddef> // size_t +#include <functional> // hash + +// #include <nlohmann/detail/abi_macros.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// boost::hash_combine +inline std::size_t combine(std::size_t seed, std::size_t h) noexcept +{ + seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U); + return seed; +} + +/*! +@brief hash a JSON value + +The hash function tries to rely on std::hash where possible. Furthermore, the +type of the JSON value is taken into account to have different hash values for +null, 0, 0U, and false, etc. + +@tparam BasicJsonType basic_json specialization +@param j JSON value to hash +@return hash value of j +*/ +template<typename BasicJsonType> +std::size_t hash(const BasicJsonType& j) +{ + using string_t = typename BasicJsonType::string_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + + const auto type = static_cast<std::size_t>(j.type()); + switch (j.type()) + { + case BasicJsonType::value_t::null: + case BasicJsonType::value_t::discarded: + { + return combine(type, 0); + } + + case BasicJsonType::value_t::object: + { + auto seed = combine(type, j.size()); + for (const auto& element : j.items()) + { + const auto h = std::hash<string_t> {}(element.key()); + seed = combine(seed, h); + seed = combine(seed, hash(element.value())); + } + return seed; + } + + case BasicJsonType::value_t::array: + { + auto seed = combine(type, j.size()); + for (const auto& element : j) + { + seed = combine(seed, hash(element)); + } + return seed; + } + + case BasicJsonType::value_t::string: + { + const auto h = std::hash<string_t> {}(j.template get_ref<const string_t&>()); + return combine(type, h); + } + + case BasicJsonType::value_t::boolean: + { + const auto h = std::hash<bool> {}(j.template get<bool>()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_integer: + { + const auto h = std::hash<number_integer_t> {}(j.template get<number_integer_t>()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_unsigned: + { + const auto h = std::hash<number_unsigned_t> {}(j.template get<number_unsigned_t>()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_float: + { + const auto h = std::hash<number_float_t> {}(j.template get<number_float_t>()); + return combine(type, h); + } + + case BasicJsonType::value_t::binary: + { + auto seed = combine(type, j.get_binary().size()); + const auto h = std::hash<bool> {}(j.get_binary().has_subtype()); + seed = combine(seed, h); + seed = combine(seed, static_cast<std::size_t>(j.get_binary().subtype())); + for (const auto byte : j.get_binary()) + { + seed = combine(seed, std::hash<std::uint8_t> {}(byte)); + } + return seed; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + return 0; // LCOV_EXCL_LINE + } +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/input/binary_reader.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <algorithm> // generate_n +#include <array> // array +#include <cmath> // ldexp +#include <cstddef> // size_t +#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t +#include <cstdio> // snprintf +#include <cstring> // memcpy +#include <iterator> // back_inserter +#include <limits> // numeric_limits +#include <string> // char_traits, string +#include <utility> // make_pair, move +#include <vector> // vector + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/input/input_adapters.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <array> // array +#include <cstddef> // size_t +#include <cstring> // strlen +#include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next +#include <memory> // shared_ptr, make_shared, addressof +#include <numeric> // accumulate +#include <string> // string, char_traits +#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer +#include <utility> // pair, declval + +#ifndef JSON_NO_IO + #include <cstdio> // FILE * + #include <istream> // istream +#endif // JSON_NO_IO + +// #include <nlohmann/detail/iterators/iterator_traits.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// the supported input formats +enum class input_format_t { json, cbor, msgpack, ubjson, bson, bjdata }; + +//////////////////// +// input adapters // +//////////////////// + +#ifndef JSON_NO_IO +/*! +Input adapter for stdio file access. This adapter read only 1 byte and do not use any + buffer. This adapter is a very low level adapter. +*/ +class file_input_adapter +{ + public: + using char_type = char; + + JSON_HEDLEY_NON_NULL(2) + explicit file_input_adapter(std::FILE* f) noexcept + : m_file(f) + { + JSON_ASSERT(m_file != nullptr); + } + + // make class move-only + file_input_adapter(const file_input_adapter&) = delete; + file_input_adapter(file_input_adapter&&) noexcept = default; + file_input_adapter& operator=(const file_input_adapter&) = delete; + file_input_adapter& operator=(file_input_adapter&&) = delete; + ~file_input_adapter() = default; + + std::char_traits<char>::int_type get_character() noexcept + { + return std::fgetc(m_file); + } + + private: + /// the file pointer to read from + std::FILE* m_file; +}; + +/*! +Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at +beginning of input. Does not support changing the underlying std::streambuf +in mid-input. Maintains underlying std::istream and std::streambuf to support +subsequent use of standard std::istream operations to process any input +characters following those used in parsing the JSON input. Clears the +std::istream flags; any input errors (e.g., EOF) will be detected by the first +subsequent call for input from the std::istream. +*/ +class input_stream_adapter +{ + public: + using char_type = char; + + ~input_stream_adapter() + { + // clear stream flags; we use underlying streambuf I/O, do not + // maintain ifstream flags, except eof + if (is != nullptr) + { + is->clear(is->rdstate() & std::ios::eofbit); + } + } + + explicit input_stream_adapter(std::istream& i) + : is(&i), sb(i.rdbuf()) + {} + + // delete because of pointer members + input_stream_adapter(const input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&&) = delete; + + input_stream_adapter(input_stream_adapter&& rhs) noexcept + : is(rhs.is), sb(rhs.sb) + { + rhs.is = nullptr; + rhs.sb = nullptr; + } + + // std::istream/std::streambuf use std::char_traits<char>::to_int_type, to + // ensure that std::char_traits<char>::eof() and the character 0xFF do not + // end up as the same value, e.g. 0xFFFFFFFF. + std::char_traits<char>::int_type get_character() + { + auto res = sb->sbumpc(); + // set eof manually, as we don't use the istream interface. + if (JSON_HEDLEY_UNLIKELY(res == std::char_traits<char>::eof())) + { + is->clear(is->rdstate() | std::ios::eofbit); + } + return res; + } + + private: + /// the associated input stream + std::istream* is = nullptr; + std::streambuf* sb = nullptr; +}; +#endif // JSON_NO_IO + +// General-purpose iterator-based adapter. It might not be as fast as +// theoretically possible for some containers, but it is extremely versatile. +template<typename IteratorType> +class iterator_input_adapter +{ + public: + using char_type = typename std::iterator_traits<IteratorType>::value_type; + + iterator_input_adapter(IteratorType first, IteratorType last) + : current(std::move(first)), end(std::move(last)) + {} + + typename char_traits<char_type>::int_type get_character() + { + if (JSON_HEDLEY_LIKELY(current != end)) + { + auto result = char_traits<char_type>::to_int_type(*current); + std::advance(current, 1); + return result; + } + + return char_traits<char_type>::eof(); + } + + private: + IteratorType current; + IteratorType end; + + template<typename BaseInputAdapter, size_t T> + friend struct wide_string_input_helper; + + bool empty() const + { + return current == end; + } +}; + +template<typename BaseInputAdapter, size_t T> +struct wide_string_input_helper; + +template<typename BaseInputAdapter> +struct wide_string_input_helper<BaseInputAdapter, 4> +{ + // UTF-32 + static void fill_buffer(BaseInputAdapter& input, + std::array<std::char_traits<char>::int_type, 4>& utf8_bytes, + size_t& utf8_bytes_index, + size_t& utf8_bytes_filled) + { + utf8_bytes_index = 0; + + if (JSON_HEDLEY_UNLIKELY(input.empty())) + { + utf8_bytes[0] = std::char_traits<char>::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const auto wc = input.get_character(); + + // UTF-32 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((static_cast<unsigned int>(wc) >> 6u) & 0x1Fu)); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); + utf8_bytes_filled = 2; + } + else if (wc <= 0xFFFF) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((static_cast<unsigned int>(wc) >> 12u) & 0x0Fu)); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu)); + utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); + utf8_bytes_filled = 3; + } + else if (wc <= 0x10FFFF) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | ((static_cast<unsigned int>(wc) >> 18u) & 0x07u)); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 12u) & 0x3Fu)); + utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu)); + utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); + utf8_bytes_filled = 4; + } + else + { + // unknown character + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); + utf8_bytes_filled = 1; + } + } + } +}; + +template<typename BaseInputAdapter> +struct wide_string_input_helper<BaseInputAdapter, 2> +{ + // UTF-16 + static void fill_buffer(BaseInputAdapter& input, + std::array<std::char_traits<char>::int_type, 4>& utf8_bytes, + size_t& utf8_bytes_index, + size_t& utf8_bytes_filled) + { + utf8_bytes_index = 0; + + if (JSON_HEDLEY_UNLIKELY(input.empty())) + { + utf8_bytes[0] = std::char_traits<char>::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const auto wc = input.get_character(); + + // UTF-16 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((static_cast<unsigned int>(wc) >> 6u))); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); + utf8_bytes_filled = 2; + } + else if (0xD800 > wc || wc >= 0xE000) + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((static_cast<unsigned int>(wc) >> 12u))); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu)); + utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu)); + utf8_bytes_filled = 3; + } + else + { + if (JSON_HEDLEY_UNLIKELY(!input.empty())) + { + const auto wc2 = static_cast<unsigned int>(input.get_character()); + const auto charcode = 0x10000u + (((static_cast<unsigned int>(wc) & 0x3FFu) << 10u) | (wc2 & 0x3FFu)); + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | (charcode >> 18u)); + utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 12u) & 0x3Fu)); + utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 6u) & 0x3Fu)); + utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (charcode & 0x3Fu)); + utf8_bytes_filled = 4; + } + else + { + utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc); + utf8_bytes_filled = 1; + } + } + } + } +}; + +// Wraps another input adapter to convert wide character types into individual bytes. +template<typename BaseInputAdapter, typename WideCharType> +class wide_string_input_adapter +{ + public: + using char_type = char; + + wide_string_input_adapter(BaseInputAdapter base) + : base_adapter(base) {} + + typename std::char_traits<char>::int_type get_character() noexcept + { + // check if buffer needs to be filled + if (utf8_bytes_index == utf8_bytes_filled) + { + fill_buffer<sizeof(WideCharType)>(); + + JSON_ASSERT(utf8_bytes_filled > 0); + JSON_ASSERT(utf8_bytes_index == 0); + } + + // use buffer + JSON_ASSERT(utf8_bytes_filled > 0); + JSON_ASSERT(utf8_bytes_index < utf8_bytes_filled); + return utf8_bytes[utf8_bytes_index++]; + } + + private: + BaseInputAdapter base_adapter; + + template<size_t T> + void fill_buffer() + { + wide_string_input_helper<BaseInputAdapter, T>::fill_buffer(base_adapter, utf8_bytes, utf8_bytes_index, utf8_bytes_filled); + } + + /// a buffer for UTF-8 bytes + std::array<std::char_traits<char>::int_type, 4> utf8_bytes = {{0, 0, 0, 0}}; + + /// index to the utf8_codes array for the next valid byte + std::size_t utf8_bytes_index = 0; + /// number of valid bytes in the utf8_codes array + std::size_t utf8_bytes_filled = 0; +}; + +template<typename IteratorType, typename Enable = void> +struct iterator_input_adapter_factory +{ + using iterator_type = IteratorType; + using char_type = typename std::iterator_traits<iterator_type>::value_type; + using adapter_type = iterator_input_adapter<iterator_type>; + + static adapter_type create(IteratorType first, IteratorType last) + { + return adapter_type(std::move(first), std::move(last)); + } +}; + +template<typename T> +struct is_iterator_of_multibyte +{ + using value_type = typename std::iterator_traits<T>::value_type; + enum + { + value = sizeof(value_type) > 1 + }; +}; + +template<typename IteratorType> +struct iterator_input_adapter_factory<IteratorType, enable_if_t<is_iterator_of_multibyte<IteratorType>::value>> +{ + using iterator_type = IteratorType; + using char_type = typename std::iterator_traits<iterator_type>::value_type; + using base_adapter_type = iterator_input_adapter<iterator_type>; + using adapter_type = wide_string_input_adapter<base_adapter_type, char_type>; + + static adapter_type create(IteratorType first, IteratorType last) + { + return adapter_type(base_adapter_type(std::move(first), std::move(last))); + } +}; + +// General purpose iterator-based input +template<typename IteratorType> +typename iterator_input_adapter_factory<IteratorType>::adapter_type input_adapter(IteratorType first, IteratorType last) +{ + using factory_type = iterator_input_adapter_factory<IteratorType>; + return factory_type::create(first, last); +} + +// Convenience shorthand from container to iterator +// Enables ADL on begin(container) and end(container) +// Encloses the using declarations in namespace for not to leak them to outside scope + +namespace container_input_adapter_factory_impl +{ + +using std::begin; +using std::end; + +template<typename ContainerType, typename Enable = void> +struct container_input_adapter_factory {}; + +template<typename ContainerType> +struct container_input_adapter_factory< ContainerType, + void_t<decltype(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>()))>> + { + using adapter_type = decltype(input_adapter(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>()))); + + static adapter_type create(const ContainerType& container) +{ + return input_adapter(begin(container), end(container)); +} + }; + +} // namespace container_input_adapter_factory_impl + +template<typename ContainerType> +typename container_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::adapter_type input_adapter(const ContainerType& container) +{ + return container_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::create(container); +} + +#ifndef JSON_NO_IO +// Special cases with fast paths +inline file_input_adapter input_adapter(std::FILE* file) +{ + return file_input_adapter(file); +} + +inline input_stream_adapter input_adapter(std::istream& stream) +{ + return input_stream_adapter(stream); +} + +inline input_stream_adapter input_adapter(std::istream&& stream) +{ + return input_stream_adapter(stream); +} +#endif // JSON_NO_IO + +using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval<const char*>(), std::declval<const char*>())); + +// Null-delimited strings, and the like. +template < typename CharT, + typename std::enable_if < + std::is_pointer<CharT>::value&& + !std::is_array<CharT>::value&& + std::is_integral<typename std::remove_pointer<CharT>::type>::value&& + sizeof(typename std::remove_pointer<CharT>::type) == 1, + int >::type = 0 > +contiguous_bytes_input_adapter input_adapter(CharT b) +{ + auto length = std::strlen(reinterpret_cast<const char*>(b)); + const auto* ptr = reinterpret_cast<const char*>(b); + return input_adapter(ptr, ptr + length); +} + +template<typename T, std::size_t N> +auto input_adapter(T (&array)[N]) -> decltype(input_adapter(array, array + N)) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +{ + return input_adapter(array, array + N); +} + +// This class only handles inputs of input_buffer_adapter type. +// It's required so that expressions like {ptr, len} can be implicitly cast +// to the correct adapter. +class span_input_adapter +{ + public: + template < typename CharT, + typename std::enable_if < + std::is_pointer<CharT>::value&& + std::is_integral<typename std::remove_pointer<CharT>::type>::value&& + sizeof(typename std::remove_pointer<CharT>::type) == 1, + int >::type = 0 > + span_input_adapter(CharT b, std::size_t l) + : ia(reinterpret_cast<const char*>(b), reinterpret_cast<const char*>(b) + l) {} + + template<class IteratorType, + typename std::enable_if< + std::is_same<typename iterator_traits<IteratorType>::iterator_category, std::random_access_iterator_tag>::value, + int>::type = 0> + span_input_adapter(IteratorType first, IteratorType last) + : ia(input_adapter(first, last)) {} + + contiguous_bytes_input_adapter&& get() + { + return std::move(ia); // NOLINT(hicpp-move-const-arg,performance-move-const-arg) + } + + private: + contiguous_bytes_input_adapter ia; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/input/json_sax.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstddef> +#include <string> // string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/string_concat.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/*! +@brief SAX interface + +This class describes the SAX interface used by @ref nlohmann::json::sax_parse. +Each function is called in different situations while the input is parsed. The +boolean return value informs the parser whether to continue processing the +input. +*/ +template<typename BasicJsonType> +struct json_sax +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + /*! + @brief a null value was read + @return whether parsing should proceed + */ + virtual bool null() = 0; + + /*! + @brief a boolean value was read + @param[in] val boolean value + @return whether parsing should proceed + */ + virtual bool boolean(bool val) = 0; + + /*! + @brief an integer number was read + @param[in] val integer value + @return whether parsing should proceed + */ + virtual bool number_integer(number_integer_t val) = 0; + + /*! + @brief an unsigned integer number was read + @param[in] val unsigned integer value + @return whether parsing should proceed + */ + virtual bool number_unsigned(number_unsigned_t val) = 0; + + /*! + @brief a floating-point number was read + @param[in] val floating-point value + @param[in] s raw token value + @return whether parsing should proceed + */ + virtual bool number_float(number_float_t val, const string_t& s) = 0; + + /*! + @brief a string value was read + @param[in] val string value + @return whether parsing should proceed + @note It is safe to move the passed string value. + */ + virtual bool string(string_t& val) = 0; + + /*! + @brief a binary value was read + @param[in] val binary value + @return whether parsing should proceed + @note It is safe to move the passed binary value. + */ + virtual bool binary(binary_t& val) = 0; + + /*! + @brief the beginning of an object was read + @param[in] elements number of object elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_object(std::size_t elements) = 0; + + /*! + @brief an object key was read + @param[in] val object key + @return whether parsing should proceed + @note It is safe to move the passed string. + */ + virtual bool key(string_t& val) = 0; + + /*! + @brief the end of an object was read + @return whether parsing should proceed + */ + virtual bool end_object() = 0; + + /*! + @brief the beginning of an array was read + @param[in] elements number of array elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_array(std::size_t elements) = 0; + + /*! + @brief the end of an array was read + @return whether parsing should proceed + */ + virtual bool end_array() = 0; + + /*! + @brief a parse error occurred + @param[in] position the position in the input where the error occurs + @param[in] last_token the last read token + @param[in] ex an exception object describing the error + @return whether parsing should proceed (must return false) + */ + virtual bool parse_error(std::size_t position, + const std::string& last_token, + const detail::exception& ex) = 0; + + json_sax() = default; + json_sax(const json_sax&) = default; + json_sax(json_sax&&) noexcept = default; + json_sax& operator=(const json_sax&) = default; + json_sax& operator=(json_sax&&) noexcept = default; + virtual ~json_sax() = default; +}; + +namespace detail +{ +/*! +@brief SAX implementation to create a JSON value from SAX events + +This class implements the @ref json_sax interface and processes the SAX events +to create a JSON value which makes it basically a DOM parser. The structure or +hierarchy of the JSON value is managed by the stack `ref_stack` which contains +a pointer to the respective array or object for each recursion depth. + +After successful parsing, the value that is passed by reference to the +constructor contains the parsed value. + +@tparam BasicJsonType the JSON type +*/ +template<typename BasicJsonType> +class json_sax_dom_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + /*! + @param[in,out] r reference to a JSON value that is manipulated while + parsing + @param[in] allow_exceptions_ whether parse errors yield exceptions + */ + explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true) + : root(r), allow_exceptions(allow_exceptions_) + {} + + // make class move-only + json_sax_dom_parser(const json_sax_dom_parser&) = delete; + json_sax_dom_parser(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete; + json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~json_sax_dom_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool binary(binary_t& val) + { + handle_value(std::move(val)); + return true; + } + + bool start_object(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); + + if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool key(string_t& val) + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_object()); + + // add null at given key and store the reference for later + object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val)); + return true; + } + + bool end_object() + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_object()); + + ref_stack.back()->set_parents(); + ref_stack.pop_back(); + return true; + } + + bool start_array(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); + + if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool end_array() + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_array()); + + ref_stack.back()->set_parents(); + ref_stack.pop_back(); + return true; + } + + template<class Exception> + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const Exception& ex) + { + errored = true; + static_cast<void>(ex); + if (allow_exceptions) + { + JSON_THROW(ex); + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + /*! + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + */ + template<typename Value> + JSON_HEDLEY_RETURNS_NON_NULL + BasicJsonType* handle_value(Value&& v) + { + if (ref_stack.empty()) + { + root = BasicJsonType(std::forward<Value>(v)); + return &root; + } + + JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); + + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->emplace_back(std::forward<Value>(v)); + return &(ref_stack.back()->m_data.m_value.array->back()); + } + + JSON_ASSERT(ref_stack.back()->is_object()); + JSON_ASSERT(object_element); + *object_element = BasicJsonType(std::forward<Value>(v)); + return object_element; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector<BasicJsonType*> ref_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +template<typename BasicJsonType> +class json_sax_dom_callback_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using parser_callback_t = typename BasicJsonType::parser_callback_t; + using parse_event_t = typename BasicJsonType::parse_event_t; + + json_sax_dom_callback_parser(BasicJsonType& r, + const parser_callback_t cb, + const bool allow_exceptions_ = true) + : root(r), callback(cb), allow_exceptions(allow_exceptions_) + { + keep_stack.push_back(true); + } + + // make class move-only + json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~json_sax_dom_callback_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool binary(binary_t& val) + { + handle_value(std::move(val)); + return true; + } + + bool start_object(std::size_t len) + { + // check callback for object start + const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::object, true); + ref_stack.push_back(val.second); + + // check object limit + if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool key(string_t& val) + { + BasicJsonType k = BasicJsonType(val); + + // check callback for key + const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k); + key_keep_stack.push_back(keep); + + // add discarded value at given key and store the reference for later + if (keep && ref_stack.back()) + { + object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); + } + + return true; + } + + bool end_object() + { + if (ref_stack.back()) + { + if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) + { + // discard object + *ref_stack.back() = discarded; + } + else + { + ref_stack.back()->set_parents(); + } + } + + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(!keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) + { + // remove discarded value + for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) + { + if (it->is_discarded()) + { + ref_stack.back()->erase(it); + break; + } + } + } + + return true; + } + + bool start_array(std::size_t len) + { + const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::array, true); + ref_stack.push_back(val.second); + + // check array limit + if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool end_array() + { + bool keep = true; + + if (ref_stack.back()) + { + keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); + if (keep) + { + ref_stack.back()->set_parents(); + } + else + { + // discard array + *ref_stack.back() = discarded; + } + } + + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(!keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + // remove discarded value + if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->pop_back(); + } + + return true; + } + + template<class Exception> + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const Exception& ex) + { + errored = true; + static_cast<void>(ex); + if (allow_exceptions) + { + JSON_THROW(ex); + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + /*! + @param[in] v value to add to the JSON value we build during parsing + @param[in] skip_callback whether we should skip calling the callback + function; this is required after start_array() and + start_object() SAX events, because otherwise we would call the + callback function with an empty array or object, respectively. + + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + + @return pair of boolean (whether value should be kept) and pointer (to the + passed value in the ref_stack hierarchy; nullptr if not kept) + */ + template<typename Value> + std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) + { + JSON_ASSERT(!keep_stack.empty()); + + // do not handle this value if we know it would be added to a discarded + // container + if (!keep_stack.back()) + { + return {false, nullptr}; + } + + // create value + auto value = BasicJsonType(std::forward<Value>(v)); + + // check callback + const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); + + // do not handle this value if we just learnt it shall be discarded + if (!keep) + { + return {false, nullptr}; + } + + if (ref_stack.empty()) + { + root = std::move(value); + return {true, & root}; + } + + // skip this value if we already decided to skip the parent + // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) + if (!ref_stack.back()) + { + return {false, nullptr}; + } + + // we now only expect arrays and objects + JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); + + // array + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); + return {true, & (ref_stack.back()->m_data.m_value.array->back())}; + } + + // object + JSON_ASSERT(ref_stack.back()->is_object()); + // check if we should store an element for the current key + JSON_ASSERT(!key_keep_stack.empty()); + const bool store_element = key_keep_stack.back(); + key_keep_stack.pop_back(); + + if (!store_element) + { + return {false, nullptr}; + } + + JSON_ASSERT(object_element); + *object_element = std::move(value); + return {true, object_element}; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector<BasicJsonType*> ref_stack {}; + /// stack to manage which values to keep + std::vector<bool> keep_stack {}; + /// stack to manage which object keys to keep + std::vector<bool> key_keep_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// callback function + const parser_callback_t callback = nullptr; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; + /// a discarded value for the callback + BasicJsonType discarded = BasicJsonType::value_t::discarded; +}; + +template<typename BasicJsonType> +class json_sax_acceptor +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + bool null() + { + return true; + } + + bool boolean(bool /*unused*/) + { + return true; + } + + bool number_integer(number_integer_t /*unused*/) + { + return true; + } + + bool number_unsigned(number_unsigned_t /*unused*/) + { + return true; + } + + bool number_float(number_float_t /*unused*/, const string_t& /*unused*/) + { + return true; + } + + bool string(string_t& /*unused*/) + { + return true; + } + + bool binary(binary_t& /*unused*/) + { + return true; + } + + bool start_object(std::size_t /*unused*/ = static_cast<std::size_t>(-1)) + { + return true; + } + + bool key(string_t& /*unused*/) + { + return true; + } + + bool end_object() + { + return true; + } + + bool start_array(std::size_t /*unused*/ = static_cast<std::size_t>(-1)) + { + return true; + } + + bool end_array() + { + return true; + } + + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/) + { + return false; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/input/lexer.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <array> // array +#include <clocale> // localeconv +#include <cstddef> // size_t +#include <cstdio> // snprintf +#include <cstdlib> // strtof, strtod, strtold, strtoll, strtoull +#include <initializer_list> // initializer_list +#include <string> // char_traits, string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/input/input_adapters.hpp> + +// #include <nlohmann/detail/input/position_t.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////// +// lexer // +/////////// + +template<typename BasicJsonType> +class lexer_base +{ + public: + /// token types for the parser + enum class token_type + { + uninitialized, ///< indicating the scanner is uninitialized + literal_true, ///< the `true` literal + literal_false, ///< the `false` literal + literal_null, ///< the `null` literal + value_string, ///< a string -- use get_string() for actual value + value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value + value_integer, ///< a signed integer -- use get_number_integer() for actual value + value_float, ///< an floating point number -- use get_number_float() for actual value + begin_array, ///< the character for array begin `[` + begin_object, ///< the character for object begin `{` + end_array, ///< the character for array end `]` + end_object, ///< the character for object end `}` + name_separator, ///< the name separator `:` + value_separator, ///< the value separator `,` + parse_error, ///< indicating a parse error + end_of_input, ///< indicating the end of the input buffer + literal_or_value ///< a literal or the begin of a value (only for diagnostics) + }; + + /// return name of values of type token_type (only used for errors) + JSON_HEDLEY_RETURNS_NON_NULL + JSON_HEDLEY_CONST + static const char* token_type_name(const token_type t) noexcept + { + switch (t) + { + case token_type::uninitialized: + return "<uninitialized>"; + case token_type::literal_true: + return "true literal"; + case token_type::literal_false: + return "false literal"; + case token_type::literal_null: + return "null literal"; + case token_type::value_string: + return "string literal"; + case token_type::value_unsigned: + case token_type::value_integer: + case token_type::value_float: + return "number literal"; + case token_type::begin_array: + return "'['"; + case token_type::begin_object: + return "'{'"; + case token_type::end_array: + return "']'"; + case token_type::end_object: + return "'}'"; + case token_type::name_separator: + return "':'"; + case token_type::value_separator: + return "','"; + case token_type::parse_error: + return "<parse error>"; + case token_type::end_of_input: + return "end of input"; + case token_type::literal_or_value: + return "'[', '{', or a literal"; + // LCOV_EXCL_START + default: // catch non-enum values + return "unknown token"; + // LCOV_EXCL_STOP + } + } +}; +/*! +@brief lexical analysis + +This class organizes the lexical analysis during JSON deserialization. +*/ +template<typename BasicJsonType, typename InputAdapterType> +class lexer : public lexer_base<BasicJsonType> +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using char_type = typename InputAdapterType::char_type; + using char_int_type = typename char_traits<char_type>::int_type; + + public: + using token_type = typename lexer_base<BasicJsonType>::token_type; + + explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept + : ia(std::move(adapter)) + , ignore_comments(ignore_comments_) + , decimal_point_char(static_cast<char_int_type>(get_decimal_point())) + {} + + // delete because of pointer members + lexer(const lexer&) = delete; + lexer(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + lexer& operator=(lexer&) = delete; + lexer& operator=(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~lexer() = default; + + private: + ///////////////////// + // locales + ///////////////////// + + /// return the locale-dependent decimal point + JSON_HEDLEY_PURE + static char get_decimal_point() noexcept + { + const auto* loc = localeconv(); + JSON_ASSERT(loc != nullptr); + return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); + } + + ///////////////////// + // scan functions + ///////////////////// + + /*! + @brief get codepoint from 4 hex characters following `\u` + + For input "\u c1 c2 c3 c4" the codepoint is: + (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4 + = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0) + + Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f' + must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The + conversion is done by subtracting the offset (0x30, 0x37, and 0x57) + between the ASCII value of the character and the desired integer value. + + @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or + non-hex character) + */ + int get_codepoint() + { + // this function only makes sense after reading `\u` + JSON_ASSERT(current == 'u'); + int codepoint = 0; + + const auto factors = { 12u, 8u, 4u, 0u }; + for (const auto factor : factors) + { + get(); + + if (current >= '0' && current <= '9') + { + codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); + } + else if (current >= 'A' && current <= 'F') + { + codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); + } + else if (current >= 'a' && current <= 'f') + { + codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); + } + else + { + return -1; + } + } + + JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); + return codepoint; + } + + /*! + @brief check if the next byte(s) are inside a given range + + Adds the current byte and, for each passed range, reads a new byte and + checks if it is inside the range. If a violation was detected, set up an + error message and return false. Otherwise, return true. + + @param[in] ranges list of integers; interpreted as list of pairs of + inclusive lower and upper bound, respectively + + @pre The passed list @a ranges must have 2, 4, or 6 elements; that is, + 1, 2, or 3 pairs. This precondition is enforced by an assertion. + + @return true if and only if no range violation was detected + */ + bool next_byte_in_range(std::initializer_list<char_int_type> ranges) + { + JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); + add(current); + + for (auto range = ranges.begin(); range != ranges.end(); ++range) + { + get(); + if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) + { + add(current); + } + else + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return false; + } + } + + return true; + } + + /*! + @brief scan a string literal + + This function scans a string according to Sect. 7 of RFC 8259. While + scanning, bytes are escaped and copied into buffer token_buffer. Then the + function returns successfully, token_buffer is *not* null-terminated (as it + may contain \0 bytes), and token_buffer.size() is the number of bytes in the + string. + + @return token_type::value_string if string could be successfully scanned, + token_type::parse_error otherwise + + @note In case of errors, variable error_message contains a textual + description. + */ + token_type scan_string() + { + // reset token_buffer (ignore opening quote) + reset(); + + // we entered the function by reading an open quote + JSON_ASSERT(current == '\"'); + + while (true) + { + // get next character + switch (get()) + { + // end of file while parsing string + case char_traits<char_type>::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; + } + + // closing quote + case '\"': + { + return token_type::value_string; + } + + // escapes + case '\\': + { + switch (get()) + { + // quotation mark + case '\"': + add('\"'); + break; + // reverse solidus + case '\\': + add('\\'); + break; + // solidus + case '/': + add('/'); + break; + // backspace + case 'b': + add('\b'); + break; + // form feed + case 'f': + add('\f'); + break; + // line feed + case 'n': + add('\n'); + break; + // carriage return + case 'r': + add('\r'); + break; + // tab + case 't': + add('\t'); + break; + + // unicode escapes + case 'u': + { + const int codepoint1 = get_codepoint(); + int codepoint = codepoint1; // start with codepoint1 + + if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if code point is a high surrogate + if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF) + { + // expect next \uxxxx entry + if (JSON_HEDLEY_LIKELY(get() == '\\' && get() == 'u')) + { + const int codepoint2 = get_codepoint(); + + if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if codepoint2 is a low surrogate + if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF)) + { + // overwrite codepoint + codepoint = static_cast<int>( + // high surrogate occupies the most significant 22 bits + (static_cast<unsigned int>(codepoint1) << 10u) + // low surrogate occupies the least significant 15 bits + + static_cast<unsigned int>(codepoint2) + // there is still the 0xD800, 0xDC00 and 0x10000 noise + // in the result, so we have to subtract with: + // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 + - 0x35FDC00u); + } + else + { + error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF)) + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; + return token_type::parse_error; + } + } + + // result of the above calculation yields a proper codepoint + JSON_ASSERT(0x00 <= codepoint && codepoint <= 0x10FFFF); + + // translate codepoint into bytes + if (codepoint < 0x80) + { + // 1-byte characters: 0xxxxxxx (ASCII) + add(static_cast<char_int_type>(codepoint)); + } + else if (codepoint <= 0x7FF) + { + // 2-byte characters: 110xxxxx 10xxxxxx + add(static_cast<char_int_type>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u))); + add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); + } + else if (codepoint <= 0xFFFF) + { + // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx + add(static_cast<char_int_type>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u))); + add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu))); + add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); + } + else + { + // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + add(static_cast<char_int_type>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u))); + add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu))); + add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu))); + add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); + } + + break; + } + + // other characters after escape + default: + error_message = "invalid string: forbidden character after backslash"; + return token_type::parse_error; + } + + break; + } + + // invalid control characters + case 0x00: + { + error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000"; + return token_type::parse_error; + } + + case 0x01: + { + error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001"; + return token_type::parse_error; + } + + case 0x02: + { + error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002"; + return token_type::parse_error; + } + + case 0x03: + { + error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003"; + return token_type::parse_error; + } + + case 0x04: + { + error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004"; + return token_type::parse_error; + } + + case 0x05: + { + error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005"; + return token_type::parse_error; + } + + case 0x06: + { + error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006"; + return token_type::parse_error; + } + + case 0x07: + { + error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007"; + return token_type::parse_error; + } + + case 0x08: + { + error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b"; + return token_type::parse_error; + } + + case 0x09: + { + error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t"; + return token_type::parse_error; + } + + case 0x0A: + { + error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n"; + return token_type::parse_error; + } + + case 0x0B: + { + error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B"; + return token_type::parse_error; + } + + case 0x0C: + { + error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f"; + return token_type::parse_error; + } + + case 0x0D: + { + error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r"; + return token_type::parse_error; + } + + case 0x0E: + { + error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E"; + return token_type::parse_error; + } + + case 0x0F: + { + error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F"; + return token_type::parse_error; + } + + case 0x10: + { + error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010"; + return token_type::parse_error; + } + + case 0x11: + { + error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011"; + return token_type::parse_error; + } + + case 0x12: + { + error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012"; + return token_type::parse_error; + } + + case 0x13: + { + error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013"; + return token_type::parse_error; + } + + case 0x14: + { + error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014"; + return token_type::parse_error; + } + + case 0x15: + { + error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015"; + return token_type::parse_error; + } + + case 0x16: + { + error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016"; + return token_type::parse_error; + } + + case 0x17: + { + error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017"; + return token_type::parse_error; + } + + case 0x18: + { + error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018"; + return token_type::parse_error; + } + + case 0x19: + { + error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019"; + return token_type::parse_error; + } + + case 0x1A: + { + error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A"; + return token_type::parse_error; + } + + case 0x1B: + { + error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B"; + return token_type::parse_error; + } + + case 0x1C: + { + error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C"; + return token_type::parse_error; + } + + case 0x1D: + { + error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D"; + return token_type::parse_error; + } + + case 0x1E: + { + error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E"; + return token_type::parse_error; + } + + case 0x1F: + { + error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F"; + return token_type::parse_error; + } + + // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) + case 0x20: + case 0x21: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + { + add(current); + break; + } + + // U+0080..U+07FF: bytes C2..DF 80..BF + case 0xC2: + case 0xC3: + case 0xC4: + case 0xC5: + case 0xC6: + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD5: + case 0xD6: + case 0xD7: + case 0xD8: + case 0xD9: + case 0xDA: + case 0xDB: + case 0xDC: + case 0xDD: + case 0xDE: + case 0xDF: + { + if (JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80, 0xBF}))) + { + return token_type::parse_error; + } + break; + } + + // U+0800..U+0FFF: bytes E0 A0..BF 80..BF + case 0xE0: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF + // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xEE: + case 0xEF: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+D000..U+D7FF: bytes ED 80..9F 80..BF + case 0xED: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + case 0xF0: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + case 0xF1: + case 0xF2: + case 0xF3: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + case 0xF4: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // remaining bytes (80..C1 and F5..FF) are ill-formed + default: + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return token_type::parse_error; + } + } + } + } + + /*! + * @brief scan a comment + * @return whether comment could be scanned successfully + */ + bool scan_comment() + { + switch (get()) + { + // single-line comments skip input until a newline or EOF is read + case '/': + { + while (true) + { + switch (get()) + { + case '\n': + case '\r': + case char_traits<char_type>::eof(): + case '\0': + return true; + + default: + break; + } + } + } + + // multi-line comments skip input until */ is read + case '*': + { + while (true) + { + switch (get()) + { + case char_traits<char_type>::eof(): + case '\0': + { + error_message = "invalid comment; missing closing '*/'"; + return false; + } + + case '*': + { + switch (get()) + { + case '/': + return true; + + default: + { + unget(); + continue; + } + } + } + + default: + continue; + } + } + } + + // unexpected character after reading '/' + default: + { + error_message = "invalid comment; expecting '/' or '*' after '/'"; + return false; + } + } + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(float& f, const char* str, char** endptr) noexcept + { + f = std::strtof(str, endptr); + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(double& f, const char* str, char** endptr) noexcept + { + f = std::strtod(str, endptr); + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(long double& f, const char* str, char** endptr) noexcept + { + f = std::strtold(str, endptr); + } + + /*! + @brief scan a number literal + + This function scans a string according to Sect. 6 of RFC 8259. + + The function is realized with a deterministic finite state machine derived + from the grammar described in RFC 8259. Starting in state "init", the + input is read and used to determined the next state. Only state "done" + accepts the number. State "error" is a trap state to model errors. In the + table below, "anything" means any character but the ones listed before. + + state | 0 | 1-9 | e E | + | - | . | anything + ---------|----------|----------|----------|---------|---------|----------|----------- + init | zero | any1 | [error] | [error] | minus | [error] | [error] + minus | zero | any1 | [error] | [error] | [error] | [error] | [error] + zero | done | done | exponent | done | done | decimal1 | done + any1 | any1 | any1 | exponent | done | done | decimal1 | done + decimal1 | decimal2 | decimal2 | [error] | [error] | [error] | [error] | [error] + decimal2 | decimal2 | decimal2 | exponent | done | done | done | done + exponent | any2 | any2 | [error] | sign | sign | [error] | [error] + sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] + any2 | any2 | any2 | done | done | done | done | done + + The state machine is realized with one label per state (prefixed with + "scan_number_") and `goto` statements between them. The state machine + contains cycles, but any cycle can be left when EOF is read. Therefore, + the function is guaranteed to terminate. + + During scanning, the read bytes are stored in token_buffer. This string is + then converted to a signed integer, an unsigned integer, or a + floating-point number. + + @return token_type::value_unsigned, token_type::value_integer, or + token_type::value_float if number could be successfully scanned, + token_type::parse_error otherwise + + @note The scanner is independent of the current locale. Internally, the + locale's decimal point is used instead of `.` to work with the + locale-dependent converters. + */ + token_type scan_number() // lgtm [cpp/use-of-goto] + { + // reset token_buffer to store the number's bytes + reset(); + + // the type of the parsed number; initially set to unsigned; will be + // changed if minus sign, decimal point or exponent is read + token_type number_type = token_type::value_unsigned; + + // state (init): we just found out we need to scan a number + switch (current) + { + case '-': + { + add(current); + goto scan_number_minus; + } + + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + // all other characters are rejected outside scan_number() + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + +scan_number_minus: + // state: we just parsed a leading minus sign + number_type = token_type::value_integer; + switch (get()) + { + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + error_message = "invalid number; expected digit after '-'"; + return token_type::parse_error; + } + } + +scan_number_zero: + // state: we just parse a zero (maybe with a leading minus sign) + switch (get()) + { + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_any1: + // state: we just parsed a number 0-9 (maybe with a leading minus sign) + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_decimal1: + // state: we just parsed a decimal point + number_type = token_type::value_float; + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + default: + { + error_message = "invalid number; expected digit after '.'"; + return token_type::parse_error; + } + } + +scan_number_decimal2: + // we just parsed at least one number after a decimal point + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_exponent: + // we just parsed an exponent + number_type = token_type::value_float; + switch (get()) + { + case '+': + case '-': + { + add(current); + goto scan_number_sign; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = + "invalid number; expected '+', '-', or digit after exponent"; + return token_type::parse_error; + } + } + +scan_number_sign: + // we just parsed an exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = "invalid number; expected digit after exponent sign"; + return token_type::parse_error; + } + } + +scan_number_any2: + // we just parsed a number after the exponent or exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + goto scan_number_done; + } + +scan_number_done: + // unget the character after the number (we only read it to know that + // we are done scanning a number) + unget(); + + char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + errno = 0; + + // try to parse integers first and fall back to floats + if (number_type == token_type::value_unsigned) + { + const auto x = std::strtoull(token_buffer.data(), &endptr, 10); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_unsigned = static_cast<number_unsigned_t>(x); + if (value_unsigned == x) + { + return token_type::value_unsigned; + } + } + } + else if (number_type == token_type::value_integer) + { + const auto x = std::strtoll(token_buffer.data(), &endptr, 10); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_integer = static_cast<number_integer_t>(x); + if (value_integer == x) + { + return token_type::value_integer; + } + } + } + + // this code is reached if we parse a floating-point number or if an + // integer conversion above failed + strtof(value_float, token_buffer.data(), &endptr); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + return token_type::value_float; + } + + /*! + @param[in] literal_text the literal text to expect + @param[in] length the length of the passed literal text + @param[in] return_type the token type to return on success + */ + JSON_HEDLEY_NON_NULL(2) + token_type scan_literal(const char_type* literal_text, const std::size_t length, + token_type return_type) + { + JSON_ASSERT(char_traits<char_type>::to_char_type(current) == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { + if (JSON_HEDLEY_UNLIKELY(char_traits<char_type>::to_char_type(get()) != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; + } + } + return return_type; + } + + ///////////////////// + // input management + ///////////////////// + + /// reset token_buffer; current character is beginning of token + void reset() noexcept + { + token_buffer.clear(); + token_string.clear(); + token_string.push_back(char_traits<char_type>::to_char_type(current)); + } + + /* + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a + `char_traits<char>::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input + */ + char_int_type get() + { + ++position.chars_read_total; + ++position.chars_read_current_line; + + if (next_unget) + { + // just reset the next_unget variable and work with current + next_unget = false; + } + else + { + current = ia.get_character(); + } + + if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) + { + token_string.push_back(char_traits<char_type>::to_char_type(current)); + } + + if (current == '\n') + { + ++position.lines_read; + position.chars_read_current_line = 0; + } + + return current; + } + + /*! + @brief unget current character (read it again on next get) + + We implement unget by setting variable next_unget to true. The input is not + changed - we just simulate ungetting by modifying chars_read_total, + chars_read_current_line, and token_string. The next call to get() will + behave as if the unget character is read again. + */ + void unget() + { + next_unget = true; + + --position.chars_read_total; + + // in case we "unget" a newline, we have to also decrement the lines_read + if (position.chars_read_current_line == 0) + { + if (position.lines_read > 0) + { + --position.lines_read; + } + } + else + { + --position.chars_read_current_line; + } + + if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) + { + JSON_ASSERT(!token_string.empty()); + token_string.pop_back(); + } + } + + /// add a character to token_buffer + void add(char_int_type c) + { + token_buffer.push_back(static_cast<typename string_t::value_type>(c)); + } + + public: + ///////////////////// + // value getters + ///////////////////// + + /// return integer value + constexpr number_integer_t get_number_integer() const noexcept + { + return value_integer; + } + + /// return unsigned integer value + constexpr number_unsigned_t get_number_unsigned() const noexcept + { + return value_unsigned; + } + + /// return floating-point value + constexpr number_float_t get_number_float() const noexcept + { + return value_float; + } + + /// return current string value (implicitly resets the token; useful only once) + string_t& get_string() + { + return token_buffer; + } + + ///////////////////// + // diagnostics + ///////////////////// + + /// return position of last read token + constexpr position_t get_position() const noexcept + { + return position; + } + + /// return the last read token (for errors only). Will never contain EOF + /// (an arbitrary value that is not a valid char value, often -1), because + /// 255 may legitimately occur. May contain NUL, which should be escaped. + std::string get_token_string() const + { + // escape control characters + std::string result; + for (const auto c : token_string) + { + if (static_cast<unsigned char>(c) <= '\x1F') + { + // escape control characters + std::array<char, 9> cs{{}}; + static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + result += cs.data(); + } + else + { + // add character as is + result.push_back(static_cast<std::string::value_type>(c)); + } + } + + return result; + } + + /// return syntax error message + JSON_HEDLEY_RETURNS_NON_NULL + constexpr const char* get_error_message() const noexcept + { + return error_message; + } + + ///////////////////// + // actual scanner + ///////////////////// + + /*! + @brief skip the UTF-8 byte order mark + @return true iff there is no BOM or the correct BOM has been skipped + */ + bool skip_bom() + { + if (get() == 0xEF) + { + // check if we completely parse the BOM + return get() == 0xBB && get() == 0xBF; + } + + // the first character is not the beginning of the BOM; unget it to + // process is later + unget(); + return true; + } + + void skip_whitespace() + { + do + { + get(); + } + while (current == ' ' || current == '\t' || current == '\n' || current == '\r'); + } + + token_type scan() + { + // initially, skip the BOM + if (position.chars_read_total == 0 && !skip_bom()) + { + error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; + return token_type::parse_error; + } + + // read next character and ignore whitespace + skip_whitespace(); + + // ignore comments + while (ignore_comments && current == '/') + { + if (!scan_comment()) + { + return token_type::parse_error; + } + + // skip following whitespace + skip_whitespace(); + } + + switch (current) + { + // structural characters + case '[': + return token_type::begin_array; + case ']': + return token_type::end_array; + case '{': + return token_type::begin_object; + case '}': + return token_type::end_object; + case ':': + return token_type::name_separator; + case ',': + return token_type::value_separator; + + // literals + case 't': + { + std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; + return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); + } + case 'f': + { + std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; + return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); + } + case 'n': + { + std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; + return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); + } + + // string + case '\"': + return scan_string(); + + // number + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return scan_number(); + + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': + case char_traits<char_type>::eof(): + return token_type::end_of_input; + + // error + default: + error_message = "invalid literal"; + return token_type::parse_error; + } + } + + private: + /// input adapter + InputAdapterType ia; + + /// whether comments should be ignored (true) or signaled as errors (false) + const bool ignore_comments = false; + + /// the current character + char_int_type current = char_traits<char_type>::eof(); + + /// whether the next get() call should just return current + bool next_unget = false; + + /// the start position of the current token + position_t position {}; + + /// raw input token string (for error messages) + std::vector<char_type> token_string {}; + + /// buffer for variable-length tokens (numbers, strings) + string_t token_buffer {}; + + /// a description of occurred lexer errors + const char* error_message = ""; + + // number values + number_integer_t value_integer = 0; + number_unsigned_t value_unsigned = 0; + number_float_t value_float = 0; + + /// the decimal point + const char_int_type decimal_point_char = '.'; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/is_sax.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstdint> // size_t +#include <utility> // declval +#include <string> // string + +// #include <nlohmann/detail/abi_macros.hpp> + +// #include <nlohmann/detail/meta/detected.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template<typename T> +using null_function_t = decltype(std::declval<T&>().null()); + +template<typename T> +using boolean_function_t = + decltype(std::declval<T&>().boolean(std::declval<bool>())); + +template<typename T, typename Integer> +using number_integer_function_t = + decltype(std::declval<T&>().number_integer(std::declval<Integer>())); + +template<typename T, typename Unsigned> +using number_unsigned_function_t = + decltype(std::declval<T&>().number_unsigned(std::declval<Unsigned>())); + +template<typename T, typename Float, typename String> +using number_float_function_t = decltype(std::declval<T&>().number_float( + std::declval<Float>(), std::declval<const String&>())); + +template<typename T, typename String> +using string_function_t = + decltype(std::declval<T&>().string(std::declval<String&>())); + +template<typename T, typename Binary> +using binary_function_t = + decltype(std::declval<T&>().binary(std::declval<Binary&>())); + +template<typename T> +using start_object_function_t = + decltype(std::declval<T&>().start_object(std::declval<std::size_t>())); + +template<typename T, typename String> +using key_function_t = + decltype(std::declval<T&>().key(std::declval<String&>())); + +template<typename T> +using end_object_function_t = decltype(std::declval<T&>().end_object()); + +template<typename T> +using start_array_function_t = + decltype(std::declval<T&>().start_array(std::declval<std::size_t>())); + +template<typename T> +using end_array_function_t = decltype(std::declval<T&>().end_array()); + +template<typename T, typename Exception> +using parse_error_function_t = decltype(std::declval<T&>().parse_error( + std::declval<std::size_t>(), std::declval<const std::string&>(), + std::declval<const Exception&>())); + +template<typename SAX, typename BasicJsonType> +struct is_sax +{ + private: + static_assert(is_basic_json<BasicJsonType>::value, + "BasicJsonType must be of type basic_json<...>"); + + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using exception_t = typename BasicJsonType::exception; + + public: + static constexpr bool value = + is_detected_exact<bool, null_function_t, SAX>::value && + is_detected_exact<bool, boolean_function_t, SAX>::value && + is_detected_exact<bool, number_integer_function_t, SAX, number_integer_t>::value && + is_detected_exact<bool, number_unsigned_function_t, SAX, number_unsigned_t>::value && + is_detected_exact<bool, number_float_function_t, SAX, number_float_t, string_t>::value && + is_detected_exact<bool, string_function_t, SAX, string_t>::value && + is_detected_exact<bool, binary_function_t, SAX, binary_t>::value && + is_detected_exact<bool, start_object_function_t, SAX>::value && + is_detected_exact<bool, key_function_t, SAX, string_t>::value && + is_detected_exact<bool, end_object_function_t, SAX>::value && + is_detected_exact<bool, start_array_function_t, SAX>::value && + is_detected_exact<bool, end_array_function_t, SAX>::value && + is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value; +}; + +template<typename SAX, typename BasicJsonType> +struct is_sax_static_asserts +{ + private: + static_assert(is_basic_json<BasicJsonType>::value, + "BasicJsonType must be of type basic_json<...>"); + + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using exception_t = typename BasicJsonType::exception; + + public: + static_assert(is_detected_exact<bool, null_function_t, SAX>::value, + "Missing/invalid function: bool null()"); + static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value, + "Missing/invalid function: bool boolean(bool)"); + static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value, + "Missing/invalid function: bool boolean(bool)"); + static_assert( + is_detected_exact<bool, number_integer_function_t, SAX, + number_integer_t>::value, + "Missing/invalid function: bool number_integer(number_integer_t)"); + static_assert( + is_detected_exact<bool, number_unsigned_function_t, SAX, + number_unsigned_t>::value, + "Missing/invalid function: bool number_unsigned(number_unsigned_t)"); + static_assert(is_detected_exact<bool, number_float_function_t, SAX, + number_float_t, string_t>::value, + "Missing/invalid function: bool number_float(number_float_t, const string_t&)"); + static_assert( + is_detected_exact<bool, string_function_t, SAX, string_t>::value, + "Missing/invalid function: bool string(string_t&)"); + static_assert( + is_detected_exact<bool, binary_function_t, SAX, binary_t>::value, + "Missing/invalid function: bool binary(binary_t&)"); + static_assert(is_detected_exact<bool, start_object_function_t, SAX>::value, + "Missing/invalid function: bool start_object(std::size_t)"); + static_assert(is_detected_exact<bool, key_function_t, SAX, string_t>::value, + "Missing/invalid function: bool key(string_t&)"); + static_assert(is_detected_exact<bool, end_object_function_t, SAX>::value, + "Missing/invalid function: bool end_object()"); + static_assert(is_detected_exact<bool, start_array_function_t, SAX>::value, + "Missing/invalid function: bool start_array(std::size_t)"); + static_assert(is_detected_exact<bool, end_array_function_t, SAX>::value, + "Missing/invalid function: bool end_array()"); + static_assert( + is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value, + "Missing/invalid function: bool parse_error(std::size_t, const " + "std::string&, const exception&)"); +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/string_concat.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// how to treat CBOR tags +enum class cbor_tag_handler_t +{ + error, ///< throw a parse_error exception in case of a tag + ignore, ///< ignore tags + store ///< store tags as binary type +}; + +/*! +@brief determine system byte order + +@return true if and only if system's byte order is little endian + +@note from https://stackoverflow.com/a/1001328/266378 +*/ +static inline bool little_endianness(int num = 1) noexcept +{ + return *reinterpret_cast<char*>(&num) == 1; +} + +/////////////////// +// binary reader // +/////////////////// + +/*! +@brief deserialization of CBOR, MessagePack, and UBJSON values +*/ +template<typename BasicJsonType, typename InputAdapterType, typename SAX = json_sax_dom_parser<BasicJsonType>> +class binary_reader +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using json_sax_t = SAX; + using char_type = typename InputAdapterType::char_type; + using char_int_type = typename char_traits<char_type>::int_type; + + public: + /*! + @brief create a binary reader + + @param[in] adapter input adapter to read from + */ + explicit binary_reader(InputAdapterType&& adapter, const input_format_t format = input_format_t::json) noexcept : ia(std::move(adapter)), input_format(format) + { + (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; + } + + // make class move-only + binary_reader(const binary_reader&) = delete; + binary_reader(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + binary_reader& operator=(const binary_reader&) = delete; + binary_reader& operator=(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~binary_reader() = default; + + /*! + @param[in] format the binary format to parse + @param[in] sax_ a SAX event processor + @param[in] strict whether to expect the input to be consumed completed + @param[in] tag_handler how to treat CBOR tags + + @return whether parsing was successful + */ + JSON_HEDLEY_NON_NULL(3) + bool sax_parse(const input_format_t format, + json_sax_t* sax_, + const bool strict = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + sax = sax_; + bool result = false; + + switch (format) + { + case input_format_t::bson: + result = parse_bson_internal(); + break; + + case input_format_t::cbor: + result = parse_cbor_internal(true, tag_handler); + break; + + case input_format_t::msgpack: + result = parse_msgpack_internal(); + break; + + case input_format_t::ubjson: + case input_format_t::bjdata: + result = parse_ubjson_internal(); + break; + + case input_format_t::json: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + + // strict mode: next byte must be EOF + if (result && strict) + { + if (input_format == input_format_t::ubjson || input_format == input_format_t::bjdata) + { + get_ignore_noop(); + } + else + { + get(); + } + + if (JSON_HEDLEY_UNLIKELY(current != char_traits<char_type>::eof())) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(110, chars_read, + exception_message(input_format, concat("expected end of input; last byte: 0x", get_token_string()), "value"), nullptr)); + } + } + + return result; + } + + private: + ////////// + // BSON // + ////////// + + /*! + @brief Reads in a BSON-object and passes it to the SAX-parser. + @return whether a valid BSON-value was passed to the SAX parser + */ + bool parse_bson_internal() + { + std::int32_t document_size{}; + get_number<std::int32_t, true>(input_format_t::bson, document_size); + + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast<std::size_t>(-1)))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/false))) + { + return false; + } + + return sax->end_object(); + } + + /*! + @brief Parses a C-style string from the BSON input. + @param[in,out] result A reference to the string variable where the read + string is to be stored. + @return `true` if the \x00-byte indicating the end of the string was + encountered before the EOF; false` indicates an unexpected EOF. + */ + bool get_bson_cstr(string_t& result) + { + auto out = std::back_inserter(result); + while (true) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, "cstring"))) + { + return false; + } + if (current == 0x00) + { + return true; + } + *out++ = static_cast<typename string_t::value_type>(current); + } + } + + /*! + @brief Parses a zero-terminated string of length @a len from the BSON + input. + @param[in] len The length (including the zero-byte at the end) of the + string to be read. + @param[in,out] result A reference to the string variable where the read + string is to be stored. + @tparam NumberType The type of the length @a len + @pre len >= 1 + @return `true` if the string was successfully parsed + */ + template<typename NumberType> + bool get_bson_string(const NumberType len, string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(len < 1)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::bson, concat("string length must be at least 1, is ", std::to_string(len)), "string"), nullptr)); + } + + return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != char_traits<char_type>::eof(); + } + + /*! + @brief Parses a byte array input of length @a len from the BSON input. + @param[in] len The length of the byte array to be read. + @param[in,out] result A reference to the binary variable where the read + array is to be stored. + @tparam NumberType The type of the length @a len + @pre len >= 0 + @return `true` if the byte array was successfully parsed + */ + template<typename NumberType> + bool get_bson_binary(const NumberType len, binary_t& result) + { + if (JSON_HEDLEY_UNLIKELY(len < 0)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::bson, concat("byte array length cannot be negative, is ", std::to_string(len)), "binary"), nullptr)); + } + + // All BSON binary values have a subtype + std::uint8_t subtype{}; + get_number<std::uint8_t>(input_format_t::bson, subtype); + result.set_subtype(subtype); + + return get_binary(input_format_t::bson, len, result); + } + + /*! + @brief Read a BSON document element of the given @a element_type. + @param[in] element_type The BSON element type, c.f. http://bsonspec.org/spec.html + @param[in] element_type_parse_position The position in the input stream, + where the `element_type` was read. + @warning Not all BSON element types are supported yet. An unsupported + @a element_type will give rise to a parse_error.114: + Unsupported BSON record type 0x... + @return whether a valid BSON-object/array was passed to the SAX parser + */ + bool parse_bson_element_internal(const char_int_type element_type, + const std::size_t element_type_parse_position) + { + switch (element_type) + { + case 0x01: // double + { + double number{}; + return get_number<double, true>(input_format_t::bson, number) && sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 0x02: // string + { + std::int32_t len{}; + string_t value; + return get_number<std::int32_t, true>(input_format_t::bson, len) && get_bson_string(len, value) && sax->string(value); + } + + case 0x03: // object + { + return parse_bson_internal(); + } + + case 0x04: // array + { + return parse_bson_array(); + } + + case 0x05: // binary + { + std::int32_t len{}; + binary_t value; + return get_number<std::int32_t, true>(input_format_t::bson, len) && get_bson_binary(len, value) && sax->binary(value); + } + + case 0x08: // boolean + { + return sax->boolean(get() != 0); + } + + case 0x0A: // null + { + return sax->null(); + } + + case 0x10: // int32 + { + std::int32_t value{}; + return get_number<std::int32_t, true>(input_format_t::bson, value) && sax->number_integer(value); + } + + case 0x12: // int64 + { + std::int64_t value{}; + return get_number<std::int64_t, true>(input_format_t::bson, value) && sax->number_integer(value); + } + + default: // anything else not supported (yet) + { + std::array<char, 3> cr{{}}; + static_cast<void>((std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(element_type))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + const std::string cr_str{cr.data()}; + return sax->parse_error(element_type_parse_position, cr_str, + parse_error::create(114, element_type_parse_position, concat("Unsupported BSON record type 0x", cr_str), nullptr)); + } + } + } + + /*! + @brief Read a BSON element list (as specified in the BSON-spec) + + The same binary layout is used for objects and arrays, hence it must be + indicated with the argument @a is_array which one is expected + (true --> array, false --> object). + + @param[in] is_array Determines if the element list being read is to be + treated as an object (@a is_array == false), or as an + array (@a is_array == true). + @return whether a valid BSON-object/array was passed to the SAX parser + */ + bool parse_bson_element_list(const bool is_array) + { + string_t key; + + while (auto element_type = get()) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, "element list"))) + { + return false; + } + + const std::size_t element_type_parse_position = chars_read; + if (JSON_HEDLEY_UNLIKELY(!get_bson_cstr(key))) + { + return false; + } + + if (!is_array && !sax->key(key)) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_internal(element_type, element_type_parse_position))) + { + return false; + } + + // get_bson_cstr only appends + key.clear(); + } + + return true; + } + + /*! + @brief Reads an array from the BSON input and passes it to the SAX-parser. + @return whether a valid BSON-array was passed to the SAX parser + */ + bool parse_bson_array() + { + std::int32_t document_size{}; + get_number<std::int32_t, true>(input_format_t::bson, document_size); + + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast<std::size_t>(-1)))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/true))) + { + return false; + } + + return sax->end_array(); + } + + ////////// + // CBOR // + ////////// + + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true) or whether the last read character should + be considered instead (false) + @param[in] tag_handler how CBOR tags should be treated + + @return whether a valid CBOR value was passed to the SAX parser + */ + bool parse_cbor_internal(const bool get_char, + const cbor_tag_handler_t tag_handler) + { + switch (get_char ? get() : current) + { + // EOF + case char_traits<char_type>::eof(): + return unexpect_eof(input_format_t::cbor, "value"); + + // Integer 0x00..0x17 (0..23) + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + return sax->number_unsigned(static_cast<number_unsigned_t>(current)); + + case 0x18: // Unsigned integer (one-byte uint8_t follows) + { + std::uint8_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x19: // Unsigned integer (two-byte uint16_t follows) + { + std::uint16_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x1A: // Unsigned integer (four-byte uint32_t follows) + { + std::uint32_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x1B: // Unsigned integer (eight-byte uint64_t follows) + { + std::uint64_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + // Negative integer -1-0x00..-1-0x17 (-1..-24) + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + return sax->number_integer(static_cast<std::int8_t>(0x20 - 1 - current)); + + case 0x38: // Negative integer (one-byte uint8_t follows) + { + std::uint8_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number); + } + + case 0x39: // Negative integer -1-n (two-byte uint16_t follows) + { + std::uint16_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number); + } + + case 0x3A: // Negative integer -1-n (four-byte uint32_t follows) + { + std::uint32_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number); + } + + case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows) + { + std::uint64_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) + - static_cast<number_integer_t>(number)); + } + + // Binary data (0x00..0x17 bytes follow) + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: // Binary data (one-byte uint8_t for n follows) + case 0x59: // Binary data (two-byte uint16_t for n follow) + case 0x5A: // Binary data (four-byte uint32_t for n follow) + case 0x5B: // Binary data (eight-byte uint64_t for n follow) + case 0x5F: // Binary data (indefinite length) + { + binary_t b; + return get_cbor_binary(b) && sax->binary(b); + } + + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + case 0x7F: // UTF-8 string (indefinite length) + { + string_t s; + return get_cbor_string(s) && sax->string(s); + } + + // array (0x00..0x17 data items follow) + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + return get_cbor_array( + conditional_static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu), tag_handler); + + case 0x98: // array (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast<std::size_t>(len), tag_handler); + } + + case 0x99: // array (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast<std::size_t>(len), tag_handler); + } + + case 0x9A: // array (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(conditional_static_cast<std::size_t>(len), tag_handler); + } + + case 0x9B: // array (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(conditional_static_cast<std::size_t>(len), tag_handler); + } + + case 0x9F: // array (indefinite length) + return get_cbor_array(static_cast<std::size_t>(-1), tag_handler); + + // map (0x00..0x17 pairs of data items follow) + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + return get_cbor_object(conditional_static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu), tag_handler); + + case 0xB8: // map (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast<std::size_t>(len), tag_handler); + } + + case 0xB9: // map (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast<std::size_t>(len), tag_handler); + } + + case 0xBA: // map (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(conditional_static_cast<std::size_t>(len), tag_handler); + } + + case 0xBB: // map (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(conditional_static_cast<std::size_t>(len), tag_handler); + } + + case 0xBF: // map (indefinite length) + return get_cbor_object(static_cast<std::size_t>(-1), tag_handler); + + case 0xC6: // tagged item + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD8: // tagged item (1 bytes follow) + case 0xD9: // tagged item (2 bytes follow) + case 0xDA: // tagged item (4 bytes follow) + case 0xDB: // tagged item (8 bytes follow) + { + switch (tag_handler) + { + case cbor_tag_handler_t::error: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::cbor, concat("invalid byte: 0x", last_token), "value"), nullptr)); + } + + case cbor_tag_handler_t::ignore: + { + // ignore binary subtype + switch (current) + { + case 0xD8: + { + std::uint8_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xD9: + { + std::uint16_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xDA: + { + std::uint32_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xDB: + { + std::uint64_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + default: + break; + } + return parse_cbor_internal(true, tag_handler); + } + + case cbor_tag_handler_t::store: + { + binary_t b; + // use binary subtype and store in binary container + switch (current) + { + case 0xD8: + { + std::uint8_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype)); + break; + } + case 0xD9: + { + std::uint16_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype)); + break; + } + case 0xDA: + { + std::uint32_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype)); + break; + } + case 0xDB: + { + std::uint64_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype)); + break; + } + default: + return parse_cbor_internal(true, tag_handler); + } + get(); + return get_cbor_binary(b) && sax->binary(b); + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + return false; // LCOV_EXCL_LINE + } + } + + case 0xF4: // false + return sax->boolean(false); + + case 0xF5: // true + return sax->boolean(true); + + case 0xF6: // null + return sax->null(); + + case 0xF9: // Half-Precision Float (two-byte IEEE 754) + { + const auto byte1_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "number"))) + { + return false; + } + const auto byte2_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "number"))) + { + return false; + } + + const auto byte1 = static_cast<unsigned char>(byte1_raw); + const auto byte2 = static_cast<unsigned char>(byte2_raw); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const auto half = static_cast<unsigned int>((byte1 << 8u) + byte2); + const double val = [&half] + { + const int exp = (half >> 10u) & 0x1Fu; + const unsigned int mant = half & 0x3FFu; + JSON_ASSERT(0 <= exp&& exp <= 32); + JSON_ASSERT(mant <= 1024); + switch (exp) + { + case 0: + return std::ldexp(mant, -24); + case 31: + return (mant == 0) + ? std::numeric_limits<double>::infinity() + : std::numeric_limits<double>::quiet_NaN(); + default: + return std::ldexp(mant + 1024, exp - 25); + } + }(); + return sax->number_float((half & 0x8000u) != 0 + ? static_cast<number_float_t>(-val) + : static_cast<number_float_t>(val), ""); + } + + case 0xFA: // Single-Precision Float (four-byte IEEE 754) + { + float number{}; + return get_number(input_format_t::cbor, number) && sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 0xFB: // Double-Precision Float (eight-byte IEEE 754) + { + double number{}; + return get_number(input_format_t::cbor, number) && sax->number_float(static_cast<number_float_t>(number), ""); + } + + default: // anything else (0xFF is handled inside the other types) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::cbor, concat("invalid byte: 0x", last_token), "value"), nullptr)); + } + } + } + + /*! + @brief reads a CBOR string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + Additionally, CBOR's strings with indefinite lengths are supported. + + @param[out] result created string + + @return whether string creation completed + */ + bool get_cbor_string(string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "string"))) + { + return false; + } + + switch (current) + { + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + { + return get_string(input_format_t::cbor, static_cast<unsigned int>(current) & 0x1Fu, result); + } + + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7F: // UTF-8 string (indefinite length) + { + while (get() != 0xFF) + { + string_t chunk; + if (!get_cbor_string(chunk)) + { + return false; + } + result.append(chunk); + } + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, + exception_message(input_format_t::cbor, concat("expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x", last_token), "string"), nullptr)); + } + } + } + + /*! + @brief reads a CBOR byte array + + This function first reads starting bytes to determine the expected + byte array length and then copies this number of bytes into the byte array. + Additionally, CBOR's byte arrays with indefinite lengths are supported. + + @param[out] result created byte array + + @return whether byte array creation completed + */ + bool get_cbor_binary(binary_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "binary"))) + { + return false; + } + + switch (current) + { + // Binary data (0x00..0x17 bytes follow) + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + { + return get_binary(input_format_t::cbor, static_cast<unsigned int>(current) & 0x1Fu, result); + } + + case 0x58: // Binary data (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x59: // Binary data (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5A: // Binary data (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5B: // Binary data (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5F: // Binary data (indefinite length) + { + while (get() != 0xFF) + { + binary_t chunk; + if (!get_cbor_binary(chunk)) + { + return false; + } + result.insert(result.end(), chunk.begin(), chunk.end()); + } + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, + exception_message(input_format_t::cbor, concat("expected length specification (0x40-0x5B) or indefinite binary array type (0x5F); last byte: 0x", last_token), "binary"), nullptr)); + } + } + } + + /*! + @param[in] len the length of the array or static_cast<std::size_t>(-1) for an + array of indefinite size + @param[in] tag_handler how CBOR tags should be treated + @return whether array creation completed + */ + bool get_cbor_array(const std::size_t len, + const cbor_tag_handler_t tag_handler) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len))) + { + return false; + } + + if (len != static_cast<std::size_t>(-1)) + { + for (std::size_t i = 0; i < len; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + } + } + else + { + while (get() != 0xFF) + { + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(false, tag_handler))) + { + return false; + } + } + } + + return sax->end_array(); + } + + /*! + @param[in] len the length of the object or static_cast<std::size_t>(-1) for an + object of indefinite size + @param[in] tag_handler how CBOR tags should be treated + @return whether object creation completed + */ + bool get_cbor_object(const std::size_t len, + const cbor_tag_handler_t tag_handler) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len))) + { + return false; + } + + if (len != 0) + { + string_t key; + if (len != static_cast<std::size_t>(-1)) + { + for (std::size_t i = 0; i < len; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!get_cbor_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + key.clear(); + } + } + else + { + while (get() != 0xFF) + { + if (JSON_HEDLEY_UNLIKELY(!get_cbor_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + key.clear(); + } + } + } + + return sax->end_object(); + } + + ///////////// + // MsgPack // + ///////////// + + /*! + @return whether a valid MessagePack value was passed to the SAX parser + */ + bool parse_msgpack_internal() + { + switch (get()) + { + // EOF + case char_traits<char_type>::eof(): + return unexpect_eof(input_format_t::msgpack, "value"); + + // positive fixint + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5C: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + return sax->number_unsigned(static_cast<number_unsigned_t>(current)); + + // fixmap + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + return get_msgpack_object(conditional_static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu)); + + // fixarray + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + case 0x98: + case 0x99: + case 0x9A: + case 0x9B: + case 0x9C: + case 0x9D: + case 0x9E: + case 0x9F: + return get_msgpack_array(conditional_static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu)); + + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 + { + string_t s; + return get_msgpack_string(s) && sax->string(s); + } + + case 0xC0: // nil + return sax->null(); + + case 0xC2: // false + return sax->boolean(false); + + case 0xC3: // true + return sax->boolean(true); + + case 0xC4: // bin 8 + case 0xC5: // bin 16 + case 0xC6: // bin 32 + case 0xC7: // ext 8 + case 0xC8: // ext 16 + case 0xC9: // ext 32 + case 0xD4: // fixext 1 + case 0xD5: // fixext 2 + case 0xD6: // fixext 4 + case 0xD7: // fixext 8 + case 0xD8: // fixext 16 + { + binary_t b; + return get_msgpack_binary(b) && sax->binary(b); + } + + case 0xCA: // float 32 + { + float number{}; + return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 0xCB: // float 64 + { + double number{}; + return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 0xCC: // uint 8 + { + std::uint8_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCD: // uint 16 + { + std::uint16_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCE: // uint 32 + { + std::uint32_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCF: // uint 64 + { + std::uint64_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xD0: // int 8 + { + std::int8_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD1: // int 16 + { + std::int16_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD2: // int 32 + { + std::int32_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD3: // int 64 + { + std::int64_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xDC: // array 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_array(static_cast<std::size_t>(len)); + } + + case 0xDD: // array 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_array(conditional_static_cast<std::size_t>(len)); + } + + case 0xDE: // map 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_object(static_cast<std::size_t>(len)); + } + + case 0xDF: // map 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_object(conditional_static_cast<std::size_t>(len)); + } + + // negative fixint + case 0xE0: + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xED: + case 0xEE: + case 0xEF: + case 0xF0: + case 0xF1: + case 0xF2: + case 0xF3: + case 0xF4: + case 0xF5: + case 0xF6: + case 0xF7: + case 0xF8: + case 0xF9: + case 0xFA: + case 0xFB: + case 0xFC: + case 0xFD: + case 0xFE: + case 0xFF: + return sax->number_integer(static_cast<std::int8_t>(current)); + + default: // anything else + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::msgpack, concat("invalid byte: 0x", last_token), "value"), nullptr)); + } + } + } + + /*! + @brief reads a MessagePack string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + + @param[out] result created string + + @return whether string creation completed + */ + bool get_msgpack_string(string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::msgpack, "string"))) + { + return false; + } + + switch (current) + { + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + { + return get_string(input_format_t::msgpack, static_cast<unsigned int>(current) & 0x1Fu, result); + } + + case 0xD9: // str 8 + { + std::uint8_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + case 0xDA: // str 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + case 0xDB: // str 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, + exception_message(input_format_t::msgpack, concat("expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x", last_token), "string"), nullptr)); + } + } + } + + /*! + @brief reads a MessagePack byte array + + This function first reads starting bytes to determine the expected + byte array length and then copies this number of bytes into a byte array. + + @param[out] result created byte array + + @return whether byte array creation completed + */ + bool get_msgpack_binary(binary_t& result) + { + // helper function to set the subtype + auto assign_and_return_true = [&result](std::int8_t subtype) + { + result.set_subtype(static_cast<std::uint8_t>(subtype)); + return true; + }; + + switch (current) + { + case 0xC4: // bin 8 + { + std::uint8_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC5: // bin 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC6: // bin 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC7: // ext 8 + { + std::uint8_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xC8: // ext 16 + { + std::uint16_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xC9: // ext 32 + { + std::uint32_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xD4: // fixext 1 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 1, result) && + assign_and_return_true(subtype); + } + + case 0xD5: // fixext 2 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 2, result) && + assign_and_return_true(subtype); + } + + case 0xD6: // fixext 4 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 4, result) && + assign_and_return_true(subtype); + } + + case 0xD7: // fixext 8 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 8, result) && + assign_and_return_true(subtype); + } + + case 0xD8: // fixext 16 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 16, result) && + assign_and_return_true(subtype); + } + + default: // LCOV_EXCL_LINE + return false; // LCOV_EXCL_LINE + } + } + + /*! + @param[in] len the length of the array + @return whether array creation completed + */ + bool get_msgpack_array(const std::size_t len) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len))) + { + return false; + } + + for (std::size_t i = 0; i < len; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal())) + { + return false; + } + } + + return sax->end_array(); + } + + /*! + @param[in] len the length of the object + @return whether object creation completed + */ + bool get_msgpack_object(const std::size_t len) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len))) + { + return false; + } + + string_t key; + for (std::size_t i = 0; i < len; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!get_msgpack_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal())) + { + return false; + } + key.clear(); + } + + return sax->end_object(); + } + + //////////// + // UBJSON // + //////////// + + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether a valid UBJSON value was passed to the SAX parser + */ + bool parse_ubjson_internal(const bool get_char = true) + { + return get_ubjson_value(get_char ? get_ignore_noop() : current); + } + + /*! + @brief reads a UBJSON string + + This function is either called after reading the 'S' byte explicitly + indicating a string, or in case of an object key where the 'S' byte can be + left out. + + @param[out] result created string + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether string creation completed + */ + bool get_ubjson_string(string_t& result, const bool get_char = true) + { + if (get_char) + { + get(); // TODO(niels): may we ignore N here? + } + + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "value"))) + { + return false; + } + + switch (current) + { + case 'U': + { + std::uint8_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'i': + { + std::int8_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'I': + { + std::int16_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'l': + { + std::int32_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'L': + { + std::int64_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'u': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint16_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'm': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint32_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'M': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint64_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + default: + break; + } + auto last_token = get_token_string(); + std::string message; + + if (input_format != input_format_t::bjdata) + { + message = "expected length type specification (U, i, I, l, L); last byte: 0x" + last_token; + } + else + { + message = "expected length type specification (U, i, u, I, m, l, M, L); last byte: 0x" + last_token; + } + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format, message, "string"), nullptr)); + } + + /*! + @param[out] dim an integer vector storing the ND array dimensions + @return whether reading ND array size vector is successful + */ + bool get_ubjson_ndarray_size(std::vector<size_t>& dim) + { + std::pair<std::size_t, char_int_type> size_and_type; + size_t dimlen = 0; + bool no_ndarray = true; + + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type, no_ndarray))) + { + return false; + } + + if (size_and_type.first != npos) + { + if (size_and_type.second != 0) + { + if (size_and_type.second != 'N') + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_value(dimlen, no_ndarray, size_and_type.second))) + { + return false; + } + dim.push_back(dimlen); + } + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_value(dimlen, no_ndarray))) + { + return false; + } + dim.push_back(dimlen); + } + } + } + else + { + while (current != ']') + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_value(dimlen, no_ndarray, current))) + { + return false; + } + dim.push_back(dimlen); + get_ignore_noop(); + } + } + return true; + } + + /*! + @param[out] result determined size + @param[in,out] is_ndarray for input, `true` means already inside an ndarray vector + or ndarray dimension is not allowed; `false` means ndarray + is allowed; for output, `true` means an ndarray is found; + is_ndarray can only return `true` when its initial value + is `false` + @param[in] prefix type marker if already read, otherwise set to 0 + + @return whether size determination completed + */ + bool get_ubjson_size_value(std::size_t& result, bool& is_ndarray, char_int_type prefix = 0) + { + if (prefix == 0) + { + prefix = get_ignore_noop(); + } + + switch (prefix) + { + case 'U': + { + std::uint8_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'i': + { + std::int8_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (number < 0) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, + exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); + } + result = static_cast<std::size_t>(number); // NOLINT(bugprone-signed-char-misuse,cert-str34-c): number is not a char + return true; + } + + case 'I': + { + std::int16_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (number < 0) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, + exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'l': + { + std::int32_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (number < 0) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, + exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'L': + { + std::int64_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (number < 0) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, + exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); + } + if (!value_in_range_of<std::size_t>(number)) + { + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, + exception_message(input_format, "integer value overflow", "size"), nullptr)); + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'u': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint16_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + result = static_cast<std::size_t>(number); + return true; + } + + case 'm': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint32_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + result = conditional_static_cast<std::size_t>(number); + return true; + } + + case 'M': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint64_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (!value_in_range_of<std::size_t>(number)) + { + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, + exception_message(input_format, "integer value overflow", "size"), nullptr)); + } + result = detail::conditional_static_cast<std::size_t>(number); + return true; + } + + case '[': + { + if (input_format != input_format_t::bjdata) + { + break; + } + if (is_ndarray) // ndarray dimensional vector can only contain integers, and can not embed another array + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, exception_message(input_format, "ndarray dimensional vector is not allowed", "size"), nullptr)); + } + std::vector<size_t> dim; + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_ndarray_size(dim))) + { + return false; + } + if (dim.size() == 1 || (dim.size() == 2 && dim.at(0) == 1)) // return normal array size if 1D row vector + { + result = dim.at(dim.size() - 1); + return true; + } + if (!dim.empty()) // if ndarray, convert to an object in JData annotated array format + { + for (auto i : dim) // test if any dimension in an ndarray is 0, if so, return a 1D empty container + { + if ( i == 0 ) + { + result = 0; + return true; + } + } + + string_t key = "_ArraySize_"; + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(3) || !sax->key(key) || !sax->start_array(dim.size()))) + { + return false; + } + result = 1; + for (auto i : dim) + { + result *= i; + if (result == 0 || result == npos) // because dim elements shall not have zeros, result = 0 means overflow happened; it also can't be npos as it is used to initialize size in get_ubjson_size_type() + { + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, exception_message(input_format, "excessive ndarray size caused overflow", "size"), nullptr)); + } + if (JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(static_cast<number_unsigned_t>(i)))) + { + return false; + } + } + is_ndarray = true; + return sax->end_array(); + } + result = 0; + return true; + } + + default: + break; + } + auto last_token = get_token_string(); + std::string message; + + if (input_format != input_format_t::bjdata) + { + message = "expected length type specification (U, i, I, l, L) after '#'; last byte: 0x" + last_token; + } + else + { + message = "expected length type specification (U, i, u, I, m, l, M, L) after '#'; last byte: 0x" + last_token; + } + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format, message, "size"), nullptr)); + } + + /*! + @brief determine the type and size for a container + + In the optimized UBJSON format, a type and a size can be provided to allow + for a more compact representation. + + @param[out] result pair of the size and the type + @param[in] inside_ndarray whether the parser is parsing an ND array dimensional vector + + @return whether pair creation completed + */ + bool get_ubjson_size_type(std::pair<std::size_t, char_int_type>& result, bool inside_ndarray = false) + { + result.first = npos; // size + result.second = 0; // type + bool is_ndarray = false; + + get_ignore_noop(); + + if (current == '$') + { + result.second = get(); // must not ignore 'N', because 'N' maybe the type + if (input_format == input_format_t::bjdata + && JSON_HEDLEY_UNLIKELY(std::binary_search(bjd_optimized_type_markers.begin(), bjd_optimized_type_markers.end(), result.second))) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format, concat("marker 0x", last_token, " is not a permitted optimized array type"), "type"), nullptr)); + } + + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "type"))) + { + return false; + } + + get_ignore_noop(); + if (JSON_HEDLEY_UNLIKELY(current != '#')) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "value"))) + { + return false; + } + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format, concat("expected '#' after type information; last byte: 0x", last_token), "size"), nullptr)); + } + + const bool is_error = get_ubjson_size_value(result.first, is_ndarray); + if (input_format == input_format_t::bjdata && is_ndarray) + { + if (inside_ndarray) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(112, chars_read, + exception_message(input_format, "ndarray can not be recursive", "size"), nullptr)); + } + result.second |= (1 << 8); // use bit 8 to indicate ndarray, all UBJSON and BJData markers should be ASCII letters + } + return is_error; + } + + if (current == '#') + { + const bool is_error = get_ubjson_size_value(result.first, is_ndarray); + if (input_format == input_format_t::bjdata && is_ndarray) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(112, chars_read, + exception_message(input_format, "ndarray requires both type and size", "size"), nullptr)); + } + return is_error; + } + + return true; + } + + /*! + @param prefix the previously read or set type prefix + @return whether value creation completed + */ + bool get_ubjson_value(const char_int_type prefix) + { + switch (prefix) + { + case char_traits<char_type>::eof(): // EOF + return unexpect_eof(input_format, "value"); + + case 'T': // true + return sax->boolean(true); + case 'F': // false + return sax->boolean(false); + + case 'Z': // null + return sax->null(); + + case 'U': + { + std::uint8_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + + case 'i': + { + std::int8_t number{}; + return get_number(input_format, number) && sax->number_integer(number); + } + + case 'I': + { + std::int16_t number{}; + return get_number(input_format, number) && sax->number_integer(number); + } + + case 'l': + { + std::int32_t number{}; + return get_number(input_format, number) && sax->number_integer(number); + } + + case 'L': + { + std::int64_t number{}; + return get_number(input_format, number) && sax->number_integer(number); + } + + case 'u': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint16_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + + case 'm': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint32_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + + case 'M': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint64_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + + case 'h': + { + if (input_format != input_format_t::bjdata) + { + break; + } + const auto byte1_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "number"))) + { + return false; + } + const auto byte2_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "number"))) + { + return false; + } + + const auto byte1 = static_cast<unsigned char>(byte1_raw); + const auto byte2 = static_cast<unsigned char>(byte2_raw); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const auto half = static_cast<unsigned int>((byte2 << 8u) + byte1); + const double val = [&half] + { + const int exp = (half >> 10u) & 0x1Fu; + const unsigned int mant = half & 0x3FFu; + JSON_ASSERT(0 <= exp&& exp <= 32); + JSON_ASSERT(mant <= 1024); + switch (exp) + { + case 0: + return std::ldexp(mant, -24); + case 31: + return (mant == 0) + ? std::numeric_limits<double>::infinity() + : std::numeric_limits<double>::quiet_NaN(); + default: + return std::ldexp(mant + 1024, exp - 25); + } + }(); + return sax->number_float((half & 0x8000u) != 0 + ? static_cast<number_float_t>(-val) + : static_cast<number_float_t>(val), ""); + } + + case 'd': + { + float number{}; + return get_number(input_format, number) && sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 'D': + { + double number{}; + return get_number(input_format, number) && sax->number_float(static_cast<number_float_t>(number), ""); + } + + case 'H': + { + return get_ubjson_high_precision_number(); + } + + case 'C': // char + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "char"))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(current > 127)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, + exception_message(input_format, concat("byte after 'C' must be in range 0x00..0x7F; last byte: 0x", last_token), "char"), nullptr)); + } + string_t s(1, static_cast<typename string_t::value_type>(current)); + return sax->string(s); + } + + case 'S': // string + { + string_t s; + return get_ubjson_string(s) && sax->string(s); + } + + case '[': // array + return get_ubjson_array(); + + case '{': // object + return get_ubjson_object(); + + default: // anything else + break; + } + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format, "invalid byte: 0x" + last_token, "value"), nullptr)); + } + + /*! + @return whether array creation completed + */ + bool get_ubjson_array() + { + std::pair<std::size_t, char_int_type> size_and_type; + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type))) + { + return false; + } + + // if bit-8 of size_and_type.second is set to 1, encode bjdata ndarray as an object in JData annotated array format (https://github.com/NeuroJSON/jdata): + // {"_ArrayType_" : "typeid", "_ArraySize_" : [n1, n2, ...], "_ArrayData_" : [v1, v2, ...]} + + if (input_format == input_format_t::bjdata && size_and_type.first != npos && (size_and_type.second & (1 << 8)) != 0) + { + size_and_type.second &= ~(static_cast<char_int_type>(1) << 8); // use bit 8 to indicate ndarray, here we remove the bit to restore the type marker + auto it = std::lower_bound(bjd_types_map.begin(), bjd_types_map.end(), size_and_type.second, [](const bjd_type & p, char_int_type t) + { + return p.first < t; + }); + string_t key = "_ArrayType_"; + if (JSON_HEDLEY_UNLIKELY(it == bjd_types_map.end() || it->first != size_and_type.second)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format, "invalid byte: 0x" + last_token, "type"), nullptr)); + } + + string_t type = it->second; // sax->string() takes a reference + if (JSON_HEDLEY_UNLIKELY(!sax->key(key) || !sax->string(type))) + { + return false; + } + + if (size_and_type.second == 'C') + { + size_and_type.second = 'U'; + } + + key = "_ArrayData_"; + if (JSON_HEDLEY_UNLIKELY(!sax->key(key) || !sax->start_array(size_and_type.first) )) + { + return false; + } + + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) + { + return false; + } + } + + return (sax->end_array() && sax->end_object()); + } + + if (size_and_type.first != npos) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first))) + { + return false; + } + + if (size_and_type.second != 0) + { + if (size_and_type.second != 'N') + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) + { + return false; + } + } + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + } + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast<std::size_t>(-1)))) + { + return false; + } + + while (current != ']') + { + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal(false))) + { + return false; + } + get_ignore_noop(); + } + } + + return sax->end_array(); + } + + /*! + @return whether object creation completed + */ + bool get_ubjson_object() + { + std::pair<std::size_t, char_int_type> size_and_type; + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type))) + { + return false; + } + + // do not accept ND-array size in objects in BJData + if (input_format == input_format_t::bjdata && size_and_type.first != npos && (size_and_type.second & (1 << 8)) != 0) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format, "BJData object does not support ND-array size in optimized format", "object"), nullptr)); + } + + string_t key; + if (size_and_type.first != npos) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(size_and_type.first))) + { + return false; + } + + if (size_and_type.second != 0) + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) + { + return false; + } + key.clear(); + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + key.clear(); + } + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast<std::size_t>(-1)))) + { + return false; + } + + while (current != '}') + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key, false) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + get_ignore_noop(); + key.clear(); + } + } + + return sax->end_object(); + } + + // Note, no reader for UBJSON binary types is implemented because they do + // not exist + + bool get_ubjson_high_precision_number() + { + // get size of following number string + std::size_t size{}; + bool no_ndarray = true; + auto res = get_ubjson_size_value(size, no_ndarray); + if (JSON_HEDLEY_UNLIKELY(!res)) + { + return res; + } + + // get number string + std::vector<char> number_vector; + for (std::size_t i = 0; i < size; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "number"))) + { + return false; + } + number_vector.push_back(static_cast<char>(current)); + } + + // parse number string + using ia_type = decltype(detail::input_adapter(number_vector)); + auto number_lexer = detail::lexer<BasicJsonType, ia_type>(detail::input_adapter(number_vector), false); + const auto result_number = number_lexer.scan(); + const auto number_string = number_lexer.get_token_string(); + const auto result_remainder = number_lexer.scan(); + + using token_type = typename detail::lexer_base<BasicJsonType>::token_type; + + if (JSON_HEDLEY_UNLIKELY(result_remainder != token_type::end_of_input)) + { + return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, + exception_message(input_format, concat("invalid number text: ", number_lexer.get_token_string()), "high-precision number"), nullptr)); + } + + switch (result_number) + { + case token_type::value_integer: + return sax->number_integer(number_lexer.get_number_integer()); + case token_type::value_unsigned: + return sax->number_unsigned(number_lexer.get_number_unsigned()); + case token_type::value_float: + return sax->number_float(number_lexer.get_number_float(), std::move(number_string)); + case token_type::uninitialized: + case token_type::literal_true: + case token_type::literal_false: + case token_type::literal_null: + case token_type::value_string: + case token_type::begin_array: + case token_type::begin_object: + case token_type::end_array: + case token_type::end_object: + case token_type::name_separator: + case token_type::value_separator: + case token_type::parse_error: + case token_type::end_of_input: + case token_type::literal_or_value: + default: + return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, + exception_message(input_format, concat("invalid number text: ", number_lexer.get_token_string()), "high-precision number"), nullptr)); + } + } + + /////////////////////// + // Utility functions // + /////////////////////// + + /*! + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a -'ve valued + `char_traits<char_type>::eof()` in that case. + + @return character read from the input + */ + char_int_type get() + { + ++chars_read; + return current = ia.get_character(); + } + + /*! + @return character read from the input after ignoring all 'N' entries + */ + char_int_type get_ignore_noop() + { + do + { + get(); + } + while (current == 'N'); + + return current; + } + + /* + @brief read a number from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[out] result number of type @a NumberType + + @return whether conversion completed + + @note This function needs to respect the system's endianness, because + bytes in CBOR, MessagePack, and UBJSON are stored in network order + (big endian) and therefore need reordering on little endian systems. + On the other hand, BSON and BJData use little endian and should reorder + on big endian systems. + */ + template<typename NumberType, bool InputIsLittleEndian = false> + bool get_number(const input_format_t format, NumberType& result) + { + // step 1: read input into array with system's byte order + std::array<std::uint8_t, sizeof(NumberType)> vec{}; + for (std::size_t i = 0; i < sizeof(NumberType); ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "number"))) + { + return false; + } + + // reverse byte order prior to conversion if necessary + if (is_little_endian != (InputIsLittleEndian || format == input_format_t::bjdata)) + { + vec[sizeof(NumberType) - i - 1] = static_cast<std::uint8_t>(current); + } + else + { + vec[i] = static_cast<std::uint8_t>(current); // LCOV_EXCL_LINE + } + } + + // step 2: convert array into number of type T and return + std::memcpy(&result, vec.data(), sizeof(NumberType)); + return true; + } + + /*! + @brief create a string by reading characters from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[in] len number of characters to read + @param[out] result string created by reading @a len bytes + + @return whether string creation completed + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref unexpect_eof() detects the end of + the input before we run out of string memory. + */ + template<typename NumberType> + bool get_string(const input_format_t format, + const NumberType len, + string_t& result) + { + bool success = true; + for (NumberType i = 0; i < len; i++) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "string"))) + { + success = false; + break; + } + result.push_back(static_cast<typename string_t::value_type>(current)); + } + return success; + } + + /*! + @brief create a byte array by reading bytes from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[in] len number of bytes to read + @param[out] result byte array created by reading @a len bytes + + @return whether byte array creation completed + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref unexpect_eof() detects the end of + the input before we run out of memory. + */ + template<typename NumberType> + bool get_binary(const input_format_t format, + const NumberType len, + binary_t& result) + { + bool success = true; + for (NumberType i = 0; i < len; i++) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "binary"))) + { + success = false; + break; + } + result.push_back(static_cast<std::uint8_t>(current)); + } + return success; + } + + /*! + @param[in] format the current format (for diagnostics) + @param[in] context further context information (for diagnostics) + @return whether the last read character is not EOF + */ + JSON_HEDLEY_NON_NULL(3) + bool unexpect_eof(const input_format_t format, const char* context) const + { + if (JSON_HEDLEY_UNLIKELY(current == char_traits<char_type>::eof())) + { + return sax->parse_error(chars_read, "<end of file>", + parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), nullptr)); + } + return true; + } + + /*! + @return a string representation of the last read byte + */ + std::string get_token_string() const + { + std::array<char, 3> cr{{}}; + static_cast<void>((std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(current))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + return std::string{cr.data()}; + } + + /*! + @param[in] format the current format + @param[in] detail a detailed error message + @param[in] context further context information + @return a message string to use in the parse_error exceptions + */ + std::string exception_message(const input_format_t format, + const std::string& detail, + const std::string& context) const + { + std::string error_msg = "syntax error while parsing "; + + switch (format) + { + case input_format_t::cbor: + error_msg += "CBOR"; + break; + + case input_format_t::msgpack: + error_msg += "MessagePack"; + break; + + case input_format_t::ubjson: + error_msg += "UBJSON"; + break; + + case input_format_t::bson: + error_msg += "BSON"; + break; + + case input_format_t::bjdata: + error_msg += "BJData"; + break; + + case input_format_t::json: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + + return concat(error_msg, ' ', context, ": ", detail); + } + + private: + static JSON_INLINE_VARIABLE constexpr std::size_t npos = static_cast<std::size_t>(-1); + + /// input adapter + InputAdapterType ia; + + /// the current character + char_int_type current = char_traits<char_type>::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// whether we can assume little endianness + const bool is_little_endian = little_endianness(); + + /// input format + const input_format_t input_format = input_format_t::json; + + /// the SAX parser + json_sax_t* sax = nullptr; + + // excluded markers in bjdata optimized type +#define JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_ \ + make_array<char_int_type>('F', 'H', 'N', 'S', 'T', 'Z', '[', '{') + +#define JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_ \ + make_array<bjd_type>( \ + bjd_type{'C', "char"}, \ + bjd_type{'D', "double"}, \ + bjd_type{'I', "int16"}, \ + bjd_type{'L', "int64"}, \ + bjd_type{'M', "uint64"}, \ + bjd_type{'U', "uint8"}, \ + bjd_type{'d', "single"}, \ + bjd_type{'i', "int8"}, \ + bjd_type{'l', "int32"}, \ + bjd_type{'m', "uint32"}, \ + bjd_type{'u', "uint16"}) + + JSON_PRIVATE_UNLESS_TESTED: + // lookup tables + // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) + const decltype(JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_) bjd_optimized_type_markers = + JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_; + + using bjd_type = std::pair<char_int_type, string_t>; + // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) + const decltype(JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_) bjd_types_map = + JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_; + +#undef JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_ +#undef JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_ +}; + +#ifndef JSON_HAS_CPP_17 + template<typename BasicJsonType, typename InputAdapterType, typename SAX> + constexpr std::size_t binary_reader<BasicJsonType, InputAdapterType, SAX>::npos; +#endif + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/input/input_adapters.hpp> + +// #include <nlohmann/detail/input/lexer.hpp> + +// #include <nlohmann/detail/input/parser.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cmath> // isfinite +#include <cstdint> // uint8_t +#include <functional> // function +#include <string> // string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/input/input_adapters.hpp> + +// #include <nlohmann/detail/input/json_sax.hpp> + +// #include <nlohmann/detail/input/lexer.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/is_sax.hpp> + +// #include <nlohmann/detail/string_concat.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ +//////////// +// parser // +//////////// + +enum class parse_event_t : std::uint8_t +{ + /// the parser read `{` and started to process a JSON object + object_start, + /// the parser read `}` and finished processing a JSON object + object_end, + /// the parser read `[` and started to process a JSON array + array_start, + /// the parser read `]` and finished processing a JSON array + array_end, + /// the parser read a key of a value in an object + key, + /// the parser finished reading a JSON value + value +}; + +template<typename BasicJsonType> +using parser_callback_t = + std::function<bool(int /*depth*/, parse_event_t /*event*/, BasicJsonType& /*parsed*/)>; + +/*! +@brief syntax analysis + +This class implements a recursive descent parser. +*/ +template<typename BasicJsonType, typename InputAdapterType> +class parser +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using lexer_t = lexer<BasicJsonType, InputAdapterType>; + using token_type = typename lexer_t::token_type; + + public: + /// a parser reading from an input adapter + explicit parser(InputAdapterType&& adapter, + const parser_callback_t<BasicJsonType> cb = nullptr, + const bool allow_exceptions_ = true, + const bool skip_comments = false) + : callback(cb) + , m_lexer(std::move(adapter), skip_comments) + , allow_exceptions(allow_exceptions_) + { + // read first token + get_token(); + } + + /*! + @brief public parser interface + + @param[in] strict whether to expect the last token to be EOF + @param[in,out] result parsed JSON value + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse(const bool strict, BasicJsonType& result) + { + if (callback) + { + json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions); + sax_parse_internal(&sdp); + + // in strict mode, input must be completely read + if (strict && (get_token() != token_type::end_of_input)) + { + sdp.parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::end_of_input, "value"), nullptr)); + } + + // in case of an error, return discarded value + if (sdp.is_errored()) + { + result = value_t::discarded; + return; + } + + // set top-level value to null if it was discarded by the callback + // function + if (result.is_discarded()) + { + result = nullptr; + } + } + else + { + json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions); + sax_parse_internal(&sdp); + + // in strict mode, input must be completely read + if (strict && (get_token() != token_type::end_of_input)) + { + sdp.parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); + } + + // in case of an error, return discarded value + if (sdp.is_errored()) + { + result = value_t::discarded; + return; + } + } + + result.assert_invariant(); + } + + /*! + @brief public accept interface + + @param[in] strict whether to expect the last token to be EOF + @return whether the input is a proper JSON text + */ + bool accept(const bool strict = true) + { + json_sax_acceptor<BasicJsonType> sax_acceptor; + return sax_parse(&sax_acceptor, strict); + } + + template<typename SAX> + JSON_HEDLEY_NON_NULL(2) + bool sax_parse(SAX* sax, const bool strict = true) + { + (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; + const bool result = sax_parse_internal(sax); + + // strict mode: next byte must be EOF + if (result && strict && (get_token() != token_type::end_of_input)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); + } + + return result; + } + + private: + template<typename SAX> + JSON_HEDLEY_NON_NULL(2) + bool sax_parse_internal(SAX* sax) + { + // stack to remember the hierarchy of structured values we are parsing + // true = array; false = object + std::vector<bool> states; + // value to avoid a goto (see comment where set to true) + bool skip_to_state_evaluation = false; + + while (true) + { + if (!skip_to_state_evaluation) + { + // invariant: get_token() was called before each iteration + switch (last_token) + { + case token_type::begin_object: + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast<std::size_t>(-1)))) + { + return false; + } + + // closing } -> we are done + if (get_token() == token_type::end_object) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_object())) + { + return false; + } + break; + } + + // parse key + if (JSON_HEDLEY_UNLIKELY(last_token != token_type::value_string)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), nullptr)); + } + if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string()))) + { + return false; + } + + // parse separator (:) + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), nullptr)); + } + + // remember we are now inside an object + states.push_back(false); + + // parse values + get_token(); + continue; + } + + case token_type::begin_array: + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast<std::size_t>(-1)))) + { + return false; + } + + // closing ] -> we are done + if (get_token() == token_type::end_array) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_array())) + { + return false; + } + break; + } + + // remember we are now inside an array + states.push_back(true); + + // parse values (no need to call get_token) + continue; + } + + case token_type::value_float: + { + const auto res = m_lexer.get_number_float(); + + if (JSON_HEDLEY_UNLIKELY(!std::isfinite(res))) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + out_of_range::create(406, concat("number overflow parsing '", m_lexer.get_token_string(), '\''), nullptr)); + } + + if (JSON_HEDLEY_UNLIKELY(!sax->number_float(res, m_lexer.get_string()))) + { + return false; + } + + break; + } + + case token_type::literal_false: + { + if (JSON_HEDLEY_UNLIKELY(!sax->boolean(false))) + { + return false; + } + break; + } + + case token_type::literal_null: + { + if (JSON_HEDLEY_UNLIKELY(!sax->null())) + { + return false; + } + break; + } + + case token_type::literal_true: + { + if (JSON_HEDLEY_UNLIKELY(!sax->boolean(true))) + { + return false; + } + break; + } + + case token_type::value_integer: + { + if (JSON_HEDLEY_UNLIKELY(!sax->number_integer(m_lexer.get_number_integer()))) + { + return false; + } + break; + } + + case token_type::value_string: + { + if (JSON_HEDLEY_UNLIKELY(!sax->string(m_lexer.get_string()))) + { + return false; + } + break; + } + + case token_type::value_unsigned: + { + if (JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(m_lexer.get_number_unsigned()))) + { + return false; + } + break; + } + + case token_type::parse_error: + { + // using "uninitialized" to avoid "expected" message + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::uninitialized, "value"), nullptr)); + } + case token_type::end_of_input: + { + if (JSON_HEDLEY_UNLIKELY(m_lexer.get_position().chars_read_total == 1)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + "attempting to parse an empty input; check that your input string or stream contains the expected JSON", nullptr)); + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::literal_or_value, "value"), nullptr)); + } + case token_type::uninitialized: + case token_type::end_array: + case token_type::end_object: + case token_type::name_separator: + case token_type::value_separator: + case token_type::literal_or_value: + default: // the last token was unexpected + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::literal_or_value, "value"), nullptr)); + } + } + } + else + { + skip_to_state_evaluation = false; + } + + // we reached this line after we successfully parsed a value + if (states.empty()) + { + // empty stack: we reached the end of the hierarchy: done + return true; + } + + if (states.back()) // array + { + // comma -> next value + if (get_token() == token_type::value_separator) + { + // parse a new value + get_token(); + continue; + } + + // closing ] + if (JSON_HEDLEY_LIKELY(last_token == token_type::end_array)) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_array())) + { + return false; + } + + // We are done with this array. Before we can parse a + // new value, we need to evaluate the new state first. + // By setting skip_to_state_evaluation to false, we + // are effectively jumping to the beginning of this if. + JSON_ASSERT(!states.empty()); + states.pop_back(); + skip_to_state_evaluation = true; + continue; + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_array, "array"), nullptr)); + } + + // states.back() is false -> object + + // comma -> next value + if (get_token() == token_type::value_separator) + { + // parse key + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::value_string)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), nullptr)); + } + + if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string()))) + { + return false; + } + + // parse separator (:) + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), nullptr)); + } + + // parse values + get_token(); + continue; + } + + // closing } + if (JSON_HEDLEY_LIKELY(last_token == token_type::end_object)) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_object())) + { + return false; + } + + // We are done with this object. Before we can parse a + // new value, we need to evaluate the new state first. + // By setting skip_to_state_evaluation to false, we + // are effectively jumping to the beginning of this if. + JSON_ASSERT(!states.empty()); + states.pop_back(); + skip_to_state_evaluation = true; + continue; + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_object, "object"), nullptr)); + } + } + + /// get next token from lexer + token_type get_token() + { + return last_token = m_lexer.scan(); + } + + std::string exception_message(const token_type expected, const std::string& context) + { + std::string error_msg = "syntax error "; + + if (!context.empty()) + { + error_msg += concat("while parsing ", context, ' '); + } + + error_msg += "- "; + + if (last_token == token_type::parse_error) + { + error_msg += concat(m_lexer.get_error_message(), "; last read: '", + m_lexer.get_token_string(), '\''); + } + else + { + error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); + } + + if (expected != token_type::uninitialized) + { + error_msg += concat("; expected ", lexer_t::token_type_name(expected)); + } + + return error_msg; + } + + private: + /// callback function + const parser_callback_t<BasicJsonType> callback = nullptr; + /// the type of the last read token + token_type last_token = token_type::uninitialized; + /// the lexer + lexer_t m_lexer; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/iterators/internal_iterator.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// #include <nlohmann/detail/abi_macros.hpp> + +// #include <nlohmann/detail/iterators/primitive_iterator.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstddef> // ptrdiff_t +#include <limits> // numeric_limits + +// #include <nlohmann/detail/macro_scope.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/* +@brief an iterator for primitive JSON types + +This class models an iterator for primitive JSON types (boolean, number, +string). It's only purpose is to allow the iterator/const_iterator classes +to "iterate" over primitive values. Internally, the iterator is modeled by +a `difference_type` variable. Value begin_value (`0`) models the begin, +end_value (`1`) models past the end. +*/ +class primitive_iterator_t +{ + private: + using difference_type = std::ptrdiff_t; + static constexpr difference_type begin_value = 0; + static constexpr difference_type end_value = begin_value + 1; + + JSON_PRIVATE_UNLESS_TESTED: + /// iterator as signed integer type + difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)(); + + public: + constexpr difference_type get_value() const noexcept + { + return m_it; + } + + /// set iterator to a defined beginning + void set_begin() noexcept + { + m_it = begin_value; + } + + /// set iterator to a defined past the end + void set_end() noexcept + { + m_it = end_value; + } + + /// return whether the iterator can be dereferenced + constexpr bool is_begin() const noexcept + { + return m_it == begin_value; + } + + /// return whether the iterator is at end + constexpr bool is_end() const noexcept + { + return m_it == end_value; + } + + friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it == rhs.m_it; + } + + friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it < rhs.m_it; + } + + primitive_iterator_t operator+(difference_type n) noexcept + { + auto result = *this; + result += n; + return result; + } + + friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it - rhs.m_it; + } + + primitive_iterator_t& operator++() noexcept + { + ++m_it; + return *this; + } + + primitive_iterator_t operator++(int)& noexcept // NOLINT(cert-dcl21-cpp) + { + auto result = *this; + ++m_it; + return result; + } + + primitive_iterator_t& operator--() noexcept + { + --m_it; + return *this; + } + + primitive_iterator_t operator--(int)& noexcept // NOLINT(cert-dcl21-cpp) + { + auto result = *this; + --m_it; + return result; + } + + primitive_iterator_t& operator+=(difference_type n) noexcept + { + m_it += n; + return *this; + } + + primitive_iterator_t& operator-=(difference_type n) noexcept + { + m_it -= n; + return *this; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief an iterator value + +@note This structure could easily be a union, but MSVC currently does not allow +unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. +*/ +template<typename BasicJsonType> struct internal_iterator +{ + /// iterator for JSON objects + typename BasicJsonType::object_t::iterator object_iterator {}; + /// iterator for JSON arrays + typename BasicJsonType::array_t::iterator array_iterator {}; + /// generic iterator for all other types + primitive_iterator_t primitive_iterator {}; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/iterators/iter_impl.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next +#include <type_traits> // conditional, is_const, remove_const + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/iterators/internal_iterator.hpp> + +// #include <nlohmann/detail/iterators/primitive_iterator.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// forward declare, to be able to friend it later on +template<typename IteratorType> class iteration_proxy; +template<typename IteratorType> class iteration_proxy_value; + +/*! +@brief a template for a bidirectional iterator for the @ref basic_json class +This class implements a both iterators (iterator and const_iterator) for the +@ref basic_json class. +@note An iterator is called *initialized* when a pointer to a JSON value has + been set (e.g., by a constructor or a copy assignment). If the iterator is + default-constructed, it is *uninitialized* and most methods are undefined. + **The library uses assertions to detect calls on uninitialized iterators.** +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +@since version 1.0.0, simplified in version 2.0.9, change to bidirectional + iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593) +*/ +template<typename BasicJsonType> +class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions) +{ + /// the iterator with BasicJsonType of different const-ness + using other_iter_impl = iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>; + /// allow basic_json to access private members + friend other_iter_impl; + friend BasicJsonType; + friend iteration_proxy<iter_impl>; + friend iteration_proxy_value<iter_impl>; + + using object_t = typename BasicJsonType::object_t; + using array_t = typename BasicJsonType::array_t; + // make sure BasicJsonType is basic_json or const basic_json + static_assert(is_basic_json<typename std::remove_const<BasicJsonType>::type>::value, + "iter_impl only accepts (const) basic_json"); + // superficial check for the LegacyBidirectionalIterator named requirement + static_assert(std::is_base_of<std::bidirectional_iterator_tag, std::bidirectional_iterator_tag>::value + && std::is_base_of<std::bidirectional_iterator_tag, typename std::iterator_traits<typename array_t::iterator>::iterator_category>::value, + "basic_json iterator assumes array and object type iterators satisfy the LegacyBidirectionalIterator named requirement."); + + public: + /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. + /// The C++ Standard has never required user-defined iterators to derive from std::iterator. + /// A user-defined iterator should provide publicly accessible typedefs named + /// iterator_category, value_type, difference_type, pointer, and reference. + /// Note that value_type is required to be non-const, even for constant iterators. + using iterator_category = std::bidirectional_iterator_tag; + + /// the type of the values when the iterator is dereferenced + using value_type = typename BasicJsonType::value_type; + /// a type to represent differences between iterators + using difference_type = typename BasicJsonType::difference_type; + /// defines a pointer to the type iterated over (value_type) + using pointer = typename std::conditional<std::is_const<BasicJsonType>::value, + typename BasicJsonType::const_pointer, + typename BasicJsonType::pointer>::type; + /// defines a reference to the type iterated over (value_type) + using reference = + typename std::conditional<std::is_const<BasicJsonType>::value, + typename BasicJsonType::const_reference, + typename BasicJsonType::reference>::type; + + iter_impl() = default; + ~iter_impl() = default; + iter_impl(iter_impl&&) noexcept = default; + iter_impl& operator=(iter_impl&&) noexcept = default; + + /*! + @brief constructor for a given JSON instance + @param[in] object pointer to a JSON object for this iterator + @pre object != nullptr + @post The iterator is initialized; i.e. `m_object != nullptr`. + */ + explicit iter_impl(pointer object) noexcept : m_object(object) + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + m_it.object_iterator = typename object_t::iterator(); + break; + } + + case value_t::array: + { + m_it.array_iterator = typename array_t::iterator(); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator = primitive_iterator_t(); + break; + } + } + } + + /*! + @note The conventional copy constructor and copy assignment are implicitly + defined. Combined with the following converting constructor and + assignment, they support: (1) copy from iterator to iterator, (2) + copy from const iterator to const iterator, and (3) conversion from + iterator to const iterator. However conversion from const iterator + to iterator is not defined. + */ + + /*! + @brief const copy constructor + @param[in] other const iterator to copy from + @note This copy constructor had to be defined explicitly to circumvent a bug + occurring on msvc v19.0 compiler (VS 2015) debug build. For more + information refer to: https://github.com/nlohmann/json/issues/1608 + */ + iter_impl(const iter_impl<const BasicJsonType>& other) noexcept + : m_object(other.m_object), m_it(other.m_it) + {} + + /*! + @brief converting assignment + @param[in] other const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl<const BasicJsonType>& other) noexcept + { + if (&other != this) + { + m_object = other.m_object; + m_it = other.m_it; + } + return *this; + } + + /*! + @brief converting constructor + @param[in] other non-const iterator to copy from + @note It is not checked whether @a other is initialized. + */ + iter_impl(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept + : m_object(other.m_object), m_it(other.m_it) + {} + + /*! + @brief converting assignment + @param[in] other non-const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept // NOLINT(cert-oop54-cpp) + { + m_object = other.m_object; + m_it = other.m_it; + return *this; + } + + JSON_PRIVATE_UNLESS_TESTED: + /*! + @brief set the iterator to the first value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_begin() noexcept + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_data.m_value.object->begin(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_data.m_value.array->begin(); + break; + } + + case value_t::null: + { + // set to end so begin()==end() is true: null is empty + m_it.primitive_iterator.set_end(); + break; + } + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator.set_begin(); + break; + } + } + } + + /*! + @brief set the iterator past the last value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_end() noexcept + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_data.m_value.object->end(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_data.m_value.array->end(); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator.set_end(); + break; + } + } + } + + public: + /*! + @brief return a reference to the value pointed to by the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator*() const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end()); + return m_it.object_iterator->second; + } + + case value_t::array: + { + JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end()); + return *m_it.array_iterator; + } + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + } + } + } + + /*! + @brief dereference the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + pointer operator->() const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end()); + return &(m_it.object_iterator->second); + } + + case value_t::array: + { + JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end()); + return &*m_it.array_iterator; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) + { + return m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + } + } + } + + /*! + @brief post-increment (it++) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator++(int)& // NOLINT(cert-dcl21-cpp) + { + auto result = *this; + ++(*this); + return result; + } + + /*! + @brief pre-increment (++it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator++() + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, 1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, 1); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + ++m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief post-decrement (it--) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator--(int)& // NOLINT(cert-dcl21-cpp) + { + auto result = *this; + --(*this); + return result; + } + + /*! + @brief pre-decrement (--it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator--() + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, -1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, -1); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + --m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief comparison: equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + template < typename IterImpl, detail::enable_if_t < (std::is_same<IterImpl, iter_impl>::value || std::is_same<IterImpl, other_iter_impl>::value), std::nullptr_t > = nullptr > + bool operator==(const IterImpl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); + } + + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + return (m_it.object_iterator == other.m_it.object_iterator); + + case value_t::array: + return (m_it.array_iterator == other.m_it.array_iterator); + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return (m_it.primitive_iterator == other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: not equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + template < typename IterImpl, detail::enable_if_t < (std::is_same<IterImpl, iter_impl>::value || std::is_same<IterImpl, other_iter_impl>::value), std::nullptr_t > = nullptr > + bool operator!=(const IterImpl& other) const + { + return !operator==(other); + } + + /*! + @brief comparison: smaller + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); + } + + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(213, "cannot compare order of object iterators", m_object)); + + case value_t::array: + return (m_it.array_iterator < other.m_it.array_iterator); + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return (m_it.primitive_iterator < other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: less than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<=(const iter_impl& other) const + { + return !other.operator < (*this); + } + + /*! + @brief comparison: greater than + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>(const iter_impl& other) const + { + return !operator<=(other); + } + + /*! + @brief comparison: greater than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>=(const iter_impl& other) const + { + return !operator<(other); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator+=(difference_type i) + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators", m_object)); + + case value_t::array: + { + std::advance(m_it.array_iterator, i); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator += i; + break; + } + } + + return *this; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator-=(difference_type i) + { + return operator+=(-i); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator+(difference_type i) const + { + auto result = *this; + result += i; + return result; + } + + /*! + @brief addition of distance and iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + friend iter_impl operator+(difference_type i, const iter_impl& it) + { + auto result = it; + result += i; + return result; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator-(difference_type i) const + { + auto result = *this; + result -= i; + return result; + } + + /*! + @brief return difference + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + difference_type operator-(const iter_impl& other) const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators", m_object)); + + case value_t::array: + return m_it.array_iterator - other.m_it.array_iterator; + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return m_it.primitive_iterator - other.m_it.primitive_iterator; + } + } + + /*! + @brief access to successor + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator[](difference_type n) const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators", m_object)); + + case value_t::array: + return *std::next(m_it.array_iterator, n); + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.get_value() == -n)) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + } + } + } + + /*! + @brief return the key of an object iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + const typename object_t::key_type& key() const + { + JSON_ASSERT(m_object != nullptr); + + if (JSON_HEDLEY_LIKELY(m_object->is_object())) + { + return m_it.object_iterator->first; + } + + JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object)); + } + + /*! + @brief return the value of an iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference value() const + { + return operator*(); + } + + JSON_PRIVATE_UNLESS_TESTED: + /// associated JSON instance + pointer m_object = nullptr; + /// the actual iterator of the associated instance + internal_iterator<typename std::remove_const<BasicJsonType>::type> m_it {}; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/iterators/iteration_proxy.hpp> + +// #include <nlohmann/detail/iterators/json_reverse_iterator.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <cstddef> // ptrdiff_t +#include <iterator> // reverse_iterator +#include <utility> // declval + +// #include <nlohmann/detail/abi_macros.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +////////////////////// +// reverse_iterator // +////////////////////// + +/*! +@brief a template for a reverse iterator class + +@tparam Base the base iterator type to reverse. Valid types are @ref +iterator (to create @ref reverse_iterator) and @ref const_iterator (to +create @ref const_reverse_iterator). + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +- [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator): + It is possible to write to the pointed-to element (only if @a Base is + @ref iterator). + +@since version 1.0.0 +*/ +template<typename Base> +class json_reverse_iterator : public std::reverse_iterator<Base> +{ + public: + using difference_type = std::ptrdiff_t; + /// shortcut to the reverse iterator adapter + using base_iterator = std::reverse_iterator<Base>; + /// the reference type for the pointed-to element + using reference = typename Base::reference; + + /// create reverse iterator from iterator + explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept + : base_iterator(it) {} + + /// create reverse iterator from base class + explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} + + /// post-increment (it++) + json_reverse_iterator operator++(int)& // NOLINT(cert-dcl21-cpp) + { + return static_cast<json_reverse_iterator>(base_iterator::operator++(1)); + } + + /// pre-increment (++it) + json_reverse_iterator& operator++() + { + return static_cast<json_reverse_iterator&>(base_iterator::operator++()); + } + + /// post-decrement (it--) + json_reverse_iterator operator--(int)& // NOLINT(cert-dcl21-cpp) + { + return static_cast<json_reverse_iterator>(base_iterator::operator--(1)); + } + + /// pre-decrement (--it) + json_reverse_iterator& operator--() + { + return static_cast<json_reverse_iterator&>(base_iterator::operator--()); + } + + /// add to iterator + json_reverse_iterator& operator+=(difference_type i) + { + return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i)); + } + + /// add to iterator + json_reverse_iterator operator+(difference_type i) const + { + return static_cast<json_reverse_iterator>(base_iterator::operator+(i)); + } + + /// subtract from iterator + json_reverse_iterator operator-(difference_type i) const + { + return static_cast<json_reverse_iterator>(base_iterator::operator-(i)); + } + + /// return difference + difference_type operator-(const json_reverse_iterator& other) const + { + return base_iterator(*this) - base_iterator(other); + } + + /// access to successor + reference operator[](difference_type n) const + { + return *(this->operator+(n)); + } + + /// return the key of an object iterator + auto key() const -> decltype(std::declval<Base>().key()) + { + auto it = --this->base(); + return it.key(); + } + + /// return the value of an iterator + reference value() const + { + auto it = --this->base(); + return it.operator * (); + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/iterators/primitive_iterator.hpp> + +// #include <nlohmann/detail/json_custom_base_class.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <type_traits> // conditional, is_same + +// #include <nlohmann/detail/abi_macros.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief Default base class of the @ref basic_json class. + +So that the correct implementations of the copy / move ctors / assign operators +of @ref basic_json do not require complex case distinctions +(no base class / custom base class used as customization point), +@ref basic_json always has a base class. +By default, this class is used because it is empty and thus has no effect +on the behavior of @ref basic_json. +*/ +struct json_default_base {}; + +template<class T> +using json_base_class = typename std::conditional < + std::is_same<T, void>::value, + json_default_base, + T + >::type; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/json_pointer.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <algorithm> // all_of +#include <cctype> // isdigit +#include <cerrno> // errno, ERANGE +#include <cstdlib> // strtoull +#ifndef JSON_NO_IO + #include <iosfwd> // ostream +#endif // JSON_NO_IO +#include <limits> // max +#include <numeric> // accumulate +#include <string> // string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/string_concat.hpp> + +// #include <nlohmann/detail/string_escape.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document +/// @sa https://json.nlohmann.me/api/json_pointer/ +template<typename RefStringType> +class json_pointer +{ + // allow basic_json to access private members + NLOHMANN_BASIC_JSON_TPL_DECLARATION + friend class basic_json; + + template<typename> + friend class json_pointer; + + template<typename T> + struct string_t_helper + { + using type = T; + }; + + NLOHMANN_BASIC_JSON_TPL_DECLARATION + struct string_t_helper<NLOHMANN_BASIC_JSON_TPL> + { + using type = StringType; + }; + + public: + // for backwards compatibility accept BasicJsonType + using string_t = typename string_t_helper<RefStringType>::type; + + /// @brief create JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/json_pointer/ + explicit json_pointer(const string_t& s = "") + : reference_tokens(split(s)) + {} + + /// @brief return a string representation of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/to_string/ + string_t to_string() const + { + return std::accumulate(reference_tokens.begin(), reference_tokens.end(), + string_t{}, + [](const string_t& a, const string_t& b) + { + return detail::concat(a, '/', detail::escape(b)); + }); + } + + /// @brief return a string representation of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_string/ + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, to_string()) + operator string_t() const + { + return to_string(); + } + +#ifndef JSON_NO_IO + /// @brief write string representation of the JSON pointer to stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/ + friend std::ostream& operator<<(std::ostream& o, const json_pointer& ptr) + { + o << ptr.to_string(); + return o; + } +#endif + + /// @brief append another JSON pointer at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(const json_pointer& ptr) + { + reference_tokens.insert(reference_tokens.end(), + ptr.reference_tokens.begin(), + ptr.reference_tokens.end()); + return *this; + } + + /// @brief append an unescaped reference token at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(string_t token) + { + push_back(std::move(token)); + return *this; + } + + /// @brief append an array index at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(std::size_t array_idx) + { + return *this /= std::to_string(array_idx); + } + + /// @brief create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, + const json_pointer& rhs) + { + return json_pointer(lhs) /= rhs; + } + + /// @brief create a new JSON pointer by appending the unescaped token at the end of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, string_t token) // NOLINT(performance-unnecessary-value-param) + { + return json_pointer(lhs) /= std::move(token); + } + + /// @brief create a new JSON pointer by appending the array-index-token at the end of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, std::size_t array_idx) + { + return json_pointer(lhs) /= array_idx; + } + + /// @brief returns the parent of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/parent_pointer/ + json_pointer parent_pointer() const + { + if (empty()) + { + return *this; + } + + json_pointer res = *this; + res.pop_back(); + return res; + } + + /// @brief remove last reference token + /// @sa https://json.nlohmann.me/api/json_pointer/pop_back/ + void pop_back() + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr)); + } + + reference_tokens.pop_back(); + } + + /// @brief return last reference token + /// @sa https://json.nlohmann.me/api/json_pointer/back/ + const string_t& back() const + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr)); + } + + return reference_tokens.back(); + } + + /// @brief append an unescaped token at the end of the reference pointer + /// @sa https://json.nlohmann.me/api/json_pointer/push_back/ + void push_back(const string_t& token) + { + reference_tokens.push_back(token); + } + + /// @brief append an unescaped token at the end of the reference pointer + /// @sa https://json.nlohmann.me/api/json_pointer/push_back/ + void push_back(string_t&& token) + { + reference_tokens.push_back(std::move(token)); + } + + /// @brief return whether pointer points to the root document + /// @sa https://json.nlohmann.me/api/json_pointer/empty/ + bool empty() const noexcept + { + return reference_tokens.empty(); + } + + private: + /*! + @param[in] s reference token to be converted into an array index + + @return integer representation of @a s + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index begins not with a digit + @throw out_of_range.404 if string @a s could not be converted to an integer + @throw out_of_range.410 if an array index exceeds size_type + */ + template<typename BasicJsonType> + static typename BasicJsonType::size_type array_index(const string_t& s) + { + using size_type = typename BasicJsonType::size_type; + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_HEDLEY_UNLIKELY(s.size() > 1 && s[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, detail::concat("array index '", s, "' must not begin with '0'"), nullptr)); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_HEDLEY_UNLIKELY(s.size() > 1 && !(s[0] >= '1' && s[0] <= '9'))) + { + JSON_THROW(detail::parse_error::create(109, 0, detail::concat("array index '", s, "' is not a number"), nullptr)); + } + + const char* p = s.c_str(); + char* p_end = nullptr; + errno = 0; // strtoull doesn't reset errno + const unsigned long long res = std::strtoull(p, &p_end, 10); // NOLINT(runtime/int) + if (p == p_end // invalid input or empty string + || errno == ERANGE // out of range + || JSON_HEDLEY_UNLIKELY(static_cast<std::size_t>(p_end - p) != s.size())) // incomplete read + { + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", s, "'"), nullptr)); + } + + // only triggered on special platforms (like 32bit), see also + // https://github.com/nlohmann/json/pull/2203 + if (res >= static_cast<unsigned long long>((std::numeric_limits<size_type>::max)())) // NOLINT(runtime/int) + { + JSON_THROW(detail::out_of_range::create(410, detail::concat("array index ", s, " exceeds size_type"), nullptr)); // LCOV_EXCL_LINE + } + + return static_cast<size_type>(res); + } + + JSON_PRIVATE_UNLESS_TESTED: + json_pointer top() const + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr)); + } + + json_pointer result = *this; + result.reference_tokens = {reference_tokens[0]}; + return result; + } + + private: + /*! + @brief create and return a reference to the pointed to value + + @complexity Linear in the number of reference tokens. + + @throw parse_error.109 if array index is not a number + @throw type_error.313 if value cannot be unflattened + */ + template<typename BasicJsonType> + BasicJsonType& get_and_create(BasicJsonType& j) const + { + auto* result = &j; + + // in case no reference tokens exist, return a reference to the JSON value + // j which will be overwritten by a primitive value + for (const auto& reference_token : reference_tokens) + { + switch (result->type()) + { + case detail::value_t::null: + { + if (reference_token == "0") + { + // start a new array if reference token is 0 + result = &result->operator[](0); + } + else + { + // start a new object otherwise + result = &result->operator[](reference_token); + } + break; + } + + case detail::value_t::object: + { + // create an entry in the object + result = &result->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // create an entry in the array + result = &result->operator[](array_index<BasicJsonType>(reference_token)); + break; + } + + /* + The following code is only reached if there exists a reference + token _and_ the current value is primitive. In this case, we have + an error situation, because primitive values may only occur as + single value; that is, with an empty list of reference tokens. + */ + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::type_error::create(313, "invalid value to unflatten", &j)); + } + } + + return *result; + } + + /*! + @brief return a reference to the pointed to value + + @note This version does not throw if a value is not present, but tries to + create nested values instead. For instance, calling this function + with pointer `"/this/that"` on a null value is equivalent to calling + `operator[]("this").operator[]("that")` on that value, effectively + changing the null value to an object. + + @param[in] ptr a JSON value + + @return reference to the JSON value pointed to by the JSON pointer + + @complexity Linear in the length of the JSON pointer. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + template<typename BasicJsonType> + BasicJsonType& get_unchecked(BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + // convert null values to arrays or objects before continuing + if (ptr->is_null()) + { + // check if reference token is a number + const bool nums = + std::all_of(reference_token.begin(), reference_token.end(), + [](const unsigned char x) + { + return std::isdigit(x); + }); + + // change value to array for numbers or "-" or to object otherwise + *ptr = (nums || reference_token == "-") + ? detail::value_t::array + : detail::value_t::object; + } + + switch (ptr->type()) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (reference_token == "-") + { + // explicitly treat "-" as index beyond the end + ptr = &ptr->operator[](ptr->m_data.m_value.array->size()); + } + else + { + // convert array index to number; unchecked access + ptr = &ptr->operator[](array_index<BasicJsonType>(reference_token)); + } + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + template<typename BasicJsonType> + BasicJsonType& get_checked(BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, detail::concat( + "array index '-' (", std::to_string(ptr->m_data.m_value.array->size()), + ") is out of range"), ptr)); + } + + // note: at performs range check + ptr = &ptr->at(array_index<BasicJsonType>(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr)); + } + } + + return *ptr; + } + + /*! + @brief return a const reference to the pointed to value + + @param[in] ptr a JSON value + + @return const reference to the JSON value pointed to by the JSON + pointer + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + template<typename BasicJsonType> + const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" cannot be used for const access + JSON_THROW(detail::out_of_range::create(402, detail::concat("array index '-' (", std::to_string(ptr->m_data.m_value.array->size()), ") is out of range"), ptr)); + } + + // use unchecked array access + ptr = &ptr->operator[](array_index<BasicJsonType>(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + template<typename BasicJsonType> + const BasicJsonType& get_checked(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, detail::concat( + "array index '-' (", std::to_string(ptr->m_data.m_value.array->size()), + ") is out of range"), ptr)); + } + + // note: at performs range check + ptr = &ptr->at(array_index<BasicJsonType>(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + */ + template<typename BasicJsonType> + bool contains(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + if (!ptr->contains(reference_token)) + { + // we did not find the key in the object + return false; + } + + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + return false; + } + if (JSON_HEDLEY_UNLIKELY(reference_token.size() == 1 && !("0" <= reference_token && reference_token <= "9"))) + { + // invalid char + return false; + } + if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1)) + { + if (JSON_HEDLEY_UNLIKELY(!('1' <= reference_token[0] && reference_token[0] <= '9'))) + { + // first char should be between '1' and '9' + return false; + } + for (std::size_t i = 1; i < reference_token.size(); i++) + { + if (JSON_HEDLEY_UNLIKELY(!('0' <= reference_token[i] && reference_token[i] <= '9'))) + { + // other char should be between '0' and '9' + return false; + } + } + } + + const auto idx = array_index<BasicJsonType>(reference_token); + if (idx >= ptr->size()) + { + // index out of range + return false; + } + + ptr = &ptr->operator[](idx); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + { + // we do not expect primitive values if there is still a + // reference token to process + return false; + } + } + } + + // no reference token left means we found a primitive value + return true; + } + + /*! + @brief split the string input to reference tokens + + @note This function is only called by the json_pointer constructor. + All exceptions below are documented there. + + @throw parse_error.107 if the pointer is not empty or begins with '/' + @throw parse_error.108 if character '~' is not followed by '0' or '1' + */ + static std::vector<string_t> split(const string_t& reference_string) + { + std::vector<string_t> result; + + // special case: empty reference string -> no reference tokens + if (reference_string.empty()) + { + return result; + } + + // check if nonempty reference string begins with slash + if (JSON_HEDLEY_UNLIKELY(reference_string[0] != '/')) + { + JSON_THROW(detail::parse_error::create(107, 1, detail::concat("JSON pointer must be empty or begin with '/' - was: '", reference_string, "'"), nullptr)); + } + + // extract the reference tokens: + // - slash: position of the last read slash (or end of string) + // - start: position after the previous slash + for ( + // search for the first slash after the first character + std::size_t slash = reference_string.find_first_of('/', 1), + // set the beginning of the first reference token + start = 1; + // we can stop if start == 0 (if slash == string_t::npos) + start != 0; + // set the beginning of the next reference token + // (will eventually be 0 if slash == string_t::npos) + start = (slash == string_t::npos) ? 0 : slash + 1, + // find next slash + slash = reference_string.find_first_of('/', start)) + { + // use the text between the beginning of the reference token + // (start) and the last slash (slash). + auto reference_token = reference_string.substr(start, slash - start); + + // check reference tokens are properly escaped + for (std::size_t pos = reference_token.find_first_of('~'); + pos != string_t::npos; + pos = reference_token.find_first_of('~', pos + 1)) + { + JSON_ASSERT(reference_token[pos] == '~'); + + // ~ must be followed by 0 or 1 + if (JSON_HEDLEY_UNLIKELY(pos == reference_token.size() - 1 || + (reference_token[pos + 1] != '0' && + reference_token[pos + 1] != '1'))) + { + JSON_THROW(detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'", nullptr)); + } + } + + // finally, store the reference token + detail::unescape(reference_token); + result.push_back(reference_token); + } + + return result; + } + + private: + /*! + @param[in] reference_string the reference string to the current value + @param[in] value the value to consider + @param[in,out] result the result object to insert values to + + @note Empty objects or arrays are flattened to `null`. + */ + template<typename BasicJsonType> + static void flatten(const string_t& reference_string, + const BasicJsonType& value, + BasicJsonType& result) + { + switch (value.type()) + { + case detail::value_t::array: + { + if (value.m_data.m_value.array->empty()) + { + // flatten empty array as null + result[reference_string] = nullptr; + } + else + { + // iterate array and use index as reference string + for (std::size_t i = 0; i < value.m_data.m_value.array->size(); ++i) + { + flatten(detail::concat(reference_string, '/', std::to_string(i)), + value.m_data.m_value.array->operator[](i), result); + } + } + break; + } + + case detail::value_t::object: + { + if (value.m_data.m_value.object->empty()) + { + // flatten empty object as null + result[reference_string] = nullptr; + } + else + { + // iterate object and use keys as reference string + for (const auto& element : *value.m_data.m_value.object) + { + flatten(detail::concat(reference_string, '/', detail::escape(element.first)), element.second, result); + } + } + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + { + // add primitive value with its reference string + result[reference_string] = value; + break; + } + } + } + + /*! + @param[in] value flattened JSON + + @return unflattened JSON + + @throw parse_error.109 if array index is not a number + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + @throw type_error.313 if value cannot be unflattened + */ + template<typename BasicJsonType> + static BasicJsonType + unflatten(const BasicJsonType& value) + { + if (JSON_HEDLEY_UNLIKELY(!value.is_object())) + { + JSON_THROW(detail::type_error::create(314, "only objects can be unflattened", &value)); + } + + BasicJsonType result; + + // iterate the JSON object values + for (const auto& element : *value.m_data.m_value.object) + { + if (JSON_HEDLEY_UNLIKELY(!element.second.is_primitive())) + { + JSON_THROW(detail::type_error::create(315, "values in object must be primitive", &element.second)); + } + + // assign value to reference pointed to by JSON pointer; Note that if + // the JSON pointer is "" (i.e., points to the whole value), function + // get_and_create returns a reference to result itself. An assignment + // will then create a primitive value. + json_pointer(element.first).get_and_create(result) = element.second; + } + + return result; + } + + // can't use conversion operator because of ambiguity + json_pointer<string_t> convert() const& + { + json_pointer<string_t> result; + result.reference_tokens = reference_tokens; + return result; + } + + json_pointer<string_t> convert()&& + { + json_pointer<string_t> result; + result.reference_tokens = std::move(reference_tokens); + return result; + } + + public: +#if JSON_HAS_THREE_WAY_COMPARISON + /// @brief compares two JSON pointers for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + template<typename RefStringTypeRhs> + bool operator==(const json_pointer<RefStringTypeRhs>& rhs) const noexcept + { + return reference_tokens == rhs.reference_tokens; + } + + /// @brief compares JSON pointer and string for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer)) + bool operator==(const string_t& rhs) const + { + return *this == json_pointer(rhs); + } + + /// @brief 3-way compares two JSON pointers + template<typename RefStringTypeRhs> + std::strong_ordering operator<=>(const json_pointer<RefStringTypeRhs>& rhs) const noexcept // *NOPAD* + { + return reference_tokens <=> rhs.reference_tokens; // *NOPAD* + } +#else + /// @brief compares two JSON pointers for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + template<typename RefStringTypeLhs, typename RefStringTypeRhs> + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator==(const json_pointer<RefStringTypeLhs>& lhs, + const json_pointer<RefStringTypeRhs>& rhs) noexcept; + + /// @brief compares JSON pointer and string for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + template<typename RefStringTypeLhs, typename StringType> + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator==(const json_pointer<RefStringTypeLhs>& lhs, + const StringType& rhs); + + /// @brief compares string and JSON pointer for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + template<typename RefStringTypeRhs, typename StringType> + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator==(const StringType& lhs, + const json_pointer<RefStringTypeRhs>& rhs); + + /// @brief compares two JSON pointers for inequality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_ne/ + template<typename RefStringTypeLhs, typename RefStringTypeRhs> + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator!=(const json_pointer<RefStringTypeLhs>& lhs, + const json_pointer<RefStringTypeRhs>& rhs) noexcept; + + /// @brief compares JSON pointer and string for inequality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_ne/ + template<typename RefStringTypeLhs, typename StringType> + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator!=(const json_pointer<RefStringTypeLhs>& lhs, + const StringType& rhs); + + /// @brief compares string and JSON pointer for inequality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_ne/ + template<typename RefStringTypeRhs, typename StringType> + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator!=(const StringType& lhs, + const json_pointer<RefStringTypeRhs>& rhs); + + /// @brief compares two JSON pointer for less-than + template<typename RefStringTypeLhs, typename RefStringTypeRhs> + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator<(const json_pointer<RefStringTypeLhs>& lhs, + const json_pointer<RefStringTypeRhs>& rhs) noexcept; +#endif + + private: + /// the reference tokens + std::vector<string_t> reference_tokens; +}; + +#if !JSON_HAS_THREE_WAY_COMPARISON +// functions cannot be defined inside class due to ODR violations +template<typename RefStringTypeLhs, typename RefStringTypeRhs> +inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs, + const json_pointer<RefStringTypeRhs>& rhs) noexcept +{ + return lhs.reference_tokens == rhs.reference_tokens; +} + +template<typename RefStringTypeLhs, + typename StringType = typename json_pointer<RefStringTypeLhs>::string_t> +JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer, json_pointer)) +inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs, + const StringType& rhs) +{ + return lhs == json_pointer<RefStringTypeLhs>(rhs); +} + +template<typename RefStringTypeRhs, + typename StringType = typename json_pointer<RefStringTypeRhs>::string_t> +JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer, json_pointer)) +inline bool operator==(const StringType& lhs, + const json_pointer<RefStringTypeRhs>& rhs) +{ + return json_pointer<RefStringTypeRhs>(lhs) == rhs; +} + +template<typename RefStringTypeLhs, typename RefStringTypeRhs> +inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs, + const json_pointer<RefStringTypeRhs>& rhs) noexcept +{ + return !(lhs == rhs); +} + +template<typename RefStringTypeLhs, + typename StringType = typename json_pointer<RefStringTypeLhs>::string_t> +JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator!=(json_pointer, json_pointer)) +inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs, + const StringType& rhs) +{ + return !(lhs == rhs); +} + +template<typename RefStringTypeRhs, + typename StringType = typename json_pointer<RefStringTypeRhs>::string_t> +JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator!=(json_pointer, json_pointer)) +inline bool operator!=(const StringType& lhs, + const json_pointer<RefStringTypeRhs>& rhs) +{ + return !(lhs == rhs); +} + +template<typename RefStringTypeLhs, typename RefStringTypeRhs> +inline bool operator<(const json_pointer<RefStringTypeLhs>& lhs, + const json_pointer<RefStringTypeRhs>& rhs) noexcept +{ + return lhs.reference_tokens < rhs.reference_tokens; +} +#endif + +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/json_ref.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <initializer_list> +#include <utility> + +// #include <nlohmann/detail/abi_macros.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template<typename BasicJsonType> +class json_ref +{ + public: + using value_type = BasicJsonType; + + json_ref(value_type&& value) + : owned_value(std::move(value)) + {} + + json_ref(const value_type& value) + : value_ref(&value) + {} + + json_ref(std::initializer_list<json_ref> init) + : owned_value(init) + {} + + template < + class... Args, + enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 > + json_ref(Args && ... args) + : owned_value(std::forward<Args>(args)...) + {} + + // class should be movable only + json_ref(json_ref&&) noexcept = default; + json_ref(const json_ref&) = delete; + json_ref& operator=(const json_ref&) = delete; + json_ref& operator=(json_ref&&) = delete; + ~json_ref() = default; + + value_type moved_or_copied() const + { + if (value_ref == nullptr) + { + return std::move(owned_value); + } + return *value_ref; + } + + value_type const& operator*() const + { + return value_ref ? *value_ref : owned_value; + } + + value_type const* operator->() const + { + return &** this; + } + + private: + mutable value_type owned_value = nullptr; + value_type const* value_ref = nullptr; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/string_concat.hpp> + +// #include <nlohmann/detail/string_escape.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + +// #include <nlohmann/detail/output/binary_writer.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <algorithm> // reverse +#include <array> // array +#include <map> // map +#include <cmath> // isnan, isinf +#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t +#include <cstring> // memcpy +#include <limits> // numeric_limits +#include <string> // string +#include <utility> // move +#include <vector> // vector + +// #include <nlohmann/detail/input/binary_reader.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/output/output_adapters.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <algorithm> // copy +#include <cstddef> // size_t +#include <iterator> // back_inserter +#include <memory> // shared_ptr, make_shared +#include <string> // basic_string +#include <vector> // vector + +#ifndef JSON_NO_IO + #include <ios> // streamsize + #include <ostream> // basic_ostream +#endif // JSON_NO_IO + +// #include <nlohmann/detail/macro_scope.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// abstract output adapter interface +template<typename CharType> struct output_adapter_protocol +{ + virtual void write_character(CharType c) = 0; + virtual void write_characters(const CharType* s, std::size_t length) = 0; + virtual ~output_adapter_protocol() = default; + + output_adapter_protocol() = default; + output_adapter_protocol(const output_adapter_protocol&) = default; + output_adapter_protocol(output_adapter_protocol&&) noexcept = default; + output_adapter_protocol& operator=(const output_adapter_protocol&) = default; + output_adapter_protocol& operator=(output_adapter_protocol&&) noexcept = default; +}; + +/// a type to simplify interfaces +template<typename CharType> +using output_adapter_t = std::shared_ptr<output_adapter_protocol<CharType>>; + +/// output adapter for byte vectors +template<typename CharType, typename AllocatorType = std::allocator<CharType>> +class output_vector_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_vector_adapter(std::vector<CharType, AllocatorType>& vec) noexcept + : v(vec) + {} + + void write_character(CharType c) override + { + v.push_back(c); + } + + JSON_HEDLEY_NON_NULL(2) + void write_characters(const CharType* s, std::size_t length) override + { + v.insert(v.end(), s, s + length); + } + + private: + std::vector<CharType, AllocatorType>& v; +}; + +#ifndef JSON_NO_IO +/// output adapter for output streams +template<typename CharType> +class output_stream_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_stream_adapter(std::basic_ostream<CharType>& s) noexcept + : stream(s) + {} + + void write_character(CharType c) override + { + stream.put(c); + } + + JSON_HEDLEY_NON_NULL(2) + void write_characters(const CharType* s, std::size_t length) override + { + stream.write(s, static_cast<std::streamsize>(length)); + } + + private: + std::basic_ostream<CharType>& stream; +}; +#endif // JSON_NO_IO + +/// output adapter for basic_string +template<typename CharType, typename StringType = std::basic_string<CharType>> +class output_string_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_string_adapter(StringType& s) noexcept + : str(s) + {} + + void write_character(CharType c) override + { + str.push_back(c); + } + + JSON_HEDLEY_NON_NULL(2) + void write_characters(const CharType* s, std::size_t length) override + { + str.append(s, length); + } + + private: + StringType& str; +}; + +template<typename CharType, typename StringType = std::basic_string<CharType>> +class output_adapter +{ + public: + template<typename AllocatorType = std::allocator<CharType>> + output_adapter(std::vector<CharType, AllocatorType>& vec) + : oa(std::make_shared<output_vector_adapter<CharType, AllocatorType>>(vec)) {} + +#ifndef JSON_NO_IO + output_adapter(std::basic_ostream<CharType>& s) + : oa(std::make_shared<output_stream_adapter<CharType>>(s)) {} +#endif // JSON_NO_IO + + output_adapter(StringType& s) + : oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {} + + operator output_adapter_t<CharType>() + { + return oa; + } + + private: + output_adapter_t<CharType> oa = nullptr; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/string_concat.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////////////// +// binary writer // +/////////////////// + +/*! +@brief serialization to CBOR and MessagePack values +*/ +template<typename BasicJsonType, typename CharType> +class binary_writer +{ + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using number_float_t = typename BasicJsonType::number_float_t; + + public: + /*! + @brief create a binary writer + + @param[in] adapter output adapter to write to + */ + explicit binary_writer(output_adapter_t<CharType> adapter) : oa(std::move(adapter)) + { + JSON_ASSERT(oa); + } + + /*! + @param[in] j JSON value to serialize + @pre j.type() == value_t::object + */ + void write_bson(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::object: + { + write_bson_object(*j.m_data.m_value.object); + break; + } + + case value_t::null: + case value_t::array: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + JSON_THROW(type_error::create(317, concat("to serialize to BSON, top-level type must be object, but is ", j.type_name()), &j)); + } + } + } + + /*! + @param[in] j JSON value to serialize + */ + void write_cbor(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: + { + oa->write_character(to_char_type(0xF6)); + break; + } + + case value_t::boolean: + { + oa->write_character(j.m_data.m_value.boolean + ? to_char_type(0xF5) + : to_char_type(0xF4)); + break; + } + + case value_t::number_integer: + { + if (j.m_data.m_value.number_integer >= 0) + { + // CBOR does not differentiate between positive signed + // integers and unsigned integers. Therefore, we used the + // code from the value_t::number_unsigned case here. + if (j.m_data.m_value.number_integer <= 0x17) + { + write_number(static_cast<std::uint8_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x18)); + write_number(static_cast<std::uint8_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_integer <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x19)); + write_number(static_cast<std::uint16_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_integer <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x1A)); + write_number(static_cast<std::uint32_t>(j.m_data.m_value.number_integer)); + } + else + { + oa->write_character(to_char_type(0x1B)); + write_number(static_cast<std::uint64_t>(j.m_data.m_value.number_integer)); + } + } + else + { + // The conversions below encode the sign in the first + // byte, and the value is converted to a positive number. + const auto positive_number = -1 - j.m_data.m_value.number_integer; + if (j.m_data.m_value.number_integer >= -24) + { + write_number(static_cast<std::uint8_t>(0x20 + positive_number)); + } + else if (positive_number <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x38)); + write_number(static_cast<std::uint8_t>(positive_number)); + } + else if (positive_number <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x39)); + write_number(static_cast<std::uint16_t>(positive_number)); + } + else if (positive_number <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x3A)); + write_number(static_cast<std::uint32_t>(positive_number)); + } + else + { + oa->write_character(to_char_type(0x3B)); + write_number(static_cast<std::uint64_t>(positive_number)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_data.m_value.number_unsigned <= 0x17) + { + write_number(static_cast<std::uint8_t>(j.m_data.m_value.number_unsigned)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x18)); + write_number(static_cast<std::uint8_t>(j.m_data.m_value.number_unsigned)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x19)); + write_number(static_cast<std::uint16_t>(j.m_data.m_value.number_unsigned)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x1A)); + write_number(static_cast<std::uint32_t>(j.m_data.m_value.number_unsigned)); + } + else + { + oa->write_character(to_char_type(0x1B)); + write_number(static_cast<std::uint64_t>(j.m_data.m_value.number_unsigned)); + } + break; + } + + case value_t::number_float: + { + if (std::isnan(j.m_data.m_value.number_float)) + { + // NaN is 0xf97e00 in CBOR + oa->write_character(to_char_type(0xF9)); + oa->write_character(to_char_type(0x7E)); + oa->write_character(to_char_type(0x00)); + } + else if (std::isinf(j.m_data.m_value.number_float)) + { + // Infinity is 0xf97c00, -Infinity is 0xf9fc00 + oa->write_character(to_char_type(0xf9)); + oa->write_character(j.m_data.m_value.number_float > 0 ? to_char_type(0x7C) : to_char_type(0xFC)); + oa->write_character(to_char_type(0x00)); + } + else + { + write_compact_float(j.m_data.m_value.number_float, detail::input_format_t::cbor); + } + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_data.m_value.string->size(); + if (N <= 0x17) + { + write_number(static_cast<std::uint8_t>(0x60 + N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x78)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x79)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x7A)); + write_number(static_cast<std::uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits<std::uint64_t>::max)()) + { + oa->write_character(to_char_type(0x7B)); + write_number(static_cast<std::uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write the string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_data.m_value.string->c_str()), + j.m_data.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_data.m_value.array->size(); + if (N <= 0x17) + { + write_number(static_cast<std::uint8_t>(0x80 + N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x98)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x99)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x9A)); + write_number(static_cast<std::uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits<std::uint64_t>::max)()) + { + oa->write_character(to_char_type(0x9B)); + write_number(static_cast<std::uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_data.m_value.array) + { + write_cbor(el); + } + break; + } + + case value_t::binary: + { + if (j.m_data.m_value.binary->has_subtype()) + { + if (j.m_data.m_value.binary->subtype() <= (std::numeric_limits<std::uint8_t>::max)()) + { + write_number(static_cast<std::uint8_t>(0xd8)); + write_number(static_cast<std::uint8_t>(j.m_data.m_value.binary->subtype())); + } + else if (j.m_data.m_value.binary->subtype() <= (std::numeric_limits<std::uint16_t>::max)()) + { + write_number(static_cast<std::uint8_t>(0xd9)); + write_number(static_cast<std::uint16_t>(j.m_data.m_value.binary->subtype())); + } + else if (j.m_data.m_value.binary->subtype() <= (std::numeric_limits<std::uint32_t>::max)()) + { + write_number(static_cast<std::uint8_t>(0xda)); + write_number(static_cast<std::uint32_t>(j.m_data.m_value.binary->subtype())); + } + else if (j.m_data.m_value.binary->subtype() <= (std::numeric_limits<std::uint64_t>::max)()) + { + write_number(static_cast<std::uint8_t>(0xdb)); + write_number(static_cast<std::uint64_t>(j.m_data.m_value.binary->subtype())); + } + } + + // step 1: write control byte and the binary array size + const auto N = j.m_data.m_value.binary->size(); + if (N <= 0x17) + { + write_number(static_cast<std::uint8_t>(0x40 + N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0x58)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0x59)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0x5A)); + write_number(static_cast<std::uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits<std::uint64_t>::max)()) + { + oa->write_character(to_char_type(0x5B)); + write_number(static_cast<std::uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_data.m_value.binary->data()), + N); + + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_data.m_value.object->size(); + if (N <= 0x17) + { + write_number(static_cast<std::uint8_t>(0xA0 + N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + oa->write_character(to_char_type(0xB8)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + oa->write_character(to_char_type(0xB9)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + oa->write_character(to_char_type(0xBA)); + write_number(static_cast<std::uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits<std::uint64_t>::max)()) + { + oa->write_character(to_char_type(0xBB)); + write_number(static_cast<std::uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_data.m_value.object) + { + write_cbor(el.first); + write_cbor(el.second); + } + break; + } + + case value_t::discarded: + default: + break; + } + } + + /*! + @param[in] j JSON value to serialize + */ + void write_msgpack(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: // nil + { + oa->write_character(to_char_type(0xC0)); + break; + } + + case value_t::boolean: // true and false + { + oa->write_character(j.m_data.m_value.boolean + ? to_char_type(0xC3) + : to_char_type(0xC2)); + break; + } + + case value_t::number_integer: + { + if (j.m_data.m_value.number_integer >= 0) + { + // MessagePack does not differentiate between positive + // signed integers and unsigned integers. Therefore, we used + // the code from the value_t::number_unsigned case here. + if (j.m_data.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast<std::uint8_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) + { + // uint 8 + oa->write_character(to_char_type(0xCC)); + write_number(static_cast<std::uint8_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) + { + // uint 16 + oa->write_character(to_char_type(0xCD)); + write_number(static_cast<std::uint16_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) + { + // uint 32 + oa->write_character(to_char_type(0xCE)); + write_number(static_cast<std::uint32_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)()) + { + // uint 64 + oa->write_character(to_char_type(0xCF)); + write_number(static_cast<std::uint64_t>(j.m_data.m_value.number_integer)); + } + } + else + { + if (j.m_data.m_value.number_integer >= -32) + { + // negative fixnum + write_number(static_cast<std::int8_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_integer >= (std::numeric_limits<std::int8_t>::min)() && + j.m_data.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)()) + { + // int 8 + oa->write_character(to_char_type(0xD0)); + write_number(static_cast<std::int8_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_integer >= (std::numeric_limits<std::int16_t>::min)() && + j.m_data.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)()) + { + // int 16 + oa->write_character(to_char_type(0xD1)); + write_number(static_cast<std::int16_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_integer >= (std::numeric_limits<std::int32_t>::min)() && + j.m_data.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)()) + { + // int 32 + oa->write_character(to_char_type(0xD2)); + write_number(static_cast<std::int32_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_integer >= (std::numeric_limits<std::int64_t>::min)() && + j.m_data.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)()) + { + // int 64 + oa->write_character(to_char_type(0xD3)); + write_number(static_cast<std::int64_t>(j.m_data.m_value.number_integer)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_data.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast<std::uint8_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)()) + { + // uint 8 + oa->write_character(to_char_type(0xCC)); + write_number(static_cast<std::uint8_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)()) + { + // uint 16 + oa->write_character(to_char_type(0xCD)); + write_number(static_cast<std::uint16_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)()) + { + // uint 32 + oa->write_character(to_char_type(0xCE)); + write_number(static_cast<std::uint32_t>(j.m_data.m_value.number_integer)); + } + else if (j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)()) + { + // uint 64 + oa->write_character(to_char_type(0xCF)); + write_number(static_cast<std::uint64_t>(j.m_data.m_value.number_integer)); + } + break; + } + + case value_t::number_float: + { + write_compact_float(j.m_data.m_value.number_float, detail::input_format_t::msgpack); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_data.m_value.string->size(); + if (N <= 31) + { + // fixstr + write_number(static_cast<std::uint8_t>(0xA0 | N)); + } + else if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + // str 8 + oa->write_character(to_char_type(0xD9)); + write_number(static_cast<std::uint8_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + // str 16 + oa->write_character(to_char_type(0xDA)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + // str 32 + oa->write_character(to_char_type(0xDB)); + write_number(static_cast<std::uint32_t>(N)); + } + + // step 2: write the string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_data.m_value.string->c_str()), + j.m_data.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_data.m_value.array->size(); + if (N <= 15) + { + // fixarray + write_number(static_cast<std::uint8_t>(0x90 | N)); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + // array 16 + oa->write_character(to_char_type(0xDC)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + // array 32 + oa->write_character(to_char_type(0xDD)); + write_number(static_cast<std::uint32_t>(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_data.m_value.array) + { + write_msgpack(el); + } + break; + } + + case value_t::binary: + { + // step 0: determine if the binary type has a set subtype to + // determine whether or not to use the ext or fixext types + const bool use_ext = j.m_data.m_value.binary->has_subtype(); + + // step 1: write control byte and the byte string length + const auto N = j.m_data.m_value.binary->size(); + if (N <= (std::numeric_limits<std::uint8_t>::max)()) + { + std::uint8_t output_type{}; + bool fixed = true; + if (use_ext) + { + switch (N) + { + case 1: + output_type = 0xD4; // fixext 1 + break; + case 2: + output_type = 0xD5; // fixext 2 + break; + case 4: + output_type = 0xD6; // fixext 4 + break; + case 8: + output_type = 0xD7; // fixext 8 + break; + case 16: + output_type = 0xD8; // fixext 16 + break; + default: + output_type = 0xC7; // ext 8 + fixed = false; + break; + } + + } + else + { + output_type = 0xC4; // bin 8 + fixed = false; + } + + oa->write_character(to_char_type(output_type)); + if (!fixed) + { + write_number(static_cast<std::uint8_t>(N)); + } + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + const std::uint8_t output_type = use_ext + ? 0xC8 // ext 16 + : 0xC5; // bin 16 + + oa->write_character(to_char_type(output_type)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + const std::uint8_t output_type = use_ext + ? 0xC9 // ext 32 + : 0xC6; // bin 32 + + oa->write_character(to_char_type(output_type)); + write_number(static_cast<std::uint32_t>(N)); + } + + // step 1.5: if this is an ext type, write the subtype + if (use_ext) + { + write_number(static_cast<std::int8_t>(j.m_data.m_value.binary->subtype())); + } + + // step 2: write the byte string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_data.m_value.binary->data()), + N); + + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_data.m_value.object->size(); + if (N <= 15) + { + // fixmap + write_number(static_cast<std::uint8_t>(0x80 | (N & 0xF))); + } + else if (N <= (std::numeric_limits<std::uint16_t>::max)()) + { + // map 16 + oa->write_character(to_char_type(0xDE)); + write_number(static_cast<std::uint16_t>(N)); + } + else if (N <= (std::numeric_limits<std::uint32_t>::max)()) + { + // map 32 + oa->write_character(to_char_type(0xDF)); + write_number(static_cast<std::uint32_t>(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_data.m_value.object) + { + write_msgpack(el.first); + write_msgpack(el.second); + } + break; + } + + case value_t::discarded: + default: + break; + } + } + + /*! + @param[in] j JSON value to serialize + @param[in] use_count whether to use '#' prefixes (optimized format) + @param[in] use_type whether to use '$' prefixes (optimized format) + @param[in] add_prefix whether prefixes need to be used for this value + @param[in] use_bjdata whether write in BJData format, default is false + */ + void write_ubjson(const BasicJsonType& j, const bool use_count, + const bool use_type, const bool add_prefix = true, + const bool use_bjdata = false) + { + switch (j.type()) + { + case value_t::null: + { + if (add_prefix) + { + oa->write_character(to_char_type('Z')); + } + break; + } + + case value_t::boolean: + { + if (add_prefix) + { + oa->write_character(j.m_data.m_value.boolean + ? to_char_type('T') + : to_char_type('F')); + } + break; + } + + case value_t::number_integer: + { + write_number_with_ubjson_prefix(j.m_data.m_value.number_integer, add_prefix, use_bjdata); + break; + } + + case value_t::number_unsigned: + { + write_number_with_ubjson_prefix(j.m_data.m_value.number_unsigned, add_prefix, use_bjdata); + break; + } + + case value_t::number_float: + { + write_number_with_ubjson_prefix(j.m_data.m_value.number_float, add_prefix, use_bjdata); + break; + } + + case value_t::string: + { + if (add_prefix) + { + oa->write_character(to_char_type('S')); + } + write_number_with_ubjson_prefix(j.m_data.m_value.string->size(), true, use_bjdata); + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_data.m_value.string->c_str()), + j.m_data.m_value.string->size()); + break; + } + + case value_t::array: + { + if (add_prefix) + { + oa->write_character(to_char_type('[')); + } + + bool prefix_required = true; + if (use_type && !j.m_data.m_value.array->empty()) + { + JSON_ASSERT(use_count); + const CharType first_prefix = ubjson_prefix(j.front(), use_bjdata); + const bool same_prefix = std::all_of(j.begin() + 1, j.end(), + [this, first_prefix, use_bjdata](const BasicJsonType & v) + { + return ubjson_prefix(v, use_bjdata) == first_prefix; + }); + + std::vector<CharType> bjdx = {'[', '{', 'S', 'H', 'T', 'F', 'N', 'Z'}; // excluded markers in bjdata optimized type + + if (same_prefix && !(use_bjdata && std::find(bjdx.begin(), bjdx.end(), first_prefix) != bjdx.end())) + { + prefix_required = false; + oa->write_character(to_char_type('$')); + oa->write_character(first_prefix); + } + } + + if (use_count) + { + oa->write_character(to_char_type('#')); + write_number_with_ubjson_prefix(j.m_data.m_value.array->size(), true, use_bjdata); + } + + for (const auto& el : *j.m_data.m_value.array) + { + write_ubjson(el, use_count, use_type, prefix_required, use_bjdata); + } + + if (!use_count) + { + oa->write_character(to_char_type(']')); + } + + break; + } + + case value_t::binary: + { + if (add_prefix) + { + oa->write_character(to_char_type('[')); + } + + if (use_type && !j.m_data.m_value.binary->empty()) + { + JSON_ASSERT(use_count); + oa->write_character(to_char_type('$')); + oa->write_character('U'); + } + + if (use_count) + { + oa->write_character(to_char_type('#')); + write_number_with_ubjson_prefix(j.m_data.m_value.binary->size(), true, use_bjdata); + } + + if (use_type) + { + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_data.m_value.binary->data()), + j.m_data.m_value.binary->size()); + } + else + { + for (size_t i = 0; i < j.m_data.m_value.binary->size(); ++i) + { + oa->write_character(to_char_type('U')); + oa->write_character(j.m_data.m_value.binary->data()[i]); + } + } + + if (!use_count) + { + oa->write_character(to_char_type(']')); + } + + break; + } + + case value_t::object: + { + if (use_bjdata && j.m_data.m_value.object->size() == 3 && j.m_data.m_value.object->find("_ArrayType_") != j.m_data.m_value.object->end() && j.m_data.m_value.object->find("_ArraySize_") != j.m_data.m_value.object->end() && j.m_data.m_value.object->find("_ArrayData_") != j.m_data.m_value.object->end()) + { + if (!write_bjdata_ndarray(*j.m_data.m_value.object, use_count, use_type)) // decode bjdata ndarray in the JData format (https://github.com/NeuroJSON/jdata) + { + break; + } + } + + if (add_prefix) + { + oa->write_character(to_char_type('{')); + } + + bool prefix_required = true; + if (use_type && !j.m_data.m_value.object->empty()) + { + JSON_ASSERT(use_count); + const CharType first_prefix = ubjson_prefix(j.front(), use_bjdata); + const bool same_prefix = std::all_of(j.begin(), j.end(), + [this, first_prefix, use_bjdata](const BasicJsonType & v) + { + return ubjson_prefix(v, use_bjdata) == first_prefix; + }); + + std::vector<CharType> bjdx = {'[', '{', 'S', 'H', 'T', 'F', 'N', 'Z'}; // excluded markers in bjdata optimized type + + if (same_prefix && !(use_bjdata && std::find(bjdx.begin(), bjdx.end(), first_prefix) != bjdx.end())) + { + prefix_required = false; + oa->write_character(to_char_type('$')); + oa->write_character(first_prefix); + } + } + + if (use_count) + { + oa->write_character(to_char_type('#')); + write_number_with_ubjson_prefix(j.m_data.m_value.object->size(), true, use_bjdata); + } + + for (const auto& el : *j.m_data.m_value.object) + { + write_number_with_ubjson_prefix(el.first.size(), true, use_bjdata); + oa->write_characters( + reinterpret_cast<const CharType*>(el.first.c_str()), + el.first.size()); + write_ubjson(el.second, use_count, use_type, prefix_required, use_bjdata); + } + + if (!use_count) + { + oa->write_character(to_char_type('}')); + } + + break; + } + + case value_t::discarded: + default: + break; + } + } + + private: + ////////// + // BSON // + ////////// + + /*! + @return The size of a BSON document entry header, including the id marker + and the entry name size (and its null-terminator). + */ + static std::size_t calc_bson_entry_header_size(const string_t& name, const BasicJsonType& j) + { + const auto it = name.find(static_cast<typename string_t::value_type>(0)); + if (JSON_HEDLEY_UNLIKELY(it != BasicJsonType::string_t::npos)) + { + JSON_THROW(out_of_range::create(409, concat("BSON key cannot contain code point U+0000 (at byte ", std::to_string(it), ")"), &j)); + static_cast<void>(j); + } + + return /*id*/ 1ul + name.size() + /*zero-terminator*/1u; + } + + /*! + @brief Writes the given @a element_type and @a name to the output adapter + */ + void write_bson_entry_header(const string_t& name, + const std::uint8_t element_type) + { + oa->write_character(to_char_type(element_type)); // boolean + oa->write_characters( + reinterpret_cast<const CharType*>(name.c_str()), + name.size() + 1u); + } + + /*! + @brief Writes a BSON element with key @a name and boolean value @a value + */ + void write_bson_boolean(const string_t& name, + const bool value) + { + write_bson_entry_header(name, 0x08); + oa->write_character(value ? to_char_type(0x01) : to_char_type(0x00)); + } + + /*! + @brief Writes a BSON element with key @a name and double value @a value + */ + void write_bson_double(const string_t& name, + const double value) + { + write_bson_entry_header(name, 0x01); + write_number<double>(value, true); + } + + /*! + @return The size of the BSON-encoded string in @a value + */ + static std::size_t calc_bson_string_size(const string_t& value) + { + return sizeof(std::int32_t) + value.size() + 1ul; + } + + /*! + @brief Writes a BSON element with key @a name and string value @a value + */ + void write_bson_string(const string_t& name, + const string_t& value) + { + write_bson_entry_header(name, 0x02); + + write_number<std::int32_t>(static_cast<std::int32_t>(value.size() + 1ul), true); + oa->write_characters( + reinterpret_cast<const CharType*>(value.c_str()), + value.size() + 1); + } + + /*! + @brief Writes a BSON element with key @a name and null value + */ + void write_bson_null(const string_t& name) + { + write_bson_entry_header(name, 0x0A); + } + + /*! + @return The size of the BSON-encoded integer @a value + */ + static std::size_t calc_bson_integer_size(const std::int64_t value) + { + return (std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)() + ? sizeof(std::int32_t) + : sizeof(std::int64_t); + } + + /*! + @brief Writes a BSON element with key @a name and integer @a value + */ + void write_bson_integer(const string_t& name, + const std::int64_t value) + { + if ((std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)()) + { + write_bson_entry_header(name, 0x10); // int32 + write_number<std::int32_t>(static_cast<std::int32_t>(value), true); + } + else + { + write_bson_entry_header(name, 0x12); // int64 + write_number<std::int64_t>(static_cast<std::int64_t>(value), true); + } + } + + /*! + @return The size of the BSON-encoded unsigned integer in @a j + */ + static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept + { + return (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) + ? sizeof(std::int32_t) + : sizeof(std::int64_t); + } + + /*! + @brief Writes a BSON element with key @a name and unsigned @a value + */ + void write_bson_unsigned(const string_t& name, + const BasicJsonType& j) + { + if (j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) + { + write_bson_entry_header(name, 0x10 /* int32 */); + write_number<std::int32_t>(static_cast<std::int32_t>(j.m_data.m_value.number_unsigned), true); + } + else if (j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)())) + { + write_bson_entry_header(name, 0x12 /* int64 */); + write_number<std::int64_t>(static_cast<std::int64_t>(j.m_data.m_value.number_unsigned), true); + } + else + { + JSON_THROW(out_of_range::create(407, concat("integer number ", std::to_string(j.m_data.m_value.number_unsigned), " cannot be represented by BSON as it does not fit int64"), &j)); + } + } + + /*! + @brief Writes a BSON element with key @a name and object @a value + */ + void write_bson_object_entry(const string_t& name, + const typename BasicJsonType::object_t& value) + { + write_bson_entry_header(name, 0x03); // object + write_bson_object(value); + } + + /*! + @return The size of the BSON-encoded array @a value + */ + static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t& value) + { + std::size_t array_index = 0ul; + + const std::size_t embedded_document_size = std::accumulate(std::begin(value), std::end(value), static_cast<std::size_t>(0), [&array_index](std::size_t result, const typename BasicJsonType::array_t::value_type & el) + { + return result + calc_bson_element_size(std::to_string(array_index++), el); + }); + + return sizeof(std::int32_t) + embedded_document_size + 1ul; + } + + /*! + @return The size of the BSON-encoded binary array @a value + */ + static std::size_t calc_bson_binary_size(const typename BasicJsonType::binary_t& value) + { + return sizeof(std::int32_t) + value.size() + 1ul; + } + + /*! + @brief Writes a BSON element with key @a name and array @a value + */ + void write_bson_array(const string_t& name, + const typename BasicJsonType::array_t& value) + { + write_bson_entry_header(name, 0x04); // array + write_number<std::int32_t>(static_cast<std::int32_t>(calc_bson_array_size(value)), true); + + std::size_t array_index = 0ul; + + for (const auto& el : value) + { + write_bson_element(std::to_string(array_index++), el); + } + + oa->write_character(to_char_type(0x00)); + } + + /*! + @brief Writes a BSON element with key @a name and binary value @a value + */ + void write_bson_binary(const string_t& name, + const binary_t& value) + { + write_bson_entry_header(name, 0x05); + + write_number<std::int32_t>(static_cast<std::int32_t>(value.size()), true); + write_number(value.has_subtype() ? static_cast<std::uint8_t>(value.subtype()) : static_cast<std::uint8_t>(0x00)); + + oa->write_characters(reinterpret_cast<const CharType*>(value.data()), value.size()); + } + + /*! + @brief Calculates the size necessary to serialize the JSON value @a j with its @a name + @return The calculated size for the BSON document entry for @a j with the given @a name. + */ + static std::size_t calc_bson_element_size(const string_t& name, + const BasicJsonType& j) + { + const auto header_size = calc_bson_entry_header_size(name, j); + switch (j.type()) + { + case value_t::object: + return header_size + calc_bson_object_size(*j.m_data.m_value.object); + + case value_t::array: + return header_size + calc_bson_array_size(*j.m_data.m_value.array); + + case value_t::binary: + return header_size + calc_bson_binary_size(*j.m_data.m_value.binary); + + case value_t::boolean: + return header_size + 1ul; + + case value_t::number_float: + return header_size + 8ul; + + case value_t::number_integer: + return header_size + calc_bson_integer_size(j.m_data.m_value.number_integer); + + case value_t::number_unsigned: + return header_size + calc_bson_unsigned_size(j.m_data.m_value.number_unsigned); + + case value_t::string: + return header_size + calc_bson_string_size(*j.m_data.m_value.string); + + case value_t::null: + return header_size + 0ul; + + // LCOV_EXCL_START + case value_t::discarded: + default: + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) + return 0ul; + // LCOV_EXCL_STOP + } + } + + /*! + @brief Serializes the JSON value @a j to BSON and associates it with the + key @a name. + @param name The name to associate with the JSON entity @a j within the + current BSON document + */ + void write_bson_element(const string_t& name, + const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::object: + return write_bson_object_entry(name, *j.m_data.m_value.object); + + case value_t::array: + return write_bson_array(name, *j.m_data.m_value.array); + + case value_t::binary: + return write_bson_binary(name, *j.m_data.m_value.binary); + + case value_t::boolean: + return write_bson_boolean(name, j.m_data.m_value.boolean); + + case value_t::number_float: + return write_bson_double(name, j.m_data.m_value.number_float); + + case value_t::number_integer: + return write_bson_integer(name, j.m_data.m_value.number_integer); + + case value_t::number_unsigned: + return write_bson_unsigned(name, j); + + case value_t::string: + return write_bson_string(name, *j.m_data.m_value.string); + + case value_t::null: + return write_bson_null(name); + + // LCOV_EXCL_START + case value_t::discarded: + default: + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) + return; + // LCOV_EXCL_STOP + } + } + + /*! + @brief Calculates the size of the BSON serialization of the given + JSON-object @a j. + @param[in] value JSON value to serialize + @pre value.type() == value_t::object + */ + static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t& value) + { + const std::size_t document_size = std::accumulate(value.begin(), value.end(), static_cast<std::size_t>(0), + [](size_t result, const typename BasicJsonType::object_t::value_type & el) + { + return result += calc_bson_element_size(el.first, el.second); + }); + + return sizeof(std::int32_t) + document_size + 1ul; + } + + /*! + @param[in] value JSON value to serialize + @pre value.type() == value_t::object + */ + void write_bson_object(const typename BasicJsonType::object_t& value) + { + write_number<std::int32_t>(static_cast<std::int32_t>(calc_bson_object_size(value)), true); + + for (const auto& el : value) + { + write_bson_element(el.first, el.second); + } + + oa->write_character(to_char_type(0x00)); + } + + ////////// + // CBOR // + ////////// + + static constexpr CharType get_cbor_float_prefix(float /*unused*/) + { + return to_char_type(0xFA); // Single-Precision Float + } + + static constexpr CharType get_cbor_float_prefix(double /*unused*/) + { + return to_char_type(0xFB); // Double-Precision Float + } + + ///////////// + // MsgPack // + ///////////// + + static constexpr CharType get_msgpack_float_prefix(float /*unused*/) + { + return to_char_type(0xCA); // float 32 + } + + static constexpr CharType get_msgpack_float_prefix(double /*unused*/) + { + return to_char_type(0xCB); // float 64 + } + + //////////// + // UBJSON // + //////////// + + // UBJSON: write number (floating point) + template<typename NumberType, typename std::enable_if< + std::is_floating_point<NumberType>::value, int>::type = 0> + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix, + const bool use_bjdata) + { + if (add_prefix) + { + oa->write_character(get_ubjson_float_prefix(n)); + } + write_number(n, use_bjdata); + } + + // UBJSON: write number (unsigned integer) + template<typename NumberType, typename std::enable_if< + std::is_unsigned<NumberType>::value, int>::type = 0> + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix, + const bool use_bjdata) + { + if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('i')); // int8 + } + write_number(static_cast<std::uint8_t>(n), use_bjdata); + } + else if (n <= (std::numeric_limits<std::uint8_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('U')); // uint8 + } + write_number(static_cast<std::uint8_t>(n), use_bjdata); + } + else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('I')); // int16 + } + write_number(static_cast<std::int16_t>(n), use_bjdata); + } + else if (use_bjdata && n <= static_cast<uint64_t>((std::numeric_limits<uint16_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('u')); // uint16 - bjdata only + } + write_number(static_cast<std::uint16_t>(n), use_bjdata); + } + else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('l')); // int32 + } + write_number(static_cast<std::int32_t>(n), use_bjdata); + } + else if (use_bjdata && n <= static_cast<uint64_t>((std::numeric_limits<uint32_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('m')); // uint32 - bjdata only + } + write_number(static_cast<std::uint32_t>(n), use_bjdata); + } + else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('L')); // int64 + } + write_number(static_cast<std::int64_t>(n), use_bjdata); + } + else if (use_bjdata && n <= (std::numeric_limits<uint64_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('M')); // uint64 - bjdata only + } + write_number(static_cast<std::uint64_t>(n), use_bjdata); + } + else + { + if (add_prefix) + { + oa->write_character(to_char_type('H')); // high-precision number + } + + const auto number = BasicJsonType(n).dump(); + write_number_with_ubjson_prefix(number.size(), true, use_bjdata); + for (std::size_t i = 0; i < number.size(); ++i) + { + oa->write_character(to_char_type(static_cast<std::uint8_t>(number[i]))); + } + } + } + + // UBJSON: write number (signed integer) + template < typename NumberType, typename std::enable_if < + std::is_signed<NumberType>::value&& + !std::is_floating_point<NumberType>::value, int >::type = 0 > + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix, + const bool use_bjdata) + { + if ((std::numeric_limits<std::int8_t>::min)() <= n && n <= (std::numeric_limits<std::int8_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('i')); // int8 + } + write_number(static_cast<std::int8_t>(n), use_bjdata); + } + else if (static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::min)()) <= n && n <= static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('U')); // uint8 + } + write_number(static_cast<std::uint8_t>(n), use_bjdata); + } + else if ((std::numeric_limits<std::int16_t>::min)() <= n && n <= (std::numeric_limits<std::int16_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('I')); // int16 + } + write_number(static_cast<std::int16_t>(n), use_bjdata); + } + else if (use_bjdata && (static_cast<std::int64_t>((std::numeric_limits<std::uint16_t>::min)()) <= n && n <= static_cast<std::int64_t>((std::numeric_limits<std::uint16_t>::max)()))) + { + if (add_prefix) + { + oa->write_character(to_char_type('u')); // uint16 - bjdata only + } + write_number(static_cast<uint16_t>(n), use_bjdata); + } + else if ((std::numeric_limits<std::int32_t>::min)() <= n && n <= (std::numeric_limits<std::int32_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('l')); // int32 + } + write_number(static_cast<std::int32_t>(n), use_bjdata); + } + else if (use_bjdata && (static_cast<std::int64_t>((std::numeric_limits<std::uint32_t>::min)()) <= n && n <= static_cast<std::int64_t>((std::numeric_limits<std::uint32_t>::max)()))) + { + if (add_prefix) + { + oa->write_character(to_char_type('m')); // uint32 - bjdata only + } + write_number(static_cast<uint32_t>(n), use_bjdata); + } + else if ((std::numeric_limits<std::int64_t>::min)() <= n && n <= (std::numeric_limits<std::int64_t>::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('L')); // int64 + } + write_number(static_cast<std::int64_t>(n), use_bjdata); + } + // LCOV_EXCL_START + else + { + if (add_prefix) + { + oa->write_character(to_char_type('H')); // high-precision number + } + + const auto number = BasicJsonType(n).dump(); + write_number_with_ubjson_prefix(number.size(), true, use_bjdata); + for (std::size_t i = 0; i < number.size(); ++i) + { + oa->write_character(to_char_type(static_cast<std::uint8_t>(number[i]))); + } + } + // LCOV_EXCL_STOP + } + + /*! + @brief determine the type prefix of container values + */ + CharType ubjson_prefix(const BasicJsonType& j, const bool use_bjdata) const noexcept + { + switch (j.type()) + { + case value_t::null: + return 'Z'; + + case value_t::boolean: + return j.m_data.m_value.boolean ? 'T' : 'F'; + + case value_t::number_integer: + { + if ((std::numeric_limits<std::int8_t>::min)() <= j.m_data.m_value.number_integer && j.m_data.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)()) + { + return 'i'; + } + if ((std::numeric_limits<std::uint8_t>::min)() <= j.m_data.m_value.number_integer && j.m_data.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)()) + { + return 'U'; + } + if ((std::numeric_limits<std::int16_t>::min)() <= j.m_data.m_value.number_integer && j.m_data.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)()) + { + return 'I'; + } + if (use_bjdata && ((std::numeric_limits<std::uint16_t>::min)() <= j.m_data.m_value.number_integer && j.m_data.m_value.number_integer <= (std::numeric_limits<std::uint16_t>::max)())) + { + return 'u'; + } + if ((std::numeric_limits<std::int32_t>::min)() <= j.m_data.m_value.number_integer && j.m_data.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)()) + { + return 'l'; + } + if (use_bjdata && ((std::numeric_limits<std::uint32_t>::min)() <= j.m_data.m_value.number_integer && j.m_data.m_value.number_integer <= (std::numeric_limits<std::uint32_t>::max)())) + { + return 'm'; + } + if ((std::numeric_limits<std::int64_t>::min)() <= j.m_data.m_value.number_integer && j.m_data.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)()) + { + return 'L'; + } + // anything else is treated as high-precision number + return 'H'; // LCOV_EXCL_LINE + } + + case value_t::number_unsigned: + { + if (j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)())) + { + return 'i'; + } + if (j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint8_t>::max)())) + { + return 'U'; + } + if (j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)())) + { + return 'I'; + } + if (use_bjdata && j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint16_t>::max)())) + { + return 'u'; + } + if (j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) + { + return 'l'; + } + if (use_bjdata && j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint32_t>::max)())) + { + return 'm'; + } + if (j.m_data.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)())) + { + return 'L'; + } + if (use_bjdata && j.m_data.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)()) + { + return 'M'; + } + // anything else is treated as high-precision number + return 'H'; // LCOV_EXCL_LINE + } + + case value_t::number_float: + return get_ubjson_float_prefix(j.m_data.m_value.number_float); + + case value_t::string: + return 'S'; + + case value_t::array: // fallthrough + case value_t::binary: + return '['; + + case value_t::object: + return '{'; + + case value_t::discarded: + default: // discarded values + return 'N'; + } + } + + static constexpr CharType get_ubjson_float_prefix(float /*unused*/) + { + return 'd'; // float 32 + } + + static constexpr CharType get_ubjson_float_prefix(double /*unused*/) + { + return 'D'; // float 64 + } + + /*! + @return false if the object is successfully converted to a bjdata ndarray, true if the type or size is invalid + */ + bool write_bjdata_ndarray(const typename BasicJsonType::object_t& value, const bool use_count, const bool use_type) + { + std::map<string_t, CharType> bjdtype = {{"uint8", 'U'}, {"int8", 'i'}, {"uint16", 'u'}, {"int16", 'I'}, + {"uint32", 'm'}, {"int32", 'l'}, {"uint64", 'M'}, {"int64", 'L'}, {"single", 'd'}, {"double", 'D'}, {"char", 'C'} + }; + + string_t key = "_ArrayType_"; + auto it = bjdtype.find(static_cast<string_t>(value.at(key))); + if (it == bjdtype.end()) + { + return true; + } + CharType dtype = it->second; + + key = "_ArraySize_"; + std::size_t len = (value.at(key).empty() ? 0 : 1); + for (const auto& el : value.at(key)) + { + len *= static_cast<std::size_t>(el.m_data.m_value.number_unsigned); + } + + key = "_ArrayData_"; + if (value.at(key).size() != len) + { + return true; + } + + oa->write_character('['); + oa->write_character('$'); + oa->write_character(dtype); + oa->write_character('#'); + + key = "_ArraySize_"; + write_ubjson(value.at(key), use_count, use_type, true, true); + + key = "_ArrayData_"; + if (dtype == 'U' || dtype == 'C') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<std::uint8_t>(el.m_data.m_value.number_unsigned), true); + } + } + else if (dtype == 'i') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<std::int8_t>(el.m_data.m_value.number_integer), true); + } + } + else if (dtype == 'u') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<std::uint16_t>(el.m_data.m_value.number_unsigned), true); + } + } + else if (dtype == 'I') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<std::int16_t>(el.m_data.m_value.number_integer), true); + } + } + else if (dtype == 'm') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<std::uint32_t>(el.m_data.m_value.number_unsigned), true); + } + } + else if (dtype == 'l') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<std::int32_t>(el.m_data.m_value.number_integer), true); + } + } + else if (dtype == 'M') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<std::uint64_t>(el.m_data.m_value.number_unsigned), true); + } + } + else if (dtype == 'L') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<std::int64_t>(el.m_data.m_value.number_integer), true); + } + } + else if (dtype == 'd') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<float>(el.m_data.m_value.number_float), true); + } + } + else if (dtype == 'D') + { + for (const auto& el : value.at(key)) + { + write_number(static_cast<double>(el.m_data.m_value.number_float), true); + } + } + return false; + } + + /////////////////////// + // Utility functions // + /////////////////////// + + /* + @brief write a number to output input + @param[in] n number of type @a NumberType + @param[in] OutputIsLittleEndian Set to true if output data is + required to be little endian + @tparam NumberType the type of the number + + @note This function needs to respect the system's endianness, because bytes + in CBOR, MessagePack, and UBJSON are stored in network order (big + endian) and therefore need reordering on little endian systems. + On the other hand, BSON and BJData use little endian and should reorder + on big endian systems. + */ + template<typename NumberType> + void write_number(const NumberType n, const bool OutputIsLittleEndian = false) + { + // step 1: write number to array of length NumberType + std::array<CharType, sizeof(NumberType)> vec{}; + std::memcpy(vec.data(), &n, sizeof(NumberType)); + + // step 2: write array to output (with possible reordering) + if (is_little_endian != OutputIsLittleEndian) + { + // reverse byte order prior to conversion if necessary + std::reverse(vec.begin(), vec.end()); + } + + oa->write_characters(vec.data(), sizeof(NumberType)); + } + + void write_compact_float(const number_float_t n, detail::input_format_t format) + { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + if (static_cast<double>(n) >= static_cast<double>(std::numeric_limits<float>::lowest()) && + static_cast<double>(n) <= static_cast<double>((std::numeric_limits<float>::max)()) && + static_cast<double>(static_cast<float>(n)) == static_cast<double>(n)) + { + oa->write_character(format == detail::input_format_t::cbor + ? get_cbor_float_prefix(static_cast<float>(n)) + : get_msgpack_float_prefix(static_cast<float>(n))); + write_number(static_cast<float>(n)); + } + else + { + oa->write_character(format == detail::input_format_t::cbor + ? get_cbor_float_prefix(n) + : get_msgpack_float_prefix(n)); + write_number(n); + } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + } + + public: + // The following to_char_type functions are implement the conversion + // between uint8_t and CharType. In case CharType is not unsigned, + // such a conversion is required to allow values greater than 128. + // See <https://github.com/nlohmann/json/issues/1286> for a discussion. + template < typename C = CharType, + enable_if_t < std::is_signed<C>::value && std::is_signed<char>::value > * = nullptr > + static constexpr CharType to_char_type(std::uint8_t x) noexcept + { + return *reinterpret_cast<char*>(&x); + } + + template < typename C = CharType, + enable_if_t < std::is_signed<C>::value && std::is_unsigned<char>::value > * = nullptr > + static CharType to_char_type(std::uint8_t x) noexcept + { + static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t"); + static_assert(std::is_trivial<CharType>::value, "CharType must be trivial"); + CharType result; + std::memcpy(&result, &x, sizeof(x)); + return result; + } + + template<typename C = CharType, + enable_if_t<std::is_unsigned<C>::value>* = nullptr> + static constexpr CharType to_char_type(std::uint8_t x) noexcept + { + return x; + } + + template < typename InputCharType, typename C = CharType, + enable_if_t < + std::is_signed<C>::value && + std::is_signed<char>::value && + std::is_same<char, typename std::remove_cv<InputCharType>::type>::value + > * = nullptr > + static constexpr CharType to_char_type(InputCharType x) noexcept + { + return x; + } + + private: + /// whether we can assume little endianness + const bool is_little_endian = little_endianness(); + + /// the output + output_adapter_t<CharType> oa = nullptr; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/output/output_adapters.hpp> + +// #include <nlohmann/detail/output/serializer.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2008-2009 Björn Hoehrmann <bjoern@hoehrmann.de> +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <algorithm> // reverse, remove, fill, find, none_of +#include <array> // array +#include <clocale> // localeconv, lconv +#include <cmath> // labs, isfinite, isnan, signbit +#include <cstddef> // size_t, ptrdiff_t +#include <cstdint> // uint8_t +#include <cstdio> // snprintf +#include <limits> // numeric_limits +#include <string> // string, char_traits +#include <iomanip> // setfill, setw +#include <type_traits> // is_same +#include <utility> // move + +// #include <nlohmann/detail/conversions/to_chars.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2009 Florian Loitsch <https://florian.loitsch.com/> +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <array> // array +#include <cmath> // signbit, isfinite +#include <cstdint> // intN_t, uintN_t +#include <cstring> // memcpy, memmove +#include <limits> // numeric_limits +#include <type_traits> // conditional + +// #include <nlohmann/detail/macro_scope.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief implements the Grisu2 algorithm for binary to decimal floating-point +conversion. + +This implementation is a slightly modified version of the reference +implementation which may be obtained from +http://florian.loitsch.com/publications (bench.tar.gz). + +The code is distributed under the MIT license, Copyright (c) 2009 Florian Loitsch. + +For a detailed description of the algorithm see: + +[1] Loitsch, "Printing Floating-Point Numbers Quickly and Accurately with + Integers", Proceedings of the ACM SIGPLAN 2010 Conference on Programming + Language Design and Implementation, PLDI 2010 +[2] Burger, Dybvig, "Printing Floating-Point Numbers Quickly and Accurately", + Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language + Design and Implementation, PLDI 1996 +*/ +namespace dtoa_impl +{ + +template<typename Target, typename Source> +Target reinterpret_bits(const Source source) +{ + static_assert(sizeof(Target) == sizeof(Source), "size mismatch"); + + Target target; + std::memcpy(&target, &source, sizeof(Source)); + return target; +} + +struct diyfp // f * 2^e +{ + static constexpr int kPrecision = 64; // = q + + std::uint64_t f = 0; + int e = 0; + + constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {} + + /*! + @brief returns x - y + @pre x.e == y.e and x.f >= y.f + */ + static diyfp sub(const diyfp& x, const diyfp& y) noexcept + { + JSON_ASSERT(x.e == y.e); + JSON_ASSERT(x.f >= y.f); + + return {x.f - y.f, x.e}; + } + + /*! + @brief returns x * y + @note The result is rounded. (Only the upper q bits are returned.) + */ + static diyfp mul(const diyfp& x, const diyfp& y) noexcept + { + static_assert(kPrecision == 64, "internal error"); + + // Computes: + // f = round((x.f * y.f) / 2^q) + // e = x.e + y.e + q + + // Emulate the 64-bit * 64-bit multiplication: + // + // p = u * v + // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) + // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi ) + // = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 ) + // = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) + // = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3) + // = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) + // = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) + // + // (Since Q might be larger than 2^32 - 1) + // + // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) + // + // (Q_hi + H does not overflow a 64-bit int) + // + // = p_lo + 2^64 p_hi + + const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; + const std::uint64_t u_hi = x.f >> 32u; + const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; + const std::uint64_t v_hi = y.f >> 32u; + + const std::uint64_t p0 = u_lo * v_lo; + const std::uint64_t p1 = u_lo * v_hi; + const std::uint64_t p2 = u_hi * v_lo; + const std::uint64_t p3 = u_hi * v_hi; + + const std::uint64_t p0_hi = p0 >> 32u; + const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; + const std::uint64_t p1_hi = p1 >> 32u; + const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; + const std::uint64_t p2_hi = p2 >> 32u; + + std::uint64_t Q = p0_hi + p1_lo + p2_lo; + + // The full product might now be computed as + // + // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) + // p_lo = p0_lo + (Q << 32) + // + // But in this particular case here, the full p_lo is not required. + // Effectively we only need to add the highest bit in p_lo to p_hi (and + // Q_hi + 1 does not overflow). + + Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up + + const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); + + return {h, x.e + y.e + 64}; + } + + /*! + @brief normalize x such that the significand is >= 2^(q-1) + @pre x.f != 0 + */ + static diyfp normalize(diyfp x) noexcept + { + JSON_ASSERT(x.f != 0); + + while ((x.f >> 63u) == 0) + { + x.f <<= 1u; + x.e--; + } + + return x; + } + + /*! + @brief normalize x such that the result has the exponent E + @pre e >= x.e and the upper e - x.e bits of x.f must be zero. + */ + static diyfp normalize_to(const diyfp& x, const int target_exponent) noexcept + { + const int delta = x.e - target_exponent; + + JSON_ASSERT(delta >= 0); + JSON_ASSERT(((x.f << delta) >> delta) == x.f); + + return {x.f << delta, target_exponent}; + } +}; + +struct boundaries +{ + diyfp w; + diyfp minus; + diyfp plus; +}; + +/*! +Compute the (normalized) diyfp representing the input number 'value' and its +boundaries. + +@pre value must be finite and positive +*/ +template<typename FloatType> +boundaries compute_boundaries(FloatType value) +{ + JSON_ASSERT(std::isfinite(value)); + JSON_ASSERT(value > 0); + + // Convert the IEEE representation into a diyfp. + // + // If v is denormal: + // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) + // If v is normalized: + // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) + + static_assert(std::numeric_limits<FloatType>::is_iec559, + "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); + + constexpr int kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit) + constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1); + constexpr int kMinExp = 1 - kBias; + constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1) + + using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type; + + const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value)); + const std::uint64_t E = bits >> (kPrecision - 1); + const std::uint64_t F = bits & (kHiddenBit - 1); + + const bool is_denormal = E == 0; + const diyfp v = is_denormal + ? diyfp(F, kMinExp) + : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias); + + // Compute the boundaries m- and m+ of the floating-point value + // v = f * 2^e. + // + // Determine v- and v+, the floating-point predecessor and successor if v, + // respectively. + // + // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) + // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) + // + // v+ = v + 2^e + // + // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ + // between m- and m+ round to v, regardless of how the input rounding + // algorithm breaks ties. + // + // ---+-------------+-------------+-------------+-------------+--- (A) + // v- m- v m+ v+ + // + // -----------------+------+------+-------------+-------------+--- (B) + // v- m- v m+ v+ + + const bool lower_boundary_is_closer = F == 0 && E > 1; + const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); + const diyfp m_minus = lower_boundary_is_closer + ? diyfp(4 * v.f - 1, v.e - 2) // (B) + : diyfp(2 * v.f - 1, v.e - 1); // (A) + + // Determine the normalized w+ = m+. + const diyfp w_plus = diyfp::normalize(m_plus); + + // Determine w- = m- such that e_(w-) = e_(w+). + const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); + + return {diyfp::normalize(v), w_minus, w_plus}; +} + +// Given normalized diyfp w, Grisu needs to find a (normalized) cached +// power-of-ten c, such that the exponent of the product c * w = f * 2^e lies +// within a certain range [alpha, gamma] (Definition 3.2 from [1]) +// +// alpha <= e = e_c + e_w + q <= gamma +// +// or +// +// f_c * f_w * 2^alpha <= f_c 2^(e_c) * f_w 2^(e_w) * 2^q +// <= f_c * f_w * 2^gamma +// +// Since c and w are normalized, i.e. 2^(q-1) <= f < 2^q, this implies +// +// 2^(q-1) * 2^(q-1) * 2^alpha <= c * w * 2^q < 2^q * 2^q * 2^gamma +// +// or +// +// 2^(q - 2 + alpha) <= c * w < 2^(q + gamma) +// +// The choice of (alpha,gamma) determines the size of the table and the form of +// the digit generation procedure. Using (alpha,gamma)=(-60,-32) works out well +// in practice: +// +// The idea is to cut the number c * w = f * 2^e into two parts, which can be +// processed independently: An integral part p1, and a fractional part p2: +// +// f * 2^e = ( (f div 2^-e) * 2^-e + (f mod 2^-e) ) * 2^e +// = (f div 2^-e) + (f mod 2^-e) * 2^e +// = p1 + p2 * 2^e +// +// The conversion of p1 into decimal form requires a series of divisions and +// modulos by (a power of) 10. These operations are faster for 32-bit than for +// 64-bit integers, so p1 should ideally fit into a 32-bit integer. This can be +// achieved by choosing +// +// -e >= 32 or e <= -32 := gamma +// +// In order to convert the fractional part +// +// p2 * 2^e = p2 / 2^-e = d[-1] / 10^1 + d[-2] / 10^2 + ... +// +// into decimal form, the fraction is repeatedly multiplied by 10 and the digits +// d[-i] are extracted in order: +// +// (10 * p2) div 2^-e = d[-1] +// (10 * p2) mod 2^-e = d[-2] / 10^1 + ... +// +// The multiplication by 10 must not overflow. It is sufficient to choose +// +// 10 * p2 < 16 * p2 = 2^4 * p2 <= 2^64. +// +// Since p2 = f mod 2^-e < 2^-e, +// +// -e <= 60 or e >= -60 := alpha + +constexpr int kAlpha = -60; +constexpr int kGamma = -32; + +struct cached_power // c = f * 2^e ~= 10^k +{ + std::uint64_t f; + int e; + int k; +}; + +/*! +For a normalized diyfp w = f * 2^e, this function returns a (normalized) cached +power-of-ten c = f_c * 2^e_c, such that the exponent of the product w * c +satisfies (Definition 3.2 from [1]) + + alpha <= e_c + e + q <= gamma. +*/ +inline cached_power get_cached_power_for_binary_exponent(int e) +{ + // Now + // + // alpha <= e_c + e + q <= gamma (1) + // ==> f_c * 2^alpha <= c * 2^e * 2^q + // + // and since the c's are normalized, 2^(q-1) <= f_c, + // + // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) + // ==> 2^(alpha - e - 1) <= c + // + // If c were an exact power of ten, i.e. c = 10^k, one may determine k as + // + // k = ceil( log_10( 2^(alpha - e - 1) ) ) + // = ceil( (alpha - e - 1) * log_10(2) ) + // + // From the paper: + // "In theory the result of the procedure could be wrong since c is rounded, + // and the computation itself is approximated [...]. In practice, however, + // this simple function is sufficient." + // + // For IEEE double precision floating-point numbers converted into + // normalized diyfp's w = f * 2^e, with q = 64, + // + // e >= -1022 (min IEEE exponent) + // -52 (p - 1) + // -52 (p - 1, possibly normalize denormal IEEE numbers) + // -11 (normalize the diyfp) + // = -1137 + // + // and + // + // e <= +1023 (max IEEE exponent) + // -52 (p - 1) + // -11 (normalize the diyfp) + // = 960 + // + // This binary exponent range [-1137,960] results in a decimal exponent + // range [-307,324]. One does not need to store a cached power for each + // k in this range. For each such k it suffices to find a cached power + // such that the exponent of the product lies in [alpha,gamma]. + // This implies that the difference of the decimal exponents of adjacent + // table entries must be less than or equal to + // + // floor( (gamma - alpha) * log_10(2) ) = 8. + // + // (A smaller distance gamma-alpha would require a larger table.) + + // NB: + // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. + + constexpr int kCachedPowersMinDecExp = -300; + constexpr int kCachedPowersDecStep = 8; + + static constexpr std::array<cached_power, 79> kCachedPowers = + { + { + { 0xAB70FE17C79AC6CA, -1060, -300 }, + { 0xFF77B1FCBEBCDC4F, -1034, -292 }, + { 0xBE5691EF416BD60C, -1007, -284 }, + { 0x8DD01FAD907FFC3C, -980, -276 }, + { 0xD3515C2831559A83, -954, -268 }, + { 0x9D71AC8FADA6C9B5, -927, -260 }, + { 0xEA9C227723EE8BCB, -901, -252 }, + { 0xAECC49914078536D, -874, -244 }, + { 0x823C12795DB6CE57, -847, -236 }, + { 0xC21094364DFB5637, -821, -228 }, + { 0x9096EA6F3848984F, -794, -220 }, + { 0xD77485CB25823AC7, -768, -212 }, + { 0xA086CFCD97BF97F4, -741, -204 }, + { 0xEF340A98172AACE5, -715, -196 }, + { 0xB23867FB2A35B28E, -688, -188 }, + { 0x84C8D4DFD2C63F3B, -661, -180 }, + { 0xC5DD44271AD3CDBA, -635, -172 }, + { 0x936B9FCEBB25C996, -608, -164 }, + { 0xDBAC6C247D62A584, -582, -156 }, + { 0xA3AB66580D5FDAF6, -555, -148 }, + { 0xF3E2F893DEC3F126, -529, -140 }, + { 0xB5B5ADA8AAFF80B8, -502, -132 }, + { 0x87625F056C7C4A8B, -475, -124 }, + { 0xC9BCFF6034C13053, -449, -116 }, + { 0x964E858C91BA2655, -422, -108 }, + { 0xDFF9772470297EBD, -396, -100 }, + { 0xA6DFBD9FB8E5B88F, -369, -92 }, + { 0xF8A95FCF88747D94, -343, -84 }, + { 0xB94470938FA89BCF, -316, -76 }, + { 0x8A08F0F8BF0F156B, -289, -68 }, + { 0xCDB02555653131B6, -263, -60 }, + { 0x993FE2C6D07B7FAC, -236, -52 }, + { 0xE45C10C42A2B3B06, -210, -44 }, + { 0xAA242499697392D3, -183, -36 }, + { 0xFD87B5F28300CA0E, -157, -28 }, + { 0xBCE5086492111AEB, -130, -20 }, + { 0x8CBCCC096F5088CC, -103, -12 }, + { 0xD1B71758E219652C, -77, -4 }, + { 0x9C40000000000000, -50, 4 }, + { 0xE8D4A51000000000, -24, 12 }, + { 0xAD78EBC5AC620000, 3, 20 }, + { 0x813F3978F8940984, 30, 28 }, + { 0xC097CE7BC90715B3, 56, 36 }, + { 0x8F7E32CE7BEA5C70, 83, 44 }, + { 0xD5D238A4ABE98068, 109, 52 }, + { 0x9F4F2726179A2245, 136, 60 }, + { 0xED63A231D4C4FB27, 162, 68 }, + { 0xB0DE65388CC8ADA8, 189, 76 }, + { 0x83C7088E1AAB65DB, 216, 84 }, + { 0xC45D1DF942711D9A, 242, 92 }, + { 0x924D692CA61BE758, 269, 100 }, + { 0xDA01EE641A708DEA, 295, 108 }, + { 0xA26DA3999AEF774A, 322, 116 }, + { 0xF209787BB47D6B85, 348, 124 }, + { 0xB454E4A179DD1877, 375, 132 }, + { 0x865B86925B9BC5C2, 402, 140 }, + { 0xC83553C5C8965D3D, 428, 148 }, + { 0x952AB45CFA97A0B3, 455, 156 }, + { 0xDE469FBD99A05FE3, 481, 164 }, + { 0xA59BC234DB398C25, 508, 172 }, + { 0xF6C69A72A3989F5C, 534, 180 }, + { 0xB7DCBF5354E9BECE, 561, 188 }, + { 0x88FCF317F22241E2, 588, 196 }, + { 0xCC20CE9BD35C78A5, 614, 204 }, + { 0x98165AF37B2153DF, 641, 212 }, + { 0xE2A0B5DC971F303A, 667, 220 }, + { 0xA8D9D1535CE3B396, 694, 228 }, + { 0xFB9B7CD9A4A7443C, 720, 236 }, + { 0xBB764C4CA7A44410, 747, 244 }, + { 0x8BAB8EEFB6409C1A, 774, 252 }, + { 0xD01FEF10A657842C, 800, 260 }, + { 0x9B10A4E5E9913129, 827, 268 }, + { 0xE7109BFBA19C0C9D, 853, 276 }, + { 0xAC2820D9623BF429, 880, 284 }, + { 0x80444B5E7AA7CF85, 907, 292 }, + { 0xBF21E44003ACDD2D, 933, 300 }, + { 0x8E679C2F5E44FF8F, 960, 308 }, + { 0xD433179D9C8CB841, 986, 316 }, + { 0x9E19DB92B4E31BA9, 1013, 324 }, + } + }; + + // This computation gives exactly the same results for k as + // k = ceil((kAlpha - e - 1) * 0.30102999566398114) + // for |e| <= 1500, but doesn't require floating-point operations. + // NB: log_10(2) ~= 78913 / 2^18 + JSON_ASSERT(e >= -1500); + JSON_ASSERT(e <= 1500); + const int f = kAlpha - e - 1; + const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0); + + const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; + JSON_ASSERT(index >= 0); + JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size()); + + const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)]; + JSON_ASSERT(kAlpha <= cached.e + e + 64); + JSON_ASSERT(kGamma >= cached.e + e + 64); + + return cached; +} + +/*! +For n != 0, returns k, such that pow10 := 10^(k-1) <= n < 10^k. +For n == 0, returns 1 and sets pow10 := 1. +*/ +inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) +{ + // LCOV_EXCL_START + if (n >= 1000000000) + { + pow10 = 1000000000; + return 10; + } + // LCOV_EXCL_STOP + if (n >= 100000000) + { + pow10 = 100000000; + return 9; + } + if (n >= 10000000) + { + pow10 = 10000000; + return 8; + } + if (n >= 1000000) + { + pow10 = 1000000; + return 7; + } + if (n >= 100000) + { + pow10 = 100000; + return 6; + } + if (n >= 10000) + { + pow10 = 10000; + return 5; + } + if (n >= 1000) + { + pow10 = 1000; + return 4; + } + if (n >= 100) + { + pow10 = 100; + return 3; + } + if (n >= 10) + { + pow10 = 10; + return 2; + } + + pow10 = 1; + return 1; +} + +inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta, + std::uint64_t rest, std::uint64_t ten_k) +{ + JSON_ASSERT(len >= 1); + JSON_ASSERT(dist <= delta); + JSON_ASSERT(rest <= delta); + JSON_ASSERT(ten_k > 0); + + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // ten_k + // <------> + // <---- rest ----> + // --------------[------------------+----+--------------]-------------- + // w V + // = buf * 10^k + // + // ten_k represents a unit-in-the-last-place in the decimal representation + // stored in buf. + // Decrement buf by ten_k while this takes buf closer to w. + + // The tests are written in this order to avoid overflow in unsigned + // integer arithmetic. + + while (rest < dist + && delta - rest >= ten_k + && (rest + ten_k < dist || dist - rest > rest + ten_k - dist)) + { + JSON_ASSERT(buf[len - 1] != '0'); + buf[len - 1]--; + rest += ten_k; + } +} + +/*! +Generates V = buffer * 10^decimal_exponent, such that M- <= V <= M+. +M- and M+ must be normalized and share the same exponent -60 <= e <= -32. +*/ +inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, + diyfp M_minus, diyfp w, diyfp M_plus) +{ + static_assert(kAlpha >= -60, "internal error"); + static_assert(kGamma <= -32, "internal error"); + + // Generates the digits (and the exponent) of a decimal floating-point + // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's + // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma. + // + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // Grisu2 generates the digits of M+ from left to right and stops as soon as + // V is in [M-,M+]. + + JSON_ASSERT(M_plus.e >= kAlpha); + JSON_ASSERT(M_plus.e <= kGamma); + + std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e) + std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e) + + // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): + // + // M+ = f * 2^e + // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e + // = ((p1 ) * 2^-e + (p2 )) * 2^e + // = p1 + p2 * 2^e + + const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); + + auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) + std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e + + // 1) + // + // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] + + JSON_ASSERT(p1 > 0); + + std::uint32_t pow10{}; + const int k = find_largest_pow10(p1, pow10); + + // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) + // + // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) + // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) + // + // M+ = p1 + p2 * 2^e + // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e + // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e + // = d[k-1] * 10^(k-1) + ( rest) * 2^e + // + // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) + // + // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] + // + // but stop as soon as + // + // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e + + int n = k; + while (n > 0) + { + // Invariants: + // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) + // pow10 = 10^(n-1) <= p1 < 10^n + // + const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) + const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) + // + // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e + // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) + // + JSON_ASSERT(d <= 9); + buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) + // + p1 = r; + n--; + // + // M+ = buffer * 10^n + (p1 + p2 * 2^e) + // pow10 = 10^n + // + + // Now check if enough digits have been generated. + // Compute + // + // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e + // + // Note: + // Since rest and delta share the same exponent e, it suffices to + // compare the significands. + const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; + if (rest <= delta) + { + // V = buffer * 10^n, with M- <= V <= M+. + + decimal_exponent += n; + + // We may now just stop. But instead look if the buffer could be + // decremented to bring V closer to w. + // + // pow10 = 10^n is now 1 ulp in the decimal representation V. + // The rounding procedure works with diyfp's with an implicit + // exponent of e. + // + // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e + // + const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; + grisu2_round(buffer, length, dist, delta, rest, ten_n); + + return; + } + + pow10 /= 10; + // + // pow10 = 10^(n-1) <= p1 < 10^n + // Invariants restored. + } + + // 2) + // + // The digits of the integral part have been generated: + // + // M+ = d[k-1]...d[1]d[0] + p2 * 2^e + // = buffer + p2 * 2^e + // + // Now generate the digits of the fractional part p2 * 2^e. + // + // Note: + // No decimal point is generated: the exponent is adjusted instead. + // + // p2 actually represents the fraction + // + // p2 * 2^e + // = p2 / 2^-e + // = d[-1] / 10^1 + d[-2] / 10^2 + ... + // + // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) + // + // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m + // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) + // + // using + // + // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) + // = ( d) * 2^-e + ( r) + // + // or + // 10^m * p2 * 2^e = d + r * 2^e + // + // i.e. + // + // M+ = buffer + p2 * 2^e + // = buffer + 10^-m * (d + r * 2^e) + // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e + // + // and stop as soon as 10^-m * r * 2^e <= delta * 2^e + + JSON_ASSERT(p2 > delta); + + int m = 0; + for (;;) + { + // Invariant: + // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e + // = buffer * 10^-m + 10^-m * (p2 ) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e + // + JSON_ASSERT(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10); + p2 *= 10; + const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e + const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e + // + // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) + // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + JSON_ASSERT(d <= 9); + buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + p2 = r; + m++; + // + // M+ = buffer * 10^-m + 10^-m * p2 * 2^e + // Invariant restored. + + // Check if enough digits have been generated. + // + // 10^-m * p2 * 2^e <= delta * 2^e + // p2 * 2^e <= 10^m * delta * 2^e + // p2 <= 10^m * delta + delta *= 10; + dist *= 10; + if (p2 <= delta) + { + break; + } + } + + // V = buffer * 10^-m, with M- <= V <= M+. + + decimal_exponent -= m; + + // 1 ulp in the decimal representation is now 10^-m. + // Since delta and dist are now scaled by 10^m, we need to do the + // same with ulp in order to keep the units in sync. + // + // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e + // + const std::uint64_t ten_m = one.f; + grisu2_round(buffer, length, dist, delta, p2, ten_m); + + // By construction this algorithm generates the shortest possible decimal + // number (Loitsch, Theorem 6.2) which rounds back to w. + // For an input number of precision p, at least + // + // N = 1 + ceil(p * log_10(2)) + // + // decimal digits are sufficient to identify all binary floating-point + // numbers (Matula, "In-and-Out conversions"). + // This implies that the algorithm does not produce more than N decimal + // digits. + // + // N = 17 for p = 53 (IEEE double precision) + // N = 9 for p = 24 (IEEE single precision) +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +JSON_HEDLEY_NON_NULL(1) +inline void grisu2(char* buf, int& len, int& decimal_exponent, + diyfp m_minus, diyfp v, diyfp m_plus) +{ + JSON_ASSERT(m_plus.e == m_minus.e); + JSON_ASSERT(m_plus.e == v.e); + + // --------(-----------------------+-----------------------)-------- (A) + // m- v m+ + // + // --------------------(-----------+-----------------------)-------- (B) + // m- v m+ + // + // First scale v (and m- and m+) such that the exponent is in the range + // [alpha, gamma]. + + const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); + + const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k + + // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma] + const diyfp w = diyfp::mul(v, c_minus_k); + const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); + const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); + + // ----(---+---)---------------(---+---)---------------(---+---)---- + // w- w w+ + // = c*m- = c*v = c*m+ + // + // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and + // w+ are now off by a small amount. + // In fact: + // + // w - v * 10^k < 1 ulp + // + // To account for this inaccuracy, add resp. subtract 1 ulp. + // + // --------+---[---------------(---+---)---------------]---+-------- + // w- M- w M+ w+ + // + // Now any number in [M-, M+] (bounds included) will round to w when input, + // regardless of how the input rounding algorithm breaks ties. + // + // And digit_gen generates the shortest possible such number in [M-, M+]. + // Note that this does not mean that Grisu2 always generates the shortest + // possible number in the interval (m-, m+). + const diyfp M_minus(w_minus.f + 1, w_minus.e); + const diyfp M_plus (w_plus.f - 1, w_plus.e ); + + decimal_exponent = -cached.k; // = -(-k) = k + + grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +template<typename FloatType> +JSON_HEDLEY_NON_NULL(1) +void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) +{ + static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3, + "internal error: not enough precision"); + + JSON_ASSERT(std::isfinite(value)); + JSON_ASSERT(value > 0); + + // If the neighbors (and boundaries) of 'value' are always computed for double-precision + // numbers, all float's can be recovered using strtod (and strtof). However, the resulting + // decimal representations are not exactly "short". + // + // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars) + // says "value is converted to a string as if by std::sprintf in the default ("C") locale" + // and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars' + // does. + // On the other hand, the documentation for 'std::to_chars' requires that "parsing the + // representation using the corresponding std::from_chars function recovers value exactly". That + // indicates that single precision floating-point numbers should be recovered using + // 'std::strtof'. + // + // NB: If the neighbors are computed for single-precision numbers, there is a single float + // (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision + // value is off by 1 ulp. +#if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if) + const boundaries w = compute_boundaries(static_cast<double>(value)); +#else + const boundaries w = compute_boundaries(value); +#endif + + grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); +} + +/*! +@brief appends a decimal representation of e to buf +@return a pointer to the element following the exponent. +@pre -1000 < e < 1000 +*/ +JSON_HEDLEY_NON_NULL(1) +JSON_HEDLEY_RETURNS_NON_NULL +inline char* append_exponent(char* buf, int e) +{ + JSON_ASSERT(e > -1000); + JSON_ASSERT(e < 1000); + + if (e < 0) + { + e = -e; + *buf++ = '-'; + } + else + { + *buf++ = '+'; + } + + auto k = static_cast<std::uint32_t>(e); + if (k < 10) + { + // Always print at least two digits in the exponent. + // This is for compatibility with printf("%g"). + *buf++ = '0'; + *buf++ = static_cast<char>('0' + k); + } + else if (k < 100) + { + *buf++ = static_cast<char>('0' + k / 10); + k %= 10; + *buf++ = static_cast<char>('0' + k); + } + else + { + *buf++ = static_cast<char>('0' + k / 100); + k %= 100; + *buf++ = static_cast<char>('0' + k / 10); + k %= 10; + *buf++ = static_cast<char>('0' + k); + } + + return buf; +} + +/*! +@brief prettify v = buf * 10^decimal_exponent + +If v is in the range [10^min_exp, 10^max_exp) it will be printed in fixed-point +notation. Otherwise it will be printed in exponential notation. + +@pre min_exp < 0 +@pre max_exp > 0 +*/ +JSON_HEDLEY_NON_NULL(1) +JSON_HEDLEY_RETURNS_NON_NULL +inline char* format_buffer(char* buf, int len, int decimal_exponent, + int min_exp, int max_exp) +{ + JSON_ASSERT(min_exp < 0); + JSON_ASSERT(max_exp > 0); + + const int k = len; + const int n = len + decimal_exponent; + + // v = buf * 10^(n-k) + // k is the length of the buffer (number of decimal digits) + // n is the position of the decimal point relative to the start of the buffer. + + if (k <= n && n <= max_exp) + { + // digits[000] + // len <= max_exp + 2 + + std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k)); + // Make it look like a floating-point number (#362, #378) + buf[n + 0] = '.'; + buf[n + 1] = '0'; + return buf + (static_cast<size_t>(n) + 2); + } + + if (0 < n && n <= max_exp) + { + // dig.its + // len <= max_digits10 + 1 + + JSON_ASSERT(k > n); + + std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n)); + buf[n] = '.'; + return buf + (static_cast<size_t>(k) + 1U); + } + + if (min_exp < n && n <= 0) + { + // 0.[000]digits + // len <= 2 + (-min_exp - 1) + max_digits10 + + std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k)); + buf[0] = '0'; + buf[1] = '.'; + std::memset(buf + 2, '0', static_cast<size_t>(-n)); + return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k)); + } + + if (k == 1) + { + // dE+123 + // len <= 1 + 5 + + buf += 1; + } + else + { + // d.igitsE+123 + // len <= max_digits10 + 1 + 5 + + std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1); + buf[1] = '.'; + buf += 1 + static_cast<size_t>(k); + } + + *buf++ = 'e'; + return append_exponent(buf, n - 1); +} + +} // namespace dtoa_impl + +/*! +@brief generates a decimal representation of the floating-point number value in [first, last). + +The format of the resulting decimal representation is similar to printf's %g +format. Returns an iterator pointing past-the-end of the decimal representation. + +@note The input number must be finite, i.e. NaN's and Inf's are not supported. +@note The buffer must be large enough. +@note The result is NOT null-terminated. +*/ +template<typename FloatType> +JSON_HEDLEY_NON_NULL(1, 2) +JSON_HEDLEY_RETURNS_NON_NULL +char* to_chars(char* first, const char* last, FloatType value) +{ + static_cast<void>(last); // maybe unused - fix warning + JSON_ASSERT(std::isfinite(value)); + + // Use signbit(value) instead of (value < 0) since signbit works for -0. + if (std::signbit(value)) + { + value = -value; + *first++ = '-'; + } + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + if (value == 0) // +-0 + { + *first++ = '0'; + // Make it look like a floating-point number (#362, #378) + *first++ = '.'; + *first++ = '0'; + return first; + } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + + JSON_ASSERT(last - first >= std::numeric_limits<FloatType>::max_digits10); + + // Compute v = buffer * 10^decimal_exponent. + // The decimal digits are stored in the buffer, which needs to be interpreted + // as an unsigned decimal integer. + // len is the length of the buffer, i.e. the number of decimal digits. + int len = 0; + int decimal_exponent = 0; + dtoa_impl::grisu2(first, len, decimal_exponent, value); + + JSON_ASSERT(len <= std::numeric_limits<FloatType>::max_digits10); + + // Format the buffer like printf("%.*g", prec, value) + constexpr int kMinExp = -4; + // Use digits10 here to increase compatibility with version 2. + constexpr int kMaxExp = std::numeric_limits<FloatType>::digits10; + + JSON_ASSERT(last - first >= kMaxExp + 2); + JSON_ASSERT(last - first >= 2 + (-kMinExp - 1) + std::numeric_limits<FloatType>::max_digits10); + JSON_ASSERT(last - first >= std::numeric_limits<FloatType>::max_digits10 + 6); + + return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, kMaxExp); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/exceptions.hpp> + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/cpp_future.hpp> + +// #include <nlohmann/detail/output/binary_writer.hpp> + +// #include <nlohmann/detail/output/output_adapters.hpp> + +// #include <nlohmann/detail/string_concat.hpp> + +// #include <nlohmann/detail/value_t.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////////////// +// serialization // +/////////////////// + +/// how to treat decoding errors +enum class error_handler_t +{ + strict, ///< throw a type_error exception in case of invalid UTF-8 + replace, ///< replace invalid UTF-8 sequences with U+FFFD + ignore ///< ignore invalid UTF-8 sequences +}; + +template<typename BasicJsonType> +class serializer +{ + using string_t = typename BasicJsonType::string_t; + using number_float_t = typename BasicJsonType::number_float_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using binary_char_t = typename BasicJsonType::binary_t::value_type; + static constexpr std::uint8_t UTF8_ACCEPT = 0; + static constexpr std::uint8_t UTF8_REJECT = 1; + + public: + /*! + @param[in] s output stream to serialize to + @param[in] ichar indentation character to use + @param[in] error_handler_ how to react on decoding errors + */ + serializer(output_adapter_t<char> s, const char ichar, + error_handler_t error_handler_ = error_handler_t::strict) + : o(std::move(s)) + , loc(std::localeconv()) + , thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep))) + , decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point))) + , indent_char(ichar) + , indent_string(512, indent_char) + , error_handler(error_handler_) + {} + + // delete because of pointer members + serializer(const serializer&) = delete; + serializer& operator=(const serializer&) = delete; + serializer(serializer&&) = delete; + serializer& operator=(serializer&&) = delete; + ~serializer() = default; + + /*! + @brief internal implementation of the serialization function + + This function is called by the public member function dump and organizes + the serialization internally. The indentation level is propagated as + additional parameter. In case of arrays and objects, the function is + called recursively. + + - strings and object keys are escaped using `escape_string()` + - integer numbers are converted implicitly via `operator<<` + - floating-point numbers are converted to a string using `"%g"` format + - binary values are serialized as objects containing the subtype and the + byte array + + @param[in] val value to serialize + @param[in] pretty_print whether the output shall be pretty-printed + @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters + in the output are escaped with `\uXXXX` sequences, and the result consists + of ASCII characters only. + @param[in] indent_step the indent level + @param[in] current_indent the current indent level (only used internally) + */ + void dump(const BasicJsonType& val, + const bool pretty_print, + const bool ensure_ascii, + const unsigned int indent_step, + const unsigned int current_indent = 0) + { + switch (val.m_data.m_type) + { + case value_t::object: + { + if (val.m_data.m_value.object->empty()) + { + o->write_characters("{}", 2); + return; + } + + if (pretty_print) + { + o->write_characters("{\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + auto i = val.m_data.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_data.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + JSON_ASSERT(i != val.m_data.m_value.object->cend()); + JSON_ASSERT(std::next(i) == val.m_data.m_value.object->cend()); + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character('}'); + } + else + { + o->write_character('{'); + + // first n-1 elements + auto i = val.m_data.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_data.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + JSON_ASSERT(i != val.m_data.m_value.object->cend()); + JSON_ASSERT(std::next(i) == val.m_data.m_value.object->cend()); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + + o->write_character('}'); + } + + return; + } + + case value_t::array: + { + if (val.m_data.m_value.array->empty()) + { + o->write_characters("[]", 2); + return; + } + + if (pretty_print) + { + o->write_characters("[\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + for (auto i = val.m_data.m_value.array->cbegin(); + i != val.m_data.m_value.array->cend() - 1; ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + dump(*i, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + JSON_ASSERT(!val.m_data.m_value.array->empty()); + o->write_characters(indent_string.c_str(), new_indent); + dump(val.m_data.m_value.array->back(), true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character(']'); + } + else + { + o->write_character('['); + + // first n-1 elements + for (auto i = val.m_data.m_value.array->cbegin(); + i != val.m_data.m_value.array->cend() - 1; ++i) + { + dump(*i, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + JSON_ASSERT(!val.m_data.m_value.array->empty()); + dump(val.m_data.m_value.array->back(), false, ensure_ascii, indent_step, current_indent); + + o->write_character(']'); + } + + return; + } + + case value_t::string: + { + o->write_character('\"'); + dump_escaped(*val.m_data.m_value.string, ensure_ascii); + o->write_character('\"'); + return; + } + + case value_t::binary: + { + if (pretty_print) + { + o->write_characters("{\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + o->write_characters(indent_string.c_str(), new_indent); + + o->write_characters("\"bytes\": [", 10); + + if (!val.m_data.m_value.binary->empty()) + { + for (auto i = val.m_data.m_value.binary->cbegin(); + i != val.m_data.m_value.binary->cend() - 1; ++i) + { + dump_integer(*i); + o->write_characters(", ", 2); + } + dump_integer(val.m_data.m_value.binary->back()); + } + + o->write_characters("],\n", 3); + o->write_characters(indent_string.c_str(), new_indent); + + o->write_characters("\"subtype\": ", 11); + if (val.m_data.m_value.binary->has_subtype()) + { + dump_integer(val.m_data.m_value.binary->subtype()); + } + else + { + o->write_characters("null", 4); + } + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character('}'); + } + else + { + o->write_characters("{\"bytes\":[", 10); + + if (!val.m_data.m_value.binary->empty()) + { + for (auto i = val.m_data.m_value.binary->cbegin(); + i != val.m_data.m_value.binary->cend() - 1; ++i) + { + dump_integer(*i); + o->write_character(','); + } + dump_integer(val.m_data.m_value.binary->back()); + } + + o->write_characters("],\"subtype\":", 12); + if (val.m_data.m_value.binary->has_subtype()) + { + dump_integer(val.m_data.m_value.binary->subtype()); + o->write_character('}'); + } + else + { + o->write_characters("null}", 5); + } + } + return; + } + + case value_t::boolean: + { + if (val.m_data.m_value.boolean) + { + o->write_characters("true", 4); + } + else + { + o->write_characters("false", 5); + } + return; + } + + case value_t::number_integer: + { + dump_integer(val.m_data.m_value.number_integer); + return; + } + + case value_t::number_unsigned: + { + dump_integer(val.m_data.m_value.number_unsigned); + return; + } + + case value_t::number_float: + { + dump_float(val.m_data.m_value.number_float); + return; + } + + case value_t::discarded: + { + o->write_characters("<discarded>", 11); + return; + } + + case value_t::null: + { + o->write_characters("null", 4); + return; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + } + + JSON_PRIVATE_UNLESS_TESTED: + /*! + @brief dump escaped string + + Escape a string by replacing certain special characters by a sequence of an + escape character (backslash) and another character and other control + characters by a sequence of "\u" followed by a four-digit hex + representation. The escaped string is written to output stream @a o. + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + + @complexity Linear in the length of string @a s. + */ + void dump_escaped(const string_t& s, const bool ensure_ascii) + { + std::uint32_t codepoint{}; + std::uint8_t state = UTF8_ACCEPT; + std::size_t bytes = 0; // number of bytes written to string_buffer + + // number of bytes written at the point of the last valid byte + std::size_t bytes_after_last_accept = 0; + std::size_t undumped_chars = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + const auto byte = static_cast<std::uint8_t>(s[i]); + + switch (decode(state, codepoint, byte)) + { + case UTF8_ACCEPT: // decode found a new code point + { + switch (codepoint) + { + case 0x08: // backspace + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'b'; + break; + } + + case 0x09: // horizontal tab + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 't'; + break; + } + + case 0x0A: // newline + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'n'; + break; + } + + case 0x0C: // formfeed + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'f'; + break; + } + + case 0x0D: // carriage return + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'r'; + break; + } + + case 0x22: // quotation mark + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = '\"'; + break; + } + + case 0x5C: // reverse solidus + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = '\\'; + break; + } + + default: + { + // escape control characters (0x00..0x1F) or, if + // ensure_ascii parameter is used, non-ASCII characters + if ((codepoint <= 0x1F) || (ensure_ascii && (codepoint >= 0x7F))) + { + if (codepoint <= 0xFFFF) + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + static_cast<void>((std::snprintf)(string_buffer.data() + bytes, 7, "\\u%04x", + static_cast<std::uint16_t>(codepoint))); + bytes += 6; + } + else + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + static_cast<void>((std::snprintf)(string_buffer.data() + bytes, 13, "\\u%04x\\u%04x", + static_cast<std::uint16_t>(0xD7C0u + (codepoint >> 10u)), + static_cast<std::uint16_t>(0xDC00u + (codepoint & 0x3FFu)))); + bytes += 12; + } + } + else + { + // copy byte to buffer (all previous bytes + // been copied have in default case above) + string_buffer[bytes++] = s[i]; + } + break; + } + } + + // write buffer and reset index; there must be 13 bytes + // left, as this is the maximal number of bytes to be + // written ("\uxxxx\uxxxx\0") for one code point + if (string_buffer.size() - bytes < 13) + { + o->write_characters(string_buffer.data(), bytes); + bytes = 0; + } + + // remember the byte position of this accept + bytes_after_last_accept = bytes; + undumped_chars = 0; + break; + } + + case UTF8_REJECT: // decode found invalid UTF-8 byte + { + switch (error_handler) + { + case error_handler_t::strict: + { + JSON_THROW(type_error::create(316, concat("invalid UTF-8 byte at index ", std::to_string(i), ": 0x", hex_bytes(byte | 0)), nullptr)); + } + + case error_handler_t::ignore: + case error_handler_t::replace: + { + // in case we saw this character the first time, we + // would like to read it again, because the byte + // may be OK for itself, but just not OK for the + // previous sequence + if (undumped_chars > 0) + { + --i; + } + + // reset length buffer to the last accepted index; + // thus removing/ignoring the invalid characters + bytes = bytes_after_last_accept; + + if (error_handler == error_handler_t::replace) + { + // add a replacement character + if (ensure_ascii) + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'u'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'd'; + } + else + { + string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xEF'); + string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBF'); + string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\xBD'); + } + + // write buffer and reset index; there must be 13 bytes + // left, as this is the maximal number of bytes to be + // written ("\uxxxx\uxxxx\0") for one code point + if (string_buffer.size() - bytes < 13) + { + o->write_characters(string_buffer.data(), bytes); + bytes = 0; + } + + bytes_after_last_accept = bytes; + } + + undumped_chars = 0; + + // continue processing the string + state = UTF8_ACCEPT; + break; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + break; + } + + default: // decode found yet incomplete multi-byte code point + { + if (!ensure_ascii) + { + // code point will not be escaped - copy byte to buffer + string_buffer[bytes++] = s[i]; + } + ++undumped_chars; + break; + } + } + } + + // we finished processing the string + if (JSON_HEDLEY_LIKELY(state == UTF8_ACCEPT)) + { + // write buffer + if (bytes > 0) + { + o->write_characters(string_buffer.data(), bytes); + } + } + else + { + // we finish reading, but do not accept: string was incomplete + switch (error_handler) + { + case error_handler_t::strict: + { + JSON_THROW(type_error::create(316, concat("incomplete UTF-8 string; last byte: 0x", hex_bytes(static_cast<std::uint8_t>(s.back() | 0))), nullptr)); + } + + case error_handler_t::ignore: + { + // write all accepted bytes + o->write_characters(string_buffer.data(), bytes_after_last_accept); + break; + } + + case error_handler_t::replace: + { + // write all accepted bytes + o->write_characters(string_buffer.data(), bytes_after_last_accept); + // add a replacement character + if (ensure_ascii) + { + o->write_characters("\\ufffd", 6); + } + else + { + o->write_characters("\xEF\xBF\xBD", 3); + } + break; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + } + } + + private: + /*! + @brief count digits + + Count the number of decimal (base 10) digits for an input unsigned integer. + + @param[in] x unsigned integer number to count its digits + @return number of decimal digits + */ + inline unsigned int count_digits(number_unsigned_t x) noexcept + { + unsigned int n_digits = 1; + for (;;) + { + if (x < 10) + { + return n_digits; + } + if (x < 100) + { + return n_digits + 1; + } + if (x < 1000) + { + return n_digits + 2; + } + if (x < 10000) + { + return n_digits + 3; + } + x = x / 10000u; + n_digits += 4; + } + } + + /*! + * @brief convert a byte to a uppercase hex representation + * @param[in] byte byte to represent + * @return representation ("00".."FF") + */ + static std::string hex_bytes(std::uint8_t byte) + { + std::string result = "FF"; + constexpr const char* nibble_to_hex = "0123456789ABCDEF"; + result[0] = nibble_to_hex[byte / 16]; + result[1] = nibble_to_hex[byte % 16]; + return result; + } + + // templates to avoid warnings about useless casts + template <typename NumberType, enable_if_t<std::is_signed<NumberType>::value, int> = 0> + bool is_negative_number(NumberType x) + { + return x < 0; + } + + template < typename NumberType, enable_if_t <std::is_unsigned<NumberType>::value, int > = 0 > + bool is_negative_number(NumberType /*unused*/) + { + return false; + } + + /*! + @brief dump an integer + + Dump a given integer to output stream @a o. Works internally with + @a number_buffer. + + @param[in] x integer number (signed or unsigned) to dump + @tparam NumberType either @a number_integer_t or @a number_unsigned_t + */ + template < typename NumberType, detail::enable_if_t < + std::is_integral<NumberType>::value || + std::is_same<NumberType, number_unsigned_t>::value || + std::is_same<NumberType, number_integer_t>::value || + std::is_same<NumberType, binary_char_t>::value, + int > = 0 > + void dump_integer(NumberType x) + { + static constexpr std::array<std::array<char, 2>, 100> digits_to_99 + { + { + {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, + {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, + {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, + {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, + {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, + {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, + {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, + {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, + {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, + {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, + } + }; + + // special case for "0" + if (x == 0) + { + o->write_character('0'); + return; + } + + // use a pointer to fill the buffer + auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) + + number_unsigned_t abs_value; + + unsigned int n_chars{}; + + if (is_negative_number(x)) + { + *buffer_ptr = '-'; + abs_value = remove_sign(static_cast<number_integer_t>(x)); + + // account one more byte for the minus sign + n_chars = 1 + count_digits(abs_value); + } + else + { + abs_value = static_cast<number_unsigned_t>(x); + n_chars = count_digits(abs_value); + } + + // spare 1 byte for '\0' + JSON_ASSERT(n_chars < number_buffer.size() - 1); + + // jump to the end to generate the string from backward, + // so we later avoid reversing the result + buffer_ptr += n_chars; + + // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu + // See: https://www.youtube.com/watch?v=o4-CwDo2zpg + while (abs_value >= 100) + { + const auto digits_index = static_cast<unsigned>((abs_value % 100)); + abs_value /= 100; + *(--buffer_ptr) = digits_to_99[digits_index][1]; + *(--buffer_ptr) = digits_to_99[digits_index][0]; + } + + if (abs_value >= 10) + { + const auto digits_index = static_cast<unsigned>(abs_value); + *(--buffer_ptr) = digits_to_99[digits_index][1]; + *(--buffer_ptr) = digits_to_99[digits_index][0]; + } + else + { + *(--buffer_ptr) = static_cast<char>('0' + abs_value); + } + + o->write_characters(number_buffer.data(), n_chars); + } + + /*! + @brief dump a floating-point number + + Dump a given floating-point number to output stream @a o. Works internally + with @a number_buffer. + + @param[in] x floating-point number to dump + */ + void dump_float(number_float_t x) + { + // NaN / inf + if (!std::isfinite(x)) + { + o->write_characters("null", 4); + return; + } + + // If number_float_t is an IEEE-754 single or double precision number, + // use the Grisu2 algorithm to produce short numbers which are + // guaranteed to round-trip, using strtof and strtod, resp. + // + // NB: The test below works if <long double> == <double>. + static constexpr bool is_ieee_single_or_double + = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || + (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); + + dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); + } + + void dump_float(number_float_t x, std::true_type /*is_ieee_single_or_double*/) + { + auto* begin = number_buffer.data(); + auto* end = ::nlohmann::detail::to_chars(begin, begin + number_buffer.size(), x); + + o->write_characters(begin, static_cast<size_t>(end - begin)); + } + + void dump_float(number_float_t x, std::false_type /*is_ieee_single_or_double*/) + { + // get number of digits for a float -> text -> float round-trip + static constexpr auto d = std::numeric_limits<number_float_t>::max_digits10; + + // the actual conversion + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + std::ptrdiff_t len = (std::snprintf)(number_buffer.data(), number_buffer.size(), "%.*g", d, x); + + // negative value indicates an error + JSON_ASSERT(len > 0); + // check if buffer was large enough + JSON_ASSERT(static_cast<std::size_t>(len) < number_buffer.size()); + + // erase thousands separator + if (thousands_sep != '\0') + { + // NOLINTNEXTLINE(readability-qualified-auto,llvm-qualified-auto): std::remove returns an iterator, see https://github.com/nlohmann/json/issues/3081 + const auto end = std::remove(number_buffer.begin(), number_buffer.begin() + len, thousands_sep); + std::fill(end, number_buffer.end(), '\0'); + JSON_ASSERT((end - number_buffer.begin()) <= len); + len = (end - number_buffer.begin()); + } + + // convert decimal point to '.' + if (decimal_point != '\0' && decimal_point != '.') + { + // NOLINTNEXTLINE(readability-qualified-auto,llvm-qualified-auto): std::find returns an iterator, see https://github.com/nlohmann/json/issues/3081 + const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point); + if (dec_pos != number_buffer.end()) + { + *dec_pos = '.'; + } + } + + o->write_characters(number_buffer.data(), static_cast<std::size_t>(len)); + + // determine if we need to append ".0" + const bool value_is_int_like = + std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1, + [](char c) + { + return c == '.' || c == 'e'; + }); + + if (value_is_int_like) + { + o->write_characters(".0", 2); + } + } + + /*! + @brief check whether a string is UTF-8 encoded + + The function checks each byte of a string whether it is UTF-8 encoded. The + result of the check is stored in the @a state parameter. The function must + be called initially with state 0 (accept). State 1 means the string must + be rejected, because the current byte is not allowed. If the string is + completely processed, but the state is non-zero, the string ended + prematurely; that is, the last byte indicated more bytes should have + followed. + + @param[in,out] state the state of the decoding + @param[in,out] codep codepoint (valid only if resulting state is UTF8_ACCEPT) + @param[in] byte next byte to decode + @return new state + + @note The function has been edited: a std::array is used. + + @copyright Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de> + @sa http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + */ + static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept + { + static const std::array<std::uint8_t, 400> utf8d = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF + 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF + 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF + 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF + 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2 + 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4 + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 + 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8 + } + }; + + JSON_ASSERT(byte < utf8d.size()); + const std::uint8_t type = utf8d[byte]; + + codep = (state != UTF8_ACCEPT) + ? (byte & 0x3fu) | (codep << 6u) + : (0xFFu >> type) & (byte); + + const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type); + JSON_ASSERT(index < utf8d.size()); + state = utf8d[index]; + return state; + } + + /* + * Overload to make the compiler happy while it is instantiating + * dump_integer for number_unsigned_t. + * Must never be called. + */ + number_unsigned_t remove_sign(number_unsigned_t x) + { + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + return x; // LCOV_EXCL_LINE + } + + /* + * Helper function for dump_integer + * + * This function takes a negative signed integer and returns its absolute + * value as unsigned integer. The plus/minus shuffling is necessary as we can + * not directly remove the sign of an arbitrary signed integer as the + * absolute values of INT_MIN and INT_MAX are usually not the same. See + * #1708 for details. + */ + inline number_unsigned_t remove_sign(number_integer_t x) noexcept + { + JSON_ASSERT(x < 0 && x < (std::numeric_limits<number_integer_t>::max)()); // NOLINT(misc-redundant-expression) + return static_cast<number_unsigned_t>(-(x + 1)) + 1; + } + + private: + /// the output of the serializer + output_adapter_t<char> o = nullptr; + + /// a (hopefully) large enough character buffer + std::array<char, 64> number_buffer{{}}; + + /// the locale + const std::lconv* loc = nullptr; + /// the locale's thousand separator character + const char thousands_sep = '\0'; + /// the locale's decimal point character + const char decimal_point = '\0'; + + /// string buffer + std::array<char, 512> string_buffer{{}}; + + /// the indentation character + const char indent_char; + /// the indentation string + string_t indent_string; + + /// error_handler how to react on decoding errors + const error_handler_t error_handler; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include <nlohmann/detail/value_t.hpp> + +// #include <nlohmann/json_fwd.hpp> + +// #include <nlohmann/ordered_map.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#include <functional> // equal_to, less +#include <initializer_list> // initializer_list +#include <iterator> // input_iterator_tag, iterator_traits +#include <memory> // allocator +#include <stdexcept> // for out_of_range +#include <type_traits> // enable_if, is_convertible +#include <utility> // pair +#include <vector> // vector + +// #include <nlohmann/detail/macro_scope.hpp> + +// #include <nlohmann/detail/meta/type_traits.hpp> + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/// ordered_map: a minimal map-like container that preserves insertion order +/// for use within nlohmann::basic_json<ordered_map> +template <class Key, class T, class IgnoredLess = std::less<Key>, + class Allocator = std::allocator<std::pair<const Key, T>>> + struct ordered_map : std::vector<std::pair<const Key, T>, Allocator> +{ + using key_type = Key; + using mapped_type = T; + using Container = std::vector<std::pair<const Key, T>, Allocator>; + using iterator = typename Container::iterator; + using const_iterator = typename Container::const_iterator; + using size_type = typename Container::size_type; + using value_type = typename Container::value_type; +#ifdef JSON_HAS_CPP_14 + using key_compare = std::equal_to<>; +#else + using key_compare = std::equal_to<Key>; +#endif + + // Explicit constructors instead of `using Container::Container` + // otherwise older compilers choke on it (GCC <= 5.5, xcode <= 9.4) + ordered_map() noexcept(noexcept(Container())) : Container{} {} + explicit ordered_map(const Allocator& alloc) noexcept(noexcept(Container(alloc))) : Container{alloc} {} + template <class It> + ordered_map(It first, It last, const Allocator& alloc = Allocator()) + : Container{first, last, alloc} {} + ordered_map(std::initializer_list<value_type> init, const Allocator& alloc = Allocator() ) + : Container{init, alloc} {} + + std::pair<iterator, bool> emplace(const key_type& key, T&& t) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return {it, false}; + } + } + Container::emplace_back(key, std::forward<T>(t)); + return {std::prev(this->end()), true}; + } + + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> + std::pair<iterator, bool> emplace(KeyType && key, T && t) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return {it, false}; + } + } + Container::emplace_back(std::forward<KeyType>(key), std::forward<T>(t)); + return {std::prev(this->end()), true}; + } + + T& operator[](const key_type& key) + { + return emplace(key, T{}).first->second; + } + + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> + T & operator[](KeyType && key) + { + return emplace(std::forward<KeyType>(key), T{}).first->second; + } + + const T& operator[](const key_type& key) const + { + return at(key); + } + + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> + const T & operator[](KeyType && key) const + { + return at(std::forward<KeyType>(key)); + } + + T& at(const key_type& key) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return it->second; + } + } + + JSON_THROW(std::out_of_range("key not found")); + } + + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> + T & at(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return it->second; + } + } + + JSON_THROW(std::out_of_range("key not found")); + } + + const T& at(const key_type& key) const + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return it->second; + } + } + + JSON_THROW(std::out_of_range("key not found")); + } + + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> + const T & at(KeyType && key) const // NOLINT(cppcoreguidelines-missing-std-forward) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return it->second; + } + } + + JSON_THROW(std::out_of_range("key not found")); + } + + size_type erase(const key_type& key) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + // Since we cannot move const Keys, re-construct them in place + for (auto next = it; ++next != this->end(); ++it) + { + it->~value_type(); // Destroy but keep allocation + new (&*it) value_type{std::move(*next)}; + } + Container::pop_back(); + return 1; + } + } + return 0; + } + + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> + size_type erase(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + // Since we cannot move const Keys, re-construct them in place + for (auto next = it; ++next != this->end(); ++it) + { + it->~value_type(); // Destroy but keep allocation + new (&*it) value_type{std::move(*next)}; + } + Container::pop_back(); + return 1; + } + } + return 0; + } + + iterator erase(iterator pos) + { + return erase(pos, std::next(pos)); + } + + iterator erase(iterator first, iterator last) + { + if (first == last) + { + return first; + } + + const auto elements_affected = std::distance(first, last); + const auto offset = std::distance(Container::begin(), first); + + // This is the start situation. We need to delete elements_affected + // elements (3 in this example: e, f, g), and need to return an + // iterator past the last deleted element (h in this example). + // Note that offset is the distance from the start of the vector + // to first. We will need this later. + + // [ a, b, c, d, e, f, g, h, i, j ] + // ^ ^ + // first last + + // Since we cannot move const Keys, we re-construct them in place. + // We start at first and re-construct (viz. copy) the elements from + // the back of the vector. Example for first iteration: + + // ,--------. + // v | destroy e and re-construct with h + // [ a, b, c, d, e, f, g, h, i, j ] + // ^ ^ + // it it + elements_affected + + for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) + { + it->~value_type(); // destroy but keep allocation + new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it + } + + // [ a, b, c, d, h, i, j, h, i, j ] + // ^ ^ + // first last + + // remove the unneeded elements at the end of the vector + Container::resize(this->size() - static_cast<size_type>(elements_affected)); + + // [ a, b, c, d, h, i, j ] + // ^ ^ + // first last + + // first is now pointing past the last deleted element, but we cannot + // use this iterator, because it may have been invalidated by the + // resize call. Instead, we can return begin() + offset. + return Container::begin() + offset; + } + + size_type count(const key_type& key) const + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return 1; + } + } + return 0; + } + + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> + size_type count(KeyType && key) const // NOLINT(cppcoreguidelines-missing-std-forward) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return 1; + } + } + return 0; + } + + iterator find(const key_type& key) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return it; + } + } + return Container::end(); + } + + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> + iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return it; + } + } + return Container::end(); + } + + const_iterator find(const key_type& key) const + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, key)) + { + return it; + } + } + return Container::end(); + } + + std::pair<iterator, bool> insert( value_type&& value ) + { + return emplace(value.first, std::move(value.second)); + } + + std::pair<iterator, bool> insert( const value_type& value ) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (m_compare(it->first, value.first)) + { + return {it, false}; + } + } + Container::push_back(value); + return {--this->end(), true}; + } + + template<typename InputIt> + using require_input_iter = typename std::enable_if<std::is_convertible<typename std::iterator_traits<InputIt>::iterator_category, + std::input_iterator_tag>::value>::type; + + template<typename InputIt, typename = require_input_iter<InputIt>> + void insert(InputIt first, InputIt last) + { + for (auto it = first; it != last; ++it) + { + insert(*it); + } + } + +private: + JSON_NO_UNIQUE_ADDRESS key_compare m_compare = key_compare(); +}; + +NLOHMANN_JSON_NAMESPACE_END + + +#if defined(JSON_HAS_CPP_17) + #if JSON_HAS_STATIC_RTTI + #include <any> + #endif + #include <string_view> +#endif + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +NLOHMANN_JSON_NAMESPACE_BEGIN + +/*! +@brief a class to store JSON values + +@internal +@invariant The member variables @a m_value and @a m_type have the following +relationship: +- If `m_type == value_t::object`, then `m_value.object != nullptr`. +- If `m_type == value_t::array`, then `m_value.array != nullptr`. +- If `m_type == value_t::string`, then `m_value.string != nullptr`. +The invariants are checked by member function assert_invariant(). + +@note ObjectType trick from https://stackoverflow.com/a/9860911 +@endinternal + +@since version 1.0.0 + +@nosubgrouping +*/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions) + : public ::nlohmann::detail::json_base_class<CustomBaseClass> +{ + private: + template<detail::value_t> friend struct detail::external_constructor; + + template<typename> + friend class ::nlohmann::json_pointer; + // can be restored when json_pointer backwards compatibility is removed + // friend ::nlohmann::json_pointer<StringType>; + + template<typename BasicJsonType, typename InputType> + friend class ::nlohmann::detail::parser; + friend ::nlohmann::detail::serializer<basic_json>; + template<typename BasicJsonType> + friend class ::nlohmann::detail::iter_impl; + template<typename BasicJsonType, typename CharType> + friend class ::nlohmann::detail::binary_writer; + template<typename BasicJsonType, typename InputType, typename SAX> + friend class ::nlohmann::detail::binary_reader; + template<typename BasicJsonType> + friend class ::nlohmann::detail::json_sax_dom_parser; + template<typename BasicJsonType> + friend class ::nlohmann::detail::json_sax_dom_callback_parser; + friend class ::nlohmann::detail::exception; + + /// workaround type for MSVC + using basic_json_t = NLOHMANN_BASIC_JSON_TPL; + using json_base_class_t = ::nlohmann::detail::json_base_class<CustomBaseClass>; + + JSON_PRIVATE_UNLESS_TESTED: + // convenience aliases for types residing in namespace detail; + using lexer = ::nlohmann::detail::lexer_base<basic_json>; + + template<typename InputAdapterType> + static ::nlohmann::detail::parser<basic_json, InputAdapterType> parser( + InputAdapterType adapter, + detail::parser_callback_t<basic_json>cb = nullptr, + const bool allow_exceptions = true, + const bool ignore_comments = false + ) + { + return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter), + std::move(cb), allow_exceptions, ignore_comments); + } + + private: + using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t; + template<typename BasicJsonType> + using internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType>; + template<typename BasicJsonType> + using iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType>; + template<typename Iterator> + using iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator>; + template<typename Base> using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base>; + + template<typename CharType> + using output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType>; + + template<typename InputType> + using binary_reader = ::nlohmann::detail::binary_reader<basic_json, InputType>; + template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>; + + JSON_PRIVATE_UNLESS_TESTED: + using serializer = ::nlohmann::detail::serializer<basic_json>; + + public: + using value_t = detail::value_t; + /// JSON Pointer, see @ref nlohmann::json_pointer + using json_pointer = ::nlohmann::json_pointer<StringType>; + template<typename T, typename SFINAE> + using json_serializer = JSONSerializer<T, SFINAE>; + /// how to treat decoding errors + using error_handler_t = detail::error_handler_t; + /// how to treat CBOR tags + using cbor_tag_handler_t = detail::cbor_tag_handler_t; + /// helper type for initializer lists of basic_json values + using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>; + + using input_format_t = detail::input_format_t; + /// SAX interface type, see @ref nlohmann::json_sax + using json_sax_t = json_sax<basic_json>; + + //////////////// + // exceptions // + //////////////// + + /// @name exceptions + /// Classes to implement user-defined exceptions. + /// @{ + + using exception = detail::exception; + using parse_error = detail::parse_error; + using invalid_iterator = detail::invalid_iterator; + using type_error = detail::type_error; + using out_of_range = detail::out_of_range; + using other_error = detail::other_error; + + /// @} + + ///////////////////// + // container types // + ///////////////////// + + /// @name container types + /// The canonic container types to use @ref basic_json like any other STL + /// container. + /// @{ + + /// the type of elements in a basic_json container + using value_type = basic_json; + + /// the type of an element reference + using reference = value_type&; + /// the type of an element const reference + using const_reference = const value_type&; + + /// a type to represent differences between iterators + using difference_type = std::ptrdiff_t; + /// a type to represent container sizes + using size_type = std::size_t; + + /// the allocator type + using allocator_type = AllocatorType<basic_json>; + + /// the type of an element pointer + using pointer = typename std::allocator_traits<allocator_type>::pointer; + /// the type of an element const pointer + using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer; + + /// an iterator for a basic_json container + using iterator = iter_impl<basic_json>; + /// a const iterator for a basic_json container + using const_iterator = iter_impl<const basic_json>; + /// a reverse iterator for a basic_json container + using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>; + /// a const reverse iterator for a basic_json container + using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>; + + /// @} + + /// @brief returns the allocator associated with the container + /// @sa https://json.nlohmann.me/api/basic_json/get_allocator/ + static allocator_type get_allocator() + { + return allocator_type(); + } + + /// @brief returns version information on the library + /// @sa https://json.nlohmann.me/api/basic_json/meta/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json meta() + { + basic_json result; + + result["copyright"] = "(C) 2013-2023 Niels Lohmann"; + result["name"] = "JSON for Modern C++"; + result["url"] = "https://github.com/nlohmann/json"; + result["version"]["string"] = + detail::concat(std::to_string(NLOHMANN_JSON_VERSION_MAJOR), '.', + std::to_string(NLOHMANN_JSON_VERSION_MINOR), '.', + std::to_string(NLOHMANN_JSON_VERSION_PATCH)); + result["version"]["major"] = NLOHMANN_JSON_VERSION_MAJOR; + result["version"]["minor"] = NLOHMANN_JSON_VERSION_MINOR; + result["version"]["patch"] = NLOHMANN_JSON_VERSION_PATCH; + +#ifdef _WIN32 + result["platform"] = "win32"; +#elif defined __linux__ + result["platform"] = "linux"; +#elif defined __APPLE__ + result["platform"] = "apple"; +#elif defined __unix__ + result["platform"] = "unix"; +#else + result["platform"] = "unknown"; +#endif + +#if defined(__ICC) || defined(__INTEL_COMPILER) + result["compiler"] = {{"family", "icc"}, {"version", __INTEL_COMPILER}}; +#elif defined(__clang__) + result["compiler"] = {{"family", "clang"}, {"version", __clang_version__}}; +#elif defined(__GNUC__) || defined(__GNUG__) + result["compiler"] = {{"family", "gcc"}, {"version", detail::concat( + std::to_string(__GNUC__), '.', + std::to_string(__GNUC_MINOR__), '.', + std::to_string(__GNUC_PATCHLEVEL__)) + } + }; +#elif defined(__HP_cc) || defined(__HP_aCC) + result["compiler"] = "hp" +#elif defined(__IBMCPP__) + result["compiler"] = {{"family", "ilecpp"}, {"version", __IBMCPP__}}; +#elif defined(_MSC_VER) + result["compiler"] = {{"family", "msvc"}, {"version", _MSC_VER}}; +#elif defined(__PGI) + result["compiler"] = {{"family", "pgcpp"}, {"version", __PGI}}; +#elif defined(__SUNPRO_CC) + result["compiler"] = {{"family", "sunpro"}, {"version", __SUNPRO_CC}}; +#else + result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}}; +#endif + +#if defined(_MSVC_LANG) + result["compiler"]["c++"] = std::to_string(_MSVC_LANG); +#elif defined(__cplusplus) + result["compiler"]["c++"] = std::to_string(__cplusplus); +#else + result["compiler"]["c++"] = "unknown"; +#endif + return result; + } + + /////////////////////////// + // JSON value data types // + /////////////////////////// + + /// @name JSON value data types + /// The data types to store a JSON value. These types are derived from + /// the template arguments passed to class @ref basic_json. + /// @{ + + /// @brief default object key comparator type + /// The actual object key comparator type (@ref object_comparator_t) may be + /// different. + /// @sa https://json.nlohmann.me/api/basic_json/default_object_comparator_t/ +#if defined(JSON_HAS_CPP_14) + // use of transparent comparator avoids unnecessary repeated construction of temporaries + // in functions involving lookup by key with types other than object_t::key_type (aka. StringType) + using default_object_comparator_t = std::less<>; +#else + using default_object_comparator_t = std::less<StringType>; +#endif + + /// @brief a type for an object + /// @sa https://json.nlohmann.me/api/basic_json/object_t/ + using object_t = ObjectType<StringType, + basic_json, + default_object_comparator_t, + AllocatorType<std::pair<const StringType, + basic_json>>>; + + /// @brief a type for an array + /// @sa https://json.nlohmann.me/api/basic_json/array_t/ + using array_t = ArrayType<basic_json, AllocatorType<basic_json>>; + + /// @brief a type for a string + /// @sa https://json.nlohmann.me/api/basic_json/string_t/ + using string_t = StringType; + + /// @brief a type for a boolean + /// @sa https://json.nlohmann.me/api/basic_json/boolean_t/ + using boolean_t = BooleanType; + + /// @brief a type for a number (integer) + /// @sa https://json.nlohmann.me/api/basic_json/number_integer_t/ + using number_integer_t = NumberIntegerType; + + /// @brief a type for a number (unsigned) + /// @sa https://json.nlohmann.me/api/basic_json/number_unsigned_t/ + using number_unsigned_t = NumberUnsignedType; + + /// @brief a type for a number (floating-point) + /// @sa https://json.nlohmann.me/api/basic_json/number_float_t/ + using number_float_t = NumberFloatType; + + /// @brief a type for a packed binary type + /// @sa https://json.nlohmann.me/api/basic_json/binary_t/ + using binary_t = nlohmann::byte_container_with_subtype<BinaryType>; + + /// @brief object key comparator type + /// @sa https://json.nlohmann.me/api/basic_json/object_comparator_t/ + using object_comparator_t = detail::actual_object_comparator_t<basic_json>; + + /// @} + + private: + + /// helper for exception-safe object creation + template<typename T, typename... Args> + JSON_HEDLEY_RETURNS_NON_NULL + static T* create(Args&& ... args) + { + AllocatorType<T> alloc; + using AllocatorTraits = std::allocator_traits<AllocatorType<T>>; + + auto deleter = [&](T * obj) + { + AllocatorTraits::deallocate(alloc, obj, 1); + }; + std::unique_ptr<T, decltype(deleter)> obj(AllocatorTraits::allocate(alloc, 1), deleter); + AllocatorTraits::construct(alloc, obj.get(), std::forward<Args>(args)...); + JSON_ASSERT(obj != nullptr); + return obj.release(); + } + + //////////////////////// + // JSON value storage // + //////////////////////// + + JSON_PRIVATE_UNLESS_TESTED: + /*! + @brief a JSON value + + The actual storage for a JSON value of the @ref basic_json class. This + union combines the different storage types for the JSON value types + defined in @ref value_t. + + JSON type | value_t type | used type + --------- | --------------- | ------------------------ + object | object | pointer to @ref object_t + array | array | pointer to @ref array_t + string | string | pointer to @ref string_t + boolean | boolean | @ref boolean_t + number | number_integer | @ref number_integer_t + number | number_unsigned | @ref number_unsigned_t + number | number_float | @ref number_float_t + binary | binary | pointer to @ref binary_t + null | null | *no value is stored* + + @note Variable-length types (objects, arrays, and strings) are stored as + pointers. The size of the union should not exceed 64 bits if the default + value types are used. + + @since version 1.0.0 + */ + union json_value + { + /// object (stored with pointer to save storage) + object_t* object; + /// array (stored with pointer to save storage) + array_t* array; + /// string (stored with pointer to save storage) + string_t* string; + /// binary (stored with pointer to save storage) + binary_t* binary; + /// boolean + boolean_t boolean; + /// number (integer) + number_integer_t number_integer; + /// number (unsigned integer) + number_unsigned_t number_unsigned; + /// number (floating-point) + number_float_t number_float; + + /// default constructor (for null values) + json_value() = default; + /// constructor for booleans + json_value(boolean_t v) noexcept : boolean(v) {} + /// constructor for numbers (integer) + json_value(number_integer_t v) noexcept : number_integer(v) {} + /// constructor for numbers (unsigned) + json_value(number_unsigned_t v) noexcept : number_unsigned(v) {} + /// constructor for numbers (floating-point) + json_value(number_float_t v) noexcept : number_float(v) {} + /// constructor for empty values of a given type + json_value(value_t t) + { + switch (t) + { + case value_t::object: + { + object = create<object_t>(); + break; + } + + case value_t::array: + { + array = create<array_t>(); + break; + } + + case value_t::string: + { + string = create<string_t>(""); + break; + } + + case value_t::binary: + { + binary = create<binary_t>(); + break; + } + + case value_t::boolean: + { + boolean = static_cast<boolean_t>(false); + break; + } + + case value_t::number_integer: + { + number_integer = static_cast<number_integer_t>(0); + break; + } + + case value_t::number_unsigned: + { + number_unsigned = static_cast<number_unsigned_t>(0); + break; + } + + case value_t::number_float: + { + number_float = static_cast<number_float_t>(0.0); + break; + } + + case value_t::null: + { + object = nullptr; // silence warning, see #821 + break; + } + + case value_t::discarded: + default: + { + object = nullptr; // silence warning, see #821 + if (JSON_HEDLEY_UNLIKELY(t == value_t::null)) + { + JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE + } + break; + } + } + } + + /// constructor for strings + json_value(const string_t& value) : string(create<string_t>(value)) {} + + /// constructor for rvalue strings + json_value(string_t&& value) : string(create<string_t>(std::move(value))) {} + + /// constructor for objects + json_value(const object_t& value) : object(create<object_t>(value)) {} + + /// constructor for rvalue objects + json_value(object_t&& value) : object(create<object_t>(std::move(value))) {} + + /// constructor for arrays + json_value(const array_t& value) : array(create<array_t>(value)) {} + + /// constructor for rvalue arrays + json_value(array_t&& value) : array(create<array_t>(std::move(value))) {} + + /// constructor for binary arrays + json_value(const typename binary_t::container_type& value) : binary(create<binary_t>(value)) {} + + /// constructor for rvalue binary arrays + json_value(typename binary_t::container_type&& value) : binary(create<binary_t>(std::move(value))) {} + + /// constructor for binary arrays (internal type) + json_value(const binary_t& value) : binary(create<binary_t>(value)) {} + + /// constructor for rvalue binary arrays (internal type) + json_value(binary_t&& value) : binary(create<binary_t>(std::move(value))) {} + + void destroy(value_t t) + { + if ( + (t == value_t::object && object == nullptr) || + (t == value_t::array && array == nullptr) || + (t == value_t::string && string == nullptr) || + (t == value_t::binary && binary == nullptr) + ) + { + //not initialized (e.g. due to exception in the ctor) + return; + } + if (t == value_t::array || t == value_t::object) + { + // flatten the current json_value to a heap-allocated stack + std::vector<basic_json> stack; + + // move the top-level items to stack + if (t == value_t::array) + { + stack.reserve(array->size()); + std::move(array->begin(), array->end(), std::back_inserter(stack)); + } + else + { + stack.reserve(object->size()); + for (auto&& it : *object) + { + stack.push_back(std::move(it.second)); + } + } + + while (!stack.empty()) + { + // move the last item to local variable to be processed + basic_json current_item(std::move(stack.back())); + stack.pop_back(); + + // if current_item is array/object, move + // its children to the stack to be processed later + if (current_item.is_array()) + { + std::move(current_item.m_data.m_value.array->begin(), current_item.m_data.m_value.array->end(), std::back_inserter(stack)); + + current_item.m_data.m_value.array->clear(); + } + else if (current_item.is_object()) + { + for (auto&& it : *current_item.m_data.m_value.object) + { + stack.push_back(std::move(it.second)); + } + + current_item.m_data.m_value.object->clear(); + } + + // it's now safe that current_item get destructed + // since it doesn't have any children + } + } + + switch (t) + { + case value_t::object: + { + AllocatorType<object_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, object); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1); + break; + } + + case value_t::array: + { + AllocatorType<array_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, array); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1); + break; + } + + case value_t::string: + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1); + break; + } + + case value_t::binary: + { + AllocatorType<binary_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, binary); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1); + break; + } + + case value_t::null: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::discarded: + default: + { + break; + } + } + } + }; + + private: + /*! + @brief checks the class invariants + + This function asserts the class invariants. It needs to be called at the + end of every constructor to make sure that created objects respect the + invariant. Furthermore, it has to be called each time the type of a JSON + value is changed, because the invariant expresses a relationship between + @a m_type and @a m_value. + + Furthermore, the parent relation is checked for arrays and objects: If + @a check_parents true and the value is an array or object, then the + container's elements must have the current value as parent. + + @param[in] check_parents whether the parent relation should be checked. + The value is true by default and should only be set to false + during destruction of objects when the invariant does not + need to hold. + */ + void assert_invariant(bool check_parents = true) const noexcept + { + JSON_ASSERT(m_data.m_type != value_t::object || m_data.m_value.object != nullptr); + JSON_ASSERT(m_data.m_type != value_t::array || m_data.m_value.array != nullptr); + JSON_ASSERT(m_data.m_type != value_t::string || m_data.m_value.string != nullptr); + JSON_ASSERT(m_data.m_type != value_t::binary || m_data.m_value.binary != nullptr); + +#if JSON_DIAGNOSTICS + JSON_TRY + { + // cppcheck-suppress assertWithSideEffect + JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j) + { + return j.m_parent == this; + })); + } + JSON_CATCH(...) {} // LCOV_EXCL_LINE +#endif + static_cast<void>(check_parents); + } + + void set_parents() + { +#if JSON_DIAGNOSTICS + switch (m_data.m_type) + { + case value_t::array: + { + for (auto& element : *m_data.m_value.array) + { + element.m_parent = this; + } + break; + } + + case value_t::object: + { + for (auto& element : *m_data.m_value.object) + { + element.second.m_parent = this; + } + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + break; + } +#endif + } + + iterator set_parents(iterator it, typename iterator::difference_type count_set_parents) + { +#if JSON_DIAGNOSTICS + for (typename iterator::difference_type i = 0; i < count_set_parents; ++i) + { + (it + i)->m_parent = this; + } +#else + static_cast<void>(count_set_parents); +#endif + return it; + } + + reference set_parent(reference j, std::size_t old_capacity = static_cast<std::size_t>(-1)) + { +#if JSON_DIAGNOSTICS + if (old_capacity != static_cast<std::size_t>(-1)) + { + // see https://github.com/nlohmann/json/issues/2838 + JSON_ASSERT(type() == value_t::array); + if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity)) + { + // capacity has changed: update all parents + set_parents(); + return j; + } + } + + // ordered_json uses a vector internally, so pointers could have + // been invalidated; see https://github.com/nlohmann/json/issues/2962 +#ifdef JSON_HEDLEY_MSVC_VERSION +#pragma warning(push ) +#pragma warning(disable : 4127) // ignore warning to replace if with if constexpr +#endif + if (detail::is_ordered_map<object_t>::value) + { + set_parents(); + return j; + } +#ifdef JSON_HEDLEY_MSVC_VERSION +#pragma warning( pop ) +#endif + + j.m_parent = this; +#else + static_cast<void>(j); + static_cast<void>(old_capacity); +#endif + return j; + } + + public: + ////////////////////////// + // JSON parser callback // + ////////////////////////// + + /// @brief parser event types + /// @sa https://json.nlohmann.me/api/basic_json/parse_event_t/ + using parse_event_t = detail::parse_event_t; + + /// @brief per-element parser callback type + /// @sa https://json.nlohmann.me/api/basic_json/parser_callback_t/ + using parser_callback_t = detail::parser_callback_t<basic_json>; + + ////////////////// + // constructors // + ////////////////// + + /// @name constructors and destructors + /// Constructors of class @ref basic_json, copy/move constructor, copy + /// assignment, static functions creating objects, and the destructor. + /// @{ + + /// @brief create an empty value with a given type + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(const value_t v) + : m_data(v) + { + assert_invariant(); + } + + /// @brief create a null object + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(std::nullptr_t = nullptr) noexcept // NOLINT(bugprone-exception-escape) + : basic_json(value_t::null) + { + assert_invariant(); + } + + /// @brief create a JSON value from compatible types + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + template < typename CompatibleType, + typename U = detail::uncvref_t<CompatibleType>, + detail::enable_if_t < + !detail::is_basic_json<U>::value && detail::is_compatible_type<basic_json_t, U>::value, int > = 0 > + basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload,bugprone-exception-escape) + JSONSerializer<U>::to_json(std::declval<basic_json_t&>(), + std::forward<CompatibleType>(val)))) + { + JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val)); + set_parents(); + assert_invariant(); + } + + /// @brief create a JSON value from an existing one + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + template < typename BasicJsonType, + detail::enable_if_t < + detail::is_basic_json<BasicJsonType>::value&& !std::is_same<basic_json, BasicJsonType>::value, int > = 0 > + basic_json(const BasicJsonType& val) + { + using other_boolean_t = typename BasicJsonType::boolean_t; + using other_number_float_t = typename BasicJsonType::number_float_t; + using other_number_integer_t = typename BasicJsonType::number_integer_t; + using other_number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using other_string_t = typename BasicJsonType::string_t; + using other_object_t = typename BasicJsonType::object_t; + using other_array_t = typename BasicJsonType::array_t; + using other_binary_t = typename BasicJsonType::binary_t; + + switch (val.type()) + { + case value_t::boolean: + JSONSerializer<other_boolean_t>::to_json(*this, val.template get<other_boolean_t>()); + break; + case value_t::number_float: + JSONSerializer<other_number_float_t>::to_json(*this, val.template get<other_number_float_t>()); + break; + case value_t::number_integer: + JSONSerializer<other_number_integer_t>::to_json(*this, val.template get<other_number_integer_t>()); + break; + case value_t::number_unsigned: + JSONSerializer<other_number_unsigned_t>::to_json(*this, val.template get<other_number_unsigned_t>()); + break; + case value_t::string: + JSONSerializer<other_string_t>::to_json(*this, val.template get_ref<const other_string_t&>()); + break; + case value_t::object: + JSONSerializer<other_object_t>::to_json(*this, val.template get_ref<const other_object_t&>()); + break; + case value_t::array: + JSONSerializer<other_array_t>::to_json(*this, val.template get_ref<const other_array_t&>()); + break; + case value_t::binary: + JSONSerializer<other_binary_t>::to_json(*this, val.template get_ref<const other_binary_t&>()); + break; + case value_t::null: + *this = nullptr; + break; + case value_t::discarded: + m_data.m_type = value_t::discarded; + break; + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + JSON_ASSERT(m_data.m_type == val.type()); + set_parents(); + assert_invariant(); + } + + /// @brief create a container (array or object) from an initializer list + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(initializer_list_t init, + bool type_deduction = true, + value_t manual_type = value_t::array) + { + // check if each element is an array with two elements whose first + // element is a string + bool is_an_object = std::all_of(init.begin(), init.end(), + [](const detail::json_ref<basic_json>& element_ref) + { + // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; + // (many string types can be constructed from 0 via its null-pointer guise, so we get a + // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) + return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); + }); + + // adjust type if type deduction is not wanted + if (!type_deduction) + { + // if array is wanted, do not create an object though possible + if (manual_type == value_t::array) + { + is_an_object = false; + } + + // if object is wanted but impossible, throw an exception + if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) + { + JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); + } + } + + if (is_an_object) + { + // the initializer list is a list of pairs -> create object + m_data.m_type = value_t::object; + m_data.m_value = value_t::object; + + for (auto& element_ref : init) + { + auto element = element_ref.moved_or_copied(); + m_data.m_value.object->emplace( + std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), + std::move((*element.m_data.m_value.array)[1])); + } + } + else + { + // the initializer list describes an array -> create array + m_data.m_type = value_t::array; + m_data.m_value.array = create<array_t>(init.begin(), init.end()); + } + + set_parents(); + assert_invariant(); + } + + /// @brief explicitly create a binary array (without subtype) + /// @sa https://json.nlohmann.me/api/basic_json/binary/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json binary(const typename binary_t::container_type& init) + { + auto res = basic_json(); + res.m_data.m_type = value_t::binary; + res.m_data.m_value = init; + return res; + } + + /// @brief explicitly create a binary array (with subtype) + /// @sa https://json.nlohmann.me/api/basic_json/binary/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json binary(const typename binary_t::container_type& init, typename binary_t::subtype_type subtype) + { + auto res = basic_json(); + res.m_data.m_type = value_t::binary; + res.m_data.m_value = binary_t(init, subtype); + return res; + } + + /// @brief explicitly create a binary array + /// @sa https://json.nlohmann.me/api/basic_json/binary/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json binary(typename binary_t::container_type&& init) + { + auto res = basic_json(); + res.m_data.m_type = value_t::binary; + res.m_data.m_value = std::move(init); + return res; + } + + /// @brief explicitly create a binary array (with subtype) + /// @sa https://json.nlohmann.me/api/basic_json/binary/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json binary(typename binary_t::container_type&& init, typename binary_t::subtype_type subtype) + { + auto res = basic_json(); + res.m_data.m_type = value_t::binary; + res.m_data.m_value = binary_t(std::move(init), subtype); + return res; + } + + /// @brief explicitly create an array from an initializer list + /// @sa https://json.nlohmann.me/api/basic_json/array/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json array(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::array); + } + + /// @brief explicitly create an object from an initializer list + /// @sa https://json.nlohmann.me/api/basic_json/object/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json object(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::object); + } + + /// @brief construct an array with count copies of given value + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(size_type cnt, const basic_json& val): + m_data{cnt, val} + { + set_parents(); + assert_invariant(); + } + + /// @brief construct a JSON container given an iterator range + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + template < class InputIT, typename std::enable_if < + std::is_same<InputIT, typename basic_json_t::iterator>::value || + std::is_same<InputIT, typename basic_json_t::const_iterator>::value, int >::type = 0 > + basic_json(InputIT first, InputIT last) + { + JSON_ASSERT(first.m_object != nullptr); + JSON_ASSERT(last.m_object != nullptr); + + // make sure iterator fits the current value + if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(201, "iterators are not compatible", nullptr)); + } + + // copy type from first iterator + m_data.m_type = first.m_object->m_data.m_type; + + // check if iterator range is complete for primitive values + switch (m_data.m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_HEDLEY_UNLIKELY(!first.m_it.primitive_iterator.is_begin() + || !last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range", first.m_object)); + } + break; + } + + case value_t::null: + case value_t::object: + case value_t::array: + case value_t::binary: + case value_t::discarded: + default: + break; + } + + switch (m_data.m_type) + { + case value_t::number_integer: + { + m_data.m_value.number_integer = first.m_object->m_data.m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_data.m_value.number_unsigned = first.m_object->m_data.m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_data.m_value.number_float = first.m_object->m_data.m_value.number_float; + break; + } + + case value_t::boolean: + { + m_data.m_value.boolean = first.m_object->m_data.m_value.boolean; + break; + } + + case value_t::string: + { + m_data.m_value = *first.m_object->m_data.m_value.string; + break; + } + + case value_t::object: + { + m_data.m_value.object = create<object_t>(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + m_data.m_value.array = create<array_t>(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + case value_t::binary: + { + m_data.m_value = *first.m_object->m_data.m_value.binary; + break; + } + + case value_t::null: + case value_t::discarded: + default: + JSON_THROW(invalid_iterator::create(206, detail::concat("cannot construct with iterators from ", first.m_object->type_name()), first.m_object)); + } + + set_parents(); + assert_invariant(); + } + + /////////////////////////////////////// + // other constructors and destructor // + /////////////////////////////////////// + + template<typename JsonRef, + detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>, + std::is_same<typename JsonRef::value_type, basic_json>>::value, int> = 0 > + basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {} + + /// @brief copy constructor + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(const basic_json& other) + : json_base_class_t(other) + { + m_data.m_type = other.m_data.m_type; + // check of passed value is valid + other.assert_invariant(); + + switch (m_data.m_type) + { + case value_t::object: + { + m_data.m_value = *other.m_data.m_value.object; + break; + } + + case value_t::array: + { + m_data.m_value = *other.m_data.m_value.array; + break; + } + + case value_t::string: + { + m_data.m_value = *other.m_data.m_value.string; + break; + } + + case value_t::boolean: + { + m_data.m_value = other.m_data.m_value.boolean; + break; + } + + case value_t::number_integer: + { + m_data.m_value = other.m_data.m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_data.m_value = other.m_data.m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_data.m_value = other.m_data.m_value.number_float; + break; + } + + case value_t::binary: + { + m_data.m_value = *other.m_data.m_value.binary; + break; + } + + case value_t::null: + case value_t::discarded: + default: + break; + } + + set_parents(); + assert_invariant(); + } + + /// @brief move constructor + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(basic_json&& other) noexcept + : json_base_class_t(std::forward<json_base_class_t>(other)), + m_data(std::move(other.m_data)) + { + // check that passed value is valid + other.assert_invariant(false); + + // invalidate payload + other.m_data.m_type = value_t::null; + other.m_data.m_value = {}; + + set_parents(); + assert_invariant(); + } + + /// @brief copy assignment + /// @sa https://json.nlohmann.me/api/basic_json/operator=/ + basic_json& operator=(basic_json other) noexcept ( + std::is_nothrow_move_constructible<value_t>::value&& + std::is_nothrow_move_assignable<value_t>::value&& + std::is_nothrow_move_constructible<json_value>::value&& + std::is_nothrow_move_assignable<json_value>::value&& + std::is_nothrow_move_assignable<json_base_class_t>::value + ) + { + // check that passed value is valid + other.assert_invariant(); + + using std::swap; + swap(m_data.m_type, other.m_data.m_type); + swap(m_data.m_value, other.m_data.m_value); + json_base_class_t::operator=(std::move(other)); + + set_parents(); + assert_invariant(); + return *this; + } + + /// @brief destructor + /// @sa https://json.nlohmann.me/api/basic_json/~basic_json/ + ~basic_json() noexcept + { + assert_invariant(false); + } + + /// @} + + public: + /////////////////////// + // object inspection // + /////////////////////// + + /// @name object inspection + /// Functions to inspect the type of a JSON value. + /// @{ + + /// @brief serialization + /// @sa https://json.nlohmann.me/api/basic_json/dump/ + string_t dump(const int indent = -1, + const char indent_char = ' ', + const bool ensure_ascii = false, + const error_handler_t error_handler = error_handler_t::strict) const + { + string_t result; + serializer s(detail::output_adapter<char, string_t>(result), indent_char, error_handler); + + if (indent >= 0) + { + s.dump(*this, true, ensure_ascii, static_cast<unsigned int>(indent)); + } + else + { + s.dump(*this, false, ensure_ascii, 0); + } + + return result; + } + + /// @brief return the type of the JSON value (explicit) + /// @sa https://json.nlohmann.me/api/basic_json/type/ + constexpr value_t type() const noexcept + { + return m_data.m_type; + } + + /// @brief return whether type is primitive + /// @sa https://json.nlohmann.me/api/basic_json/is_primitive/ + constexpr bool is_primitive() const noexcept + { + return is_null() || is_string() || is_boolean() || is_number() || is_binary(); + } + + /// @brief return whether type is structured + /// @sa https://json.nlohmann.me/api/basic_json/is_structured/ + constexpr bool is_structured() const noexcept + { + return is_array() || is_object(); + } + + /// @brief return whether value is null + /// @sa https://json.nlohmann.me/api/basic_json/is_null/ + constexpr bool is_null() const noexcept + { + return m_data.m_type == value_t::null; + } + + /// @brief return whether value is a boolean + /// @sa https://json.nlohmann.me/api/basic_json/is_boolean/ + constexpr bool is_boolean() const noexcept + { + return m_data.m_type == value_t::boolean; + } + + /// @brief return whether value is a number + /// @sa https://json.nlohmann.me/api/basic_json/is_number/ + constexpr bool is_number() const noexcept + { + return is_number_integer() || is_number_float(); + } + + /// @brief return whether value is an integer number + /// @sa https://json.nlohmann.me/api/basic_json/is_number_integer/ + constexpr bool is_number_integer() const noexcept + { + return m_data.m_type == value_t::number_integer || m_data.m_type == value_t::number_unsigned; + } + + /// @brief return whether value is an unsigned integer number + /// @sa https://json.nlohmann.me/api/basic_json/is_number_unsigned/ + constexpr bool is_number_unsigned() const noexcept + { + return m_data.m_type == value_t::number_unsigned; + } + + /// @brief return whether value is a floating-point number + /// @sa https://json.nlohmann.me/api/basic_json/is_number_float/ + constexpr bool is_number_float() const noexcept + { + return m_data.m_type == value_t::number_float; + } + + /// @brief return whether value is an object + /// @sa https://json.nlohmann.me/api/basic_json/is_object/ + constexpr bool is_object() const noexcept + { + return m_data.m_type == value_t::object; + } + + /// @brief return whether value is an array + /// @sa https://json.nlohmann.me/api/basic_json/is_array/ + constexpr bool is_array() const noexcept + { + return m_data.m_type == value_t::array; + } + + /// @brief return whether value is a string + /// @sa https://json.nlohmann.me/api/basic_json/is_string/ + constexpr bool is_string() const noexcept + { + return m_data.m_type == value_t::string; + } + + /// @brief return whether value is a binary array + /// @sa https://json.nlohmann.me/api/basic_json/is_binary/ + constexpr bool is_binary() const noexcept + { + return m_data.m_type == value_t::binary; + } + + /// @brief return whether value is discarded + /// @sa https://json.nlohmann.me/api/basic_json/is_discarded/ + constexpr bool is_discarded() const noexcept + { + return m_data.m_type == value_t::discarded; + } + + /// @brief return the type of the JSON value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/operator_value_t/ + constexpr operator value_t() const noexcept + { + return m_data.m_type; + } + + /// @} + + private: + ////////////////// + // value access // + ////////////////// + + /// get a boolean (explicit) + boolean_t get_impl(boolean_t* /*unused*/) const + { + if (JSON_HEDLEY_LIKELY(is_boolean())) + { + return m_data.m_value.boolean; + } + + JSON_THROW(type_error::create(302, detail::concat("type must be boolean, but is ", type_name()), this)); + } + + /// get a pointer to the value (object) + object_t* get_impl_ptr(object_t* /*unused*/) noexcept + { + return is_object() ? m_data.m_value.object : nullptr; + } + + /// get a pointer to the value (object) + constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept + { + return is_object() ? m_data.m_value.object : nullptr; + } + + /// get a pointer to the value (array) + array_t* get_impl_ptr(array_t* /*unused*/) noexcept + { + return is_array() ? m_data.m_value.array : nullptr; + } + + /// get a pointer to the value (array) + constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept + { + return is_array() ? m_data.m_value.array : nullptr; + } + + /// get a pointer to the value (string) + string_t* get_impl_ptr(string_t* /*unused*/) noexcept + { + return is_string() ? m_data.m_value.string : nullptr; + } + + /// get a pointer to the value (string) + constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept + { + return is_string() ? m_data.m_value.string : nullptr; + } + + /// get a pointer to the value (boolean) + boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept + { + return is_boolean() ? &m_data.m_value.boolean : nullptr; + } + + /// get a pointer to the value (boolean) + constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept + { + return is_boolean() ? &m_data.m_value.boolean : nullptr; + } + + /// get a pointer to the value (integer number) + number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept + { + return is_number_integer() ? &m_data.m_value.number_integer : nullptr; + } + + /// get a pointer to the value (integer number) + constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept + { + return is_number_integer() ? &m_data.m_value.number_integer : nullptr; + } + + /// get a pointer to the value (unsigned number) + number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept + { + return is_number_unsigned() ? &m_data.m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (unsigned number) + constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept + { + return is_number_unsigned() ? &m_data.m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (floating-point number) + number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept + { + return is_number_float() ? &m_data.m_value.number_float : nullptr; + } + + /// get a pointer to the value (floating-point number) + constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept + { + return is_number_float() ? &m_data.m_value.number_float : nullptr; + } + + /// get a pointer to the value (binary) + binary_t* get_impl_ptr(binary_t* /*unused*/) noexcept + { + return is_binary() ? m_data.m_value.binary : nullptr; + } + + /// get a pointer to the value (binary) + constexpr const binary_t* get_impl_ptr(const binary_t* /*unused*/) const noexcept + { + return is_binary() ? m_data.m_value.binary : nullptr; + } + + /*! + @brief helper function to implement get_ref() + + This function helps to implement get_ref() without code duplication for + const and non-const overloads + + @tparam ThisType will be deduced as `basic_json` or `const basic_json` + + @throw type_error.303 if ReferenceType does not match underlying value + type of the current JSON + */ + template<typename ReferenceType, typename ThisType> + static ReferenceType get_ref_impl(ThisType& obj) + { + // delegate the call to get_ptr<>() + auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); + + if (JSON_HEDLEY_LIKELY(ptr != nullptr)) + { + return *ptr; + } + + JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj)); + } + + public: + /// @name value access + /// Direct access to the stored value of a JSON value. + /// @{ + + /// @brief get a pointer value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_ptr/ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + auto get_ptr() noexcept -> decltype(std::declval<basic_json_t&>().get_impl_ptr(std::declval<PointerType>())) + { + // delegate the call to get_impl_ptr<>() + return get_impl_ptr(static_cast<PointerType>(nullptr)); + } + + /// @brief get a pointer value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_ptr/ + template < typename PointerType, typename std::enable_if < + std::is_pointer<PointerType>::value&& + std::is_const<typename std::remove_pointer<PointerType>::type>::value, int >::type = 0 > + constexpr auto get_ptr() const noexcept -> decltype(std::declval<const basic_json_t&>().get_impl_ptr(std::declval<PointerType>())) + { + // delegate the call to get_impl_ptr<>() const + return get_impl_ptr(static_cast<PointerType>(nullptr)); + } + + private: + /*! + @brief get a value (explicit) + + Explicit type conversion between the JSON value and a compatible value + which is [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible) + and [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). + The value is converted by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + ValueType ret; + JSONSerializer<ValueType>::from_json(*this, ret); + return ret; + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json, + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `void from_json(const basic_json&, ValueType&)`, and + - @ref json_serializer<ValueType> does not have a `from_json()` method of + the form `ValueType from_json(const basic_json&)` + + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,get__ValueType_const} + + @since version 2.1.0 + */ + template < typename ValueType, + detail::enable_if_t < + detail::is_default_constructible<ValueType>::value&& + detail::has_from_json<basic_json_t, ValueType>::value, + int > = 0 > + ValueType get_impl(detail::priority_tag<0> /*unused*/) const noexcept(noexcept( + JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>()))) + { + auto ret = ValueType(); + JSONSerializer<ValueType>::from_json(*this, ret); + return ret; + } + + /*! + @brief get a value (explicit); special case + + Explicit type conversion between the JSON value and a compatible value + which is **not** [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible) + and **not** [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). + The value is converted by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + return JSONSerializer<ValueType>::from_json(*this); + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json and + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `ValueType from_json(const basic_json&)` + + @note If @ref json_serializer<ValueType> has both overloads of + `from_json()`, this one is chosen. + + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @since version 2.1.0 + */ + template < typename ValueType, + detail::enable_if_t < + detail::has_non_default_from_json<basic_json_t, ValueType>::value, + int > = 0 > + ValueType get_impl(detail::priority_tag<1> /*unused*/) const noexcept(noexcept( + JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>()))) + { + return JSONSerializer<ValueType>::from_json(*this); + } + + /*! + @brief get special-case overload + + This overloads converts the current @ref basic_json in a different + @ref basic_json type + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this, converted into @a BasicJsonType + + @complexity Depending on the implementation of the called `from_json()` + method. + + @since version 3.2.0 + */ + template < typename BasicJsonType, + detail::enable_if_t < + detail::is_basic_json<BasicJsonType>::value, + int > = 0 > + BasicJsonType get_impl(detail::priority_tag<2> /*unused*/) const + { + return *this; + } + + /*! + @brief get special-case overload + + This overloads avoids a lot of template boilerplate, it can be seen as the + identity method + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this + + @complexity Constant. + + @since version 2.1.0 + */ + template<typename BasicJsonType, + detail::enable_if_t< + std::is_same<BasicJsonType, basic_json_t>::value, + int> = 0> + basic_json get_impl(detail::priority_tag<3> /*unused*/) const + { + return *this; + } + + /*! + @brief get a pointer value (explicit) + @copydoc get() + */ + template<typename PointerType, + detail::enable_if_t< + std::is_pointer<PointerType>::value, + int> = 0> + constexpr auto get_impl(detail::priority_tag<4> /*unused*/) const noexcept + -> decltype(std::declval<const basic_json_t&>().template get_ptr<PointerType>()) + { + // delegate the call to get_ptr + return get_ptr<PointerType>(); + } + + public: + /*! + @brief get a (pointer) value (explicit) + + Performs explicit type conversion between the JSON value and a compatible value if required. + + - If the requested type is a pointer to the internally stored JSON value that pointer is returned. + No copies are made. + + - If the requested type is the current @ref basic_json, or a different @ref basic_json convertible + from the current @ref basic_json. + + - Otherwise the value is converted by calling the @ref json_serializer<ValueType> `from_json()` + method. + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @tparam ValueType if necessary + + @throw what @ref json_serializer<ValueType> `from_json()` method throws if conversion is required + + @since version 2.1.0 + */ + template < typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>> +#if defined(JSON_HAS_CPP_14) + constexpr +#endif + auto get() const noexcept( + noexcept(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))) + -> decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {})) + { + // we cannot static_assert on ValueTypeCV being non-const, because + // there is support for get<const basic_json_t>(), which is why we + // still need the uncvref + static_assert(!std::is_reference<ValueTypeCV>::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + return get_impl<ValueType>(detail::priority_tag<4> {}); + } + + /*! + @brief get a pointer value (explicit) + + Explicit pointer access to the internally stored JSON value. No copies are + made. + + @warning The pointer becomes invalid if the underlying JSON object + changes. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get__PointerType} + + @sa see @ref get_ptr() for explicit pointer-member access + + @since version 1.0.0 + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + auto get() noexcept -> decltype(std::declval<basic_json_t&>().template get_ptr<PointerType>()) + { + // delegate the call to get_ptr + return get_ptr<PointerType>(); + } + + /// @brief get a value (explicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_to/ + template < typename ValueType, + detail::enable_if_t < + !detail::is_basic_json<ValueType>::value&& + detail::has_from_json<basic_json_t, ValueType>::value, + int > = 0 > + ValueType & get_to(ValueType& v) const noexcept(noexcept( + JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v))) + { + JSONSerializer<ValueType>::from_json(*this, v); + return v; + } + + // specialization to allow calling get_to with a basic_json value + // see https://github.com/nlohmann/json/issues/2175 + template<typename ValueType, + detail::enable_if_t < + detail::is_basic_json<ValueType>::value, + int> = 0> + ValueType & get_to(ValueType& v) const + { + v = *this; + return v; + } + + template < + typename T, std::size_t N, + typename Array = T (&)[N], // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + detail::enable_if_t < + detail::has_from_json<basic_json_t, Array>::value, int > = 0 > + Array get_to(T (&v)[N]) const // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + noexcept(noexcept(JSONSerializer<Array>::from_json( + std::declval<const basic_json_t&>(), v))) + { + JSONSerializer<Array>::from_json(*this, v); + return v; + } + + /// @brief get a reference value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_ref/ + template<typename ReferenceType, typename std::enable_if< + std::is_reference<ReferenceType>::value, int>::type = 0> + ReferenceType get_ref() + { + // delegate call to get_ref_impl + return get_ref_impl<ReferenceType>(*this); + } + + /// @brief get a reference value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_ref/ + template < typename ReferenceType, typename std::enable_if < + std::is_reference<ReferenceType>::value&& + std::is_const<typename std::remove_reference<ReferenceType>::type>::value, int >::type = 0 > + ReferenceType get_ref() const + { + // delegate call to get_ref_impl + return get_ref_impl<ReferenceType>(*this); + } + + /*! + @brief get a value (implicit) + + Implicit type conversion between the JSON value and a compatible value. + The call is realized by calling @ref get() const. + + @tparam ValueType non-pointer type compatible to the JSON value, for + instance `int` for JSON integer numbers, `bool` for JSON booleans, or + `std::vector` types for JSON arrays. The character type of @ref string_t + as well as an initializer list of this type is excluded to avoid + ambiguities as these types implicitly convert to `std::string`. + + @return copy of the JSON value, converted to type @a ValueType + + @throw type_error.302 in case passed type @a ValueType is incompatible + to the JSON value type (e.g., the JSON value is of type boolean, but a + string is requested); see example below + + @complexity Linear in the size of the JSON value. + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,operator__ValueType} + + @since version 1.0.0 + */ + template < typename ValueType, typename std::enable_if < + detail::conjunction < + detail::negation<std::is_pointer<ValueType>>, + detail::negation<std::is_same<ValueType, std::nullptr_t>>, + detail::negation<std::is_same<ValueType, detail::json_ref<basic_json>>>, + detail::negation<std::is_same<ValueType, typename string_t::value_type>>, + detail::negation<detail::is_basic_json<ValueType>>, + detail::negation<std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>>, +#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSC_VER <= 1914)) + detail::negation<std::is_same<ValueType, std::string_view>>, +#endif +#if defined(JSON_HAS_CPP_17) && JSON_HAS_STATIC_RTTI + detail::negation<std::is_same<ValueType, std::any>>, +#endif + detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType> + >::value, int >::type = 0 > + JSON_EXPLICIT operator ValueType() const + { + // delegate the call to get<>() const + return get<ValueType>(); + } + + /// @brief get a binary value + /// @sa https://json.nlohmann.me/api/basic_json/get_binary/ + binary_t& get_binary() + { + if (!is_binary()) + { + JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this)); + } + + return *get_ptr<binary_t*>(); + } + + /// @brief get a binary value + /// @sa https://json.nlohmann.me/api/basic_json/get_binary/ + const binary_t& get_binary() const + { + if (!is_binary()) + { + JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this)); + } + + return *get_ptr<const binary_t*>(); + } + + /// @} + + //////////////////// + // element access // + //////////////////// + + /// @name element access + /// Access to the JSON value. + /// @{ + + /// @brief access specified array element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + reference at(size_type idx) + { + // at only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + JSON_TRY + { + return set_parent(m_data.m_value.array->at(idx)); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this)); + } + } + else + { + JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); + } + } + + /// @brief access specified array element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + const_reference at(size_type idx) const + { + // at only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + JSON_TRY + { + return m_data.m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this)); + } + } + else + { + JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); + } + } + + /// @brief access specified object element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + reference at(const typename object_t::key_type& key) + { + // at only works for objects + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); + } + + auto it = m_data.m_value.object->find(key); + if (it == m_data.m_value.object->end()) + { + JSON_THROW(out_of_range::create(403, detail::concat("key '", key, "' not found"), this)); + } + return set_parent(it->second); + } + + /// @brief access specified object element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> + reference at(KeyType && key) + { + // at only works for objects + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); + } + + auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); + if (it == m_data.m_value.object->end()) + { + JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); + } + return set_parent(it->second); + } + + /// @brief access specified object element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + const_reference at(const typename object_t::key_type& key) const + { + // at only works for objects + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); + } + + auto it = m_data.m_value.object->find(key); + if (it == m_data.m_value.object->end()) + { + JSON_THROW(out_of_range::create(403, detail::concat("key '", key, "' not found"), this)); + } + return it->second; + } + + /// @brief access specified object element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> + const_reference at(KeyType && key) const + { + // at only works for objects + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); + } + + auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); + if (it == m_data.m_value.object->end()) + { + JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); + } + return it->second; + } + + /// @brief access specified array element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + reference operator[](size_type idx) + { + // implicitly convert null value to an empty array + if (is_null()) + { + m_data.m_type = value_t::array; + m_data.m_value.array = create<array_t>(); + assert_invariant(); + } + + // operator[] only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + // fill up array with null values if given idx is outside range + if (idx >= m_data.m_value.array->size()) + { +#if JSON_DIAGNOSTICS + // remember array size & capacity before resizing + const auto old_size = m_data.m_value.array->size(); + const auto old_capacity = m_data.m_value.array->capacity(); +#endif + m_data.m_value.array->resize(idx + 1); + +#if JSON_DIAGNOSTICS + if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity)) + { + // capacity has changed: update all parents + set_parents(); + } + else + { + // set parent for values added above + set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size)); + } +#endif + assert_invariant(); + } + + return m_data.m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); + } + + /// @brief access specified array element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + const_reference operator[](size_type idx) const + { + // const operator[] only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + return m_data.m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); + } + + /// @brief access specified object element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + reference operator[](typename object_t::key_type key) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_data.m_type = value_t::object; + m_data.m_value.object = create<object_t>(); + assert_invariant(); + } + + // operator[] only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + auto result = m_data.m_value.object->emplace(std::move(key), nullptr); + return set_parent(result.first->second); + } + + JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); + } + + /// @brief access specified object element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + const_reference operator[](const typename object_t::key_type& key) const + { + // const operator[] only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + auto it = m_data.m_value.object->find(key); + JSON_ASSERT(it != m_data.m_value.object->end()); + return it->second; + } + + JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); + } + + // these two functions resolve a (const) char * ambiguity affecting Clang and MSVC + // (they seemingly cannot be constrained to resolve the ambiguity) + template<typename T> + reference operator[](T* key) + { + return operator[](typename object_t::key_type(key)); + } + + template<typename T> + const_reference operator[](T* key) const + { + return operator[](typename object_t::key_type(key)); + } + + /// @brief access specified object element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int > = 0 > + reference operator[](KeyType && key) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_data.m_type = value_t::object; + m_data.m_value.object = create<object_t>(); + assert_invariant(); + } + + // operator[] only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + auto result = m_data.m_value.object->emplace(std::forward<KeyType>(key), nullptr); + return set_parent(result.first->second); + } + + JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); + } + + /// @brief access specified object element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int > = 0 > + const_reference operator[](KeyType && key) const + { + // const operator[] only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); + JSON_ASSERT(it != m_data.m_value.object->end()); + return it->second; + } + + JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); + } + + private: + template<typename KeyType> + using is_comparable_with_object_key = detail::is_comparable < + object_comparator_t, const typename object_t::key_type&, KeyType >; + + template<typename ValueType> + using value_return_type = std::conditional < + detail::is_c_string_uncvref<ValueType>::value, + string_t, typename std::decay<ValueType>::type >; + + public: + /// @brief access specified object element with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + template < class ValueType, detail::enable_if_t < + !detail::is_transparent<object_comparator_t>::value + && detail::is_getable<basic_json_t, ValueType>::value + && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > + ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const + { + // value only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(key); + if (it != end()) + { + return it->template get<ValueType>(); + } + + return default_value; + } + + JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this)); + } + + /// @brief access specified object element with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + template < class ValueType, class ReturnType = typename value_return_type<ValueType>::type, + detail::enable_if_t < + !detail::is_transparent<object_comparator_t>::value + && detail::is_getable<basic_json_t, ReturnType>::value + && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > + ReturnType value(const typename object_t::key_type& key, ValueType && default_value) const + { + // value only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(key); + if (it != end()) + { + return it->template get<ReturnType>(); + } + + return std::forward<ValueType>(default_value); + } + + JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this)); + } + + /// @brief access specified object element with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + template < class ValueType, class KeyType, detail::enable_if_t < + detail::is_transparent<object_comparator_t>::value + && !detail::is_json_pointer<KeyType>::value + && is_comparable_with_object_key<KeyType>::value + && detail::is_getable<basic_json_t, ValueType>::value + && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > + ValueType value(KeyType && key, const ValueType& default_value) const + { + // value only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(std::forward<KeyType>(key)); + if (it != end()) + { + return it->template get<ValueType>(); + } + + return default_value; + } + + JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this)); + } + + /// @brief access specified object element via JSON Pointer with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + template < class ValueType, class KeyType, class ReturnType = typename value_return_type<ValueType>::type, + detail::enable_if_t < + detail::is_transparent<object_comparator_t>::value + && !detail::is_json_pointer<KeyType>::value + && is_comparable_with_object_key<KeyType>::value + && detail::is_getable<basic_json_t, ReturnType>::value + && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > + ReturnType value(KeyType && key, ValueType && default_value) const + { + // value only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(std::forward<KeyType>(key)); + if (it != end()) + { + return it->template get<ReturnType>(); + } + + return std::forward<ValueType>(default_value); + } + + JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this)); + } + + /// @brief access specified object element via JSON Pointer with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + template < class ValueType, detail::enable_if_t < + detail::is_getable<basic_json_t, ValueType>::value + && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > + ValueType value(const json_pointer& ptr, const ValueType& default_value) const + { + // value only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + // if pointer resolves a value, return it or use default value + JSON_TRY + { + return ptr.get_checked(this).template get<ValueType>(); + } + JSON_INTERNAL_CATCH (out_of_range&) + { + return default_value; + } + } + + JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this)); + } + + /// @brief access specified object element via JSON Pointer with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + template < class ValueType, class ReturnType = typename value_return_type<ValueType>::type, + detail::enable_if_t < + detail::is_getable<basic_json_t, ReturnType>::value + && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > + ReturnType value(const json_pointer& ptr, ValueType && default_value) const + { + // value only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + // if pointer resolves a value, return it or use default value + JSON_TRY + { + return ptr.get_checked(this).template get<ReturnType>(); + } + JSON_INTERNAL_CATCH (out_of_range&) + { + return std::forward<ValueType>(default_value); + } + } + + JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this)); + } + + template < class ValueType, class BasicJsonType, detail::enable_if_t < + detail::is_basic_json<BasicJsonType>::value + && detail::is_getable<basic_json_t, ValueType>::value + && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>) // NOLINT(readability/alt_tokens) + ValueType value(const ::nlohmann::json_pointer<BasicJsonType>& ptr, const ValueType& default_value) const + { + return value(ptr.convert(), default_value); + } + + template < class ValueType, class BasicJsonType, class ReturnType = typename value_return_type<ValueType>::type, + detail::enable_if_t < + detail::is_basic_json<BasicJsonType>::value + && detail::is_getable<basic_json_t, ReturnType>::value + && !std::is_same<value_t, detail::uncvref_t<ValueType>>::value, int > = 0 > + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>) // NOLINT(readability/alt_tokens) + ReturnType value(const ::nlohmann::json_pointer<BasicJsonType>& ptr, ValueType && default_value) const + { + return value(ptr.convert(), std::forward<ValueType>(default_value)); + } + + /// @brief access the first element + /// @sa https://json.nlohmann.me/api/basic_json/front/ + reference front() + { + return *begin(); + } + + /// @brief access the first element + /// @sa https://json.nlohmann.me/api/basic_json/front/ + const_reference front() const + { + return *cbegin(); + } + + /// @brief access the last element + /// @sa https://json.nlohmann.me/api/basic_json/back/ + reference back() + { + auto tmp = end(); + --tmp; + return *tmp; + } + + /// @brief access the last element + /// @sa https://json.nlohmann.me/api/basic_json/back/ + const_reference back() const + { + auto tmp = cend(); + --tmp; + return *tmp; + } + + /// @brief remove element given an iterator + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + template < class IteratorType, detail::enable_if_t < + std::is_same<IteratorType, typename basic_json_t::iterator>::value || + std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int > = 0 > + IteratorType erase(IteratorType pos) + { + // make sure iterator fits the current value + if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); + } + + IteratorType result = end(); + + switch (m_data.m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + case value_t::binary: + { + if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) + { + JSON_THROW(invalid_iterator::create(205, "iterator out of range", this)); + } + + if (is_string()) + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); + m_data.m_value.string = nullptr; + } + else if (is_binary()) + { + AllocatorType<binary_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); + m_data.m_value.binary = nullptr; + } + + m_data.m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator); + break; + } + + case value_t::null: + case value_t::discarded: + default: + JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); + } + + return result; + } + + /// @brief remove elements given an iterator range + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + template < class IteratorType, detail::enable_if_t < + std::is_same<IteratorType, typename basic_json_t::iterator>::value || + std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int > = 0 > + IteratorType erase(IteratorType first, IteratorType last) + { + // make sure iterator fits the current value + if (JSON_HEDLEY_UNLIKELY(this != first.m_object || this != last.m_object)) + { + JSON_THROW(invalid_iterator::create(203, "iterators do not fit current value", this)); + } + + IteratorType result = end(); + + switch (m_data.m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + case value_t::binary: + { + if (JSON_HEDLEY_LIKELY(!first.m_it.primitive_iterator.is_begin() + || !last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range", this)); + } + + if (is_string()) + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); + m_data.m_value.string = nullptr; + } + else if (is_binary()) + { + AllocatorType<binary_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); + m_data.m_value.binary = nullptr; + } + + m_data.m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_data.m_value.object->erase(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_data.m_value.array->erase(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + case value_t::null: + case value_t::discarded: + default: + JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); + } + + return result; + } + + private: + template < typename KeyType, detail::enable_if_t < + detail::has_erase_with_key_type<basic_json_t, KeyType>::value, int > = 0 > + size_type erase_internal(KeyType && key) + { + // this erase only works for objects + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); + } + + return m_data.m_value.object->erase(std::forward<KeyType>(key)); + } + + template < typename KeyType, detail::enable_if_t < + !detail::has_erase_with_key_type<basic_json_t, KeyType>::value, int > = 0 > + size_type erase_internal(KeyType && key) + { + // this erase only works for objects + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); + } + + const auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); + if (it != m_data.m_value.object->end()) + { + m_data.m_value.object->erase(it); + return 1; + } + return 0; + } + + public: + + /// @brief remove element from a JSON object given a key + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + size_type erase(const typename object_t::key_type& key) + { + // the indirection via erase_internal() is added to avoid making this + // function a template and thus de-rank it during overload resolution + return erase_internal(key); + } + + /// @brief remove element from a JSON object given a key + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> + size_type erase(KeyType && key) + { + return erase_internal(std::forward<KeyType>(key)); + } + + /// @brief remove element from a JSON array given an index + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + void erase(const size_type idx) + { + // this erase only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + if (JSON_HEDLEY_UNLIKELY(idx >= size())) + { + JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this)); + } + + m_data.m_value.array->erase(m_data.m_value.array->begin() + static_cast<difference_type>(idx)); + } + else + { + JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); + } + } + + /// @} + + //////////// + // lookup // + //////////// + + /// @name lookup + /// @{ + + /// @brief find an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/find/ + iterator find(const typename object_t::key_type& key) + { + auto result = end(); + + if (is_object()) + { + result.m_it.object_iterator = m_data.m_value.object->find(key); + } + + return result; + } + + /// @brief find an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/find/ + const_iterator find(const typename object_t::key_type& key) const + { + auto result = cend(); + + if (is_object()) + { + result.m_it.object_iterator = m_data.m_value.object->find(key); + } + + return result; + } + + /// @brief find an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/find/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> + iterator find(KeyType && key) + { + auto result = end(); + + if (is_object()) + { + result.m_it.object_iterator = m_data.m_value.object->find(std::forward<KeyType>(key)); + } + + return result; + } + + /// @brief find an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/find/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> + const_iterator find(KeyType && key) const + { + auto result = cend(); + + if (is_object()) + { + result.m_it.object_iterator = m_data.m_value.object->find(std::forward<KeyType>(key)); + } + + return result; + } + + /// @brief returns the number of occurrences of a key in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/count/ + size_type count(const typename object_t::key_type& key) const + { + // return 0 for all nonobject types + return is_object() ? m_data.m_value.object->count(key) : 0; + } + + /// @brief returns the number of occurrences of a key in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/count/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> + size_type count(KeyType && key) const + { + // return 0 for all nonobject types + return is_object() ? m_data.m_value.object->count(std::forward<KeyType>(key)) : 0; + } + + /// @brief check the existence of an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/contains/ + bool contains(const typename object_t::key_type& key) const + { + return is_object() && m_data.m_value.object->find(key) != m_data.m_value.object->end(); + } + + /// @brief check the existence of an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/contains/ + template<class KeyType, detail::enable_if_t< + detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value, int> = 0> + bool contains(KeyType && key) const + { + return is_object() && m_data.m_value.object->find(std::forward<KeyType>(key)) != m_data.m_value.object->end(); + } + + /// @brief check the existence of an element in a JSON object given a JSON pointer + /// @sa https://json.nlohmann.me/api/basic_json/contains/ + bool contains(const json_pointer& ptr) const + { + return ptr.contains(this); + } + + template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>) // NOLINT(readability/alt_tokens) + bool contains(const typename ::nlohmann::json_pointer<BasicJsonType>& ptr) const + { + return ptr.contains(this); + } + + /// @} + + /////////////// + // iterators // + /////////////// + + /// @name iterators + /// @{ + + /// @brief returns an iterator to the first element + /// @sa https://json.nlohmann.me/api/basic_json/begin/ + iterator begin() noexcept + { + iterator result(this); + result.set_begin(); + return result; + } + + /// @brief returns an iterator to the first element + /// @sa https://json.nlohmann.me/api/basic_json/begin/ + const_iterator begin() const noexcept + { + return cbegin(); + } + + /// @brief returns a const iterator to the first element + /// @sa https://json.nlohmann.me/api/basic_json/cbegin/ + const_iterator cbegin() const noexcept + { + const_iterator result(this); + result.set_begin(); + return result; + } + + /// @brief returns an iterator to one past the last element + /// @sa https://json.nlohmann.me/api/basic_json/end/ + iterator end() noexcept + { + iterator result(this); + result.set_end(); + return result; + } + + /// @brief returns an iterator to one past the last element + /// @sa https://json.nlohmann.me/api/basic_json/end/ + const_iterator end() const noexcept + { + return cend(); + } + + /// @brief returns an iterator to one past the last element + /// @sa https://json.nlohmann.me/api/basic_json/cend/ + const_iterator cend() const noexcept + { + const_iterator result(this); + result.set_end(); + return result; + } + + /// @brief returns an iterator to the reverse-beginning + /// @sa https://json.nlohmann.me/api/basic_json/rbegin/ + reverse_iterator rbegin() noexcept + { + return reverse_iterator(end()); + } + + /// @brief returns an iterator to the reverse-beginning + /// @sa https://json.nlohmann.me/api/basic_json/rbegin/ + const_reverse_iterator rbegin() const noexcept + { + return crbegin(); + } + + /// @brief returns an iterator to the reverse-end + /// @sa https://json.nlohmann.me/api/basic_json/rend/ + reverse_iterator rend() noexcept + { + return reverse_iterator(begin()); + } + + /// @brief returns an iterator to the reverse-end + /// @sa https://json.nlohmann.me/api/basic_json/rend/ + const_reverse_iterator rend() const noexcept + { + return crend(); + } + + /// @brief returns a const reverse iterator to the last element + /// @sa https://json.nlohmann.me/api/basic_json/crbegin/ + const_reverse_iterator crbegin() const noexcept + { + return const_reverse_iterator(cend()); + } + + /// @brief returns a const reverse iterator to one before the first + /// @sa https://json.nlohmann.me/api/basic_json/crend/ + const_reverse_iterator crend() const noexcept + { + return const_reverse_iterator(cbegin()); + } + + public: + /// @brief wrapper to access iterator member functions in range-based for + /// @sa https://json.nlohmann.me/api/basic_json/items/ + /// @deprecated This function is deprecated since 3.1.0 and will be removed in + /// version 4.0.0 of the library. Please use @ref items() instead; + /// that is, replace `json::iterator_wrapper(j)` with `j.items()`. + JSON_HEDLEY_DEPRECATED_FOR(3.1.0, items()) + static iteration_proxy<iterator> iterator_wrapper(reference ref) noexcept + { + return ref.items(); + } + + /// @brief wrapper to access iterator member functions in range-based for + /// @sa https://json.nlohmann.me/api/basic_json/items/ + /// @deprecated This function is deprecated since 3.1.0 and will be removed in + /// version 4.0.0 of the library. Please use @ref items() instead; + /// that is, replace `json::iterator_wrapper(j)` with `j.items()`. + JSON_HEDLEY_DEPRECATED_FOR(3.1.0, items()) + static iteration_proxy<const_iterator> iterator_wrapper(const_reference ref) noexcept + { + return ref.items(); + } + + /// @brief helper to access iterator member functions in range-based for + /// @sa https://json.nlohmann.me/api/basic_json/items/ + iteration_proxy<iterator> items() noexcept + { + return iteration_proxy<iterator>(*this); + } + + /// @brief helper to access iterator member functions in range-based for + /// @sa https://json.nlohmann.me/api/basic_json/items/ + iteration_proxy<const_iterator> items() const noexcept + { + return iteration_proxy<const_iterator>(*this); + } + + /// @} + + ////////////// + // capacity // + ////////////// + + /// @name capacity + /// @{ + + /// @brief checks whether the container is empty. + /// @sa https://json.nlohmann.me/api/basic_json/empty/ + bool empty() const noexcept + { + switch (m_data.m_type) + { + case value_t::null: + { + // null values are empty + return true; + } + + case value_t::array: + { + // delegate call to array_t::empty() + return m_data.m_value.array->empty(); + } + + case value_t::object: + { + // delegate call to object_t::empty() + return m_data.m_value.object->empty(); + } + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + // all other types are nonempty + return false; + } + } + } + + /// @brief returns the number of elements + /// @sa https://json.nlohmann.me/api/basic_json/size/ + size_type size() const noexcept + { + switch (m_data.m_type) + { + case value_t::null: + { + // null values are empty + return 0; + } + + case value_t::array: + { + // delegate call to array_t::size() + return m_data.m_value.array->size(); + } + + case value_t::object: + { + // delegate call to object_t::size() + return m_data.m_value.object->size(); + } + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + // all other types have size 1 + return 1; + } + } + } + + /// @brief returns the maximum possible number of elements + /// @sa https://json.nlohmann.me/api/basic_json/max_size/ + size_type max_size() const noexcept + { + switch (m_data.m_type) + { + case value_t::array: + { + // delegate call to array_t::max_size() + return m_data.m_value.array->max_size(); + } + + case value_t::object: + { + // delegate call to object_t::max_size() + return m_data.m_value.object->max_size(); + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + // all other types have max_size() == size() + return size(); + } + } + } + + /// @} + + /////////////// + // modifiers // + /////////////// + + /// @name modifiers + /// @{ + + /// @brief clears the contents + /// @sa https://json.nlohmann.me/api/basic_json/clear/ + void clear() noexcept + { + switch (m_data.m_type) + { + case value_t::number_integer: + { + m_data.m_value.number_integer = 0; + break; + } + + case value_t::number_unsigned: + { + m_data.m_value.number_unsigned = 0; + break; + } + + case value_t::number_float: + { + m_data.m_value.number_float = 0.0; + break; + } + + case value_t::boolean: + { + m_data.m_value.boolean = false; + break; + } + + case value_t::string: + { + m_data.m_value.string->clear(); + break; + } + + case value_t::binary: + { + m_data.m_value.binary->clear(); + break; + } + + case value_t::array: + { + m_data.m_value.array->clear(); + break; + } + + case value_t::object: + { + m_data.m_value.object->clear(); + break; + } + + case value_t::null: + case value_t::discarded: + default: + break; + } + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/push_back/ + void push_back(basic_json&& val) + { + // push_back only works for null objects or arrays + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) + { + JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); + } + + // transform null object into an array + if (is_null()) + { + m_data.m_type = value_t::array; + m_data.m_value = value_t::array; + assert_invariant(); + } + + // add element to array (move semantics) + const auto old_capacity = m_data.m_value.array->capacity(); + m_data.m_value.array->push_back(std::move(val)); + set_parent(m_data.m_value.array->back(), old_capacity); + // if val is moved from, basic_json move constructor marks it null, so we do not call the destructor + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/operator+=/ + reference operator+=(basic_json&& val) + { + push_back(std::move(val)); + return *this; + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/push_back/ + void push_back(const basic_json& val) + { + // push_back only works for null objects or arrays + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) + { + JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); + } + + // transform null object into an array + if (is_null()) + { + m_data.m_type = value_t::array; + m_data.m_value = value_t::array; + assert_invariant(); + } + + // add element to array + const auto old_capacity = m_data.m_value.array->capacity(); + m_data.m_value.array->push_back(val); + set_parent(m_data.m_value.array->back(), old_capacity); + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/operator+=/ + reference operator+=(const basic_json& val) + { + push_back(val); + return *this; + } + + /// @brief add an object to an object + /// @sa https://json.nlohmann.me/api/basic_json/push_back/ + void push_back(const typename object_t::value_type& val) + { + // push_back only works for null objects or objects + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) + { + JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); + } + + // transform null object into an object + if (is_null()) + { + m_data.m_type = value_t::object; + m_data.m_value = value_t::object; + assert_invariant(); + } + + // add element to object + auto res = m_data.m_value.object->insert(val); + set_parent(res.first->second); + } + + /// @brief add an object to an object + /// @sa https://json.nlohmann.me/api/basic_json/operator+=/ + reference operator+=(const typename object_t::value_type& val) + { + push_back(val); + return *this; + } + + /// @brief add an object to an object + /// @sa https://json.nlohmann.me/api/basic_json/push_back/ + void push_back(initializer_list_t init) + { + if (is_object() && init.size() == 2 && (*init.begin())->is_string()) + { + basic_json&& key = init.begin()->moved_or_copied(); + push_back(typename object_t::value_type( + std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied())); + } + else + { + push_back(basic_json(init)); + } + } + + /// @brief add an object to an object + /// @sa https://json.nlohmann.me/api/basic_json/operator+=/ + reference operator+=(initializer_list_t init) + { + push_back(init); + return *this; + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/emplace_back/ + template<class... Args> + reference emplace_back(Args&& ... args) + { + // emplace_back only works for null objects or arrays + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) + { + JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this)); + } + + // transform null object into an array + if (is_null()) + { + m_data.m_type = value_t::array; + m_data.m_value = value_t::array; + assert_invariant(); + } + + // add element to array (perfect forwarding) + const auto old_capacity = m_data.m_value.array->capacity(); + m_data.m_value.array->emplace_back(std::forward<Args>(args)...); + return set_parent(m_data.m_value.array->back(), old_capacity); + } + + /// @brief add an object to an object if key does not exist + /// @sa https://json.nlohmann.me/api/basic_json/emplace/ + template<class... Args> + std::pair<iterator, bool> emplace(Args&& ... args) + { + // emplace only works for null objects or arrays + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) + { + JSON_THROW(type_error::create(311, detail::concat("cannot use emplace() with ", type_name()), this)); + } + + // transform null object into an object + if (is_null()) + { + m_data.m_type = value_t::object; + m_data.m_value = value_t::object; + assert_invariant(); + } + + // add element to array (perfect forwarding) + auto res = m_data.m_value.object->emplace(std::forward<Args>(args)...); + set_parent(res.first->second); + + // create result iterator and set iterator to the result of emplace + auto it = begin(); + it.m_it.object_iterator = res.first; + + // return pair of iterator and boolean + return {it, res.second}; + } + + /// Helper for insertion of an iterator + /// @note: This uses std::distance to support GCC 4.8, + /// see https://github.com/nlohmann/json/pull/1257 + template<typename... Args> + iterator insert_iterator(const_iterator pos, Args&& ... args) + { + iterator result(this); + JSON_ASSERT(m_data.m_value.array != nullptr); + + auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator); + m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...); + result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos; + + // This could have been written as: + // result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val); + // but the return value of insert is missing in GCC 4.8, so it is written this way instead. + + set_parents(); + return result; + } + + /// @brief inserts element into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, const basic_json& val) + { + // insert only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); + } + + // insert to array and return iterator + return insert_iterator(pos, val); + } + + JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); + } + + /// @brief inserts element into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, basic_json&& val) + { + return insert(pos, val); + } + + /// @brief inserts copies of element into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, size_type cnt, const basic_json& val) + { + // insert only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); + } + + // insert to array and return iterator + return insert_iterator(pos, cnt, val); + } + + JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); + } + + /// @brief inserts range of elements into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, const_iterator first, const_iterator last) + { + // insert only works for arrays + if (JSON_HEDLEY_UNLIKELY(!is_array())) + { + JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); + } + + // check if iterator pos fits to this JSON value + if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); + } + + // check if range iterators belong to the same JSON object + if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit", this)); + } + + if (JSON_HEDLEY_UNLIKELY(first.m_object == this)) + { + JSON_THROW(invalid_iterator::create(211, "passed iterators may not belong to container", this)); + } + + // insert to array and return iterator + return insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator); + } + + /// @brief inserts elements from initializer list into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, initializer_list_t ilist) + { + // insert only works for arrays + if (JSON_HEDLEY_UNLIKELY(!is_array())) + { + JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); + } + + // check if iterator pos fits to this JSON value + if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); + } + + // insert to array and return iterator + return insert_iterator(pos, ilist.begin(), ilist.end()); + } + + /// @brief inserts range of elements into object + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + void insert(const_iterator first, const_iterator last) + { + // insert only works for objects + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); + } + + // check if range iterators belong to the same JSON object + if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit", this)); + } + + // passed iterators must belong to objects + if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects", this)); + } + + m_data.m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); + } + + /// @brief updates a JSON object from another object, overwriting existing keys + /// @sa https://json.nlohmann.me/api/basic_json/update/ + void update(const_reference j, bool merge_objects = false) + { + update(j.begin(), j.end(), merge_objects); + } + + /// @brief updates a JSON object from another object, overwriting existing keys + /// @sa https://json.nlohmann.me/api/basic_json/update/ + void update(const_iterator first, const_iterator last, bool merge_objects = false) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_data.m_type = value_t::object; + m_data.m_value.object = create<object_t>(); + assert_invariant(); + } + + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(312, detail::concat("cannot use update() with ", type_name()), this)); + } + + // check if range iterators belong to the same JSON object + if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit", this)); + } + + // passed iterators must belong to objects + if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object())) + { + JSON_THROW(type_error::create(312, detail::concat("cannot use update() with ", first.m_object->type_name()), first.m_object)); + } + + for (auto it = first; it != last; ++it) + { + if (merge_objects && it.value().is_object()) + { + auto it2 = m_data.m_value.object->find(it.key()); + if (it2 != m_data.m_value.object->end()) + { + it2->second.update(it.value(), true); + continue; + } + } + m_data.m_value.object->operator[](it.key()) = it.value(); +#if JSON_DIAGNOSTICS + m_data.m_value.object->operator[](it.key()).m_parent = this; +#endif + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(reference other) noexcept ( + std::is_nothrow_move_constructible<value_t>::value&& + std::is_nothrow_move_assignable<value_t>::value&& + std::is_nothrow_move_constructible<json_value>::value&& // NOLINT(cppcoreguidelines-noexcept-swap,performance-noexcept-swap) + std::is_nothrow_move_assignable<json_value>::value + ) + { + std::swap(m_data.m_type, other.m_data.m_type); + std::swap(m_data.m_value, other.m_data.m_value); + + set_parents(); + other.set_parents(); + assert_invariant(); + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + friend void swap(reference left, reference right) noexcept ( + std::is_nothrow_move_constructible<value_t>::value&& + std::is_nothrow_move_assignable<value_t>::value&& + std::is_nothrow_move_constructible<json_value>::value&& // NOLINT(cppcoreguidelines-noexcept-swap,performance-noexcept-swap) + std::is_nothrow_move_assignable<json_value>::value + ) + { + left.swap(right); + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(array_t& other) // NOLINT(bugprone-exception-escape,cppcoreguidelines-noexcept-swap,performance-noexcept-swap) + { + // swap only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + using std::swap; + swap(*(m_data.m_value.array), other); + } + else + { + JSON_THROW(type_error::create(310, detail::concat("cannot use swap(array_t&) with ", type_name()), this)); + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(object_t& other) // NOLINT(bugprone-exception-escape,cppcoreguidelines-noexcept-swap,performance-noexcept-swap) + { + // swap only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + using std::swap; + swap(*(m_data.m_value.object), other); + } + else + { + JSON_THROW(type_error::create(310, detail::concat("cannot use swap(object_t&) with ", type_name()), this)); + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(string_t& other) // NOLINT(bugprone-exception-escape,cppcoreguidelines-noexcept-swap,performance-noexcept-swap) + { + // swap only works for strings + if (JSON_HEDLEY_LIKELY(is_string())) + { + using std::swap; + swap(*(m_data.m_value.string), other); + } + else + { + JSON_THROW(type_error::create(310, detail::concat("cannot use swap(string_t&) with ", type_name()), this)); + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(binary_t& other) // NOLINT(bugprone-exception-escape,cppcoreguidelines-noexcept-swap,performance-noexcept-swap) + { + // swap only works for strings + if (JSON_HEDLEY_LIKELY(is_binary())) + { + using std::swap; + swap(*(m_data.m_value.binary), other); + } + else + { + JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t&) with ", type_name()), this)); + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(typename binary_t::container_type& other) // NOLINT(bugprone-exception-escape) + { + // swap only works for strings + if (JSON_HEDLEY_LIKELY(is_binary())) + { + using std::swap; + swap(*(m_data.m_value.binary), other); + } + else + { + JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t::container_type&) with ", type_name()), this)); + } + } + + /// @} + + ////////////////////////////////////////// + // lexicographical comparison operators // + ////////////////////////////////////////// + + /// @name lexicographical comparison operators + /// @{ + + // note parentheses around operands are necessary; see + // https://github.com/nlohmann/json/issues/1530 +#define JSON_IMPLEMENT_OPERATOR(op, null_result, unordered_result, default_result) \ + const auto lhs_type = lhs.type(); \ + const auto rhs_type = rhs.type(); \ + \ + if (lhs_type == rhs_type) /* NOLINT(readability/braces) */ \ + { \ + switch (lhs_type) \ + { \ + case value_t::array: \ + return (*lhs.m_data.m_value.array) op (*rhs.m_data.m_value.array); \ + \ + case value_t::object: \ + return (*lhs.m_data.m_value.object) op (*rhs.m_data.m_value.object); \ + \ + case value_t::null: \ + return (null_result); \ + \ + case value_t::string: \ + return (*lhs.m_data.m_value.string) op (*rhs.m_data.m_value.string); \ + \ + case value_t::boolean: \ + return (lhs.m_data.m_value.boolean) op (rhs.m_data.m_value.boolean); \ + \ + case value_t::number_integer: \ + return (lhs.m_data.m_value.number_integer) op (rhs.m_data.m_value.number_integer); \ + \ + case value_t::number_unsigned: \ + return (lhs.m_data.m_value.number_unsigned) op (rhs.m_data.m_value.number_unsigned); \ + \ + case value_t::number_float: \ + return (lhs.m_data.m_value.number_float) op (rhs.m_data.m_value.number_float); \ + \ + case value_t::binary: \ + return (*lhs.m_data.m_value.binary) op (*rhs.m_data.m_value.binary); \ + \ + case value_t::discarded: \ + default: \ + return (unordered_result); \ + } \ + } \ + else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_float) \ + { \ + return static_cast<number_float_t>(lhs.m_data.m_value.number_integer) op rhs.m_data.m_value.number_float; \ + } \ + else if (lhs_type == value_t::number_float && rhs_type == value_t::number_integer) \ + { \ + return lhs.m_data.m_value.number_float op static_cast<number_float_t>(rhs.m_data.m_value.number_integer); \ + } \ + else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_float) \ + { \ + return static_cast<number_float_t>(lhs.m_data.m_value.number_unsigned) op rhs.m_data.m_value.number_float; \ + } \ + else if (lhs_type == value_t::number_float && rhs_type == value_t::number_unsigned) \ + { \ + return lhs.m_data.m_value.number_float op static_cast<number_float_t>(rhs.m_data.m_value.number_unsigned); \ + } \ + else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_integer) \ + { \ + return static_cast<number_integer_t>(lhs.m_data.m_value.number_unsigned) op rhs.m_data.m_value.number_integer; \ + } \ + else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_unsigned) \ + { \ + return lhs.m_data.m_value.number_integer op static_cast<number_integer_t>(rhs.m_data.m_value.number_unsigned); \ + } \ + else if(compares_unordered(lhs, rhs))\ + {\ + return (unordered_result);\ + }\ + \ + return (default_result); + + JSON_PRIVATE_UNLESS_TESTED: + // returns true if: + // - any operand is NaN and the other operand is of number type + // - any operand is discarded + // in legacy mode, discarded values are considered ordered if + // an operation is computed as an odd number of inverses of others + static bool compares_unordered(const_reference lhs, const_reference rhs, bool inverse = false) noexcept + { + if ((lhs.is_number_float() && std::isnan(lhs.m_data.m_value.number_float) && rhs.is_number()) + || (rhs.is_number_float() && std::isnan(rhs.m_data.m_value.number_float) && lhs.is_number())) + { + return true; + } +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + return (lhs.is_discarded() || rhs.is_discarded()) && !inverse; +#else + static_cast<void>(inverse); + return lhs.is_discarded() || rhs.is_discarded(); +#endif + } + + private: + bool compares_unordered(const_reference rhs, bool inverse = false) const noexcept + { + return compares_unordered(*this, rhs, inverse); + } + + public: +#if JSON_HAS_THREE_WAY_COMPARISON + /// @brief comparison: equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ + bool operator==(const_reference rhs) const noexcept + { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + const_reference lhs = *this; + JSON_IMPLEMENT_OPERATOR( ==, true, false, false) +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + } + + /// @brief comparison: equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ + template<typename ScalarType> + requires std::is_scalar_v<ScalarType> + bool operator==(ScalarType rhs) const noexcept + { + return *this == basic_json(rhs); + } + + /// @brief comparison: not equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/ + bool operator!=(const_reference rhs) const noexcept + { + if (compares_unordered(rhs, true)) + { + return false; + } + return !operator==(rhs); + } + + /// @brief comparison: 3-way + /// @sa https://json.nlohmann.me/api/basic_json/operator_spaceship/ + std::partial_ordering operator<=>(const_reference rhs) const noexcept // *NOPAD* + { + const_reference lhs = *this; + // default_result is used if we cannot compare values. In that case, + // we compare types. + JSON_IMPLEMENT_OPERATOR(<=>, // *NOPAD* + std::partial_ordering::equivalent, + std::partial_ordering::unordered, + lhs_type <=> rhs_type) // *NOPAD* + } + + /// @brief comparison: 3-way + /// @sa https://json.nlohmann.me/api/basic_json/operator_spaceship/ + template<typename ScalarType> + requires std::is_scalar_v<ScalarType> + std::partial_ordering operator<=>(ScalarType rhs) const noexcept // *NOPAD* + { + return *this <=> basic_json(rhs); // *NOPAD* + } + +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + // all operators that are computed as an odd number of inverses of others + // need to be overloaded to emulate the legacy comparison behavior + + /// @brief comparison: less than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_le/ + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON) + bool operator<=(const_reference rhs) const noexcept + { + if (compares_unordered(rhs, true)) + { + return false; + } + return !(rhs < *this); + } + + /// @brief comparison: less than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_le/ + template<typename ScalarType> + requires std::is_scalar_v<ScalarType> + bool operator<=(ScalarType rhs) const noexcept + { + return *this <= basic_json(rhs); + } + + /// @brief comparison: greater than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/ + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON) + bool operator>=(const_reference rhs) const noexcept + { + if (compares_unordered(rhs, true)) + { + return false; + } + return !(*this < rhs); + } + + /// @brief comparison: greater than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/ + template<typename ScalarType> + requires std::is_scalar_v<ScalarType> + bool operator>=(ScalarType rhs) const noexcept + { + return *this >= basic_json(rhs); + } +#endif +#else + /// @brief comparison: equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ + friend bool operator==(const_reference lhs, const_reference rhs) noexcept + { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + JSON_IMPLEMENT_OPERATOR( ==, true, false, false) +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + } + + /// @brief comparison: equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator==(const_reference lhs, ScalarType rhs) noexcept + { + return lhs == basic_json(rhs); + } + + /// @brief comparison: equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator==(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) == rhs; + } + + /// @brief comparison: not equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/ + friend bool operator!=(const_reference lhs, const_reference rhs) noexcept + { + if (compares_unordered(lhs, rhs, true)) + { + return false; + } + return !(lhs == rhs); + } + + /// @brief comparison: not equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator!=(const_reference lhs, ScalarType rhs) noexcept + { + return lhs != basic_json(rhs); + } + + /// @brief comparison: not equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator!=(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) != rhs; + } + + /// @brief comparison: less than + /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/ + friend bool operator<(const_reference lhs, const_reference rhs) noexcept + { + // default_result is used if we cannot compare values. In that case, + // we compare types. Note we have to call the operator explicitly, + // because MSVC has problems otherwise. + JSON_IMPLEMENT_OPERATOR( <, false, false, operator<(lhs_type, rhs_type)) + } + + /// @brief comparison: less than + /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<(const_reference lhs, ScalarType rhs) noexcept + { + return lhs < basic_json(rhs); + } + + /// @brief comparison: less than + /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) < rhs; + } + + /// @brief comparison: less than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_le/ + friend bool operator<=(const_reference lhs, const_reference rhs) noexcept + { + if (compares_unordered(lhs, rhs, true)) + { + return false; + } + return !(rhs < lhs); + } + + /// @brief comparison: less than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_le/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<=(const_reference lhs, ScalarType rhs) noexcept + { + return lhs <= basic_json(rhs); + } + + /// @brief comparison: less than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_le/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<=(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) <= rhs; + } + + /// @brief comparison: greater than + /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/ + friend bool operator>(const_reference lhs, const_reference rhs) noexcept + { + // double inverse + if (compares_unordered(lhs, rhs)) + { + return false; + } + return !(lhs <= rhs); + } + + /// @brief comparison: greater than + /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>(const_reference lhs, ScalarType rhs) noexcept + { + return lhs > basic_json(rhs); + } + + /// @brief comparison: greater than + /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) > rhs; + } + + /// @brief comparison: greater than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/ + friend bool operator>=(const_reference lhs, const_reference rhs) noexcept + { + if (compares_unordered(lhs, rhs, true)) + { + return false; + } + return !(lhs < rhs); + } + + /// @brief comparison: greater than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>=(const_reference lhs, ScalarType rhs) noexcept + { + return lhs >= basic_json(rhs); + } + + /// @brief comparison: greater than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>=(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) >= rhs; + } +#endif + +#undef JSON_IMPLEMENT_OPERATOR + + /// @} + + /////////////////// + // serialization // + /////////////////// + + /// @name serialization + /// @{ +#ifndef JSON_NO_IO + /// @brief serialize to stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/ + friend std::ostream& operator<<(std::ostream& o, const basic_json& j) + { + // read width member and use it as indentation parameter if nonzero + const bool pretty_print = o.width() > 0; + const auto indentation = pretty_print ? o.width() : 0; + + // reset width to 0 for subsequent calls to this stream + o.width(0); + + // do the actual serialization + serializer s(detail::output_adapter<char>(o), o.fill()); + s.dump(j, pretty_print, false, static_cast<unsigned int>(indentation)); + return o; + } + + /// @brief serialize to stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/ + /// @deprecated This function is deprecated since 3.0.0 and will be removed in + /// version 4.0.0 of the library. Please use + /// operator<<(std::ostream&, const basic_json&) instead; that is, + /// replace calls like `j >> o;` with `o << j;`. + JSON_HEDLEY_DEPRECATED_FOR(3.0.0, operator<<(std::ostream&, const basic_json&)) + friend std::ostream& operator>>(const basic_json& j, std::ostream& o) + { + return o << j; + } +#endif // JSON_NO_IO + /// @} + + ///////////////////// + // deserialization // + ///////////////////// + + /// @name deserialization + /// @{ + + /// @brief deserialize from a compatible input + /// @sa https://json.nlohmann.me/api/basic_json/parse/ + template<typename InputType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json parse(InputType&& i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true, + const bool ignore_comments = false) + { + basic_json result; + parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); + return result; + } + + /// @brief deserialize from a pair of character iterators + /// @sa https://json.nlohmann.me/api/basic_json/parse/ + template<typename IteratorType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json parse(IteratorType first, + IteratorType last, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true, + const bool ignore_comments = false) + { + basic_json result; + parser(detail::input_adapter(std::move(first), std::move(last)), cb, allow_exceptions, ignore_comments).parse(true, result); + return result; + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, parse(ptr, ptr + len)) + static basic_json parse(detail::span_input_adapter&& i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true, + const bool ignore_comments = false) + { + basic_json result; + parser(i.get(), cb, allow_exceptions, ignore_comments).parse(true, result); + return result; + } + + /// @brief check if the input is valid JSON + /// @sa https://json.nlohmann.me/api/basic_json/accept/ + template<typename InputType> + static bool accept(InputType&& i, + const bool ignore_comments = false) + { + return parser(detail::input_adapter(std::forward<InputType>(i)), nullptr, false, ignore_comments).accept(true); + } + + /// @brief check if the input is valid JSON + /// @sa https://json.nlohmann.me/api/basic_json/accept/ + template<typename IteratorType> + static bool accept(IteratorType first, IteratorType last, + const bool ignore_comments = false) + { + return parser(detail::input_adapter(std::move(first), std::move(last)), nullptr, false, ignore_comments).accept(true); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, accept(ptr, ptr + len)) + static bool accept(detail::span_input_adapter&& i, + const bool ignore_comments = false) + { + return parser(i.get(), nullptr, false, ignore_comments).accept(true); + } + + /// @brief generate SAX events + /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/ + template <typename InputType, typename SAX> + JSON_HEDLEY_NON_NULL(2) + static bool sax_parse(InputType&& i, SAX* sax, + input_format_t format = input_format_t::json, + const bool strict = true, + const bool ignore_comments = false) + { + auto ia = detail::input_adapter(std::forward<InputType>(i)); + return format == input_format_t::json + ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) + : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict); + } + + /// @brief generate SAX events + /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/ + template<class IteratorType, class SAX> + JSON_HEDLEY_NON_NULL(3) + static bool sax_parse(IteratorType first, IteratorType last, SAX* sax, + input_format_t format = input_format_t::json, + const bool strict = true, + const bool ignore_comments = false) + { + auto ia = detail::input_adapter(std::move(first), std::move(last)); + return format == input_format_t::json + ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) + : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict); + } + + /// @brief generate SAX events + /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/ + /// @deprecated This function is deprecated since 3.8.0 and will be removed in + /// version 4.0.0 of the library. Please use + /// sax_parse(ptr, ptr + len) instead. + template <typename SAX> + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, sax_parse(ptr, ptr + len, ...)) + JSON_HEDLEY_NON_NULL(2) + static bool sax_parse(detail::span_input_adapter&& i, SAX* sax, + input_format_t format = input_format_t::json, + const bool strict = true, + const bool ignore_comments = false) + { + auto ia = i.get(); + return format == input_format_t::json + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia), format).sax_parse(format, sax, strict); + } +#ifndef JSON_NO_IO + /// @brief deserialize from stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_gtgt/ + /// @deprecated This stream operator is deprecated since 3.0.0 and will be removed in + /// version 4.0.0 of the library. Please use + /// operator>>(std::istream&, basic_json&) instead; that is, + /// replace calls like `j << i;` with `i >> j;`. + JSON_HEDLEY_DEPRECATED_FOR(3.0.0, operator>>(std::istream&, basic_json&)) + friend std::istream& operator<<(basic_json& j, std::istream& i) + { + return operator>>(i, j); + } + + /// @brief deserialize from stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_gtgt/ + friend std::istream& operator>>(std::istream& i, basic_json& j) + { + parser(detail::input_adapter(i)).parse(false, j); + return i; + } +#endif // JSON_NO_IO + /// @} + + /////////////////////////// + // convenience functions // + /////////////////////////// + + /// @brief return the type as string + /// @sa https://json.nlohmann.me/api/basic_json/type_name/ + JSON_HEDLEY_RETURNS_NON_NULL + const char* type_name() const noexcept + { + switch (m_data.m_type) + { + case value_t::null: + return "null"; + case value_t::object: + return "object"; + case value_t::array: + return "array"; + case value_t::string: + return "string"; + case value_t::boolean: + return "boolean"; + case value_t::binary: + return "binary"; + case value_t::discarded: + return "discarded"; + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + default: + return "number"; + } + } + + JSON_PRIVATE_UNLESS_TESTED: + ////////////////////// + // member variables // + ////////////////////// + + struct data + { + /// the type of the current element + value_t m_type = value_t::null; + + /// the value of the current element + json_value m_value = {}; + + data(const value_t v) + : m_type(v), m_value(v) + { + } + + data(size_type cnt, const basic_json& val) + : m_type(value_t::array) + { + m_value.array = create<array_t>(cnt, val); + } + + data() noexcept = default; + data(data&&) noexcept = default; + data(const data&) noexcept = delete; + data& operator=(data&&) noexcept = delete; + data& operator=(const data&) noexcept = delete; + + ~data() noexcept + { + m_value.destroy(m_type); + } + }; + + data m_data = {}; + +#if JSON_DIAGNOSTICS + /// a pointer to a parent value (for debugging purposes) + basic_json* m_parent = nullptr; +#endif + + ////////////////////////////////////////// + // binary serialization/deserialization // + ////////////////////////////////////////// + + /// @name binary serialization/deserialization support + /// @{ + + public: + /// @brief create a CBOR serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/ + static std::vector<std::uint8_t> to_cbor(const basic_json& j) + { + std::vector<std::uint8_t> result; + to_cbor(j, result); + return result; + } + + /// @brief create a CBOR serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/ + static void to_cbor(const basic_json& j, detail::output_adapter<std::uint8_t> o) + { + binary_writer<std::uint8_t>(o).write_cbor(j); + } + + /// @brief create a CBOR serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/ + static void to_cbor(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_cbor(j); + } + + /// @brief create a MessagePack serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/ + static std::vector<std::uint8_t> to_msgpack(const basic_json& j) + { + std::vector<std::uint8_t> result; + to_msgpack(j, result); + return result; + } + + /// @brief create a MessagePack serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/ + static void to_msgpack(const basic_json& j, detail::output_adapter<std::uint8_t> o) + { + binary_writer<std::uint8_t>(o).write_msgpack(j); + } + + /// @brief create a MessagePack serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/ + static void to_msgpack(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_msgpack(j); + } + + /// @brief create a UBJSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/ + static std::vector<std::uint8_t> to_ubjson(const basic_json& j, + const bool use_size = false, + const bool use_type = false) + { + std::vector<std::uint8_t> result; + to_ubjson(j, result, use_size, use_type); + return result; + } + + /// @brief create a UBJSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/ + static void to_ubjson(const basic_json& j, detail::output_adapter<std::uint8_t> o, + const bool use_size = false, const bool use_type = false) + { + binary_writer<std::uint8_t>(o).write_ubjson(j, use_size, use_type); + } + + /// @brief create a UBJSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/ + static void to_ubjson(const basic_json& j, detail::output_adapter<char> o, + const bool use_size = false, const bool use_type = false) + { + binary_writer<char>(o).write_ubjson(j, use_size, use_type); + } + + /// @brief create a BJData serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bjdata/ + static std::vector<std::uint8_t> to_bjdata(const basic_json& j, + const bool use_size = false, + const bool use_type = false) + { + std::vector<std::uint8_t> result; + to_bjdata(j, result, use_size, use_type); + return result; + } + + /// @brief create a BJData serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bjdata/ + static void to_bjdata(const basic_json& j, detail::output_adapter<std::uint8_t> o, + const bool use_size = false, const bool use_type = false) + { + binary_writer<std::uint8_t>(o).write_ubjson(j, use_size, use_type, true, true); + } + + /// @brief create a BJData serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bjdata/ + static void to_bjdata(const basic_json& j, detail::output_adapter<char> o, + const bool use_size = false, const bool use_type = false) + { + binary_writer<char>(o).write_ubjson(j, use_size, use_type, true, true); + } + + /// @brief create a BSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bson/ + static std::vector<std::uint8_t> to_bson(const basic_json& j) + { + std::vector<std::uint8_t> result; + to_bson(j, result); + return result; + } + + /// @brief create a BSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bson/ + static void to_bson(const basic_json& j, detail::output_adapter<std::uint8_t> o) + { + binary_writer<std::uint8_t>(o).write_bson(j); + } + + /// @brief create a BSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bson/ + static void to_bson(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_bson(j); + } + + /// @brief create a JSON value from an input in CBOR format + /// @sa https://json.nlohmann.me/api/basic_json/from_cbor/ + template<typename InputType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_cbor(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward<InputType>(i)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in CBOR format + /// @sa https://json.nlohmann.me/api/basic_json/from_cbor/ + template<typename IteratorType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_cbor(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + return res ? result : basic_json(value_t::discarded); + } + + template<typename T> + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_cbor(ptr, ptr + len)) + static basic_json from_cbor(const T* ptr, std::size_t len, + const bool strict = true, + const bool allow_exceptions = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + return from_cbor(ptr, ptr + len, strict, allow_exceptions, tag_handler); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_cbor(ptr, ptr + len)) + static basic_json from_cbor(detail::span_input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = i.get(); + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in MessagePack format + /// @sa https://json.nlohmann.me/api/basic_json/from_msgpack/ + template<typename InputType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_msgpack(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward<InputType>(i)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in MessagePack format + /// @sa https://json.nlohmann.me/api/basic_json/from_msgpack/ + template<typename IteratorType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_msgpack(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + template<typename T> + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_msgpack(ptr, ptr + len)) + static basic_json from_msgpack(const T* ptr, std::size_t len, + const bool strict = true, + const bool allow_exceptions = true) + { + return from_msgpack(ptr, ptr + len, strict, allow_exceptions); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_msgpack(ptr, ptr + len)) + static basic_json from_msgpack(detail::span_input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = i.get(); + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in UBJSON format + /// @sa https://json.nlohmann.me/api/basic_json/from_ubjson/ + template<typename InputType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_ubjson(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward<InputType>(i)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in UBJSON format + /// @sa https://json.nlohmann.me/api/basic_json/from_ubjson/ + template<typename IteratorType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_ubjson(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + template<typename T> + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_ubjson(ptr, ptr + len)) + static basic_json from_ubjson(const T* ptr, std::size_t len, + const bool strict = true, + const bool allow_exceptions = true) + { + return from_ubjson(ptr, ptr + len, strict, allow_exceptions); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_ubjson(ptr, ptr + len)) + static basic_json from_ubjson(detail::span_input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = i.get(); + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in BJData format + /// @sa https://json.nlohmann.me/api/basic_json/from_bjdata/ + template<typename InputType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_bjdata(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward<InputType>(i)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bjdata).sax_parse(input_format_t::bjdata, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in BJData format + /// @sa https://json.nlohmann.me/api/basic_json/from_bjdata/ + template<typename IteratorType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_bjdata(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bjdata).sax_parse(input_format_t::bjdata, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in BSON format + /// @sa https://json.nlohmann.me/api/basic_json/from_bson/ + template<typename InputType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_bson(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward<InputType>(i)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in BSON format + /// @sa https://json.nlohmann.me/api/basic_json/from_bson/ + template<typename IteratorType> + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_bson(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + template<typename T> + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_bson(ptr, ptr + len)) + static basic_json from_bson(const T* ptr, std::size_t len, + const bool strict = true, + const bool allow_exceptions = true) + { + return from_bson(ptr, ptr + len, strict, allow_exceptions); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_bson(ptr, ptr + len)) + static basic_json from_bson(detail::span_input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions); + auto ia = i.get(); + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + const bool res = binary_reader<decltype(ia)>(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + /// @} + + ////////////////////////// + // JSON Pointer support // + ////////////////////////// + + /// @name JSON Pointer functions + /// @{ + + /// @brief access specified element via JSON Pointer + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + reference operator[](const json_pointer& ptr) + { + return ptr.get_unchecked(this); + } + + template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>) // NOLINT(readability/alt_tokens) + reference operator[](const ::nlohmann::json_pointer<BasicJsonType>& ptr) + { + return ptr.get_unchecked(this); + } + + /// @brief access specified element via JSON Pointer + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + const_reference operator[](const json_pointer& ptr) const + { + return ptr.get_unchecked(this); + } + + template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>) // NOLINT(readability/alt_tokens) + const_reference operator[](const ::nlohmann::json_pointer<BasicJsonType>& ptr) const + { + return ptr.get_unchecked(this); + } + + /// @brief access specified element via JSON Pointer + /// @sa https://json.nlohmann.me/api/basic_json/at/ + reference at(const json_pointer& ptr) + { + return ptr.get_checked(this); + } + + template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>) // NOLINT(readability/alt_tokens) + reference at(const ::nlohmann::json_pointer<BasicJsonType>& ptr) + { + return ptr.get_checked(this); + } + + /// @brief access specified element via JSON Pointer + /// @sa https://json.nlohmann.me/api/basic_json/at/ + const_reference at(const json_pointer& ptr) const + { + return ptr.get_checked(this); + } + + template<typename BasicJsonType, detail::enable_if_t<detail::is_basic_json<BasicJsonType>::value, int> = 0> + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, basic_json::json_pointer or nlohmann::json_pointer<basic_json::string_t>) // NOLINT(readability/alt_tokens) + const_reference at(const ::nlohmann::json_pointer<BasicJsonType>& ptr) const + { + return ptr.get_checked(this); + } + + /// @brief return flattened JSON value + /// @sa https://json.nlohmann.me/api/basic_json/flatten/ + basic_json flatten() const + { + basic_json result(value_t::object); + json_pointer::flatten("", *this, result); + return result; + } + + /// @brief unflatten a previously flattened JSON value + /// @sa https://json.nlohmann.me/api/basic_json/unflatten/ + basic_json unflatten() const + { + return json_pointer::unflatten(*this); + } + + /// @} + + ////////////////////////// + // JSON Patch functions // + ////////////////////////// + + /// @name JSON Patch functions + /// @{ + + /// @brief applies a JSON patch in-place without copying the object + /// @sa https://json.nlohmann.me/api/basic_json/patch/ + void patch_inplace(const basic_json& json_patch) + { + basic_json& result = *this; + // the valid JSON Patch operations + enum class patch_operations {add, remove, replace, move, copy, test, invalid}; + + const auto get_op = [](const std::string & op) + { + if (op == "add") + { + return patch_operations::add; + } + if (op == "remove") + { + return patch_operations::remove; + } + if (op == "replace") + { + return patch_operations::replace; + } + if (op == "move") + { + return patch_operations::move; + } + if (op == "copy") + { + return patch_operations::copy; + } + if (op == "test") + { + return patch_operations::test; + } + + return patch_operations::invalid; + }; + + // wrapper for "add" operation; add value at ptr + const auto operation_add = [&result](json_pointer & ptr, basic_json val) + { + // adding to the root of the target document means replacing it + if (ptr.empty()) + { + result = val; + return; + } + + // make sure the top element of the pointer exists + json_pointer const top_pointer = ptr.top(); + if (top_pointer != ptr) + { + result.at(top_pointer); + } + + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.back(); + ptr.pop_back(); + // parent must exist when performing patch add per RFC6902 specs + basic_json& parent = result.at(ptr); + + switch (parent.m_data.m_type) + { + case value_t::null: + case value_t::object: + { + // use operator[] to add value + parent[last_path] = val; + break; + } + + case value_t::array: + { + if (last_path == "-") + { + // special case: append to back + parent.push_back(val); + } + else + { + const auto idx = json_pointer::template array_index<basic_json_t>(last_path); + if (JSON_HEDLEY_UNLIKELY(idx > parent.size())) + { + // avoid undefined behavior + JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), &parent)); + } + + // default case: insert add offset + parent.insert(parent.begin() + static_cast<difference_type>(idx), val); + } + break; + } + + // if there exists a parent it cannot be primitive + case value_t::string: // LCOV_EXCL_LINE + case value_t::boolean: // LCOV_EXCL_LINE + case value_t::number_integer: // LCOV_EXCL_LINE + case value_t::number_unsigned: // LCOV_EXCL_LINE + case value_t::number_float: // LCOV_EXCL_LINE + case value_t::binary: // LCOV_EXCL_LINE + case value_t::discarded: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + }; + + // wrapper for "remove" operation; remove value at ptr + const auto operation_remove = [this, & result](json_pointer & ptr) + { + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.back(); + ptr.pop_back(); + basic_json& parent = result.at(ptr); + + // remove child + if (parent.is_object()) + { + // perform range check + auto it = parent.find(last_path); + if (JSON_HEDLEY_LIKELY(it != parent.end())) + { + parent.erase(it); + } + else + { + JSON_THROW(out_of_range::create(403, detail::concat("key '", last_path, "' not found"), this)); + } + } + else if (parent.is_array()) + { + // note erase performs range check + parent.erase(json_pointer::template array_index<basic_json_t>(last_path)); + } + }; + + // type check: top level value must be an array + if (JSON_HEDLEY_UNLIKELY(!json_patch.is_array())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects", &json_patch)); + } + + // iterate and apply the operations + for (const auto& val : json_patch) + { + // wrapper to get a value for an operation + const auto get_value = [&val](const std::string & op, + const std::string & member, + bool string_type) -> basic_json & + { + // find value + auto it = val.m_data.m_value.object->find(member); + + // context-sensitive error message + const auto error_msg = (op == "op") ? "operation" : detail::concat("operation '", op, '\''); + + // check if desired value is present + if (JSON_HEDLEY_UNLIKELY(it == val.m_data.m_value.object->end())) + { + // NOLINTNEXTLINE(performance-inefficient-string-concatenation) + JSON_THROW(parse_error::create(105, 0, detail::concat(error_msg, " must have member '", member, "'"), &val)); + } + + // check if result is of type string + if (JSON_HEDLEY_UNLIKELY(string_type && !it->second.is_string())) + { + // NOLINTNEXTLINE(performance-inefficient-string-concatenation) + JSON_THROW(parse_error::create(105, 0, detail::concat(error_msg, " must have string member '", member, "'"), &val)); + } + + // no error: return value + return it->second; + }; + + // type check: every element of the array must be an object + if (JSON_HEDLEY_UNLIKELY(!val.is_object())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects", &val)); + } + + // collect mandatory members + const auto op = get_value("op", "op", true).template get<std::string>(); + const auto path = get_value(op, "path", true).template get<std::string>(); + json_pointer ptr(path); + + switch (get_op(op)) + { + case patch_operations::add: + { + operation_add(ptr, get_value("add", "value", false)); + break; + } + + case patch_operations::remove: + { + operation_remove(ptr); + break; + } + + case patch_operations::replace: + { + // the "path" location must exist - use at() + result.at(ptr) = get_value("replace", "value", false); + break; + } + + case patch_operations::move: + { + const auto from_path = get_value("move", "from", true).template get<std::string>(); + json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json const v = result.at(from_ptr); + + // The move operation is functionally identical to a + // "remove" operation on the "from" location, followed + // immediately by an "add" operation at the target + // location with the value that was just removed. + operation_remove(from_ptr); + operation_add(ptr, v); + break; + } + + case patch_operations::copy: + { + const auto from_path = get_value("copy", "from", true).template get<std::string>(); + const json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json const v = result.at(from_ptr); + + // The copy is functionally identical to an "add" + // operation at the target location using the value + // specified in the "from" member. + operation_add(ptr, v); + break; + } + + case patch_operations::test: + { + bool success = false; + JSON_TRY + { + // check if "value" matches the one at "path" + // the "path" location must exist - use at() + success = (result.at(ptr) == get_value("test", "value", false)); + } + JSON_INTERNAL_CATCH (out_of_range&) + { + // ignore out of range errors: success remains false + } + + // throw an exception if test fails + if (JSON_HEDLEY_UNLIKELY(!success)) + { + JSON_THROW(other_error::create(501, detail::concat("unsuccessful: ", val.dump()), &val)); + } + + break; + } + + case patch_operations::invalid: + default: + { + // op must be "add", "remove", "replace", "move", "copy", or + // "test" + JSON_THROW(parse_error::create(105, 0, detail::concat("operation value '", op, "' is invalid"), &val)); + } + } + } + } + + /// @brief applies a JSON patch to a copy of the current object + /// @sa https://json.nlohmann.me/api/basic_json/patch/ + basic_json patch(const basic_json& json_patch) const + { + basic_json result = *this; + result.patch_inplace(json_patch); + return result; + } + + /// @brief creates a diff as a JSON patch + /// @sa https://json.nlohmann.me/api/basic_json/diff/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json diff(const basic_json& source, const basic_json& target, + const std::string& path = "") + { + // the patch + basic_json result(value_t::array); + + // if the values are the same, return empty patch + if (source == target) + { + return result; + } + + if (source.type() != target.type()) + { + // different types: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + return result; + } + + switch (source.type()) + { + case value_t::array: + { + // first pass: traverse common elements + std::size_t i = 0; + while (i < source.size() && i < target.size()) + { + // recursive call to compare array values at index i + auto temp_diff = diff(source[i], target[i], detail::concat(path, '/', std::to_string(i))); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + ++i; + } + + // We now reached the end of at least one array + // in a second pass, traverse the remaining elements + + // remove my remaining elements + const auto end_index = static_cast<difference_type>(result.size()); + while (i < source.size()) + { + // add operations in reverse order to avoid invalid + // indices + result.insert(result.begin() + end_index, object( + { + {"op", "remove"}, + {"path", detail::concat(path, '/', std::to_string(i))} + })); + ++i; + } + + // add other remaining elements + while (i < target.size()) + { + result.push_back( + { + {"op", "add"}, + {"path", detail::concat(path, "/-")}, + {"value", target[i]} + }); + ++i; + } + + break; + } + + case value_t::object: + { + // first pass: traverse this object's elements + for (auto it = source.cbegin(); it != source.cend(); ++it) + { + // escape the key name to be used in a JSON patch + const auto path_key = detail::concat(path, '/', detail::escape(it.key())); + + if (target.find(it.key()) != target.end()) + { + // recursive call to compare object values at key it + auto temp_diff = diff(it.value(), target[it.key()], path_key); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + } + else + { + // found a key that is not in o -> remove it + result.push_back(object( + { + {"op", "remove"}, {"path", path_key} + })); + } + } + + // second pass: traverse other object's elements + for (auto it = target.cbegin(); it != target.cend(); ++it) + { + if (source.find(it.key()) == source.end()) + { + // found a key that is not in this -> add it + const auto path_key = detail::concat(path, '/', detail::escape(it.key())); + result.push_back( + { + {"op", "add"}, {"path", path_key}, + {"value", it.value()} + }); + } + } + + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + // both primitive type: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + break; + } + } + + return result; + } + /// @} + + //////////////////////////////// + // JSON Merge Patch functions // + //////////////////////////////// + + /// @name JSON Merge Patch functions + /// @{ + + /// @brief applies a JSON Merge Patch + /// @sa https://json.nlohmann.me/api/basic_json/merge_patch/ + void merge_patch(const basic_json& apply_patch) + { + if (apply_patch.is_object()) + { + if (!is_object()) + { + *this = object(); + } + for (auto it = apply_patch.begin(); it != apply_patch.end(); ++it) + { + if (it.value().is_null()) + { + erase(it.key()); + } + else + { + operator[](it.key()).merge_patch(it.value()); + } + } + } + else + { + *this = apply_patch; + } + } + + /// @} +}; + +/// @brief user-defined to_string function for JSON values +/// @sa https://json.nlohmann.me/api/basic_json/to_string/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +std::string to_string(const NLOHMANN_BASIC_JSON_TPL& j) +{ + return j.dump(); +} + +inline namespace literals +{ +inline namespace json_literals +{ + +/// @brief user-defined string literal for JSON values +/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json/ +JSON_HEDLEY_NON_NULL(1) +#if !defined(JSON_HEDLEY_GCC_VERSION) || JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) + inline nlohmann::json operator ""_json(const char* s, std::size_t n) +#else + inline nlohmann::json operator "" _json(const char* s, std::size_t n) +#endif +{ + return nlohmann::json::parse(s, s + n); +} + +/// @brief user-defined string literal for JSON pointer +/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json_pointer/ +JSON_HEDLEY_NON_NULL(1) +#if !defined(JSON_HEDLEY_GCC_VERSION) || JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) + inline nlohmann::json::json_pointer operator ""_json_pointer(const char* s, std::size_t n) +#else + inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) +#endif +{ + return nlohmann::json::json_pointer(std::string(s, n)); +} + +} // namespace json_literals +} // namespace literals +NLOHMANN_JSON_NAMESPACE_END + +/////////////////////// +// nonmember support // +/////////////////////// + +namespace std // NOLINT(cert-dcl58-cpp) +{ + +/// @brief hash value for JSON objects +/// @sa https://json.nlohmann.me/api/basic_json/std_hash/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct hash<nlohmann::NLOHMANN_BASIC_JSON_TPL> // NOLINT(cert-dcl58-cpp) +{ + std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const + { + return nlohmann::detail::hash(j); + } +}; + +// specialization for std::less<value_t> +template<> +struct less< ::nlohmann::detail::value_t> // do not remove the space after '<', see https://github.com/nlohmann/json/pull/679 +{ + /*! + @brief compare two value_t enum values + @since version 3.0.0 + */ + bool operator()(::nlohmann::detail::value_t lhs, + ::nlohmann::detail::value_t rhs) const noexcept + { +#if JSON_HAS_THREE_WAY_COMPARISON + return std::is_lt(lhs <=> rhs); // *NOPAD* +#else + return ::nlohmann::detail::operator<(lhs, rhs); +#endif + } +}; + +// C++20 prohibit function specialization in the std namespace. +#ifndef JSON_HAS_CPP_20 + +/// @brief exchanges the values of two JSON objects +/// @sa https://json.nlohmann.me/api/basic_json/std_swap/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC_JSON_TPL& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp) + is_nothrow_move_constructible<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value&& // NOLINT(misc-redundant-expression,cppcoreguidelines-noexcept-swap,performance-noexcept-swap) + is_nothrow_move_assignable<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value) +{ + j1.swap(j2); +} + +#endif + +} // namespace std + +#if JSON_USE_GLOBAL_UDLS + #if !defined(JSON_HEDLEY_GCC_VERSION) || JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) + using nlohmann::literals::json_literals::operator ""_json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) + using nlohmann::literals::json_literals::operator ""_json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers) + #else + using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) + using nlohmann::literals::json_literals::operator "" _json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers) + #endif +#endif + +// #include <nlohmann/detail/macro_unscope.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +// restore clang diagnostic settings +#if defined(__clang__) + #pragma clang diagnostic pop +#endif + +// clean up +#undef JSON_ASSERT +#undef JSON_INTERNAL_CATCH +#undef JSON_THROW +#undef JSON_PRIVATE_UNLESS_TESTED +#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION +#undef NLOHMANN_BASIC_JSON_TPL +#undef JSON_EXPLICIT +#undef NLOHMANN_CAN_CALL_STD_FUNC_IMPL +#undef JSON_INLINE_VARIABLE +#undef JSON_NO_UNIQUE_ADDRESS +#undef JSON_DISABLE_ENUM_SERIALIZATION +#undef JSON_USE_GLOBAL_UDLS + +#ifndef JSON_TEST_KEEP_MACROS + #undef JSON_CATCH + #undef JSON_TRY + #undef JSON_HAS_CPP_11 + #undef JSON_HAS_CPP_14 + #undef JSON_HAS_CPP_17 + #undef JSON_HAS_CPP_20 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #undef JSON_HAS_THREE_WAY_COMPARISON + #undef JSON_HAS_RANGES + #undef JSON_HAS_STATIC_RTTI + #undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +// #include <nlohmann/thirdparty/hedley/hedley_undef.hpp> +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.3 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> +// SPDX-License-Identifier: MIT + + + +#undef JSON_HEDLEY_ALWAYS_INLINE +#undef JSON_HEDLEY_ARM_VERSION +#undef JSON_HEDLEY_ARM_VERSION_CHECK +#undef JSON_HEDLEY_ARRAY_PARAM +#undef JSON_HEDLEY_ASSUME +#undef JSON_HEDLEY_BEGIN_C_DECLS +#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#undef JSON_HEDLEY_CLANG_HAS_FEATURE +#undef JSON_HEDLEY_CLANG_HAS_WARNING +#undef JSON_HEDLEY_COMPCERT_VERSION +#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#undef JSON_HEDLEY_CONCAT +#undef JSON_HEDLEY_CONCAT3 +#undef JSON_HEDLEY_CONCAT3_EX +#undef JSON_HEDLEY_CONCAT_EX +#undef JSON_HEDLEY_CONST +#undef JSON_HEDLEY_CONSTEXPR +#undef JSON_HEDLEY_CONST_CAST +#undef JSON_HEDLEY_CPP_CAST +#undef JSON_HEDLEY_CRAY_VERSION +#undef JSON_HEDLEY_CRAY_VERSION_CHECK +#undef JSON_HEDLEY_C_DECL +#undef JSON_HEDLEY_DEPRECATED +#undef JSON_HEDLEY_DEPRECATED_FOR +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#undef JSON_HEDLEY_DIAGNOSTIC_POP +#undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#undef JSON_HEDLEY_DMC_VERSION +#undef JSON_HEDLEY_DMC_VERSION_CHECK +#undef JSON_HEDLEY_EMPTY_BASES +#undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#undef JSON_HEDLEY_END_C_DECLS +#undef JSON_HEDLEY_FLAGS +#undef JSON_HEDLEY_FLAGS_CAST +#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#undef JSON_HEDLEY_GCC_HAS_BUILTIN +#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#undef JSON_HEDLEY_GCC_HAS_EXTENSION +#undef JSON_HEDLEY_GCC_HAS_FEATURE +#undef JSON_HEDLEY_GCC_HAS_WARNING +#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#undef JSON_HEDLEY_GCC_VERSION +#undef JSON_HEDLEY_GCC_VERSION_CHECK +#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#undef JSON_HEDLEY_GNUC_HAS_FEATURE +#undef JSON_HEDLEY_GNUC_HAS_WARNING +#undef JSON_HEDLEY_GNUC_VERSION +#undef JSON_HEDLEY_GNUC_VERSION_CHECK +#undef JSON_HEDLEY_HAS_ATTRIBUTE +#undef JSON_HEDLEY_HAS_BUILTIN +#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#undef JSON_HEDLEY_HAS_EXTENSION +#undef JSON_HEDLEY_HAS_FEATURE +#undef JSON_HEDLEY_HAS_WARNING +#undef JSON_HEDLEY_IAR_VERSION +#undef JSON_HEDLEY_IAR_VERSION_CHECK +#undef JSON_HEDLEY_IBM_VERSION +#undef JSON_HEDLEY_IBM_VERSION_CHECK +#undef JSON_HEDLEY_IMPORT +#undef JSON_HEDLEY_INLINE +#undef JSON_HEDLEY_INTEL_CL_VERSION +#undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK +#undef JSON_HEDLEY_INTEL_VERSION +#undef JSON_HEDLEY_INTEL_VERSION_CHECK +#undef JSON_HEDLEY_IS_CONSTANT +#undef JSON_HEDLEY_IS_CONSTEXPR_ +#undef JSON_HEDLEY_LIKELY +#undef JSON_HEDLEY_MALLOC +#undef JSON_HEDLEY_MCST_LCC_VERSION +#undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK +#undef JSON_HEDLEY_MESSAGE +#undef JSON_HEDLEY_MSVC_VERSION +#undef JSON_HEDLEY_MSVC_VERSION_CHECK +#undef JSON_HEDLEY_NEVER_INLINE +#undef JSON_HEDLEY_NON_NULL +#undef JSON_HEDLEY_NO_ESCAPE +#undef JSON_HEDLEY_NO_RETURN +#undef JSON_HEDLEY_NO_THROW +#undef JSON_HEDLEY_NULL +#undef JSON_HEDLEY_PELLES_VERSION +#undef JSON_HEDLEY_PELLES_VERSION_CHECK +#undef JSON_HEDLEY_PGI_VERSION +#undef JSON_HEDLEY_PGI_VERSION_CHECK +#undef JSON_HEDLEY_PREDICT +#undef JSON_HEDLEY_PRINTF_FORMAT +#undef JSON_HEDLEY_PRIVATE +#undef JSON_HEDLEY_PUBLIC +#undef JSON_HEDLEY_PURE +#undef JSON_HEDLEY_REINTERPRET_CAST +#undef JSON_HEDLEY_REQUIRE +#undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#undef JSON_HEDLEY_REQUIRE_MSG +#undef JSON_HEDLEY_RESTRICT +#undef JSON_HEDLEY_RETURNS_NON_NULL +#undef JSON_HEDLEY_SENTINEL +#undef JSON_HEDLEY_STATIC_ASSERT +#undef JSON_HEDLEY_STATIC_CAST +#undef JSON_HEDLEY_STRINGIFY +#undef JSON_HEDLEY_STRINGIFY_EX +#undef JSON_HEDLEY_SUNPRO_VERSION +#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#undef JSON_HEDLEY_TINYC_VERSION +#undef JSON_HEDLEY_TINYC_VERSION_CHECK +#undef JSON_HEDLEY_TI_ARMCL_VERSION +#undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#undef JSON_HEDLEY_TI_CL2000_VERSION +#undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#undef JSON_HEDLEY_TI_CL430_VERSION +#undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#undef JSON_HEDLEY_TI_CL6X_VERSION +#undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#undef JSON_HEDLEY_TI_CL7X_VERSION +#undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#undef JSON_HEDLEY_TI_CLPRU_VERSION +#undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#undef JSON_HEDLEY_TI_VERSION +#undef JSON_HEDLEY_TI_VERSION_CHECK +#undef JSON_HEDLEY_UNAVAILABLE +#undef JSON_HEDLEY_UNLIKELY +#undef JSON_HEDLEY_UNPREDICTABLE +#undef JSON_HEDLEY_UNREACHABLE +#undef JSON_HEDLEY_UNREACHABLE_RETURN +#undef JSON_HEDLEY_VERSION +#undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#undef JSON_HEDLEY_VERSION_DECODE_MINOR +#undef JSON_HEDLEY_VERSION_DECODE_REVISION +#undef JSON_HEDLEY_VERSION_ENCODE +#undef JSON_HEDLEY_WARNING +#undef JSON_HEDLEY_WARN_UNUSED_RESULT +#undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#undef JSON_HEDLEY_FALL_THROUGH + + + +#endif // INCLUDE_NLOHMANN_JSON_HPP_ diff --git a/deps/icu-small/source/tools/toolutil/package.cpp b/deps/icu-small/source/tools/toolutil/package.cpp index 3098f5d57d4523..e58c6648b647d8 100644 --- a/deps/icu-small/source/tools/toolutil/package.cpp +++ b/deps/icu-small/source/tools/toolutil/package.cpp @@ -46,12 +46,12 @@ static const int32_t kItemsChunk = 256; /* How much to increase the filesarray b /* UDataInfo cf. udata.h */ static const UDataInfo dataInfo={ - (uint16_t)sizeof(UDataInfo), + static_cast<uint16_t>(sizeof(UDataInfo)), 0, U_IS_BIG_ENDIAN, U_CHARSET_FAMILY, - (uint8_t)sizeof(char16_t), + static_cast<uint8_t>(sizeof(char16_t)), 0, {0x43, 0x6d, 0x6e, 0x44}, /* dataFormat="CmnD" */ @@ -68,7 +68,7 @@ U_CDECL_END static uint16_t readSwapUInt16(uint16_t x) { - return (uint16_t)((x<<8)|(x>>8)); + return static_cast<uint16_t>((x << 8) | (x >> 8)); } // platform types ---------------------------------------------------------- *** @@ -79,7 +79,7 @@ enum { TYPE_L, TYPE_B, TYPE_LE, TYPE_E, TYPE_COUNT }; static inline int32_t makeTypeEnum(uint8_t charset, UBool isBigEndian) { - return 2*(int32_t)charset+isBigEndian; + return 2 * static_cast<int32_t>(charset) + isBigEndian; } static inline int32_t @@ -104,8 +104,8 @@ makeTypeLetter(int32_t typeEnum) { static void makeTypeProps(char type, uint8_t &charset, UBool &isBigEndian) { int32_t typeEnum=makeTypeEnum(type); - charset=(uint8_t)(typeEnum>>1); - isBigEndian=(UBool)(typeEnum&1); + charset = static_cast<uint8_t>(typeEnum >> 1); + isBigEndian = static_cast<UBool>(typeEnum & 1); } U_CFUNC const UDataInfo * @@ -168,7 +168,7 @@ getTypeEnumForInputData(const uint8_t *data, int32_t length, return -1; } - return makeTypeEnum(pInfo->charsetFamily, (UBool)pInfo->isBigEndian); + return makeTypeEnum(pInfo->charsetFamily, static_cast<UBool>(pInfo->isBigEndian)); } // file handling ----------------------------------------------------------- *** @@ -180,7 +180,7 @@ extractPackageName(const char *filename, int32_t len; basename=findBasename(filename); - len=(int32_t)strlen(basename)-4; /* -4: subtract the length of ".dat" */ + len = static_cast<int32_t>(strlen(basename)) - 4; /* -4: subtract the length of ".dat" */ if(len<=0 || 0!=strcmp(basename+len, ".dat")) { fprintf(stderr, "icupkg: \"%s\" is not recognized as a package filename (must end with .dat)\n", @@ -190,7 +190,7 @@ extractPackageName(const char *filename, if(len>=capacity) { fprintf(stderr, "icupkg: the package name \"%s\" is too long (>=%ld)\n", - basename, (long)capacity); + basename, static_cast<long>(capacity)); exit(U_ILLEGAL_ARGUMENT_ERROR); } @@ -203,7 +203,7 @@ getFileLength(FILE *f) { int32_t length; fseek(f, 0, SEEK_END); - length=(int32_t)ftell(f); + length = static_cast<int32_t>(ftell(f)); fseek(f, 0, SEEK_SET); return length; } @@ -254,7 +254,7 @@ makeFullFilename(const char *path, const char *name, // prepend the path unless nullptr or empty if(path!=nullptr && path[0]!=0) { - if((int32_t)(strlen(path)+1)>=capacity) { + if (static_cast<int32_t>(strlen(path) + 1) >= capacity) { fprintf(stderr, "pathname too long: \"%s\"\n", path); exit(U_BUFFER_OVERFLOW_ERROR); } @@ -270,7 +270,7 @@ makeFullFilename(const char *path, const char *name, } // turn the name into a filename, turn tree separators into file separators - if((int32_t)((s-filename)+strlen(name))>=capacity) { + if (static_cast<int32_t>((s - filename) + strlen(name)) >= capacity) { fprintf(stderr, "path/filename too long: \"%s%s\"\n", filename, name); exit(U_BUFFER_OVERFLOW_ERROR); } @@ -309,7 +309,7 @@ readFile(const char *path, const char *name, int32_t &length, char &type) { UErrorCode errorCode; int32_t fileLength, typeEnum; - makeFullFilename(path, name, filename, (int32_t)sizeof(filename)); + makeFullFilename(path, name, filename, static_cast<int32_t>(sizeof(filename))); /* open the input file, get its length, allocate memory for it, read the file */ file=fopen(filename, "rb"); @@ -328,15 +328,15 @@ readFile(const char *path, const char *name, int32_t &length, char &type) { /* allocate the buffer, pad to multiple of 16 */ length=(fileLength+0xf)&~0xf; - icu::LocalMemory<uint8_t> data((uint8_t *)uprv_malloc(length)); + icu::LocalMemory<uint8_t> data(static_cast<uint8_t*>(uprv_malloc(length))); if(data.isNull()) { fclose(file); - fprintf(stderr, "icupkg: malloc error allocating %d bytes.\n", (int)length); + fprintf(stderr, "icupkg: malloc error allocating %d bytes.\n", static_cast<int>(length)); exit(U_MEMORY_ALLOCATION_ERROR); } /* read the file */ - if(fileLength!=(int32_t)fread(data.getAlias(), 1, fileLength, file)) { + if (fileLength != static_cast<int32_t>(fread(data.getAlias(), 1, fileLength, file))) { fprintf(stderr, "icupkg: error reading \"%s\"\n", filename); fclose(file); exit(U_FILE_ACCESS_ERROR); @@ -403,18 +403,18 @@ Package::Package() // create a header for an empty package DataHeader *pHeader; - pHeader=(DataHeader *)header; + pHeader = reinterpret_cast<DataHeader*>(header); pHeader->dataHeader.magic1=0xda; pHeader->dataHeader.magic2=0x27; memcpy(&pHeader->info, &dataInfo, sizeof(dataInfo)); - headerLength=(int32_t)(4+sizeof(dataInfo)); + headerLength = static_cast<int32_t>(4 + sizeof(dataInfo)); if(headerLength&0xf) { /* NUL-pad the header to a multiple of 16 */ int32_t length=(headerLength+0xf)&~0xf; memset(header+headerLength, 0, length-headerLength); headerLength=length; } - pHeader->dataHeader.headerSize=(uint16_t)headerLength; + pHeader->dataHeader.headerSize = static_cast<uint16_t>(headerLength); } Package::~Package() { @@ -454,7 +454,7 @@ Package::readPackage(const char *filename) { const UDataOffsetTOCEntry *inEntries; - extractPackageName(filename, inPkgName, (int32_t)sizeof(inPkgName)); + extractPackageName(filename, inPkgName, static_cast<int32_t>(sizeof(inPkgName))); /* read the file */ inData=readFile(nullptr, filename, inLength, type); @@ -486,7 +486,7 @@ Package::readPackage(const char *filename) { } /* check data format and format version */ - pInfo=(const UDataInfo *)((const char *)inData+4); + pInfo = reinterpret_cast<const UDataInfo*>(reinterpret_cast<const char*>(inData) + 4); if(!( pInfo->dataFormat[0]==0x43 && /* dataFormat="CmnD" */ pInfo->dataFormat[1]==0x6d && @@ -500,11 +500,11 @@ Package::readPackage(const char *filename) { pInfo->formatVersion[0]); exit(U_UNSUPPORTED_ERROR); } - inIsBigEndian=(UBool)pInfo->isBigEndian; + inIsBigEndian = static_cast<UBool>(pInfo->isBigEndian); inCharset=pInfo->charsetFamily; inBytes=(const uint8_t *)inData+headerLength; - inEntries=(const UDataOffsetTOCEntry *)(inBytes+4); + inEntries = reinterpret_cast<const UDataOffsetTOCEntry*>(inBytes + 4); /* check that the itemCount fits, then the ToC table, then at least the header of the last item */ length-=headerLength; @@ -512,7 +512,7 @@ Package::readPackage(const char *filename) { /* itemCount does not fit */ offset=0x7fffffff; } else { - itemCount=udata_readInt32(ds, *(const int32_t *)inBytes); + itemCount = udata_readInt32(ds, *reinterpret_cast<const int32_t*>(inBytes)); setItemCapacity(itemCount); /* resize so there's space */ if(itemCount==0) { offset=4; @@ -521,12 +521,12 @@ Package::readPackage(const char *filename) { offset=0x7fffffff; } else { /* offset of the last item plus at least 20 bytes for its header */ - offset=20+(int32_t)ds->readUInt32(inEntries[itemCount-1].dataOffset); + offset = 20 + static_cast<int32_t>(ds->readUInt32(inEntries[itemCount - 1].dataOffset)); } } if(length<offset) { fprintf(stderr, "icupkg: too few bytes (%ld after header) for a .dat package\n", - (long)length); + static_cast<long>(length)); exit(U_INDEX_OUTOFBOUNDS_ERROR); } /* do not modify the package length variable until the last item's length is set */ @@ -547,7 +547,7 @@ Package::readPackage(const char *filename) { /* swap the item name strings */ int32_t stringsOffset=4+8*itemCount; - itemLength=(int32_t)(ds->readUInt32(inEntries[0].dataOffset))-stringsOffset; + itemLength = static_cast<int32_t>(ds->readUInt32(inEntries[0].dataOffset)) - stringsOffset; // don't include padding bytes at the end of the item names while(itemLength>0 && inBytes[stringsOffset+itemLength-1]!=0) { @@ -577,7 +577,7 @@ Package::readPackage(const char *filename) { * while old-style ICU .dat packages (before multi-tree support) * use an underscore ('_') between package and item names. */ - offset=(int32_t)ds->readUInt32(inEntries[0].nameOffset)-stringsOffset; + offset = static_cast<int32_t>(ds->readUInt32(inEntries[0].nameOffset)) - stringsOffset; s=inItemStrings+offset; // name of the first entry int32_t prefixLength; if(doAutoPrefix) { @@ -590,7 +590,7 @@ Package::readPackage(const char *filename) { s, U_TREE_ENTRY_SEP_CHAR); exit(U_INVALID_FORMAT_ERROR); } - prefixLength=(int32_t)(prefixLimit-s); + prefixLength = static_cast<int32_t>(prefixLimit - s); if(prefixLength==0 || prefixLength>=UPRV_LENGTHOF(pkgPrefix)) { fprintf(stderr, "icupkg: --auto_toc_prefix[_with_type] but " @@ -614,7 +614,7 @@ Package::readPackage(const char *filename) { memcpy(prefix, inPkgName, inPkgNameLength); prefixLength=inPkgNameLength; - if( (int32_t)strlen(s)>=(inPkgNameLength+2) && + if (static_cast<int32_t>(strlen(s)) >= (inPkgNameLength + 2) && 0==memcmp(s, inPkgName, inPkgNameLength) && s[inPkgNameLength]=='_' ) { @@ -633,7 +633,7 @@ Package::readPackage(const char *filename) { for(i=0; i<itemCount; ++i) { // skip the package part of the item name, error if it does not match the actual package name // or if nothing follows the package name - offset=(int32_t)ds->readUInt32(inEntries[i].nameOffset)-stringsOffset; + offset = static_cast<int32_t>(ds->readUInt32(inEntries[i].nameOffset)) - stringsOffset; s=inItemStrings+offset; if(0!=strncmp(s, prefix, prefixLength) || s[prefixLength]==0) { fprintf(stderr, "icupkg: input .dat item name \"%s\" does not start with \"%s\"\n", @@ -643,9 +643,9 @@ Package::readPackage(const char *filename) { items[i].name=s+prefixLength; // set the item's data - items[i].data=(uint8_t *)inBytes+ds->readUInt32(inEntries[i].dataOffset); + items[i].data = const_cast<uint8_t*>(inBytes) + ds->readUInt32(inEntries[i].dataOffset); if(i>0) { - items[i-1].length=(int32_t)(items[i].data-items[i-1].data); + items[i - 1].length = static_cast<int32_t>(items[i].data - items[i - 1].data); // set the previous item's platform type typeEnum=getTypeEnumForInputData(items[i-1].data, items[i-1].length, &errorCode); @@ -703,10 +703,10 @@ Package::writePackage(const char *filename, char outType, const char *comment) { DataHeader *pHeader; int32_t length; - pHeader=(DataHeader *)header; + pHeader = reinterpret_cast<DataHeader*>(header); headerLength=4+pHeader->info.size; - length=(int32_t)strlen(comment); - if((int32_t)(headerLength+length)>=(int32_t)sizeof(header)) { + length = static_cast<int32_t>(strlen(comment)); + if ((headerLength + length) >= static_cast<int32_t>(sizeof(header))) { fprintf(stderr, "icupkg: comment too long\n"); exit(U_BUFFER_OVERFLOW_ERROR); } @@ -718,7 +718,7 @@ Package::writePackage(const char *filename, char outType, const char *comment) { memset(header+headerLength, 0, length-headerLength); headerLength=length; } - pHeader->dataHeader.headerSize=(uint16_t)headerLength; + pHeader->dataHeader.headerSize = static_cast<uint16_t>(headerLength); } makeTypeProps(outType, outCharset, outIsBigEndian); @@ -760,7 +760,7 @@ Package::writePackage(const char *filename, char outType, const char *comment) { exit(errorCode); } } - length=(int32_t)fwrite(header, 1, headerLength, file); + length = static_cast<int32_t>(fwrite(header, 1, headerLength, file)); if(length!=headerLength) { fprintf(stderr, "icupkg: unable to write complete header to file \"%s\"\n", filename); exit(U_FILE_ACCESS_ERROR); @@ -769,9 +769,9 @@ Package::writePackage(const char *filename, char outType, const char *comment) { // prepare and swap the package name with a tree separator // for prepending to item names if(pkgPrefix[0]==0) { - prefixLength=(int32_t)strlen(prefix); + prefixLength = static_cast<int32_t>(strlen(prefix)); } else { - prefixLength=(int32_t)strlen(pkgPrefix); + prefixLength = static_cast<int32_t>(strlen(pkgPrefix)); memcpy(prefix, pkgPrefix, prefixLength); if(prefixEndsWithType) { prefix[prefixLength-1]=outType; @@ -797,7 +797,7 @@ Package::writePackage(const char *filename, char outType, const char *comment) { // create the output item names in sorted order, with the package name prepended to each for(i=0; i<itemCount; ++i) { - length=(int32_t)strlen(items[i].name); + length = static_cast<int32_t>(strlen(items[i].name)); name=allocString(false, length+prefixLength); memcpy(name, prefix, prefixLength); memcpy(name+prefixLength, items[i].name, length+1); @@ -824,7 +824,7 @@ Package::writePackage(const char *filename, char outType, const char *comment) { exit(errorCode); } } - length=(int32_t)fwrite(&outInt32, 1, 4, file); + length = static_cast<int32_t>(fwrite(&outInt32, 1, 4, file)); if(length!=4) { fprintf(stderr, "icupkg: unable to write complete item count to file \"%s\"\n", filename); exit(U_FILE_ACCESS_ERROR); @@ -833,18 +833,18 @@ Package::writePackage(const char *filename, char outType, const char *comment) { // then write the item entries (and collect the maxItemLength) maxItemLength=0; for(i=0; i<itemCount; ++i) { - entry.nameOffset=(uint32_t)(basenameOffset+(items[i].name-outStrings)); - entry.dataOffset=(uint32_t)offset; + entry.nameOffset = static_cast<uint32_t>(basenameOffset + (items[i].name - outStrings)); + entry.dataOffset = static_cast<uint32_t>(offset); if(dsLocalToOut!=nullptr) { dsLocalToOut->swapArray32(dsLocalToOut, &entry, 8, &entry, &errorCode); if(U_FAILURE(errorCode)) { - fprintf(stderr, "icupkg: swapArray32(item entry %ld) failed - %s\n", (long)i, u_errorName(errorCode)); + fprintf(stderr, "icupkg: swapArray32(item entry %ld) failed - %s\n", static_cast<long>(i), u_errorName(errorCode)); exit(errorCode); } } - length=(int32_t)fwrite(&entry, 1, 8, file); + length = static_cast<int32_t>(fwrite(&entry, 1, 8, file)); if(length!=8) { - fprintf(stderr, "icupkg: unable to write complete item entry %ld to file \"%s\"\n", (long)i, filename); + fprintf(stderr, "icupkg: unable to write complete item entry %ld to file \"%s\"\n", static_cast<long>(i), filename); exit(U_FILE_ACCESS_ERROR); } @@ -856,7 +856,7 @@ Package::writePackage(const char *filename, char outType, const char *comment) { } // write the item names - length=(int32_t)fwrite(outStrings, 1, outStringTop, file); + length = static_cast<int32_t>(fwrite(outStrings, 1, outStringTop, file)); if(length!=outStringTop) { fprintf(stderr, "icupkg: unable to write complete item names to file \"%s\"\n", filename); exit(U_FILE_ACCESS_ERROR); @@ -872,13 +872,13 @@ Package::writePackage(const char *filename, char outType, const char *comment) { pItem->data, pItem->length, pItem->data, &errorCode); if(U_FAILURE(errorCode)) { - fprintf(stderr, "icupkg: udata_swap(item %ld) failed - %s\n", (long)i, u_errorName(errorCode)); + fprintf(stderr, "icupkg: udata_swap(item %ld) failed - %s\n", static_cast<long>(i), u_errorName(errorCode)); exit(errorCode); } } - length=(int32_t)fwrite(pItem->data, 1, pItem->length, file); + length = static_cast<int32_t>(fwrite(pItem->data, 1, pItem->length, file)); if(length!=pItem->length) { - fprintf(stderr, "icupkg: unable to write complete item %ld to file \"%s\"\n", (long)i, filename); + fprintf(stderr, "icupkg: unable to write complete item %ld to file \"%s\"\n", static_cast<long>(i), filename); exit(U_FILE_ACCESS_ERROR); } } @@ -948,12 +948,12 @@ Package::findItems(const char *pattern) { wild=strchr(pattern, '*'); if(wild==nullptr) { // no wildcard - findPrefixLength=(int32_t)strlen(pattern); + findPrefixLength = static_cast<int32_t>(strlen(pattern)); } else { // one wildcard - findPrefixLength=(int32_t)(wild-pattern); + findPrefixLength = static_cast<int32_t>(wild - pattern); findSuffix=wild+1; - findSuffixLength=(int32_t)strlen(findSuffix); + findSuffixLength = static_cast<int32_t>(strlen(findSuffix)); if(nullptr!=strchr(findSuffix, '*')) { // two or more wildcards fprintf(stderr, "icupkg: syntax error (more than one '*') in item pattern \"%s\"\n", pattern); @@ -980,7 +980,7 @@ Package::findNextItem() { while(findNextIndex<itemCount) { idx=findNextIndex++; name=items[idx].name; - nameLength=(int32_t)strlen(name); + nameLength = static_cast<int32_t>(strlen(name)); if(nameLength<(findPrefixLength+findSuffixLength)) { // item name too short for prefix & suffix continue; @@ -1148,7 +1148,7 @@ Package::extractItem(const char *filesPath, const char *outName, int32_t idx, ch ds=udata_openSwapper(itemIsBigEndian, itemCharset, outIsBigEndian, outCharset, &errorCode); if(U_FAILURE(errorCode)) { fprintf(stderr, "icupkg: udata_openSwapper(item %ld) failed - %s\n", - (long)idx, u_errorName(errorCode)); + static_cast<long>(idx), u_errorName(errorCode)); exit(errorCode); } @@ -1158,7 +1158,7 @@ Package::extractItem(const char *filesPath, const char *outName, int32_t idx, ch // swap the item from its platform properties to the desired ones udata_swap(ds, pItem->data, pItem->length, pItem->data, &errorCode); if(U_FAILURE(errorCode)) { - fprintf(stderr, "icupkg: udata_swap(item %ld) failed - %s\n", (long)idx, u_errorName(errorCode)); + fprintf(stderr, "icupkg: udata_swap(item %ld) failed - %s\n", static_cast<long>(idx), u_errorName(errorCode)); exit(errorCode); } udata_closeSwapper(ds); @@ -1166,13 +1166,13 @@ Package::extractItem(const char *filesPath, const char *outName, int32_t idx, ch } // create the file and write its contents - makeFullFilenameAndDirs(filesPath, outName, filename, (int32_t)sizeof(filename)); + makeFullFilenameAndDirs(filesPath, outName, filename, static_cast<int32_t>(sizeof(filename))); file=fopen(filename, "wb"); if(file==nullptr) { fprintf(stderr, "icupkg: unable to create file \"%s\"\n", filename); exit(U_FILE_ACCESS_ERROR); } - fileLength=(int32_t)fwrite(pItem->data, 1, pItem->length, file); + fileLength = static_cast<int32_t>(fwrite(pItem->data, 1, pItem->length, file)); if(ferror(file) || fileLength!=pItem->length) { fprintf(stderr, "icupkg: unable to write complete file \"%s\"\n", filename); @@ -1222,7 +1222,7 @@ Package::getItem(int32_t idx) const { void Package::checkDependency(void *context, const char *itemName, const char *targetName) { // check dependency: make sure the target item is in the package - Package *me=(Package *)context; + Package* me = static_cast<Package*>(context); if(me->findItem(targetName)<0) { me->isMissingItems=true; fprintf(stderr, "Item %s depends on missing item %s\n", itemName, targetName); @@ -1233,7 +1233,7 @@ UBool Package::checkDependencies() { isMissingItems=false; enumDependencies(this, checkDependency); - return (UBool)!isMissingItems; + return !isMissingItems; } void @@ -1274,7 +1274,7 @@ Package::allocString(UBool in, int32_t length) { void Package::sortItems() { UErrorCode errorCode=U_ZERO_ERROR; - uprv_sortArray(items, itemCount, (int32_t)sizeof(Item), compareItems, nullptr, false, &errorCode); + uprv_sortArray(items, itemCount, static_cast<int32_t>(sizeof(Item)), compareItems, nullptr, false, &errorCode); if(U_FAILURE(errorCode)) { fprintf(stderr, "icupkg: sorting item names failed - %s\n", u_errorName(errorCode)); exit(errorCode); @@ -1286,11 +1286,11 @@ void Package::setItemCapacity(int32_t max) if(max<=itemMax) { return; } - Item *newItems = (Item*)uprv_malloc(max * sizeof(items[0])); + Item* newItems = static_cast<Item*>(uprv_malloc(max * sizeof(items[0]))); Item *oldItems = items; if(newItems == nullptr) { fprintf(stderr, "icupkg: Out of memory trying to allocate %lu bytes for %d items\n", - (unsigned long)(max*sizeof(items[0])), max); + max * sizeof(items[0]), max); exit(U_MEMORY_ALLOCATION_ERROR); } if(items && itemCount>0) { diff --git a/deps/icu-small/source/tools/toolutil/pkg_genc.cpp b/deps/icu-small/source/tools/toolutil/pkg_genc.cpp index 741a8a5228ca68..c33343318b3d2d 100644 --- a/deps/icu-small/source/tools/toolutil/pkg_genc.cpp +++ b/deps/icu-small/source/tools/toolutil/pkg_genc.cpp @@ -16,6 +16,9 @@ # define NOMCX #include <windows.h> #include <time.h> +# if defined(__clang__) +# include <exception> +# endif # ifdef __GNUC__ # define WINDOWS_WITH_GNUC # endif @@ -294,6 +297,11 @@ checkAssemblyHeaderName(const char* optAssembly) { return false; } +U_CAPI UBool U_EXPORT2 +checkCpuArchitecture(const char* optCpuArch) { + return strcmp(optCpuArch, "x64") == 0 || strcmp(optCpuArch, "x86") == 0 || strcmp(optCpuArch, "arm64") == 0; +} + U_CAPI void U_EXPORT2 printAssemblyHeadersToStdErr() { @@ -598,7 +606,7 @@ write32(FileStream *out, uint32_t bitField, uint32_t column) { int32_t i; char bitFieldStr[64]; /* This is more bits than needed for a 32-bit number */ char *s = bitFieldStr; - uint8_t *ptrIdx = (uint8_t *)&bitField; + uint8_t* ptrIdx = reinterpret_cast<uint8_t*>(&bitField); static const char hexToStr[16] = { '0','1','2','3', '4','5','6','7', @@ -665,14 +673,14 @@ write8(FileStream *out, uint8_t byte, uint32_t column) { /* convert the byte value to a string */ if(byte>=100) { - s[i++]=(char)('0'+byte/100); + s[i++] = static_cast<char>('0' + byte / 100); byte%=100; } if(i>0 || byte>=10) { - s[i++]=(char)('0'+byte/10); + s[i++] = static_cast<char>('0' + byte / 10); byte%=10; } - s[i++]=(char)('0'+byte); + s[i++] = static_cast<char>('0' + byte); s[i]=0; /* write the value, possibly with comma and newline */ @@ -799,7 +807,12 @@ getOutFilename( #ifdef CAN_GENERATE_OBJECTS static void -getArchitecture(uint16_t *pCPU, uint16_t *pBits, UBool *pIsBigEndian, const char *optMatchArch) { +getArchitecture( + uint16_t *pCPU, + uint16_t *pBits, + UBool *pIsBigEndian, + const char *optMatchArch, + [[maybe_unused]] const char *optCpuArch) { union { char bytes[2048]; #ifdef U_ELF @@ -830,7 +843,7 @@ getArchitecture(uint16_t *pCPU, uint16_t *pBits, UBool *pIsBigEndian, const char /* set EM_386 because elf.h does not provide better defaults */ *pCPU=EM_386; *pBits=32; - *pIsBigEndian=(UBool)(U_IS_BIG_ENDIAN ? ELFDATA2MSB : ELFDATA2LSB); + *pIsBigEndian = static_cast<UBool>(U_IS_BIG_ENDIAN ? ELFDATA2MSB : ELFDATA2LSB); #elif U_PLATFORM_HAS_WIN32_API // Windows always runs in little-endian mode. *pIsBigEndian = false; @@ -847,7 +860,25 @@ getArchitecture(uint16_t *pCPU, uint16_t *pBits, UBool *pIsBigEndian, const char # if defined(_M_IX86) *pCPU = IMAGE_FILE_MACHINE_I386; # else - *pCPU = IMAGE_FILE_MACHINE_UNKNOWN; + // Linker for ClangCL doesn't handle IMAGE_FILE_MACHINE_UNKNOWN the same as + // linker for MSVC. Because of this optCpuArch is used to define the CPU + // architecture in that case. While _M_AMD64 and _M_ARM64 could be used, + // this would potentially be problematic when cross-compiling as this code + // would most likely be ran on host machine to generate the .obj file for + // the target architecture. +# if defined(__clang__) + if (strcmp(optCpuArch, "x64") == 0) { + *pCPU = IMAGE_FILE_MACHINE_AMD64; + } else if (strcmp(optCpuArch, "x86") == 0) { + *pCPU = IMAGE_FILE_MACHINE_I386; + } else if (strcmp(optCpuArch, "arm64") == 0) { + *pCPU = IMAGE_FILE_MACHINE_ARM64; + } else { + std::terminate(); // Unreachable. + } +# else + *pCPU = IMAGE_FILE_MACHINE_UNKNOWN; +# endif # endif # if defined(_M_IA64) || defined(_M_AMD64) || defined (_M_ARM64) *pBits = 64; // Doesn't seem to be used for anything interesting though? @@ -870,7 +901,7 @@ getArchitecture(uint16_t *pCPU, uint16_t *pBits, UBool *pIsBigEndian, const char length=T_FileStream_read(in, buffer.bytes, sizeof(buffer.bytes)); #ifdef U_ELF - if(length<(int32_t)sizeof(Elf32_Ehdr)) { + if (length < static_cast<int32_t>(sizeof(Elf32_Ehdr))) { fprintf(stderr, "genccode: match-arch file %s is too short\n", filename); exit(U_UNSUPPORTED_ERROR); } @@ -898,7 +929,7 @@ getArchitecture(uint16_t *pCPU, uint16_t *pBits, UBool *pIsBigEndian, const char } #endif - *pIsBigEndian=(UBool)(buffer.header32.e_ident[EI_DATA]==ELFDATA2MSB); + *pIsBigEndian = static_cast<UBool>(buffer.header32.e_ident[EI_DATA] == ELFDATA2MSB); if(*pIsBigEndian!=U_IS_BIG_ENDIAN) { fprintf(stderr, "genccode: currently only same-endianness ELF formats are supported\n"); exit(U_UNSUPPORTED_ERROR); @@ -934,6 +965,7 @@ writeObjectCode( const char *destdir, const char *optEntryPoint, const char *optMatchArch, + const char *optCpuArch, const char *optFilename, char *outFilePath, size_t outFilePathCapacity, @@ -1201,7 +1233,7 @@ writeObjectCode( #endif /* deal with options, files and the entry point name */ - getArchitecture(&cpu, &bits, &makeBigEndian, optMatchArch); + getArchitecture(&cpu, &bits, &makeBigEndian, optMatchArch, optCpuArch); if (optMatchArch) { printf("genccode: --match-arch cpu=%hu bits=%hu big-endian=%d\n", cpu, bits, makeBigEndian); @@ -1371,7 +1403,7 @@ writeObjectCode( if(length==0) { break; } - T_FileStream_write(out, buffer, (int32_t)length); + T_FileStream_write(out, buffer, length); } #if U_PLATFORM_HAS_WIN32_API diff --git a/deps/icu-small/source/tools/toolutil/pkg_genc.h b/deps/icu-small/source/tools/toolutil/pkg_genc.h index 2dd1b45cde992e..ef966aba1306e9 100644 --- a/deps/icu-small/source/tools/toolutil/pkg_genc.h +++ b/deps/icu-small/source/tools/toolutil/pkg_genc.h @@ -59,9 +59,8 @@ #define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING #endif -#define LARGE_BUFFER_MAX_SIZE 2048 -#define SMALL_BUFFER_MAX_SIZE 512 -#define SMALL_BUFFER_FLAG_NAMES 32 +#define LARGE_BUFFER_MAX_SIZE 16384 +#define SMALL_BUFFER_MAX_SIZE 4096 #define BUFFER_PADDING_SIZE 20 /** End platform defines **/ @@ -74,6 +73,9 @@ printAssemblyHeadersToStdErr(void); U_CAPI UBool U_EXPORT2 checkAssemblyHeaderName(const char* optAssembly); +U_CAPI UBool U_EXPORT2 +checkCpuArchitecture(const char* optCpuArch); + U_CAPI void U_EXPORT2 writeCCode( const char *filename, @@ -99,6 +101,7 @@ writeObjectCode( const char *destdir, const char *optEntryPoint, const char *optMatchArch, + const char *optCpuArch, const char *optFilename, char *outFilePath, size_t outFilePathCapacity, diff --git a/deps/icu-small/source/tools/toolutil/pkg_gencmn.cpp b/deps/icu-small/source/tools/toolutil/pkg_gencmn.cpp index a301c322ebec09..3ec965d8e66671 100644 --- a/deps/icu-small/source/tools/toolutil/pkg_gencmn.cpp +++ b/deps/icu-small/source/tools/toolutil/pkg_gencmn.cpp @@ -412,9 +412,9 @@ addFile(const char *filename, const char *name, const char *source, UBool source if(fileCount==fileMax) { fileMax += CHUNK_FILE_COUNT; - files = (File *)uprv_realloc(files, fileMax*sizeof(files[0])); /* note: never freed. */ + files = static_cast<File*>(uprv_realloc(files, fileMax * sizeof(files[0]))); /* note: never freed. */ if(files==nullptr) { - fprintf(stderr, "pkgdata/gencmn: Could not allocate %u bytes for %d files\n", (unsigned int)(fileMax*sizeof(files[0])), fileCount); + fprintf(stderr, "pkgdata/gencmn: Could not allocate %u bytes for %d files\n", static_cast<unsigned int>(fileMax * sizeof(files[0])), fileCount); exit(U_MEMORY_ALLOCATION_ERROR); } } @@ -428,7 +428,7 @@ addFile(const char *filename, const char *name, const char *source, UBool source } fullPath = pathToFullPath(filename, source); /* store the pathname */ - length = (uint32_t)(uprv_strlen(filename) + 1 + uprv_strlen(name) + 1); + length = static_cast<uint32_t>(uprv_strlen(filename) + 1 + uprv_strlen(name) + 1); s=allocString(length); uprv_strcpy(s, name); uprv_strcat(s, U_TREE_ENTRY_SEP_STRING); @@ -462,7 +462,7 @@ addFile(const char *filename, const char *name, const char *source, UBool source /* do not add files that are longer than maxSize */ if(maxSize && length>maxSize) { if (verbose) { - printf("%s ignored (size %ld > %ld)\n", fullPath, (long)length, (long)maxSize); + printf("%s ignored (size %ld > %ld)\n", fullPath, static_cast<long>(length), static_cast<long>(maxSize)); } return; } @@ -471,7 +471,7 @@ addFile(const char *filename, const char *name, const char *source, UBool source char *t; /* get and store the basename */ /* need to include the package name */ - length = (uint32_t)(uprv_strlen(filename) + 1 + uprv_strlen(name) + 1); + length = static_cast<uint32_t>(uprv_strlen(filename) + 1 + uprv_strlen(name) + 1); s=allocString(length); uprv_strcpy(s, name); uprv_strcat(s, U_TREE_ENTRY_SEP_STRING); @@ -515,16 +515,16 @@ pathToFullPath(const char *path, const char *source) { char *fullPath; int32_t n; - length = (uint32_t)(uprv_strlen(path) + 1); - newLength = (length + 1 + (int32_t)uprv_strlen(source)); - fullPath = (char *)uprv_malloc(newLength); + length = static_cast<uint32_t>(uprv_strlen(path) + 1); + newLength = (length + 1 + static_cast<int32_t>(uprv_strlen(source))); + fullPath = static_cast<char*>(uprv_malloc(newLength)); if(source != nullptr) { uprv_strcpy(fullPath, source); uprv_strcat(fullPath, U_FILE_SEP_STRING); } else { fullPath[0] = 0; } - n = (int32_t)uprv_strlen(fullPath); + n = static_cast<int32_t>(uprv_strlen(fullPath)); fullPath[n] = 0; /* Suppress compiler warning for unused variable n */ /* when conditional code below is not compiled. */ uprv_strcat(fullPath, path); diff --git a/deps/icu-small/source/tools/toolutil/pkgitems.cpp b/deps/icu-small/source/tools/toolutil/pkgitems.cpp index e49775d56da5df..ca7c31ae6c024f 100644 --- a/deps/icu-small/source/tools/toolutil/pkgitems.cpp +++ b/deps/icu-small/source/tools/toolutil/pkgitems.cpp @@ -90,7 +90,7 @@ class NativeItem { if(pInfo->isBigEndian==U_IS_BIG_ENDIAN && pInfo->charsetFamily==U_CHARSET_FAMILY) { bytes=pItem->data+itemHeaderLength; } else { - UDataSwapper *ds=udata_openSwapper((UBool)pInfo->isBigEndian, pInfo->charsetFamily, U_IS_BIG_ENDIAN, U_CHARSET_FAMILY, &errorCode); + UDataSwapper* ds = udata_openSwapper(static_cast<UBool>(pInfo->isBigEndian), pInfo->charsetFamily, U_IS_BIG_ENDIAN, U_CHARSET_FAMILY, &errorCode); if(U_FAILURE(errorCode)) { fprintf(stderr, "icupkg: udata_openSwapper(\"%s\") failed - %s\n", pItem->name, u_errorName(errorCode)); @@ -142,15 +142,15 @@ makeTargetName(const char *itemName, const char *id, int32_t idLength, const cha } // build the target string - treeLength=(int32_t)(itemID-itemName); + treeLength = static_cast<int32_t>(itemID - itemName); if(idLength<0) { - idLength=(int32_t)strlen(id); + idLength = static_cast<int32_t>(strlen(id)); } - suffixLength=(int32_t)strlen(suffix); + suffixLength = static_cast<int32_t>(strlen(suffix)); targetLength=treeLength+idLength+suffixLength; if(targetLength>=capacity) { fprintf(stderr, "icupkg/makeTargetName(%s) target item name length %ld too long\n", - itemName, (long)targetLength); + itemName, static_cast<long>(targetLength)); *pErrorCode=U_BUFFER_OVERFLOW_ERROR; return; } @@ -165,7 +165,7 @@ checkIDSuffix(const char *itemName, const char *id, int32_t idLength, const char CheckDependency check, void *context, UErrorCode *pErrorCode) { char target[200]; - makeTargetName(itemName, id, idLength, suffix, target, (int32_t)sizeof(target), pErrorCode); + makeTargetName(itemName, id, idLength, suffix, target, static_cast<int32_t>(sizeof(target)), pErrorCode); if(U_SUCCESS(*pErrorCode)) { check(context, itemName, target); } @@ -199,7 +199,7 @@ checkParent(const char *itemName, CheckDependency check, void *context, if(parentLimit!=itemID) { // get the parent item name by truncating the last part of this item's name */ parent=itemID; - parentLength=(int32_t)(parentLimit-itemID); + parentLength = static_cast<int32_t>(parentLimit - itemID); } else { // no '_' in the item name: the parent is the root bundle parent="root"; @@ -261,9 +261,9 @@ checkAlias(const char *itemName, // convert the Unicode string to char * char localeID[48]; - if(length>=(int32_t)sizeof(localeID)) { + if (length >= static_cast<int32_t>(sizeof(localeID))) { fprintf(stderr, "icupkg/ures_enumDependencies(%s res=%08x) alias locale ID length %ld too long\n", - itemName, res, (long)length); + itemName, res, static_cast<long>(length)); *pErrorCode=U_BUFFER_OVERFLOW_ERROR; return; } @@ -389,7 +389,7 @@ ures_enumDependencies(const char *itemName, const UDataInfo *pInfo, if(resData.usesPoolBundle) { char poolName[200]; - makeTargetName(itemName, "pool", 4, ".res", poolName, (int32_t)sizeof(poolName), pErrorCode); + makeTargetName(itemName, "pool", 4, ".res", poolName, static_cast<int32_t>(sizeof(poolName)), pErrorCode); if(U_FAILURE(*pErrorCode)) { return; } @@ -407,7 +407,7 @@ ures_enumDependencies(const char *itemName, const UDataInfo *pInfo, fprintf(stderr, "icupkg: %s is not a pool bundle\n", poolName); return; } - const int32_t *poolRoot=(const int32_t *)nativePool.getBytes(); + const int32_t* poolRoot = reinterpret_cast<const int32_t*>(nativePool.getBytes()); const int32_t *poolIndexes=poolRoot+1; int32_t poolIndexLength=poolIndexes[URES_INDEX_LENGTH]&0xff; if(!(poolIndexLength>URES_INDEX_POOL_CHECKSUM && @@ -417,8 +417,8 @@ ures_enumDependencies(const char *itemName, const UDataInfo *pInfo, return; } if(resData.pRoot[1+URES_INDEX_POOL_CHECKSUM]==poolIndexes[URES_INDEX_POOL_CHECKSUM]) { - resData.poolBundleKeys=(const char *)(poolIndexes+poolIndexLength); - resData.poolBundleStrings=(const uint16_t *)(poolRoot+poolIndexes[URES_INDEX_KEYS_TOP]); + resData.poolBundleKeys = reinterpret_cast<const char*>(poolIndexes + poolIndexLength); + resData.poolBundleStrings = reinterpret_cast<const uint16_t*>(poolRoot + poolIndexes[URES_INDEX_KEYS_TOP]); } else { fprintf(stderr, "icupkg: %s has mismatched checksum for %s\n", poolName, itemName); return; @@ -475,10 +475,10 @@ ucnv_enumDependencies(const UDataSwapper *ds, } /* read the initial UConverterStaticData structure after the UDataInfo header */ - inStaticData=(const UConverterStaticData *)inBytes; + inStaticData = reinterpret_cast<const UConverterStaticData*>(inBytes); - if( length<(int32_t)sizeof(UConverterStaticData) || - (uint32_t)length<(staticDataSize=ds->readUInt32(inStaticData->structSize)) + if (length < static_cast<int32_t>(sizeof(UConverterStaticData)) || + static_cast<uint32_t>(length) < (staticDataSize = ds->readUInt32(inStaticData->structSize)) ) { udata_printError(ds, "icupkg/ucnv_enumDependencies(): too few bytes (%d after header) for an ICU .cnv conversion table\n", length); @@ -487,7 +487,7 @@ ucnv_enumDependencies(const UDataSwapper *ds, } inBytes+=staticDataSize; - length-=(int32_t)staticDataSize; + length -= static_cast<int32_t>(staticDataSize); /* check for supported conversionType values */ if(inStaticData->conversionType==UCNV_MBCS) { @@ -495,9 +495,9 @@ ucnv_enumDependencies(const UDataSwapper *ds, uint32_t mbcsHeaderLength, mbcsHeaderFlags, mbcsHeaderOptions; int32_t extOffset; - inMBCSHeader=(const _MBCSHeader *)inBytes; + inMBCSHeader = reinterpret_cast<const _MBCSHeader*>(inBytes); - if(length<(int32_t)sizeof(_MBCSHeader)) { + if (length < static_cast<int32_t>(sizeof(_MBCSHeader))) { udata_printError(ds, "icupkg/ucnv_enumDependencies(): too few bytes (%d after headers) for an ICU MBCS .cnv conversion table\n", length); *pErrorCode=U_INDEX_OUTOFBOUNDS_ERROR; @@ -518,8 +518,8 @@ ucnv_enumDependencies(const UDataSwapper *ds, } mbcsHeaderFlags=ds->readUInt32(inMBCSHeader->flags); - extOffset=(int32_t)(mbcsHeaderFlags>>8); - outputType=(uint8_t)mbcsHeaderFlags; + extOffset = static_cast<int32_t>(mbcsHeaderFlags >> 8); + outputType = static_cast<uint8_t>(mbcsHeaderFlags); if(outputType==MBCS_OUTPUT_EXT_ONLY) { /* @@ -538,9 +538,9 @@ ucnv_enumDependencies(const UDataSwapper *ds, } /* swap the base name, between the header and the extension data */ - const char *inBaseName=(const char *)inBytes+mbcsHeaderLength*4; - baseNameLength=(int32_t)strlen(inBaseName); - if(baseNameLength>=(int32_t)sizeof(baseName)) { + const char* inBaseName = reinterpret_cast<const char*>(inBytes) + mbcsHeaderLength * 4; + baseNameLength = static_cast<int32_t>(strlen(inBaseName)); + if (baseNameLength >= static_cast<int32_t>(sizeof(baseName))) { udata_printError(ds, "icupkg/ucnv_enumDependencies(%s): base name length %ld too long\n", itemName, baseNameLength); *pErrorCode=U_UNSUPPORTED_ERROR; @@ -612,7 +612,7 @@ Package::enumDependencies(Item *pItem, void *context, CheckDependency check) { { // TODO: share/cache swappers UDataSwapper *ds=udata_openSwapper( - (UBool)pInfo->isBigEndian, pInfo->charsetFamily, + static_cast<UBool>(pInfo->isBigEndian), pInfo->charsetFamily, U_IS_BIG_ENDIAN, U_CHARSET_FAMILY, &errorCode); if(U_FAILURE(errorCode)) { diff --git a/deps/icu-small/source/tools/toolutil/ppucd.cpp b/deps/icu-small/source/tools/toolutil/ppucd.cpp index ab0e316038ecd5..4ac73d2acddef8 100644 --- a/deps/icu-small/source/tools/toolutil/ppucd.cpp +++ b/deps/icu-small/source/tools/toolutil/ppucd.cpp @@ -109,7 +109,7 @@ PreparsedUCD::readLine(UErrorCode &errorCode) { if(result==nullptr) { if(ferror(file)) { perror("error reading preparsed UCD"); - fprintf(stderr, "error reading preparsed UCD before line %ld\n", (long)lineNumber); + fprintf(stderr, "error reading preparsed UCD before line %ld\n", static_cast<long>(lineNumber)); errorCode=U_FILE_ACCESS_ERROR; } return NO_LINE; @@ -141,7 +141,7 @@ PreparsedUCD::readLine(UErrorCode &errorCode) { if(type==LINE_TYPE_COUNT) { fprintf(stderr, "error in preparsed UCD: unknown line type (first field) '%s' on line %ld\n", - line, (long)lineNumber); + line, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return NO_LINE; } @@ -149,7 +149,7 @@ PreparsedUCD::readLine(UErrorCode &errorCode) { break; } } - lineType=(LineType)type; + lineType = static_cast<LineType>(type); if(lineType==UNICODE_VERSION_LINE && fieldLimit<lineLimit) { u_versionFromString(ucdVersion, fieldLimit+1); } @@ -186,7 +186,7 @@ PreparsedUCD::getProps(UnicodeSet &newValues, UErrorCode &errorCode) { fprintf(stderr, "error in preparsed UCD: missing default/block/cp range field " "(no second field) on line %ld\n", - (long)lineNumber); + static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return nullptr; } @@ -200,21 +200,21 @@ PreparsedUCD::getProps(UnicodeSet &newValues, UErrorCode &errorCode) { if(blockLineIndex>=0) { fprintf(stderr, "error in preparsed UCD: default line %ld after one or more block lines\n", - (long)lineNumber); + static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return nullptr; } if(defaultLineIndex>=0) { fprintf(stderr, "error in preparsed UCD: second line with default properties on line %ld\n", - (long)lineNumber); + static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return nullptr; } if(start!=0 || end!=0x10ffff) { fprintf(stderr, "error in preparsed UCD: default range must be 0..10FFFF, not '%s' on line %ld\n", - field, (long)lineNumber); + field, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return nullptr; } @@ -241,7 +241,7 @@ PreparsedUCD::getProps(UnicodeSet &newValues, UErrorCode &errorCode) { // Except, it inherits the one blk=Block property. int32_t blkIndex=UCHAR_BLOCK-UCHAR_INT_START; cpProps.intProps[blkIndex]=blockProps.intProps[blkIndex]; - newValues.remove((UChar32)UCHAR_BLOCK); + newValues.remove(static_cast<UChar32>(UCHAR_BLOCK)); } } else if(start>blockProps.end || end<blockProps.start) { // Code point range fully outside the last block inherits the default properties. @@ -251,7 +251,7 @@ PreparsedUCD::getProps(UnicodeSet &newValues, UErrorCode &errorCode) { fprintf(stderr, "error in preparsed UCD: cp range %s on line %ld only " "partially overlaps with block range %04lX..%04lX\n", - field, (long)lineNumber, (long)blockProps.start, (long)blockProps.end); + field, static_cast<long>(lineNumber), static_cast<long>(blockProps.start), static_cast<long>(blockProps.end)); errorCode=U_PARSE_ERROR; return nullptr; } @@ -308,7 +308,7 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV fprintf(stderr, "error in preparsed UCD: mix of binary-property-no and " "enum-property syntax '%s' on line %ld\n", - field, (long)lineNumber); + field, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return false; } @@ -319,7 +319,7 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV } else { binaryValue=-1; // Copy out the property name rather than modifying the field (writing a NUL). - pBuffer.append(p, (int32_t)(v-p), errorCode); + pBuffer.append(p, static_cast<int32_t>(v - p), errorCode); p=pBuffer.data(); ++v; } @@ -339,13 +339,13 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV } if(prop<UCHAR_BINARY_LIMIT) { if(binaryValue>=0) { - props.binProps[prop]=(UBool)binaryValue; + props.binProps[prop] = static_cast<UBool>(binaryValue); } else { // No binary value for a binary property. fprintf(stderr, "error in preparsed UCD: enum-property syntax '%s' " "for binary property on line %ld\n", - field, (long)lineNumber); + field, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; } } else if(binaryValue>=0) { @@ -353,12 +353,12 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV fprintf(stderr, "error in preparsed UCD: binary-property syntax '%s' " "for non-binary property on line %ld\n", - field, (long)lineNumber); + field, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; } else if (prop < UCHAR_INT_START) { fprintf(stderr, "error in preparsed UCD: prop value is invalid: '%d' for line %ld\n", - prop, (long)lineNumber); + prop, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; } else if(prop<UCHAR_INT_LIMIT) { int32_t value=pnames->getPropertyValueEnum(prop, v); @@ -367,13 +367,13 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV char *end; unsigned long ccc=uprv_strtoul(v, &end, 10); if(v<end && *end==0 && ccc<=254) { - value=(int32_t)ccc; + value = static_cast<int32_t>(ccc); } } if(value==UCHAR_INVALID_CODE) { fprintf(stderr, "error in preparsed UCD: '%s' is not a valid value on line %ld\n", - field, (long)lineNumber); + field, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; } else { props.intProps[prop-UCHAR_INT_START]=value; @@ -417,7 +417,7 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV default: fprintf(stderr, "error in preparsed UCD: '%s' is not a valid default value on line %ld\n", - field, (long)lineNumber); + field, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; } } else { @@ -487,7 +487,7 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV } } if(U_SUCCESS(errorCode)) { - newValues.add((UChar32)prop); + newValues.add(static_cast<UChar32>(prop)); return true; } else { return false; @@ -508,7 +508,7 @@ PreparsedUCD::getRangeForAlgNames(UChar32 &start, UChar32 &end, UErrorCode &erro fprintf(stderr, "error in preparsed UCD: missing algnamesrange range field " "(no second field) on line %ld\n", - (long)lineNumber); + static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return false; } @@ -518,15 +518,15 @@ PreparsedUCD::getRangeForAlgNames(UChar32 &start, UChar32 &end, UErrorCode &erro UChar32 PreparsedUCD::parseCodePoint(const char *s, UErrorCode &errorCode) { char *end; - uint32_t value=(uint32_t)uprv_strtoul(s, &end, 16); + uint32_t value = static_cast<uint32_t>(uprv_strtoul(s, &end, 16)); if(end<=s || *end!=0 || value>=0x110000) { fprintf(stderr, "error in preparsed UCD: '%s' is not a valid code point on line %ld\n", - s, (long)lineNumber); + s, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return U_SENTINEL; } - return (UChar32)value; + return static_cast<UChar32>(value); } UBool @@ -536,11 +536,11 @@ PreparsedUCD::parseCodePointRange(const char *s, UChar32 &start, UChar32 &end, U if(U_FAILURE(errorCode)) { fprintf(stderr, "error in preparsed UCD: '%s' is not a valid code point range on line %ld\n", - s, (long)lineNumber); + s, static_cast<long>(lineNumber)); return false; } - start=(UChar32)st; - end=(UChar32)e; + start = static_cast<UChar32>(st); + end = static_cast<UChar32>(e); return true; } @@ -558,7 +558,7 @@ PreparsedUCD::parseString(const char *s, UnicodeString &uni, UErrorCode &errorCo if(U_FAILURE(errorCode)) { fprintf(stderr, "error in preparsed UCD: '%s' is not a valid Unicode string on line %ld\n", - s, (long)lineNumber); + s, static_cast<long>(lineNumber)); } } @@ -571,7 +571,7 @@ PreparsedUCD::parseScriptExtensions(const char *s, UnicodeSet &scx, UErrorCode & const char *scs; const char *scLimit=strchr(s, ' '); if(scLimit!=nullptr) { - scs=scString.clear().append(s, (int32_t)(scLimit-s), errorCode).data(); + scs = scString.clear().append(s, static_cast<int32_t>(scLimit - s), errorCode).data(); if(U_FAILURE(errorCode)) { return; } } else { scs=s; @@ -580,13 +580,13 @@ PreparsedUCD::parseScriptExtensions(const char *s, UnicodeSet &scx, UErrorCode & if(script==UCHAR_INVALID_CODE) { fprintf(stderr, "error in preparsed UCD: '%s' is not a valid script code on line %ld\n", - scs, (long)lineNumber); + scs, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return; } else if(scx.contains(script)) { fprintf(stderr, "error in preparsed UCD: scx has duplicate '%s' codes on line %ld\n", - scs, (long)lineNumber); + scs, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return; } else { @@ -599,7 +599,7 @@ PreparsedUCD::parseScriptExtensions(const char *s, UnicodeSet &scx, UErrorCode & } } if(scx.isEmpty()) { - fprintf(stderr, "error in preparsed UCD: empty scx= on line %ld\n", (long)lineNumber); + fprintf(stderr, "error in preparsed UCD: empty scx= on line %ld\n", static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; } } @@ -613,7 +613,7 @@ PreparsedUCD::parseIdentifierType(const char *s, UnicodeSet &idType, UErrorCode const char *typeChars; const char *limit=strchr(s, ' '); if(limit!=nullptr) { - typeChars=typeString.clear().append(s, (int32_t)(limit-s), errorCode).data(); + typeChars = typeString.clear().append(s, static_cast<int32_t>(limit - s), errorCode).data(); if(U_FAILURE(errorCode)) { return; } } else { typeChars=s; @@ -622,13 +622,13 @@ PreparsedUCD::parseIdentifierType(const char *s, UnicodeSet &idType, UErrorCode if(type==UCHAR_INVALID_CODE) { fprintf(stderr, "error in preparsed UCD: '%s' is not a valid Identifier_Type on line %ld\n", - typeChars, (long)lineNumber); + typeChars, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return; } else if(idType.contains(type)) { fprintf(stderr, "error in preparsed UCD: Identifier_Type has duplicate '%s' values on line %ld\n", - typeChars, (long)lineNumber); + typeChars, static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; return; } else { @@ -643,7 +643,7 @@ PreparsedUCD::parseIdentifierType(const char *s, UnicodeSet &idType, UErrorCode if(idType.isEmpty()) { fprintf(stderr, "error in preparsed UCD: empty Identifier_Type= on line %ld\n", - (long)lineNumber); + static_cast<long>(lineNumber)); errorCode=U_PARSE_ERROR; } } diff --git a/deps/icu-small/source/tools/toolutil/swapimpl.cpp b/deps/icu-small/source/tools/toolutil/swapimpl.cpp index cdf038aad0ddb4..d060db4083c59c 100644 --- a/deps/icu-small/source/tools/toolutil/swapimpl.cpp +++ b/deps/icu-small/source/tools/toolutil/swapimpl.cpp @@ -111,7 +111,7 @@ upname_swap(const UDataSwapper *ds, // formatVersion 2 initially has indexes[8], 32 bytes. if(length<32) { udata_printError(ds, "upname_swap(): too few bytes (%d after header) for pnames.icu\n", - (int)length); + static_cast<int>(length)); *pErrorCode=U_INDEX_OUTOFBOUNDS_ERROR; return 0; } @@ -123,7 +123,7 @@ upname_swap(const UDataSwapper *ds, if(length<totalSize) { udata_printError(ds, "upname_swap(): too few bytes (%d after header, should be %d) " "for pnames.icu\n", - (int)length, (int)totalSize); + static_cast<int>(length), static_cast<int>(totalSize)); *pErrorCode=U_INDEX_OUTOFBOUNDS_ERROR; return 0; } @@ -176,13 +176,13 @@ uprops_swap(const UDataSwapper *ds, } /* check data format and format version */ - pInfo=(const UDataInfo *)((const char *)inData+4); + pInfo = reinterpret_cast<const UDataInfo*>(static_cast<const char*>(inData) + 4); if(!( pInfo->dataFormat[0]==0x55 && /* dataFormat="UPro" */ pInfo->dataFormat[1]==0x50 && pInfo->dataFormat[2]==0x72 && pInfo->dataFormat[3]==0x6f && - (3<=pInfo->formatVersion[0] && pInfo->formatVersion[0]<=8) && + (3<=pInfo->formatVersion[0] && pInfo->formatVersion[0]<=9) && (pInfo->formatVersion[0]>=7 || (pInfo->formatVersion[2]==UTRIE_SHIFT && pInfo->formatVersion[3]==UTRIE_INDEX_SHIFT)) @@ -196,7 +196,7 @@ uprops_swap(const UDataSwapper *ds, } /* the properties file must contain at least the indexes array */ - if(length>=0 && (length-headerSize)<(int32_t)sizeof(dataIndexes)) { + if (length >= 0 && (length - headerSize) < static_cast<int32_t>(sizeof(dataIndexes))) { udata_printError(ds, "uprops_swap(): too few bytes (%d after header) for a Unicode properties file\n", length-headerSize); *pErrorCode=U_INDEX_OUTOFBOUNDS_ERROR; @@ -204,7 +204,7 @@ uprops_swap(const UDataSwapper *ds, } /* read the indexes */ - inData32=(const int32_t *)((const char *)inData+headerSize); + inData32 = reinterpret_cast<const int32_t*>(static_cast<const char*>(inData) + headerSize); for(i=0; i<UPROPS_INDEX_COUNT; ++i) { dataIndexes[i]=udata_readInt32(ds, inData32[i]); } @@ -231,7 +231,7 @@ uprops_swap(const UDataSwapper *ds, return 0; } - outData32=(int32_t *)((char *)outData+headerSize); + outData32 = reinterpret_cast<int32_t*>(static_cast<char*>(outData) + headerSize); /* copy everything for inaccessible data (padding) */ if(inData32!=outData32) { @@ -296,13 +296,21 @@ uprops_swap(const UDataSwapper *ds, // SCX const uint16_t scriptExtensions[2*(i7-i6)]; ds->swapArray16(ds, inData32+dataIndexes[UPROPS_SCRIPT_EXTENSIONS_INDEX], - 4*(dataIndexes[UPROPS_RESERVED_INDEX_7]-dataIndexes[UPROPS_SCRIPT_EXTENSIONS_INDEX]), + 4*(dataIndexes[UPROPS_BLOCK_TRIE_INDEX]-dataIndexes[UPROPS_SCRIPT_EXTENSIONS_INDEX]), outData32+dataIndexes[UPROPS_SCRIPT_EXTENSIONS_INDEX], pErrorCode); + + // Swap the Block UCPTrie=CodePointTrie. + int32_t partOffset = dataIndexes[UPROPS_BLOCK_TRIE_INDEX]; + int32_t nextOffset = dataIndexes[UPROPS_RESERVED_INDEX_8]; + int32_t partLength = 4 * (nextOffset - partOffset); + if (partLength >= 0) { + utrie_swapAnyVersion(ds, inData32 + partOffset, partLength, + outData32 + partOffset, pErrorCode); + } } - /* i7 reservedIndex7; -- 32-bit unit index to the top of the Script_Extensions data */ - return headerSize+4*dataIndexes[UPROPS_RESERVED_INDEX_7]; + return headerSize+4*dataIndexes[UPROPS_RESERVED_INDEX_8]; } /* Unicode case mapping data swapping --------------------------------------- */ @@ -329,7 +337,7 @@ ucase_swap(const UDataSwapper *ds, } /* check data format and format version */ - pInfo=(const UDataInfo *)((const char *)inData+4); + pInfo = reinterpret_cast<const UDataInfo*>(static_cast<const char*>(inData) + 4); if(!( pInfo->dataFormat[0]==UCASE_FMT_0 && /* dataFormat="cAsE" */ pInfo->dataFormat[1]==UCASE_FMT_1 && @@ -348,10 +356,10 @@ ucase_swap(const UDataSwapper *ds, return 0; } - inBytes=(const uint8_t *)inData+headerSize; - outBytes=(uint8_t *)outData+headerSize; + inBytes = static_cast<const uint8_t*>(inData) + headerSize; + outBytes = static_cast<uint8_t*>(outData) + headerSize; - inIndexes=(const int32_t *)inBytes; + inIndexes = reinterpret_cast<const int32_t*>(inBytes); if(length>=0) { length-=headerSize; @@ -431,7 +439,7 @@ ubidi_swap(const UDataSwapper *ds, } /* check data format and format version */ - pInfo=(const UDataInfo *)((const char *)inData+4); + pInfo = reinterpret_cast<const UDataInfo*>(static_cast<const char*>(inData) + 4); if(!( pInfo->dataFormat[0]==UBIDI_FMT_0 && /* dataFormat="BiDi" */ pInfo->dataFormat[1]==UBIDI_FMT_1 && @@ -450,10 +458,10 @@ ubidi_swap(const UDataSwapper *ds, return 0; } - inBytes=(const uint8_t *)inData+headerSize; - outBytes=(uint8_t *)outData+headerSize; + inBytes = static_cast<const uint8_t*>(inData) + headerSize; + outBytes = static_cast<uint8_t*>(outData) + headerSize; - inIndexes=(const int32_t *)inBytes; + inIndexes = reinterpret_cast<const int32_t*>(inBytes); if(length>=0) { length-=headerSize; @@ -541,7 +549,7 @@ unorm_swap(const UDataSwapper *ds, } /* check data format and format version */ - pInfo=(const UDataInfo *)((const char *)inData+4); + pInfo = reinterpret_cast<const UDataInfo*>(static_cast<const char*>(inData) + 4); if(!( pInfo->dataFormat[0]==0x4e && /* dataFormat="Norm" */ pInfo->dataFormat[1]==0x6f && @@ -557,10 +565,10 @@ unorm_swap(const UDataSwapper *ds, return 0; } - inBytes=(const uint8_t *)inData+headerSize; - outBytes=(uint8_t *)outData+headerSize; + inBytes = static_cast<const uint8_t*>(inData) + headerSize; + outBytes = static_cast<uint8_t*>(outData) + headerSize; - inIndexes=(const int32_t *)inBytes; + inIndexes = reinterpret_cast<const int32_t*>(inBytes); if(length>=0) { length-=headerSize; @@ -655,7 +663,7 @@ ulayout_swap(const UDataSwapper *ds, } // Check data format and format version. - const UDataInfo *pInfo = (const UDataInfo *)((const char *)inData + 4); + const UDataInfo* pInfo = reinterpret_cast<const UDataInfo*>(static_cast<const char*>(inData) + 4); if (!( pInfo->dataFormat[0] == ULAYOUT_FMT_0 && // dataFormat="Layo" pInfo->dataFormat[1] == ULAYOUT_FMT_1 && @@ -672,10 +680,10 @@ ulayout_swap(const UDataSwapper *ds, return 0; } - const uint8_t *inBytes = (const uint8_t *)inData + headerSize; - uint8_t *outBytes = (uint8_t *)outData + headerSize; + const uint8_t* inBytes = static_cast<const uint8_t*>(inData) + headerSize; + uint8_t* outBytes = static_cast<uint8_t*>(outData) + headerSize; - const int32_t *inIndexes = (const int32_t *)inBytes; + const int32_t* inIndexes = reinterpret_cast<const int32_t*>(inBytes); if (length >= 0) { length -= headerSize; @@ -755,7 +763,7 @@ uemoji_swap(const UDataSwapper *ds, } // Check data format and format version. - const UDataInfo *pInfo = (const UDataInfo *)((const char *)inData + 4); + const UDataInfo* pInfo = reinterpret_cast<const UDataInfo*>(static_cast<const char*>(inData) + 4); if (!( pInfo->dataFormat[0] == u'E' && pInfo->dataFormat[1] == u'm' && @@ -772,10 +780,10 @@ uemoji_swap(const UDataSwapper *ds, return 0; } - const uint8_t *inBytes = (const uint8_t *)inData + headerSize; - uint8_t *outBytes = (uint8_t *)outData + headerSize; + const uint8_t* inBytes = static_cast<const uint8_t*>(inData) + headerSize; + uint8_t* outBytes = static_cast<uint8_t*>(outData) + headerSize; - const int32_t *inIndexes = (const int32_t *)inBytes; + const int32_t* inIndexes = reinterpret_cast<const int32_t*>(inBytes); if (length >= 0) { length -= headerSize; @@ -872,7 +880,7 @@ test_swap(const UDataSwapper *ds, } /* check data format and format version */ - pInfo=(const UDataInfo *)((const char *)inData+4); + pInfo = reinterpret_cast<const UDataInfo*>(static_cast<const char*>(inData) + 4); if(!( pInfo->dataFormat[0]==0x54 && /* dataFormat="Norm" */ pInfo->dataFormat[1]==0x65 && @@ -888,8 +896,8 @@ test_swap(const UDataSwapper *ds, return 0; } - inBytes=(const uint8_t *)inData+headerSize; - outBytes=(uint8_t *)outData+headerSize; + inBytes = static_cast<const uint8_t*>(inData) + headerSize; + outBytes = static_cast<uint8_t*>(outData) + headerSize; int32_t size16 = 2; // 16bit plus padding int32_t sizeStr = 5; // 4 char inv-str plus null diff --git a/deps/icu-small/source/tools/toolutil/toolutil.cpp b/deps/icu-small/source/tools/toolutil/toolutil.cpp index 7e7bdc78a127fc..cc912722c3bd3e 100644 --- a/deps/icu-small/source/tools/toolutil/toolutil.cpp +++ b/deps/icu-small/source/tools/toolutil/toolutil.cpp @@ -66,9 +66,13 @@ #include "unicode/errorcode.h" #include "unicode/putil.h" +#include "unicode/uchar.h" +#include "unicode/umutablecptrie.h" +#include "unicode/ucptrie.h" #include "cmemory.h" #include "cstring.h" #include "toolutil.h" +#include "uassert.h" U_NAMESPACE_BEGIN @@ -82,6 +86,72 @@ void IcuToolErrorCode::handleFailure() const { exit(errorCode); } +namespace toolutil { + +void setCPTrieBit(UMutableCPTrie *mutableCPTrie, + UChar32 start, UChar32 end, int32_t shift, bool on, UErrorCode &errorCode) { + uint32_t mask = U_MASK(shift); + uint32_t value = on ? mask : 0; + setCPTrieBits(mutableCPTrie, start, end, mask, value, errorCode); +} + +void setCPTrieBits(UMutableCPTrie *mutableCPTrie, + UChar32 start, UChar32 end, uint32_t mask, uint32_t value, + UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return; } + // The value must not have any bits set outside of the mask. + if ((value & ~mask) != 0) { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + + if (start == end) { + uint32_t oldValue = umutablecptrie_get(mutableCPTrie, start); + uint32_t newValue = (oldValue & ~mask) | value; + if (newValue != oldValue) { + umutablecptrie_set(mutableCPTrie, start, newValue, &errorCode); + } + return; + } + while (start <= end && U_SUCCESS(errorCode)) { + uint32_t oldValue; + UChar32 rangeEnd = umutablecptrie_getRange( + mutableCPTrie, start, UCPMAP_RANGE_NORMAL, 0, nullptr, nullptr, &oldValue); + if (rangeEnd > end) { + rangeEnd = end; + } + uint32_t newValue = (oldValue & ~mask) | value; + if (newValue != oldValue) { + umutablecptrie_setRange(mutableCPTrie, start, rangeEnd, newValue, &errorCode); + } + start = rangeEnd + 1; + } +} + +int32_t getCPTrieSize(UMutableCPTrie *mt, UCPTrieType type, UCPTrieValueWidth valueWidth) { + UErrorCode errorCode = U_ZERO_ERROR; + UCPTrie *cpTrie = umutablecptrie_buildImmutable(mt, type, valueWidth, &errorCode); + if (U_FAILURE(errorCode)) { + fprintf(stderr, + "toolutil/getCPTrieSize error: umutablecptrie_buildImmutable() failed: %s\n", + u_errorName(errorCode)); + return -1; + } + uint8_t block[100000]; + int32_t size = ucptrie_toBinary(cpTrie, block, sizeof(block), &errorCode); + ucptrie_close(cpTrie); + if (U_FAILURE(errorCode) && errorCode != U_BUFFER_OVERFLOW_ERROR) { + fprintf(stderr, + "toolutil/getCPTrieSize error: ucptrie_toBinary() failed: %s (length %ld)\n", + u_errorName(errorCode), static_cast<long>(size)); + return -1; + } + U_ASSERT((size & 3) == 0); // multiple of 4 bytes + return size; +} + +} // toolutil + U_NAMESPACE_END static int32_t currentYear = -1; @@ -322,7 +392,7 @@ utm_hasCapacity(UToolMemory *mem, int32_t capacity) { if(mem->maxCapacity<capacity) { fprintf(stderr, "error: %s - trying to use more than maxCapacity=%ld units\n", - mem->name, (long)mem->maxCapacity); + mem->name, static_cast<long>(mem->maxCapacity)); exit(U_MEMORY_ALLOCATION_ERROR); } diff --git a/deps/icu-small/source/tools/toolutil/toolutil.h b/deps/icu-small/source/tools/toolutil/toolutil.h index 98b2155551e439..98988f144eb990 100644 --- a/deps/icu-small/source/tools/toolutil/toolutil.h +++ b/deps/icu-small/source/tools/toolutil/toolutil.h @@ -26,6 +26,7 @@ #ifdef __cplusplus #include "unicode/errorcode.h" +#include "unicode/umutablecptrie.h" U_NAMESPACE_BEGIN @@ -46,6 +47,30 @@ class U_TOOLUTIL_API IcuToolErrorCode : public ErrorCode { const char *location; }; +namespace toolutil { + +/** + * Sets one bit in the trie values of the start..end range, + * without changing the other bits in the trie values of that range. + */ +U_TOOLUTIL_API void +setCPTrieBit(UMutableCPTrie *mutableCPTrie, + UChar32 start, UChar32 end, int32_t shift, bool on, UErrorCode &errorCode); + +/** + * Sets a bit set (defined by the mask) in the trie values of the start..end range, + * without changing the other bits in the trie values of that range. + * The given value must not have any bits set outside of the mask. + */ +U_TOOLUTIL_API void +setCPTrieBits(UMutableCPTrie *mutableCPTrie, + UChar32 start, UChar32 end, uint32_t mask, uint32_t value, UErrorCode &errorCode); + +U_TOOLUTIL_API int32_t +getCPTrieSize(UMutableCPTrie *mt, UCPTrieType type, UCPTrieValueWidth valueWidth); + +} // toolutil + U_NAMESPACE_END #endif diff --git a/deps/icu-small/source/tools/toolutil/ucbuf.cpp b/deps/icu-small/source/tools/toolutil/ucbuf.cpp index 1eb54e260e6b3c..d9d2649750160b 100644 --- a/deps/icu-small/source/tools/toolutil/ucbuf.cpp +++ b/deps/icu-small/source/tools/toolutil/ucbuf.cpp @@ -174,7 +174,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ pTarget = buf->buffer; /* check if we arrived here without exhausting the buffer*/ if(buf->currentPos<buf->bufLimit){ - offset = (int32_t)(buf->bufLimit-buf->currentPos); + offset = static_cast<int32_t>(buf->bufLimit - buf->currentPos); memmove(buf->buffer,buf->currentPos,offset* sizeof(char16_t)); } @@ -189,7 +189,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ }else{ cbufSize = T_FileStream_size(buf->in); - cbuf = (char*)uprv_malloc(cbufSize); + cbuf = static_cast<char*>(uprv_malloc(cbufSize)); if (cbuf == nullptr) { *error = U_MEMORY_ALLOCATION_ERROR; return nullptr; @@ -221,7 +221,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ sourceLimit = source + inputRead; ucnv_toUnicode(buf->conv,&target,target+(buf->bufCapacity-offset), &source,sourceLimit,nullptr, - (UBool)(buf->remaining==0),error); + static_cast<UBool>(buf->remaining == 0), error); if(U_FAILURE(*error)){ char context[CONTEXT_LEN+1]; @@ -245,7 +245,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ ucnv_getInvalidChars(buf->conv,context,&len,&error1); context[len]= 0 ; /* null terminate the buffer */ - pos = (int32_t)(source - cbuf - len); + pos = static_cast<int32_t>(source - cbuf - len); /* for pre-context */ start = (pos <=CONTEXT_LEN)? 0 : (pos - (CONTEXT_LEN-1)); @@ -257,7 +257,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ /* for post-context */ start = pos+len; - stop = (int32_t)(((pos+CONTEXT_LEN)<= (sourceLimit-cbuf) )? (pos+(CONTEXT_LEN-1)) : (sourceLimit-cbuf)); + stop = static_cast<int32_t>(pos + CONTEXT_LEN <= sourceLimit - cbuf ? pos + (CONTEXT_LEN - 1) : sourceLimit - cbuf); memcpy(postContext,source,stop-start); /* null terminate the buffer */ @@ -290,10 +290,10 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ /* re convert */ ucnv_toUnicode(buf->conv,&target,target+(buf->bufCapacity-offset), &source,sourceLimit,nullptr, - (UBool)(buf->remaining==0),&error1); + static_cast<UBool>(buf->remaining == 0), &error1); } - outputWritten = (int32_t)(target - pTarget); + outputWritten = static_cast<int32_t>(target - pTarget); #ifdef UCBUF_DEBUG { @@ -342,7 +342,7 @@ ucbuf_getc(UCHARBUF* buf,UErrorCode* error){ /* get a UChar32 from the stream*/ U_CAPI int32_t U_EXPORT2 ucbuf_getc32(UCHARBUF* buf,UErrorCode* error){ - int32_t retVal = (int32_t)U_EOF; + int32_t retVal = U_EOF; if(error==nullptr || U_FAILURE(*error)){ return false; } @@ -367,7 +367,7 @@ ucbuf_getc32(UCHARBUF* buf,UErrorCode* error){ /* u_unescapeAt() callback to return a char16_t*/ static char16_t U_CALLCONV _charAt(int32_t offset, void *context) { - return ((UCHARBUF*) context)->currentPos[offset]; + return static_cast<UCHARBUF*>(context)->currentPos[offset]; } /* getc and escape it */ diff --git a/deps/icu-small/source/tools/toolutil/ucm.cpp b/deps/icu-small/source/tools/toolutil/ucm.cpp index 272570e72f4e64..923041a53f607b 100644 --- a/deps/icu-small/source/tools/toolutil/ucm.cpp +++ b/deps/icu-small/source/tools/toolutil/ucm.cpp @@ -46,7 +46,7 @@ printMapping(UCMapping *m, UChar32 *codePoints, uint8_t *bytes, FILE *f) { int32_t j; for(j=0; j<m->uLen; ++j) { - fprintf(f, "<U%04lX>", (long)codePoints[j]); + fprintf(f, "<U%04lX>", static_cast<long>(codePoints[j])); } fputc(' ', f); @@ -432,7 +432,7 @@ checkBaseExtBytes(UCMStates *baseStates, UCMTable *base, UCMTable *ext, result=0; - isSISO=(UBool)(baseStates->outputType==MBCS_OUTPUT_2_SISO); + isSISO = static_cast<UBool>(baseStates->outputType == MBCS_OUTPUT_2_SISO); for(;;) { /* skip irrelevant mappings on both sides */ @@ -575,8 +575,8 @@ ucm_checkBaseExt(UCMStates *baseStates, /* check */ result= - checkBaseExtUnicode(baseStates, base, ext, (UBool)(moveTarget!=nullptr), intersectBase)| - checkBaseExtBytes(baseStates, base, ext, (UBool)(moveTarget!=nullptr), intersectBase); + checkBaseExtUnicode(baseStates, base, ext, moveTarget != nullptr, intersectBase) | + checkBaseExtBytes(baseStates, base, ext, moveTarget != nullptr, intersectBase); if(result&HAS_ERRORS) { return false; diff --git a/deps/icu-small/source/tools/toolutil/ucmstate.cpp b/deps/icu-small/source/tools/toolutil/ucmstate.cpp index 08782f68d110bc..1be23b2bbafc5a 100644 --- a/deps/icu-small/source/tools/toolutil/ucmstate.cpp +++ b/deps/icu-small/source/tools/toolutil/ucmstate.cpp @@ -695,7 +695,7 @@ compactToUnicode2(UCMStates *states, return; } if(verbose) { - printf("compacting toUnicode data saves %ld bytes\n", (long)savings); + printf("compacting toUnicode data saves %ld bytes\n", static_cast<long>(savings)); } if(states->countStates>=MBCS_MAX_STATE_COUNT) { fprintf(stderr, "cannot compact toUnicode because the maximum number of states is reached\n"); @@ -703,7 +703,7 @@ compactToUnicode2(UCMStates *states, } /* make a copy of the state table */ - oldStateTable=(int32_t (*)[256])uprv_malloc(states->countStates*1024); + oldStateTable = static_cast<int32_t(*)[256]>(uprv_malloc(states->countStates * 1024)); if(oldStateTable==nullptr) { fprintf(stderr, "cannot compact toUnicode: out of memory\n"); return; @@ -754,10 +754,10 @@ compactToUnicode2(UCMStates *states, uprv_free(oldStateTable); return; } - *pUnicodeCodeUnits=(uint16_t *)uprv_malloc(sum*sizeof(uint16_t)); + *pUnicodeCodeUnits = static_cast<uint16_t*>(uprv_malloc(sum * sizeof(uint16_t))); if(*pUnicodeCodeUnits==nullptr) { fprintf(stderr, "cannot compact toUnicode: out of memory allocating %ld 16-bit code units\n", - (long)sum); + static_cast<long>(sum)); /* revert to the old state table */ *pUnicodeCodeUnits=oldUnicodeCodeUnits; --states->countStates; @@ -785,7 +785,7 @@ compactToUnicode2(UCMStates *states, for(i=0; i<256; ++i) { entry=states->stateTable[leadState][i]; if(MBCS_ENTRY_IS_TRANSITION(entry)) { - trailState=(uint8_t)MBCS_ENTRY_TRANSITION_STATE(entry); + trailState = static_cast<uint8_t>(MBCS_ENTRY_TRANSITION_STATE(entry)); /* the new state does not have assigned states */ if(trailState!=newState) { trailOffset=MBCS_ENTRY_TRANSITION_OFFSET(entry); @@ -857,12 +857,12 @@ findUnassigned(UCMStates *states, toUFallbacks, countToUFallbacks, MBCS_ENTRY_TRANSITION_STATE(entry), offset+MBCS_ENTRY_TRANSITION_OFFSET(entry), - (b<<8)|(uint32_t)i); + (b << 8) | static_cast<uint32_t>(i)); if(savings<0) { haveAssigned=true; } else if(savings>0) { printf(" all-unassigned sequences from prefix 0x%02lx state %ld use %ld bytes\n", - (unsigned long)((b<<8)|i), (long)state, (long)savings); + static_cast<unsigned long>((b << 8) | i), static_cast<long>(state), static_cast<long>(savings)); belowSavings+=savings; } } else if(!haveAssigned) { @@ -911,7 +911,7 @@ compactToUnicodeHelper(UCMStates *states, state, 0, 0); if(savings>0) { printf(" all-unassigned sequences from initial state %ld use %ld bytes\n", - (long)state, (long)savings); + static_cast<long>(state), static_cast<long>(savings)); } } } diff --git a/deps/icu-small/source/tools/toolutil/udbgutil.cpp b/deps/icu-small/source/tools/toolutil/udbgutil.cpp index c5e20fa0ae8eac..40c727c59c34c3 100644 --- a/deps/icu-small/source/tools/toolutil/udbgutil.cpp +++ b/deps/icu-small/source/tools/toolutil/udbgutil.cpp @@ -562,7 +562,7 @@ static const USystemParams systemParams[] = { #define U_SYSPARAM_COUNT UPRV_LENGTHOF(systemParams) U_CAPI const char *udbg_getSystemParameterNameByIndex(int32_t i) { - if(i>=0 && i < (int32_t)U_SYSPARAM_COUNT) { + if (i >= 0 && i < U_SYSPARAM_COUNT) { return systemParams[i].paramName; } else { return nullptr; @@ -571,7 +571,7 @@ U_CAPI const char *udbg_getSystemParameterNameByIndex(int32_t i) { U_CAPI int32_t udbg_getSystemParameterValueByIndex(int32_t i, char *buffer, int32_t bufferCapacity, UErrorCode *status) { - if(i>=0 && i< (int32_t)U_SYSPARAM_COUNT) { + if (i >= 0 && i < U_SYSPARAM_COUNT) { return systemParams[i].paramFunction(&(systemParams[i]),buffer,bufferCapacity,status); } else { return 0; diff --git a/deps/icu-small/source/tools/toolutil/ujson.h b/deps/icu-small/source/tools/toolutil/ujson.h new file mode 100644 index 00000000000000..c6dcf454bd7d12 --- /dev/null +++ b/deps/icu-small/source/tools/toolutil/ujson.h @@ -0,0 +1,38 @@ +// © 2024 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +#ifndef __UJSON_H__ +#define __UJSON_H__ + +/* + Without this code, the output if the JSON library code + throws an exception would look like: + terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_3::detail::parse_error' + what(): [json.exception.parse_error.101] parse error at line 1, column 1: attempting to parse an empty input; check that your input string or stream contains the expected JSON +Aborted (core dumped) + + (for example, if one of the JSON tests files contains an error or a file doesn't exist.) + + With this code, the output is: + + JSON exception thrown; modify tools/ctestfw//ujson.h to get diagnostics. + Exiting immediately. + + The entire #if block can be commented out in order to temporarily enable exceptions + and get a better parse error message (temporarily, while debugging). + */ + +// Disable exceptions in JSON parser + +#if _HAS_EXCEPTIONS == 0 +#define JSON_TRY_USER if(true) +#define JSON_CATCH_USER(exception) if(false) +#define JSON_THROW_USER(exception) { \ + printf("JSON exception thrown; modify tools/toolutil/ujson.h to get diagnostics.\n\ +Exiting immediately.\n"); \ + exit(1); \ +} +#endif + +#include "json-json.hpp" + +#endif /* __UJSON_H__ */ diff --git a/deps/icu-small/source/tools/toolutil/xmlparser.cpp b/deps/icu-small/source/tools/toolutil/xmlparser.cpp index edb85bdab0e937..c834b30cf8b645 100644 --- a/deps/icu-small/source/tools/toolutil/xmlparser.cpp +++ b/deps/icu-small/source/tools/toolutil/xmlparser.cpp @@ -146,7 +146,7 @@ UXMLParser::UXMLParser(UErrorCode &status) : fNames(status), fElementStack(status), - fOneLF((char16_t)0x0a) // Plain new-line string, used in new line normalization. + fOneLF(static_cast<char16_t>(0x0a)) // Plain new-line string, used in new line normalization. { } @@ -182,8 +182,8 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { return nullptr; } - bytesLength=T_FileStream_read(f, bytes, (int32_t)sizeof(bytes)); - if(bytesLength<(int32_t)sizeof(bytes)) { + bytesLength = T_FileStream_read(f, bytes, static_cast<int32_t>(sizeof(bytes))); + if (bytesLength < static_cast<int32_t>(sizeof(bytes))) { // we have already read the entire file fileLength=bytesLength; } else { @@ -222,7 +222,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { &pu, buffer+src.getCapacity(), &pb, bytes+bytesLength, nullptr, true, &errorCode); - src.releaseBuffer(U_SUCCESS(errorCode) ? (int32_t)(pu-buffer) : 0); + src.releaseBuffer(U_SUCCESS(errorCode) ? static_cast<int32_t>(pu - buffer) : 0); ucnv_close(cnv); cnv=nullptr; if(U_FAILURE(errorCode)) { @@ -235,7 +235,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { if(mXMLDecl.reset(src).lookingAt(0, errorCode)) { int32_t declEnd=mXMLDecl.end(errorCode); // go beyond <?xml - int32_t pos=src.indexOf((char16_t)x_l)+1; + int32_t pos = src.indexOf(static_cast<char16_t>(x_l)) + 1; mAttrValue.reset(src); while(pos<declEnd && mAttrValue.lookingAt(pos, errorCode)) { // loop runs once per attribute on this element. @@ -248,7 +248,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { attValue.truncate(attValue.length()-1); // and one from the end. if(attName==UNICODE_STRING("encoding", 8)) { - length=attValue.extract(0, 0x7fffffff, charsetBuffer, (int32_t)sizeof(charsetBuffer)); + length = attValue.extract(0, 0x7fffffff, charsetBuffer, static_cast<int32_t>(sizeof(charsetBuffer))); charset=charsetBuffer; break; } @@ -290,7 +290,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { cnv, &pu, buffer+src.getCapacity(), &pb, bytes+bytesLength, nullptr, false, &errorCode); - src.releaseBuffer(U_SUCCESS(errorCode) ? (int32_t)(pu-buffer) : 0); + src.releaseBuffer(U_SUCCESS(errorCode) ? static_cast<int32_t>(pu - buffer) : 0); if(errorCode==U_BUFFER_OVERFLOW_ERROR) { errorCode=U_ZERO_ERROR; capacity=(3*src.getCapacity())/2; // increase capacity by 50% @@ -308,7 +308,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { } // read next block - bytesLength=T_FileStream_read(f, bytes, (int32_t)sizeof(bytes)); + bytesLength = T_FileStream_read(f, bytes, static_cast<int32_t>(sizeof(bytes))); if(bytesLength==0) { // reached end of file, convert once more to flush the converter flush=true; @@ -438,7 +438,7 @@ UXMLParser::parse(const UnicodeString &src, UErrorCode &status) { el = nullptr; break; } - el = (UXMLElement *)fElementStack.pop(); + el = static_cast<UXMLElement*>(fElementStack.pop()); continue; } @@ -514,7 +514,7 @@ UXMLParser::createElement(RegexMatcher &mEl, UErrorCode &status) { // Next change all xml white space chars to plain \u0020 spaces. mAttrNormalizer.reset(attValue); - UnicodeString oneSpace((char16_t)0x0020); + UnicodeString oneSpace(static_cast<char16_t>(0x0020)); attValue = mAttrNormalizer.replaceAll(oneSpace, status); // Replace character entities. @@ -565,7 +565,7 @@ UnicodeString UXMLParser::scanContent(UErrorCode &status) { UnicodeString result; if (mXMLCharData.lookingAt(fPos, status)) { - result = mXMLCharData.group((int32_t)0, status); + result = mXMLCharData.group(static_cast<int32_t>(0), status); // Normalize the new-lines. (Before char ref substitution) mNewLineNormalizer.reset(result); result = mNewLineNormalizer.replaceAll(fOneLF, status); @@ -595,15 +595,15 @@ UXMLParser::replaceCharRefs(UnicodeString &s, UErrorCode &status) { // which is flagged by start() of that group not being -1. while (mAmps.find()) { if (mAmps.start(1, status) != -1) { - replacement.setTo((char16_t)x_AMP); + replacement.setTo(static_cast<char16_t>(x_AMP)); } else if (mAmps.start(2, status) != -1) { - replacement.setTo((char16_t)x_LT); + replacement.setTo(static_cast<char16_t>(x_LT)); } else if (mAmps.start(3, status) != -1) { - replacement.setTo((char16_t)x_GT); + replacement.setTo(static_cast<char16_t>(x_GT)); } else if (mAmps.start(4, status) != -1) { - replacement.setTo((char16_t)x_APOS); + replacement.setTo(static_cast<char16_t>(x_APOS)); } else if (mAmps.start(5, status) != -1) { - replacement.setTo((char16_t)x_QUOT); + replacement.setTo(static_cast<char16_t>(x_QUOT)); } else if (mAmps.start(6, status) != -1) { UnicodeString hexString = mAmps.group(6, status); UChar32 val = 0; @@ -624,7 +624,7 @@ UXMLParser::replaceCharRefs(UnicodeString &s, UErrorCode &status) { // An unrecognized &entity; Leave it alone. // TODO: check that it really looks like an entity, and is not some // random & in the text. - replacement = mAmps.group((int32_t)0, status); + replacement = mAmps.group(static_cast<int32_t>(0), status); } mAmps.appendReplacement(result, replacement, status); } @@ -639,7 +639,7 @@ UXMLParser::error(const char *message, UErrorCode &status) { int line = 0; int ci = 0; while (ci < fPos && ci>=0) { - ci = src.indexOf((char16_t)0x0a, ci+1); + ci = src.indexOf(static_cast<char16_t>(0x0a), ci + 1); line++; } fprintf(stderr, "Error: %s at line %d\n", message, line); @@ -655,12 +655,12 @@ UXMLParser::intern(const UnicodeString &s, UErrorCode &errorCode) { const UHashElement *he=fNames.find(s); if(he!=nullptr) { // already a known name, return its hashed key pointer - return (const UnicodeString *)he->key.pointer; + return static_cast<const UnicodeString*>(he->key.pointer); } else { // add this new name and return its hashed key pointer fNames.puti(s, 1, errorCode); he=fNames.find(s); - return (const UnicodeString *)he->key.pointer; + return static_cast<const UnicodeString*>(he->key.pointer); } } @@ -669,7 +669,7 @@ UXMLParser::findName(const UnicodeString &s) const { const UHashElement *he=fNames.find(s); if(he!=nullptr) { // a known name, return its hashed key pointer - return (const UnicodeString *)he->key.pointer; + return static_cast<const UnicodeString*>(he->key.pointer); } else { // unknown name return nullptr; @@ -692,10 +692,10 @@ UXMLElement::~UXMLElement() { int i; // attribute names are owned by the UXMLParser, don't delete them here for (i=fAttValues.size()-1; i>=0; i--) { - delete (UObject *)fAttValues.elementAt(i); + delete static_cast<UObject*>(fAttValues.elementAt(i)); } for (i=fChildren.size()-1; i>=0; i--) { - delete (UObject *)fChildren.elementAt(i); + delete static_cast<UObject*>(fChildren.elementAt(i)); } } @@ -716,7 +716,7 @@ UXMLElement::appendText(UnicodeString &text, UBool recurse) const { const UObject *node; int32_t i, count=fChildren.size(); for(i=0; i<count; ++i) { - node=(const UObject *)fChildren.elementAt(i); + node = static_cast<const UObject*>(fChildren.elementAt(i)); const UnicodeString *s=dynamic_cast<const UnicodeString *>(node); if(s!=nullptr) { text.append(*s); @@ -734,8 +734,8 @@ UXMLElement::countAttributes() const { const UnicodeString * UXMLElement::getAttribute(int32_t i, UnicodeString &name, UnicodeString &value) const { if(0<=i && i<fAttNames.size()) { - name.setTo(*(const UnicodeString *)fAttNames.elementAt(i)); - value.setTo(*(const UnicodeString *)fAttValues.elementAt(i)); + name.setTo(*static_cast<const UnicodeString*>(fAttNames.elementAt(i))); + value.setTo(*static_cast<const UnicodeString*>(fAttValues.elementAt(i))); return &value; // or return (UnicodeString *)fAttValues.elementAt(i); } else { return nullptr; @@ -753,8 +753,8 @@ UXMLElement::getAttribute(const UnicodeString &name) const { int32_t i, count=fAttNames.size(); for(i=0; i<count; ++i) { - if(p==(const UnicodeString *)fAttNames.elementAt(i)) { - return (const UnicodeString *)fAttValues.elementAt(i); + if (p == static_cast<const UnicodeString*>(fAttNames.elementAt(i))) { + return static_cast<const UnicodeString*>(fAttValues.elementAt(i)); } } return nullptr; @@ -768,7 +768,7 @@ UXMLElement::countChildren() const { const UObject * UXMLElement::getChild(int32_t i, UXMLNodeType &type) const { if(0<=i && i<fChildren.size()) { - const UObject *node=(const UObject *)fChildren.elementAt(i); + const UObject* node = static_cast<const UObject*>(fChildren.elementAt(i)); if(dynamic_cast<const UXMLElement *>(node)!=nullptr) { type=UXML_NODE_TYPE_ELEMENT; } else { @@ -789,7 +789,7 @@ UXMLElement::nextChildElement(int32_t &i) const { const UObject *node; int32_t count=fChildren.size(); while(i<count) { - node=(const UObject *)fChildren.elementAt(i++); + node = static_cast<const UObject*>(fChildren.elementAt(i++)); const UXMLElement *elem=dynamic_cast<const UXMLElement *>(node); if(elem!=nullptr) { return elem; @@ -810,7 +810,7 @@ UXMLElement::getChildElement(const UnicodeString &name) const { const UObject *node; int32_t i, count=fChildren.size(); for(i=0; i<count; ++i) { - node=(const UObject *)fChildren.elementAt(i); + node = static_cast<const UObject*>(fChildren.elementAt(i)); const UXMLElement *elem=dynamic_cast<const UXMLElement *>(node); if(elem!=nullptr) { if(p==elem->fName) { diff --git a/deps/simdutf/simdutf.cpp b/deps/simdutf/simdutf.cpp index eb3e4598407374..21962c3bad378d 100644 --- a/deps/simdutf/simdutf.cpp +++ b/deps/simdutf/simdutf.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2024-12-10 14:54:53 -0500. Do not edit! */ +/* auto-generated on 2025-01-08 17:51:07 -0500. Do not edit! */ /* begin file src/simdutf.cpp */ #include "simdutf.h" // We include base64_tables once. @@ -697,6 +697,15 @@ static_assert(to_base64_url_value[uint8_t('_')] == 63, #include <climits> #include <type_traits> +static_assert(sizeof(uint8_t) == sizeof(char), + "simdutf requires that uint8_t be a char"); +static_assert(sizeof(uint16_t) == sizeof(char16_t), + "simdutf requires that char16_t be 16 bits"); +static_assert(sizeof(uint32_t) == sizeof(char32_t), + "simdutf requires that char32_t be 32 bits"); +// next line is redundant, but it is kept to catch defective systems. +static_assert(CHAR_BIT == 8, "simdutf requires 8-bit bytes"); + // Useful for debugging purposes namespace simdutf { namespace { @@ -9746,24 +9755,23 @@ inline simdutf_warn_unused uint16_t swap_bytes(const uint16_t word) { } template <endianness big_endian> -inline simdutf_warn_unused bool validate(const char16_t *buf, +inline simdutf_warn_unused bool validate(const char16_t *data, size_t len) noexcept { - const uint16_t *data = reinterpret_cast<const uint16_t *>(buf); uint64_t pos = 0; while (pos < len) { - uint16_t word = + char16_t word = !match_system(big_endian) ? swap_bytes(data[pos]) : data[pos]; if ((word & 0xF800) == 0xD800) { if (pos + 1 >= len) { return false; } - uint16_t diff = uint16_t(word - 0xD800); + char16_t diff = char16_t(word - 0xD800); if (diff > 0x3FF) { return false; } - uint16_t next_word = + char16_t next_word = !match_system(big_endian) ? swap_bytes(data[pos + 1]) : data[pos + 1]; - uint16_t diff2 = uint16_t(next_word - 0xDC00); + char16_t diff2 = char16_t(next_word - 0xDC00); if (diff2 > 0x3FF) { return false; } @@ -9776,24 +9784,23 @@ inline simdutf_warn_unused bool validate(const char16_t *buf, } template <endianness big_endian> -inline simdutf_warn_unused result validate_with_errors(const char16_t *buf, +inline simdutf_warn_unused result validate_with_errors(const char16_t *data, size_t len) noexcept { - const uint16_t *data = reinterpret_cast<const uint16_t *>(buf); size_t pos = 0; while (pos < len) { - uint16_t word = + char16_t word = !match_system(big_endian) ? swap_bytes(data[pos]) : data[pos]; if ((word & 0xF800) == 0xD800) { if (pos + 1 >= len) { return result(error_code::SURROGATE, pos); } - uint16_t diff = uint16_t(word - 0xD800); + char16_t diff = char16_t(word - 0xD800); if (diff > 0x3FF) { return result(error_code::SURROGATE, pos); } - uint16_t next_word = + char16_t next_word = !match_system(big_endian) ? swap_bytes(data[pos + 1]) : data[pos + 1]; - uint16_t diff2 = uint16_t(next_word - 0xDC00); + char16_t diff2 = uint16_t(next_word - 0xDC00); if (diff2 > 0x3FF) { return result(error_code::SURROGATE, pos); } @@ -9806,24 +9813,22 @@ inline simdutf_warn_unused result validate_with_errors(const char16_t *buf, } template <endianness big_endian> -inline size_t count_code_points(const char16_t *buf, size_t len) { +inline size_t count_code_points(const char16_t *p, size_t len) { // We are not BOM aware. - const uint16_t *p = reinterpret_cast<const uint16_t *>(buf); size_t counter{0}; for (size_t i = 0; i < len; i++) { - uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; + char16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; counter += ((word & 0xFC00) != 0xDC00); } return counter; } template <endianness big_endian> -inline size_t utf8_length_from_utf16(const char16_t *buf, size_t len) { +inline size_t utf8_length_from_utf16(const char16_t *p, size_t len) { // We are not BOM aware. - const uint16_t *p = reinterpret_cast<const uint16_t *>(buf); size_t counter{0}; for (size_t i = 0; i < len; i++) { - uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; + char16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; counter++; // ASCII counter += static_cast<size_t>( word > @@ -9835,12 +9840,11 @@ inline size_t utf8_length_from_utf16(const char16_t *buf, size_t len) { } template <endianness big_endian> -inline size_t utf32_length_from_utf16(const char16_t *buf, size_t len) { +inline size_t utf32_length_from_utf16(const char16_t *p, size_t len) { // We are not BOM aware. - const uint16_t *p = reinterpret_cast<const uint16_t *>(buf); size_t counter{0}; for (size_t i = 0; i < len; i++) { - uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; + char16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; counter += ((word & 0xFC00) != 0xDC00); } return counter; @@ -9848,12 +9852,10 @@ inline size_t utf32_length_from_utf16(const char16_t *buf, size_t len) { inline size_t latin1_length_from_utf16(size_t len) { return len; } -simdutf_really_inline void change_endianness_utf16(const char16_t *in, - size_t size, char16_t *out) { - const uint16_t *input = reinterpret_cast<const uint16_t *>(in); - uint16_t *output = reinterpret_cast<uint16_t *>(out); +simdutf_really_inline void +change_endianness_utf16(const char16_t *input, size_t size, char16_t *output) { for (size_t i = 0; i < size; i++) { - *output++ = uint16_t(input[i] >> 8 | input[i] << 8); + *output++ = char16_t(input[i] >> 8 | input[i] << 8); } } @@ -10019,6 +10021,9 @@ base64_tail_decode(char *dst, const char_type *src, size_t length, const char_type *srcend = src + length; const char_type *srcinit = src; const char *dstinit = dst; + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); uint32_t x; size_t idx; @@ -10038,27 +10043,52 @@ base64_tail_decode(char *dst, const char_type *src, size_t length, } idx = 0; // we need at least four characters. - while (idx < 4 && src < srcend) { +#ifdef __clang__ + // If possible, we read four characters at a time. (It is an optimization.) + if (ignore_garbage && src + 4 <= srcend) { + char_type c0 = src[0]; + char_type c1 = src[1]; + char_type c2 = src[2]; + char_type c3 = src[3]; + uint8_t code0 = to_base64[uint8_t(c0)]; + uint8_t code1 = to_base64[uint8_t(c1)]; + uint8_t code2 = to_base64[uint8_t(c2)]; + uint8_t code3 = to_base64[uint8_t(c3)]; + buffer[idx] = code0; + idx += (is_eight_byte(c0) && code0 <= 63); + buffer[idx] = code1; + idx += (is_eight_byte(c1) && code1 <= 63); + buffer[idx] = code2; + idx += (is_eight_byte(c2) && code2 <= 63); + buffer[idx] = code3; + idx += (is_eight_byte(c3) && code3 <= 63); + src += 4; + } +#endif + while ((idx < 4) && (src < srcend)) { char_type c = *src; uint8_t code = to_base64[uint8_t(c)]; buffer[idx] = uint8_t(code); if (is_eight_byte(c) && code <= 63) { idx++; - } else if (code > 64 || !scalar::base64::is_eight_byte(c)) { + } else if (!ignore_garbage && + (code > 64 || !scalar::base64::is_eight_byte(c))) { return {INVALID_BASE64_CHARACTER, size_t(src - srcinit), size_t(dst - dstinit)}; } else { - // We have a space or a newline. We ignore it. + // We have a space or a newline or garbage. We ignore it. } src++; } if (idx != 4) { - if (last_chunk_options == last_chunk_handling_options::strict && + if (!ignore_garbage && + last_chunk_options == last_chunk_handling_options::strict && (idx != 1) && ((idx + padded_characters) & 3) != 0) { // The partial chunk was at src - idx return {BASE64_INPUT_REMAINDER, size_t(src - srcinit), size_t(dst - dstinit)}; - } else if (last_chunk_options == + } else if (!ignore_garbage && + last_chunk_options == last_chunk_handling_options::stop_before_partial && (idx != 1) && ((idx + padded_characters) & 3) != 0) { // Rewind src to before partial chunk @@ -10068,7 +10098,8 @@ base64_tail_decode(char *dst, const char_type *src, size_t length, if (idx == 2) { uint32_t triple = (uint32_t(buffer[0]) << 3 * 6) + (uint32_t(buffer[1]) << 2 * 6); - if ((last_chunk_options == last_chunk_handling_options::strict) && + if (!ignore_garbage && + (last_chunk_options == last_chunk_handling_options::strict) && (triple & 0xffff)) { return {BASE64_EXTRA_BITS, size_t(src - srcinit), size_t(dst - dstinit)}; @@ -10086,7 +10117,8 @@ base64_tail_decode(char *dst, const char_type *src, size_t length, uint32_t triple = (uint32_t(buffer[0]) << 3 * 6) + (uint32_t(buffer[1]) << 2 * 6) + (uint32_t(buffer[2]) << 1 * 6); - if ((last_chunk_options == last_chunk_handling_options::strict) && + if (!ignore_garbage && + (last_chunk_options == last_chunk_handling_options::strict) && (triple & 0xff)) { return {BASE64_EXTRA_BITS, size_t(src - srcinit), size_t(dst - dstinit)}; @@ -10100,7 +10132,7 @@ base64_tail_decode(char *dst, const char_type *src, size_t length, std::memcpy(dst, &triple, 2); } dst += 2; - } else if (idx == 1) { + } else if (!ignore_garbage && idx == 1) { return {BASE64_INPUT_REMAINDER, size_t(src - srcinit), size_t(dst - dstinit)}; } @@ -10154,6 +10186,9 @@ result base64_tail_decode_safe( const uint32_t *d3 = (options & base64_url) ? tables::base64::base64_url::d3 : tables::base64::base64_default::d3; + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); const char_type *srcend = src + length; const char_type *srcinit = src; @@ -10184,6 +10219,28 @@ result base64_tail_decode_safe( idx = 0; const char_type *srccur = src; // We need at least four characters. +#ifdef __clang__ + // If possible, we read four characters at a time. (It is an optimization.) + if (ignore_garbage && src + 4 <= srcend) { + char_type c0 = src[0]; + char_type c1 = src[1]; + char_type c2 = src[2]; + char_type c3 = src[3]; + uint8_t code0 = to_base64[uint8_t(c0)]; + uint8_t code1 = to_base64[uint8_t(c1)]; + uint8_t code2 = to_base64[uint8_t(c2)]; + uint8_t code3 = to_base64[uint8_t(c3)]; + buffer[idx] = code0; + idx += (is_eight_byte(c0) && code0 <= 63); + buffer[idx] = code1; + idx += (is_eight_byte(c1) && code1 <= 63); + buffer[idx] = code2; + idx += (is_eight_byte(c2) && code2 <= 63); + buffer[idx] = code3; + idx += (is_eight_byte(c3) && code3 <= 63); + src += 4; + } +#endif while (idx < 4 && src < srcend) { char_type c = *src; uint8_t code = to_base64[uint8_t(c)]; @@ -10191,22 +10248,25 @@ result base64_tail_decode_safe( buffer[idx] = uint8_t(code); if (is_eight_byte(c) && code <= 63) { idx++; - } else if (code > 64 || !scalar::base64::is_eight_byte(c)) { + } else if (!ignore_garbage && + (code > 64 || !scalar::base64::is_eight_byte(c))) { outlen = size_t(dst - dstinit); srcr = src; return {INVALID_BASE64_CHARACTER, size_t(src - srcinit)}; } else { - // We have a space or a newline. We ignore it. + // We have a space or a newline or garbage. We ignore it. } src++; } if (idx != 4) { - if (last_chunk_options == last_chunk_handling_options::strict && + if (!ignore_garbage && + last_chunk_options == last_chunk_handling_options::strict && ((idx + padded_characters) & 3) != 0) { outlen = size_t(dst - dstinit); srcr = src; return {BASE64_INPUT_REMAINDER, size_t(src - srcinit)}; - } else if (last_chunk_options == + } else if (!ignore_garbage && + last_chunk_options == last_chunk_handling_options::stop_before_partial && ((idx + padded_characters) & 3) != 0) { // Rewind src to before partial chunk @@ -10219,7 +10279,7 @@ result base64_tail_decode_safe( outlen = size_t(dst - dstinit); srcr = src; return {SUCCESS, size_t(dst - dstinit)}; - } else if (idx == 1) { + } else if (!ignore_garbage && idx == 1) { // Error: Incomplete chunk of length 1 is invalid in loose mode outlen = size_t(dst - dstinit); srcr = src; @@ -10235,7 +10295,8 @@ result base64_tail_decode_safe( uint32_t triple = 0; if (idx == 2) { triple = (uint32_t(buffer[0]) << 18) + (uint32_t(buffer[1]) << 12); - if ((last_chunk_options == last_chunk_handling_options::strict) && + if (!ignore_garbage && + (last_chunk_options == last_chunk_handling_options::strict) && (triple & 0xffff)) { srcr = src; return {BASE64_EXTRA_BITS, size_t(src - srcinit)}; @@ -10247,7 +10308,8 @@ result base64_tail_decode_safe( } else if (idx == 3) { triple = (uint32_t(buffer[0]) << 18) + (uint32_t(buffer[1]) << 12) + (uint32_t(buffer[2]) << 6); - if ((last_chunk_options == last_chunk_handling_options::strict) && + if (!ignore_garbage && + (last_chunk_options == last_chunk_handling_options::strict) && (triple & 0xff)) { srcr = src; return {BASE64_EXTRA_BITS, size_t(src - srcinit)}; @@ -17080,8 +17142,33 @@ size_t convert_masked_utf8_to_utf16(const char *input, for (int k = 0; k < 6; k++) { utf16_output[k] = buffer[k]; } // the loop might compiler to a couple of instructions. - utf16_output += 6; // We wrote 3 32-bit surrogate pairs. - return 12; // We consumed 12 bytes. + // We need some validation. See + // https://github.com/simdutf/simdutf/pull/631 +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + uint8x16_t expected_mask = simdutf_make_uint8x16_t( + 0xf8, 0xc0, 0xc0, 0xc0, 0xf8, 0xc0, 0xc0, 0xc0, 0xf8, 0xc0, 0xc0, + 0xc0, 0x0, 0x0, 0x0, 0x0); +#else + uint8x16_t expected_mask = {0xf8, 0xc0, 0xc0, 0xc0, 0xf8, 0xc0, + 0xc0, 0xc0, 0xf8, 0xc0, 0xc0, 0xc0, + 0x0, 0x0, 0x0, 0x0}; +#endif +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + uint8x16_t expected = simdutf_make_uint8x16_t( + 0xf0, 0x80, 0x80, 0x80, 0xf0, 0x80, 0x80, 0x80, 0xf0, 0x80, 0x80, + 0x80, 0x0, 0x0, 0x0, 0x0); +#else + uint8x16_t expected = {0xf0, 0x80, 0x80, 0x80, 0xf0, 0x80, 0x80, 0x80, + 0xf0, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0}; +#endif + uint8x16_t check = vceqq_u8(vandq_u8(in, expected_mask), expected); + bool correct = (vminvq_u32(vreinterpretq_u32_u8(check)) == 0xFFFFFFFF); + // The validation is just three instructions and it is not on a critical + // path. + if (correct) { + utf16_output += 6; // We wrote 3 32-bit surrogate pairs. + } + return 12; // We consumed 12 bytes. } // 3 1-4 byte sequences uint8x16_t sh = vld1q_u8(reinterpret_cast<const uint8_t *>( @@ -18540,7 +18627,7 @@ void base64_decode_block(char *out, const char *src) { vst3q_u8((uint8_t *)out, outvec); } -template <bool base64_url, typename char_type> +template <bool base64_url, bool ignore_garbage, typename char_type> full_result compress_decode_base64(char *dst, const char_type *src, size_t srclen, base64_options options, @@ -18571,7 +18658,13 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, } } if (srclen == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -18592,7 +18685,7 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, bool error = false; uint64_t badcharmask = to_base64_mask<base64_url>(&b, &error); if (badcharmask) { - if (error) { + if (error && !ignore_garbage) { src -= 64; while (src < srcend && scalar::base64::is_eight_byte(*src) && to_base64[uint8_t(*src)] <= 64) { @@ -18636,7 +18729,8 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, while ((bufferptr - buffer_start) % 64 != 0 && src < srcend) { uint8_t val = to_base64[uint8_t(*src)]; *bufferptr = char(val); - if (!scalar::base64::is_eight_byte(*src) || val > 64) { + if ((!scalar::base64::is_eight_byte(*src) || val > 64) && + !ignore_garbage) { return {error_code::INVALID_BASE64_CHARACTER, size_t(src - srcinit), size_t(dst - dstinit)}; } @@ -18678,8 +18772,14 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, // backtrack int leftover = int(bufferptr - buffer_start); while (leftover > 0) { - while (to_base64[uint8_t(*(src - 1))] == 64) { - src--; + if (!ignore_garbage) { + while (to_base64[uint8_t(*(src - 1))] == 64) { + src--; + } + } else { + while (to_base64[uint8_t(*(src - 1))] >= 64) { + src--; + } } src--; leftover--; @@ -18696,7 +18796,7 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, r.output_count += size_t(dst - dstinit); } if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.output_count % 3 == 0) || ((r.output_count % 3) + 1 + equalsigns != 4)) { @@ -18706,7 +18806,7 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, } return r; } - if (equalsigns > 0) { + if (equalsigns > 0 && !ignore_garbage) { if ((size_t(dst - dstinit) % 3 == 0) || ((size_t(dst - dstinit) % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation, size_t(dst - dstinit)}; @@ -20975,6 +21075,9 @@ struct validating_transcoder { uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in // this case, we also have ASCII to account for. + if (utf8_continuation_mask & 1) { + return 0; // error + } uint64_t utf8_leading_mask = ~utf8_continuation_mask; uint64_t utf8_end_of_code_point_mask = utf8_leading_mask >> 1; // We process in blocks of up to 12 bytes except possibly @@ -22186,21 +22289,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( @@ -22211,21 +22338,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::base64_length_from_binary( @@ -22735,6 +22886,9 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { length--; @@ -22757,7 +22911,13 @@ simdutf_warn_unused result implementation::base64_to_binary( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation}; } return {SUCCESS, 0}; @@ -22765,7 +22925,7 @@ simdutf_warn_unused result implementation::base64_to_binary( result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.count % 3 == 0) || ((r.count % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation}; @@ -22777,6 +22937,9 @@ simdutf_warn_unused result implementation::base64_to_binary( simdutf_warn_unused full_result implementation::base64_to_binary_details( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { length--; @@ -22799,7 +22962,13 @@ simdutf_warn_unused full_result implementation::base64_to_binary_details( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -22807,7 +22976,7 @@ simdutf_warn_unused full_result implementation::base64_to_binary_details( full_result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.output_count % 3 == 0) || ((r.output_count % 3) + 1 + equalsigns != 4)) { @@ -22825,6 +22994,9 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { length--; @@ -22847,7 +23019,13 @@ simdutf_warn_unused result implementation::base64_to_binary( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation}; } return {SUCCESS, 0}; @@ -22855,7 +23033,7 @@ simdutf_warn_unused result implementation::base64_to_binary( result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.count % 3 == 0) || ((r.count % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation}; @@ -22867,6 +23045,9 @@ simdutf_warn_unused result implementation::base64_to_binary( simdutf_warn_unused full_result implementation::base64_to_binary_details( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { length--; @@ -22889,7 +23070,13 @@ simdutf_warn_unused full_result implementation::base64_to_binary_details( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -22897,7 +23084,7 @@ simdutf_warn_unused full_result implementation::base64_to_binary_details( full_result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.output_count % 3 == 0) || ((r.output_count % 3) + 1 + equalsigns != 4)) { @@ -22926,6 +23113,8 @@ size_t implementation::binary_to_base64(const char *input, size_t length, #endif #if SIMDUTF_IMPLEMENTATION_ICELAKE /* begin file src/icelake/implementation.cpp */ +#include <tuple> +#include <utility> /* begin file src/simdutf/icelake/begin.h */ @@ -25974,17 +26163,17 @@ bool validate_ascii(const char *buf, size_t len) { /* begin file src/icelake/icelake_utf32_validation.inl.cpp */ // file included directly -const char32_t *validate_utf32(const char32_t *buf, size_t len) { - if (len < 16) { - return buf; +bool validate_utf32(const char32_t *buf, size_t len) { + if (len == 0) { + return true; } - const char32_t *end = buf + len - 16; + const char32_t *end = buf + len; const __m512i offset = _mm512_set1_epi32((uint32_t)0xffff2000); __m512i currentmax = _mm512_setzero_si512(); __m512i currentoffsetmax = _mm512_setzero_si512(); - while (buf <= end) { + while (buf < end - 16) { __m512i utf32 = _mm512_loadu_si512((const __m512i *)buf); buf += 16; currentoffsetmax = @@ -25992,20 +26181,26 @@ const char32_t *validate_utf32(const char32_t *buf, size_t len) { currentmax = _mm512_max_epu32(utf32, currentmax); } + __m512i utf32 = + _mm512_maskz_loadu_epi32(__mmask16((1 << (end - buf)) - 1), buf); + currentoffsetmax = + _mm512_max_epu32(_mm512_add_epi32(utf32, offset), currentoffsetmax); + currentmax = _mm512_max_epu32(utf32, currentmax); + const __m512i standardmax = _mm512_set1_epi32((uint32_t)0x10ffff); const __m512i standardoffsetmax = _mm512_set1_epi32((uint32_t)0xfffff7ff); __m512i is_zero = _mm512_xor_si512(_mm512_max_epu32(currentmax, standardmax), standardmax); if (_mm512_test_epi8_mask(is_zero, is_zero) != 0) { - return nullptr; + return false; } is_zero = _mm512_xor_si512( _mm512_max_epu32(currentoffsetmax, standardoffsetmax), standardoffsetmax); if (_mm512_test_epi8_mask(is_zero, is_zero) != 0) { - return nullptr; + return false; } - return buf; + return true; } /* end file src/icelake/icelake_utf32_validation.inl.cpp */ /* begin file src/icelake/icelake_convert_latin1_to_utf8.inl.cpp */ @@ -26267,7 +26462,7 @@ size_t encode_base64(char *dst, const char *src, size_t srclen, return (size_t)(out - (uint8_t *)dst) + output_len; } -template <bool base64_url> +template <bool base64_url, bool ignore_garbage> static inline uint64_t to_base64_mask(block64 *b, uint64_t *error, uint64_t input_mask = UINT64_MAX) { __m512i input = b->chunks[0]; @@ -26309,7 +26504,7 @@ static inline uint64_t to_base64_mask(block64 *b, uint64_t *error, const __m512i translated = _mm512_permutex2var_epi8(lookup0, input, lookup1); const __m512i combined = _mm512_or_si512(translated, input); const __mmask64 mask = _mm512_movepi8_mask(combined) & input_mask; - if (mask) { + if (!ignore_garbage && mask) { const __mmask64 spaces = _mm512_cmpeq_epi8_mask(_mm512_shuffle_epi8(ascii_space_tbl, input), input) & @@ -26390,7 +26585,7 @@ static inline void base64_decode_block(char *out, block64 *b) { base64_decode(out, b->chunks[0]); } -template <bool base64_url, typename chartype> +template <bool base64_url, bool ignore_garbage, typename chartype> full_result compress_decode_base64(char *dst, const chartype *src, size_t srclen, base64_options options, @@ -26402,11 +26597,12 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, srclen; // location of the first padding character if any size_t equalsigns = 0; // skip trailing spaces - while (srclen > 0 && scalar::base64::is_eight_byte(src[srclen - 1]) && + while (!ignore_garbage && srclen > 0 && + scalar::base64::is_eight_byte(src[srclen - 1]) && to_base64[uint8_t(src[srclen - 1])] == 64) { srclen--; } - if (srclen > 0 && src[srclen - 1] == '=') { + if (!ignore_garbage && srclen > 0 && src[srclen - 1] == '=') { equallocation = srclen - 1; srclen--; equalsigns = 1; @@ -26422,7 +26618,13 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } } if (srclen == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -26442,8 +26644,9 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, load_block(&b, src); src += 64; uint64_t error = 0; - uint64_t badcharmask = to_base64_mask<base64_url>(&b, &error); - if (error) { + uint64_t badcharmask = + to_base64_mask<base64_url, ignore_garbage>(&b, &error); + if (!ignore_garbage && error) { src -= 64; size_t error_offset = _tzcnt_u64(error); return {error_code::INVALID_BASE64_CHARACTER, @@ -26479,8 +26682,9 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, block64 b; load_block_partial(&b, src, input_mask); uint64_t error = 0; - uint64_t badcharmask = to_base64_mask<base64_url>(&b, &error, input_mask); - if (error) { + uint64_t badcharmask = + to_base64_mask<base64_url, ignore_garbage>(&b, &error, input_mask); + if (!ignore_garbage && error) { size_t error_offset = _tzcnt_u64(error); return {error_code::INVALID_BASE64_CHARACTER, size_t(src - srcinit + error_offset), size_t(dst - dstinit)}; @@ -26513,14 +26717,16 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, 5, 6, 0, 1, 2); const __m512i shuffled = _mm512_permutexvar_epi8(pack, merged); - if (last_chunk_options == last_chunk_handling_options::strict && + if (!ignore_garbage && + last_chunk_options == last_chunk_handling_options::strict && (idx != 1) && ((idx + equalsigns) & 3) != 0) { // The partial chunk was at src - idx _mm512_mask_storeu_epi8((__m512i *)dst, output_mask, shuffled); dst += output_len; return {BASE64_INPUT_REMAINDER, size_t(src - srcinit), size_t(dst - dstinit)}; - } else if (last_chunk_options == + } else if (!ignore_garbage && + last_chunk_options == last_chunk_handling_options::stop_before_partial && (idx != 1) && ((idx + equalsigns) & 3) != 0) { // Rewind src to before partial chunk @@ -26529,7 +26735,8 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, src -= idx; } else { if (idx == 2) { - if (last_chunk_options == last_chunk_handling_options::strict) { + if (!ignore_garbage && + last_chunk_options == last_chunk_handling_options::strict) { uint32_t triple = (uint32_t(bufferptr[-2]) << 3 * 6) + (uint32_t(bufferptr[-1]) << 2 * 6); if (triple & 0xffff) { @@ -26544,7 +26751,8 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, _mm512_mask_storeu_epi8((__m512i *)dst, output_mask, shuffled); dst += output_len; } else if (idx == 3) { - if (last_chunk_options == last_chunk_handling_options::strict) { + if (!ignore_garbage && + last_chunk_options == last_chunk_handling_options::strict) { uint32_t triple = (uint32_t(bufferptr[-3]) << 3 * 6) + (uint32_t(bufferptr[-2]) << 2 * 6) + (uint32_t(bufferptr[-1]) << 1 * 6); @@ -26559,7 +26767,7 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, output_len += 2; _mm512_mask_storeu_epi8((__m512i *)dst, output_mask, shuffled); dst += output_len; - } else if (idx == 1) { + } else if (!ignore_garbage && idx == 1) { _mm512_mask_storeu_epi8((__m512i *)dst, output_mask, shuffled); dst += output_len; return {BASE64_INPUT_REMAINDER, size_t(src - srcinit), @@ -26570,7 +26778,8 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } } - if (last_chunk_options != stop_before_partial && equalsigns > 0) { + if (!ignore_garbage && last_chunk_options != stop_before_partial && + equalsigns > 0) { size_t output_count = size_t(dst - dstinit); if ((output_count % 3 == 0) || ((output_count % 3) + 1 + equalsigns != 4)) { @@ -26581,7 +26790,15 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, return {SUCCESS, srclen, size_t(dst - dstinit)}; } - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, size_t(src - srcinit), + size_t(dst - dstinit)}; + } + if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, size_t(src - srcinit), size_t(dst - dstinit)}; + } if ((size_t(dst - dstinit) % 3 == 0) || ((size_t(dst - dstinit) % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation, size_t(dst - dstinit)}; @@ -26605,24 +26822,76 @@ implementation::detect_encodings(const char *input, size_t length) const noexcept { // If there is a BOM, then we trust it. auto bom_encoding = simdutf::BOM::check_bom(input, length); - // todo: convert to a one-pass algorithm if (bom_encoding != encoding_type::unspecified) { return bom_encoding; } + int out = 0; - if (validate_utf8(input, length)) { + uint32_t utf16_err = (length % 2); + uint32_t utf32_err = (length % 4); + uint32_t ends_with_high = 0; + avx512_utf8_checker checker{}; + const __m512i offset = _mm512_set1_epi32((uint32_t)0xffff2000); + __m512i currentmax = _mm512_setzero_si512(); + __m512i currentoffsetmax = _mm512_setzero_si512(); + const char *ptr = input; + const char *end = ptr + length; + for (; end - ptr >= 64; ptr += 64) { + // utf8 checks + const __m512i data = _mm512_loadu_si512((const __m512i *)ptr); + checker.check_next_input(data); + + // utf16le_checks + __m512i diff = _mm512_sub_epi16(data, _mm512_set1_epi16(uint16_t(0xD800))); + __mmask32 surrogates = + _mm512_cmplt_epu16_mask(diff, _mm512_set1_epi16(uint16_t(0x0800))); + __mmask32 highsurrogates = + _mm512_cmplt_epu16_mask(diff, _mm512_set1_epi16(uint16_t(0x0400))); + __mmask32 lowsurrogates = surrogates ^ highsurrogates; + utf16_err |= (((highsurrogates << 1) | ends_with_high) != lowsurrogates); + ends_with_high = ((highsurrogates & 0x80000000) != 0); + + // utf32le checks + currentoffsetmax = + _mm512_max_epu32(_mm512_add_epi32(data, offset), currentoffsetmax); + currentmax = _mm512_max_epu32(data, currentmax); + } + + // last block with 0 <= len < 64 + __mmask64 read_mask = (__mmask64(1) << (end - ptr)) - 1; + const __m512i data = _mm512_maskz_loadu_epi8(read_mask, (const __m512i *)ptr); + checker.check_next_input(data); + + __m512i diff = _mm512_sub_epi16(data, _mm512_set1_epi16(uint16_t(0xD800))); + __mmask32 surrogates = + _mm512_cmplt_epu16_mask(diff, _mm512_set1_epi16(uint16_t(0x0800))); + __mmask32 highsurrogates = + _mm512_cmplt_epu16_mask(diff, _mm512_set1_epi16(uint16_t(0x0400))); + __mmask32 lowsurrogates = surrogates ^ highsurrogates; + utf16_err |= (((highsurrogates << 1) | ends_with_high) != lowsurrogates); + + currentoffsetmax = + _mm512_max_epu32(_mm512_add_epi32(data, offset), currentoffsetmax); + currentmax = _mm512_max_epu32(data, currentmax); + + const __m512i standardmax = _mm512_set1_epi32((uint32_t)0x10ffff); + const __m512i standardoffsetmax = _mm512_set1_epi32((uint32_t)0xfffff7ff); + __m512i is_zero = + _mm512_xor_si512(_mm512_max_epu32(currentmax, standardmax), standardmax); + utf32_err |= (_mm512_test_epi8_mask(is_zero, is_zero) != 0); + is_zero = _mm512_xor_si512( + _mm512_max_epu32(currentoffsetmax, standardoffsetmax), standardoffsetmax); + utf32_err |= (_mm512_test_epi8_mask(is_zero, is_zero) != 0); + checker.check_eof(); + bool is_valid_utf8 = !checker.errors(); + if (is_valid_utf8) { out |= encoding_type::UTF8; } - if ((length % 2) == 0) { - if (validate_utf16le(reinterpret_cast<const char16_t *>(input), - length / 2)) { - out |= encoding_type::UTF16_LE; - } + if (utf16_err == 0) { + out |= encoding_type::UTF16_LE; } - if ((length % 4) == 0) { - if (validate_utf32(reinterpret_cast<const char32_t *>(input), length / 4)) { - out |= encoding_type::UTF32_LE; - } + if (utf32_err == 0) { + out |= encoding_type::UTF32_LE; } return out; } @@ -26944,14 +27213,7 @@ simdutf_warn_unused result implementation::validate_utf16be_with_errors( simdutf_warn_unused bool implementation::validate_utf32(const char32_t *buf, size_t len) const noexcept { - const char32_t *tail = icelake::validate_utf32(buf, len); - if (tail) { - return scalar::utf32::validate(tail, len - (tail - buf)); - } else { - // we come here if there was an error, or buf was nullptr which may happen - // for empty input. - return len == 0; - } + return icelake::validate_utf32(buf, len); } simdutf_warn_unused result implementation::validate_utf32_with_errors( @@ -27832,16 +28094,7 @@ implementation::count_utf8(const char *input, size_t length) const noexcept { } } - __m256i first_half = _mm512_extracti64x4_epi64(unrolled_popcount, 0); - __m256i second_half = _mm512_extracti64x4_epi64(unrolled_popcount, 1); - answer -= (size_t)_mm256_extract_epi64(first_half, 0) + - (size_t)_mm256_extract_epi64(first_half, 1) + - (size_t)_mm256_extract_epi64(first_half, 2) + - (size_t)_mm256_extract_epi64(first_half, 3) + - (size_t)_mm256_extract_epi64(second_half, 0) + - (size_t)_mm256_extract_epi64(second_half, 1) + - (size_t)_mm256_extract_epi64(second_half, 2) + - (size_t)_mm256_extract_epi64(second_half, 3); + answer -= _mm512_reduce_add_epi64(unrolled_popcount); return answer + scalar::utf8::count_code_points( reinterpret_cast<const char *>(str + i), length - i); @@ -28027,16 +28280,7 @@ simdutf_warn_unused size_t implementation::utf8_length_from_latin1( eight_64bits, _mm512_sad_epu8(runner, _mm512_setzero_si512())); } - __m256i first_half = _mm512_extracti64x4_epi64(eight_64bits, 0); - __m256i second_half = _mm512_extracti64x4_epi64(eight_64bits, 1); - answer += (size_t)_mm256_extract_epi64(first_half, 0) + - (size_t)_mm256_extract_epi64(first_half, 1) + - (size_t)_mm256_extract_epi64(first_half, 2) + - (size_t)_mm256_extract_epi64(first_half, 3) + - (size_t)_mm256_extract_epi64(second_half, 0) + - (size_t)_mm256_extract_epi64(second_half, 1) + - (size_t)_mm256_extract_epi64(second_half, 2) + - (size_t)_mm256_extract_epi64(second_half, 3); + answer += _mm512_reduce_add_epi64(eight_64bits); } else if (answer > 0) { for (; i + sizeof(__m512i) <= length; i += sizeof(__m512i)) { __m512i latin = _mm512_loadu_si512((const __m512i *)(str + i)); @@ -28141,21 +28385,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( @@ -28166,21 +28434,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::base64_length_from_binary( @@ -31062,7 +31354,7 @@ struct block64 { __m256i chunks[2]; }; -template <bool base64_url> +template <bool base64_url, bool ignore_garbage> static inline uint32_t to_base64_mask(__m256i *src, uint32_t *error) { const __m256i ascii_space_tbl = _mm256_setr_epi8(0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0xa, @@ -31144,7 +31436,7 @@ static inline uint32_t to_base64_mask(__m256i *src, uint32_t *error) { const __m256i chk = _mm256_adds_epi8(_mm256_shuffle_epi8(check_values, check_hash), *src); const int mask = _mm256_movemask_epi8(chk); - if (mask) { + if (!ignore_garbage && mask) { __m256i ascii_space = _mm256_cmpeq_epi8(_mm256_shuffle_epi8(ascii_space_tbl, *src), *src); *error = (mask ^ _mm256_movemask_epi8(ascii_space)); @@ -31153,13 +31445,17 @@ static inline uint32_t to_base64_mask(__m256i *src, uint32_t *error) { return (uint32_t)mask; } -template <bool base64_url> +template <bool base64_url, bool ignore_garbage> static inline uint64_t to_base64_mask(block64 *b, uint64_t *error) { uint32_t err0 = 0; uint32_t err1 = 0; - uint64_t m0 = to_base64_mask<base64_url>(&b->chunks[0], &err0); - uint64_t m1 = to_base64_mask<base64_url>(&b->chunks[1], &err1); - *error = err0 | ((uint64_t)err1 << 32); + uint64_t m0 = + to_base64_mask<base64_url, ignore_garbage>(&b->chunks[0], &err0); + uint64_t m1 = + to_base64_mask<base64_url, ignore_garbage>(&b->chunks[1], &err1); + if (!ignore_garbage) { + *error = err0 | ((uint64_t)err1 << 32); + } return m0 | (m1 << 32); } @@ -31238,7 +31534,7 @@ static inline void base64_decode_block_safe(char *out, block64 *b) { std::memcpy(out + 24, buffer, 24); } -template <bool base64_url, typename chartype> +template <bool base64_url, bool ignore_garbage, typename chartype> full_result compress_decode_base64(char *dst, const chartype *src, size_t srclen, base64_options options, @@ -31248,12 +31544,13 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, size_t equallocation = srclen; // location of the first padding character if any // skip trailing spaces - while (srclen > 0 && scalar::base64::is_eight_byte(src[srclen - 1]) && + while (!ignore_garbage && srclen > 0 && + scalar::base64::is_eight_byte(src[srclen - 1]) && to_base64[uint8_t(src[srclen - 1])] == 64) { srclen--; } size_t equalsigns = 0; - if (srclen > 0 && src[srclen - 1] == '=') { + if (!ignore_garbage && srclen > 0 && src[srclen - 1] == '=') { equallocation = srclen - 1; srclen--; equalsigns = 1; @@ -31269,7 +31566,13 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } } if (srclen == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -31292,8 +31595,9 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, load_block(&b, src); src += 64; uint64_t error = 0; - uint64_t badcharmask = to_base64_mask<base64_url>(&b, &error); - if (error) { + uint64_t badcharmask = + to_base64_mask<base64_url, ignore_garbage>(&b, &error); + if (!ignore_garbage && error) { src -= 64; size_t error_offset = _tzcnt_u64(error); return {error_code::INVALID_BASE64_CHARACTER, @@ -31342,7 +31646,8 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, while ((bufferptr - buffer_start) % 64 != 0 && src < srcend) { uint8_t val = to_base64[uint8_t(*src)]; *bufferptr = char(val); - if (!scalar::base64::is_eight_byte(*src) || val > 64) { + if (!ignore_garbage && + (!scalar::base64::is_eight_byte(*src) || val > 64)) { return {error_code::INVALID_BASE64_CHARACTER, size_t(src - srcinit), size_t(dst - dstinit)}; } @@ -31388,8 +31693,14 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, // backtrack int leftover = int(bufferptr - buffer_start); while (leftover > 0) { - while (to_base64[uint8_t(*(src - 1))] == 64) { - src--; + if (!ignore_garbage) { + while (to_base64[uint8_t(*(src - 1))] == 64) { + src--; + } + } else { + while (to_base64[uint8_t(*(src - 1))] >= 64) { + src--; + } } src--; leftover--; @@ -31405,7 +31716,7 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } else { r.output_count += size_t(dst - dstinit); } - if (last_chunk_options != stop_before_partial && + if (!ignore_garbage && last_chunk_options != stop_before_partial && r.error == error_code::SUCCESS && equalsigns > 0) { // additional checks if ((r.output_count % 3 == 0) || @@ -31416,7 +31727,7 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } return r; } - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { if ((size_t(dst - dstinit) % 3 == 0) || ((size_t(dst - dstinit) % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation, size_t(dst - dstinit)}; @@ -32965,6 +33276,9 @@ struct validating_transcoder { uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in // this case, we also have ASCII to account for. + if (utf8_continuation_mask & 1) { + return 0; // error + } uint64_t utf8_leading_mask = ~utf8_continuation_mask; uint64_t utf8_end_of_code_point_mask = utf8_leading_mask >> 1; // We process in blocks of up to 12 bytes except possibly @@ -33214,20 +33528,103 @@ implementation::detect_encodings(const char *input, if (bom_encoding != encoding_type::unspecified) { return bom_encoding; } + int out = 0; - if (validate_utf8(input, length)) { + uint32_t utf16_err = (length % 2); + uint32_t utf32_err = (length % 4); + uint32_t ends_with_high = 0; + const auto v_d8 = simd8<uint8_t>::splat(0xd8); + const auto v_f8 = simd8<uint8_t>::splat(0xf8); + const auto v_fc = simd8<uint8_t>::splat(0xfc); + const auto v_dc = simd8<uint8_t>::splat(0xdc); + const __m256i standardmax = _mm256_set1_epi32(0x10ffff); + const __m256i offset = _mm256_set1_epi32(0xffff2000); + const __m256i standardoffsetmax = _mm256_set1_epi32(0xfffff7ff); + __m256i currentmax = _mm256_setzero_si256(); + __m256i currentoffsetmax = _mm256_setzero_si256(); + + utf8_checker c{}; + buf_block_reader<64> reader(reinterpret_cast<const uint8_t *>(input), length); + while (reader.has_full_block()) { + simd::simd8x64<uint8_t> in(reader.full_block()); + // utf8 checks + c.check_next_input(in); + + // utf16le checks + auto in0 = simd16<uint16_t>(in.chunks[0]); + auto in1 = simd16<uint16_t>(in.chunks[1]); + const auto t0 = in0.shr<8>(); + const auto t1 = in1.shr<8>(); + const auto in2 = simd16<uint16_t>::pack(t0, t1); + const auto surrogates_wordmask = (in2 & v_f8) == v_d8; + const uint32_t surrogates_bitmask = surrogates_wordmask.to_bitmask(); + const auto vL = (in2 & v_fc) == v_dc; + const uint32_t L = vL.to_bitmask(); + const uint32_t H = L ^ surrogates_bitmask; + utf16_err |= (((H << 1) | ends_with_high) != L); + ends_with_high = (H & 0x80000000) != 0; + + // utf32le checks + currentmax = _mm256_max_epu32(in.chunks[0], currentmax); + currentoffsetmax = _mm256_max_epu32(_mm256_add_epi32(in.chunks[0], offset), + currentoffsetmax); + currentmax = _mm256_max_epu32(in.chunks[1], currentmax); + currentoffsetmax = _mm256_max_epu32(_mm256_add_epi32(in.chunks[1], offset), + currentoffsetmax); + + reader.advance(); + } + + uint8_t block[64]{}; + size_t idx = reader.block_index(); + std::memcpy(block, &input[idx], length - idx); + simd::simd8x64<uint8_t> in(block); + c.check_next_input(in); + + // utf16le last block check + auto in0 = simd16<uint16_t>(in.chunks[0]); + auto in1 = simd16<uint16_t>(in.chunks[1]); + const auto t0 = in0.shr<8>(); + const auto t1 = in1.shr<8>(); + const auto in2 = simd16<uint16_t>::pack(t0, t1); + const auto surrogates_wordmask = (in2 & v_f8) == v_d8; + const uint32_t surrogates_bitmask = surrogates_wordmask.to_bitmask(); + const auto vL = (in2 & v_fc) == v_dc; + const uint32_t L = vL.to_bitmask(); + const uint32_t H = L ^ surrogates_bitmask; + utf16_err |= (((H << 1) | ends_with_high) != L); + // this is required to check for last byte ending in high and end of input + // is reached + ends_with_high = (H & 0x80000000) != 0; + utf16_err |= ends_with_high; + + // utf32le last block check + currentmax = _mm256_max_epu32(in.chunks[0], currentmax); + currentoffsetmax = _mm256_max_epu32(_mm256_add_epi32(in.chunks[0], offset), + currentoffsetmax); + currentmax = _mm256_max_epu32(in.chunks[1], currentmax); + currentoffsetmax = _mm256_max_epu32(_mm256_add_epi32(in.chunks[1], offset), + currentoffsetmax); + + reader.advance(); + + c.check_eof(); + bool is_valid_utf8 = !c.errors(); + __m256i is_zero = + _mm256_xor_si256(_mm256_max_epu32(currentmax, standardmax), standardmax); + utf32_err |= (_mm256_testz_si256(is_zero, is_zero) == 0); + + is_zero = _mm256_xor_si256( + _mm256_max_epu32(currentoffsetmax, standardoffsetmax), standardoffsetmax); + utf32_err |= (_mm256_testz_si256(is_zero, is_zero) == 0); + if (is_valid_utf8) { out |= encoding_type::UTF8; } - if ((length % 2) == 0) { - if (validate_utf16le(reinterpret_cast<const char16_t *>(input), - length / 2)) { - out |= encoding_type::UTF16_LE; - } + if (utf16_err == 0) { + out |= encoding_type::UTF16_LE; } - if ((length % 4) == 0) { - if (validate_utf32(reinterpret_cast<const char32_t *>(input), length / 4)) { - out |= encoding_type::UTF32_LE; - } + if (utf32_err == 0) { + out |= encoding_type::UTF32_LE; } return out; } @@ -34195,21 +34592,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( @@ -34220,21 +34641,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::base64_length_from_binary( @@ -36030,6 +36475,9 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); // skip trailing spaces while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { @@ -36053,7 +36501,13 @@ simdutf_warn_unused result implementation::base64_to_binary( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation}; } return {SUCCESS, 0}; @@ -36061,7 +36515,7 @@ simdutf_warn_unused result implementation::base64_to_binary( result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.count % 3 == 0) || ((r.count % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation}; @@ -36078,6 +36532,9 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); // skip trailing spaces while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { @@ -36101,7 +36558,13 @@ simdutf_warn_unused result implementation::base64_to_binary( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation}; } return {SUCCESS, 0}; @@ -36109,7 +36572,7 @@ simdutf_warn_unused result implementation::base64_to_binary( result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.count % 3 == 0) || ((r.count % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation}; @@ -37828,6 +38291,9 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { length--; @@ -37850,7 +38316,13 @@ simdutf_warn_unused result implementation::base64_to_binary( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation}; } return {SUCCESS, 0}; @@ -37858,7 +38330,7 @@ simdutf_warn_unused result implementation::base64_to_binary( result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.count % 3 == 0) || ((r.count % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation}; @@ -37870,6 +38342,9 @@ simdutf_warn_unused result implementation::base64_to_binary( simdutf_warn_unused full_result implementation::base64_to_binary_details( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { length--; @@ -37892,7 +38367,13 @@ simdutf_warn_unused full_result implementation::base64_to_binary_details( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -37900,7 +38381,7 @@ simdutf_warn_unused full_result implementation::base64_to_binary_details( full_result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.output_count % 3 == 0) || ((r.output_count % 3) + 1 + equalsigns != 4)) { @@ -37918,6 +38399,9 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { length--; @@ -37940,7 +38424,13 @@ simdutf_warn_unused result implementation::base64_to_binary( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation}; } return {SUCCESS, 0}; @@ -37948,7 +38438,7 @@ simdutf_warn_unused result implementation::base64_to_binary( result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.count % 3 == 0) || ((r.count % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation}; @@ -37960,6 +38450,9 @@ simdutf_warn_unused result implementation::base64_to_binary( simdutf_warn_unused full_result implementation::base64_to_binary_details( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { + const bool ignore_garbage = + (options == base64_options::base64_url_accept_garbage) || + (options == base64_options::base64_default_accept_garbage); while (length > 0 && scalar::base64::is_ascii_white_space(input[length - 1])) { length--; @@ -37982,7 +38475,13 @@ simdutf_warn_unused full_result implementation::base64_to_binary_details( } } if (length == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -37990,7 +38489,7 @@ simdutf_warn_unused full_result implementation::base64_to_binary_details( full_result r = scalar::base64::base64_tail_decode( output, input, length, equalsigns, options, last_chunk_options); if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.output_count % 3 == 0) || ((r.output_count % 3) + 1 + equalsigns != 4)) { @@ -40813,7 +41312,7 @@ struct block64 { __m128i chunks[4]; }; -template <bool base64_url> +template <bool base64_url, bool ignore_garbage> static inline uint16_t to_base64_mask(__m128i *src, uint32_t *error) { const __m128i ascii_space_tbl = _mm_setr_epi8(0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0xa, 0x0, @@ -40878,7 +41377,7 @@ static inline uint16_t to_base64_mask(__m128i *src, uint32_t *error) { const __m128i chk = _mm_adds_epi8(_mm_shuffle_epi8(check_values, check_hash), *src); const int mask = _mm_movemask_epi8(chk); - if (mask) { + if (!ignore_garbage && mask) { __m128i ascii_space = _mm_cmpeq_epi8(_mm_shuffle_epi8(ascii_space_tbl, *src), *src); *error = (mask ^ _mm_movemask_epi8(ascii_space)); @@ -40887,18 +41386,24 @@ static inline uint16_t to_base64_mask(__m128i *src, uint32_t *error) { return (uint16_t)mask; } -template <bool base64_url> +template <bool base64_url, bool ignore_garbage> static inline uint64_t to_base64_mask(block64 *b, uint64_t *error) { uint32_t err0 = 0; uint32_t err1 = 0; uint32_t err2 = 0; uint32_t err3 = 0; - uint64_t m0 = to_base64_mask<base64_url>(&b->chunks[0], &err0); - uint64_t m1 = to_base64_mask<base64_url>(&b->chunks[1], &err1); - uint64_t m2 = to_base64_mask<base64_url>(&b->chunks[2], &err2); - uint64_t m3 = to_base64_mask<base64_url>(&b->chunks[3], &err3); - *error = (err0) | ((uint64_t)err1 << 16) | ((uint64_t)err2 << 32) | - ((uint64_t)err3 << 48); + uint64_t m0 = + to_base64_mask<base64_url, ignore_garbage>(&b->chunks[0], &err0); + uint64_t m1 = + to_base64_mask<base64_url, ignore_garbage>(&b->chunks[1], &err1); + uint64_t m2 = + to_base64_mask<base64_url, ignore_garbage>(&b->chunks[2], &err2); + uint64_t m3 = + to_base64_mask<base64_url, ignore_garbage>(&b->chunks[3], &err3); + if (!ignore_garbage) { + *error = (err0) | ((uint64_t)err1 << 16) | ((uint64_t)err2 << 32) | + ((uint64_t)err3 << 48); + } return m0 | (m1 << 16) | (m2 << 32) | (m3 << 48); } @@ -41011,7 +41516,7 @@ static inline void base64_decode_block_safe(char *out, block64 *b) { std::memcpy(out + 36, buffer, 12); } -template <bool base64_url, typename chartype> +template <bool base64_url, bool ignore_garbage, typename chartype> full_result compress_decode_base64(char *dst, const chartype *src, size_t srclen, base64_options options, @@ -41021,12 +41526,13 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, size_t equallocation = srclen; // location of the first padding character if any // skip trailing spaces - while (srclen > 0 && scalar::base64::is_eight_byte(src[srclen - 1]) && + while (!ignore_garbage && srclen > 0 && + scalar::base64::is_eight_byte(src[srclen - 1]) && to_base64[uint8_t(src[srclen - 1])] == 64) { srclen--; } size_t equalsigns = 0; - if (srclen > 0 && src[srclen - 1] == '=') { + if (!ignore_garbage && srclen > 0 && src[srclen - 1] == '=') { equallocation = srclen - 1; srclen--; equalsigns = 1; @@ -41042,7 +41548,13 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } } if (srclen == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -41065,8 +41577,9 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, load_block(&b, src); src += 64; uint64_t error = 0; - uint64_t badcharmask = to_base64_mask<base64_url>(&b, &error); - if (error) { + uint64_t badcharmask = + to_base64_mask<base64_url, ignore_garbage>(&b, &error); + if (error && !ignore_garbage) { src -= 64; size_t error_offset = simdutf_tzcnt_u64(error); return {error_code::INVALID_BASE64_CHARACTER, @@ -41114,7 +41627,8 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, while ((bufferptr - buffer_start) % 64 != 0 && src < srcend) { uint8_t val = to_base64[uint8_t(*src)]; *bufferptr = char(val); - if (!scalar::base64::is_eight_byte(*src) || val > 64) { + if ((!scalar::base64::is_eight_byte(*src) || val > 64) && + !ignore_garbage) { return {error_code::INVALID_BASE64_CHARACTER, size_t(src - srcinit), size_t(dst - dstinit)}; } @@ -41160,8 +41674,14 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, // backtrack int leftover = int(bufferptr - buffer_start); while (leftover > 0) { - while (to_base64[uint8_t(*(src - 1))] == 64) { - src--; + if (!ignore_garbage) { + while (to_base64[uint8_t(*(src - 1))] == 64) { + src--; + } + } else { + while (to_base64[uint8_t(*(src - 1))] >= 64) { + src--; + } } src--; leftover--; @@ -41178,7 +41698,7 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, r.output_count += size_t(dst - dstinit); } if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.output_count % 3 == 0) || ((r.output_count % 3) + 1 + equalsigns != 4)) { @@ -41188,7 +41708,7 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } return r; } - if (equalsigns > 0) { + if (equalsigns > 0 && !ignore_garbage) { if ((size_t(dst - dstinit) % 3 == 0) || ((size_t(dst - dstinit) % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation, size_t(dst - dstinit)}; @@ -42736,6 +43256,9 @@ struct validating_transcoder { uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in // this case, we also have ASCII to account for. + if (utf8_continuation_mask & 1) { + return 0; // error + } uint64_t utf8_leading_mask = ~utf8_continuation_mask; uint64_t utf8_end_of_code_point_mask = utf8_leading_mask >> 1; // We process in blocks of up to 12 bytes except possibly @@ -42986,24 +43509,138 @@ implementation::detect_encodings(const char *input, size_t length) const noexcept { // If there is a BOM, then we trust it. auto bom_encoding = simdutf::BOM::check_bom(input, length); - // todo: reimplement as a one-pass algorithm. if (bom_encoding != encoding_type::unspecified) { return bom_encoding; } + int out = 0; - if (validate_utf8(input, length)) { + uint32_t utf16_err = (length % 2); + uint32_t utf32_err = (length % 4); + uint32_t ends_with_high = 0; + const auto v_d8 = simd8<uint8_t>::splat(0xd8); + const auto v_f8 = simd8<uint8_t>::splat(0xf8); + const auto v_fc = simd8<uint8_t>::splat(0xfc); + const auto v_dc = simd8<uint8_t>::splat(0xdc); + const __m128i standardmax = _mm_set1_epi32(0x10ffff); + const __m128i offset = _mm_set1_epi32(0xffff2000); + const __m128i standardoffsetmax = _mm_set1_epi32(0xfffff7ff); + __m128i currentmax = _mm_setzero_si128(); + __m128i currentoffsetmax = _mm_setzero_si128(); + + utf8_checker c{}; + buf_block_reader<64> reader(reinterpret_cast<const uint8_t *>(input), length); + while (reader.has_full_block()) { + simd::simd8x64<uint8_t> in(reader.full_block()); + // utf8 checks + c.check_next_input(in); + + // utf16le checks + auto in0 = simd16<uint16_t>(in.chunks[0]); + auto in1 = simd16<uint16_t>(in.chunks[1]); + const auto t0 = in0.shr<8>(); + const auto t1 = in1.shr<8>(); + const auto packed1 = simd16<uint16_t>::pack(t0, t1); + auto in2 = simd16<uint16_t>(in.chunks[2]); + auto in3 = simd16<uint16_t>(in.chunks[3]); + const auto t2 = in2.shr<8>(); + const auto t3 = in3.shr<8>(); + const auto packed2 = simd16<uint16_t>::pack(t2, t3); + + const auto surrogates_wordmask_lo = (packed1 & v_f8) == v_d8; + const auto surrogates_wordmask_hi = (packed2 & v_f8) == v_d8; + const uint32_t surrogates_bitmask = + (surrogates_wordmask_hi.to_bitmask() << 16) | + surrogates_wordmask_lo.to_bitmask(); + const auto vL_lo = (packed1 & v_fc) == v_dc; + const auto vL_hi = (packed2 & v_fc) == v_dc; + const uint32_t L = (vL_hi.to_bitmask() << 16) | vL_lo.to_bitmask(); + const uint32_t H = L ^ surrogates_bitmask; + utf16_err |= (((H << 1) | ends_with_high) != L); + ends_with_high = (H & 0x80000000) != 0; + + // utf32le checks + currentmax = _mm_max_epu32(in.chunks[0], currentmax); + currentoffsetmax = + _mm_max_epu32(_mm_add_epi32(in.chunks[0], offset), currentoffsetmax); + currentmax = _mm_max_epu32(in.chunks[1], currentmax); + currentoffsetmax = + _mm_max_epu32(_mm_add_epi32(in.chunks[1], offset), currentoffsetmax); + currentmax = _mm_max_epu32(in.chunks[2], currentmax); + currentoffsetmax = + _mm_max_epu32(_mm_add_epi32(in.chunks[2], offset), currentoffsetmax); + currentmax = _mm_max_epu32(in.chunks[3], currentmax); + currentoffsetmax = + _mm_max_epu32(_mm_add_epi32(in.chunks[3], offset), currentoffsetmax); + + reader.advance(); + } + + uint8_t block[64]{}; + size_t idx = reader.block_index(); + std::memcpy(block, &input[idx], length - idx); + simd::simd8x64<uint8_t> in(block); + c.check_next_input(in); + + // utf16le last block check + auto in0 = simd16<uint16_t>(in.chunks[0]); + auto in1 = simd16<uint16_t>(in.chunks[1]); + const auto t0 = in0.shr<8>(); + const auto t1 = in1.shr<8>(); + const auto packed1 = simd16<uint16_t>::pack(t0, t1); + auto in2 = simd16<uint16_t>(in.chunks[2]); + auto in3 = simd16<uint16_t>(in.chunks[3]); + const auto t2 = in2.shr<8>(); + const auto t3 = in3.shr<8>(); + const auto packed2 = simd16<uint16_t>::pack(t2, t3); + + const auto surrogates_wordmask_lo = (packed1 & v_f8) == v_d8; + const auto surrogates_wordmask_hi = (packed2 & v_f8) == v_d8; + const uint32_t surrogates_bitmask = + (surrogates_wordmask_hi.to_bitmask() << 16) | + surrogates_wordmask_lo.to_bitmask(); + const auto vL_lo = (packed1 & v_fc) == v_dc; + const auto vL_hi = (packed2 & v_fc) == v_dc; + const uint32_t L = (vL_hi.to_bitmask() << 16) | vL_lo.to_bitmask(); + const uint32_t H = L ^ surrogates_bitmask; + utf16_err |= (((H << 1) | ends_with_high) != L); + // this is required to check for last byte ending in high and end of input + // is reached + ends_with_high = (H & 0x80000000) != 0; + utf16_err |= ends_with_high; + + // utf32le last block check + currentmax = _mm_max_epu32(in.chunks[0], currentmax); + currentoffsetmax = + _mm_max_epu32(_mm_add_epi32(in.chunks[0], offset), currentoffsetmax); + currentmax = _mm_max_epu32(in.chunks[1], currentmax); + currentoffsetmax = + _mm_max_epu32(_mm_add_epi32(in.chunks[1], offset), currentoffsetmax); + currentmax = _mm_max_epu32(in.chunks[2], currentmax); + currentoffsetmax = + _mm_max_epu32(_mm_add_epi32(in.chunks[2], offset), currentoffsetmax); + currentmax = _mm_max_epu32(in.chunks[3], currentmax); + currentoffsetmax = + _mm_max_epu32(_mm_add_epi32(in.chunks[3], offset), currentoffsetmax); + + reader.advance(); + + c.check_eof(); + bool is_valid_utf8 = !c.errors(); + __m128i is_zero = + _mm_xor_si128(_mm_max_epu32(currentmax, standardmax), standardmax); + utf32_err |= (_mm_test_all_zeros(is_zero, is_zero) == 0); + + is_zero = _mm_xor_si128(_mm_max_epu32(currentoffsetmax, standardoffsetmax), + standardoffsetmax); + utf32_err |= (_mm_test_all_zeros(is_zero, is_zero) == 0); + if (is_valid_utf8) { out |= encoding_type::UTF8; } - if ((length % 2) == 0) { - if (validate_utf16le(reinterpret_cast<const char16_t *>(input), - length / 2)) { - out |= encoding_type::UTF16_LE; - } + if (utf16_err == 0) { + out |= encoding_type::UTF16_LE; } - if ((length % 4) == 0) { - if (validate_utf32(reinterpret_cast<const char32_t *>(input), length / 4)) { - out |= encoding_type::UTF32_LE; - } + if (utf32_err == 0) { + out |= encoding_type::UTF32_LE; } return out; } @@ -43976,21 +44613,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( @@ -44001,21 +44662,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::base64_length_from_binary( @@ -46960,7 +47645,7 @@ static inline void base64_decode_block_safe(char *out, block64 *b) { base64_decode_block(out, b); } -template <bool base64_url, typename char_type> +template <bool base64_url, bool ignore_garbage, typename char_type> full_result compress_decode_base64(char *dst, const char_type *src, size_t srclen, base64_options options, @@ -46991,7 +47676,13 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, } } if (srclen == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -47012,7 +47703,7 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, bool error = false; uint64_t badcharmask = to_base64_mask<base64_url>(&b, &error); if (badcharmask) { - if (error) { + if (error && !ignore_garbage) { src -= 64; while (src < srcend && scalar::base64::is_eight_byte(*src) && to_base64[uint8_t(*src)] <= 64) { @@ -47056,7 +47747,8 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, while ((bufferptr - buffer_start) % 64 != 0 && src < srcend) { uint8_t val = to_base64[uint8_t(*src)]; *bufferptr = char(val); - if (!scalar::base64::is_eight_byte(*src) || val > 64) { + if ((!scalar::base64::is_eight_byte(*src) || val > 64) && + !ignore_garbage) { return {error_code::INVALID_BASE64_CHARACTER, size_t(src - srcinit), size_t(dst - dstinit)}; } @@ -47098,8 +47790,14 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, // backtrack int leftover = int(bufferptr - buffer_start); while (leftover > 0) { - while (to_base64[uint8_t(*(src - 1))] == 64) { - src--; + if (!ignore_garbage) { + while (to_base64[uint8_t(*(src - 1))] == 64) { + src--; + } + } else { + while (to_base64[uint8_t(*(src - 1))] >= 64) { + src--; + } } src--; leftover--; @@ -47116,7 +47814,7 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, r.output_count += size_t(dst - dstinit); } if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.output_count % 3 == 0) || ((r.output_count % 3) + 1 + equalsigns != 4)) { @@ -47126,7 +47824,7 @@ compress_decode_base64(char *dst, const char_type *src, size_t srclen, } return r; } - if (equalsigns > 0) { + if (equalsigns > 0 && !ignore_garbage) { if ((size_t(dst - dstinit) % 3 == 0) || ((size_t(dst - dstinit) % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation, size_t(dst - dstinit)}; @@ -47778,6 +48476,9 @@ struct validating_transcoder { uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in // this case, we also have ASCII to account for. + if (utf8_continuation_mask & 1) { + return 0; // error + } uint64_t utf8_leading_mask = ~utf8_continuation_mask; uint64_t utf8_end_of_code_point_mask = utf8_leading_mask >> 1; // We process in blocks of up to 12 bytes except possibly @@ -49864,21 +50565,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( @@ -49889,21 +50614,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::base64_length_from_binary( @@ -53234,7 +53983,7 @@ static inline void base64_decode_block_safe(char *out, block64 *b) { std::memcpy(out + 24, buffer, 24); } -template <bool base64_url, typename chartype> +template <bool base64_url, bool ignore_garbage, typename chartype> full_result compress_decode_base64(char *dst, const chartype *src, size_t srclen, base64_options options, @@ -53265,7 +54014,13 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } } if (srclen == 0) { - if (equalsigns > 0) { + if (!ignore_garbage && equalsigns > 0) { + if (last_chunk_options == last_chunk_handling_options::strict) { + return {BASE64_INPUT_REMAINDER, 0, 0}; + } else if (last_chunk_options == + last_chunk_handling_options::stop_before_partial) { + return {SUCCESS, 0, 0}; + } return {INVALID_BASE64_CHARACTER, equallocation, 0}; } return {SUCCESS, 0, 0}; @@ -53289,7 +54044,7 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, src += 64; bool error = false; uint64_t badcharmask = to_base64_mask<base64_url>(&b, &error); - if (error) { + if (error && !ignore_garbage) { src -= 64; while (src < srcend && scalar::base64::is_eight_byte(*src) && to_base64[uint8_t(*src)] <= 64) { @@ -53341,7 +54096,8 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, while ((bufferptr - buffer_start) % 64 != 0 && src < srcend) { uint8_t val = to_base64[uint8_t(*src)]; *bufferptr = char(val); - if (!scalar::base64::is_eight_byte(*src) || val > 64) { + if ((!scalar::base64::is_eight_byte(*src) || val > 64) && + !ignore_garbage) { return {error_code::INVALID_BASE64_CHARACTER, size_t(src - srcinit), size_t(dst - dstinit)}; } @@ -53387,8 +54143,14 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, // backtrack int leftover = int(bufferptr - buffer_start); while (leftover > 0) { - while (to_base64[uint8_t(*(src - 1))] == 64) { - src--; + if (!ignore_garbage) { + while (to_base64[uint8_t(*(src - 1))] == 64) { + src--; + } + } else { + while (to_base64[uint8_t(*(src - 1))] >= 64) { + src--; + } } src--; leftover--; @@ -53405,7 +54167,7 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, r.output_count += size_t(dst - dstinit); } if (last_chunk_options != stop_before_partial && - r.error == error_code::SUCCESS && equalsigns > 0) { + r.error == error_code::SUCCESS && equalsigns > 0 && !ignore_garbage) { // additional checks if ((r.output_count % 3 == 0) || ((r.output_count % 3) + 1 + equalsigns != 4)) { @@ -53415,7 +54177,7 @@ compress_decode_base64(char *dst, const chartype *src, size_t srclen, } return r; } - if (equalsigns > 0) { + if (equalsigns > 0 && !ignore_garbage) { if ((size_t(dst - dstinit) % 3 == 0) || ((size_t(dst - dstinit) % 3) + 1 + equalsigns != 4)) { return {INVALID_BASE64_CHARACTER, equallocation, size_t(dst - dstinit)}; @@ -54067,6 +54829,9 @@ struct validating_transcoder { uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in // this case, we also have ASCII to account for. + if (utf8_continuation_mask & 1) { + return 0; // error + } uint64_t utf8_leading_mask = ~utf8_continuation_mask; uint64_t utf8_end_of_code_point_mask = utf8_leading_mask >> 1; // We process in blocks of up to 12 bytes except possibly @@ -56273,21 +57038,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( @@ -56298,21 +57087,45 @@ simdutf_warn_unused size_t implementation::maximal_binary_length_from_base64( simdutf_warn_unused result implementation::base64_to_binary( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused full_result implementation::base64_to_binary_details( const char16_t *input, size_t length, char *output, base64_options options, last_chunk_handling_options last_chunk_options) const noexcept { - return (options & base64_url) - ? compress_decode_base64<true>(output, input, length, options, - last_chunk_options) - : compress_decode_base64<false>(output, input, length, options, - last_chunk_options); + if (options & base64_url) { + if (options == base64_options::base64_url_accept_garbage) { + return compress_decode_base64<true, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<true, false>(output, input, length, options, + last_chunk_options); + } + } else { + if (options == base64_options::base64_default_accept_garbage) { + return compress_decode_base64<false, true>(output, input, length, options, + last_chunk_options); + } else { + return compress_decode_base64<false, false>(output, input, length, + options, last_chunk_options); + } + } } simdutf_warn_unused size_t implementation::base64_length_from_binary( diff --git a/deps/simdutf/simdutf.h b/deps/simdutf/simdutf.h index 2d984f40e7bc3f..4bec0cf300292a 100644 --- a/deps/simdutf/simdutf.h +++ b/deps/simdutf/simdutf.h @@ -1,4 +1,4 @@ -/* auto-generated on 2024-12-10 14:54:53 -0500. Do not edit! */ +/* auto-generated on 2025-01-08 17:51:07 -0500. Do not edit! */ /* begin file include/simdutf.h */ #ifndef SIMDUTF_H #define SIMDUTF_H @@ -55,21 +55,35 @@ #ifndef SIMDUTF_COMMON_DEFS_H #define SIMDUTF_COMMON_DEFS_H -#include <cassert> /* begin file include/simdutf/portability.h */ #ifndef SIMDUTF_PORTABILITY_H #define SIMDUTF_PORTABILITY_H + +#include <cfloat> #include <cstddef> #include <cstdint> #include <cstdlib> -#include <cfloat> -#include <cassert> #ifndef _WIN32 // strcasecmp, strncasecmp #include <strings.h> #endif +#if defined(__apple_build_version__) + #if __apple_build_version__ < 14000000 + #define SIMDUTF_SPAN_DISABLED \ + 1 // apple-clang/13 doesn't support std::convertible_to + #endif +#endif + +#if SIMDUTF_CPLUSPLUS20 + #include <version> + #if __cpp_concepts >= 201907L && __cpp_lib_span >= 202002L && \ + !defined(SIMDUTF_SPAN_DISABLED) + #define SIMDUTF_SPAN 1 + #endif +#endif + /** * We want to check that it is actually a little endian system at * compile-time. @@ -291,27 +305,6 @@ #define simdutf_strncasecmp strncasecmp #endif -#ifdef NDEBUG - - #ifdef SIMDUTF_VISUAL_STUDIO - #define SIMDUTF_UNREACHABLE() __assume(0) - #define SIMDUTF_ASSUME(COND) __assume(COND) - #else - #define SIMDUTF_UNREACHABLE() __builtin_unreachable(); - #define SIMDUTF_ASSUME(COND) \ - do { \ - if (!(COND)) \ - __builtin_unreachable(); \ - } while (0) - #endif - -#else // NDEBUG - - #define SIMDUTF_UNREACHABLE() assert(0); - #define SIMDUTF_ASSUME(COND) assert(COND) - -#endif - #if defined(__GNUC__) && !defined(__clang__) #if __GNUC__ >= 11 #define SIMDUTF_GCC11ORMORE 1 @@ -402,27 +395,6 @@ #endif // SIMDUTF_AVX512_H_ /* end file include/simdutf/avx512.h */ -#if defined(__GNUC__) - // Marks a block with a name so that MCA analysis can see it. - #define SIMDUTF_BEGIN_DEBUG_BLOCK(name) \ - __asm volatile("# LLVM-MCA-BEGIN " #name); - #define SIMDUTF_END_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-END " #name); - #define SIMDUTF_DEBUG_BLOCK(name, block) \ - BEGIN_DEBUG_BLOCK(name); \ - block; \ - END_DEBUG_BLOCK(name); -#else - #define SIMDUTF_BEGIN_DEBUG_BLOCK(name) - #define SIMDUTF_END_DEBUG_BLOCK(name) - #define SIMDUTF_DEBUG_BLOCK(name, block) -#endif - -// Align to N-byte boundary -#define SIMDUTF_ROUNDUP_N(a, n) (((a) + ((n) - 1)) & ~((n) - 1)) -#define SIMDUTF_ROUNDDOWN_N(a, n) ((a) & ~((n) - 1)) - -#define SIMDUTF_ISALIGNED_N(ptr, n) (((uintptr_t)(ptr) & ((n) - 1)) == 0) - #if defined(SIMDUTF_REGULAR_VISUAL_STUDIO) #define SIMDUTF_DEPRECATED __declspec(deprecated) @@ -536,18 +508,11 @@ #endif #endif -/// If EXPR is an error, returns it. -#define SIMDUTF_TRY(EXPR) \ - { \ - auto _err = (EXPR); \ - if (_err) { \ - return _err; \ - } \ - } - #endif // SIMDUTF_COMMON_DEFS_H /* end file include/simdutf/common_defs.h */ /* begin file include/simdutf/encoding_types.h */ +#ifndef SIMDUTF_ENCODING_TYPES_H +#define SIMDUTF_ENCODING_TYPES_H #include <string> namespace simdutf { @@ -591,6 +556,7 @@ size_t bom_byte_size(encoding_type bom); } // namespace BOM } // namespace simdutf +#endif /* end file include/simdutf/encoding_types.h */ /* begin file include/simdutf/error.h */ #ifndef SIMDUTF_ERROR_H @@ -675,22 +641,22 @@ SIMDUTF_DISABLE_UNDESIRED_WARNINGS #define SIMDUTF_SIMDUTF_VERSION_H /** The version of simdutf being used (major.minor.revision) */ -#define SIMDUTF_VERSION "5.6.4" +#define SIMDUTF_VERSION "6.0.3" namespace simdutf { enum { /** * The major version (MAJOR.minor.revision) of simdutf being used. */ - SIMDUTF_VERSION_MAJOR = 5, + SIMDUTF_VERSION_MAJOR = 6, /** * The minor version (major.MINOR.revision) of simdutf being used. */ - SIMDUTF_VERSION_MINOR = 6, + SIMDUTF_VERSION_MINOR = 0, /** * The revision (major.minor.REVISION) of simdutf being used. */ - SIMDUTF_VERSION_REVISION = 4 + SIMDUTF_VERSION_REVISION = 3 }; } // namespace simdutf @@ -699,11 +665,10 @@ enum { /* begin file include/simdutf/implementation.h */ #ifndef SIMDUTF_IMPLEMENTATION_H #define SIMDUTF_IMPLEMENTATION_H -#include <string> #if !defined(SIMDUTF_NO_THREADS) #include <atomic> #endif -#include <tuple> +#include <string> #include <vector> /* begin file include/simdutf/internal/isadetection.h */ /* From @@ -1031,8 +996,61 @@ static inline uint32_t detect_supported_architectures() { #endif // SIMDutf_INTERNAL_ISADETECTION_H /* end file include/simdutf/internal/isadetection.h */ +#if SIMDUTF_SPAN + #include <concepts> + #include <type_traits> + #include <span> +#endif + namespace simdutf { +#if SIMDUTF_SPAN +/// helpers placed in namespace detail are not a part of the public API +namespace detail { +/** + * matches a byte, in the many ways C++ allows. note that these + * are all distinct types. + */ +template <typename T> +concept byte_like = std::is_same_v<T, std::byte> || // + std::is_same_v<T, char> || // + std::is_same_v<T, signed char> || // + std::is_same_v<T, unsigned char>; + +template <typename T> +concept is_byte_like = byte_like<std::remove_cvref_t<T>>; + +template <typename T> +concept is_pointer = std::is_pointer_v<T>; + +/** + * matches anything that behaves like std::span and points to character-like + * data such as: std::byte, char, unsigned char, signed char, std::int8_t, + * std::uint8_t + */ +template <typename T> +concept input_span_of_byte_like = requires(const T &t) { + { t.size() } noexcept -> std::convertible_to<std::size_t>; + { t.data() } noexcept -> is_pointer; + { *t.data() } noexcept -> is_byte_like; +}; + +template <typename T> +concept is_mutable = !std::is_const_v<std::remove_reference_t<T>>; + +/** + * like span_of_byte_like, but for an output span (intended to be written to) + */ +template <typename T> +concept output_span_of_byte_like = requires(T &t) { + { t.size() } noexcept -> std::convertible_to<std::size_t>; + { t.data() } noexcept -> is_pointer; + { *t.data() } noexcept -> is_byte_like; + { *t.data() } noexcept -> is_mutable; +}; +} // namespace detail +#endif + /** * Autodetect the encoding of the input, a single encoding is recommended. * E.g., the function might return simdutf::encoding_type::UTF8, @@ -1049,6 +1067,25 @@ simdutf_really_inline simdutf_warn_unused simdutf::encoding_type autodetect_encoding(const uint8_t *input, size_t length) noexcept { return autodetect_encoding(reinterpret_cast<const char *>(input), length); } +#if SIMDUTF_SPAN +/** + * Autodetect the encoding of the input, a single encoding is recommended. + * E.g., the function might return simdutf::encoding_type::UTF8, + * simdutf::encoding_type::UTF16_LE, simdutf::encoding_type::UTF16_BE, or + * simdutf::encoding_type::UTF32_LE. + * + * @param input the string to analyze. can be a anything span-like that has a + * data() and size() that points to character data: std::string, + * std::string_view, std::vector<char>, std::span<const std::byte> etc. + * @return the detected encoding type + */ +simdutf_really_inline simdutf_warn_unused simdutf::encoding_type +autodetect_encoding( + const detail::input_span_of_byte_like auto &input) noexcept { + return autodetect_encoding(reinterpret_cast<const char *>(input.data()), + input.size()); +} +#endif /** * Autodetect the possible encodings of the input in one pass. @@ -1067,6 +1104,13 @@ simdutf_really_inline simdutf_warn_unused int detect_encodings(const uint8_t *input, size_t length) noexcept { return detect_encodings(reinterpret_cast<const char *>(input), length); } +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused int +detect_encodings(const detail::input_span_of_byte_like auto &input) noexcept { + return detect_encodings(reinterpret_cast<const char *>(input.data()), + input.size()); +} +#endif /** * Validate the UTF-8 string. This function may be best when you expect @@ -1080,6 +1124,13 @@ detect_encodings(const uint8_t *input, size_t length) noexcept { * @return true if and only if the string is valid UTF-8. */ simdutf_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused bool +validate_utf8(const detail::input_span_of_byte_like auto &input) noexcept { + return validate_utf8(reinterpret_cast<const char *>(input.data()), + input.size()); +} +#endif /** * Validate the UTF-8 string and stop on error. @@ -1095,6 +1146,13 @@ simdutf_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept; */ simdutf_warn_unused result validate_utf8_with_errors(const char *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result validate_utf8_with_errors( + const detail::input_span_of_byte_like auto &input) noexcept { + return validate_utf8_with_errors(reinterpret_cast<const char *>(input.data()), + input.size()); +} +#endif /** * Validate the ASCII string. @@ -1106,6 +1164,13 @@ simdutf_warn_unused result validate_utf8_with_errors(const char *buf, * @return true if and only if the string is valid ASCII. */ simdutf_warn_unused bool validate_ascii(const char *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused bool +validate_ascii(const detail::input_span_of_byte_like auto &input) noexcept { + return validate_ascii(reinterpret_cast<const char *>(input.data()), + input.size()); +} +#endif /** * Validate the ASCII string and stop on error. It might be faster than @@ -1122,6 +1187,13 @@ simdutf_warn_unused bool validate_ascii(const char *buf, size_t len) noexcept; */ simdutf_warn_unused result validate_ascii_with_errors(const char *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result validate_ascii_with_errors( + const detail::input_span_of_byte_like auto &input) noexcept { + return validate_ascii_with_errors( + reinterpret_cast<const char *>(input.data()), input.size()); +} +#endif /** * Using native endianness; Validate the UTF-16 string. @@ -1139,6 +1211,12 @@ simdutf_warn_unused result validate_ascii_with_errors(const char *buf, */ simdutf_warn_unused bool validate_utf16(const char16_t *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused bool +validate_utf16(std::span<const char16_t> input) noexcept { + return validate_utf16(input.data(), input.size()); +} +#endif /** * Validate the UTF-16LE string. This function may be best when you expect @@ -1156,6 +1234,12 @@ simdutf_warn_unused bool validate_utf16(const char16_t *buf, */ simdutf_warn_unused bool validate_utf16le(const char16_t *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused bool +validate_utf16le(std::span<const char16_t> input) noexcept { + return validate_utf16le(input.data(), input.size()); +} +#endif /** * Validate the UTF-16BE string. This function may be best when you expect @@ -1173,6 +1257,12 @@ simdutf_warn_unused bool validate_utf16le(const char16_t *buf, */ simdutf_warn_unused bool validate_utf16be(const char16_t *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused bool +validate_utf16be(std::span<const char16_t> input) noexcept { + return validate_utf16be(input.data(), input.size()); +} +#endif /** * Using native endianness; Validate the UTF-16 string and stop on error. @@ -1193,6 +1283,12 @@ simdutf_warn_unused bool validate_utf16be(const char16_t *buf, */ simdutf_warn_unused result validate_utf16_with_errors(const char16_t *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +validate_utf16_with_errors(std::span<const char16_t> input) noexcept { + return validate_utf16_with_errors(input.data(), input.size()); +} +#endif /** * Validate the UTF-16LE string and stop on error. It might be faster than @@ -1212,6 +1308,12 @@ simdutf_warn_unused result validate_utf16_with_errors(const char16_t *buf, */ simdutf_warn_unused result validate_utf16le_with_errors(const char16_t *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +validate_utf16le_with_errors(std::span<const char16_t> input) noexcept { + return validate_utf16le_with_errors(input.data(), input.size()); +} +#endif /** * Validate the UTF-16BE string and stop on error. It might be faster than @@ -1231,6 +1333,12 @@ simdutf_warn_unused result validate_utf16le_with_errors(const char16_t *buf, */ simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +validate_utf16be_with_errors(std::span<const char16_t> input) noexcept { + return validate_utf16be_with_errors(input.data(), input.size()); +} +#endif /** * Validate the UTF-32 string. This function may be best when you expect @@ -1248,6 +1356,12 @@ simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, */ simdutf_warn_unused bool validate_utf32(const char32_t *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused bool +validate_utf32(std::span<const char32_t> input) noexcept { + return validate_utf32(input.data(), input.size()); +} +#endif /** * Validate the UTF-32 string and stop on error. It might be faster than @@ -1267,6 +1381,12 @@ simdutf_warn_unused bool validate_utf32(const char32_t *buf, */ simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_t len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +validate_utf32_with_errors(std::span<const char32_t> input) noexcept { + return validate_utf32_with_errors(input.data(), input.size()); +} +#endif /** * Convert Latin1 string into UTF8 string. @@ -1281,6 +1401,15 @@ simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, simdutf_warn_unused size_t convert_latin1_to_utf8(const char *input, size_t length, char *utf8_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_latin1_to_utf8( + const detail::input_span_of_byte_like auto &latin1_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_latin1_to_utf8( + reinterpret_cast<const char *>(latin1_input.data()), latin1_input.size(), + utf8_output.data()); +} +#endif /** * Convert Latin1 string into UTF8 string with output limit. @@ -1296,6 +1425,21 @@ simdutf_warn_unused size_t convert_latin1_to_utf8(const char *input, simdutf_warn_unused size_t convert_latin1_to_utf8_safe(const char *input, size_t length, char *utf8_output, size_t utf8_len) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_latin1_to_utf8_safe( + const detail::input_span_of_byte_like auto &input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + // implementation note: outputspan is a forwarding ref to avoid copying and + // allow both lvalues and rvalues. std::span can be copied without problems, + // but std::vector should not, and this function should accept both. it will + // allow using an owning rvalue ref (example: passing a temporary std::string) + // as output, but the user will quickly find out that he has no way of getting + // the data out of the object in that case. + return convert_latin1_to_utf8_safe( + input.data(), input.size(), reinterpret_cast<char *>(utf8_output.data()), + utf8_output.size()); +} +#endif /** * Convert possibly Latin1 string into UTF-16LE string. @@ -1309,6 +1453,15 @@ convert_latin1_to_utf8_safe(const char *input, size_t length, char *utf8_output, */ simdutf_warn_unused size_t convert_latin1_to_utf16le( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_latin1_to_utf16le( + const detail::input_span_of_byte_like auto &latin1_input, + std::span<char16_t> utf16_output) noexcept { + return convert_latin1_to_utf16le( + reinterpret_cast<const char *>(latin1_input.data()), latin1_input.size(), + utf16_output.data()); +} +#endif /** * Convert Latin1 string into UTF-16BE string. @@ -1322,6 +1475,14 @@ simdutf_warn_unused size_t convert_latin1_to_utf16le( */ simdutf_warn_unused size_t convert_latin1_to_utf16be( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_latin1_to_utf16be(const detail::input_span_of_byte_like auto &input, + std::span<char16_t> output) noexcept { + return convert_latin1_to_utf16be(reinterpret_cast<const char *>(input.data()), + input.size(), output.data()); +} +#endif /** * Convert Latin1 string into UTF-32 string. @@ -1335,6 +1496,15 @@ simdutf_warn_unused size_t convert_latin1_to_utf16be( */ simdutf_warn_unused size_t convert_latin1_to_utf32( const char *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_latin1_to_utf32( + const detail::input_span_of_byte_like auto &latin1_input, + std::span<char32_t> utf32_output) noexcept { + return convert_latin1_to_utf32( + reinterpret_cast<const char *>(latin1_input.data()), latin1_input.size(), + utf32_output.data()); +} +#endif /** * Convert possibly broken UTF-8 string into latin1 string. @@ -1351,6 +1521,15 @@ simdutf_warn_unused size_t convert_latin1_to_utf32( simdutf_warn_unused size_t convert_utf8_to_latin1(const char *input, size_t length, char *latin1_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf8_to_latin1( + const detail::input_span_of_byte_like auto &input, + detail::output_span_of_byte_like auto &&output) noexcept { + return convert_utf8_to_latin1(reinterpret_cast<const char *>(input.data()), + input.size(), + reinterpret_cast<char *>(output.data())); +} +#endif /** * Using native endianness, convert possibly broken UTF-8 string into a UTF-16 @@ -1367,6 +1546,14 @@ simdutf_warn_unused size_t convert_utf8_to_latin1(const char *input, */ simdutf_warn_unused size_t convert_utf8_to_utf16( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf8_to_utf16(const detail::input_span_of_byte_like auto &input, + std::span<char16_t> output) noexcept { + return convert_utf8_to_utf16(reinterpret_cast<const char *>(input.data()), + input.size(), output.data()); +} +#endif /** * Using native endianness, convert a Latin1 string into a UTF-16 string. @@ -1378,6 +1565,14 @@ simdutf_warn_unused size_t convert_utf8_to_utf16( */ simdutf_warn_unused size_t convert_latin1_to_utf16( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_latin1_to_utf16(const detail::input_span_of_byte_like auto &input, + std::span<char16_t> output) noexcept { + return convert_latin1_to_utf16(reinterpret_cast<const char *>(input.data()), + input.size(), output.data()); +} +#endif /** * Convert possibly broken UTF-8 string into UTF-16LE string. @@ -1393,6 +1588,15 @@ simdutf_warn_unused size_t convert_latin1_to_utf16( */ simdutf_warn_unused size_t convert_utf8_to_utf16le( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf8_to_utf16le(const detail::input_span_of_byte_like auto &utf8_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf8_to_utf16le( + reinterpret_cast<const char *>(utf8_input.data()), utf8_input.size(), + utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-8 string into UTF-16BE string. @@ -1408,6 +1612,15 @@ simdutf_warn_unused size_t convert_utf8_to_utf16le( */ simdutf_warn_unused size_t convert_utf8_to_utf16be( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf8_to_utf16be(const detail::input_span_of_byte_like auto &utf8_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf8_to_utf16be( + reinterpret_cast<const char *>(utf8_input.data()), utf8_input.size(), + utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-8 string into latin1 string with errors. @@ -1427,6 +1640,16 @@ simdutf_warn_unused size_t convert_utf8_to_utf16be( */ simdutf_warn_unused result convert_utf8_to_latin1_with_errors( const char *input, size_t length, char *latin1_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf8_to_latin1_with_errors( + const detail::input_span_of_byte_like auto &utf8_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf8_to_latin1_with_errors( + reinterpret_cast<const char *>(utf8_input.data()), utf8_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Using native endianness, convert possibly broken UTF-8 string into UTF-16 @@ -1445,6 +1668,16 @@ simdutf_warn_unused result convert_utf8_to_latin1_with_errors( */ simdutf_warn_unused result convert_utf8_to_utf16_with_errors( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf8_to_utf16_with_errors( + const detail::input_span_of_byte_like auto &utf8_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf8_to_utf16_with_errors( + reinterpret_cast<const char *>(utf8_input.data()), utf8_input.size(), + utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-8 string into UTF-16LE string and stop on error. @@ -1462,6 +1695,16 @@ simdutf_warn_unused result convert_utf8_to_utf16_with_errors( */ simdutf_warn_unused result convert_utf8_to_utf16le_with_errors( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf8_to_utf16le_with_errors( + const detail::input_span_of_byte_like auto &utf8_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf8_to_utf16le_with_errors( + reinterpret_cast<const char *>(utf8_input.data()), utf8_input.size(), + utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-8 string into UTF-16BE string and stop on error. @@ -1479,6 +1722,16 @@ simdutf_warn_unused result convert_utf8_to_utf16le_with_errors( */ simdutf_warn_unused result convert_utf8_to_utf16be_with_errors( const char *input, size_t length, char16_t *utf16_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf8_to_utf16be_with_errors( + const detail::input_span_of_byte_like auto &utf8_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf8_to_utf16be_with_errors( + reinterpret_cast<const char *>(utf8_input.data()), utf8_input.size(), + utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-8 string into UTF-32 string. @@ -1494,6 +1747,15 @@ simdutf_warn_unused result convert_utf8_to_utf16be_with_errors( */ simdutf_warn_unused size_t convert_utf8_to_utf32( const char *input, size_t length, char32_t *utf32_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf8_to_utf32(const detail::input_span_of_byte_like auto &utf8_input, + std::span<char32_t> utf32_output) noexcept { + return convert_utf8_to_utf32( + reinterpret_cast<const char *>(utf8_input.data()), utf8_input.size(), + utf32_output.data()); +} +#endif /** * Convert possibly broken UTF-8 string into UTF-32 string and stop on error. @@ -1511,6 +1773,16 @@ simdutf_warn_unused size_t convert_utf8_to_utf32( */ simdutf_warn_unused result convert_utf8_to_utf32_with_errors( const char *input, size_t length, char32_t *utf32_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf8_to_utf32_with_errors( + const detail::input_span_of_byte_like auto &utf8_input, + std::span<char32_t> utf32_output) noexcept { + return convert_utf8_to_utf32_with_errors( + reinterpret_cast<const char *>(utf8_input.data()), utf8_input.size(), + utf32_output.data()); +} +#endif /** * Convert valid UTF-8 string into latin1 string. @@ -1533,6 +1805,15 @@ simdutf_warn_unused result convert_utf8_to_utf32_with_errors( */ simdutf_warn_unused size_t convert_valid_utf8_to_latin1( const char *input, size_t length, char *latin1_output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf8_to_latin1( + const detail::input_span_of_byte_like auto &valid_utf8_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_valid_utf8_to_latin1( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size(), latin1_output.data()); +} +#endif /** * Using native endianness, convert valid UTF-8 string into a UTF-16 string. @@ -1546,6 +1827,15 @@ simdutf_warn_unused size_t convert_valid_utf8_to_latin1( */ simdutf_warn_unused size_t convert_valid_utf8_to_utf16( const char *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf8_to_utf16( + const detail::input_span_of_byte_like auto &valid_utf8_input, + std::span<char16_t> utf16_output) noexcept { + return convert_valid_utf8_to_utf16( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size(), utf16_output.data()); +} +#endif /** * Convert valid UTF-8 string into UTF-16LE string. @@ -1559,6 +1849,15 @@ simdutf_warn_unused size_t convert_valid_utf8_to_utf16( */ simdutf_warn_unused size_t convert_valid_utf8_to_utf16le( const char *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf8_to_utf16le( + const detail::input_span_of_byte_like auto &valid_utf8_input, + std::span<char16_t> utf16_output) noexcept { + return convert_valid_utf8_to_utf16le( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size(), utf16_output.data()); +} +#endif /** * Convert valid UTF-8 string into UTF-16BE string. @@ -1572,6 +1871,15 @@ simdutf_warn_unused size_t convert_valid_utf8_to_utf16le( */ simdutf_warn_unused size_t convert_valid_utf8_to_utf16be( const char *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf8_to_utf16be( + const detail::input_span_of_byte_like auto &valid_utf8_input, + std::span<char16_t> utf16_output) noexcept { + return convert_valid_utf8_to_utf16be( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size(), utf16_output.data()); +} +#endif /** * Convert valid UTF-8 string into UTF-32 string. @@ -1585,6 +1893,15 @@ simdutf_warn_unused size_t convert_valid_utf8_to_utf16be( */ simdutf_warn_unused size_t convert_valid_utf8_to_utf32( const char *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf8_to_utf32( + const detail::input_span_of_byte_like auto &valid_utf8_input, + std::span<char32_t> utf32_output) noexcept { + return convert_valid_utf8_to_utf32( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size(), utf32_output.data()); +} +#endif /** * Return the number of bytes that this Latin1 string would require in UTF-8 @@ -1596,6 +1913,13 @@ simdutf_warn_unused size_t convert_valid_utf8_to_utf32( */ simdutf_warn_unused size_t utf8_length_from_latin1(const char *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t utf8_length_from_latin1( + const detail::input_span_of_byte_like auto &latin1_input) noexcept { + return utf8_length_from_latin1( + reinterpret_cast<const char *>(latin1_input.data()), latin1_input.size()); +} +#endif /** * Compute the number of bytes that this UTF-8 string would require in Latin1 @@ -1612,6 +1936,14 @@ simdutf_warn_unused size_t utf8_length_from_latin1(const char *input, */ simdutf_warn_unused size_t latin1_length_from_utf8(const char *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t latin1_length_from_utf8( + const detail::input_span_of_byte_like auto &valid_utf8_input) noexcept { + return latin1_length_from_utf8( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size()); +} +#endif /** * Compute the number of 2-byte code units that this UTF-8 string would require @@ -1629,6 +1961,14 @@ simdutf_warn_unused size_t latin1_length_from_utf8(const char *input, */ simdutf_warn_unused size_t utf16_length_from_utf8(const char *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t utf16_length_from_utf8( + const detail::input_span_of_byte_like auto &valid_utf8_input) noexcept { + return utf16_length_from_utf8( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size()); +} +#endif /** * Compute the number of 4-byte code units that this UTF-8 string would require @@ -1648,6 +1988,14 @@ simdutf_warn_unused size_t utf16_length_from_utf8(const char *input, */ simdutf_warn_unused size_t utf32_length_from_utf8(const char *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t utf32_length_from_utf8( + const detail::input_span_of_byte_like auto &valid_utf8_input) noexcept { + return utf32_length_from_utf8( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size()); +} +#endif /** * Using native endianness, convert possibly broken UTF-16 string into UTF-8 @@ -1667,6 +2015,14 @@ simdutf_warn_unused size_t utf32_length_from_utf8(const char *input, simdutf_warn_unused size_t convert_utf16_to_utf8(const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf16_to_utf8( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_utf16_to_utf8(utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Using native endianness, convert possibly broken UTF-16 string into Latin1 @@ -1685,6 +2041,15 @@ simdutf_warn_unused size_t convert_utf16_to_utf8(const char16_t *input, */ simdutf_warn_unused size_t convert_utf16_to_latin1( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf16_to_latin1( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf16_to_latin1( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert possibly broken UTF-16LE string into Latin1 string. @@ -1704,6 +2069,15 @@ simdutf_warn_unused size_t convert_utf16_to_latin1( */ simdutf_warn_unused size_t convert_utf16le_to_latin1( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf16le_to_latin1( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf16le_to_latin1( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert possibly broken UTF-16BE string into Latin1 string. @@ -1721,6 +2095,15 @@ simdutf_warn_unused size_t convert_utf16le_to_latin1( */ simdutf_warn_unused size_t convert_utf16be_to_latin1( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf16be_to_latin1( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf16be_to_latin1( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert possibly broken UTF-16LE string into UTF-8 string. @@ -1739,6 +2122,14 @@ simdutf_warn_unused size_t convert_utf16be_to_latin1( simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf16le_to_utf8( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_utf16le_to_utf8(utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Convert possibly broken UTF-16BE string into UTF-8 string. @@ -1757,6 +2148,14 @@ simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t *input, simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf16be_to_utf8( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_utf16be_to_utf8(utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Using native endianness, convert possibly broken UTF-16 string into Latin1 @@ -1776,6 +2175,16 @@ simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t *input, */ simdutf_warn_unused result convert_utf16_to_latin1_with_errors( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16_to_latin1_with_errors( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf16_to_latin1_with_errors( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert possibly broken UTF-16LE string into Latin1 string. @@ -1794,6 +2203,16 @@ simdutf_warn_unused result convert_utf16_to_latin1_with_errors( */ simdutf_warn_unused result convert_utf16le_to_latin1_with_errors( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16le_to_latin1_with_errors( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf16le_to_latin1_with_errors( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert possibly broken UTF-16BE string into Latin1 string. @@ -1814,6 +2233,16 @@ simdutf_warn_unused result convert_utf16le_to_latin1_with_errors( */ simdutf_warn_unused result convert_utf16be_to_latin1_with_errors( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16be_to_latin1_with_errors( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf16be_to_latin1_with_errors( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Using native endianness, convert possibly broken UTF-16 string into UTF-8 @@ -1834,6 +2263,16 @@ simdutf_warn_unused result convert_utf16be_to_latin1_with_errors( */ simdutf_warn_unused result convert_utf16_to_utf8_with_errors( const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16_to_utf8_with_errors( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_utf16_to_utf8_with_errors( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Convert possibly broken UTF-16LE string into UTF-8 string and stop on error. @@ -1853,6 +2292,16 @@ simdutf_warn_unused result convert_utf16_to_utf8_with_errors( */ simdutf_warn_unused result convert_utf16le_to_utf8_with_errors( const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16le_to_utf8_with_errors( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_utf16le_to_utf8_with_errors( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Convert possibly broken UTF-16BE string into UTF-8 string and stop on error. @@ -1872,6 +2321,16 @@ simdutf_warn_unused result convert_utf16le_to_utf8_with_errors( */ simdutf_warn_unused result convert_utf16be_to_utf8_with_errors( const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16be_to_utf8_with_errors( + std::span<char16_t> utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_utf16be_to_utf8_with_errors( + utf16_input.data(), utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Using native endianness, convert valid UTF-16 string into UTF-8 string. @@ -1888,6 +2347,15 @@ simdutf_warn_unused result convert_utf16be_to_utf8_with_errors( */ simdutf_warn_unused size_t convert_valid_utf16_to_utf8( const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf16_to_utf8( + std::span<char16_t> valid_utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_valid_utf16_to_utf8( + valid_utf16_input.data(), valid_utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Using native endianness, convert UTF-16 string into Latin1 string. @@ -1910,6 +2378,15 @@ simdutf_warn_unused size_t convert_valid_utf16_to_utf8( */ simdutf_warn_unused size_t convert_valid_utf16_to_latin1( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf16_to_latin1( + std::span<char16_t> valid_utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_valid_utf16_to_latin1( + valid_utf16_input.data(), valid_utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert valid UTF-16LE string into Latin1 string. @@ -1932,6 +2409,16 @@ simdutf_warn_unused size_t convert_valid_utf16_to_latin1( */ simdutf_warn_unused size_t convert_valid_utf16le_to_latin1( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_valid_utf16le_to_latin1( + std::span<char16_t> valid_utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_valid_utf16le_to_latin1( + valid_utf16_input.data(), valid_utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert valid UTF-16BE string into Latin1 string. @@ -1954,6 +2441,16 @@ simdutf_warn_unused size_t convert_valid_utf16le_to_latin1( */ simdutf_warn_unused size_t convert_valid_utf16be_to_latin1( const char16_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_valid_utf16be_to_latin1( + std::span<char16_t> valid_utf16_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_valid_utf16be_to_latin1( + valid_utf16_input.data(), valid_utf16_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert valid UTF-16LE string into UTF-8 string. @@ -1971,6 +2468,15 @@ simdutf_warn_unused size_t convert_valid_utf16be_to_latin1( */ simdutf_warn_unused size_t convert_valid_utf16le_to_utf8( const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf16le_to_utf8( + std::span<char16_t> valid_utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_valid_utf16le_to_utf8( + valid_utf16_input.data(), valid_utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Convert valid UTF-16BE string into UTF-8 string. @@ -1987,6 +2493,15 @@ simdutf_warn_unused size_t convert_valid_utf16le_to_utf8( */ simdutf_warn_unused size_t convert_valid_utf16be_to_utf8( const char16_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf16be_to_utf8( + std::span<char16_t> valid_utf16_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_valid_utf16be_to_utf8( + valid_utf16_input.data(), valid_utf16_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Using native endianness, convert possibly broken UTF-16 string into UTF-32 @@ -2005,6 +2520,14 @@ simdutf_warn_unused size_t convert_valid_utf16be_to_utf8( */ simdutf_warn_unused size_t convert_utf16_to_utf32( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf16_to_utf32(std::span<const char16_t> utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_utf16_to_utf32(utf16_input.data(), utf16_input.size(), + utf32_output.data()); +} +#endif /** * Convert possibly broken UTF-16LE string into UTF-32 string. @@ -2022,6 +2545,14 @@ simdutf_warn_unused size_t convert_utf16_to_utf32( */ simdutf_warn_unused size_t convert_utf16le_to_utf32( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf16le_to_utf32(std::span<const char16_t> utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_utf16le_to_utf32(utf16_input.data(), utf16_input.size(), + utf32_output.data()); +} +#endif /** * Convert possibly broken UTF-16BE string into UTF-32 string. @@ -2039,6 +2570,14 @@ simdutf_warn_unused size_t convert_utf16le_to_utf32( */ simdutf_warn_unused size_t convert_utf16be_to_utf32( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf16be_to_utf32(std::span<const char16_t> utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_utf16be_to_utf32(utf16_input.data(), utf16_input.size(), + utf32_output.data()); +} +#endif /** * Using native endianness, convert possibly broken UTF-16 string into @@ -2059,6 +2598,14 @@ simdutf_warn_unused size_t convert_utf16be_to_utf32( */ simdutf_warn_unused result convert_utf16_to_utf32_with_errors( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16_to_utf32_with_errors(std::span<const char16_t> utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_utf16_to_utf32_with_errors( + utf16_input.data(), utf16_input.size(), utf32_output.data()); +} +#endif /** * Convert possibly broken UTF-16LE string into UTF-32 string and stop on error. @@ -2078,6 +2625,15 @@ simdutf_warn_unused result convert_utf16_to_utf32_with_errors( */ simdutf_warn_unused result convert_utf16le_to_utf32_with_errors( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16le_to_utf32_with_errors( + std::span<const char16_t> utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_utf16le_to_utf32_with_errors( + utf16_input.data(), utf16_input.size(), utf32_output.data()); +} +#endif /** * Convert possibly broken UTF-16BE string into UTF-32 string and stop on error. @@ -2097,6 +2653,15 @@ simdutf_warn_unused result convert_utf16le_to_utf32_with_errors( */ simdutf_warn_unused result convert_utf16be_to_utf32_with_errors( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf16be_to_utf32_with_errors( + std::span<const char16_t> utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_utf16be_to_utf32_with_errors( + utf16_input.data(), utf16_input.size(), utf32_output.data()); +} +#endif /** * Using native endianness, convert valid UTF-16 string into UTF-32 string. @@ -2114,6 +2679,14 @@ simdutf_warn_unused result convert_utf16be_to_utf32_with_errors( */ simdutf_warn_unused size_t convert_valid_utf16_to_utf32( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_valid_utf16_to_utf32(std::span<const char16_t> valid_utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_valid_utf16_to_utf32( + valid_utf16_input.data(), valid_utf16_input.size(), utf32_output.data()); +} +#endif /** * Convert valid UTF-16LE string into UTF-32 string. @@ -2130,6 +2703,14 @@ simdutf_warn_unused size_t convert_valid_utf16_to_utf32( */ simdutf_warn_unused size_t convert_valid_utf16le_to_utf32( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_valid_utf16le_to_utf32(std::span<const char16_t> valid_utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_valid_utf16le_to_utf32( + valid_utf16_input.data(), valid_utf16_input.size(), utf32_output.data()); +} +#endif /** * Convert valid UTF-16BE string into UTF-32 string. @@ -2146,8 +2727,16 @@ simdutf_warn_unused size_t convert_valid_utf16le_to_utf32( */ simdutf_warn_unused size_t convert_valid_utf16be_to_utf32( const char16_t *input, size_t length, char32_t *utf32_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_valid_utf16be_to_utf32(std::span<const char16_t> valid_utf16_input, + std::span<char32_t> utf32_output) noexcept { + return convert_valid_utf16be_to_utf32( + valid_utf16_input.data(), valid_utf16_input.size(), utf32_output.data()); +} +#endif -/* +/** * Compute the number of bytes that this UTF-16LE/BE string would require in * Latin1 format. * @@ -2174,6 +2763,13 @@ simdutf_warn_unused size_t latin1_length_from_utf16(size_t length) noexcept; */ simdutf_warn_unused size_t utf8_length_from_utf16(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +utf8_length_from_utf16(std::span<const char16_t> valid_utf16_input) noexcept { + return utf8_length_from_utf16(valid_utf16_input.data(), + valid_utf16_input.size()); +} +#endif /** * Compute the number of bytes that this UTF-16LE string would require in UTF-8 @@ -2188,6 +2784,13 @@ simdutf_warn_unused size_t utf8_length_from_utf16(const char16_t *input, */ simdutf_warn_unused size_t utf8_length_from_utf16le(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +utf8_length_from_utf16le(std::span<const char16_t> valid_utf16_input) noexcept { + return utf8_length_from_utf16le(valid_utf16_input.data(), + valid_utf16_input.size()); +} +#endif /** * Compute the number of bytes that this UTF-16BE string would require in UTF-8 @@ -2202,6 +2805,13 @@ simdutf_warn_unused size_t utf8_length_from_utf16le(const char16_t *input, */ simdutf_warn_unused size_t utf8_length_from_utf16be(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +utf8_length_from_utf16be(std::span<const char16_t> valid_utf16_input) noexcept { + return utf8_length_from_utf16be(valid_utf16_input.data(), + valid_utf16_input.size()); +} +#endif /** * Convert possibly broken UTF-32 string into UTF-8 string. @@ -2219,6 +2829,14 @@ simdutf_warn_unused size_t utf8_length_from_utf16be(const char16_t *input, simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf32_to_utf8( + std::span<const char32_t> utf32_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_utf32_to_utf8(utf32_input.data(), utf32_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Convert possibly broken UTF-32 string into UTF-8 string and stop on error. @@ -2238,6 +2856,16 @@ simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t *input, */ simdutf_warn_unused result convert_utf32_to_utf8_with_errors( const char32_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf32_to_utf8_with_errors( + std::span<const char32_t> utf32_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_utf32_to_utf8_with_errors( + utf32_input.data(), utf32_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Convert valid UTF-32 string into UTF-8 string. @@ -2254,6 +2882,15 @@ simdutf_warn_unused result convert_utf32_to_utf8_with_errors( */ simdutf_warn_unused size_t convert_valid_utf32_to_utf8( const char32_t *input, size_t length, char *utf8_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf32_to_utf8( + std::span<const char32_t> valid_utf32_input, + detail::output_span_of_byte_like auto &&utf8_output) noexcept { + return convert_valid_utf32_to_utf8( + valid_utf32_input.data(), valid_utf32_input.size(), + reinterpret_cast<char *>(utf8_output.data())); +} +#endif /** * Using native endianness, convert possibly broken UTF-32 string into a UTF-16 @@ -2271,6 +2908,14 @@ simdutf_warn_unused size_t convert_valid_utf32_to_utf8( */ simdutf_warn_unused size_t convert_utf32_to_utf16( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf32_to_utf16(std::span<const char32_t> utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf32_to_utf16(utf32_input.data(), utf32_input.size(), + utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-32 string into UTF-16LE string. @@ -2287,6 +2932,14 @@ simdutf_warn_unused size_t convert_utf32_to_utf16( */ simdutf_warn_unused size_t convert_utf32_to_utf16le( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf32_to_utf16le(std::span<const char32_t> utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf32_to_utf16le(utf32_input.data(), utf32_input.size(), + utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-32 string into Latin1 string. @@ -2304,6 +2957,15 @@ simdutf_warn_unused size_t convert_utf32_to_utf16le( */ simdutf_warn_unused size_t convert_utf32_to_latin1( const char32_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_utf32_to_latin1( + std::span<char32_t> utf32_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf32_to_latin1( + utf32_input.data(), utf32_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert possibly broken UTF-32 string into Latin1 string and stop on error. @@ -2324,6 +2986,16 @@ simdutf_warn_unused size_t convert_utf32_to_latin1( */ simdutf_warn_unused result convert_utf32_to_latin1_with_errors( const char32_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf32_to_latin1_with_errors( + std::span<char32_t> utf32_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_utf32_to_latin1_with_errors( + utf32_input.data(), utf32_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert valid UTF-32 string into Latin1 string. @@ -2347,6 +3019,15 @@ simdutf_warn_unused result convert_utf32_to_latin1_with_errors( */ simdutf_warn_unused size_t convert_valid_utf32_to_latin1( const char32_t *input, size_t length, char *latin1_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t convert_valid_utf32_to_latin1( + std::span<char32_t> valid_utf32_input, + detail::output_span_of_byte_like auto &&latin1_output) noexcept { + return convert_valid_utf32_to_latin1( + valid_utf32_input.data(), valid_utf32_input.size(), + reinterpret_cast<char *>(latin1_output.data())); +} +#endif /** * Convert possibly broken UTF-32 string into UTF-16BE string. @@ -2363,6 +3044,14 @@ simdutf_warn_unused size_t convert_valid_utf32_to_latin1( */ simdutf_warn_unused size_t convert_utf32_to_utf16be( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_utf32_to_utf16be(std::span<const char32_t> utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf32_to_utf16be(utf32_input.data(), utf32_input.size(), + utf16_output.data()); +} +#endif /** * Using native endianness, convert possibly broken UTF-32 string into UTF-16 @@ -2383,6 +3072,14 @@ simdutf_warn_unused size_t convert_utf32_to_utf16be( */ simdutf_warn_unused result convert_utf32_to_utf16_with_errors( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf32_to_utf16_with_errors(std::span<const char32_t> utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf32_to_utf16_with_errors( + utf32_input.data(), utf32_input.size(), utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-32 string into UTF-16LE string and stop on error. @@ -2402,6 +3099,15 @@ simdutf_warn_unused result convert_utf32_to_utf16_with_errors( */ simdutf_warn_unused result convert_utf32_to_utf16le_with_errors( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf32_to_utf16le_with_errors( + std::span<const char32_t> utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf32_to_utf16le_with_errors( + utf32_input.data(), utf32_input.size(), utf16_output.data()); +} +#endif /** * Convert possibly broken UTF-32 string into UTF-16BE string and stop on error. @@ -2421,6 +3127,15 @@ simdutf_warn_unused result convert_utf32_to_utf16le_with_errors( */ simdutf_warn_unused result convert_utf32_to_utf16be_with_errors( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result +convert_utf32_to_utf16be_with_errors( + std::span<const char32_t> utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_utf32_to_utf16be_with_errors( + utf32_input.data(), utf32_input.size(), utf16_output.data()); +} +#endif /** * Using native endianness, convert valid UTF-32 string into a UTF-16 string. @@ -2437,6 +3152,14 @@ simdutf_warn_unused result convert_utf32_to_utf16be_with_errors( */ simdutf_warn_unused size_t convert_valid_utf32_to_utf16( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_valid_utf32_to_utf16(std::span<const char32_t> valid_utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_valid_utf32_to_utf16( + valid_utf32_input.data(), valid_utf32_input.size(), utf16_output.data()); +} +#endif /** * Convert valid UTF-32 string into UTF-16LE string. @@ -2453,6 +3176,14 @@ simdutf_warn_unused size_t convert_valid_utf32_to_utf16( */ simdutf_warn_unused size_t convert_valid_utf32_to_utf16le( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_valid_utf32_to_utf16le(std::span<const char32_t> valid_utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_valid_utf32_to_utf16le( + valid_utf32_input.data(), valid_utf32_input.size(), utf16_output.data()); +} +#endif /** * Convert valid UTF-32 string into UTF-16BE string. @@ -2469,6 +3200,14 @@ simdutf_warn_unused size_t convert_valid_utf32_to_utf16le( */ simdutf_warn_unused size_t convert_valid_utf32_to_utf16be( const char32_t *input, size_t length, char16_t *utf16_buffer) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +convert_valid_utf32_to_utf16be(std::span<const char32_t> valid_utf32_input, + std::span<char16_t> utf16_output) noexcept { + return convert_valid_utf32_to_utf16be( + valid_utf32_input.data(), valid_utf32_input.size(), utf16_output.data()); +} +#endif /** * Change the endianness of the input. Can be used to go from UTF-16LE to @@ -2485,6 +3224,14 @@ simdutf_warn_unused size_t convert_valid_utf32_to_utf16be( */ void change_endianness_utf16(const char16_t *input, size_t length, char16_t *output) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline void +change_endianness_utf16(std::span<const char16_t> utf16_input, + std::span<char16_t> utf16_output) noexcept { + return change_endianness_utf16(utf16_input.data(), utf16_input.size(), + utf16_output.data()); +} +#endif /** * Compute the number of bytes that this UTF-32 string would require in UTF-8 @@ -2499,6 +3246,13 @@ void change_endianness_utf16(const char16_t *input, size_t length, */ simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +utf8_length_from_utf32(std::span<const char32_t> valid_utf32_input) noexcept { + return utf8_length_from_utf32(valid_utf32_input.data(), + valid_utf32_input.size()); +} +#endif /** * Compute the number of two-byte code units that this UTF-32 string would @@ -2513,6 +3267,13 @@ simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t *input, */ simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +utf16_length_from_utf32(std::span<const char32_t> valid_utf32_input) noexcept { + return utf16_length_from_utf32(valid_utf32_input.data(), + valid_utf32_input.size()); +} +#endif /** * Using native endianness; Compute the number of bytes that this UTF-16 @@ -2531,6 +3292,13 @@ simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t *input, */ simdutf_warn_unused size_t utf32_length_from_utf16(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +utf32_length_from_utf16(std::span<const char16_t> valid_utf16_input) noexcept { + return utf32_length_from_utf16(valid_utf16_input.data(), + valid_utf16_input.size()); +} +#endif /** * Compute the number of bytes that this UTF-16LE string would require in UTF-32 @@ -2549,6 +3317,13 @@ simdutf_warn_unused size_t utf32_length_from_utf16(const char16_t *input, */ simdutf_warn_unused size_t utf32_length_from_utf16le(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t utf32_length_from_utf16le( + std::span<const char16_t> valid_utf16_input) noexcept { + return utf32_length_from_utf16le(valid_utf16_input.data(), + valid_utf16_input.size()); +} +#endif /** * Compute the number of bytes that this UTF-16BE string would require in UTF-32 @@ -2567,6 +3342,13 @@ simdutf_warn_unused size_t utf32_length_from_utf16le(const char16_t *input, */ simdutf_warn_unused size_t utf32_length_from_utf16be(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t utf32_length_from_utf16be( + std::span<const char16_t> valid_utf16_input) noexcept { + return utf32_length_from_utf16be(valid_utf16_input.data(), + valid_utf16_input.size()); +} +#endif /** * Count the number of code points (characters) in the string assuming that @@ -2584,6 +3366,12 @@ simdutf_warn_unused size_t utf32_length_from_utf16be(const char16_t *input, */ simdutf_warn_unused size_t count_utf16(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +count_utf16(std::span<const char16_t> valid_utf16_input) noexcept { + return count_utf16(valid_utf16_input.data(), valid_utf16_input.size()); +} +#endif /** * Count the number of code points (characters) in the string assuming that @@ -2601,6 +3389,12 @@ simdutf_warn_unused size_t count_utf16(const char16_t *input, */ simdutf_warn_unused size_t count_utf16le(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +count_utf16le(std::span<const char16_t> valid_utf16_input) noexcept { + return count_utf16le(valid_utf16_input.data(), valid_utf16_input.size()); +} +#endif /** * Count the number of code points (characters) in the string assuming that @@ -2618,6 +3412,12 @@ simdutf_warn_unused size_t count_utf16le(const char16_t *input, */ simdutf_warn_unused size_t count_utf16be(const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +count_utf16be(std::span<const char16_t> valid_utf16_input) noexcept { + return count_utf16be(valid_utf16_input.data(), valid_utf16_input.size()); +} +#endif /** * Count the number of code points (characters) in the string assuming that @@ -2633,6 +3433,13 @@ simdutf_warn_unused size_t count_utf16be(const char16_t *input, */ simdutf_warn_unused size_t count_utf8(const char *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t count_utf8( + const detail::input_span_of_byte_like auto &valid_utf8_input) noexcept { + return count_utf8(reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size()); +} +#endif /** * Given a valid UTF-8 string having a possibly truncated last character, @@ -2649,6 +3456,14 @@ simdutf_warn_unused size_t count_utf8(const char *input, * @return the length of the string in bytes, possibly shorter by 1 to 3 bytes */ simdutf_warn_unused size_t trim_partial_utf8(const char *input, size_t length); +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t trim_partial_utf8( + const detail::input_span_of_byte_like auto &valid_utf8_input) noexcept { + return trim_partial_utf8( + reinterpret_cast<const char *>(valid_utf8_input.data()), + valid_utf8_input.size()); +} +#endif /** * Given a valid UTF-16BE string having a possibly truncated last character, @@ -2666,6 +3481,13 @@ simdutf_warn_unused size_t trim_partial_utf8(const char *input, size_t length); */ simdutf_warn_unused size_t trim_partial_utf16be(const char16_t *input, size_t length); +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +trim_partial_utf16be(std::span<const char16_t> valid_utf16_input) noexcept { + return trim_partial_utf16be(valid_utf16_input.data(), + valid_utf16_input.size()); +} +#endif /** * Given a valid UTF-16LE string having a possibly truncated last character, @@ -2683,6 +3505,13 @@ simdutf_warn_unused size_t trim_partial_utf16be(const char16_t *input, */ simdutf_warn_unused size_t trim_partial_utf16le(const char16_t *input, size_t length); +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +trim_partial_utf16le(std::span<const char16_t> valid_utf16_input) noexcept { + return trim_partial_utf16le(valid_utf16_input.data(), + valid_utf16_input.size()); +} +#endif /** * Given a valid UTF-16 string having a possibly truncated last character, @@ -2700,8 +3529,17 @@ simdutf_warn_unused size_t trim_partial_utf16le(const char16_t *input, */ simdutf_warn_unused size_t trim_partial_utf16(const char16_t *input, size_t length); +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +trim_partial_utf16(std::span<const char16_t> valid_utf16_input) noexcept { + return trim_partial_utf16(valid_utf16_input.data(), valid_utf16_input.size()); +} +#endif // base64_options are used to specify the base64 encoding options. +// ASCII spaces are ' ', '\t', '\n', '\r', '\f' +// garbage characters are characters that are not part of the base64 alphabet +// nor ASCII spaces. enum base64_options : uint64_t { base64_default = 0, /* standard base64 format (with padding) */ base64_url = 1, /* base64url format (no padding) */ @@ -2711,6 +3549,10 @@ enum base64_options : uint64_t { base64_reverse_padding, /* standard base64 format without padding */ base64_url_with_padding = base64_url | base64_reverse_padding, /* base64url with padding */ + base64_default_accept_garbage = + 4, /* standard base64 format accepting garbage characters */ + base64_url_accept_garbage = + 5, /* base64url format accepting garbage characters */ }; // last_chunk_handling_options are used to specify the handling of the last @@ -2735,6 +3577,14 @@ enum last_chunk_handling_options : uint64_t { */ simdutf_warn_unused size_t maximal_binary_length_from_base64(const char *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +maximal_binary_length_from_base64( + const detail::input_span_of_byte_like auto &input) noexcept { + return maximal_binary_length_from_base64( + reinterpret_cast<const char *>(input.data()), input.size()); +} +#endif /** * Provide the maximal binary length in bytes given the base64 input. @@ -2748,6 +3598,12 @@ maximal_binary_length_from_base64(const char *input, size_t length) noexcept; */ simdutf_warn_unused size_t maximal_binary_length_from_base64( const char16_t *input, size_t length) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +maximal_binary_length_from_base64(std::span<const char16_t> input) noexcept { + return maximal_binary_length_from_base64(input.data(), input.size()); +} +#endif /** * Convert a base64 input to a binary output. @@ -2807,6 +3663,18 @@ simdutf_warn_unused result base64_to_binary( const char *input, size_t length, char *output, base64_options options = base64_default, last_chunk_handling_options last_chunk_options = loose) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result base64_to_binary( + const detail::input_span_of_byte_like auto &input, + detail::output_span_of_byte_like auto &&binary_output, + base64_options options = base64_default, + last_chunk_handling_options last_chunk_options = loose) noexcept { + return base64_to_binary(reinterpret_cast<const char *>(input.data()), + input.size(), + reinterpret_cast<char *>(binary_output.data()), + options, last_chunk_options); +} +#endif /** * Provide the base64 length in bytes given the length of a binary input. @@ -2840,6 +3708,16 @@ simdutf_warn_unused size_t base64_length_from_binary( */ size_t binary_to_base64(const char *input, size_t length, char *output, base64_options options = base64_default) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused size_t +binary_to_base64(const detail::input_span_of_byte_like auto &input, + detail::output_span_of_byte_like auto &&binary_output, + base64_options options = base64_default) noexcept { + return binary_to_base64( + reinterpret_cast<const char *>(input.data()), input.size(), + reinterpret_cast<char *>(binary_output.data()), options); +} +#endif /** * Convert a base64 input to a binary output. @@ -2902,6 +3780,17 @@ base64_to_binary(const char16_t *input, size_t length, char *output, base64_options options = base64_default, last_chunk_handling_options last_chunk_options = last_chunk_handling_options::loose) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result base64_to_binary( + std::span<const char16_t> input, + detail::output_span_of_byte_like auto &&binary_output, + base64_options options = base64_default, + last_chunk_handling_options last_chunk_options = loose) noexcept { + return base64_to_binary(input.data(), input.size(), + reinterpret_cast<char *>(binary_output.data()), + options, last_chunk_options); +} +#endif /** * Convert a base64 input to a binary output. @@ -2969,11 +3858,43 @@ base64_to_binary_safe(const char *input, size_t length, char *output, size_t &outlen, base64_options options = base64_default, last_chunk_handling_options last_chunk_options = last_chunk_handling_options::loose) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result base64_to_binary_safe( + const detail::input_span_of_byte_like auto &input, + detail::output_span_of_byte_like auto &&binary_output, + base64_options options = base64_default, + last_chunk_handling_options last_chunk_options = loose) noexcept { + // we can't write the outlen to the provided output span, the user will have + // to pick it up from the returned value instead (assuming success). we still + // get the benefit of providing info of how long the output buffer is. + size_t outlen = binary_output.size(); + return base64_to_binary_safe(reinterpret_cast<const char *>(input.data()), + input.size(), + reinterpret_cast<char *>(binary_output.data()), + outlen, options, last_chunk_options); +} +#endif + simdutf_warn_unused result base64_to_binary_safe(const char16_t *input, size_t length, char *output, size_t &outlen, base64_options options = base64_default, last_chunk_handling_options last_chunk_options = last_chunk_handling_options::loose) noexcept; +#if SIMDUTF_SPAN +simdutf_really_inline simdutf_warn_unused result base64_to_binary_safe( + std::span<const char16_t> input, + detail::output_span_of_byte_like auto &&binary_output, + base64_options options = base64_default, + last_chunk_handling_options last_chunk_options = loose) noexcept { + // we can't write the outlen to the provided output span, the user will have + // to pick it up from the returned value instead (assuming success). we still + // get the benefit of providing info of how long the output buffer is. + size_t outlen = binary_output.size(); + return base64_to_binary_safe(input.data(), input.size(), + reinterpret_cast<char *>(binary_output.data()), + outlen, options, last_chunk_options); +} +#endif /** * An implementation of simdutf for a particular CPU architecture. @@ -4236,7 +5157,7 @@ class implementation { simdutf_warn_unused virtual size_t latin1_length_from_utf8(const char *input, size_t length) const noexcept = 0; - /* + /** * Compute the number of bytes that this UTF-16LE/BE string would require in * Latin1 format. * @@ -4282,7 +5203,7 @@ class implementation { simdutf_warn_unused virtual size_t utf32_length_from_latin1(size_t length) const noexcept = 0; - /* + /** * Compute the number of bytes that this UTF-16LE string would require in * UTF-32 format. * @@ -4303,7 +5224,7 @@ class implementation { utf32_length_from_utf16le(const char16_t *input, size_t length) const noexcept = 0; - /* + /** * Compute the number of bytes that this UTF-16BE string would require in * UTF-32 format. * diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni index 7a73f891e3fc32..348d2f0703e47c 100644 --- a/deps/uv/unofficial.gni +++ b/deps/uv/unofficial.gni @@ -7,6 +7,11 @@ template("uv_gn_build") { config("uv_external_config") { include_dirs = [ "include" ] + if (is_clang || !is_win) { + cflags_cc = [ + "-Wno-deprecated-pragma", # for using ENODATA in errno.h + ] + } } config("uv_internal_config") { diff --git a/deps/v8/src/codegen/riscv/cpu-riscv.cc b/deps/v8/src/codegen/riscv/cpu-riscv.cc index 205e13fa988cac..143602dfb663c7 100644 --- a/deps/v8/src/codegen/riscv/cpu-riscv.cc +++ b/deps/v8/src/codegen/riscv/cpu-riscv.cc @@ -15,12 +15,12 @@ namespace internal { void CpuFeatures::FlushICache(void* start, size_t size) { #if !defined(USE_SIMULATOR) char* end = reinterpret_cast<char*>(start) + size; - // The definition of this syscall is - // SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, - // uintptr_t, end, uintptr_t, flags) - // The flag here is set to be SYS_RISCV_FLUSH_ICACHE_LOCAL, which is - // defined as 1 in the Linux kernel. - syscall(SYS_riscv_flush_icache, start, end, 1); + // SYS_riscv_flush_icache is a symbolic constant used in user-space code to + // identify the flush_icache system call, while __NR_riscv_flush_icache is the + // corresponding system call number used in the kernel to dispatch the system + // call. + // The flag set to zero will flush all cpu cores. + syscall(__NR_riscv_flush_icache, start, end, 0); #endif // !USE_SIMULATOR. } diff --git a/doc/api/assert.md b/doc/api/assert.md index c0a16bd957822f..847dfcfd74c742 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -799,8 +799,10 @@ are recursively evaluated also by the following rules. * [`Map`][] keys and [`Set`][] items are compared unordered. * Recursion stops when both sides differ or both sides encounter a circular reference. -* [`WeakMap`][] and [`WeakSet`][] comparison does not rely on their values. See - below for further details. +* [`WeakMap`][] and [`WeakSet`][] instances are **not** compared structurally. + They are only equal if they reference the same object. Any comparison between + different `WeakMap` or `WeakSet` instances will result in inequality, + even if they contain the same entries. * [`RegExp`][] lastIndex, flags, and source are always compared, even if these are not enumerable properties. @@ -877,23 +879,41 @@ assert.deepStrictEqual({ [symbol1]: 1 }, { [symbol2]: 1 }); // } const weakMap1 = new WeakMap(); -const weakMap2 = new WeakMap([[{}, {}]]); -const weakMap3 = new WeakMap(); -weakMap3.unequal = true; +const weakMap2 = new WeakMap(); +const obj = {}; +weakMap1.set(obj, 'value'); +weakMap2.set(obj, 'value'); + +// Comparing different instances fails, even with same contents assert.deepStrictEqual(weakMap1, weakMap2); -// OK, because it is impossible to compare the entries +// AssertionError: Values have same structure but are not reference-equal: +// +// WeakMap { +// <items unknown> +// } -// Fails because weakMap3 has a property that weakMap1 does not contain: -assert.deepStrictEqual(weakMap1, weakMap3); -// AssertionError: Expected inputs to be strictly deep-equal: +// Comparing the same instance to itself succeeds +assert.deepStrictEqual(weakMap1, weakMap1); +// OK + +const weakSet1 = new WeakSet(); +const weakSet2 = new WeakSet(); +weakSet1.add(obj); +weakSet2.add(obj); + +// Comparing different instances fails, even with same contents +assert.deepStrictEqual(weakSet1, weakSet2); +// AssertionError: Values have same structure but are not reference-equal: // + actual - expected // -// WeakMap { -// + [items unknown] -// - [items unknown], -// - unequal: true -// } +// WeakSet { +// <items unknown> +// } + +// Comparing the same instance to itself succeeds +assert.deepStrictEqual(weakSet1, weakSet1); +// OK ``` ```cjs @@ -969,23 +989,41 @@ assert.deepStrictEqual({ [symbol1]: 1 }, { [symbol2]: 1 }); // } const weakMap1 = new WeakMap(); -const weakMap2 = new WeakMap([[{}, {}]]); -const weakMap3 = new WeakMap(); -weakMap3.unequal = true; +const weakMap2 = new WeakMap(); +const obj = {}; +weakMap1.set(obj, 'value'); +weakMap2.set(obj, 'value'); + +// Comparing different instances fails, even with same contents assert.deepStrictEqual(weakMap1, weakMap2); -// OK, because it is impossible to compare the entries +// AssertionError: Values have same structure but are not reference-equal: +// +// WeakMap { +// <items unknown> +// } -// Fails because weakMap3 has a property that weakMap1 does not contain: -assert.deepStrictEqual(weakMap1, weakMap3); -// AssertionError: Expected inputs to be strictly deep-equal: +// Comparing the same instance to itself succeeds +assert.deepStrictEqual(weakMap1, weakMap1); +// OK + +const weakSet1 = new WeakSet(); +const weakSet2 = new WeakSet(); +weakSet1.add(obj); +weakSet2.add(obj); + +// Comparing different instances fails, even with same contents +assert.deepStrictEqual(weakSet1, weakSet2); +// AssertionError: Values have same structure but are not reference-equal: // + actual - expected // -// WeakMap { -// + [items unknown] -// - [items unknown], -// - unequal: true -// } +// WeakSet { +// <items unknown> +// } + +// Comparing the same instance to itself succeeds +assert.deepStrictEqual(weakSet1, weakSet1); +// OK ``` If the values are not equal, an [`AssertionError`][] is thrown with a `message` diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 7d5f6c52e5af71..f3c4bf9e0e8f9a 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -536,7 +536,7 @@ changes: * `options` {Object} * `cwd` {string|URL} Current working directory of the child process. * `detached` {boolean} Prepare child process to run independently of its - parent process. Specific behavior depends on the platform, see + parent process. Specific behavior depends on the platform (see [`options.detached`][]). * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `execPath` {string} Executable used to create the child process. @@ -688,7 +688,7 @@ changes: * `stdio` {Array|string} Child's stdio configuration (see [`options.stdio`][`stdio`]). * `detached` {boolean} Prepare child process to run independently of - its parent process. Specific behavior depends on the platform, see + its parent process. Specific behavior depends on the platform (see [`options.detached`][]). * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). diff --git a/doc/api/cli.md b/doc/api/cli.md index df7031f65d44f9..85920e71be2cc5 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -801,6 +801,8 @@ in the file, the value from the environment takes precedence. You can pass multiple `--env-file` arguments. Subsequent files override pre-existing variables defined in previous files. +An error is thrown if the file does not exist. + ```bash node --env-file=.env --env-file=.development.env index.js ``` @@ -840,6 +842,9 @@ Export keyword before a key is ignored: export USERNAME="nodejs" # will result in `nodejs` as the value. ``` +If you want to load environment variables from a file that may not exist, you +can use the [`--env-file-if-exists`][] flag instead. + ### `-e`, `--eval "script"` <!-- YAML @@ -887,38 +892,6 @@ files with no extension will be treated as WebAssembly if they begin with the WebAssembly magic number (`\0asm`); otherwise they will be treated as ES module JavaScript. -### `--experimental-detect-module` - -<!-- YAML -added: - - v20.10.0 ---> - -> Stability: 1.1 - Active development - -Node.js will inspect the source code of ambiguous input to determine whether it -contains ES module syntax; if such syntax is detected, the input will be treated -as an ES module. - -Ambiguous input is defined as: - -* Files with a `.js` extension or no extension; and either no controlling - `package.json` file or one that lacks a `type` field; and - `--experimental-default-type` is not specified. -* String input (`--eval` or STDIN) when neither `--input-type` nor - `--experimental-default-type` are specified. - -ES module syntax is defined as syntax that would throw when evaluated as -CommonJS. This includes the following: - -* `import` statements (but _not_ `import()` expressions, which are valid in - CommonJS). -* `export` statements. -* `import.meta` references. -* `await` at the top level of a module. -* Lexical redeclarations of the CommonJS wrapper variables (`require`, `module`, - `exports`, `__dirname`, `__filename`). - ### `--experimental-eventsource` <!-- YAML @@ -1024,7 +997,13 @@ Use the specified file as a security policy. ### `--experimental-require-module` <!-- YAML -added: v20.17.0 +added: + - v22.0.0 + - v20.17.0 +changes: + - version: v20.19.0 + pr-url: https://github.com/nodejs/node/pull/55085 + description: This is now true by default. --> > Stability: 1.1 - Active Development @@ -1540,6 +1519,21 @@ added: v0.8.0 Silence deprecation warnings. +### `--no-experimental-detect-module` + +<!-- YAML +added: + - v21.1.0 + - v20.10.0 +changes: + - version: + - v20.19.0 + pr-url: https://github.com/nodejs/node/pull/53619 + description: Syntax detection is enabled by default. +--> + +Disable using [syntax detection][] to determine module type. + ### `--no-experimental-fetch` <!-- YAML @@ -1572,6 +1566,24 @@ added: v16.6.0 Use this flag to disable top-level await in REPL. +### `--no-experimental-require-module` + +<!-- YAML +added: + - v22.0.0 + - v20.17.0 +changes: + - version: v20.19.0 + pr-url: https://github.com/nodejs/node/pull/55085 + description: This is now false by default. +--> + +> Stability: 1.1 - Active Development + +Disable support for loading a synchronous ES module graph in `require()`. + +See [Loading ECMAScript modules using `require()`][]. + ### `--no-extra-info-on-fatal-exception` <!-- YAML @@ -1671,6 +1683,17 @@ is being linked to Node.js. Sharing the OpenSSL configuration may have unwanted implications and it is recommended to use a configuration section specific to Node.js which is `nodejs_conf` and is default when this option is not used. +### `--env-file-if-exists=config` + +<!-- YAML +added: v20.19.0 +--> + +> Stability: 1.1 - Active development + +Behavior is the same as [`--env-file`][], but an error is not thrown if the file +does not exist. + ### `--pending-deprecation` <!-- YAML @@ -1781,9 +1804,7 @@ Identical to `-e` but prints the result. added: v20.17.0 --> -This flag is only useful when `--experimental-require-module` is enabled. - -If the ES module being `require()`'d contains top-level await, this flag +If the ES module being `require()`'d contains top-level `await`, this flag allows Node.js to evaluate the module, try to locate the top-level awaits, and print their location to help users find them. @@ -2382,6 +2403,18 @@ added: Prints a stack trace whenever an environment is exited proactively, i.e. invoking `process.exit()`. +### `--trace-require-module=mode` + +<!-- YAML +added: + - v20.19.0 +--> + +Prints information about usage of [Loading ECMAScript modules using `require()`][]. + +When `mode` is `all`, all usage is printed. When `mode` is `no-node-modules`, usage +from the `node_modules` folder is excluded. + ### `--trace-sigint` <!-- YAML @@ -2860,6 +2893,7 @@ one is included in the list below. * `--trace-event-file-pattern` * `--trace-events-enabled` * `--trace-exit` +* `--trace-require-module` * `--trace-sigint` * `--trace-sync-io` * `--trace-tls` @@ -3336,6 +3370,8 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12 [`--build-snapshot`]: #--build-snapshot [`--cpu-prof-dir`]: #--cpu-prof-dir [`--diagnostic-dir`]: #--diagnostic-dirdirectory +[`--env-file-if-exists`]: #--env-file-if-existsconfig +[`--env-file`]: #--env-fileconfig [`--experimental-default-type=module`]: #--experimental-default-typetype [`--experimental-sea-config`]: single-executable-applications.md#generating-single-executable-preparation-blobs [`--experimental-wasm-modules`]: #--experimental-wasm-modules @@ -3384,6 +3420,7 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12 [security warning]: #warning-binding-inspector-to-a-public-ipport-combination-is-insecure [semi-space]: https://www.memorymanagement.org/glossary/s.html#semi.space [single executable application]: single-executable-applications.md +[syntax detection]: packages.md#syntax-detection [test reporters]: test.md#test-reporters [timezone IDs]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones [tracking issue for user-land snapshots]: https://github.com/nodejs/node/issues/44014 diff --git a/doc/api/errors.md b/doc/api/errors.md index b07ed9a740a228..d6ead7e2b07bd7 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -2535,8 +2535,8 @@ object. > Stability: 1 - Experimental -When trying to `require()` a [ES Module][] under `--experimental-require-module`, -a CommonJS to ESM or ESM to CommonJS edge participates in an immediate cycle. +When trying to `require()` a [ES Module][], a CommonJS to ESM or ESM to CommonJS edge +participates in an immediate cycle. This is not allowed because ES Modules cannot be evaluated while they are already being evaluated. @@ -2550,8 +2550,8 @@ module, and should be done lazily in an inner function. > Stability: 1 - Experimental -When trying to `require()` a [ES Module][] under `--experimental-require-module`, -the module turns out to be asynchronous. That is, it contains top-level await. +When trying to `require()` a [ES Module][], the module turns out to be asynchronous. +That is, it contains top-level await. To see where the top-level await is, use `--experimental-print-required-tla` (this would execute the modules @@ -2561,12 +2561,20 @@ before looking for the top-level awaits). ### `ERR_REQUIRE_ESM` -> Stability: 1 - Experimental +<!-- YAML +changes: + - version: v20.19.0 + pr-url: https://github.com/nodejs/node/pull/55085 + description: require() now supports loading synchronous ES modules by default. +--> + +> Stability: 0 - Deprecated An attempt was made to `require()` an [ES Module][]. -To enable `require()` for synchronous module graphs (without -top-level `await`), use `--experimental-require-module`. +This error has been deprecated since `require()` now supports loading synchronous +ES modules. When `require()` encounters an ES module that contains top-level +`await`, it will throw [`ERR_REQUIRE_ASYNC_MODULE`][] instead. <a id="ERR_SCRIPT_EXECUTION_INTERRUPTED"></a> @@ -2778,25 +2786,6 @@ An unspecified or non-specific system error has occurred within the Node.js process. The error object will have an `err.info` object property with additional details. -<a id="ERR_TAP_LEXER_ERROR"></a> - -### `ERR_TAP_LEXER_ERROR` - -An error representing a failing lexer state. - -<a id="ERR_TAP_PARSER_ERROR"></a> - -### `ERR_TAP_PARSER_ERROR` - -An error representing a failing parser state. Additional information about -the token causing the error is available via the `cause` property. - -<a id="ERR_TAP_VALIDATION_ERROR"></a> - -### `ERR_TAP_VALIDATION_ERROR` - -This error represents a failed TAP validation. - <a id="ERR_TEST_FAILURE"></a> ### `ERR_TEST_FAILURE` @@ -3205,6 +3194,54 @@ The `Worker` instance terminated because it reached its memory limit. The path for the main script of a worker is neither an absolute path nor a relative path starting with `./` or `../`. +<a id="ERR_WORKER_MESSAGING_ERRORED"></a> + +### `ERR_WORKER_MESSAGING_ERRORED` + +<!-- YAML +added: v20.19.0 +--> + +> Stability: 1.1 - Active development + +The destination thread threw an error while processing a message sent via [`postMessageToThread()`][]. + +<a id="ERR_WORKER_MESSAGING_FAILED"></a> + +### `ERR_WORKER_MESSAGING_FAILED` + +<!-- YAML +added: v20.19.0 +--> + +> Stability: 1.1 - Active development + +The thread requested in [`postMessageToThread()`][] is invalid or has no `workerMessage` listener. + +<a id="ERR_WORKER_MESSAGING_SAME_THREAD"></a> + +### `ERR_WORKER_MESSAGING_SAME_THREAD` + +<!-- YAML +added: v20.19.0 +--> + +> Stability: 1.1 - Active development + +The thread id requested in [`postMessageToThread()`][] is the current thread id. + +<a id="ERR_WORKER_MESSAGING_TIMEOUT"></a> + +### `ERR_WORKER_MESSAGING_TIMEOUT` + +<!-- YAML +added: v20.19.0 +--> + +> Stability: 1.1 - Active development + +Sending a message via [`postMessageToThread()`][] timed out. + <a id="ERR_WORKER_UNSERIALIZABLE_ERROR"></a> ### `ERR_WORKER_UNSERIALIZABLE_ERROR` @@ -3552,6 +3589,25 @@ removed: v10.0.0 Used when an attempt is made to use a readable stream that has not implemented [`readable._read()`][]. +<a id="ERR_TAP_LEXER_ERROR"></a> + +### `ERR_TAP_LEXER_ERROR` + +An error representing a failing lexer state. + +<a id="ERR_TAP_PARSER_ERROR"></a> + +### `ERR_TAP_PARSER_ERROR` + +An error representing a failing parser state. Additional information about +the token causing the error is available via the `cause` property. + +<a id="ERR_TAP_VALIDATION_ERROR"></a> + +### `ERR_TAP_VALIDATION_ERROR` + +This error represents a failed TAP validation. + <a id="ERR_TLS_RENEGOTIATION_FAILED"></a> ### `ERR_TLS_RENEGOTIATION_FAILED` @@ -3908,6 +3964,7 @@ An error occurred trying to allocate memory. This should never happen. [`ERR_INVALID_ARG_TYPE`]: #err_invalid_arg_type [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`]: #err_missing_message_port_in_transfer_list [`ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST`]: #err_missing_transferable_in_transfer_list +[`ERR_REQUIRE_ASYNC_MODULE`]: #err_require_async_module [`EventEmitter`]: events.md#class-eventemitter [`MessagePort`]: worker_threads.md#class-messageport [`Object.getPrototypeOf`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf @@ -3945,6 +4002,7 @@ An error occurred trying to allocate memory. This should never happen. [`new URLSearchParams(iterable)`]: url.md#new-urlsearchparamsiterable [`package.json`]: packages.md#nodejs-packagejson-field-definitions [`postMessage()`]: worker_threads.md#portpostmessagevalue-transferlist +[`postMessageToThread()`]: worker_threads.md#workerpostmessagetothreadthreadid-value-transferlist-timeout [`process.on('exit')`]: process.md#event-exit [`process.send()`]: process.md#processsendmessage-sendhandle-options-callback [`process.setUncaughtExceptionCaptureCallback()`]: process.md#processsetuncaughtexceptioncapturecallbackfn diff --git a/doc/api/esm.md b/doc/api/esm.md index 2419c64c2084f0..3100d5756cd0c2 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -450,7 +450,7 @@ compatibility. ### `require` The CommonJS module `require` currently only supports loading synchronous ES -modules when `--experimental-require-module` is enabled. +modules (that is, ES modules that do not use top-level `await`). See [Loading ECMAScript modules using `require()`][] for details. @@ -1071,8 +1071,7 @@ _isImports_, _conditions_) > 10. If _url_ ends in _".js"_, then > 1. If _packageType_ is not **null**, then > 1. Return _packageType_. -> 2. If `--experimental-detect-module` is enabled and the result of -> **DETECT\_MODULE\_SYNTAX**(_source_) is true, then +> 2. If the result of **DETECT\_MODULE\_SYNTAX**(_source_) is true, then > 1. Return _"module"_. > 3. Return _"commonjs"_. > 11. If _url_ does not have any extension, then @@ -1082,8 +1081,7 @@ _isImports_, _conditions_) > 1. Return _"wasm"_. > 2. If _packageType_ is not **null**, then > 1. Return _packageType_. -> 3. If `--experimental-detect-module` is enabled and the source of -> module contains static import or export syntax, then +> 3. If the result of **DETECT\_MODULE\_SYNTAX**(_source_) is true, then > 1. Return _"module"_. > 4. Return _"commonjs"_. > 12. Return **undefined** (will throw during load phase). diff --git a/doc/api/module.md b/doc/api/module.md index 8cd718ab8d8093..ee7fda4ddf8654 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -1033,6 +1033,13 @@ added: #### `new SourceMap(payload[, { lineLengths }])` +<!-- YAML +changes: + - version: v20.5.0 + pr-url: https://github.com/nodejs/node/pull/48461 + description: Add support for `lineLengths`. +--> + * `payload` {Object} * `lineLengths` {number\[]} @@ -1095,6 +1102,10 @@ columnNumber)` #### `sourceMap.findOrigin(lineNumber, columnNumber)` +<!-- YAML +added: v20.4.0 +--> + * `lineNumber` {number} The 1-indexed line number of the call site in the generated source * `columnNumber` {number} The 1-indexed column number diff --git a/doc/api/modules.md b/doc/api/modules.md index 8b5840d88778e4..3c0c87ff662014 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -171,64 +171,161 @@ relative, and based on the real path of the files making the calls to ## Loading ECMAScript modules using `require()` <!-- YAML -added: v20.17.0 +added: + - v22.0.0 + - v20.17.0 +changes: + - version: + - v20.19.0 + pr-url: https://github.com/nodejs/node/pull/56194 + description: This feature no longer emits an experimental warning by default, + though the warning can still be emitted by --trace-require-module. + - version: + - v20.19.0 + pr-url: https://github.com/nodejs/node/pull/55085 + description: This feature is no longer behind the `--experimental-require-module` CLI flag. + - version: v20.19.0 + pr-url: https://github.com/nodejs/node/pull/54563 + description: Support `'module.exports'` interop export in `require(esm)`. --> -> Stability: 1.1 - Active Development. Enable this API with the -> [`--experimental-require-module`][] CLI flag. +> Stability: 1.2 - Release candidate The `.mjs` extension is reserved for [ECMAScript Modules][]. -Currently, if the flag `--experimental-require-module` is not used, loading -an ECMAScript module using `require()` will throw a [`ERR_REQUIRE_ESM`][] -error, and users need to use [`import()`][] instead. See -[Determining module system][] section for more info +See [Determining module system][] section for more info regarding which files are parsed as ECMAScript modules. -If `--experimental-require-module` is enabled, and the ECMAScript module being -loaded by `require()` meets the following requirements: +`require()` only supports loading ECMAScript modules that meet the following requirements: -* Explicitly marked as an ES module with a `"type": "module"` field in - the closest package.json or a `.mjs` extension. -* Fully synchronous (contains no top-level `await`). +* The module is fully synchronous (contains no top-level `await`); and +* One of these conditions are met: + 1. The file has a `.mjs` extension. + 2. The file has a `.js` extension, and the closest `package.json` contains `"type": "module"` + 3. The file has a `.js` extension, the closest `package.json` does not contain + `"type": "commonjs"`, and the module contains ES module syntax. -`require()` will load the requested module as an ES Module, and return -the module name space object. In this case it is similar to dynamic +If the ES Module being loaded meet the requirements, `require()` can load it and +return the module namespace object. In this case it is similar to dynamic `import()` but is run synchronously and returns the name space object directly. +With the following ES Modules: + ```mjs -// point.mjs +// distance.mjs export function distance(a, b) { return (b.x - a.x) ** 2 + (b.y - a.y) ** 2; } -class Point { +``` + +```mjs +// point.mjs +export default class Point { constructor(x, y) { this.x = x; this.y = y; } } -export default Point; ``` +A CommonJS module can load them with `require()`: + ```cjs -const required = require('./point.mjs'); +const distance = require('./distance.mjs'); +console.log(distance); // [Module: null prototype] { -// default: [class Point], // distance: [Function: distance] // } -console.log(required); -(async () => { - const imported = await import('./point.mjs'); - console.log(imported === required); // true -})(); +const point = require('./point.mjs'); +console.log(point); +// [Module: null prototype] { +// default: [class Point], +// __esModule: true, +// } +``` + +For interoperability with existing tools that convert ES Modules into CommonJS, +which could then load real ES Modules through `require()`, the returned namespace +would contain a `__esModule: true` property if it has a `default` export so that +consuming code generated by tools can recognize the default exports in real +ES Modules. If the namespace already defines `__esModule`, this would not be added. +This property is experimental and can change in the future. It should only be used +by tools converting ES modules into CommonJS modules, following existing ecosystem +conventions. Code authored directly in CommonJS should avoid depending on it. + +When a ES Module contains both named exports and a default export, the result returned by `require()` +is the module namespace object, which places the default export in the `.default` property, similar to +the results returned by `import()`. +To customize what should be returned by `require(esm)` directly, the ES Module can export the +desired value using the string name `"module.exports"`. + +<!-- eslint-disable @stylistic/js/semi --> + +```mjs +// point.mjs +export default class Point { + constructor(x, y) { this.x = x; this.y = y; } +} + +// `distance` is lost to CommonJS consumers of this module, unless it's +// added to `Point` as a static property. +export function distance(a, b) { return (b.x - a.x) ** 2 + (b.y - a.y) ** 2; } +export { Point as 'module.exports' } +``` + +<!-- eslint-disable node-core/no-duplicate-requires --> + +```cjs +const Point = require('./point.mjs'); +console.log(Point); // [class Point] + +// Named exports are lost when 'module.exports' is used +const { distance } = require('./point.mjs'); +console.log(distance); // undefined +``` + +Notice in the example above, when the `module.exports` export name is used, named exports +will be lost to CommonJS consumers. To allow CommonJS consumers to continue accessing +named exports, the module can make sure that the default export is an object with the +named exports attached to it as properties. For example with the example above, +`distance` can be attached to the default export, the `Point` class, as a static method. + +<!-- eslint-disable @stylistic/js/semi --> + +```mjs +export function distance(a, b) { return (b.x - a.x) ** 2 + (b.y - a.y) ** 2; } + +export default class Point { + constructor(x, y) { this.x = x; this.y = y; } + static distance = distance; +} + +export { Point as 'module.exports' } +``` + +<!-- eslint-disable node-core/no-duplicate-requires --> + +```cjs +const Point = require('./point.mjs'); +console.log(Point); // [class Point] + +const { distance } = require('./point.mjs'); +console.log(distance); // [Function: distance] ``` If the module being `require()`'d contains top-level `await`, or the module graph it `import`s contains top-level `await`, [`ERR_REQUIRE_ASYNC_MODULE`][] will be thrown. In this case, users should -load the asynchronous module using `import()`. +load the asynchronous module using [`import()`][]. If `--experimental-print-required-tla` is enabled, instead of throwing `ERR_REQUIRE_ASYNC_MODULE` before evaluation, Node.js will evaluate the module, try to locate the top-level awaits, and print their location to help users fix them. +Support for loading ES modules using `require()` is currently +experimental and can be disabled using `--no-experimental-require-module`. +To print where this feature is used, use [`--trace-require-module`][]. + +This feature can be detected by checking if +[`process.features.require_module`][] is `true`. + ## All together <!-- type=misc --> @@ -256,18 +353,26 @@ require(X) from module at path Y 6. LOAD_NODE_MODULES(X, dirname(Y)) 7. THROW "not found" +MAYBE_DETECT_AND_LOAD(X) +1. If X parses as a CommonJS module, load X as a CommonJS module. STOP. +2. Else, if the source code of X can be parsed as ECMAScript module using + <a href="esm.md#resolver-algorithm-specification">DETECT_MODULE_SYNTAX defined in + the ESM resolver</a>, + a. Load X as an ECMAScript module. STOP. +3. THROW the SyntaxError from attempting to parse X as CommonJS in 1. STOP. + LOAD_AS_FILE(X) 1. If X is a file, load X as its file extension format. STOP 2. If X.js is a file, a. Find the closest package scope SCOPE to X. - b. If no scope was found, load X.js as a CommonJS module. STOP. + b. If no scope was found + 1. MAYBE_DETECT_AND_LOAD(X.js) c. If the SCOPE/package.json contains "type" field, 1. If the "type" field is "module", load X.js as an ECMAScript module. STOP. - 2. Else, load X.js as an CommonJS module. STOP. + 2. If the "type" field is "commonjs", load X.js as an CommonJS module. STOP. + d. MAYBE_DETECT_AND_LOAD(X.js) 3. If X.json is a file, load X.json to a JavaScript Object. STOP 4. If X.node is a file, load X.node as binary addon. STOP -5. If X.mjs is a file, and `--experimental-require-module` is enabled, - load X.mjs as an ECMAScript module. STOP LOAD_INDEX(X) 1. If X/index.js is a file @@ -312,9 +417,12 @@ LOAD_PACKAGE_IMPORTS(X, DIR) 1. Find the closest package scope SCOPE to DIR. 2. If no scope was found, return. 3. If the SCOPE/package.json "imports" is null or undefined, return. -4. let MATCH = PACKAGE_IMPORTS_RESOLVE(X, pathToFileURL(SCOPE), - ["node", "require"]) <a href="esm.md#resolver-algorithm-specification">defined in the ESM resolver</a>. -5. RESOLVE_ESM_MATCH(MATCH). +4. If `--experimental-require-module` is enabled + a. let CONDITIONS = ["node", "require", "module-sync"] + b. Else, let CONDITIONS = ["node", "require"] +5. let MATCH = PACKAGE_IMPORTS_RESOLVE(X, pathToFileURL(SCOPE), + CONDITIONS) <a href="esm.md#resolver-algorithm-specification">defined in the ESM resolver</a>. +6. RESOLVE_ESM_MATCH(MATCH). LOAD_PACKAGE_EXPORTS(X, DIR) 1. Try to interpret X as a combination of NAME and SUBPATH where the name @@ -323,9 +431,12 @@ LOAD_PACKAGE_EXPORTS(X, DIR) return. 3. Parse DIR/NAME/package.json, and look for "exports" field. 4. If "exports" is null or undefined, return. -5. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileURL(DIR/NAME), "." + SUBPATH, - `package.json` "exports", ["node", "require"]) <a href="esm.md#resolver-algorithm-specification">defined in the ESM resolver</a>. -6. RESOLVE_ESM_MATCH(MATCH) +5. If `--experimental-require-module` is enabled + a. let CONDITIONS = ["node", "require", "module-sync"] + b. Else, let CONDITIONS = ["node", "require"] +6. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileURL(DIR/NAME), "." + SUBPATH, + `package.json` "exports", CONDITIONS) <a href="esm.md#resolver-algorithm-specification">defined in the ESM resolver</a>. +7. RESOLVE_ESM_MATCH(MATCH) LOAD_PACKAGE_SELF(X, DIR) 1. Find the closest package scope SCOPE to DIR. @@ -1151,18 +1262,17 @@ This section was moved to * <a id="modules_module_findsourcemap_path_error" href="module.html#modulefindsourcemappath">`module.findSourceMap(path)`</a> * <a id="modules_class_module_sourcemap" href="module.html#class-modulesourcemap">Class: `module.SourceMap`</a> - * <a id="modules_new_sourcemap_payload" href="module.html#new-sourcemappayload">`new SourceMap(payload)`</a> + * <a id="modules_new_sourcemap_payload" href="module.html#new-sourcemappayload--linelengths-">`new SourceMap(payload)`</a> * <a id="modules_sourcemap_payload" href="module.html#sourcemappayload">`sourceMap.payload`</a> - * <a id="modules_sourcemap_findentry_linenumber_columnnumber" href="module.html#sourcemapfindentrylinenumber-columnnumber">`sourceMap.findEntry(lineNumber, columnNumber)`</a> + * <a id="modules_sourcemap_findentry_linenumber_columnnumber" href="module.html#sourcemapfindentrylineoffset-columnoffset">`sourceMap.findEntry(lineNumber, columnNumber)`</a> [Determining module system]: packages.md#determining-module-system [ECMAScript Modules]: esm.md [GLOBAL_FOLDERS]: #loading-from-the-global-folders [`"main"`]: packages.md#main [`"type"`]: packages.md#type -[`--experimental-require-module`]: cli.md#--experimental-require-module +[`--trace-require-module`]: cli.md#--trace-require-modulemode [`ERR_REQUIRE_ASYNC_MODULE`]: errors.md#err_require_async_module -[`ERR_REQUIRE_ESM`]: errors.md#err_require_esm [`ERR_UNSUPPORTED_DIR_IMPORT`]: errors.md#err_unsupported_dir_import [`MODULE_NOT_FOUND`]: errors.md#module_not_found [`__dirname`]: #__dirname @@ -1178,6 +1288,7 @@ This section was moved to [`node:test`]: test.md [`package.json`]: packages.md#nodejs-packagejson-field-definitions [`path.dirname()`]: path.md#pathdirnamepath +[`process.features.require_module`]: process.md#processfeaturesrequire_module [`require.main`]: #requiremain [exports shortcut]: #exports-shortcut [module resolution]: #all-together diff --git a/doc/api/packages.md b/doc/api/packages.md index 8e07bb60c1e7f7..fc485d925ca9d4 100644 --- a/doc/api/packages.md +++ b/doc/api/packages.md @@ -69,14 +69,14 @@ expressions: * Strings passed in as an argument to `--eval`, or piped to `node` via `STDIN`, with the flag `--input-type=module`. -* When using [`--experimental-detect-module`][], code containing syntax only - successfully parsed as [ES modules][], such as `import` or `export` - statements or `import.meta`, having no explicit marker of how it should be - interpreted. Explicit markers are `.mjs` or `.cjs` extensions, `package.json` - `"type"` fields with either `"module"` or `"commonjs"` values, or - `--input-type` or `--experimental-default-type` flags. Dynamic `import()` - expressions are supported in either CommonJS or ES modules and would not - cause a file to be treated as an ES module. +* Code containing syntax only successfully parsed as [ES modules][], such as + `import` or `export` statements or `import.meta`, with no explicit marker of + how it should be interpreted. Explicit markers are `.mjs` or `.cjs` + extensions, `package.json` `"type"` fields with either `"module"` or + `"commonjs"` values, or `--input-type` or `--experimental-default-type` flags. + Dynamic `import()` expressions are supported in either CommonJS or ES modules + and would not force a file to be treated as an ES module. See + [Syntax detection][]. Node.js will treat the following as [CommonJS][] when passed to `node` as the initial input, or when referenced by `import` statements or `import()` @@ -115,6 +115,44 @@ package in case the default type of Node.js ever changes, and it will also make things easier for build tools and loaders to determine how the files in the package should be interpreted. +### Syntax detection + +<!-- YAML +added: + - v21.1.0 + - v20.10.0 +changes: + - version: + - v20.19.0 + pr-url: https://github.com/nodejs/node/pull/53619 + description: Syntax detection is enabled by default. +--> + +> Stability: 1.2 - Release candidate + +Node.js will inspect the source code of ambiguous input to determine whether it +contains ES module syntax; if such syntax is detected, the input will be treated +as an ES module. + +Ambiguous input is defined as: + +* Files with a `.js` extension or no extension; and either no controlling + `package.json` file or one that lacks a `type` field; and + `--experimental-default-type` is not specified. +* String input (`--eval` or STDIN) when neither `--input-type` nor + `--experimental-default-type` are specified. + +ES module syntax is defined as syntax that would throw when evaluated as +CommonJS. This includes the following: + +* `import` statements (but _not_ `import()` expressions, which are valid in + CommonJS). +* `export` statements. +* `import.meta` references. +* `await` at the top level of a module. +* Lexical redeclarations of the CommonJS wrapper variables (`require`, `module`, + `exports`, `__dirname`, `__filename`). + ### Modules loaders Node.js has two systems for resolving a specifier and loading modules. @@ -134,8 +172,7 @@ There is the CommonJS module loader: * It treats all files that lack `.json` or `.node` extensions as JavaScript text files. * It can only be used to [load ECMASCript modules from CommonJS modules][] if - the module graph is synchronous (that contains no top-level `await`) when - `--experimental-require-module` is enabled. + the module graph is synchronous (that contains no top-level `await`). When used to load a JavaScript text file that is not an ECMAScript module, the file will be loaded as a CommonJS module. @@ -624,9 +661,12 @@ specific to least specific as conditions should be defined: * `"require"` - matches when the package is loaded via `require()`. The referenced file should be loadable with `require()` although the condition matches regardless of the module format of the target file. Expected - formats include CommonJS, JSON, native addons, and ES modules - if `--experimental-require-module` is enabled. _Always mutually + formats include CommonJS, JSON, native addons, and ES modules. _Always mutually exclusive with `"import"`._ +* `"module-sync"` - matches no matter the package is loaded via `import`, + `import()` or `require()`. The format is expected to be ES modules that does + not contain top-level await in its module graph - if it does, + `ERR_REQUIRE_ASYNC_MODULE` will be thrown when the module is `require()`-ed. * `"default"` - the generic fallback that always matches. Can be a CommonJS or ES module file. _This condition should always come last._ @@ -731,7 +771,7 @@ In node, conditions have very few restrictions, but specifically these include: ### Community Conditions Definitions -Condition strings other than the `"import"`, `"require"`, `"node"`, +Condition strings other than the `"import"`, `"require"`, `"node"`, `"module-sync"`, `"node-addons"` and `"default"` conditions [implemented in Node.js core](#conditional-exports) are ignored by default. @@ -862,262 +902,7 @@ $ node other.js ## Dual CommonJS/ES module packages -Prior to the introduction of support for ES modules in Node.js, it was a common -pattern for package authors to include both CommonJS and ES module JavaScript -sources in their package, with `package.json` [`"main"`][] specifying the -CommonJS entry point and `package.json` `"module"` specifying the ES module -entry point. -This enabled Node.js to run the CommonJS entry point while build tools such as -bundlers used the ES module entry point, since Node.js ignored (and still -ignores) the top-level `"module"` field. - -Node.js can now run ES module entry points, and a package can contain both -CommonJS and ES module entry points (either via separate specifiers such as -`'pkg'` and `'pkg/es-module'`, or both at the same specifier via [Conditional -exports][]). Unlike in the scenario where `"module"` is only used by bundlers, -or ES module files are transpiled into CommonJS on the fly before evaluation by -Node.js, the files referenced by the ES module entry point are evaluated as ES -modules. - -### Dual package hazard - -When an application is using a package that provides both CommonJS and ES module -sources, there is a risk of certain bugs if both versions of the package get -loaded. This potential comes from the fact that the `pkgInstance` created by -`const pkgInstance = require('pkg')` is not the same as the `pkgInstance` -created by `import pkgInstance from 'pkg'` (or an alternative main path like -`'pkg/module'`). This is the “dual package hazard,” where two versions of the -same package can be loaded within the same runtime environment. While it is -unlikely that an application or package would intentionally load both versions -directly, it is common for an application to load one version while a dependency -of the application loads the other version. This hazard can happen because -Node.js supports intermixing CommonJS and ES modules, and can lead to unexpected -behavior. - -If the package main export is a constructor, an `instanceof` comparison of -instances created by the two versions returns `false`, and if the export is an -object, properties added to one (like `pkgInstance.foo = 3`) are not present on -the other. This differs from how `import` and `require` statements work in -all-CommonJS or all-ES module environments, respectively, and therefore is -surprising to users. It also differs from the behavior users are familiar with -when using transpilation via tools like [Babel][] or [`esm`][]. - -### Writing dual packages while avoiding or minimizing hazards - -First, the hazard described in the previous section occurs when a package -contains both CommonJS and ES module sources and both sources are provided for -use in Node.js, either via separate main entry points or exported paths. A -package might instead be written where any version of Node.js receives only -CommonJS sources, and any separate ES module sources the package might contain -are intended only for other environments such as browsers. Such a package -would be usable by any version of Node.js, since `import` can refer to CommonJS -files; but it would not provide any of the advantages of using ES module syntax. - -A package might also switch from CommonJS to ES module syntax in a [breaking -change](https://semver.org/) version bump. This has the disadvantage that the -newest version of the package would only be usable in ES module-supporting -versions of Node.js. - -Every pattern has tradeoffs, but there are two broad approaches that satisfy the -following conditions: - -1. The package is usable via both `require` and `import`. -2. The package is usable in both current Node.js and older versions of Node.js - that lack support for ES modules. -3. The package main entry point, e.g. `'pkg'` can be used by both `require` to - resolve to a CommonJS file and by `import` to resolve to an ES module file. - (And likewise for exported paths, e.g. `'pkg/feature'`.) -4. The package provides named exports, e.g. `import { name } from 'pkg'` rather - than `import pkg from 'pkg'; pkg.name`. -5. The package is potentially usable in other ES module environments such as - browsers. -6. The hazards described in the previous section are avoided or minimized. - -#### Approach #1: Use an ES module wrapper - -Write the package in CommonJS or transpile ES module sources into CommonJS, and -create an ES module wrapper file that defines the named exports. Using -[Conditional exports][], the ES module wrapper is used for `import` and the -CommonJS entry point for `require`. - -```json -// ./node_modules/pkg/package.json -{ - "type": "module", - "exports": { - "import": "./wrapper.mjs", - "require": "./index.cjs" - } -} -``` - -The preceding example uses explicit extensions `.mjs` and `.cjs`. -If your files use the `.js` extension, `"type": "module"` will cause such files -to be treated as ES modules, just as `"type": "commonjs"` would cause them -to be treated as CommonJS. -See [Enabling](esm.md#enabling). - -```cjs -// ./node_modules/pkg/index.cjs -exports.name = 'value'; -``` - -```js -// ./node_modules/pkg/wrapper.mjs -import cjsModule from './index.cjs'; -export const name = cjsModule.name; -``` - -In this example, the `name` from `import { name } from 'pkg'` is the same -singleton as the `name` from `const { name } = require('pkg')`. Therefore `===` -returns `true` when comparing the two `name`s and the divergent specifier hazard -is avoided. - -If the module is not simply a list of named exports, but rather contains a -unique function or object export like `module.exports = function () { ... }`, -or if support in the wrapper for the `import pkg from 'pkg'` pattern is desired, -then the wrapper would instead be written to export the default optionally -along with any named exports as well: - -```js -import cjsModule from './index.cjs'; -export const name = cjsModule.name; -export default cjsModule; -``` - -This approach is appropriate for any of the following use cases: - -* The package is currently written in CommonJS and the author would prefer not - to refactor it into ES module syntax, but wishes to provide named exports for - ES module consumers. -* The package has other packages that depend on it, and the end user might - install both this package and those other packages. For example a `utilities` - package is used directly in an application, and a `utilities-plus` package - adds a few more functions to `utilities`. Because the wrapper exports - underlying CommonJS files, it doesn't matter if `utilities-plus` is written in - CommonJS or ES module syntax; it will work either way. -* The package stores internal state, and the package author would prefer not to - refactor the package to isolate its state management. See the next section. - -A variant of this approach not requiring conditional exports for consumers could -be to add an export, e.g. `"./module"`, to point to an all-ES module-syntax -version of the package. This could be used via `import 'pkg/module'` by users -who are certain that the CommonJS version will not be loaded anywhere in the -application, such as by dependencies; or if the CommonJS version can be loaded -but doesn't affect the ES module version (for example, because the package is -stateless): - -```json -// ./node_modules/pkg/package.json -{ - "type": "module", - "exports": { - ".": "./index.cjs", - "./module": "./wrapper.mjs" - } -} -``` - -#### Approach #2: Isolate state - -A [`package.json`][] file can define the separate CommonJS and ES module entry -points directly: - -```json -// ./node_modules/pkg/package.json -{ - "type": "module", - "exports": { - "import": "./index.mjs", - "require": "./index.cjs" - } -} -``` - -This can be done if both the CommonJS and ES module versions of the package are -equivalent, for example because one is the transpiled output of the other; and -the package's management of state is carefully isolated (or the package is -stateless). - -The reason that state is an issue is because both the CommonJS and ES module -versions of the package might get used within an application; for example, the -user's application code could `import` the ES module version while a dependency -`require`s the CommonJS version. If that were to occur, two copies of the -package would be loaded in memory and therefore two separate states would be -present. This would likely cause hard-to-troubleshoot bugs. - -Aside from writing a stateless package (if JavaScript's `Math` were a package, -for example, it would be stateless as all of its methods are static), there are -some ways to isolate state so that it's shared between the potentially loaded -CommonJS and ES module instances of the package: - -1. If possible, contain all state within an instantiated object. JavaScript's - `Date`, for example, needs to be instantiated to contain state; if it were a - package, it would be used like this: - - ```js - import Date from 'date'; - const someDate = new Date(); - // someDate contains state; Date does not - ``` - - The `new` keyword isn't required; a package's function can return a new - object, or modify a passed-in object, to keep the state external to the - package. - -2. Isolate the state in one or more CommonJS files that are shared between the - CommonJS and ES module versions of the package. For example, if the CommonJS - and ES module entry points are `index.cjs` and `index.mjs`, respectively: - - ```cjs - // ./node_modules/pkg/index.cjs - const state = require('./state.cjs'); - module.exports.state = state; - ``` - - ```js - // ./node_modules/pkg/index.mjs - import state from './state.cjs'; - export { - state, - }; - ``` - - Even if `pkg` is used via both `require` and `import` in an application (for - example, via `import` in application code and via `require` by a dependency) - each reference of `pkg` will contain the same state; and modifying that - state from either module system will apply to both. - -Any plugins that attach to the package's singleton would need to separately -attach to both the CommonJS and ES module singletons. - -This approach is appropriate for any of the following use cases: - -* The package is currently written in ES module syntax and the package author - wants that version to be used wherever such syntax is supported. -* The package is stateless or its state can be isolated without too much - difficulty. -* The package is unlikely to have other public packages that depend on it, or if - it does, the package is stateless or has state that need not be shared between - dependencies or with the overall application. - -Even with isolated state, there is still the cost of possible extra code -execution between the CommonJS and ES module versions of a package. - -As with the previous approach, a variant of this approach not requiring -conditional exports for consumers could be to add an export, e.g. -`"./module"`, to point to an all-ES module-syntax version of the package: - -```json -// ./node_modules/pkg/package.json -{ - "type": "module", - "exports": { - ".": "./index.cjs", - "./module": "./index.mjs" - } -} -``` +See [the package examples repository][] for details. ## Node.js `package.json` field definitions @@ -1361,7 +1146,6 @@ Package imports permit mapping to external packages. This field defines [subpath imports][] for the current package. -[Babel]: https://babeljs.io/ [CommonJS]: modules.md [Conditional exports]: #conditional-exports [Corepack]: corepack.md @@ -1369,6 +1153,7 @@ This field defines [subpath imports][] for the current package. [ES modules]: esm.md [Node.js documentation for this section]: https://github.com/nodejs/node/blob/HEAD/doc/api/packages.md#conditions-definitions [Runtime Keys]: https://runtime-keys.proposal.wintercg.org/ +[Syntax detection]: #syntax-detection [WinterCG]: https://wintercg.org/ [`"exports"`]: #exports [`"imports"`]: #imports @@ -1378,10 +1163,8 @@ This field defines [subpath imports][] for the current package. [`"type"`]: #type [`--conditions` / `-C` flag]: #resolving-user-conditions [`--experimental-default-type`]: cli.md#--experimental-default-typetype -[`--experimental-detect-module`]: cli.md#--experimental-detect-module [`--no-addons` flag]: cli.md#--no-addons [`ERR_PACKAGE_PATH_NOT_EXPORTED`]: errors.md#err_package_path_not_exported -[`esm`]: https://github.com/standard-things/esm#readme [`package.json`]: #nodejs-packagejson-field-definitions [entry points]: #package-entry-points [folders as modules]: modules.md#folders-as-modules @@ -1395,3 +1178,4 @@ This field defines [subpath imports][] for the current package. [supported package managers]: corepack.md#supported-package-managers [the dual CommonJS/ES module packages section]: #dual-commonjses-module-packages [the full specifier path]: esm.md#mandatory-file-extensions +[the package examples repository]: https://github.com/nodejs/package-examples diff --git a/doc/api/process.md b/doc/api/process.md index 2fa78f55f516e7..b1542e0be1e23c 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -327,6 +327,18 @@ possible to record such errors in an error log, either periodically (which is likely best for long-running application) or upon process exit (which is likely most convenient for scripts). +### Event: `'workerMessage'` + +<!-- YAML +added: v20.19.0 +--> + +* `value` {any} A value transmitted using [`postMessageToThread()`][]. +* `source` {number} The transmitting worker thread ID or `0` for the main thread. + +The `'workerMessage'` event is emitted for any incoming message send by the other +party by using [`postMessageToThread()`][]. + ### Event: `'uncaughtException'` <!-- YAML @@ -1877,6 +1889,114 @@ a code. Specifying a code to [`process.exit(code)`][`process.exit()`] will override any previous setting of `process.exitCode`. +## `process.features.cached_builtins` + +<!-- YAML +added: v12.0.0 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build is caching builtin modules. + +## `process.features.debug` + +<!-- YAML +added: v0.5.5 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build is a debug build. + +## `process.features.inspector` + +<!-- YAML +added: v11.10.0 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build includes the inspector. + +## `process.features.ipv6` + +<!-- YAML +added: v0.5.3 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build includes support for IPv6. + +## `process.features.require_module` + +<!-- YAML +added: v20.19.0 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build supports +[loading ECMAScript modules using `require()`][]. + +## `process.features.tls` + +<!-- YAML +added: v0.5.3 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build includes support for TLS. + +## `process.features.tls_alpn` + +<!-- YAML +added: v4.8.0 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS. + +*** + +## `process.features.tls_ocsp` + +<!-- YAML +added: v0.11.13 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS. + +*** + +## `process.features.tls_sni` + +<!-- YAML +added: v0.5.3 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. + +*** + +## `process.features.uv` + +<!-- YAML +added: v0.5.3 +--> + +* {boolean} + +A boolean value that is `true` if the current Node.js build includes support for libuv. +Since it's currently not possible to build Node.js without libuv, this value is always `true`. + ## `process.getActiveResourcesInfo()` <!-- YAML @@ -2623,34 +2743,40 @@ function definitelyAsync(arg, cb) { ### When to use `queueMicrotask()` vs. `process.nextTick()` -The [`queueMicrotask()`][] API is an alternative to `process.nextTick()` that -also defers execution of a function using the same microtask queue used to -execute the then, catch, and finally handlers of resolved promises. Within -Node.js, every time the "next tick queue" is drained, the microtask queue +The [`queueMicrotask()`][] API is an alternative to `process.nextTick()` that instead of using the +"next tick queue" defers execution of a function using the same microtask queue used to execute the +then, catch, and finally handlers of resolved promises. + +Within Node.js, every time the "next tick queue" is drained, the microtask queue is drained immediately after. +So in CJS modules `process.nextTick()` callbacks are always run before `queueMicrotask()` ones. +However since ESM modules are processed already as part of the microtask queue, there +`queueMicrotask()` callbacks are always exectued before `process.nextTick()` ones since Node.js +is already in the process of draining the microtask queue. + ```mjs import { nextTick } from 'node:process'; -Promise.resolve().then(() => console.log(2)); -queueMicrotask(() => console.log(3)); -nextTick(() => console.log(1)); +Promise.resolve().then(() => console.log('resolve')); +queueMicrotask(() => console.log('microtask')); +nextTick(() => console.log('nextTick')); // Output: -// 1 -// 2 -// 3 +// resolve +// microtask +// nextTick ``` ```cjs const { nextTick } = require('node:process'); -Promise.resolve().then(() => console.log(2)); -queueMicrotask(() => console.log(3)); -nextTick(() => console.log(1)); +Promise.resolve().then(() => console.log('resolve')); +queueMicrotask(() => console.log('microtask')); +nextTick(() => console.log('nextTick')); // Output: -// 1 -// 2 -// 3 +// nextTick +// resolve +// microtask ``` For _most_ userland use cases, the `queueMicrotask()` API provides a portable @@ -4065,6 +4191,7 @@ cases: [`net.Server`]: net.md#class-netserver [`net.Socket`]: net.md#class-netsocket [`os.constants.dlopen`]: os.md#dlopen-constants +[`postMessageToThread()`]: worker_threads.md#workerpostmessagetothreadthreadid-value-transferlist-timeout [`process.argv`]: #processargv [`process.config`]: #processconfig [`process.execPath`]: #processexecpath @@ -4085,6 +4212,7 @@ cases: [built-in modules with mandatory `node:` prefix]: modules.md#built-in-modules-with-mandatory-node-prefix [debugger]: debugger.md [deprecation code]: deprecations.md +[loading ECMAScript modules using `require()`]: modules.md#loading-ecmascript-modules-using-require [note on process I/O]: #a-note-on-process-io [process.cpuUsage]: #processcpuusagepreviousvalue [process_emit_warning]: #processemitwarningwarning-type-code-ctor diff --git a/doc/api/tracing.md b/doc/api/tracing.md index e1a72a708863a5..1d51f400ed0f51 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -69,9 +69,19 @@ node --trace-event-categories v8,node,node.async_hooks Alternatively, trace events may be enabled using the `node:trace_events` module: -```js -const trace_events = require('node:trace_events'); -const tracing = trace_events.createTracing({ categories: ['node.perf'] }); +```mjs +import { createTracing } from 'node:trace_events'; +const tracing = createTracing({ categories: ['node.perf'] }); +tracing.enable(); // Enable trace event capture for the 'node.perf' category + +// do work + +tracing.disable(); // Disable trace event capture for the 'node.perf' category +``` + +```cjs +const { createTracing } = require('node:trace_events'); +const tracing = createTracing({ categories: ['node.perf'] }); tracing.enable(); // Enable trace event capture for the 'node.perf' category // do work @@ -153,20 +163,36 @@ Disables this `Tracing` object. Only trace event categories _not_ covered by other enabled `Tracing` objects and _not_ specified by the `--trace-event-categories` flag will be disabled. -```js -const trace_events = require('node:trace_events'); -const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); -const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); +```mjs +import { createTracing, getEnabledCategories } from 'node:trace_events'; +const t1 = createTracing({ categories: ['node', 'v8'] }); +const t2 = createTracing({ categories: ['node.perf', 'node'] }); +t1.enable(); +t2.enable(); + +// Prints 'node,node.perf,v8' +console.log(getEnabledCategories()); + +t2.disable(); // Will only disable emission of the 'node.perf' category + +// Prints 'node,v8' +console.log(getEnabledCategories()); +``` + +```cjs +const { createTracing, getEnabledCategories } = require('node:trace_events'); +const t1 = createTracing({ categories: ['node', 'v8'] }); +const t2 = createTracing({ categories: ['node.perf', 'node'] }); t1.enable(); t2.enable(); // Prints 'node,node.perf,v8' -console.log(trace_events.getEnabledCategories()); +console.log(getEnabledCategories()); t2.disable(); // Will only disable emission of the 'node.perf' category // Prints 'node,v8' -console.log(trace_events.getEnabledCategories()); +console.log(getEnabledCategories()); ``` #### `tracing.enable()` @@ -200,10 +226,19 @@ added: v10.0.0 Creates and returns a `Tracing` object for the given set of `categories`. -```js -const trace_events = require('node:trace_events'); +```mjs +import { createTracing } from 'node:trace_events'; +const categories = ['node.perf', 'node.async_hooks']; +const tracing = createTracing({ categories }); +tracing.enable(); +// do stuff +tracing.disable(); +``` + +```cjs +const { createTracing } = require('node:trace_events'); const categories = ['node.perf', 'node.async_hooks']; -const tracing = trace_events.createTracing({ categories }); +const tracing = createTracing({ categories }); tracing.enable(); // do stuff tracing.disable(); @@ -226,23 +261,71 @@ Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. -```js -const trace_events = require('node:trace_events'); -const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); -const t2 = trace_events.createTracing({ categories: ['node.perf'] }); -const t3 = trace_events.createTracing({ categories: ['v8'] }); +```mjs +import { createTracing, getEnabledCategories } from 'node:trace_events'; +const t1 = createTracing({ categories: ['node.async_hooks'] }); +const t2 = createTracing({ categories: ['node.perf'] }); +const t3 = createTracing({ categories: ['v8'] }); + +t1.enable(); +t2.enable(); + +console.log(getEnabledCategories()); +``` + +```cjs +const { createTracing, getEnabledCategories } = require('node:trace_events'); +const t1 = createTracing({ categories: ['node.async_hooks'] }); +const t2 = createTracing({ categories: ['node.perf'] }); +const t3 = createTracing({ categories: ['v8'] }); t1.enable(); t2.enable(); -console.log(trace_events.getEnabledCategories()); +console.log(getEnabledCategories()); ``` ## Examples ### Collect trace events data by inspector -```js +```mjs +import { Session } from 'node:inspector'; +const session = new Session(); +session.connect(); + +function post(message, data) { + return new Promise((resolve, reject) => { + session.post(message, data, (err, result) => { + if (err) + reject(new Error(JSON.stringify(err))); + else + resolve(result); + }); + }); +} + +async function collect() { + const data = []; + session.on('NodeTracing.dataCollected', (chunk) => data.push(chunk)); + session.on('NodeTracing.tracingComplete', () => { + // done + }); + const traceConfig = { includedCategories: ['v8'] }; + await post('NodeTracing.start', { traceConfig }); + // do something + setTimeout(() => { + post('NodeTracing.stop').then(() => { + session.disconnect(); + console.log(data); + }); + }, 1000); +} + +collect(); +``` + +```cjs 'use strict'; const { Session } = require('inspector'); diff --git a/doc/api/util.md b/doc/api/util.md index 74e37f237a9e1d..61b4e68aef9db2 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1422,9 +1422,10 @@ changes: times. If `true`, all values will be collected in an array. If `false`, values for the option are last-wins. **Default:** `false`. * `short` {string} A single character alias for the option. - * `default` {string | boolean | string\[] | boolean\[]} The default option - value when it is not set by args. It must be of the same type as the - `type` property. When `multiple` is `true`, it must be an array. + * `default` {string | boolean | string\[] | boolean\[]} The default value to + be used if (and only if) the option does not appear in the arguments to be + parsed. It must be of the same type as the `type` property. When `multiple` + is `true`, it must be an array. * `strict` {boolean} Should an error be thrown when unknown arguments are encountered, or when arguments are passed that do not match the `type` configured in `options`. @@ -1836,7 +1837,7 @@ const errorMessage = styleText( // Validate if process.stderr has TTY { stream: stderr }, ); -console.error(successMessage); +console.error(errorMessage); ``` ```cjs diff --git a/doc/api/webstreams.md b/doc/api/webstreams.md index 695dedb0e61318..7c8de3bad6cfd6 100644 --- a/doc/api/webstreams.md +++ b/doc/api/webstreams.md @@ -432,6 +432,41 @@ async function* asyncIterableGenerator() { })(); ``` +To pipe the resulting {ReadableStream} into a {WritableStream} the {Iterable} +should yield a sequence of {Buffer}, {TypedArray}, or {DataView} objects. + +```mjs +import { ReadableStream } from 'node:stream/web'; +import { Buffer } from 'node:buffer'; + +async function* asyncIterableGenerator() { + yield Buffer.from('a'); + yield Buffer.from('b'); + yield Buffer.from('c'); +} + +const stream = ReadableStream.from(asyncIterableGenerator()); + +await stream.pipeTo(createWritableStreamSomehow()); +``` + +```cjs +const { ReadableStream } = require('node:stream/web'); +const { Buffer } = require('node:buffer'); + +async function* asyncIterableGenerator() { + yield Buffer.from('a'); + yield Buffer.from('b'); + yield Buffer.from('c'); +} + +const stream = ReadableStream.from(asyncIterableGenerator()); + +(async () => { + await stream.pipeTo(createWritableStreamSomehow()); +})(); +``` + ### Class: `ReadableStreamDefaultReader` <!-- YAML diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 4f2482e1b82d55..bd5f0ac507cee1 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -220,6 +220,118 @@ if (isMainThread) { } ``` +## `worker.postMessageToThread(threadId, value[, transferList][, timeout])` + +<!-- YAML +added: v20.19.0 +--> + +> Stability: 1.1 - Active development + +* `destination` {number} The target thread ID. If the thread ID is invalid, a + [`ERR_WORKER_MESSAGING_FAILED`][] error will be thrown. If the target thread ID is the current thread ID, + a [`ERR_WORKER_MESSAGING_SAME_THREAD`][] error will be thrown. +* `value` {any} The value to send. +* `transferList` {Object\[]} If one or more `MessagePort`-like objects are passed in `value`, + a `transferList` is required for those items or [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`][] is thrown. + See [`port.postMessage()`][] for more information. +* `timeout` {number} Time to wait for the message to be delivered in milliseconds. + By default it's `undefined`, which means wait forever. If the operation times out, + a [`ERR_WORKER_MESSAGING_TIMEOUT`][] error is thrown. +* Returns: {Promise} A promise which is fulfilled if the message was successfully processed by destination thread. + +Sends a value to another worker, identified by its thread ID. + +If the target thread has no listener for the `workerMessage` event, then the operation will throw +a [`ERR_WORKER_MESSAGING_FAILED`][] error. + +If the target thread threw an error while processing the `workerMessage` event, then the operation will throw +a [`ERR_WORKER_MESSAGING_ERRORED`][] error. + +This method should be used when the target thread is not the direct +parent or child of the current thread. +If the two threads are parent-children, use the [`require('node:worker_threads').parentPort.postMessage()`][] +and the [`worker.postMessage()`][] to let the threads communicate. + +The example below shows the use of of `postMessageToThread`: it creates 10 nested threads, +the last one will try to communicate with the main thread. + +```mjs +import { fileURLToPath } from 'node:url'; +import { once } from 'node:events'; +import process from 'node:process'; +import { + isMainThread, + postMessageToThread, + threadId, + workerData, + Worker, +} from 'node:worker_threads'; + +const channel = new BroadcastChannel('sync'); +const level = workerData?.level ?? 0; + +if (level < 10) { + const worker = new Worker(fileURLToPath(import.meta.url), { + workerData: { level: level + 1 }, + }); +} + +if (level === 0) { + process.on('workerMessage', (value, source) => { + console.log(`${source} -> ${threadId}:`, value); + postMessageToThread(source, { message: 'pong' }); + }); +} else if (level === 10) { + process.on('workerMessage', (value, source) => { + console.log(`${source} -> ${threadId}:`, value); + channel.postMessage('done'); + channel.close(); + }); + + await postMessageToThread(0, { message: 'ping' }); +} + +channel.onmessage = channel.close; +``` + +```cjs +const { once } = require('node:events'); +const { + isMainThread, + postMessageToThread, + threadId, + workerData, + Worker, +} = require('node:worker_threads'); + +const channel = new BroadcastChannel('sync'); +const level = workerData?.level ?? 0; + +if (level < 10) { + const worker = new Worker(__filename, { + workerData: { level: level + 1 }, + }); +} + +if (level === 0) { + process.on('workerMessage', (value, source) => { + console.log(`${source} -> ${threadId}:`, value); + postMessageToThread(source, { message: 'pong' }); + }); +} else if (level === 10) { + process.on('workerMessage', (value, source) => { + console.log(`${source} -> ${threadId}:`, value); + channel.postMessage('done'); + channel.close(); + }); + + postMessageToThread(0, { message: 'ping' }); +} + +channel.onmessage = channel.close; +``` + ## `worker.receiveMessageOnPort(port)` <!-- YAML @@ -1361,6 +1473,10 @@ thread spawned will spawn another until the application crashes. [`Buffer.allocUnsafe()`]: buffer.md#static-method-bufferallocunsafesize [`Buffer`]: buffer.md [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`]: errors.md#err_missing_message_port_in_transfer_list +[`ERR_WORKER_MESSAGING_ERRORED`]: errors.md#err_worker_messaging_errored +[`ERR_WORKER_MESSAGING_FAILED`]: errors.md#err_worker_messaging_failed +[`ERR_WORKER_MESSAGING_SAME_THREAD`]: errors.md#err_worker_messaging_same_thread +[`ERR_WORKER_MESSAGING_TIMEOUT`]: errors.md#err_worker_messaging_timeout [`ERR_WORKER_NOT_RUNNING`]: errors.md#err_worker_not_running [`EventTarget`]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget [`FileHandle`]: fs.md#class-filehandle diff --git a/doc/api_assets/api.js b/doc/api_assets/api.js index 394b5ba990946c..e86f110e0346bf 100644 --- a/doc/api_assets/api.js +++ b/doc/api_assets/api.js @@ -41,6 +41,7 @@ function closeAllPickers() { for (const picker of pickers) { picker.parentNode.classList.remove('expanded'); + picker.ariaExpanded = false; } window.removeEventListener('click', closeAllPickers); @@ -58,6 +59,7 @@ for (const picker of pickers) { const parentNode = picker.parentNode; + picker.ariaExpanded = parentNode.classList.contains('expanded'); picker.addEventListener('click', function(e) { e.preventDefault(); @@ -65,7 +67,7 @@ closeAllPickers as window event trigger already closed all the pickers, if it already closed there is nothing else to do here */ - if (parentNode.classList.contains('expanded')) { + if (picker.ariaExpanded === 'true') { return; } @@ -75,9 +77,11 @@ */ requestAnimationFrame(function() { + picker.ariaExpanded = true; parentNode.classList.add('expanded'); window.addEventListener('click', closeAllPickers); window.addEventListener('keydown', onKeyDown); + parentNode.querySelector('.picker a').focus(); }); }); } diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 28a284e3b975b8..9f56028d09162c 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -122,6 +122,19 @@ a.type { font-size: .9em; } +.skip-to-content { + position: fixed; + top: -300%; +} +.skip-to-content:focus { + display: block; + top: 0; + left: 0; + background-color: var(--green1); + padding: 1rem; + z-index: 999999; +} + #content { position: relative; } @@ -182,22 +195,15 @@ li.picker-header .picker-arrow { height: .6rem; border-top: .3rem solid transparent; border-bottom: .3rem solid transparent; - border-left: .6rem solid var(--color-links); + border-left: .6rem solid currentColor; border-right: none; margin: 0 .2rem .05rem 0; } -li.picker-header a:focus .picker-arrow, -li.picker-header a:active .picker-arrow, -li.picker-header a:hover .picker-arrow { - border-left: .6rem solid var(--white); -} - -li.picker-header.expanded a:focus .picker-arrow, -li.picker-header.expanded a:active .picker-arrow, -li.picker-header.expanded a:hover .picker-arrow, +li.picker-header.expanded .picker-arrow, +:root:not(.has-js) li.picker-header:focus-within .picker-arrow, :root:not(.has-js) li.picker-header:hover .picker-arrow { - border-top: .6rem solid var(--white); + border-top: .6rem solid currentColor; border-bottom: none; border-left: .35rem solid transparent; border-right: .35rem solid transparent; @@ -205,11 +211,13 @@ li.picker-header.expanded a:hover .picker-arrow, } li.picker-header.expanded > a, +:root:not(.has-js) li.picker-header:focus-within > a, :root:not(.has-js) li.picker-header:hover > a { border-radius: 2px 2px 0 0; } li.picker-header.expanded > .picker, +:root:not(.has-js) li.picker-header:focus-within > .picker, :root:not(.has-js) li.picker-header:hover > .picker { display: block; z-index: 1; @@ -562,40 +570,28 @@ hr { } .toc ul { - margin: 0 + margin: 0; } - -.toc li a::before { - content: "■"; - color: var(--color-text-primary); - padding-right: 1em; - font-size: 0.9em; +.toc>ul:first-child { + margin-left: 1rem; +} +.toc li { + display: list-item; + list-style: square; +} +.toc li a { + display: inline; + padding-left: 0; } .toc li a:hover::before { color: var(--white); } -.toc ul ul a { +.toc ul { padding-left: 1rem; } -.toc ul ul ul a { - padding-left: 2rem; -} - -.toc ul ul ul ul a { - padding-left: 3rem; -} - -.toc ul ul ul ul ul a { - padding-left: 4rem; -} - -.toc ul ul ul ul ul ul a { - padding-left: 5rem; -} - #toc .stability_0::after, .deprecated-inline::after { background-color: var(--red2); diff --git a/doc/changelogs/CHANGELOG_V20.md b/doc/changelogs/CHANGELOG_V20.md index fc81e35e8264db..b1164342e3e9bc 100644 --- a/doc/changelogs/CHANGELOG_V20.md +++ b/doc/changelogs/CHANGELOG_V20.md @@ -9,6 +9,7 @@ </tr> <tr> <td> +<a href="#20.19.0">20.19.0</a><br/> <a href="#20.18.3">20.18.3</a><br/> <a href="#20.18.2">20.18.2</a><br/> <a href="#20.18.1">20.18.1</a><br/> @@ -68,6 +69,195 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) +<a id="20.19.0"></a> + +## 2025-03-13, Version 20.19.0 'Iron' (LTS), @marco-ippolito + +### Notable Changes + +### require(esm) is now enabled by default + +Support for loading native ES modules using require() had been available on v20.x under the command line flag --experimental-require-module, and available by default on v22.x and v23.x. In this release, it is now no longer behind a flag on v20.x. + +This feature has been tested on v23.x and v22.x, and we are looking for user feedback from v20.x to make more final tweaks before fully stabilizing it. When the Node.js instance encounters a native ES module in require() somewhere outside `node_modules` for the first time, it will emit an experimental warning unless `require()` comes from a path that contains `node_modules`. If there happens to be any regressions caused by this feature, users can report it to the Node.js issue tracker. Meanwhile this feature can also be disabled using `--no-experimental-require-module` as a workaround. + +With this feature enabled, Node.js will no longer throw `ERR_REQUIRE_ESM` if `require()` is used to load a ES module. It can, however, throw `ERR_REQUIRE_ASYNC_MODULE` if the ES module being loaded or its dependencies contain top-level `await`. When the ES module is loaded successfully by `require()`, the returned object will either be a ES module namespace object similar to what's returned by `import()`, or what gets exported as `"module.exports"` in the ES module. + +Users can check `process.features.require_module` to see whether `require(esm)` is enabled in the current Node.js instance. For packages, the `"module-sync"` exports condition can be used as a way to detect `require(esm)` support in the current Node.js instance and allow both `require()` and `import` to load the same native ES module. See [the documentation](https://nodejs.org/docs/latest/api/modules.html#loading-ecmascript-modules-using-require) for more details about this feature. + +Contributed by Joyee Cheung in [#55085](https://github.com/nodejs/node/pull/55085) + +### Module syntax detection is now enabled by default + +Module syntax detection (the `--experimental-detect-module` flag) is now +enabled by default. Use `--no-experimental-detect-module` to disable it if +needed. + +Syntax detection attempts to run ambiguous files as CommonJS, and if the module +fails to parse as CommonJS due to ES module syntax, Node.js tries again and runs +the file as an ES module. +Ambiguous files are those with a `.js` or no extension, where the nearest parent +`package.json` has no `"type"` field (either `"type": "module"` or +`"type": "commonjs"`). +Syntax detection should have no performance impact on CommonJS modules, but it +incurs a slight performance penalty for ES modules; add `"type": "module"` to +the nearest parent `package.json` file to eliminate the performance cost. +A use case unlocked by this feature is the ability to use ES module syntax in +extensionless scripts with no nearby `package.json`. + +Thanks to Geoffrey Booth for making this work on [#53619](https://github.com/nodejs/node/pull/53619). + +### Other Notable Changes + +* \[[`285bb4ee14`](https://github.com/nodejs/node/commit/285bb4ee14)] - **crypto**: update root certificates to NSS 3.107 (Node.js GitHub Bot) [#56566](https://github.com/nodejs/node/pull/56566) +* \[[`73b5c16684`](https://github.com/nodejs/node/commit/73b5c16684)] - **(SEMVER-MINOR)** **worker**: add postMessageToThread (Paolo Insogna) [#53682](https://github.com/nodejs/node/pull/53682) +* \[[`de313b2336`](https://github.com/nodejs/node/commit/de313b2336)] - **(SEMVER-MINOR)** **module**: only emit require(esm) warning under --trace-require-module (Joyee Cheung) [#56194](https://github.com/nodejs/node/pull/56194) +* \[[`4fba01911d`](https://github.com/nodejs/node/commit/4fba01911d)] - **(SEMVER-MINOR)** **process**: add process.features.require\_module (Joyee Cheung) [#55241](https://github.com/nodejs/node/pull/55241) +* \[[`df8a045afe`](https://github.com/nodejs/node/commit/df8a045afe)] - **(SEMVER-MINOR)** **module**: implement the "module-sync" exports condition (Joyee Cheung) [#54648](https://github.com/nodejs/node/pull/54648) +* \[[`f9dc1eaef5`](https://github.com/nodejs/node/commit/f9dc1eaef5)] - **(SEMVER-MINOR)** **module**: add \_\_esModule to require()'d ESM (Joyee Cheung) [#52166](https://github.com/nodejs/node/pull/52166) + +### Commits + +* \[[`d84be843e3`](https://github.com/nodejs/node/commit/d84be843e3)] - **benchmark**: add validateStream to styleText bench (Rafael Gonzaga) [#56556](https://github.com/nodejs/node/pull/56556) +* \[[`1ee4bf9690`](https://github.com/nodejs/node/commit/1ee4bf9690)] - **build**: test macos-13 on GitHub actions (Michaël Zasso) [#56307](https://github.com/nodejs/node/pull/56307) +* \[[`1cc8d69882`](https://github.com/nodejs/node/commit/1cc8d69882)] - **build**: build v8 with -fvisibility=hidden on macOS (Joyee Cheung) [#56275](https://github.com/nodejs/node/pull/56275) +* \[[`52f1f7e22b`](https://github.com/nodejs/node/commit/52f1f7e22b)] - **child\_process**: fix parsing messages with splitted length field (Maksim Gorkov) [#56106](https://github.com/nodejs/node/pull/56106) +* \[[`5ef3c3c996`](https://github.com/nodejs/node/commit/5ef3c3c996)] - **crypto**: add missing return value check (Michael Dawson) [#56615](https://github.com/nodejs/node/pull/56615) +* \[[`285bb4ee14`](https://github.com/nodejs/node/commit/285bb4ee14)] - **crypto**: update root certificates to NSS 3.107 (Node.js GitHub Bot) [#56566](https://github.com/nodejs/node/pull/56566) +* \[[`d4ca38fe8e`](https://github.com/nodejs/node/commit/d4ca38fe8e)] - **deps**: macro ENODATA is deprecated in libc++ (Cheng) [#56698](https://github.com/nodejs/node/pull/56698) +* \[[`15214e6508`](https://github.com/nodejs/node/commit/15214e6508)] - **deps**: update simdutf to 6.0.3 (Node.js GitHub Bot) [#56567](https://github.com/nodejs/node/pull/56567) +* \[[`1e44f5d84b`](https://github.com/nodejs/node/commit/1e44f5d84b)] - **deps**: update simdutf to 5.7.2 (Node.js GitHub Bot) [#56388](https://github.com/nodejs/node/pull/56388) +* \[[`b92ff7be38`](https://github.com/nodejs/node/commit/b92ff7be38)] - **deps**: update googletest to 7d76a23 (Node.js GitHub Bot) [#56387](https://github.com/nodejs/node/pull/56387) +* \[[`e1b71a81a9`](https://github.com/nodejs/node/commit/e1b71a81a9)] - **deps**: update googletest to e54519b (Node.js GitHub Bot) [#56370](https://github.com/nodejs/node/pull/56370) +* \[[`c0d45e7f38`](https://github.com/nodejs/node/commit/c0d45e7f38)] - **deps**: update simdutf to 5.7.0 (Node.js GitHub Bot) [#56332](https://github.com/nodejs/node/pull/56332) +* \[[`d69107f5a8`](https://github.com/nodejs/node/commit/d69107f5a8)] - **deps**: update icu to 76.1 (Node.js GitHub Bot) [#55551](https://github.com/nodejs/node/pull/55551) +* \[[`5c9a397699`](https://github.com/nodejs/node/commit/5c9a397699)] - **deps**: V8: backport 9ab40592f697 (Lu Yahan) [#56781](https://github.com/nodejs/node/pull/56781) +* \[[`8342233f6d`](https://github.com/nodejs/node/commit/8342233f6d)] - **deps**: update corepack to 0.31.0 (Node.js GitHub Bot) [#56795](https://github.com/nodejs/node/pull/56795) +* \[[`561493d35e`](https://github.com/nodejs/node/commit/561493d35e)] - **deps,src**: simplify base64 encoding (Daniel Lemire) [#52714](https://github.com/nodejs/node/pull/52714) +* \[[`6207b2936c`](https://github.com/nodejs/node/commit/6207b2936c)] - **doc**: move anatoli to emeritus (Michael Dawson) [#56592](https://github.com/nodejs/node/pull/56592) +* \[[`b0ab483400`](https://github.com/nodejs/node/commit/b0ab483400)] - **doc**: fix styles of the expandable TOC (Antoine du Hamel) [#56755](https://github.com/nodejs/node/pull/56755) +* \[[`53e4dc2a82`](https://github.com/nodejs/node/commit/53e4dc2a82)] - **doc**: add "Skip to content" button (Antoine du Hamel) [#56750](https://github.com/nodejs/node/pull/56750) +* \[[`33ee4645c3`](https://github.com/nodejs/node/commit/33ee4645c3)] - **doc**: improve accessibility of expandable lists (Antoine du Hamel) [#56749](https://github.com/nodejs/node/pull/56749) +* \[[`b514438418`](https://github.com/nodejs/node/commit/b514438418)] - **doc**: add note regarding commit message trailers (Dario Piotrowicz) [#56736](https://github.com/nodejs/node/pull/56736) +* \[[`627f2997e3`](https://github.com/nodejs/node/commit/627f2997e3)] - **doc**: fix typo in example code for util.styleText (Robin Mehner) [#56720](https://github.com/nodejs/node/pull/56720) +* \[[`68548dcb48`](https://github.com/nodejs/node/commit/68548dcb48)] - **doc**: fix inconsistencies in `WeakSet` and `WeakMap` comparison details (Shreyans Pathak) [#56683](https://github.com/nodejs/node/pull/56683) +* \[[`337cfb2549`](https://github.com/nodejs/node/commit/337cfb2549)] - **doc**: add RafaelGSS as latest sec release stewards (Rafael Gonzaga) [#56682](https://github.com/nodejs/node/pull/56682) +* \[[`e890c86d7b`](https://github.com/nodejs/node/commit/e890c86d7b)] - **doc**: clarify cjs/esm diff in `queueMicrotask()` vs `process.nextTick()` (Dario Piotrowicz) [#56659](https://github.com/nodejs/node/pull/56659) +* \[[`978263923f`](https://github.com/nodejs/node/commit/978263923f)] - **doc**: `WeakSet` and `WeakMap` comparison details (Shreyans Pathak) [#56648](https://github.com/nodejs/node/pull/56648) +* \[[`aba280ccd8`](https://github.com/nodejs/node/commit/aba280ccd8)] - **doc**: mention prepare --security (Rafael Gonzaga) [#56617](https://github.com/nodejs/node/pull/56617) +* \[[`0a009a527b`](https://github.com/nodejs/node/commit/0a009a527b)] - **doc**: tweak info on reposts in ambassador program (Michael Dawson) [#56589](https://github.com/nodejs/node/pull/56589) +* \[[`d2f09e2ab3`](https://github.com/nodejs/node/commit/d2f09e2ab3)] - **doc**: add type stripping to ambassadors program (Marco Ippolito) [#56598](https://github.com/nodejs/node/pull/56598) +* \[[`b0b77d7fbe`](https://github.com/nodejs/node/commit/b0b77d7fbe)] - **doc**: improve internal documentation on built-in snapshot (Joyee Cheung) [#56505](https://github.com/nodejs/node/pull/56505) +* \[[`4b3e7fee94`](https://github.com/nodejs/node/commit/4b3e7fee94)] - **doc**: document CLI way to open the nodejs/bluesky PR (Antoine du Hamel) [#56506](https://github.com/nodejs/node/pull/56506) +* \[[`03878b0384`](https://github.com/nodejs/node/commit/03878b0384)] - **doc**: update gcc-version for ubuntu-lts (Kunal Kumar) [#56553](https://github.com/nodejs/node/pull/56553) +* \[[`acbbd7c1a6`](https://github.com/nodejs/node/commit/acbbd7c1a6)] - **doc**: fix parentheses in options (Tobias Nießen) [#56563](https://github.com/nodejs/node/pull/56563) +* \[[`3fe80c30b8`](https://github.com/nodejs/node/commit/3fe80c30b8)] - **doc**: include CVE to EOL lines as sec release process (Rafael Gonzaga) [#56520](https://github.com/nodejs/node/pull/56520) +* \[[`ff8af58046`](https://github.com/nodejs/node/commit/ff8af58046)] - **doc**: add esm examples to node:trace\_events (Alfredo González) [#56514](https://github.com/nodejs/node/pull/56514) +* \[[`27b9cfd135`](https://github.com/nodejs/node/commit/27b9cfd135)] - **doc**: add message for Ambassadors to promote (Michael Dawson) [#56235](https://github.com/nodejs/node/pull/56235) +* \[[`020c939da1`](https://github.com/nodejs/node/commit/020c939da1)] - **doc**: allow request for TSC reviews via the GitHub UI (Antoine du Hamel) [#56493](https://github.com/nodejs/node/pull/56493) +* \[[`1ef9c9a354`](https://github.com/nodejs/node/commit/1ef9c9a354)] - **doc**: add example for piping ReadableStream (Gabriel Schulhof) [#56415](https://github.com/nodejs/node/pull/56415) +* \[[`e675c3a7fc`](https://github.com/nodejs/node/commit/e675c3a7fc)] - **doc**: expand description of `parseArg`'s `default` (Kevin Gibbons) [#54431](https://github.com/nodejs/node/pull/54431) +* \[[`bc756da876`](https://github.com/nodejs/node/commit/bc756da876)] - **doc**: use `<ul>` instead of `<ol>` in `SECURITY.md` (Antoine du Hamel) [#56346](https://github.com/nodejs/node/pull/56346) +* \[[`ad59c82a49`](https://github.com/nodejs/node/commit/ad59c82a49)] - **doc**: clarify that WASM is trusted (Matteo Collina) [#56345](https://github.com/nodejs/node/pull/56345) +* \[[`8e76cc69e5`](https://github.com/nodejs/node/commit/8e76cc69e5)] - **doc**: move dual package shipping docs to separate repo (Joyee Cheung) [#55444](https://github.com/nodejs/node/pull/55444) +* \[[`9fda8e29cd`](https://github.com/nodejs/node/commit/9fda8e29cd)] - **doc**: mark `--env-file-if-exists` flag as experimental (Juan José) [#56893](https://github.com/nodejs/node/pull/56893) +* \[[`9e975f1a7d`](https://github.com/nodejs/node/commit/9e975f1a7d)] - **doc**: fix link and history of `SourceMap` sections (Antoine du Hamel) [#57098](https://github.com/nodejs/node/pull/57098) +* \[[`64ce95b8fc`](https://github.com/nodejs/node/commit/64ce95b8fc)] - **doc**: update `require(ESM)` history and stability status (Antoine du Hamel) [#55199](https://github.com/nodejs/node/pull/55199) +* \[[`697a39248b`](https://github.com/nodejs/node/commit/697a39248b)] - **doc**: fix history of `process.features` (Antoine du Hamel) [#54897](https://github.com/nodejs/node/pull/54897) +* \[[`7c38e503a3`](https://github.com/nodejs/node/commit/7c38e503a3)] - **doc**: add documentation for process.features (Marco Ippolito) [#54897](https://github.com/nodejs/node/pull/54897) +* \[[`c85b386a39`](https://github.com/nodejs/node/commit/c85b386a39)] - **esm**: fix jsdoc type refs to `ModuleJobBase` in esm/loader (Jacob Smith) [#56499](https://github.com/nodejs/node/pull/56499) +* \[[`4813a6a66c`](https://github.com/nodejs/node/commit/4813a6a66c)] - **esm**: throw `ERR_REQUIRE_ESM` instead of `ERR_INTERNAL_ASSERTION` (Antoine du Hamel) [#54868](https://github.com/nodejs/node/pull/54868) +* \[[`0d327c8e47`](https://github.com/nodejs/node/commit/0d327c8e47)] - **esm**: refactor `get_format` (Antoine du Hamel) [#53872](https://github.com/nodejs/node/pull/53872) +* \[[`e87db6c9bc`](https://github.com/nodejs/node/commit/e87db6c9bc)] - **events**: add hasEventListener util for validate (Sunghoon) [#55230](https://github.com/nodejs/node/pull/55230) +* \[[`674b932f33`](https://github.com/nodejs/node/commit/674b932f33)] - **http**: don't emit error after destroy (Robert Nagy) [#55457](https://github.com/nodejs/node/pull/55457) +* \[[`4c24ef8f71`](https://github.com/nodejs/node/commit/4c24ef8f71)] - **http2**: omit server name when HTTP2 host is IP address (islandryu) [#56530](https://github.com/nodejs/node/pull/56530) +* \[[`533afe8124`](https://github.com/nodejs/node/commit/533afe8124)] - **lib**: reduce amount of caught URL errors (Yagiz Nizipli) [#52658](https://github.com/nodejs/node/pull/52658) +* \[[`34221a1d6e`](https://github.com/nodejs/node/commit/34221a1d6e)] - **lib**: allow CJS source map cache to be reclaimed (Chengzhong Wu) [#51711](https://github.com/nodejs/node/pull/51711) +* \[[`f13589f1f9`](https://github.com/nodejs/node/commit/f13589f1f9)] - **lib,src**: iterate module requests of a module wrap in JS (Chengzhong Wu) [#52058](https://github.com/nodejs/node/pull/52058) +* \[[`6afee9ea43`](https://github.com/nodejs/node/commit/6afee9ea43)] - **meta**: move one or more collaborators to emeritus (Node.js GitHub Bot) [#56580](https://github.com/nodejs/node/pull/56580) +* \[[`85bb738739`](https://github.com/nodejs/node/commit/85bb738739)] - **meta**: add codeowners of security release document (Rafael Gonzaga) [#56521](https://github.com/nodejs/node/pull/56521) +* \[[`48f9ca0992`](https://github.com/nodejs/node/commit/48f9ca0992)] - **meta**: move one or more collaborators to emeritus (Node.js GitHub Bot) [#56342](https://github.com/nodejs/node/pull/56342) +* \[[`4d724121b4`](https://github.com/nodejs/node/commit/4d724121b4)] - **meta**: move MoLow to TSC regular member (Moshe Atlow) [#56276](https://github.com/nodejs/node/pull/56276) +* \[[`5e2dab7868`](https://github.com/nodejs/node/commit/5e2dab7868)] - **module**: fix bad `require.resolve` with option paths for `.` and `..` (Dario Piotrowicz) [#56735](https://github.com/nodejs/node/pull/56735) +* \[[`f507c05060`](https://github.com/nodejs/node/commit/f507c05060)] - **module**: simplify --inspect-brk handling (Joyee Cheung) [#55679](https://github.com/nodejs/node/pull/55679) +* \[[`ed2d373e5a`](https://github.com/nodejs/node/commit/ed2d373e5a)] - **module**: disable require(esm) for policy and network import (Joyee Cheung) [#56927](https://github.com/nodejs/node/pull/56927) +* \[[`de313b2336`](https://github.com/nodejs/node/commit/de313b2336)] - **(SEMVER-MINOR)** **module**: only emit require(esm) warning under --trace-require-module (Joyee Cheung) [#56194](https://github.com/nodejs/node/pull/56194) +* \[[`3d89e6b6fa`](https://github.com/nodejs/node/commit/3d89e6b6fa)] - **module**: mark evaluation rejection in require(esm) as handled (Joyee Cheung) [#56122](https://github.com/nodejs/node/pull/56122) +* \[[`e01dd4bd4f`](https://github.com/nodejs/node/commit/e01dd4bd4f)] - **module**: do not warn when require(esm) comes from node\_modules (Joyee Cheung) [#55960](https://github.com/nodejs/node/pull/55960) +* \[[`011e6e0032`](https://github.com/nodejs/node/commit/011e6e0032)] - **module**: fix error thrown from require(esm) hitting TLA repeatedly (Joyee Cheung) [#55520](https://github.com/nodejs/node/pull/55520) +* \[[`fdf50289c6`](https://github.com/nodejs/node/commit/fdf50289c6)] - **module**: trim off internal stack frames for require(esm) warnings (Joyee Cheung) [#55496](https://github.com/nodejs/node/pull/55496) +* \[[`8d33f78ca5`](https://github.com/nodejs/node/commit/8d33f78ca5)] - **module**: allow ESM that failed to be required to be re-imported (Joyee Cheung) [#55502](https://github.com/nodejs/node/pull/55502) +* \[[`8192dd6cf3`](https://github.com/nodejs/node/commit/8192dd6cf3)] - **module**: include module information in require(esm) warning (Joyee Cheung) [#55397](https://github.com/nodejs/node/pull/55397) +* \[[`1db210a0ec`](https://github.com/nodejs/node/commit/1db210a0ec)] - **module**: check --experimental-require-module separately from detection (Joyee Cheung) [#55250](https://github.com/nodejs/node/pull/55250) +* \[[`cf8701c866`](https://github.com/nodejs/node/commit/cf8701c866)] - **module**: use kNodeModulesRE to detect node\_modules (Joyee Cheung) [#55243](https://github.com/nodejs/node/pull/55243) +* \[[`dc66632261`](https://github.com/nodejs/node/commit/dc66632261)] - **module**: support 'module.exports' interop export in require(esm) (Guy Bedford) [#54563](https://github.com/nodejs/node/pull/54563) +* \[[`1ac1dda9a4`](https://github.com/nodejs/node/commit/1ac1dda9a4)] - **(SEMVER-MINOR)** **module**: unflag --experimental-require-module (Joyee Cheung) [#55085](https://github.com/nodejs/node/pull/55085) +* \[[`683c93f45f`](https://github.com/nodejs/node/commit/683c93f45f)] - **module**: refator ESM loader for adding future synchronous hooks (Joyee Cheung) [#54769](https://github.com/nodejs/node/pull/54769) +* \[[`df8a045afe`](https://github.com/nodejs/node/commit/df8a045afe)] - **(SEMVER-MINOR)** **module**: implement the "module-sync" exports condition (Joyee Cheung) [#54648](https://github.com/nodejs/node/pull/54648) +* \[[`249d82b686`](https://github.com/nodejs/node/commit/249d82b686)] - **module**: report unfinished TLA in ambiguous modules (Antoine du Hamel) [#54980](https://github.com/nodejs/node/pull/54980) +* \[[`1925d729f9`](https://github.com/nodejs/node/commit/1925d729f9)] - **module**: remove bogus assertion in CJS entrypoint handling with --import (Joyee Cheung) [#54592](https://github.com/nodejs/node/pull/54592) +* \[[`d1331fccb2`](https://github.com/nodejs/node/commit/d1331fccb2)] - **module**: do not warn for typeless package.json when there isn't one (Joyee Cheung) [#54045](https://github.com/nodejs/node/pull/54045) +* \[[`9916458b44`](https://github.com/nodejs/node/commit/9916458b44)] - **(SEMVER-MINOR)** **module**: unflag detect-module (Geoffrey Booth) [#53619](https://github.com/nodejs/node/pull/53619) +* \[[`f9dc1eaef5`](https://github.com/nodejs/node/commit/f9dc1eaef5)] - **(SEMVER-MINOR)** **module**: add \_\_esModule to require()'d ESM (Joyee Cheung) [#52166](https://github.com/nodejs/node/pull/52166) +* \[[`b86f575504`](https://github.com/nodejs/node/commit/b86f575504)] - **module**: do not set CJS variables for Worker eval (Antoine du Hamel) [#53050](https://github.com/nodejs/node/pull/53050) +* \[[`30ed93db12`](https://github.com/nodejs/node/commit/30ed93db12)] - **module**: cache synchronous module jobs before linking (Joyee Cheung) [#52868](https://github.com/nodejs/node/pull/52868) +* \[[`a03faf289d`](https://github.com/nodejs/node/commit/a03faf289d)] - **module**: support ESM detection in the CJS loader (Joyee Cheung) [#52047](https://github.com/nodejs/node/pull/52047) +* \[[`b07ad39bda`](https://github.com/nodejs/node/commit/b07ad39bda)] - **module**: detect ESM syntax by trying to recompile as SourceTextModule (Joyee Cheung) [#52413](https://github.com/nodejs/node/pull/52413) +* \[[`132a5c190f`](https://github.com/nodejs/node/commit/132a5c190f)] - **module**: eliminate performance cost of detection for cjs entry (Geoffrey Booth) [#52093](https://github.com/nodejs/node/pull/52093) +* \[[`55a57a189f`](https://github.com/nodejs/node/commit/55a57a189f)] - **node-api**: remove deprecated attribute from napi\_module\_register (Vladimir Morozov) [#56162](https://github.com/nodejs/node/pull/56162) +* \[[`4fba01911d`](https://github.com/nodejs/node/commit/4fba01911d)] - **(SEMVER-MINOR)** **process**: add process.features.require\_module (Joyee Cheung) [#55241](https://github.com/nodejs/node/pull/55241) +* \[[`c0fad18ac0`](https://github.com/nodejs/node/commit/c0fad18ac0)] - **src**: add nullptr handling from X509\_STORE\_new() (Burkov Egor) [#56700](https://github.com/nodejs/node/pull/56700) +* \[[`5b88d48cbb`](https://github.com/nodejs/node/commit/5b88d48cbb)] - **src**: add default value for RSACipherConfig mode field (Burkov Egor) [#56701](https://github.com/nodejs/node/pull/56701) +* \[[`e3b69e57a6`](https://github.com/nodejs/node/commit/e3b69e57a6)] - **src**: fix build with GCC 15 (tjuhaszrh) [#56740](https://github.com/nodejs/node/pull/56740) +* \[[`a7c1d8c0e8`](https://github.com/nodejs/node/commit/a7c1d8c0e8)] - **src**: initialize FSReqWrapSync in path that uses it (Michaël Zasso) [#56613](https://github.com/nodejs/node/pull/56613) +* \[[`c06ac66356`](https://github.com/nodejs/node/commit/c06ac66356)] - **src**: fix undefined script name in error source (Chengzhong Wu) [#56502](https://github.com/nodejs/node/pull/56502) +* \[[`500f3ccc66`](https://github.com/nodejs/node/commit/500f3ccc66)] - **src**: lock the thread properly in snapshot builder (Joyee Cheung) [#56327](https://github.com/nodejs/node/pull/56327) +* \[[`cf25a5edeb`](https://github.com/nodejs/node/commit/cf25a5edeb)] - **src**: drain platform tasks before creating startup snapshot (Chengzhong Wu) [#56403](https://github.com/nodejs/node/pull/56403) +* \[[`8af1b53bb8`](https://github.com/nodejs/node/commit/8af1b53bb8)] - **src**: safely remove the last line from dotenv (Shima Ryuhei) [#55982](https://github.com/nodejs/node/pull/55982) +* \[[`bb57e909aa`](https://github.com/nodejs/node/commit/bb57e909aa)] - **src**: remove `base64` from `process.versions` (Richard Lau) [#53442](https://github.com/nodejs/node/pull/53442) +* \[[`b8c89a693e`](https://github.com/nodejs/node/commit/b8c89a693e)] - **src**: add `--env-file-if-exists` flag (Bosco Domingo) [#53060](https://github.com/nodejs/node/pull/53060) +* \[[`9097de073a`](https://github.com/nodejs/node/commit/9097de073a)] - **src**: don't match after `--` in `Dotenv::GetPathFromArgs` (Aviv Keller) [#54237](https://github.com/nodejs/node/pull/54237) +* \[[`ececd225b6`](https://github.com/nodejs/node/commit/ececd225b6)] - **src**: implement IsInsideNodeModules() in C++ (Joyee Cheung) [#55286](https://github.com/nodejs/node/pull/55286) +* \[[`18593b7d3e`](https://github.com/nodejs/node/commit/18593b7d3e)] - **src**: refactor embedded entrypoint loading (Joyee Cheung) [#53573](https://github.com/nodejs/node/pull/53573) +* \[[`d7aefc0524`](https://github.com/nodejs/node/commit/d7aefc0524)] - **stream**: fix typo in ReadableStreamBYOBReader.readIntoRequests (Mattias Buelens) [#56560](https://github.com/nodejs/node/pull/56560) +* \[[`fe5f7bcd47`](https://github.com/nodejs/node/commit/fe5f7bcd47)] - **stream**: validate undefined sizeAlgorithm in WritableStream (Jason Zhang) [#56067](https://github.com/nodejs/node/pull/56067) +* \[[`12744c1fd4`](https://github.com/nodejs/node/commit/12744c1fd4)] - **test**: reduce number of written chunks (Luigi Pinca) [#56757](https://github.com/nodejs/node/pull/56757) +* \[[`e121d7d62c`](https://github.com/nodejs/node/commit/e121d7d62c)] - **test**: fix invalid common.mustSucceed() usage (Luigi Pinca) [#56756](https://github.com/nodejs/node/pull/56756) +* \[[`11b82de7ed`](https://github.com/nodejs/node/commit/11b82de7ed)] - **test**: use strict mode in global setters test (Rich Trott) [#56742](https://github.com/nodejs/node/pull/56742) +* \[[`f9d6e35c5e`](https://github.com/nodejs/node/commit/f9d6e35c5e)] - **test**: cleanup and simplify test-crypto-aes-wrap (James M Snell) [#56748](https://github.com/nodejs/node/pull/56748) +* \[[`792ce98699`](https://github.com/nodejs/node/commit/792ce98699)] - **test**: do not use common.isMainThread (Luigi Pinca) [#56768](https://github.com/nodejs/node/pull/56768) +* \[[`4f0cf475e0`](https://github.com/nodejs/node/commit/4f0cf475e0)] - **test**: add test that uses multibyte for path and resolves modules (yamachu) [#56696](https://github.com/nodejs/node/pull/56696) +* \[[`3bc8d273c2`](https://github.com/nodejs/node/commit/3bc8d273c2)] - **test**: add missing test for env file (Jonas) [#56642](https://github.com/nodejs/node/pull/56642) +* \[[`ad39367712`](https://github.com/nodejs/node/commit/ad39367712)] - **test**: enforce strict mode in test-zlib-const (Rich Trott) [#56689](https://github.com/nodejs/node/pull/56689) +* \[[`ca79914137`](https://github.com/nodejs/node/commit/ca79914137)] - **test**: test-stream-compose.js doesn't need internals (Meghan Denny) [#56619](https://github.com/nodejs/node/pull/56619) +* \[[`08bde67101`](https://github.com/nodejs/node/commit/08bde67101)] - **test**: add maxCount and gcOptions to gcUntil() (Joyee Cheung) [#56522](https://github.com/nodejs/node/pull/56522) +* \[[`40a0f6f6e3`](https://github.com/nodejs/node/commit/40a0f6f6e3)] - **test**: mark test-worker-prof as flaky on smartos (Joyee Cheung) [#56583](https://github.com/nodejs/node/pull/56583) +* \[[`d17bf2f62a`](https://github.com/nodejs/node/commit/d17bf2f62a)] - **test**: update test-child-process-bad-stdio to use node:test (Colin Ihrig) [#56562](https://github.com/nodejs/node/pull/56562) +* \[[`5660b99b43`](https://github.com/nodejs/node/commit/5660b99b43)] - **test**: disable openssl 3.4.0 incompatible tests (Jelle van der Waa) [#56160](https://github.com/nodejs/node/pull/56160) +* \[[`861c99f351`](https://github.com/nodejs/node/commit/861c99f351)] - **test**: make test-crypto-hash compatible with OpenSSL > 3.4.0 (Jelle van der Waa) [#56160](https://github.com/nodejs/node/pull/56160) +* \[[`597a39b5f9`](https://github.com/nodejs/node/commit/597a39b5f9)] - **test**: update error code in tls-psk-circuit for for OpenSSL 3.4 (sebastianas) [#56420](https://github.com/nodejs/node/pull/56420) +* \[[`721e9e1217`](https://github.com/nodejs/node/commit/721e9e1217)] - **test**: add initial test426 coverage (Chengzhong Wu) [#56436](https://github.com/nodejs/node/pull/56436) +* \[[`cfe5380c44`](https://github.com/nodejs/node/commit/cfe5380c44)] - **test**: update test-set-http-max-http-headers to use node:test (Colin Ihrig) [#56439](https://github.com/nodejs/node/pull/56439) +* \[[`51ff71a87a`](https://github.com/nodejs/node/commit/51ff71a87a)] - **test**: update test-child-process-windows-hide to use node:test (Colin Ihrig) [#56437](https://github.com/nodejs/node/pull/56437) +* \[[`d6aca0cd89`](https://github.com/nodejs/node/commit/d6aca0cd89)] - **test**: increase spin for eventloop test on s390 (Michael Dawson) [#56228](https://github.com/nodejs/node/pull/56228) +* \[[`82461af6ec`](https://github.com/nodejs/node/commit/82461af6ec)] - **test**: migrate message eval tests from Python to JS (Yiyun Lei) [#50482](https://github.com/nodejs/node/pull/50482) +* \[[`5083bbb2bb`](https://github.com/nodejs/node/commit/5083bbb2bb)] - **test**: remove async-hooks/test-writewrap flaky designation (Luigi Pinca) [#56048](https://github.com/nodejs/node/pull/56048) +* \[[`b4b26e973d`](https://github.com/nodejs/node/commit/b4b26e973d)] - **test**: deflake test-esm-loader-hooks-inspect-brk (Luigi Pinca) [#56050](https://github.com/nodejs/node/pull/56050) +* \[[`182be26b8a`](https://github.com/nodejs/node/commit/182be26b8a)] - **test**: update WPT for url to 67880a4eb83ca9aa732eec4b35a1971ff5bf37ff (Node.js GitHub Bot) [#55999](https://github.com/nodejs/node/pull/55999) +* \[[`e67a84902f`](https://github.com/nodejs/node/commit/e67a84902f)] - **test\_runner**: remove unused errors (Pietro Marchini) [#56607](https://github.com/nodejs/node/pull/56607) +* \[[`4274c6a015`](https://github.com/nodejs/node/commit/4274c6a015)] - **test\_runner**: run single test file benchmark (Pietro Marchini) [#56479](https://github.com/nodejs/node/pull/56479) +* \[[`e57004458b`](https://github.com/nodejs/node/commit/e57004458b)] - **tools**: update doc to new version (Node.js GitHub Bot) [#56259](https://github.com/nodejs/node/pull/56259) +* \[[`e039f2b571`](https://github.com/nodejs/node/commit/e039f2b571)] - **tools**: do not throw on missing `create-release-proposal.sh` (Antoine du Hamel) [#56704](https://github.com/nodejs/node/pull/56704) +* \[[`9a1e314498`](https://github.com/nodejs/node/commit/9a1e314498)] - **tools**: fix tools-deps-update (Daniel Lemire) [#56684](https://github.com/nodejs/node/pull/56684) +* \[[`d6469b5287`](https://github.com/nodejs/node/commit/d6469b5287)] - **tools**: do not throw on missing `create-release-proposal.sh` (Antoine du Hamel) [#56695](https://github.com/nodejs/node/pull/56695) +* \[[`e162476fdc`](https://github.com/nodejs/node/commit/e162476fdc)] - **tools**: fix permissions in `lint-release-proposal` workflow (Antoine du Hamel) [#56614](https://github.com/nodejs/node/pull/56614) +* \[[`914b4675c8`](https://github.com/nodejs/node/commit/914b4675c8)] - **tools**: edit `create-release-proposal` workflow (Antoine du Hamel) [#56540](https://github.com/nodejs/node/pull/56540) +* \[[`4ff9aa7235`](https://github.com/nodejs/node/commit/4ff9aa7235)] - **tools**: validate commit list as part of `lint-release-commit` (Antoine du Hamel) [#56291](https://github.com/nodejs/node/pull/56291) +* \[[`589d0ae8ea`](https://github.com/nodejs/node/commit/589d0ae8ea)] - **tools**: fix loong64 build failed (Xiao-Tao) [#56466](https://github.com/nodejs/node/pull/56466) +* \[[`bc8c39bff8`](https://github.com/nodejs/node/commit/bc8c39bff8)] - **tools**: disable unneeded rule ignoring in Python linting (Rich Trott) [#56429](https://github.com/nodejs/node/pull/56429) +* \[[`3b130002bb`](https://github.com/nodejs/node/commit/3b130002bb)] - **tools**: add release line label when opening release proposal (Antoine du Hamel) [#56317](https://github.com/nodejs/node/pull/56317) +* \[[`73b5c16684`](https://github.com/nodejs/node/commit/73b5c16684)] - **(SEMVER-MINOR)** **worker**: add postMessageToThread (Paolo Insogna) [#53682](https://github.com/nodejs/node/pull/53682) + <a id="20.18.3"></a> ## 2025-02-10, Version 20.18.3 'Iron' (LTS), @marco-ippolito diff --git a/doc/contributing/advocacy-ambassador-program.md b/doc/contributing/advocacy-ambassador-program.md index 31d8fd58a1a4bf..76f29b73586691 100644 --- a/doc/contributing/advocacy-ambassador-program.md +++ b/doc/contributing/advocacy-ambassador-program.md @@ -94,11 +94,14 @@ process. An ambassador can request promotion of content in the following ways: * Posting a link to the content in the "what's new" issue in nodejs/ambassadors so that it goes out on the news feed. -Foundation staff will repost the social media post -without any need for validation based on the request coming from -an ambassador. These requests can be made through the existing social channel -in the OpenJS Slack. For that reason and for communication purposes and -collaboration opportunities, ambassadors should be members of the +For accounts managed by foundation staff, the staff will repost the social +media post without any need for validation based on the request coming from +an ambassador. For accounts managed by the project with an approval process, +(for example bluesky) documentation for the approval process will indicate +that repost requests from ambassadors should generally be approved. These +requests can be made through the existing social channel in the OpenJS Slack. +For that reason and for communication purposes and collaboration opportunities, +ambassadors should be members of the [OpenJS Slack](https://slack-invite.openjsf.org/). ## Messages and topics to promote @@ -165,3 +168,83 @@ Some of the things to highlight include: #### Project contacts * @mhdawson + +### How things get done in the Node.js project + +#### Goal + +Help people understand that no people are paid to answer their issues or +implement their pull requests. Things get done based on what volunteers work on +and the best way to get something fixed/changed is to submit a Pull request. + +Some of the things to highlight include: + +* Nobody is paid specifically to answer issues, fix bugs or implement new features. +* No company owns/supports Node.js. Most contributions are from individuals + as opposed to organizations. When an individual becomes a collaborator + the access and priviledges are granted to the indidual, their employer does + not gain any additional rights in the project. +* The governance of the project is specifically designed to prevent one or + a small number of companies from dominating the project. +* Decisions are made by the active collaborators, there is no single person + who makes a decision for the project on their own. This can slow down + decision making but most often results in better outcomes. +* The project is open and receptive to contributions. If you need something PR + in a fix or feature. +* Maintainers are people just like you, with many priorities and end goals. We + all have the same goal of moving the Node.js project forward but at the same + time we all have other responsibilities that affect how much time we have + available to do so. +* People are volunteering their time to review your PRs and answer questions in + the issues you open. Be mindfull of your asks for their time and acknowledge + the gift of their time. Too many issues/PRs in a short period of time may + overwelm maintainers leading to less progress versus more, try to pace your + issues and PRs so that you don't have too many open at the same time. The + same goes for comments in discussions, try to avoid overwelming a discussion + with too many responses, even too much useful data can overwelm a discussion + leading to lower engagement. +* While volunteers work to do the right thing for the community, the project + does not owe anybody anything and does not tolerate abusive or + demanding language in issues, discussions or PRs. A respectful dialog will + maximize the chances of the outcome you desire. +* If you depend on timely support or an SLA, contract with a company that provides + paid support and will prioritize your issues. + +#### Related Links + +* <https://github.com/nodejs/TSC/blob/main/TSC-Charter.md#section-3-establishment-of-the-tsc> + +#### Project contacts + +* @mcollina +* @mhdawson +* @marco-ippolito + +You can find their contact email in the [`README.md`](../../README.md#tsc-technical-steering-committee) + +#### Node.js Type Stripping + +##### Goal + +The goal is to raise awareness of the Node.js TypeScript Type Stripping in the JavaScript ecosystem. +Some of the things to highlight include: + +* The benefits and limitations of the current implementation. +* The `tsconfig.json` configuration options to use in combination for type checking. +* Updates on the implementation advancements. + +#### Related Links + +<!-- lint disable prohibited-strings remark-lint--> + +* <https://github.com/nodejs/typescript> +* <https://nodejs.org/api/typescript.html> +* <https://nodejs.org/en/learn/typescript/run-natively> +* <https://satanacchio.hashnode.dev/everything-you-need-to-know-about-nodejs-type-stripping> +* <https://github.com/nodejs/amaro> + +<!-- lint enable prohibited-strings remark-lint--> + +#### Project contacts + +* @marco-ippolito diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index 38ad8e7db26bb6..e8da8e0f14014c 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -523,7 +523,6 @@ deprecation level of an API. Collaborators can opt to elevate pull requests or issues to the [TSC][]. Do this if a pull request or issue: -* Is labeled `semver-major`, or * Has a significant impact on the codebase, or * Is controversial, or * Is at an impasse among collaborators who are participating in the discussion. @@ -532,6 +531,9 @@ Do this if a pull request or issue: [TSC][]. Do not use the GitHub UI on the right-hand side to assign to `@nodejs/tsc` or request a review from `@nodejs/tsc`. +If a pull request is labeled `semver-major`, you can request a review from the +`@nodejs/tsc` GitHub team. + The TSC serves as the final arbiter where required. ## Landing pull requests diff --git a/doc/contributing/maintaining/maintaining-dependencies.md b/doc/contributing/maintaining/maintaining-dependencies.md index 940605698055ce..b4624ad4b969a3 100644 --- a/doc/contributing/maintaining/maintaining-dependencies.md +++ b/doc/contributing/maintaining/maintaining-dependencies.md @@ -219,13 +219,6 @@ an abstract syntax tree walker for the ESTree format. The [ada](https://github.com/ada-url/ada) dependency is a fast and spec-compliant URL parser written in C++. -### base64 - -The [base64](https://github.com/aklomp/base64) dependency is a base64 -stream encoding/decoding library in C99 with SIMD and OpenMP acceleration. -It also contains wrapper functions to encode/decode simple -length-delimited strings. - ### brotli The [brotli](https://github.com/google/brotli) dependency is diff --git a/doc/contributing/pull-requests.md b/doc/contributing/pull-requests.md index 2ad538b3fd8e29..8914d60c95aa2f 100644 --- a/doc/contributing/pull-requests.md +++ b/doc/contributing/pull-requests.md @@ -184,6 +184,11 @@ A good commit message should describe what changed and why. of the log. Use the `Fixes:` prefix and the full issue URL. For other references use `Refs:`. + `Fixes:` and `Refs:` trailers get automatically added to your commit message + when the Pull Request lands as long as they are included in the + Pull Request's description. If the Pull Request lands in several commits, + by default the trailers found in the description are added to each commits. + Examples: * `Fixes: https://github.com/nodejs/node/issues/1337` diff --git a/doc/contributing/releases.md b/doc/contributing/releases.md index b3b20b8ae5589e..5b6d2180515565 100644 --- a/doc/contributing/releases.md +++ b/doc/contributing/releases.md @@ -308,6 +308,22 @@ branch. git checkout -b v1.2.3-proposal upstream/v1.x-staging ``` +You can also run: + +```bash +git node release -S --prepare --security --filterLabel vX.x +``` + +Example: + +```bash +git checkout v20.x +git node release -S --prepare --security --filterLabel v20.x +``` + +to automate the remaining steps until step 6 or you can perform it manually +following the below steps. + <details> <summary>Security release</summary> @@ -1102,6 +1118,22 @@ The post content can be as simple as: > … > something here about notable changes +You can create the PR for the release post on nodejs/bluesky with the following: + +```bash +# Create a PR for a post: +gh workflow run create-pr.yml --repo "https://github.com/nodejs/bluesky" \ + -F prTitle='vx.x.x release announcement' \ + -F richText='Node.js vx.x.x is out. Check the blog post at https://nodejs.org/…. TL;DR is + +- New feature +- …' + +# Create a PR for a retweet: +gh workflow run create-pr.yml --repo "https://github.com/nodejs/bluesky" \ + -F prTitle='Retweet vx.x.x release announcement' -F postURL=… +``` + <details> <summary>Security release</summary> diff --git a/doc/contributing/security-release-process.md b/doc/contributing/security-release-process.md index 3508180e0d5687..7027b16a00d5e5 100644 --- a/doc/contributing/security-release-process.md +++ b/doc/contributing/security-release-process.md @@ -35,6 +35,7 @@ The current security stewards are documented in the main Node.js | NodeSource | Rafael | 2024-Apr-03 | | NodeSource | Rafael | 2024-Apr-10 | | NodeSource | Rafael | 2024-Jul-08 | +| NodeSource | Rafael | 2025-Jan-21 | | Datadog | Bryan | | | IBM | Joe | | | Platformatic | Matteo | | @@ -65,6 +66,8 @@ The current security stewards are documented in the main Node.js * [ ] 4\. **Requesting CVEs:** * Request CVEs for the reports with `git node security --request-cve`. * Make sure to have a green CI before requesting a CVE. + * Check if there is a need to issue a CVE for any version that became + EOL after the last security release through [this issue](https://github.com/nodejs/security-wg/issues/1419). * [ ] 5\. **Choosing or Updating Release Date:** * Get agreement on the planned date for the release. diff --git a/doc/template.html b/doc/template.html index ab8be0e747f492..34edf068df5c8d 100644 --- a/doc/template.html +++ b/doc/template.html @@ -26,6 +26,7 @@ __JS_FLAVORED_DYNAMIC_CSS__ </head> <body class="alt apidoc" id="api-section-__FILENAME__"> + <a href="#apicontent" class="skip-to-content">Skip to content</a> <div id="content" class="clearfix"> <div role="navigation" id="column2" class="interior"> <div id="intro" class="interior"> @@ -59,13 +60,13 @@ <h1>Node.js __VERSION__ documentation</h1> __GTOC_PICKER__ __ALTDOCS__ <li class="picker-header"> - <a href="#"> + <a href="#options-picker" aria-controls="options-picker"> <span class="picker-arrow"></span> Options </a> - <div class="picker"> - <ul> + <div class="picker" tabindex="-1"> + <ul id="options-picker"> <li> <a href="all.html">View on single page</a> </li> diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 275329916ab06e..56676b4d73e9f1 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -864,6 +864,10 @@ OutgoingMessage.prototype.write = function write(chunk, encoding, callback) { }; function onError(msg, err, callback) { + if (msg.destroyed) { + return; + } + const triggerAsyncId = msg.socket ? msg.socket[async_id_symbol] : undefined; defaultTriggerAsyncIdScope(triggerAsyncId, process.nextTick, @@ -875,7 +879,7 @@ function onError(msg, err, callback) { function emitErrorNt(msg, err, callback) { callback(err); - if (typeof msg.emit === 'function' && !msg._closed) { + if (typeof msg.emit === 'function' && !msg.destroyed) { msg.emit('error', err); } } diff --git a/lib/buffer.js b/lib/buffer.js index e78e2e3bb6053e..86d9803ec19ced 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -77,10 +77,10 @@ const { ONLY_ENUMERABLE, }, getOwnNonIndexProperties, + isInsideNodeModules, } = internalBinding('util'); const { customInspectSymbol, - isInsideNodeModules, lazyDOMException, normalizeEncoding, kIsEncodingSymbol, @@ -176,13 +176,15 @@ function showFlaggedDeprecation() { if (bufferWarningAlreadyEmitted || ++nodeModulesCheckCounter > 10000 || (!require('internal/options').getOptionValue('--pending-deprecation') && - isInsideNodeModules())) { + isInsideNodeModules(100, true))) { // We don't emit a warning, because we either: // - Already did so, or // - Already checked too many times whether a call is coming // from node_modules and want to stop slowing down things, or // - We aren't running with `--pending-deprecation` enabled, // and the code is inside `node_modules`. + // - We found node_modules in up to the topmost 100 frames, or + // there are more than 100 frames and we don't want to search anymore. return; } diff --git a/lib/events.js b/lib/events.js index 476571dc1f8eea..480180da89e7ca 100644 --- a/lib/events.js +++ b/lib/events.js @@ -287,6 +287,12 @@ ObjectDefineProperty(EventEmitter, 'defaultMaxListeners', { }, }); +function hasEventListener(self, type) { + if (type === undefined) + return self._events !== undefined; + return self._events !== undefined && self._events[type] !== undefined; +} + ObjectDefineProperties(EventEmitter, { kMaxEventTargetListeners: { __proto__: null, @@ -680,13 +686,11 @@ EventEmitter.prototype.removeListener = function removeListener(type, listener) { checkListener(listener); - const events = this._events; - if (events === undefined) + if (!hasEventListener(this, type)) return this; + const events = this._events; const list = events[type]; - if (list === undefined) - return this; if (list === listener || list.listener === listener) { this._eventsCount -= 1; @@ -742,9 +746,9 @@ EventEmitter.prototype.off = EventEmitter.prototype.removeListener; */ EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) { - const events = this._events; - if (events === undefined) + if (!hasEventListener(this)) return this; + const events = this._events; // Not listening for removeListener, no need to emit if (events.removeListener === undefined) { @@ -789,14 +793,10 @@ EventEmitter.prototype.removeAllListeners = }; function _listeners(target, type, unwrap) { - const events = target._events; - - if (events === undefined) + if (!hasEventListener(target, type)) return []; - const evlistener = events[type]; - if (evlistener === undefined) - return []; + const evlistener = target._events[type]; if (typeof evlistener === 'function') return unwrap ? [evlistener.listener || evlistener] : [evlistener]; diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 12262f40ce1234..2b12f9fb2966de 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -251,6 +251,8 @@ process.assert = deprecate( 'process.assert() is deprecated. Please use the `assert` module instead.', 'DEP0100'); +const { getOptionValue } = require('internal/options'); + // TODO(joyeecheung): this property has not been well-maintained, should we // deprecate it in favor of a better API? const { isDebugBuild, hasOpenSSL, hasInspector } = config; @@ -268,6 +270,9 @@ const features = { get cached_builtins() { return binding.hasCachedBuiltins(); }, + get require_module() { + return getOptionValue('--experimental-require-module'); + }, }; ObjectDefineProperty(process, 'features', { @@ -299,6 +304,7 @@ ObjectDefineProperty(process, 'features', { } const { emitWarning, emitWarningSync } = require('internal/process/warning'); + process.emitWarning = emitWarning; internalBinding('process_methods').setEmitWarningSync(emitWarningSync); diff --git a/lib/internal/child_process/serialization.js b/lib/internal/child_process/serialization.js index 365c1f6f573c74..47a23f22f67ffc 100644 --- a/lib/internal/child_process/serialization.js +++ b/lib/internal/child_process/serialization.js @@ -61,7 +61,12 @@ const advanced = { *parseChannelMessages(channel, readData) { if (readData.length === 0) return; - ArrayPrototypePush(channel[kMessageBuffer], readData); + if (channel[kMessageBufferSize] && channel[kMessageBuffer][0].length < 4) { + // Message length split into two buffers, so let's concatenate it. + channel[kMessageBuffer][0] = Buffer.concat([channel[kMessageBuffer][0], readData]); + } else { + ArrayPrototypePush(channel[kMessageBuffer], readData); + } channel[kMessageBufferSize] += readData.length; // Index 0 should always be present because we just pushed data into it. diff --git a/lib/internal/errors.js b/lib/internal/errors.js index c03e285607c9cf..262f99eb3cefba 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -1692,6 +1692,9 @@ E('ERR_PARSE_ARGS_UNKNOWN_OPTION', (option, allowPositionals) => { E('ERR_PERFORMANCE_INVALID_TIMESTAMP', '%d is not a valid timestamp', TypeError); E('ERR_PERFORMANCE_MEASURE_INVALID_OPTIONS', '%s', TypeError); +E('ERR_REQUIRE_ASYNC_MODULE', 'require() cannot be used on an ESM ' + + 'graph with top-level await. Use import() instead. To see where the' + + ' top-level await comes from, use --experimental-print-required-tla.', Error); E('ERR_REQUIRE_CYCLE_MODULE', '%s', Error); E('ERR_REQUIRE_ESM', function(filename, hasEsmSyntax, parentPath = null, packageJsonPath = null) { @@ -1769,21 +1772,6 @@ E('ERR_STREAM_WRAP', 'Stream has StringDecoder set or is in objectMode', Error); E('ERR_STREAM_WRITE_AFTER_END', 'write after end', Error); E('ERR_SYNTHETIC', 'JavaScript Callstack', Error); E('ERR_SYSTEM_ERROR', 'A system error occurred', SystemError, HideStackFramesError); -E('ERR_TAP_LEXER_ERROR', function(errorMsg) { - hideInternalStackFrames(this); - return errorMsg; -}, Error); -E('ERR_TAP_PARSER_ERROR', function(errorMsg, details, tokenCausedError, source) { - hideInternalStackFrames(this); - this.cause = tokenCausedError; - const { column, line, start, end } = tokenCausedError.location; - const errorDetails = `${details} at line ${line}, column ${column} (start ${start}, end ${end})`; - return errorMsg + errorDetails; -}, SyntaxError); -E('ERR_TAP_VALIDATION_ERROR', function(errorMsg) { - hideInternalStackFrames(this); - return errorMsg; -}, Error); E('ERR_TEST_FAILURE', function(error, failureType) { hideInternalStackFrames(this); assert(typeof failureType === 'string' || typeof failureType === 'symbol', @@ -1908,6 +1896,10 @@ E('ERR_WORKER_INIT_FAILED', 'Worker initialization failure: %s', Error); E('ERR_WORKER_INVALID_EXEC_ARGV', (errors, msg = 'invalid execArgv flags') => `Initiated Worker with ${msg}: ${ArrayPrototypeJoin(errors, ', ')}`, Error); +E('ERR_WORKER_MESSAGING_ERRORED', 'The destination thread threw an error while processing the message', Error); +E('ERR_WORKER_MESSAGING_FAILED', 'Cannot find the destination thread or listener', Error); +E('ERR_WORKER_MESSAGING_SAME_THREAD', 'Cannot sent a message to the same thread', Error); +E('ERR_WORKER_MESSAGING_TIMEOUT', 'Sending a message to another thread timed out', Error); E('ERR_WORKER_NOT_RUNNING', 'Worker instance not running', Error); E('ERR_WORKER_OUT_OF_MEMORY', 'Worker terminated due to reaching memory limit: %s', Error); diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index ca7e1fb21ccfea..d0602acb0a9f09 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -645,15 +645,21 @@ function initOriginSet(session) { if (originSet === undefined) { const socket = session[kSocket]; session[kState].originSet = originSet = new SafeSet(); - if (socket.servername != null) { - let originString = `https://${socket.servername}`; - if (socket.remotePort != null) - originString += `:${socket.remotePort}`; - // We have to ensure that it is a properly serialized - // ASCII origin string. The socket.servername might not - // be properly ASCII encoded. - originSet.add(getURLOrigin(originString)); + let hostName = socket.servername; + if (hostName === null || hostName === false) { + if (socket.remoteFamily === 'IPv6') { + hostName = `[${socket.remoteAddress}]`; + } else { + hostName = socket.remoteAddress; + } } + let originString = `https://${hostName}`; + if (socket.remotePort != null) + originString += `:${socket.remotePort}`; + // We have to ensure that it is a properly serialized + // ASCII origin string. The socket.servername might not + // be properly ASCII encoded. + originSet.add(getURLOrigin(originString)); } return originSet; } @@ -3352,7 +3358,7 @@ function connect(authority, options, listener) { socket = net.connect({ port, host, ...options }); break; case 'https:': - socket = tls.connect(port, host, initializeTLSOptions(options, host)); + socket = tls.connect(port, host, initializeTLSOptions(options, net.isIP(host) ? undefined : host)); break; default: throw new ERR_HTTP2_UNSUPPORTED_PROTOCOL(protocol); diff --git a/lib/internal/main/check_syntax.js b/lib/internal/main/check_syntax.js index 5a7ab5dc19e4e7..aa521dea92e314 100644 --- a/lib/internal/main/check_syntax.js +++ b/lib/internal/main/check_syntax.js @@ -57,23 +57,23 @@ function loadESMIfNeeded(cb) { } async function checkSyntax(source, filename) { - let isModule = true; + let format; if (filename === '[stdin]' || filename === '[eval]') { - isModule = getOptionValue('--input-type') === 'module' || - (getOptionValue('--experimental-default-type') === 'module' && getOptionValue('--input-type') !== 'commonjs'); + format = (getOptionValue('--input-type') === 'module' || + (getOptionValue('--experimental-default-type') === 'module' && getOptionValue('--input-type') !== 'commonjs')) ? + 'module' : 'commonjs'; } else { const { defaultResolve } = require('internal/modules/esm/resolve'); const { defaultGetFormat } = require('internal/modules/esm/get_format'); const { url } = await defaultResolve(pathToFileURL(filename).toString()); - const format = await defaultGetFormat(new URL(url)); - isModule = format === 'module'; + format = await defaultGetFormat(new URL(url)); } - if (isModule) { + if (format === 'module') { const { ModuleWrap } = internalBinding('module_wrap'); new ModuleWrap(filename, undefined, source, 0, 0); return; } - wrapSafe(filename, source); + wrapSafe(filename, source, undefined, format); } diff --git a/lib/internal/main/embedding.js b/lib/internal/main/embedding.js index cc7cb0eee9d837..e547e77e9090df 100644 --- a/lib/internal/main/embedding.js +++ b/lib/internal/main/embedding.js @@ -1,15 +1,116 @@ 'use strict'; + +// This main script is currently only run when LoadEnvironment() +// is run with a non-null StartExecutionCallback or a UTF8 +// main script. Effectively there are two cases where this happens: +// 1. It's a single-executable application *loading* a main script +// bundled into the executable. This is currently done from +// NodeMainInstance::Run(). +// 2. It's an embedder application and LoadEnvironment() is invoked +// as described above. + const { prepareMainThreadExecution, } = require('internal/process/pre_execution'); -const { isExperimentalSeaWarningNeeded } = internalBinding('sea'); +const { isExperimentalSeaWarningNeeded, isSea } = internalBinding('sea'); const { emitExperimentalWarning } = require('internal/util'); -const { embedderRequire, embedderRunCjs } = require('internal/util/embedding'); +const { emitWarningSync } = require('internal/process/warning'); +const { BuiltinModule: { normalizeRequirableId } } = require('internal/bootstrap/realm'); +const { Module } = require('internal/modules/cjs/loader'); +const { compileFunctionForCJSLoader } = internalBinding('contextify'); +const { maybeCacheSourceMap } = require('internal/source_map/source_map_cache'); + +const { codes: { + ERR_UNKNOWN_BUILTIN_MODULE, +} } = require('internal/errors'); +// Don't expand process.argv[1] because in a single-executable application or an +// embedder application, the user main script isn't necessarily provided via the +// command line (e.g. it could be provided via an API or bundled into the executable). prepareMainThreadExecution(false, true); +const isLoadingSea = isSea(); if (isExperimentalSeaWarningNeeded()) { emitExperimentalWarning('Single executable application'); } +// This is roughly the same as: +// +// const mod = new Module(filename); +// mod._compile(content, filename); +// +// but the code has been duplicated because currently there is no way to set the +// value of require.main to module. +// +// TODO(RaisinTen): Find a way to deduplicate this. +function embedderRunCjs(content) { + // The filename of the module (used for CJS module lookup) + // is always the same as the location of the executable itself + // at the time of the loading (which means it changes depending + // on where the executable is in the file system). + const filename = process.execPath; + const customModule = new Module(filename, null); + + const { + function: compiledWrapper, + cachedDataRejected, + sourceMapURL, + } = compileFunctionForCJSLoader( + content, + filename, + isLoadingSea, // is_sea_main + false, // should_detect_module, ESM should be supported differently for embedded code + ); + // Cache the source map for the module if present. + if (sourceMapURL) { + maybeCacheSourceMap( + filename, + content, + customModule, + false, // isGeneratedSource + undefined, // sourceURL, TODO(joyeecheung): should be extracted by V8 + sourceMapURL, + ); + } + + // cachedDataRejected is only set if cache from SEA is used. + if (cachedDataRejected !== false && isLoadingSea) { + emitWarningSync('Code cache data rejected.'); + } + + // Patch the module to make it look almost like a regular CJS module + // instance. + customModule.filename = process.execPath; + customModule.paths = Module._nodeModulePaths(process.execPath); + embedderRequire.main = customModule; + + return compiledWrapper( + customModule.exports, // exports + embedderRequire, // require + customModule, // module + process.execPath, // __filename + customModule.path, // __dirname + ); +} + +let warnedAboutBuiltins = false; + +function embedderRequire(id) { + const normalizedId = normalizeRequirableId(id); + if (!normalizedId) { + if (isLoadingSea && !warnedAboutBuiltins) { + emitWarningSync( + 'Currently the require() provided to the main script embedded into ' + + 'single-executable applications only supports loading built-in modules.\n' + + 'To load a module from disk after the single executable application is ' + + 'launched, use require("module").createRequire().\n' + + 'Support for bundled module loading or virtual file systems are under ' + + 'discussions in https://github.com/nodejs/single-executable'); + warnedAboutBuiltins = true; + } + throw new ERR_UNKNOWN_BUILTIN_MODULE(id); + } + return require(normalizedId); +} + return [process, embedderRequire, embedderRunCjs]; diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js index cfd1d1b6f18e29..54f92797323ef9 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -44,6 +44,8 @@ const { kStdioWantsMoreDataCallback, } = workerIo; +const { setupMainThreadPort } = require('internal/worker/messaging'); + const { onGlobalUncaughtException, } = require('internal/process/execution'); @@ -99,6 +101,7 @@ port.on('message', (message) => { manifestURL, publicPort, workerData, + mainThreadPort, } = message; if (doEval !== 'internal') { @@ -112,6 +115,7 @@ port.on('message', (message) => { } require('internal/worker').assignEnvironmentData(environmentData); + setupMainThreadPort(mainThreadPort); if (SharedArrayBuffer !== undefined && Atomics !== undefined) { // The counter is only passed to the workers created by the main thread, diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index c284b39b1ac13e..ebccdb28256314 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -41,6 +41,7 @@ const { ObjectFreeze, ObjectGetOwnPropertyDescriptor, ObjectGetPrototypeOf, + ObjectHasOwn, ObjectKeys, ObjectPrototype, ObjectPrototypeHasOwnProperty, @@ -69,9 +70,10 @@ const { module_export_private_symbol, module_parent_private_symbol, }, + isInsideNodeModules, } = internalBinding('util'); -const { kEvaluated } = internalBinding('module_wrap'); +const { kEvaluated, createRequiredModuleFacade } = internalBinding('module_wrap'); // Internal properties for Module instances. /** @@ -125,6 +127,7 @@ const { kEmptyObject, setOwnProperty, getLazy, + isUnderNodeModules, } = require('internal/util'); const { makeContextifyScript, @@ -434,7 +437,6 @@ function initializeCJS() { require('internal/modules/run_main').executeUserEntryPoint; if (getOptionValue('--experimental-require-module')) { - emitExperimentalWarning('Support for loading ES Module in require()'); Module._extensions['.mjs'] = loadESMFromCJS; } } @@ -691,18 +693,8 @@ Module._findPath = function(request, paths, isMain) { ) )); - const isRelative = StringPrototypeCharCodeAt(request, 0) === CHAR_DOT && - ( - request.length === 1 || - StringPrototypeCharCodeAt(request, 1) === CHAR_FORWARD_SLASH || - (isWindows && StringPrototypeCharCodeAt(request, 1) === CHAR_BACKWARD_SLASH) || - (StringPrototypeCharCodeAt(request, 1) === CHAR_DOT && (( - request.length === 2 || - StringPrototypeCharCodeAt(request, 2) === CHAR_FORWARD_SLASH) || - (isWindows && StringPrototypeCharCodeAt(request, 2) === CHAR_BACKWARD_SLASH))) - ); let insidePath = true; - if (isRelative) { + if (isRelative(request)) { const normalizedRequest = path.normalize(request); if (StringPrototypeStartsWith(normalizedRequest, '..')) { insidePath = false; @@ -1145,12 +1137,7 @@ Module._resolveFilename = function(request, parent, isMain, options) { if (typeof options === 'object' && options !== null) { if (ArrayIsArray(options.paths)) { - const isRelative = StringPrototypeStartsWith(request, './') || - StringPrototypeStartsWith(request, '../') || - ((isWindows && StringPrototypeStartsWith(request, '.\\')) || - StringPrototypeStartsWith(request, '..\\')); - - if (isRelative) { + if (isRelative(request)) { paths = options.paths; } else { const fakeParent = new Module('', null); @@ -1314,15 +1301,7 @@ Module.prototype.require = function(id) { } }; -/** - * Resolved path to `process.argv[1]` will be lazily placed here - * (needed for setting breakpoint when called with `--inspect-brk`). - * @type {string | undefined} - */ -let resolvedArgv; -let hasPausedEntry = false; -/** @type {import('vm').Script} */ - +let requireModuleWarningMode; /** * Resolve and evaluate it synchronously as ESM if it's ESM. * @param {Module} mod CJS module instance @@ -1332,19 +1311,124 @@ function loadESMFromCJS(mod, filename) { const source = getMaybeCachedSource(mod, filename); const cascadedLoader = require('internal/modules/esm/loader').getOrInitializeCascadedLoader(); const isMain = mod[kIsMainSymbol]; - // TODO(joyeecheung): we may want to invent optional special handling for default exports here. - // For now, it's good enough to be identical to what `import()` returns. - mod.exports = cascadedLoader.importSyncForRequire(mod, filename, source, isMain, mod[kModuleParent]); + if (isMain) { + require('internal/modules/run_main').runEntryPointWithESMLoader((cascadedLoader) => { + const mainURL = pathToFileURL(filename).href; + return cascadedLoader.import(mainURL, undefined, { __proto__: null }, true); + }); + // ESM won't be accessible via process.mainModule. + setOwnProperty(process, 'mainModule', undefined); + } else { + const parent = mod[kModuleParent]; + + requireModuleWarningMode ??= getOptionValue('--trace-require-module'); + if (requireModuleWarningMode) { + let shouldEmitWarning = false; + if (requireModuleWarningMode === 'no-node-modules') { + // Check if the require() comes from node_modules. + if (parent) { + shouldEmitWarning = !isUnderNodeModules(parent.filename); + } else if (mod[kIsCachedByESMLoader]) { + // It comes from the require() built for `import cjs` and doesn't have a parent recorded + // in the CJS module instance. Inspect the stack trace to see if the require() + // comes from node_modules and reduce the noise. If there are more than 100 frames, + // just give up and assume it is under node_modules. + shouldEmitWarning = !isInsideNodeModules(100, true); + } + } else { + shouldEmitWarning = true; + } + if (shouldEmitWarning) { + let messagePrefix; + if (parent) { + // In the case of the module calling `require()`, it's more useful to know its absolute path. + let from = parent.filename || parent.id; + // In the case of the module being require()d, it's more useful to know the id passed into require(). + const to = mod.id || mod.filename; + if (from === 'internal/preload') { + from = '--require'; + } else if (from === '<repl>') { + from = 'The REPL'; + } else if (from === '.') { + from = 'The entry point'; + } else { + from &&= `CommonJS module ${from}`; + } + if (from && to) { + messagePrefix = `${from} is loading ES Module ${to} using require().\n`; + } + } + emitExperimentalWarning('Support for loading ES Module in require()', + messagePrefix, + undefined, + parent?.require); + requireModuleWarningMode = true; + } + } + const { + wrap, + namespace, + } = cascadedLoader.importSyncForRequire(mod, filename, source, isMain, parent); + // Tooling in the ecosystem have been using the __esModule property to recognize + // transpiled ESM in consuming code. For example, a 'log' package written in ESM: + // + // export default function log(val) { console.log(val); } + // + // Can be transpiled as: + // + // exports.__esModule = true; + // exports.default = function log(val) { console.log(val); } + // + // The consuming code may be written like this in ESM: + // + // import log from 'log' + // + // Which gets transpiled to: + // + // const _mod = require('log'); + // const log = _mod.__esModule ? _mod.default : _mod; + // + // So to allow transpiled consuming code to recognize require()'d real ESM + // as ESM and pick up the default exports, we add a __esModule property by + // building a source text module facade for any module that has a default + // export and add .__esModule = true to the exports. This maintains the + // enumerability of the re-exported names and the live binding of the exports, + // without incurring a non-trivial per-access overhead on the exports. + // + // The source of the facade is defined as a constant per-isolate property + // required_module_default_facade_source_string, which looks like this + // + // export * from 'original'; + // export { default } from 'original'; + // export const __esModule = true; + // + // And the 'original' module request is always resolved by + // createRequiredModuleFacade() to `wrap` which is a ModuleWrap wrapping + // over the original module. + + // We don't do this to modules that are marked as CJS ESM or that + // don't have default exports to avoid the unnecessary overhead. + // If __esModule is already defined, we will also skip the extension + // to allow users to override it. + if (ObjectHasOwn(namespace, 'module.exports')) { + mod.exports = namespace['module.exports']; + } else if (!ObjectHasOwn(namespace, 'default') || ObjectHasOwn(namespace, '__esModule')) { + mod.exports = namespace; + } else { + mod.exports = createRequiredModuleFacade(wrap); + } + } } /** * Wraps the given content in a script and runs it in a new context. * @param {string} filename The name of the file being loaded * @param {string} content The content of the file being loaded - * @param {Module} cjsModuleInstance The CommonJS loader instance - * @param {object} codeCache The SEA code cache + * @param {Module|undefined} cjsModuleInstance The CommonJS loader instance + * @param {'commonjs'|undefined} format Intended format of the module. */ -function wrapSafe(filename, content, cjsModuleInstance, codeCache) { +function wrapSafe(filename, content, cjsModuleInstance, format) { + assert(format !== 'module', 'ESM should be handled in loadESMFromCJS()'); const hostDefinedOptionId = vm_dynamic_import_default_internal; const importModuleDynamically = vm_dynamic_import_default_internal; if (patched) { @@ -1364,7 +1448,7 @@ function wrapSafe(filename, content, cjsModuleInstance, codeCache) { // Cache the source map for the module if present. const { sourceMapURL } = script; if (sourceMapURL) { - maybeCacheSourceMap(filename, content, this, false, undefined, sourceMapURL); + maybeCacheSourceMap(filename, content, cjsModuleInstance, false, undefined, sourceMapURL); } return { @@ -1374,29 +1458,25 @@ function wrapSafe(filename, content, cjsModuleInstance, codeCache) { }; } - try { - const result = compileFunctionForCJSLoader(content, filename); - - // cachedDataRejected is only set for cache coming from SEA. - if (codeCache && - result.cachedDataRejected !== false && - internalBinding('sea').isSea()) { - process.emitWarning('Code cache data rejected.'); - } - - // Cache the source map for the module if present. - if (result.sourceMapURL) { - maybeCacheSourceMap(filename, content, this, false, undefined, result.sourceMapURL); + let shouldDetectModule = false; + if (format !== 'commonjs') { + if (cjsModuleInstance?.[kIsMainSymbol]) { + // For entry points, format detection is used unless explicitly disabled. + shouldDetectModule = getOptionValue('--experimental-detect-module'); + } else { + // For modules being loaded by `require()`, if require(esm) is disabled, + // don't try to reparse to detect format and just throw for ESM syntax. + shouldDetectModule = getOptionValue('--experimental-require-module'); } + } + const result = compileFunctionForCJSLoader(content, filename, false /* is_sea_main */, shouldDetectModule); - return result; - } catch (err) { - if (process.mainModule === cjsModuleInstance) { - const { enrichCJSError } = require('internal/modules/esm/translators'); - enrichCJSError(err, content, filename); - } - throw err; + // Cache the source map for the module if present. + if (result.sourceMapURL) { + maybeCacheSourceMap(filename, content, cjsModuleInstance, false, undefined, result.sourceMapURL); } + + return result; } /** @@ -1404,9 +1484,9 @@ function wrapSafe(filename, content, cjsModuleInstance, codeCache) { * `exports`) to the file. Returns exception, if any. * @param {string} content The source code of the module * @param {string} filename The file path of the module - * @param {boolean} loadAsESM Whether it's known to be ESM via .mjs or "type" in package.json. + * @param {'module'|'commonjs'|undefined} format Intended format of the module. */ -Module.prototype._compile = function(content, filename, loadAsESM = false) { +Module.prototype._compile = function(content, filename, format) { let moduleURL; let redirects; const manifest = policy()?.manifest; @@ -1416,43 +1496,22 @@ Module.prototype._compile = function(content, filename, loadAsESM = false) { manifest.assertIntegrity(moduleURL, content); } - // TODO(joyeecheung): when the module is the entry point, consider allowing TLA. - // Only modules being require()'d really need to avoid TLA. - if (loadAsESM) { + let compiledWrapper; + if (format !== 'module') { + const result = wrapSafe(filename, content, this, format); + compiledWrapper = result.function; + if (result.canParseAsESM) { + format = 'module'; + } + } + + if (format === 'module') { // Pass the source into the .mjs extension handler indirectly through the cache. this[kModuleSource] = content; loadESMFromCJS(this, filename); return; } - const { function: compiledWrapper } = wrapSafe(filename, content, this); - - // TODO(joyeecheung): the detection below is unnecessarily complex. Using the - // kIsMainSymbol, or a kBreakOnStartSymbol that gets passed from - // higher level instead of doing hacky detection here. - let inspectorWrapper = null; - if (getOptionValue('--inspect-brk') && process._eval == null) { - if (!resolvedArgv) { - // We enter the repl if we're not given a filename argument. - if (process.argv[1]) { - try { - resolvedArgv = Module._resolveFilename(process.argv[1], null, false); - } catch { - // We only expect this codepath to be reached in the case of a - // preloaded module (it will fail earlier with the main entry) - assert(ArrayIsArray(getOptionValue('--require'))); - } - } else { - resolvedArgv = 'repl'; - } - } - - // Set breakpoint on module start - if (resolvedArgv && !hasPausedEntry && filename === resolvedArgv) { - hasPausedEntry = true; - inspectorWrapper = internalBinding('inspector').callAndPauseOnStart; - } - } const dirname = path.dirname(filename); const require = makeRequireFunction(this, redirects); let result; @@ -1462,9 +1521,10 @@ Module.prototype._compile = function(content, filename, loadAsESM = false) { if (requireDepth === 0) { statCache = new SafeMap(); } setHasStartedUserCJSExecution(); this[kIsExecuting] = true; - if (inspectorWrapper) { - result = inspectorWrapper(compiledWrapper, thisValue, exports, - require, module, filename, dirname); + if (this[kIsMainSymbol] && getOptionValue('--inspect-brk')) { + const { callAndPauseOnStart } = internalBinding('inspector'); + result = callAndPauseOnStart(compiledWrapper, thisValue, exports, + require, module, filename, dirname); } else { result = ReflectApply(compiledWrapper, thisValue, [exports, require, module, filename, dirname]); @@ -1503,12 +1563,13 @@ Module._extensions['.js'] = function(module, filename) { // If already analyzed the source, then it will be cached. const content = getMaybeCachedSource(module, filename); + let format; if (StringPrototypeEndsWith(filename, '.js')) { const pkg = packageJsonReader.readPackageScope(filename) || { __proto__: null }; // Function require shouldn't be used in ES modules. if (pkg.data?.type === 'module') { if (getOptionValue('--experimental-require-module')) { - module._compile(content, filename, true); + module._compile(content, filename, 'module'); return; } @@ -1542,10 +1603,14 @@ Module._extensions['.js'] = function(module, filename) { } } throw err; + } else if (pkg.data?.type === 'commonjs') { + format = 'commonjs'; } + } else if (StringPrototypeEndsWith(filename, '.cjs')) { + format = 'commonjs'; } - module._compile(content, filename, false); + module._compile(content, filename, format); }; /** @@ -1635,6 +1700,21 @@ function createRequire(filename) { return createRequireFromPath(filepath); } +/** + * Checks if a path is relative + * @param {string} path the target path + * @returns {boolean} true if the path is relative, false otherwise + */ +function isRelative(path) { + if (StringPrototypeCharCodeAt(path, 0) !== CHAR_DOT) { return false; } + + return path.length === 1 || path === '..' || + StringPrototypeStartsWith(path, './') || + StringPrototypeStartsWith(path, '../') || + ((isWindows && StringPrototypeStartsWith(path, '.\\')) || + StringPrototypeStartsWith(path, '..\\')); +} + Module.createRequire = createRequire; /** diff --git a/lib/internal/modules/esm/get_format.js b/lib/internal/modules/esm/get_format.js index 1fe5564545dbc8..fe7528e32a497c 100644 --- a/lib/internal/modules/esm/get_format.js +++ b/lib/internal/modules/esm/get_format.js @@ -17,6 +17,7 @@ const { mimeToFormat, } = require('internal/modules/esm/formats'); +const detectModule = getOptionValue('--experimental-detect-module'); const experimentalNetworkImports = getOptionValue('--experimental-network-imports'); const { containsModuleSyntax } = internalBinding('contextify'); @@ -33,6 +34,17 @@ const protocolHandlers = { 'node:'() { return 'builtin'; }, }; +/** + * Determine whether the given ambiguous source contains CommonJS or ES module syntax. + * @param {string | Buffer | undefined} source + * @param {URL} url + */ +function detectModuleFormat(source, url) { + if (!source) { return detectModule ? null : 'commonjs'; } + if (!detectModule) { return 'commonjs'; } + return containsModuleSyntax(`${source}`, fileURLToPath(url), url) ? 'module' : 'commonjs'; +} + /** * @param {URL} parsed * @returns {string | null} @@ -83,6 +95,19 @@ function underNodeModules(url) { } let typelessPackageJsonFilesWarnedAbout; +function warnTypelessPackageJsonFile(pjsonPath, url) { + typelessPackageJsonFilesWarnedAbout ??= new SafeSet(); + if (!underNodeModules(url) && !typelessPackageJsonFilesWarnedAbout.has(pjsonPath)) { + const warning = `Module type of ${url} is not specified and it doesn't parse as CommonJS.\n` + + 'Reparsing as ES module because module syntax was detected. This incurs a performance overhead.\n' + + `To eliminate this warning, add "type": "module" to ${pjsonPath}.`; + process.emitWarning(warning, { + code: 'MODULE_TYPELESS_PACKAGE_JSON', + }); + typelessPackageJsonFilesWarnedAbout.add(pjsonPath); + } +} + /** * @param {URL} url * @param {{parentURL: string; source?: Buffer}} context @@ -94,7 +119,7 @@ function getFileProtocolModuleFormat(url, context = { __proto__: null }, ignoreE const ext = extname(url); if (ext === '.js') { - const { type: packageType, pjsonPath } = getPackageScopeConfig(url); + const { type: packageType, pjsonPath, exists: foundPackageJson } = getPackageScopeConfig(url); if (packageType !== 'none') { return packageType; } @@ -112,26 +137,15 @@ function getFileProtocolModuleFormat(url, context = { __proto__: null }, ignoreE default: { // The user did not pass `--experimental-default-type`. // `source` is undefined when this is called from `defaultResolve`; // but this gets called again from `defaultLoad`/`defaultLoadSync`. - if (getOptionValue('--experimental-detect-module')) { - const format = source ? - (containsModuleSyntax(`${source}`, fileURLToPath(url)) ? 'module' : 'commonjs') : - null; - if (format === 'module') { - // This module has a .js extension, a package.json with no `type` field, and ESM syntax. - // Warn about the missing `type` field so that the user can avoid the performance penalty of detection. - typelessPackageJsonFilesWarnedAbout ??= new SafeSet(); - if (!typelessPackageJsonFilesWarnedAbout.has(pjsonPath)) { - const warning = `${url} parsed as an ES module because module syntax was detected;` + - ` to avoid the performance penalty of syntax detection, add "type": "module" to ${pjsonPath}`; - process.emitWarning(warning, { - code: 'MODULE_TYPELESS_PACKAGE_JSON', - }); - typelessPackageJsonFilesWarnedAbout.add(pjsonPath); - } - } - return format; + // For ambiguous files (no type field, .js extension) we return + // undefined from `resolve` and re-run the check in `load`. + const format = detectModuleFormat(source, url); + if (format === 'module' && foundPackageJson) { + // This module has a .js extension, a package.json with no `type` field, and ESM syntax. + // Warn about the missing `type` field so that the user can avoid the performance penalty of detection. + warnTypelessPackageJsonFile(pjsonPath, url); } - return 'commonjs'; + return format; } } } @@ -154,15 +168,14 @@ function getFileProtocolModuleFormat(url, context = { __proto__: null }, ignoreE return 'commonjs'; } default: { // The user did not pass `--experimental-default-type`. - if (getOptionValue('--experimental-detect-module')) { - if (!source) { return null; } - const format = getFormatOfExtensionlessFile(url); - if (format === 'module') { - return containsModuleSyntax(`${source}`, fileURLToPath(url)) ? 'module' : 'commonjs'; - } + if (!source) { + return null; + } + const format = getFormatOfExtensionlessFile(url); + if (format === 'wasm') { return format; } - return 'commonjs'; + return detectModuleFormat(source, url); } } } diff --git a/lib/internal/modules/esm/hooks.js b/lib/internal/modules/esm/hooks.js index 88c66f89a83c66..c13d7c8ad3321c 100644 --- a/lib/internal/modules/esm/hooks.js +++ b/lib/internal/modules/esm/hooks.js @@ -38,7 +38,7 @@ const { ERR_WORKER_UNSERIALIZABLE_ERROR, } = require('internal/errors').codes; const { exitCodes: { kUnfinishedTopLevelAwait } } = internalBinding('errors'); -const { URL } = require('internal/url'); +const { URLParse } = require('internal/url'); const { canParse: URLCanParse } = internalBinding('url'); const { receiveMessageOnPort } = require('worker_threads'); const { @@ -471,11 +471,7 @@ class Hooks { let responseURLObj; if (typeof responseURL === 'string') { - try { - responseURLObj = new URL(responseURL); - } catch { - // responseURLObj not defined will throw in next branch. - } + responseURLObj = URLParse(responseURL); } if (responseURLObj?.href !== responseURL) { diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js index 7b77af35a1dfeb..d5004f4495bacc 100644 --- a/lib/internal/modules/esm/load.js +++ b/lib/internal/modules/esm/load.js @@ -5,7 +5,9 @@ const { RegExpPrototypeExec, decodeURIComponent, } = primordials; -const { kEmptyObject } = require('internal/util'); +const { + kEmptyObject, +} = require('internal/util'); const { defaultGetFormat } = require('internal/modules/esm/get_format'); const { validateAttributes, emitImportAssertionWarning } = require('internal/modules/esm/assert'); @@ -152,11 +154,6 @@ async function defaultLoad(url, context = kEmptyObject) { validateAttributes(url, format, importAttributes); - // Use the synchronous commonjs translator which can deal with cycles. - if (format === 'commonjs' && getOptionValue('--experimental-require-module')) { - format = 'commonjs-sync'; - } - return { __proto__: null, format, @@ -206,11 +203,6 @@ function defaultLoadSync(url, context = kEmptyObject) { validateAttributes(url, format, importAttributes); - // Use the synchronous commonjs translator which can deal with cycles. - if (format === 'commonjs' && getOptionValue('--experimental-require-module')) { - format = 'commonjs-sync'; - } - return { __proto__: null, format, diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js index 9c7a52019ced60..5712472c114bb8 100644 --- a/lib/internal/modules/esm/loader.js +++ b/lib/internal/modules/esm/loader.js @@ -22,20 +22,20 @@ const { imported_cjs_symbol } = internalBinding('symbols'); const assert = require('internal/assert'); const { + ERR_REQUIRE_ASYNC_MODULE, ERR_REQUIRE_CYCLE_MODULE, ERR_REQUIRE_ESM, ERR_NETWORK_IMPORT_DISALLOWED, ERR_UNKNOWN_MODULE_FORMAT, } = require('internal/errors').codes; const { getOptionValue } = require('internal/options'); -const { isURL, pathToFileURL, URL } = require('internal/url'); +const { isURL, pathToFileURL, URLParse } = require('internal/url'); const { emitExperimentalWarning, kEmptyObject } = require('internal/util'); const { compileSourceTextModule, getDefaultConditions, } = require('internal/modules/esm/utils'); const { kImplicitAssertType } = require('internal/modules/esm/assert'); -const { canParse } = internalBinding('url'); const { ModuleWrap, kEvaluating, kEvaluated } = internalBinding('module_wrap'); const { urlToFilename, @@ -43,6 +43,8 @@ const { let defaultResolve, defaultLoad, defaultLoadSync, importMetaInitializer; /** + * @typedef {import('./hooks.js').HooksProxy} HooksProxy + * @typedef {import('./module_job.js').ModuleJobBase} ModuleJobBase * @typedef {import('url').URL} URL */ @@ -138,6 +140,7 @@ class ModuleLoader { * to this property and failure to do so will cause undefined * behavior when invoking `import.meta.resolve`. * @see {ModuleLoader.setCustomizations} + * @type {CustomizedModuleLoader} */ #customizations; @@ -194,7 +197,7 @@ class ModuleLoader { * * Calling this function alters how modules are loaded and should be * invoked with care. - * @param {object} customizations + * @param {CustomizedModuleLoader} customizations */ setCustomizations(customizations) { this.#customizations = customizations; @@ -206,12 +209,10 @@ class ModuleLoader { } async eval(source, url) { - const evalInstance = (url) => { - return compileSourceTextModule(url, source, this); - }; const { ModuleJob } = require('internal/modules/esm/module_job'); + const wrap = compileSourceTextModule(url, source, this); const job = new ModuleJob( - this, url, undefined, evalInstance, false, false); + this, url, undefined, wrap, false, false); this.loadCache.set(url, undefined, job); const { module } = await job.run(); @@ -223,40 +224,49 @@ class ModuleLoader { } /** - * Get a (possibly still pending) module job from the cache, - * or create one and return its Promise. - * @param {string} specifier The string after `from` in an `import` statement, - * or the first parameter of an `import()` - * expression - * @param {string | undefined} parentURL The URL of the module importing this - * one, unless this is the Node.js entry - * point. - * @param {Record<string, string>} importAttributes Validations for the - * module import. - * @returns {Promise<ModuleJob>} The (possibly pending) module job + * Get a (possibly not yet fully linked) module job from the cache, or create one and return its Promise. + * @param {string} specifier The module request of the module to be resolved. Typically, what's + * requested by `import '<specifier>'` or `import('<specifier>')`. + * @param {string} [parentURL] The URL of the module where the module request is initiated. + * It's undefined if it's from the root module. + * @param {ImportAttributes} importAttributes Attributes from the import statement or expression. + * @returns {Promise<ModuleJobBase>} */ - async getModuleJob(specifier, parentURL, importAttributes) { + async getModuleJobForImport(specifier, parentURL, importAttributes) { const resolveResult = await this.resolve(specifier, parentURL, importAttributes); - return this.getJobFromResolveResult(resolveResult, parentURL, importAttributes); + return this.#getJobFromResolveResult(resolveResult, parentURL, importAttributes, false); } - getModuleJobSync(specifier, parentURL, importAttributes) { + /** + * Similar to {@link getModuleJobForImport} but it's used for `require()` resolved by the ESM loader + * in imported CJS modules. This runs synchronously and when it returns, the module job's module + * requests are all linked. + * @param {string} specifier See {@link getModuleJobForImport} + * @param {string} [parentURL] See {@link getModuleJobForImport} + * @param {ImportAttributes} importAttributes See {@link getModuleJobForImport} + * @returns {Promise<ModuleJobBase>} + */ + getModuleJobForRequireInImportedCJS(specifier, parentURL, importAttributes) { const resolveResult = this.resolveSync(specifier, parentURL, importAttributes); - return this.getJobFromResolveResult(resolveResult, parentURL, importAttributes, true); + return this.#getJobFromResolveResult(resolveResult, parentURL, importAttributes, true); } - getJobFromResolveResult(resolveResult, parentURL, importAttributes, sync) { + /** + * Given a resolved module request, obtain a ModuleJobBase from it - if it's already cached, + * return the cached ModuleJobBase. Otherwise, load its source and translate it into a ModuleWrap first. + * @param {{ format: string, url: string }} resolveResult Resolved module request. + * @param {string} [parentURL] See {@link getModuleJobForImport} + * @param {ImportAttributes} importAttributes See {@link getModuleJobForImport} + * @param {boolean} isForRequireInImportedCJS Whether this is done for require() in imported CJS. + * @returns {ModuleJobBase} + */ + #getJobFromResolveResult(resolveResult, parentURL, importAttributes, isForRequireInImportedCJS = false) { const { url, format } = resolveResult; const resolvedImportAttributes = resolveResult.importAttributes ?? importAttributes; let job = this.loadCache.get(url, resolvedImportAttributes.type); - // CommonJS will set functions for lazy job evaluation. - if (typeof job === 'function') { - this.loadCache.set(url, undefined, job = job()); - } - if (job === undefined) { - job = this.#createModuleJob(url, resolvedImportAttributes, parentURL, format, sync); + job = this.#createModuleJob(url, resolvedImportAttributes, parentURL, format, isForRequireInImportedCJS); } return job; @@ -270,7 +280,7 @@ class ModuleLoader { * @param {string} source Source code. TODO(joyeecheung): pass the raw buffer. * @param {string} isMain Whether this module is a main module. * @param {CJSModule|undefined} parent Parent module, if any. - * @returns {{ModuleWrap}} + * @returns {{wrap: ModuleWrap, namespace: ModuleNamespaceObject}} */ importSyncForRequire(mod, filename, source, isMain, parent) { const url = pathToFileURL(filename).href; @@ -287,6 +297,9 @@ class ModuleLoader { // evaluated at this point. if (job !== undefined) { mod[kRequiredModuleSymbol] = job.module; + if (job.module.async) { + throw new ERR_REQUIRE_ASYNC_MODULE(); + } if (job.module.getStatus() !== kEvaluated) { const parentFilename = urlToFilename(parent?.filename); let message = `Cannot require() ES Module ${filename} in a cycle.`; @@ -295,7 +308,7 @@ class ModuleLoader { } throw new ERR_REQUIRE_CYCLE_MODULE(message); } - return job.module.getNamespaceSync(); + return { wrap: job.module, namespace: job.module.getNamespaceSync() }; } // TODO(joyeecheung): refactor this so that we pre-parse in C++ and hit the // cache here, or use a carrier object to carry the compiled module script @@ -307,7 +320,7 @@ class ModuleLoader { job = new ModuleJobSync(this, url, kEmptyObject, wrap, isMain, inspectBrk); this.loadCache.set(url, kImplicitAssertType, job); mod[kRequiredModuleSymbol] = job.module; - return job.runSync().namespace; + return { wrap: job.module, namespace: job.runSync().namespace }; } /** @@ -318,11 +331,10 @@ class ModuleLoader { * @param {object} importAttributes import attributes from the import statement. * @returns {ModuleJobBase} */ - getModuleWrapForRequire(specifier, parentURL, importAttributes) { - assert(getOptionValue('--experimental-require-module')); - - if (canParse(specifier)) { - const protocol = new URL(specifier).protocol; + getModuleJobForRequire(specifier, parentURL, importAttributes) { + const parsed = URLParse(specifier); + if (parsed != null) { + const protocol = parsed.protocol; if (protocol === 'https:' || protocol === 'http:') { throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parentURL, 'ES modules cannot be loaded by require() from the network'); @@ -330,14 +342,13 @@ class ModuleLoader { assert(protocol === 'file:' || protocol === 'node:' || protocol === 'data:'); } - const requestKey = this.#resolveCache.serializeKey(specifier, importAttributes); - let resolveResult = this.#resolveCache.get(requestKey, parentURL); - if (resolveResult == null) { - resolveResult = this.defaultResolve(specifier, parentURL, importAttributes); - this.#resolveCache.set(requestKey, parentURL, resolveResult); - } - + // TODO(joyeecheung): consolidate cache behavior and use resolveSync() and + // loadSync() here. + const resolveResult = this.#cachedDefaultResolve(specifier, parentURL, importAttributes); const { url, format } = resolveResult; + if (!getOptionValue('--experimental-require-module')) { + throw new ERR_REQUIRE_ESM(url, true); + } const resolvedImportAttributes = resolveResult.importAttributes ?? importAttributes; let job = this.loadCache.get(url, resolvedImportAttributes.type); if (job !== undefined) { @@ -360,25 +371,18 @@ class ModuleLoader { defaultLoadSync ??= require('internal/modules/esm/load').defaultLoadSync; const loadResult = defaultLoadSync(url, { format, importAttributes }); - const { - format: finalFormat, - responseURL, - source, - } = loadResult; - this.validateLoadResult(url, finalFormat); + // Use the synchronous commonjs translator which can deal with cycles. + const finalFormat = loadResult.format === 'commonjs' ? 'commonjs-sync' : loadResult.format; + if (finalFormat === 'wasm') { assert.fail('WASM is currently unsupported by require(esm)'); } - const translator = getTranslators().get(finalFormat); - if (!translator) { - throw new ERR_UNKNOWN_MODULE_FORMAT(finalFormat, responseURL); - } - + const { source } = loadResult; const isMain = (parentURL === undefined); - const wrap = FunctionPrototypeCall(translator, this, responseURL, source, isMain); - assert(wrap instanceof ModuleWrap); // No asynchronous translators should be called. + const wrap = this.#translate(url, finalFormat, source, isMain); + assert(wrap instanceof ModuleWrap, `Translator used for require(${url}) should not be async`); if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) { process.send({ 'watch:import': [url] }); @@ -407,33 +411,96 @@ class ModuleLoader { } /** - * Create and cache an object representing a loaded module. - * @param {string} url The absolute URL that was resolved for this module - * @param {Record<string, string>} importAttributes Validations for the - * module import. - * @param {string} [parentURL] The absolute URL of the module importing this - * one, unless this is the Node.js entry point - * @param {string} [format] The format hint possibly returned by the - * `resolve` hook - * @returns {Promise<ModuleJob>} The (possibly pending) module job + * Translate a loaded module source into a ModuleWrap. This is run synchronously, + * but the translator may return the ModuleWrap in a Promise. + * @param {stirng} url URL of the module to be translated. + * @param {string} format Format of the module to be translated. This is used to find + * matching translators. + * @param {ModuleSource} source Source of the module to be translated. + * @param {boolean} isMain Whether the module to be translated is the entry point. + * @returns {ModuleWrap | Promise<ModuleWrap>} */ - #createModuleJob(url, importAttributes, parentURL, format, sync) { - const callTranslator = ({ format: finalFormat, responseURL, source }, isMain) => { - const translator = getTranslators().get(finalFormat); + #translate(url, format, source, isMain) { + this.validateLoadResult(url, format); + const translator = getTranslators().get(format); + + if (!translator) { + throw new ERR_UNKNOWN_MODULE_FORMAT(format, url); + } + + return FunctionPrototypeCall(translator, this, url, source, isMain); + } - if (!translator) { - throw new ERR_UNKNOWN_MODULE_FORMAT(finalFormat, responseURL); + /** + * Load a module and translate it into a ModuleWrap for require() in imported CJS. + * This is run synchronously, and the translator always return a ModuleWrap synchronously. + * @param {string} url URL of the module to be translated. + * @param {object} loadContext See {@link load} + * @param {boolean} isMain Whether the module to be translated is the entry point. + * @returns {ModuleWrap} + */ + loadAndTranslateForRequireInImportedCJS(url, loadContext, isMain) { + const { format: formatFromLoad, source } = this.#loadSync(url, loadContext); + + if (formatFromLoad === 'wasm') { // require(wasm) is not supported. + throw new ERR_UNKNOWN_MODULE_FORMAT(formatFromLoad, url); + } + + if (formatFromLoad === 'module' || formatFromLoad === 'module-typescript') { + if (!getOptionValue('--experimental-require-module')) { + throw new ERR_REQUIRE_ESM(url, true); } + } - return FunctionPrototypeCall(translator, this, responseURL, source, isMain); - }; - const context = { format, importAttributes }; + let finalFormat = formatFromLoad; + if (formatFromLoad === 'commonjs') { + finalFormat = 'require-commonjs'; + } + if (formatFromLoad === 'commonjs-typescript') { + finalFormat = 'require-commonjs-typescript'; + } + + const wrap = this.#translate(url, finalFormat, source, isMain); + assert(wrap instanceof ModuleWrap, `Translator used for require(${url}) should not be async`); + return wrap; + } - const moduleProvider = sync ? - (url, isMain) => callTranslator(this.loadSync(url, context), isMain) : - async (url, isMain) => callTranslator(await this.load(url, context), isMain); + /** + * Load a module and translate it into a ModuleWrap for ordinary imported ESM. + * This is run asynchronously. + * @param {string} url URL of the module to be translated. + * @param {object} loadContext See {@link load} + * @param {boolean} isMain Whether the module to be translated is the entry point. + * @returns {Promise<ModuleWrap>} + */ + async loadAndTranslate(url, loadContext, isMain) { + const { format, source, responseURL } = await this.load(url, loadContext); + return this.#translate(responseURL, format, source, isMain); + } + + /** + * Load a module and translate it into a ModuleWrap, and create a ModuleJob from it. + * This runs synchronously. If isForRequireInImportedCJS is true, the module should be linked + * by the time this returns. Otherwise it may still have pending module requests. + * @param {string} url The URL that was resolved for this module. + * @param {ImportAttributes} importAttributes See {@link getModuleJobForImport} + * @param {string} [parentURL] See {@link getModuleJobForImport} + * @param {string} [format] The format hint possibly returned by the `resolve` hook + * @param {boolean} isForRequireInImportedCJS Whether this module job is created for require() + * in imported CJS. + * @returns {ModuleJobBase} The (possibly pending) module job + */ + #createModuleJob(url, importAttributes, parentURL, format, isForRequireInImportedCJS) { + const context = { format, importAttributes }; const isMain = parentURL === undefined; + let moduleOrModulePromise; + if (isForRequireInImportedCJS) { + moduleOrModulePromise = this.loadAndTranslateForRequireInImportedCJS(url, context, isMain); + } else { + moduleOrModulePromise = this.loadAndTranslate(url, context, isMain); + } + const inspectBrk = ( isMain && getOptionValue('--inspect-brk') @@ -448,10 +515,10 @@ class ModuleLoader { this, url, importAttributes, - moduleProvider, + moduleOrModulePromise, isMain, inspectBrk, - sync, + isForRequireInImportedCJS, ); this.loadCache.set(url, importAttributes.type, job); @@ -469,7 +536,7 @@ class ModuleLoader { * @returns {Promise<ModuleExports>} */ async import(specifier, parentURL, importAttributes) { - const moduleJob = await this.getModuleJob(specifier, parentURL, importAttributes); + const moduleJob = await this.getModuleJobForImport(specifier, parentURL, importAttributes); const { module } = await moduleJob.run(); return module.getNamespace(); } @@ -489,39 +556,72 @@ class ModuleLoader { } /** - * Resolve the location of the module. - * @param {string} originalSpecifier The specified URL path of the module to - * be resolved. - * @param {string} [parentURL] The URL path of the module's parent. - * @param {ImportAttributes} importAttributes Attributes from the import - * statement or expression. - * @returns {{ format: string, url: URL['href'] }} + * Resolve a module request to a URL identifying the location of the module. Handles customization hooks, + * if any. + * @param {string|URL} specifier The module request of the module to be resolved. Typically, what's + * requested by `import specifier`, `import(specifier)` or + * `import.meta.resolve(specifier)`. + * @param {string} [parentURL] The URL of the module where the module request is initiated. + * It's undefined if it's from the root module. + * @param {ImportAttributes} importAttributes Attributes from the import statement or expression. + * @returns {Promise<{format: string, url: string}>} */ - resolve(originalSpecifier, parentURL, importAttributes) { - originalSpecifier = `${originalSpecifier}`; - if (this.#customizations) { - return this.#customizations.resolve(originalSpecifier, parentURL, importAttributes); + resolve(specifier, parentURL, importAttributes) { + specifier = `${specifier}`; + if (this.#customizations) { // Only has module.register hooks. + return this.#customizations.resolve(specifier, parentURL, importAttributes); } - const requestKey = this.#resolveCache.serializeKey(originalSpecifier, importAttributes); + return this.#cachedDefaultResolve(specifier, parentURL, importAttributes); + } + + /** + * Either return a cached resolution, or perform the default resolution which is synchronous, and + * cache the result. + * @param {string} specifier See {@link resolve}. + * @param {string} [parentURL] See {@link resolve}. + * @param {ImportAttributes} importAttributes See {@link resolve}. + * @returns {{ format: string, url: string }} + */ + #cachedDefaultResolve(specifier, parentURL, importAttributes) { + const requestKey = this.#resolveCache.serializeKey(specifier, importAttributes); const cachedResult = this.#resolveCache.get(requestKey, parentURL); if (cachedResult != null) { return cachedResult; } - const result = this.defaultResolve(originalSpecifier, parentURL, importAttributes); + const result = this.defaultResolve(specifier, parentURL, importAttributes); this.#resolveCache.set(requestKey, parentURL, result); return result; } /** - * Just like `resolve` except synchronous. This is here specifically to support - * `import.meta.resolve` which must happen synchronously. + * This is the default resolve step for future synchronous hooks, which incorporates asynchronous hooks + * from module.register() which are run in a blocking fashion for it to be synchronous. + * @param {string|URL} specifier See {@link resolveSync}. + * @param {{ parentURL?: string, importAttributes: ImportAttributes}} context See {@link resolveSync}. + * @returns {{ format: string, url: string }} */ - resolveSync(originalSpecifier, parentURL, importAttributes) { - originalSpecifier = `${originalSpecifier}`; + #resolveAndMaybeBlockOnLoaderThread(specifier, context) { if (this.#customizations) { - return this.#customizations.resolveSync(originalSpecifier, parentURL, importAttributes); + return this.#customizations.resolveSync(specifier, context.parentURL, context.importAttributes); } - return this.defaultResolve(originalSpecifier, parentURL, importAttributes); + return this.#cachedDefaultResolve(specifier, context.parentURL, context.importAttributes); + } + + /** + * Similar to {@link resolve}, but the results are always synchronously returned. If there are any + * asynchronous resolve hooks from module.register(), it will block until the results are returned + * from the loader thread for this to be synchronous. + * This is here to support `import.meta.resolve()`, `require()` in imported CJS, and + * future synchronous hooks. + * + * TODO(joyeecheung): consolidate the cache behavior and use this in require(esm). + * @param {string|URL} specifier See {@link resolve}. + * @param {string} [parentURL] See {@link resolve}. + * @param {ImportAttributes} [importAttributes] See {@link resolve}. + * @returns {{ format: string, url: string }} + */ + resolveSync(specifier, parentURL, importAttributes = { __proto__: null }) { + return this.#resolveAndMaybeBlockOnLoaderThread(`${specifier}`, { parentURL, importAttributes }); } /** @@ -543,36 +643,49 @@ class ModuleLoader { } /** - * Provide source that is understood by one of Node's translators. - * @param {URL['href']} url The URL/path of the module to be loaded - * @param {object} [context] Metadata about the module + * Provide source that is understood by one of Node's translators. Handles customization hooks, + * if any. + * @param {string} url The URL of the module to be loaded. + * @param {object} context Metadata about the module * @returns {Promise<{ format: ModuleFormat, source: ModuleSource }>} */ async load(url, context) { + if (this.#customizations) { + return this.#customizations.load(url, context); + } + defaultLoad ??= require('internal/modules/esm/load').defaultLoad; - const result = this.#customizations ? - await this.#customizations.load(url, context) : - await defaultLoad(url, context); - this.validateLoadResult(url, result?.format); - return result; + return defaultLoad(url, context); } - loadSync(url, context) { + /** + * This is the default load step for future synchronous hooks, which incorporates asynchronous hooks + * from module.register() which are run in a blocking fashion for it to be synchronous. + * @param {string} url See {@link load} + * @param {object} context See {@link load} + * @returns {{ format: ModuleFormat, source: ModuleSource }} + */ + #loadAndMaybeBlockOnLoaderThread(url, context) { + if (this.#customizations) { + return this.#customizations.loadSync(url, context); + } defaultLoadSync ??= require('internal/modules/esm/load').defaultLoadSync; + return defaultLoadSync(url, context); + } - let result = this.#customizations ? - this.#customizations.loadSync(url, context) : - defaultLoadSync(url, context); - let format = result?.format; - if (format === 'module') { - throw new ERR_REQUIRE_ESM(url, true); - } - if (format === 'commonjs') { - format = 'require-commonjs'; - result = { __proto__: result, format }; - } - this.validateLoadResult(url, format); - return result; + /** + * Similar to {@link load} but this is always run synchronously. If there are asynchronous hooks + * from module.register(), this blocks on the loader thread for it to return synchronously. + * + * This is here to support `require()` in imported CJS and future synchronous hooks. + * + * TODO(joyeecheung): consolidate the cache behavior and use this in require(esm). + * @param {string} url See {@link load} + * @param {object} [context] See {@link load} + * @returns {{ format: ModuleFormat, source: ModuleSource }} + */ + #loadSync(url, context) { + return this.#loadAndMaybeBlockOnLoaderThread(url, context); } validateLoadResult(url, format) { diff --git a/lib/internal/modules/esm/module_job.js b/lib/internal/modules/esm/module_job.js index 4bb6a72c72aa06..0c8f031080a314 100644 --- a/lib/internal/modules/esm/module_job.js +++ b/lib/internal/modules/esm/module_job.js @@ -1,8 +1,8 @@ 'use strict'; const { + Array, ArrayPrototypeJoin, - ArrayPrototypePush, ArrayPrototypeSome, FunctionPrototype, ObjectSetPrototypeOf, @@ -10,7 +10,6 @@ const { PromisePrototypeThen, RegExpPrototypeExec, RegExpPrototypeSymbolReplace, - ReflectApply, SafePromiseAllReturnArrayLike, SafePromiseAllReturnVoid, SafeSet, @@ -22,7 +21,7 @@ let debug = require('internal/util/debuglog').debuglog('esm', (fn) => { debug = fn; }); -const { ModuleWrap, kEvaluated } = internalBinding('module_wrap'); +const { ModuleWrap, kInstantiated } = internalBinding('module_wrap'); const { decorateErrorStack, kEmptyObject } = require('internal/util'); const { @@ -33,8 +32,11 @@ const resolvedPromise = PromiseResolve(); const { setHasStartedUserESMExecution, } = require('internal/modules/helpers'); +const { getOptionValue } = require('internal/options'); const noop = FunctionPrototype; - +const { + ERR_REQUIRE_ASYNC_MODULE, +} = require('internal/errors').codes; let hasPausedEntry = false; const CJSGlobalLike = [ @@ -51,13 +53,12 @@ const isCommonJSGlobalLikeNotDefinedError = (errorMessage) => ); class ModuleJobBase { - constructor(url, importAttributes, moduleWrapMaybePromise, isMain, inspectBrk) { + constructor(url, importAttributes, isMain, inspectBrk) { this.importAttributes = importAttributes; this.isMain = isMain; this.inspectBrk = inspectBrk; this.url = url; - this.module = moduleWrapMaybePromise; } } @@ -65,48 +66,33 @@ class ModuleJobBase { * its dependencies, over time. */ class ModuleJob extends ModuleJobBase { #loader = null; - // `loader` is the Loader instance used for loading dependencies. + + /** + * @param {ModuleLoader} loader The ESM loader. + * @param {string} url URL of the module to be wrapped in ModuleJob. + * @param {ImportAttributes} importAttributes Import attributes from the import statement. + * @param {ModuleWrap|Promise<ModuleWrap>} moduleOrModulePromise Translated ModuleWrap for the module. + * @param {boolean} isMain Whether the module is the entry point. + * @param {boolean} inspectBrk Whether this module should be evaluated with the + * first line paused in the debugger (because --inspect-brk is passed). + * @param {boolean} isForRequireInImportedCJS Whether this is created for require() in imported CJS. + */ constructor(loader, url, importAttributes = { __proto__: null }, - moduleProvider, isMain, inspectBrk, sync = false) { - const modulePromise = ReflectApply(moduleProvider, loader, [url, isMain]); - super(url, importAttributes, modulePromise, isMain, inspectBrk); + moduleOrModulePromise, isMain, inspectBrk, isForRequireInImportedCJS = false) { + super(url, importAttributes, isMain, inspectBrk); this.#loader = loader; - // Expose the promise to the ModuleWrap directly for linking below. - // `this.module` is also filled in below. - this.modulePromise = modulePromise; - if (sync) { - this.module = this.modulePromise; + // Expose the promise to the ModuleWrap directly for linking below. + if (isForRequireInImportedCJS) { + this.module = moduleOrModulePromise; + assert(this.module instanceof ModuleWrap); this.modulePromise = PromiseResolve(this.module); } else { - this.modulePromise = PromiseResolve(this.modulePromise); + this.modulePromise = moduleOrModulePromise; } - // Wait for the ModuleWrap instance being linked with all dependencies. - const link = async () => { - this.module = await this.modulePromise; - assert(this.module instanceof ModuleWrap); - - // Explicitly keeping track of dependency jobs is needed in order - // to flatten out the dependency graph below in `_instantiate()`, - // so that circular dependencies can't cause a deadlock by two of - // these `link` callbacks depending on each other. - const dependencyJobs = []; - const promises = this.module.link(async (specifier, attributes) => { - const job = await this.#loader.getModuleJob(specifier, url, attributes); - debug(`async link() ${this.url} -> ${specifier}`, job); - ArrayPrototypePush(dependencyJobs, job); - return job.modulePromise; - }); - - if (promises !== undefined) { - await SafePromiseAllReturnVoid(promises); - } - - return SafePromiseAllReturnArrayLike(dependencyJobs); - }; // Promise for the list of all dependencyJobs. - this.linked = link(); + this.linked = this._link(); // This promise is awaited later anyway, so silence // 'unhandled rejection' warnings. PromisePrototypeThen(this.linked, undefined, noop); @@ -116,6 +102,49 @@ class ModuleJob extends ModuleJobBase { this.instantiated = undefined; } + /** + * Iterates the module requests and links with the loader. + * @returns {Promise<ModuleJob[]>} Dependency module jobs. + */ + async _link() { + this.module = await this.modulePromise; + assert(this.module instanceof ModuleWrap); + + const moduleRequests = this.module.getModuleRequests(); + // Explicitly keeping track of dependency jobs is needed in order + // to flatten out the dependency graph below in `_instantiate()`, + // so that circular dependencies can't cause a deadlock by two of + // these `link` callbacks depending on each other. + // Create an ArrayLike to avoid calling into userspace with `.then` + // when returned from the async function. + const dependencyJobs = Array(moduleRequests.length); + ObjectSetPrototypeOf(dependencyJobs, null); + + // Specifiers should be aligned with the moduleRequests array in order. + const specifiers = Array(moduleRequests.length); + const modulePromises = Array(moduleRequests.length); + // Iterate with index to avoid calling into userspace with `Symbol.iterator`. + for (let idx = 0; idx < moduleRequests.length; idx++) { + const { specifier, attributes } = moduleRequests[idx]; + + const dependencyJobPromise = this.#loader.getModuleJobForImport( + specifier, this.url, attributes, + ); + const modulePromise = PromisePrototypeThen(dependencyJobPromise, (job) => { + debug(`async link() ${this.url} -> ${specifier}`, job); + dependencyJobs[idx] = job; + return job.modulePromise; + }); + modulePromises[idx] = modulePromise; + specifiers[idx] = specifier; + } + + const modules = await SafePromiseAllReturnArrayLike(modulePromises); + this.module.link(specifiers, modules); + + return dependencyJobs; + } + instantiate() { if (this.instantiated === undefined) { this.instantiated = this._instantiate(); @@ -260,27 +289,59 @@ class ModuleJob extends ModuleJobBase { } } -// This is a fully synchronous job and does not spawn additional threads in any way. -// All the steps are ensured to be synchronous and it throws on instantiating -// an asynchronous graph. +/** + * This is a fully synchronous job and does not spawn additional threads in any way. + * All the steps are ensured to be synchronous and it throws on instantiating + * an asynchronous graph. It also disallows CJS <-> ESM cycles. + * + * This is used for ES modules loaded via require(esm). Modules loaded by require() in + * imported CJS are handled by ModuleJob with the isForRequireInImportedCJS set to true instead. + * The two currently have different caching behaviors. + * TODO(joyeecheung): consolidate this with the isForRequireInImportedCJS variant of ModuleJob. + */ class ModuleJobSync extends ModuleJobBase { #loader = null; + + /** + * @param {ModuleLoader} loader The ESM loader. + * @param {string} url URL of the module to be wrapped in ModuleJob. + * @param {ImportAttributes} importAttributes Import attributes from the import statement. + * @param {ModuleWrap} moduleWrap Translated ModuleWrap for the module. + * @param {boolean} isMain Whether the module is the entry point. + * @param {boolean} inspectBrk Whether this module should be evaluated with the + * first line paused in the debugger (because --inspect-brk is passed). + */ constructor(loader, url, importAttributes, moduleWrap, isMain, inspectBrk) { - super(url, importAttributes, moduleWrap, isMain, inspectBrk, true); - assert(this.module instanceof ModuleWrap); + super(url, importAttributes, isMain, inspectBrk, true); + this.#loader = loader; - const moduleRequests = this.module.getModuleRequestsSync(); - const linked = []; - for (let i = 0; i < moduleRequests.length; ++i) { - const { 0: specifier, 1: attributes } = moduleRequests[i]; - const job = this.#loader.getModuleWrapForRequire(specifier, url, attributes); - const isLast = (i === moduleRequests.length - 1); - // TODO(joyeecheung): make the resolution callback deal with both promisified - // an raw module wraps, then we don't need to wrap it with a promise here. - this.module.cacheResolvedWrapsSync(specifier, PromiseResolve(job.module), isLast); - ArrayPrototypePush(linked, job); + this.module = moduleWrap; + + assert(this.module instanceof ModuleWrap); + // Store itself into the cache first before linking in case there are circular + // references in the linking. + loader.loadCache.set(url, importAttributes.type, this); + + try { + const moduleRequests = this.module.getModuleRequests(); + // Specifiers should be aligned with the moduleRequests array in order. + const specifiers = Array(moduleRequests.length); + const modules = Array(moduleRequests.length); + const jobs = Array(moduleRequests.length); + for (let i = 0; i < moduleRequests.length; ++i) { + const { specifier, attributes } = moduleRequests[i]; + const job = this.#loader.getModuleJobForRequire(specifier, url, attributes); + specifiers[i] = specifier; + modules[i] = job.module; + jobs[i] = job; + } + this.module.link(specifiers, modules); + this.linked = jobs; + } finally { + // Restore it - if it succeeds, we'll reset in the caller; Otherwise it's + // not cached and if the error is caught, subsequent attempt would still fail. + loader.loadCache.delete(url, importAttributes.type); } - this.linked = linked; } get modulePromise() { @@ -288,14 +349,40 @@ class ModuleJobSync extends ModuleJobBase { } async run() { + // This path is hit by a require'd module that is imported again. const status = this.module.getStatus(); - assert(status === kEvaluated, - `A require()-d module that is imported again must be evaluated. Status = ${status}`); - return { __proto__: null, module: this.module }; + if (status > kInstantiated) { + if (this.evaluationPromise) { + await this.evaluationPromise; + } + return { __proto__: null, module: this.module }; + } else if (status === kInstantiated) { + // The evaluation may have been canceled because instantiateSync() detected TLA first. + // But when it is imported again, it's fine to re-evaluate it asynchronously. + const timeout = -1; + const breakOnSigint = false; + this.evaluationPromise = this.module.evaluate(timeout, breakOnSigint); + await this.evaluationPromise; + this.evaluationPromise = undefined; + return { __proto__: null, module: this.module }; + } + + assert.fail('Unexpected status of a module that is imported again after being required. ' + + `Status = ${status}`); } runSync() { - this.module.instantiateSync(); + // TODO(joyeecheung): add the error decoration logic from the async instantiate. + this.module.async = this.module.instantiateSync(); + // If --experimental-print-required-tla is true, proceeds to evaluation even + // if it's async because we want to search for the TLA and help users locate + // them. + // TODO(joyeecheung): track the asynchroniticy using v8::Module::HasTopLevelAwait() + // and we'll be able to throw right after compilation of the modules, using acron + // to find and print the TLA. + if (this.module.async && !getOptionValue('--experimental-print-required-tla')) { + throw new ERR_REQUIRE_ASYNC_MODULE(); + } setHasStartedUserESMExecution(); const namespace = this.module.evaluateSync(); return { __proto__: null, module: this.module, namespace }; diff --git a/lib/internal/modules/esm/module_map.js b/lib/internal/modules/esm/module_map.js index ab1171eaa47b02..247bde93cabd70 100644 --- a/lib/internal/modules/esm/module_map.js +++ b/lib/internal/modules/esm/module_map.js @@ -114,6 +114,12 @@ class LoadCache extends SafeMap { validateString(type, 'type'); return super.get(url)?.[type] !== undefined; } + delete(url, type = kImplicitAssertType) { + const cached = super.get(url); + if (cached) { + cached[type] = undefined; + } + } } module.exports = { diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 044d820161a5f9..23c14e2ec6c85e 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -4,7 +4,6 @@ const { ArrayPrototypeMap, Boolean, JSONParse, - ObjectGetPrototypeOf, ObjectPrototypeHasOwnProperty, ObjectKeys, ReflectApply, @@ -15,7 +14,6 @@ const { StringPrototypeReplaceAll, StringPrototypeSlice, StringPrototypeStartsWith, - SyntaxErrorPrototype, globalThis: { WebAssembly }, } = primordials; @@ -30,7 +28,6 @@ function lazyTypes() { } const { - containsModuleSyntax, compileFunctionForCJSLoader, } = internalBinding('contextify'); @@ -62,7 +59,6 @@ const { const { maybeCacheSourceMap } = require('internal/source_map/source_map_cache'); const moduleWrap = internalBinding('module_wrap'); const { ModuleWrap } = moduleWrap; -const { emitWarningSync } = require('internal/process/warning'); // Lazy-loading to avoid circular dependencies. let getSourceSync; @@ -78,28 +74,11 @@ function getSource(url) { /** @type {import('deps/cjs-module-lexer/lexer.js').parse} */ let cjsParse; /** - * Initializes the CommonJS module lexer parser. - * If WebAssembly is available, it uses the optimized version from the dist folder. - * Otherwise, it falls back to the JavaScript version from the lexer folder. + * Initializes the CommonJS module lexer parser using the JavaScript version. + * TODO(joyeecheung): Use `require('internal/deps/cjs-module-lexer/dist/lexer').initSync()` + * when cjs-module-lexer 1.4.0 is rolled in. */ -async function initCJSParse() { - if (typeof WebAssembly === 'undefined') { - initCJSParseSync(); - } else { - const { parse, init } = - require('internal/deps/cjs-module-lexer/dist/lexer'); - try { - await init(); - cjsParse = parse; - } catch { - initCJSParseSync(); - } - } -} - function initCJSParseSync() { - // TODO(joyeecheung): implement a binding that directly compiles using - // v8::WasmModuleObject::Compile() synchronously. if (cjsParse === undefined) { cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse; } @@ -107,7 +86,6 @@ function initCJSParseSync() { const translators = new SafeMap(); exports.translators = translators; -exports.enrichCJSError = enrichCJSError; let DECODER = null; /** @@ -169,25 +147,6 @@ translators.set('module', function moduleStrategy(url, source, isMain) { return module; }); -/** - * Provide a more informative error for CommonJS imports. - * @param {Error | any} err - * @param {string} [content] Content of the file, if known. - * @param {string} [filename] The filename of the erroring module. - */ -function enrichCJSError(err, content, filename) { - if (err != null && ObjectGetPrototypeOf(err) === SyntaxErrorPrototype && - containsModuleSyntax(content, filename)) { - // Emit the warning synchronously because we are in the middle of handling - // a SyntaxError that will throw and likely terminate the process before an - // asynchronous warning would be emitted. - emitWarningSync( - 'To load an ES module, set "type": "module" in the package.json or use ' + - 'the .mjs extension.', - ); - } -} - /** * Loads a CommonJS module via the ESM Loader sync CommonJS translator. * This translator creates its own version of the `require` function passed into CommonJS modules. @@ -197,22 +156,17 @@ function enrichCJSError(err, content, filename) { * @param {string} source - The source code of the module. * @param {string} url - The URL of the module. * @param {string} filename - The filename of the module. + * @param {boolean} isMain - Whether the module is the entrypoint */ -function loadCJSModule(module, source, url, filename) { - let compileResult; - try { - compileResult = compileFunctionForCJSLoader(source, filename); - } catch (err) { - enrichCJSError(err, source, filename); - throw err; - } +function loadCJSModule(module, source, url, filename, isMain) { + const compileResult = compileFunctionForCJSLoader(source, filename, false /* is_sea_main */, false); + + const { function: compiledWrapper, sourceMapURL } = compileResult; // Cache the source map for the cjs module if present. - if (compileResult.sourceMapURL) { - maybeCacheSourceMap(url, source, null, false, undefined, compileResult.sourceMapURL); + if (sourceMapURL) { + maybeCacheSourceMap(url, source, module, false, undefined, sourceMapURL); } - const compiledWrapper = compileResult.function; - const cascadedLoader = require('internal/modules/esm/loader').getOrInitializeCascadedLoader(); const __dirname = dirname(filename); // eslint-disable-next-line func-name-matching,func-style @@ -232,7 +186,7 @@ function loadCJSModule(module, source, url, filename) { } specifier = `${pathToFileURL(path)}`; } - const job = cascadedLoader.getModuleJobSync(specifier, url, importAttributes); + const job = cascadedLoader.getModuleJobForRequireInImportedCJS(specifier, url, importAttributes); job.runSync(); return cjsCache.get(job.url).exports; }; @@ -283,7 +237,7 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) { debug(`Loading CJSModule ${url}`); if (!module.loaded) { - loadCJS(module, source, url, filename); + loadCJS(module, source, url, filename, !!isMain); } let exports; @@ -313,17 +267,17 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) { translators.set('commonjs-sync', function requireCommonJS(url, source, isMain) { initCJSParseSync(); - assert(!isMain); // This is only used by imported CJS modules. - return createCJSModuleWrap(url, source, isMain, (module, source, url, filename) => { + return createCJSModuleWrap(url, source, isMain, (module, source, url, filename, isMain) => { assert(module === CJSModule._cache[filename]); - CJSModule._load(filename); + CJSModule._load(filename, null, isMain); }); }); // Handle CommonJS modules referenced by `require` calls. // This translator function must be sync, as `require` is sync. translators.set('require-commonjs', (url, source, isMain) => { + initCJSParseSync(); assert(cjsParse); return createCJSModuleWrap(url, source); @@ -331,23 +285,17 @@ translators.set('require-commonjs', (url, source, isMain) => { // Handle CommonJS modules referenced by `import` statements or expressions, // or as the initial entry point when the ESM loader handles a CommonJS entry. -translators.set('commonjs', async function commonjsStrategy(url, source, - isMain) { +translators.set('commonjs', function commonjsStrategy(url, source, isMain) { if (!cjsParse) { - await initCJSParse(); + initCJSParseSync(); } // For backward-compatibility, it's possible to return a nullish value for // CJS source associated with a file: URL. In this case, the source is // obtained by calling the monkey-patchable CJS loader. - const cjsLoader = source == null ? (module, source, url, filename) => { - try { - assert(module === CJSModule._cache[filename]); - CJSModule._load(filename); - } catch (err) { - enrichCJSError(err, source, filename); - throw err; - } + const cjsLoader = source == null ? (module, source, url, filename, isMain) => { + assert(module === CJSModule._cache[filename]); + CJSModule._load(filename, undefined, isMain); } : loadCJSModule; try { @@ -357,7 +305,6 @@ translators.set('commonjs', async function commonjsStrategy(url, source, // Continue regardless of error. } return createCJSModuleWrap(url, source, isMain, cjsLoader); - }); /** @@ -518,8 +465,9 @@ translators.set('wasm', async function(url, source) { let compiled; try { - // TODO(joyeecheung): implement a binding that directly compiles using - // v8::WasmModuleObject::Compile() synchronously. + // TODO(joyeecheung): implement a translator that just uses + // compiled = new WebAssembly.Module(source) to compile it + // synchronously. compiled = await WebAssembly.compile(source); } catch (err) { err.message = errPath(url) + ': ' + err.message; diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js index 150816057129c1..38b5eaf1d7e0f2 100644 --- a/lib/internal/modules/esm/utils.js +++ b/lib/internal/modules/esm/utils.js @@ -75,10 +75,11 @@ function initializeDefaultConditions() { const userConditions = getOptionValue('--conditions'); const noAddons = getOptionValue('--no-addons'); const addonConditions = noAddons ? [] : ['node-addons']; - + const moduleConditions = getOptionValue('--experimental-require-module') ? ['module-sync'] : []; defaultConditions = ObjectFreeze([ 'node', 'import', + ...moduleConditions, ...addonConditions, ...userConditions, ]); @@ -343,7 +344,7 @@ function compileSourceTextModule(url, source, cascadedLoader) { } // Cache the source map for the module if present. if (wrap.sourceMapURL) { - maybeCacheSourceMap(url, source, null, false, undefined, wrap.sourceMapURL); + maybeCacheSourceMap(url, source, wrap, false, undefined, wrap.sourceMapURL); } return wrap; } diff --git a/lib/internal/modules/helpers.js b/lib/internal/modules/helpers.js index 7cdde181e97a10..39815fc9b3a999 100644 --- a/lib/internal/modules/helpers.js +++ b/lib/internal/modules/helpers.js @@ -76,6 +76,9 @@ function initializeCjsConditions() { ...addonConditions, ...userConditions, ]); + if (getOptionValue('--experimental-require-module')) { + cjsConditions.add('module-sync'); + } } /** @@ -329,6 +332,7 @@ function urlToFilename(url) { return url; } + // Whether we have started executing any user-provided CJS code. // This is set right before we call the wrapped CJS code (not after, // in case we are half-way in the execution when internals check this). diff --git a/lib/internal/modules/run_main.js b/lib/internal/modules/run_main.js index 4ad694debfc72f..a22bddf635f5e6 100644 --- a/lib/internal/modules/run_main.js +++ b/lib/internal/modules/run_main.js @@ -4,7 +4,6 @@ const { StringPrototypeEndsWith, } = primordials; -const { containsModuleSyntax } = internalBinding('contextify'); const { getOptionValue } = require('internal/options'); const path = require('path'); const { pathToFileURL } = require('internal/url'); @@ -85,10 +84,6 @@ function shouldUseESMLoader(mainPath) { case 'commonjs': return false; default: { // No package.json or no `type` field. - if (getOptionValue('--experimental-detect-module')) { - // If the first argument of `containsModuleSyntax` is undefined, it will read `mainPath` from the file system. - return containsModuleSyntax(undefined, mainPath); - } return false; } } @@ -153,24 +148,31 @@ function runEntryPointWithESMLoader(callback) { * by `require('module')`) even when the entry point is ESM. * This monkey-patchable code is bypassed under `--experimental-default-type=module`. * Because of backwards compatibility, this function is exposed publicly via `import { runMain } from 'node:module'`. + * Because of module detection, this function will attempt to run ambiguous (no explicit extension, no + * `package.json` type field) entry points as CommonJS first; under certain conditions, it will retry running as ESM. * @param {string} main - First positional CLI argument, such as `'entry.js'` from `node entry.js` */ function executeUserEntryPoint(main = process.argv[1]) { const resolvedMain = resolveMainPath(main); const useESMLoader = shouldUseESMLoader(resolvedMain); - if (useESMLoader) { + let mainURL; + // Unless we know we should use the ESM loader to handle the entry point per the checks in `shouldUseESMLoader`, first + // try to run the entry point via the CommonJS loader; and if that fails under certain conditions, retry as ESM. + if (!useESMLoader) { + const cjsLoader = require('internal/modules/cjs/loader'); + const { Module } = cjsLoader; + Module._load(main, null, true); + } else { const mainPath = resolvedMain || main; - const mainURL = pathToFileURL(mainPath).href; + if (mainURL === undefined) { + mainURL = pathToFileURL(mainPath).href; + } runEntryPointWithESMLoader((cascadedLoader) => { // Note that if the graph contains unfinished TLA, this may never resolve // even after the event loop stops running. return cascadedLoader.import(mainURL, undefined, { __proto__: null }, true); }); - } else { - // Module._load is the monkey-patchable CJS module loader. - const { Module } = require('internal/modules/cjs/loader'); - Module._load(main, null, true); } } diff --git a/lib/internal/process/execution.js b/lib/internal/process/execution.js index 4f72aa41251836..09b18b8f2c37db 100644 --- a/lib/internal/process/execution.js +++ b/lib/internal/process/execution.js @@ -83,7 +83,7 @@ function evalScript(name, body, breakFirstLine, print, shouldLoadESM = false) { if (getOptionValue('--experimental-detect-module') && getOptionValue('--input-type') === '' && getOptionValue('--experimental-default-type') === '' && - containsModuleSyntax(body, name)) { + containsModuleSyntax(body, name, null, 'no CJS variables')) { return evalModuleEntryPoint(body, print); } diff --git a/lib/internal/source_map/prepare_stack_trace.js b/lib/internal/source_map/prepare_stack_trace.js index 7f99303b034e94..f06ea6380ceee4 100644 --- a/lib/internal/source_map/prepare_stack_trace.js +++ b/lib/internal/source_map/prepare_stack_trace.js @@ -139,9 +139,15 @@ function getOriginalSymbolName(sourceMap, callSite, callerCallSite) { } } -// Places a snippet of code from where the exception was originally thrown -// above the stack trace. This logic is modeled after GetErrorSource in -// node_errors.cc. +/** + * Return a snippet of code from where the exception was originally thrown + * above the stack trace. This called from GetErrorSource in node_errors.cc. + * @param {import('internal/source_map/source_map').SourceMap} sourceMap - the source map to be used + * @param {string} originalSourcePath - path or url of the original source + * @param {number} originalLine - line number in the original source + * @param {number} originalColumn - column number in the original source + * @returns {string | undefined} - the exact line in the source content or undefined if file not found + */ function getErrorSource( sourceMap, originalSourcePath, @@ -179,6 +185,12 @@ function getErrorSource( return exceptionLine; } +/** + * Retrieve the original source code from the source map's `sources` list or disk. + * @param {import('internal/source_map/source_map').SourceMap.payload} payload + * @param {string} originalSourcePath - path or url of the original source + * @returns {string | undefined} - the source content or undefined if file not found + */ function getOriginalSource(payload, originalSourcePath) { let source; // payload.sources has been normalized to be an array of absolute urls. @@ -202,6 +214,13 @@ function getOriginalSource(payload, originalSourcePath) { return source; } +/** + * Retrieve exact line in the original source code from the source map's `sources` list or disk. + * @param {string} fileName - actual file name + * @param {number} lineNumber - actual line number + * @param {number} columnNumber - actual column number + * @returns {string | undefined} - the source content or undefined if file not found + */ function getSourceMapErrorSource(fileName, lineNumber, columnNumber) { const sm = findSourceMap(fileName); if (sm === undefined) { diff --git a/lib/internal/source_map/source_map_cache.js b/lib/internal/source_map/source_map_cache.js index 53c3374fc09176..9defc32da8e1e6 100644 --- a/lib/internal/source_map/source_map_cache.js +++ b/lib/internal/source_map/source_map_cache.js @@ -3,7 +3,6 @@ const { ArrayPrototypePush, JSONParse, - ObjectKeys, RegExpPrototypeExec, SafeMap, StringPrototypeCodePointAt, @@ -25,24 +24,22 @@ const { } = require('internal/errors'); const { getLazy } = require('internal/util'); -// Since the CJS module cache is mutable, which leads to memory leaks when -// modules are deleted, we use a WeakMap so that the source map cache will -// be purged automatically: -const getCjsSourceMapCache = getLazy(() => { - const { IterableWeakMap } = require('internal/util/iterable_weak_map'); - return new IterableWeakMap(); +const getModuleSourceMapCache = getLazy(() => { + const { SourceMapCacheMap } = require('internal/source_map/source_map_cache_map'); + return new SourceMapCacheMap(); }); -// The esm cache is not mutable, so we can use a Map without memory concerns: -const esmSourceMapCache = new SafeMap(); -// The generated sources is not mutable, so we can use a Map without memory concerns: +// The generated source module/script instance is not accessible, so we can use +// a Map without memory concerns. Separate generated source entries with the module +// source entries to avoid overriding the module source entries with arbitrary +// source url magic comments. const generatedSourceMapCache = new SafeMap(); const kLeadingProtocol = /^\w+:\/\//; const kSourceMappingURLMagicComment = /\/[*/]#\s+sourceMappingURL=(?<sourceMappingURL>[^\s]+)/g; const kSourceURLMagicComment = /\/[*/]#\s+sourceURL=(?<sourceURL>[^\s]+)/g; const { isAbsolute } = require('path'); -const { fileURLToPath, pathToFileURL, URL } = require('internal/url'); +const { fileURLToPath, pathToFileURL, URL, URLParse } = require('internal/url'); let SourceMap; @@ -52,6 +49,10 @@ function getSourceMapsEnabled() { return sourceMapsEnabled; } +/** + * Enables or disables source maps programmatically. + * @param {boolean} val + */ function setSourceMapsEnabled(val) { validateBoolean(val, 'val'); @@ -72,6 +73,14 @@ function setSourceMapsEnabled(val) { sourceMapsEnabled = val; } +/** + * Extracts the source url from the content if present. For example + * //# sourceURL=file:///path/to/file + * + * Read more at: https://tc39.es/source-map-spec/#linking-evald-code-to-named-generated-code + * @param {string} content - source content + * @returns {string | null} source url or null if not present + */ function extractSourceURLMagicComment(content) { let match; let matchSourceURL; @@ -90,6 +99,14 @@ function extractSourceURLMagicComment(content) { return sourceURL; } +/** + * Extracts the source map url from the content if present. For example + * //# sourceMappingURL=file:///path/to/file + * + * Read more at: https://tc39.es/source-map-spec/#linking-generated-code + * @param {string} content - source content + * @returns {string | null} source map url or null if not present + */ function extractSourceMapURLMagicComment(content) { let match; let lastMatch; @@ -104,7 +121,17 @@ function extractSourceMapURLMagicComment(content) { return lastMatch.groups.sourceMappingURL; } -function maybeCacheSourceMap(filename, content, cjsModuleInstance, isGeneratedSource, sourceURL, sourceMapURL) { +/** + * Caches the source map if it is present in the content, with the given filename, moduleInstance, and sourceURL. + * @param {string} filename - the actual filename + * @param {string} content - the actual source content + * @param {import('internal/modules/cjs/loader').Module | ModuleWrap} moduleInstance - a module instance that + * associated with the source, once this is reclaimed, the source map entry will be removed from the cache + * @param {boolean} isGeneratedSource - if the source was generated and evaluated with the global eval + * @param {string | undefined} sourceURL - the source url + * @param {string | undefined} sourceMapURL - the source map url + */ +function maybeCacheSourceMap(filename, content, moduleInstance, isGeneratedSource, sourceURL, sourceMapURL) { const sourceMapsEnabled = getSourceMapsEnabled(); if (!(process.env.NODE_V8_COVERAGE || sourceMapsEnabled)) return; const { normalizeReferrerURL } = require('internal/modules/helpers'); @@ -130,45 +157,32 @@ function maybeCacheSourceMap(filename, content, cjsModuleInstance, isGeneratedSo } const data = dataFromUrl(filename, sourceMapURL); - const url = data ? null : sourceMapURL; - if (cjsModuleInstance) { - getCjsSourceMapCache().set(cjsModuleInstance, { - __proto__: null, - filename, - lineLengths: lineLengths(content), - data, - url, - sourceURL, - }); - } else if (isGeneratedSource) { - const entry = { - __proto__: null, - lineLengths: lineLengths(content), - data, - url, - sourceURL, - }; + const entry = { + __proto__: null, + lineLengths: lineLengths(content), + data, + // Save the source map url if it is not a data url. + sourceMapURL: data ? null : sourceMapURL, + sourceURL, + }; + + if (isGeneratedSource) { generatedSourceMapCache.set(filename, entry); if (sourceURL) { generatedSourceMapCache.set(sourceURL, entry); } - } else { - // If there is no cjsModuleInstance and is not generated source assume we are in a - // "modules/esm" context. - const entry = { - __proto__: null, - lineLengths: lineLengths(content), - data, - url, - sourceURL, - }; - esmSourceMapCache.set(filename, entry); - if (sourceURL) { - esmSourceMapCache.set(sourceURL, entry); - } + return; } + // If it is not a generated source, we assume we are in a "cjs/esm" + // context. + const keys = sourceURL ? [filename, sourceURL] : [filename]; + getModuleSourceMapCache().set(keys, entry, moduleInstance); } +/** + * Caches the source map if it is present in the eval'd source. + * @param {string} content - the eval'd source code + */ function maybeCacheGeneratedSourceMap(content) { const sourceMapsEnabled = getSourceMapsEnabled(); if (!(process.env.NODE_V8_COVERAGE || sourceMapsEnabled)) return; @@ -186,9 +200,18 @@ function maybeCacheGeneratedSourceMap(content) { } } +/** + * Resolves source map payload data from the source url and source map url. + * If the source map url is a data url, the data is returned. + * Otherwise the source map url is resolved to a file path and the file is read. + * @param {string} sourceURL - url of the source file + * @param {string} sourceMappingURL - url of the source map + * @returns {object} deserialized source map JSON object + */ function dataFromUrl(sourceURL, sourceMappingURL) { - try { - const url = new URL(sourceMappingURL); + const url = URLParse(sourceMappingURL); + + if (url != null) { switch (url.protocol) { case 'data:': return sourceMapFromDataUrl(sourceURL, url.pathname); @@ -196,12 +219,10 @@ function dataFromUrl(sourceURL, sourceMappingURL) { debug(`unknown protocol ${url.protocol}`); return null; } - } catch (err) { - debug(err); - // If no scheme is present, we assume we are dealing with a file path. - const mapURL = new URL(sourceMappingURL, sourceURL).href; - return sourceMapFromFile(mapURL); } + + const mapURL = new URL(sourceMappingURL, sourceURL).href; + return sourceMapFromFile(mapURL); } // Cache the length of each line in the file that a source map was extracted @@ -227,7 +248,11 @@ function lineLengths(content) { return output; } - +/** + * Read source map from file. + * @param {string} mapURL - file url of the source map + * @returns {object} deserialized source map JSON object + */ function sourceMapFromFile(mapURL) { try { const fs = require('fs'); @@ -281,39 +306,36 @@ function sourcesToAbsolute(baseURL, data) { return data; } -// WARNING: The `sourceMapCacheToObject` and `appendCJSCache` run during -// shutdown. In particular, they also run when Workers are terminated, making -// it important that they do not call out to any user-provided code, including -// built-in prototypes that might have been tampered with. +// WARNING: The `sourceMapCacheToObject` runs during shutdown. In particular, +// it also runs when Workers are terminated, making it important that it does +// not call out to any user-provided code, including built-in prototypes that +// might have been tampered with. // Get serialized representation of source-map cache, this is used // to persist a cache of source-maps to disk when NODE_V8_COVERAGE is enabled. function sourceMapCacheToObject() { - const obj = { __proto__: null }; - - for (const { 0: k, 1: v } of esmSourceMapCache) { - obj[k] = v; - } - - appendCJSCache(obj); - - if (ObjectKeys(obj).length === 0) { + const moduleSourceMapCache = getModuleSourceMapCache(); + if (moduleSourceMapCache.size === 0) { return undefined; } - return obj; -} -function appendCJSCache(obj) { - for (const value of getCjsSourceMapCache()) { - obj[value.filename] = { + const obj = { __proto__: null }; + for (const { 0: k, 1: v } of moduleSourceMapCache) { + obj[k] = { __proto__: null, - lineLengths: value.lineLengths, - data: value.data, - url: value.url, + lineLengths: v.lineLengths, + data: v.data, + url: v.sourceMapURL, }; } + return obj; } +/** + * Find a source map for a given actual source URL or path. + * @param {string} sourceURL - actual source URL or path + * @returns {import('internal/source_map/source_map').SourceMap | undefined} a source map or undefined if not found + */ function findSourceMap(sourceURL) { if (RegExpPrototypeExec(kLeadingProtocol, sourceURL) === null) { sourceURL = pathToFileURL(sourceURL).href; @@ -321,16 +343,7 @@ function findSourceMap(sourceURL) { if (!SourceMap) { SourceMap = require('internal/source_map/source_map').SourceMap; } - let entry = esmSourceMapCache.get(sourceURL) ?? generatedSourceMapCache.get(sourceURL); - if (entry === undefined) { - for (const value of getCjsSourceMapCache()) { - const filename = value.filename; - const cachedSourceURL = value.sourceURL; - if (sourceURL === filename || sourceURL === cachedSourceURL) { - entry = value; - } - } - } + const entry = getModuleSourceMapCache().get(sourceURL) ?? generatedSourceMapCache.get(sourceURL); if (entry === undefined) { return undefined; } diff --git a/lib/internal/source_map/source_map_cache_map.js b/lib/internal/source_map/source_map_cache_map.js new file mode 100644 index 00000000000000..e8adfe83708316 --- /dev/null +++ b/lib/internal/source_map/source_map_cache_map.js @@ -0,0 +1,115 @@ +'use strict'; + +const { + ArrayPrototypeForEach, + ObjectFreeze, + SafeFinalizationRegistry, + SafeMap, + SafeWeakRef, + SymbolIterator, +} = primordials; +const { + privateSymbols: { + source_map_data_private_symbol, + }, +} = internalBinding('util'); + +/** + * Specialized map of WeakRefs to module instances that caches source map + * entries by `filename` and `sourceURL`. Cached entries can be iterated with + * `for..of` syntax. + * + * The cache map maintains the cache entries by: + * - `weakModuleMap`(Map): a strong sourceURL -> WeakRef(Module), + * - WeakRef(Module[source_map_data_private_symbol]): source map data. + * + * Obsolete `weakModuleMap` entries are removed by the `finalizationRegistry` + * callback. This pattern decouples the strong url reference to the source map + * data and allow the cache to be reclaimed eagerly, without depending on an + * undeterministic callback of a finalization registry. + */ +class SourceMapCacheMap { + /** + * @type {Map<string, WeakRef<*>>} + * The cached module instance can be removed from the global module registry + * with approaches like mutating `require.cache`. + * The `weakModuleMap` exposes entries by `filename` and `sourceURL`. + * In the case of mutated module registry, obsolete entries are removed from + * the cache by the `finalizationRegistry`. + */ + #weakModuleMap = new SafeMap(); + + #cleanup = ({ keys }) => { + // Delete the entry if the weak target has been reclaimed. + // If the weak target is not reclaimed, the entry was overridden by a new + // weak target. + ArrayPrototypeForEach(keys, (key) => { + const ref = this.#weakModuleMap.get(key); + if (ref && ref.deref() === undefined) { + this.#weakModuleMap.delete(key); + } + }); + }; + #finalizationRegistry = new SafeFinalizationRegistry(this.#cleanup); + + /** + * Sets the value for the given key, associated with the given module + * instance. + * @param {string[]} keys array of urls to index the value entry. + * @param {*} sourceMapData the value entry. + * @param {object} moduleInstance an object that can be weakly referenced and + * invalidate the [key, value] entry after this object is reclaimed. + */ + set(keys, sourceMapData, moduleInstance) { + const weakRef = new SafeWeakRef(moduleInstance); + ArrayPrototypeForEach(keys, (key) => this.#weakModuleMap.set(key, weakRef)); + moduleInstance[source_map_data_private_symbol] = sourceMapData; + this.#finalizationRegistry.register(moduleInstance, { keys }); + } + + /** + * Get an entry by the given key. + * @param {string} key a file url or source url + */ + get(key) { + const weakRef = this.#weakModuleMap.get(key); + const moduleInstance = weakRef?.deref(); + if (moduleInstance === undefined) { + return; + } + return moduleInstance[source_map_data_private_symbol]; + } + + /** + * Estimate the size of the cache. The actual size may be smaller because + * some entries may be reclaimed with the module instance. + */ + get size() { + return this.#weakModuleMap.size; + } + + [SymbolIterator]() { + const iterator = this.#weakModuleMap.entries(); + + const next = () => { + const result = iterator.next(); + if (result.done) return result; + const { 0: key, 1: weakRef } = result.value; + const moduleInstance = weakRef.deref(); + if (moduleInstance == null) return next(); + const value = moduleInstance[source_map_data_private_symbol]; + return { done: false, value: [key, value] }; + }; + + return { + [SymbolIterator]() { return this; }, + next, + }; + } +} + +ObjectFreeze(SourceMapCacheMap.prototype); + +module.exports = { + SourceMapCacheMap, +}; diff --git a/lib/internal/url.js b/lib/internal/url.js index 42debfc20005b0..91976bceb0db19 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -1624,6 +1624,7 @@ module.exports = { installObjectURLMethods, URL, URLSearchParams, + URLParse: URL.parse, domainToASCII, domainToUnicode, urlToHttpOptions, diff --git a/lib/internal/util.js b/lib/internal/util.js index 40e6f5e5090295..26566cd1f65602 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -3,7 +3,6 @@ const { ArrayBufferPrototypeGetByteLength, ArrayFrom, - ArrayIsArray, ArrayPrototypePush, ArrayPrototypeSlice, ArrayPrototypeSort, @@ -35,9 +34,7 @@ const { SafeSet, SafeWeakMap, SafeWeakRef, - StringPrototypeIncludes, StringPrototypeReplace, - StringPrototypeStartsWith, StringPrototypeToLowerCase, StringPrototypeToUpperCase, Symbol, @@ -258,11 +255,20 @@ function slowCases(enc) { } } -function emitExperimentalWarning(feature) { +/** + * @param {string} feature Feature name used in the warning message + * @param {string} messagePrefix Prefix of the warning message + * @param {string} code See documentation of process.emitWarning + * @param {string} ctor See documentation of process.emitWarning + */ +function emitExperimentalWarning(feature, messagePrefix, code, ctor) { if (experimentalWarnings.has(feature)) return; - const msg = `${feature} is an experimental feature and might change at any time`; experimentalWarnings.add(feature); - process.emitWarning(msg, 'ExperimentalWarning'); + let msg = `${feature} is an experimental feature and might change at any time`; + if (messagePrefix) { + msg = messagePrefix + msg; + } + process.emitWarning(msg, 'ExperimentalWarning', code, ctor); } function filterDuplicateStrings(items, low) { @@ -477,6 +483,10 @@ function spliceOne(list, index) { const kNodeModulesRE = /^(?:.*)[\\/]node_modules[\\/]/; +function isUnderNodeModules(filename) { + return filename && (RegExpPrototypeExec(kNodeModulesRE, filename) !== null); +} + let getStructuredStackImpl; function lazyGetStructuredStack() { @@ -505,31 +515,6 @@ function getStructuredStack() { return getStructuredStackImpl(); } -function isInsideNodeModules() { - const stack = getStructuredStack(); - - // Iterate over all stack frames and look for the first one not coming - // from inside Node.js itself: - if (ArrayIsArray(stack)) { - for (const frame of stack) { - const filename = frame.getFileName(); - - if ( - filename == null || - StringPrototypeStartsWith(filename, 'node:') === true || - ( - filename[0] !== '/' && - StringPrototypeIncludes(filename, '\\') === false - ) - ) { - continue; - } - return RegExpPrototypeExec(kNodeModulesRE, filename) !== null; - } - } - return false; -} - function once(callback, { preserveReturnValue = false } = kEmptyObject) { let called = false; let returnValue; @@ -912,7 +897,7 @@ module.exports = { guessHandleType, isArrayBufferDetached, isError, - isInsideNodeModules, + isUnderNodeModules, join, lazyDOMException, lazyDOMExceptionClass, diff --git a/lib/internal/util/embedding.js b/lib/internal/util/embedding.js deleted file mode 100644 index 7e4cd565492843..00000000000000 --- a/lib/internal/util/embedding.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const { BuiltinModule: { normalizeRequirableId } } = require('internal/bootstrap/realm'); -const { Module, wrapSafe } = require('internal/modules/cjs/loader'); -const { codes: { ERR_UNKNOWN_BUILTIN_MODULE } } = require('internal/errors'); -const { getCodePath, isSea } = internalBinding('sea'); - -// This is roughly the same as: -// -// const mod = new Module(filename); -// mod._compile(contents, filename); -// -// but the code has been duplicated because currently there is no way to set the -// value of require.main to module. -// -// TODO(RaisinTen): Find a way to deduplicate this. - -function embedderRunCjs(contents) { - const filename = process.execPath; - const { function: compiledWrapper } = wrapSafe( - isSea() ? getCodePath() : filename, - contents); - - const customModule = new Module(filename, null); - customModule.filename = filename; - customModule.paths = Module._nodeModulePaths(customModule.path); - - const customExports = customModule.exports; - - embedderRequire.main = customModule; - - const customFilename = customModule.filename; - - const customDirname = customModule.path; - - return compiledWrapper( - customExports, - embedderRequire, - customModule, - customFilename, - customDirname); -} - -function embedderRequire(id) { - const normalizedId = normalizeRequirableId(id); - if (!normalizedId) { - throw new ERR_UNKNOWN_BUILTIN_MODULE(id); - } - return require(normalizedId); -} - -module.exports = { embedderRequire, embedderRunCjs }; diff --git a/lib/internal/util/iterable_weak_map.js b/lib/internal/util/iterable_weak_map.js deleted file mode 100644 index 16694ffdb11de8..00000000000000 --- a/lib/internal/util/iterable_weak_map.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -const { - ObjectFreeze, - SafeFinalizationRegistry, - SafeSet, - SafeWeakMap, - SafeWeakRef, - SymbolIterator, -} = primordials; - -// This class is modified from the example code in the WeakRefs specification: -// https://github.com/tc39/proposal-weakrefs -// Licensed under ECMA's MIT-style license, see: -// https://github.com/tc39/ecma262/blob/HEAD/LICENSE.md -class IterableWeakMap { - #weakMap = new SafeWeakMap(); - #refSet = new SafeSet(); - #finalizationGroup = new SafeFinalizationRegistry(cleanup); - - set(key, value) { - const entry = this.#weakMap.get(key); - if (entry) { - // If there's already an entry for the object represented by "key", - // the value can be updated without creating a new WeakRef: - this.#weakMap.set(key, { value, ref: entry.ref }); - } else { - const ref = new SafeWeakRef(key); - this.#weakMap.set(key, { value, ref }); - this.#refSet.add(ref); - this.#finalizationGroup.register(key, { - set: this.#refSet, - ref, - }, ref); - } - } - - get(key) { - return this.#weakMap.get(key)?.value; - } - - has(key) { - return this.#weakMap.has(key); - } - - delete(key) { - const entry = this.#weakMap.get(key); - if (!entry) { - return false; - } - this.#weakMap.delete(key); - this.#refSet.delete(entry.ref); - this.#finalizationGroup.unregister(entry.ref); - return true; - } - - [SymbolIterator]() { - const iterator = this.#refSet[SymbolIterator](); - - const next = () => { - const result = iterator.next(); - if (result.done) return result; - const key = result.value.deref(); - if (key == null) return next(); - const { value } = this.#weakMap.get(key); - return { done: false, value }; - }; - - return { - [SymbolIterator]() { return this; }, - next, - }; - } -} - -function cleanup({ set, ref }) { - set.delete(ref); -} - -ObjectFreeze(IterableWeakMap.prototype); - -module.exports = { - IterableWeakMap, -}; diff --git a/lib/internal/vm/module.js b/lib/internal/vm/module.js index 0a8419f8ca4454..9e500cde86105b 100644 --- a/lib/internal/vm/module.js +++ b/lib/internal/vm/module.js @@ -2,16 +2,20 @@ const assert = require('internal/assert'); const { + Array, ArrayIsArray, ArrayPrototypeForEach, ArrayPrototypeIndexOf, + ArrayPrototypeMap, ArrayPrototypeSome, ObjectDefineProperty, ObjectGetPrototypeOf, ObjectPrototypeHasOwnProperty, ObjectSetPrototypeOf, + PromiseResolve, + PromisePrototypeThen, ReflectApply, - SafePromiseAllReturnVoid, + SafePromiseAllReturnArrayLike, Symbol, SymbolToStringTag, TypeError, @@ -293,44 +297,61 @@ class SourceTextModule extends Module { importModuleDynamically, }); - this[kLink] = async (linker) => { - this.#statusOverride = 'linking'; + this[kDependencySpecifiers] = undefined; + } - const promises = this[kWrap].link(async (identifier, attributes) => { - const module = await linker(identifier, this, { attributes, assert: attributes }); - if (!isModule(module)) { - throw new ERR_VM_MODULE_NOT_MODULE(); - } - if (module.context !== this.context) { - throw new ERR_VM_MODULE_DIFFERENT_CONTEXT(); - } - if (module.status === 'errored') { - throw new ERR_VM_MODULE_LINK_FAILURE(`request for '${identifier}' resolved to an errored module`, module.error); - } - if (module.status === 'unlinked') { - await module[kLink](linker); - } - return module[kWrap]; + async [kLink](linker) { + this.#statusOverride = 'linking'; + + const moduleRequests = this[kWrap].getModuleRequests(); + // Iterates the module requests and links with the linker. + // Specifiers should be aligned with the moduleRequests array in order. + const specifiers = Array(moduleRequests.length); + const modulePromises = Array(moduleRequests.length); + // Iterates with index to avoid calling into userspace with `Symbol.iterator`. + for (let idx = 0; idx < moduleRequests.length; idx++) { + const { specifier, attributes } = moduleRequests[idx]; + + const linkerResult = linker(specifier, this, { + attributes, + assert: attributes, }); + const modulePromise = PromisePrototypeThen( + PromiseResolve(linkerResult), async (module) => { + if (!isModule(module)) { + throw new ERR_VM_MODULE_NOT_MODULE(); + } + if (module.context !== this.context) { + throw new ERR_VM_MODULE_DIFFERENT_CONTEXT(); + } + if (module.status === 'errored') { + throw new ERR_VM_MODULE_LINK_FAILURE(`request for '${specifier}' resolved to an errored module`, module.error); + } + if (module.status === 'unlinked') { + await module[kLink](linker); + } + return module[kWrap]; + }); + modulePromises[idx] = modulePromise; + specifiers[idx] = specifier; + } - try { - if (promises !== undefined) { - await SafePromiseAllReturnVoid(promises); - } - } catch (e) { - this.#error = e; - throw e; - } finally { - this.#statusOverride = undefined; - } - }; - - this[kDependencySpecifiers] = undefined; + try { + const modules = await SafePromiseAllReturnArrayLike(modulePromises); + this[kWrap].link(specifiers, modules); + } catch (e) { + this.#error = e; + throw e; + } finally { + this.#statusOverride = undefined; + } } get dependencySpecifiers() { validateInternalField(this, kDependencySpecifiers, 'SourceTextModule'); - this[kDependencySpecifiers] ??= this[kWrap].getStaticDependencySpecifiers(); + // TODO(legendecas): add a new getter to expose the import attributes as the value type + // of [[RequestedModules]] is changed in https://tc39.es/proposal-import-attributes/#table-cyclic-module-fields. + this[kDependencySpecifiers] ??= ArrayPrototypeMap(this[kWrap].getModuleRequests(), (request) => request.specifier); return this[kDependencySpecifiers]; } @@ -392,10 +413,10 @@ class SyntheticModule extends Module { context, identifier, }); + } - this[kLink] = () => this[kWrap].link(() => { - assert.fail('link callback should not be called'); - }); + [kLink]() { + /** nothing to do for synthetic modules */ } setExport(name, value) { diff --git a/lib/internal/webstreams/readablestream.js b/lib/internal/webstreams/readablestream.js index 99aabd3d56f4fd..0ce9d766684b68 100644 --- a/lib/internal/webstreams/readablestream.js +++ b/lib/internal/webstreams/readablestream.js @@ -918,7 +918,7 @@ class ReadableStreamBYOBReader { throw new ERR_INVALID_ARG_TYPE('stream', 'ReadableStream', stream); this[kState] = { stream: undefined, - requestIntoRequests: [], + readIntoRequests: [], close: { promise: undefined, resolve: undefined, @@ -1024,7 +1024,7 @@ class ReadableStreamBYOBReader { [kInspect](depth, options) { return customInspect(depth, options, this[kType], { stream: this[kState].stream, - requestIntoRequests: this[kState].requestIntoRequests.length, + readIntoRequests: this[kState].readIntoRequests.length, close: this[kState].close.promise, }); } diff --git a/lib/internal/webstreams/writablestream.js b/lib/internal/webstreams/writablestream.js index 70c470bac845f6..8373fb3fff95cf 100644 --- a/lib/internal/webstreams/writablestream.js +++ b/lib/internal/webstreams/writablestream.js @@ -1167,9 +1167,18 @@ function writableStreamDefaultControllerGetDesiredSize(controller) { } function writableStreamDefaultControllerGetChunkSize(controller, chunk) { + const { + stream, + sizeAlgorithm, + } = controller[kState]; + if (sizeAlgorithm === undefined) { + assert(stream[kState].state === 'errored' || stream[kState].state === 'erroring'); + return 1; + } + try { return FunctionPrototypeCall( - controller[kState].sizeAlgorithm, + sizeAlgorithm, undefined, chunk); } catch (error) { diff --git a/lib/internal/worker.js b/lib/internal/worker.js index 401bc43550ea7f..519faa4ff765f6 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -56,6 +56,7 @@ const { ReadableWorkerStdio, WritableWorkerStdio, } = workerIo; +const { createMainThreadPort, destroyMainThreadPort } = require('internal/worker/messaging'); const { deserializeError } = require('internal/error_serdes'); const { fileURLToPath, isURL, pathToFileURL } = require('internal/url'); const { kEmptyObject } = require('internal/util'); @@ -251,14 +252,18 @@ class Worker extends EventEmitter { this[kParentSideStdio] = { stdin, stdout, stderr }; - const { port1, port2 } = new MessageChannel(); - const transferList = [port2]; + const mainThreadPortToWorker = createMainThreadPort(this.threadId); + const { + port1: publicPortToParent, + port2: publicPortToWorker, + } = new MessageChannel(); + const transferList = [mainThreadPortToWorker, publicPortToWorker]; // If transferList is provided. if (options.transferList) ArrayPrototypePush(transferList, ...new SafeArrayIterator(options.transferList)); - this[kPublicPort] = port1; + this[kPublicPort] = publicPortToParent; ArrayPrototypeForEach(['message', 'messageerror'], (event) => { this[kPublicPort].on(event, (message) => this.emit(event, message)); }); @@ -272,7 +277,6 @@ class Worker extends EventEmitter { cwdCounter: cwdCounter || workerIo.sharedCwdCounter, workerData: options.workerData, environmentData, - publicPort: port2, manifestURL: getOptionValue('--experimental-policy') ? require('internal/process/policy').url : null, @@ -280,6 +284,8 @@ class Worker extends EventEmitter { require('internal/process/policy').src : null, hasStdin: !!options.stdin, + publicPort: publicPortToWorker, + mainThreadPort: mainThreadPortToWorker, }, transferList); // Use this to cache the Worker's loopStart value once available. this[kLoopStartTime] = -1; @@ -302,6 +308,7 @@ class Worker extends EventEmitter { debug(`[${threadId}] hears end event for Worker ${this.threadId}`); drainMessagePort(this[kPublicPort]); drainMessagePort(this[kPort]); + destroyMainThreadPort(this.threadId); this.removeAllListeners('message'); this.removeAllListeners('messageerrors'); this[kPublicPort].unref(); diff --git a/lib/internal/worker/messaging.js b/lib/internal/worker/messaging.js new file mode 100644 index 00000000000000..40911e6c61f83b --- /dev/null +++ b/lib/internal/worker/messaging.js @@ -0,0 +1,250 @@ +'use strict'; + +const { + Int32Array, + SafeMap, + globalThis: { + Atomics, + SharedArrayBuffer, + }, +} = primordials; + +const { + isMainThread, + threadId: currentThreadId, +} = internalBinding('worker'); + +const { + codes: { + ERR_WORKER_MESSAGING_ERRORED, + ERR_WORKER_MESSAGING_FAILED, + ERR_WORKER_MESSAGING_SAME_THREAD, + ERR_WORKER_MESSAGING_TIMEOUT, + }, +} = require('internal/errors'); + +const { MessageChannel } = require('internal/worker/io'); + +const { validateNumber } = require('internal/validators'); + +const messageTypes = { + REGISTER_MAIN_THREAD_PORT: 'registerMainThreadPort', + UNREGISTER_MAIN_THREAD_PORT: 'unregisterMainThreadPort', + SEND_MESSAGE_TO_WORKER: 'sendMessageToWorker', + RECEIVE_MESSAGE_FROM_WORKER: 'receiveMessageFromWorker', +}; + +// This is only populated by main thread and always empty in other threads +const threadsPorts = new SafeMap(); + +// This is only populated in child threads and always undefined in main thread +let mainThreadPort; + +// SharedArrayBuffer must always be Int32, so it's * 4. +// We need one for the operation status (performing / performed) and one for the result (success / failure). +const WORKER_MESSAGING_SHARED_DATA = 2 * 4; +const WORKER_MESSAGING_STATUS_INDEX = 0; +const WORKER_MESSAGING_RESULT_INDEX = 1; + +// Response codes +const WORKER_MESSAGING_RESULT_DELIVERED = 0; +const WORKER_MESSAGING_RESULT_NO_LISTENERS = 1; +const WORKER_MESSAGING_RESULT_LISTENER_ERROR = 2; + +// This event handler is always executed on the main thread only +function handleMessageFromThread(message) { + switch (message.type) { + case messageTypes.REGISTER_MAIN_THREAD_PORT: + { + const { threadId, port } = message; + + // Register the port + threadsPorts.set(threadId, port); + + // Handle messages on this port + // When a new thread wants to register a children + // this take care of doing that. + // This way any thread can be linked to the main one. + port.on('message', handleMessageFromThread); + + // Never block the thread on this port + port.unref(); + } + + break; + case messageTypes.UNREGISTER_MAIN_THREAD_PORT: + threadsPorts.get(message.threadId).close(); + threadsPorts.delete(message.threadId); + break; + case messageTypes.SEND_MESSAGE_TO_WORKER: + { + // Send the message to the target thread + const { source, destination, value, transferList, memory } = message; + sendMessageToWorker(source, destination, value, transferList, memory); + } + break; + } +} + +function handleMessageFromMainThread(message) { + switch (message.type) { + case messageTypes.RECEIVE_MESSAGE_FROM_WORKER: + receiveMessageFromWorker(message.source, message.value, message.memory); + break; + } +} + +function sendMessageToWorker(source, destination, value, transferList, memory) { + if (SharedArrayBuffer === undefined || Atomics === undefined) { + return; + } + + // We are on the main thread, we can directly process the message + if (destination === 0) { + receiveMessageFromWorker(source, value, memory); + return; + } + + // Search the port to the target thread + const port = threadsPorts.get(destination); + + if (!port) { + const status = new Int32Array(memory); + Atomics.store(status, WORKER_MESSAGING_RESULT_INDEX, WORKER_MESSAGING_RESULT_NO_LISTENERS); + Atomics.store(status, WORKER_MESSAGING_STATUS_INDEX, 1); + Atomics.notify(status, WORKER_MESSAGING_STATUS_INDEX, 1); + return; + } + + port.postMessage( + { + type: messageTypes.RECEIVE_MESSAGE_FROM_WORKER, + source, + destination, + value, + memory, + }, + transferList, + ); +} + +function receiveMessageFromWorker(source, value, memory) { + if (SharedArrayBuffer === undefined || Atomics === undefined) { + return; + } + + let response = WORKER_MESSAGING_RESULT_NO_LISTENERS; + + try { + if (process.emit('workerMessage', value, source)) { + response = WORKER_MESSAGING_RESULT_DELIVERED; + } + } catch { + response = WORKER_MESSAGING_RESULT_LISTENER_ERROR; + } + + // Populate the result + const status = new Int32Array(memory); + Atomics.store(status, WORKER_MESSAGING_RESULT_INDEX, response); + Atomics.store(status, WORKER_MESSAGING_STATUS_INDEX, 1); + Atomics.notify(status, WORKER_MESSAGING_STATUS_INDEX, 1); +} + +function createMainThreadPort(threadId) { + // Create a channel that links the new thread to the main thread + const { + port1: mainThreadPortToMain, + port2: mainThreadPortToThread, + } = new MessageChannel(); + + const registrationMessage = { + type: messageTypes.REGISTER_MAIN_THREAD_PORT, + threadId, + port: mainThreadPortToMain, + }; + + if (isMainThread) { + handleMessageFromThread(registrationMessage); + } else { + mainThreadPort.postMessage(registrationMessage, [mainThreadPortToMain]); + } + + return mainThreadPortToThread; +} + +function destroyMainThreadPort(threadId) { + const unregistrationMessage = { + type: messageTypes.UNREGISTER_MAIN_THREAD_PORT, + threadId, + }; + + if (isMainThread) { + handleMessageFromThread(unregistrationMessage); + } else { + mainThreadPort.postMessage(unregistrationMessage); + } +} + +function setupMainThreadPort(port) { + mainThreadPort = port; + mainThreadPort.on('message', handleMessageFromMainThread); + + // Never block the process on this port + mainThreadPort.unref(); +} + +async function postMessageToThread(threadId, value, transferList, timeout) { + if (SharedArrayBuffer === undefined || Atomics === undefined) { + return; + } + + if (typeof transferList === 'number' && typeof timeout === 'undefined') { + timeout = transferList; + transferList = []; + } + + if (typeof timeout !== 'undefined') { + validateNumber(timeout, 'timeout', 0); + } + + if (threadId === currentThreadId) { + throw new ERR_WORKER_MESSAGING_SAME_THREAD(); + } + + const memory = new SharedArrayBuffer(WORKER_MESSAGING_SHARED_DATA); + const status = new Int32Array(memory); + const promise = Atomics.waitAsync(status, WORKER_MESSAGING_STATUS_INDEX, 0, timeout).value; + + const message = { + type: messageTypes.SEND_MESSAGE_TO_WORKER, + source: currentThreadId, + destination: threadId, + value, + memory, + transferList, + }; + + if (isMainThread) { + handleMessageFromThread(message); + } else { + mainThreadPort.postMessage(message, transferList); + } + + // Wait for the response + const response = await promise; + + if (response === 'timed-out') { + throw new ERR_WORKER_MESSAGING_TIMEOUT(); + } else if (status[WORKER_MESSAGING_RESULT_INDEX] === WORKER_MESSAGING_RESULT_NO_LISTENERS) { + throw new ERR_WORKER_MESSAGING_FAILED(); + } else if (status[WORKER_MESSAGING_RESULT_INDEX] === WORKER_MESSAGING_RESULT_LISTENER_ERROR) { + throw new ERR_WORKER_MESSAGING_ERRORED(); + } +} + +module.exports = { + createMainThreadPort, + destroyMainThreadPort, + setupMainThreadPort, + postMessageToThread, +}; diff --git a/lib/worker_threads.js b/lib/worker_threads.js index 155cc11ecdaf43..402181dcc4fcf2 100644 --- a/lib/worker_threads.js +++ b/lib/worker_threads.js @@ -18,6 +18,10 @@ const { BroadcastChannel, } = require('internal/worker/io'); +const { + postMessageToThread, +} = require('internal/worker/messaging'); + const { markAsUntransferable, } = require('internal/buffer'); @@ -30,6 +34,7 @@ module.exports = { moveMessagePortToContext, receiveMessageOnPort, resourceLimits, + postMessageToThread, threadId, SHARE_ENV, Worker, diff --git a/node.gyp b/node.gyp index 33bc7d985fe230..e88c7ded109ca4 100644 --- a/node.gyp +++ b/node.gyp @@ -830,7 +830,6 @@ '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h ], 'dependencies': [ - 'deps/base64/base64.gyp:base64', 'deps/googletest/googletest.gyp:gtest_prod', 'deps/histogram/histogram.gyp:histogram', 'deps/uvwasi/uvwasi.gyp:uvwasi', @@ -1148,7 +1147,6 @@ 'dependencies': [ '<(node_lib_target_name)', - 'deps/base64/base64.gyp:base64', 'deps/googletest/googletest.gyp:gtest', 'deps/googletest/googletest.gyp:gtest_main', 'deps/histogram/histogram.gyp:histogram', diff --git a/pyproject.toml b/pyproject.toml index d8b53dc20ee219..d8c7a92a4888ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,9 +32,7 @@ ignore = [ "E401", "E402", "E7", - "PLC1901", "RUF005", - "RUF100", ] [tool.ruff.lint.mccabe] diff --git a/src/README.md b/src/README.md index 01d6d5fd4bcd89..565ac0df5cec72 100644 --- a/src/README.md +++ b/src/README.md @@ -467,10 +467,16 @@ void Initialize(Local<Object> target, NODE_BINDING_CONTEXT_AWARE_INTERNAL(cares_wrap, Initialize) ``` -If the C++ binding is loaded during bootstrap, it needs to be registered -with the utilities in `node_external_reference.h`, like this: +#### Registering binding functions used in bootstrap + +If the C++ binding is loaded during bootstrap, in addition to registering it +using `NODE_BINDING_CONTEXT_AWARE_INTERNAL` for `internalBinding()` lookup, +it also needs to be registered with `NODE_BINDING_EXTERNAL_REFERENCE` so that +the external references can be resolved from the built-in snapshot, like this: ```cpp +#include "node_external_reference.h" + namespace node { namespace util { void RegisterExternalReferences(ExternalReferenceRegistry* registry) { @@ -498,7 +504,8 @@ Unknown external reference 0x107769200. /bin/sh: line 1: 6963 Illegal instruction: 4 out/Release/node_mksnapshot out/Release/gen/node_snapshot.cc ``` -You can try using a debugger to symbolicate the external reference. For example, +You can try using a debugger to symbolicate the external reference in order to find +out the binding functions that you forget to register. For example, with lldb's `image lookup --address` command (with gdb it's `info symbol`): ```console @@ -514,7 +521,9 @@ Process 7012 stopped ``` Which explains that the unregistered external reference is -`node::util::GetHiddenValue` defined in `node_util.cc`. +`node::util::GetHiddenValue` defined in `node_util.cc`, and should be registered +using `registry->Register()` in a registration function marked by +`NODE_BINDING_EXTERNAL_REFERENCE`. <a id="per-binding-state"></a> diff --git a/src/base64-inl.h b/src/base64-inl.h index 6c9280d1ff1c75..4e523e8219570c 100644 --- a/src/base64-inl.h +++ b/src/base64-inl.h @@ -4,7 +4,6 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "base64.h" -#include "libbase64.h" #include "util.h" namespace node { @@ -124,68 +123,6 @@ size_t base64_decode(char* const dst, const size_t dstlen, return base64_decode_fast(dst, dstlen, src, srclen, decoded_size); } - -inline size_t base64_encode(const char* src, - size_t slen, - char* dst, - size_t dlen, - Base64Mode mode) { - // We know how much we'll write, just make sure that there's space. - CHECK(dlen >= base64_encoded_size(slen, mode) && - "not enough space provided for base64 encode"); - - dlen = base64_encoded_size(slen, mode); - - if (mode == Base64Mode::NORMAL) { - ::base64_encode(src, slen, dst, &dlen, 0); - return dlen; - } - - unsigned a; - unsigned b; - unsigned c; - unsigned i; - unsigned k; - unsigned n; - - const char* table = base64_table_url; - - i = 0; - k = 0; - n = slen / 3 * 3; - - while (i < n) { - a = src[i + 0] & 0xff; - b = src[i + 1] & 0xff; - c = src[i + 2] & 0xff; - - dst[k + 0] = table[a >> 2]; - dst[k + 1] = table[((a & 3) << 4) | (b >> 4)]; - dst[k + 2] = table[((b & 0x0f) << 2) | (c >> 6)]; - dst[k + 3] = table[c & 0x3f]; - - i += 3; - k += 4; - } - - switch (slen - n) { - case 1: - a = src[i + 0] & 0xff; - dst[k + 0] = table[a >> 2]; - dst[k + 1] = table[(a & 3) << 4]; - break; - case 2: - a = src[i + 0] & 0xff; - b = src[i + 1] & 0xff; - dst[k + 0] = table[a >> 2]; - dst[k + 1] = table[((a & 3) << 4) | (b >> 4)]; - dst[k + 2] = table[(b & 0x0f) << 2]; - break; - } - - return dlen; -} - } // namespace node #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS diff --git a/src/base64.h b/src/base64.h index d93291f101bb94..c59a8bb50637c8 100644 --- a/src/base64.h +++ b/src/base64.h @@ -37,14 +37,10 @@ template <typename TypeName> size_t base64_decoded_size(const TypeName* src, size_t size); template <typename TypeName> -size_t base64_decode(char* const dst, const size_t dstlen, - const TypeName* const src, const size_t srclen); - -inline size_t base64_encode(const char* src, - size_t slen, - char* dst, - size_t dlen, - Base64Mode mode = Base64Mode::NORMAL); +size_t base64_decode(char* const dst, + const size_t dstlen, + const TypeName* const src, + const size_t srclen); } // namespace node diff --git a/src/base64_version.h b/src/base64_version.h deleted file mode 100644 index ce3d7c03f8c979..00000000000000 --- a/src/base64_version.h +++ /dev/null @@ -1,6 +0,0 @@ -// This is an auto generated file, please do not edit. -// Refer to tools/dep_updaters/update-base64.sh -#ifndef SRC_BASE64_VERSION_H_ -#define SRC_BASE64_VERSION_H_ -#define BASE64_VERSION "0.5.2" -#endif // SRC_BASE64_VERSION_H_ diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc index cef0c877c67643..dab6cf87a0809f 100644 --- a/src/crypto/crypto_context.cc +++ b/src/crypto/crypto_context.cc @@ -219,6 +219,7 @@ X509_STORE* NewRootCertStore() { } X509_STORE* store = X509_STORE_new(); + CHECK_NOT_NULL(store); if (*system_cert_path != '\0') { ERR_set_mark(); X509_STORE_load_locations(store, system_cert_path, nullptr); @@ -1117,7 +1118,7 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) { X509* ca = sk_X509_value(extra_certs.get(), i); X509_STORE_add_cert(sc->GetCertStoreOwnedByThisSecureContext(), ca); - SSL_CTX_add_client_CA(sc->ctx_.get(), ca); + CHECK_EQ(1, SSL_CTX_add_client_CA(sc->ctx_.get(), ca)); } ret = true; diff --git a/src/crypto/crypto_rsa.h b/src/crypto/crypto_rsa.h index e444159daa9404..cb912c93ade405 100644 --- a/src/crypto/crypto_rsa.h +++ b/src/crypto/crypto_rsa.h @@ -78,7 +78,7 @@ struct RSAKeyExportTraits final { using RSAKeyExportJob = KeyExportJob<RSAKeyExportTraits>; struct RSACipherConfig final : public MemoryRetainer { - CryptoJobMode mode; + CryptoJobMode mode = kCryptoJobAsync; ByteSource label; int padding = 0; const EVP_MD* digest = nullptr; diff --git a/src/env.h b/src/env.h index 2ec0a56e05ff87..598082f68aefe2 100644 --- a/src/env.h +++ b/src/env.h @@ -1061,6 +1061,8 @@ class Environment : public MemoryRetainer { std::vector<std::string> supported_hash_algorithms; #endif // HAVE_OPENSSL + v8::Global<v8::Module> temporary_required_module_facade_original; + private: // V8 has changed the constructor of exceptions, support both APIs before Node // updates to V8 12.1. diff --git a/src/env_properties.h b/src/env_properties.h index 8243a71c035f9b..555c8fd09111ea 100644 --- a/src/env_properties.h +++ b/src/env_properties.h @@ -32,7 +32,8 @@ V(untransferable_object_private_symbol, "node:untransferableObject") \ V(exit_info_private_symbol, "node:exit_info_private_symbol") \ V(promise_trace_id, "node:promise_trace_id") \ - V(require_private_symbol, "node:require_private_symbol") + V(require_private_symbol, "node:require_private_symbol") \ + V(source_map_data_private_symbol, "node:source_map_data_private_symbol") // Symbols are per-isolate primitives but Environment proxies them // for the sake of convenience. @@ -71,6 +72,7 @@ V(args_string, "args") \ V(asn1curve_string, "asn1Curve") \ V(async_ids_stack_string, "async_ids_stack") \ + V(attributes_string, "attributes") \ V(base_string, "base") \ V(bits_string, "bits") \ V(block_list_string, "blockList") \ @@ -250,6 +252,7 @@ V(openssl_error_stack, "opensslErrorStack") \ V(options_string, "options") \ V(order_string, "order") \ + V(original_string, "original") \ V(output_string, "output") \ V(overlapped_string, "overlapped") \ V(parse_error_string, "Parse Error") \ @@ -283,6 +286,11 @@ V(regexp_string, "regexp") \ V(rename_string, "rename") \ V(replacement_string, "replacement") \ + V(required_module_facade_url_string, \ + "node:internal/require_module_default_facade") \ + V(required_module_facade_source_string, \ + "export * from 'original'; export { default } from 'original'; export " \ + "const __esModule = true;") \ V(require_string, "require") \ V(resource_string, "resource") \ V(retry_string, "retry") \ @@ -303,6 +311,7 @@ V(sni_context_string, "sni_context") \ V(source_string, "source") \ V(source_map_url_string, "sourceMapURL") \ + V(specifier_string, "specifier") \ V(stack_string, "stack") \ V(standard_name_string, "standardName") \ V(start_time_string, "startTime") \ @@ -377,6 +386,7 @@ V(intervalhistogram_constructor_template, v8::FunctionTemplate) \ V(libuv_stream_wrap_ctor_template, v8::FunctionTemplate) \ V(message_port_constructor_template, v8::FunctionTemplate) \ + V(module_wrap_constructor_template, v8::FunctionTemplate) \ V(microtask_queue_ctor_template, v8::FunctionTemplate) \ V(pipe_constructor_template, v8::FunctionTemplate) \ V(promise_wrap_template, v8::ObjectTemplate) \ diff --git a/src/inspector/worker_inspector.h b/src/inspector/worker_inspector.h index d3254d5aa0ebe4..24403bb1704c40 100644 --- a/src/inspector/worker_inspector.h +++ b/src/inspector/worker_inspector.h @@ -5,6 +5,7 @@ #error("This header can only be used when inspector is enabled") #endif +#include <cstdint> #include <memory> #include <string> #include <unordered_map> diff --git a/src/inspector_socket.cc b/src/inspector_socket.cc index 3c5c1ee6f3fa1c..b6059b49410868 100644 --- a/src/inspector_socket.cc +++ b/src/inspector_socket.cc @@ -1,7 +1,8 @@ #include "inspector_socket.h" #include "llhttp.h" -#include "base64-inl.h" +#include "base64.h" +#include "simdutf.h" #include "util-inl.h" #include "openssl/sha.h" // Sha-1 hash @@ -147,10 +148,13 @@ static void generate_accept_string(const std::string& client_key, static const char ws_magic[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; std::string input(client_key + ws_magic); char hash[SHA_DIGEST_LENGTH]; + + CHECK(ACCEPT_KEY_LENGTH >= base64_encoded_size(SHA_DIGEST_LENGTH) && + "not enough space provided for base64 encode"); USE(SHA1(reinterpret_cast<const unsigned char*>(input.data()), input.size(), reinterpret_cast<unsigned char*>(hash))); - node::base64_encode(hash, sizeof(hash), *buffer, sizeof(*buffer)); + simdutf::binary_to_base64(hash, sizeof(hash), *buffer); } static std::string TrimPort(const std::string& host) { diff --git a/src/module_wrap.cc b/src/module_wrap.cc index eea74bed4bb8a9..c0776ffbbf0497 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -31,7 +31,6 @@ using v8::FunctionTemplate; using v8::HandleScope; using v8::Int32; using v8::Integer; -using v8::IntegrityLevel; using v8::Isolate; using v8::Local; using v8::MaybeLocal; @@ -102,9 +101,17 @@ ModuleWrap* ModuleWrap::GetFromModule(Environment* env, return nullptr; } -// new ModuleWrap(url, context, source, lineOffset, columnOffset, cachedData) +Local<PrimitiveArray> ModuleWrap::GetHostDefinedOptions( + Isolate* isolate, Local<Symbol> id_symbol) { + Local<PrimitiveArray> host_defined_options = + PrimitiveArray::New(isolate, HostDefinedOptions::kLength); + host_defined_options->Set(isolate, HostDefinedOptions::kID, id_symbol); + return host_defined_options; +} + +// new ModuleWrap(url, context, source, lineOffset, columnOffset[, cachedData]); // new ModuleWrap(url, context, source, lineOffset, columOffset, -// hostDefinedOption) +// idSymbol); // new ModuleWrap(url, context, exportNames, evaluationCallback[, cjsModule]) void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) { CHECK(args.IsConstructCall()); @@ -134,7 +141,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) { int column_offset = 0; bool synthetic = args[2]->IsArray(); - + bool can_use_builtin_cache = false; Local<PrimitiveArray> host_defined_options = PrimitiveArray::New(isolate, HostDefinedOptions::kLength); Local<Symbol> id_symbol; @@ -143,9 +150,10 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) { // cjsModule]) CHECK(args[3]->IsFunction()); } else { - // new ModuleWrap(url, context, source, lineOffset, columOffset, cachedData) + // new ModuleWrap(url, context, source, lineOffset, columOffset[, + // cachedData]); // new ModuleWrap(url, context, source, lineOffset, columOffset, - // hostDefinedOption) + // idSymbol); CHECK(args[2]->IsString()); CHECK(args[3]->IsNumber()); line_offset = args[3].As<Int32>()->Value(); @@ -153,10 +161,13 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) { column_offset = args[4].As<Int32>()->Value(); if (args[5]->IsSymbol()) { id_symbol = args[5].As<Symbol>(); + can_use_builtin_cache = + (id_symbol == + realm->isolate_data()->source_text_module_default_hdo()); } else { id_symbol = Symbol::New(isolate, url); } - host_defined_options->Set(isolate, HostDefinedOptions::kID, id_symbol); + host_defined_options = GetHostDefinedOptions(isolate, id_symbol); if (that->SetPrivate(context, realm->isolate_data()->host_defined_option_symbol(), @@ -189,36 +200,34 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) { module = Module::CreateSyntheticModule(isolate, url, export_names, SyntheticModuleEvaluationStepsCallback); } else { - ScriptCompiler::CachedData* cached_data = nullptr; + // When we are compiling for the default loader, this will be + // std::nullopt, and CompileSourceTextModule() should use + // on-disk cache (not present on v20.x). + std::optional<v8::ScriptCompiler::CachedData*> user_cached_data; + if (id_symbol != + realm->isolate_data()->source_text_module_default_hdo()) { + user_cached_data = nullptr; + } if (args[5]->IsArrayBufferView()) { + CHECK(!can_use_builtin_cache); // We don't use this option internally. Local<ArrayBufferView> cached_data_buf = args[5].As<ArrayBufferView>(); uint8_t* data = static_cast<uint8_t*>(cached_data_buf->Buffer()->Data()); - cached_data = + user_cached_data = new ScriptCompiler::CachedData(data + cached_data_buf->ByteOffset(), cached_data_buf->ByteLength()); } - Local<String> source_text = args[2].As<String>(); - ScriptOrigin origin(isolate, - url, - line_offset, - column_offset, - true, // is cross origin - -1, // script id - Local<Value>(), // source map URL - false, // is opaque (?) - false, // is WASM - true, // is ES Module - host_defined_options); - ScriptCompiler::Source source(source_text, origin, cached_data); - ScriptCompiler::CompileOptions options; - if (source.GetCachedData() == nullptr) { - options = ScriptCompiler::kNoCompileOptions; - } else { - options = ScriptCompiler::kConsumeCodeCache; - } - if (!ScriptCompiler::CompileModule(isolate, &source, options) + + bool cache_rejected = false; + if (!CompileSourceTextModule(realm, + source_text, + url, + line_offset, + column_offset, + host_defined_options, + user_cached_data, + &cache_rejected) .ToLocal(&module)) { if (try_catch.HasCaught() && !try_catch.HasTerminated()) { CHECK(!try_catch.Message().IsEmpty()); @@ -231,8 +240,9 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) { } return; } - if (options == ScriptCompiler::kConsumeCodeCache && - source.GetCachedData()->rejected) { + + if (user_cached_data.has_value() && user_cached_data.value() != nullptr && + cache_rejected) { THROW_ERR_VM_MODULE_CACHED_DATA_REJECTED( realm, "cachedData buffer was rejected"); try_catch.ReThrow(); @@ -259,6 +269,14 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) { return; } + // Initialize an empty slot for source map cache before the object is frozen. + if (that->SetPrivate(context, + realm->isolate_data()->source_map_data_private_symbol(), + Undefined(isolate)) + .IsNothing()) { + return; + } + // Use the extras object as an object whose GetCreationContext() will be the // original `context`, since the `Context` itself strictly speaking cannot // be stored in an internal field. @@ -271,146 +289,165 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) { obj->contextify_context_ = contextify_context; - that->SetIntegrityLevel(context, IntegrityLevel::kFrozen); args.GetReturnValue().Set(that); } +MaybeLocal<Module> ModuleWrap::CompileSourceTextModule( + Realm* realm, + Local<String> source_text, + Local<String> url, + int line_offset, + int column_offset, + Local<PrimitiveArray> host_defined_options, + std::optional<ScriptCompiler::CachedData*> user_cached_data, + bool* cache_rejected) { + Isolate* isolate = realm->isolate(); + EscapableHandleScope scope(isolate); + ScriptOrigin origin(isolate, + url, + line_offset, + column_offset, + true, // is cross origin + -1, // script id + Local<Value>(), // source map URL + false, // is opaque (?) + false, // is WASM + true, // is ES Module + host_defined_options); + ScriptCompiler::CachedData* cached_data = nullptr; + // When compiling for the default loader, user_cached_data is std::nullptr. + // When compiling for vm.Module, it's either nullptr or a pointer to the + // cached data. + if (user_cached_data.has_value()) { + cached_data = user_cached_data.value(); + } + + ScriptCompiler::Source source(source_text, origin, cached_data); + ScriptCompiler::CompileOptions options; + if (cached_data == nullptr) { + options = ScriptCompiler::kNoCompileOptions; + } else { + options = ScriptCompiler::kConsumeCodeCache; + } + + Local<Module> module; + if (!ScriptCompiler::CompileModule(isolate, &source, options) + .ToLocal(&module)) { + return scope.EscapeMaybe(MaybeLocal<Module>()); + } + + if (options == ScriptCompiler::kConsumeCodeCache) { + *cache_rejected = source.GetCachedData()->rejected; + } + + return scope.Escape(module); +} + static Local<Object> createImportAttributesContainer( Realm* realm, Isolate* isolate, Local<FixedArray> raw_attributes, const int elements_per_attribute) { CHECK_EQ(raw_attributes->Length() % elements_per_attribute, 0); - Local<Object> attributes = - Object::New(isolate, v8::Null(isolate), nullptr, nullptr, 0); + size_t num_attributes = raw_attributes->Length() / elements_per_attribute; + std::vector<Local<v8::Name>> names(num_attributes); + std::vector<Local<v8::Value>> values(num_attributes); + for (int i = 0; i < raw_attributes->Length(); i += elements_per_attribute) { - attributes - ->Set(realm->context(), - raw_attributes->Get(realm->context(), i).As<String>(), - raw_attributes->Get(realm->context(), i + 1).As<Value>()) - .ToChecked(); + int idx = i / elements_per_attribute; + names[idx] = raw_attributes->Get(realm->context(), i).As<v8::Name>(); + values[idx] = raw_attributes->Get(realm->context(), i + 1).As<Value>(); } - return attributes; + return Object::New( + isolate, v8::Null(isolate), names.data(), values.data(), num_attributes); } -void ModuleWrap::GetModuleRequestsSync( - const FunctionCallbackInfo<Value>& args) { - Realm* realm = Realm::GetCurrent(args); - Isolate* isolate = args.GetIsolate(); - - Local<Object> that = args.This(); - - ModuleWrap* obj; - ASSIGN_OR_RETURN_UNWRAP(&obj, that); +static Local<Array> createModuleRequestsContainer( + Realm* realm, Isolate* isolate, Local<FixedArray> raw_requests) { + std::vector<Local<Value>> requests(raw_requests->Length()); - CHECK(!obj->linked_); - - Local<Module> module = obj->module_.Get(isolate); - Local<FixedArray> module_requests = module->GetModuleRequests(); - const int module_requests_length = module_requests->Length(); - - std::vector<Local<Value>> requests; - requests.reserve(module_requests_length); - // call the dependency resolve callbacks - for (int i = 0; i < module_requests_length; i++) { + for (int i = 0; i < raw_requests->Length(); i++) { Local<ModuleRequest> module_request = - module_requests->Get(realm->context(), i).As<ModuleRequest>(); - Local<FixedArray> raw_attributes = module_request->GetImportAssertions(); - std::vector<Local<Value>> request = { - module_request->GetSpecifier(), - createImportAttributesContainer(realm, isolate, raw_attributes, 3), - }; - requests.push_back(Array::New(isolate, request.data(), request.size())); - } - - args.GetReturnValue().Set( - Array::New(isolate, requests.data(), requests.size())); -} + raw_requests->Get(realm->context(), i).As<ModuleRequest>(); -void ModuleWrap::CacheResolvedWrapsSync( - const FunctionCallbackInfo<Value>& args) { - Isolate* isolate = args.GetIsolate(); + Local<String> specifier = module_request->GetSpecifier(); - CHECK_EQ(args.Length(), 3); - CHECK(args[0]->IsString()); - CHECK(args[1]->IsPromise()); - CHECK(args[2]->IsBoolean()); + // Contains the import assertions for this request in the form: + // [key1, value1, source_offset1, key2, value2, source_offset2, ...]. + Local<FixedArray> raw_attributes = module_request->GetImportAssertions(); + Local<Object> attributes = + createImportAttributesContainer(realm, isolate, raw_attributes, 3); - ModuleWrap* dependent; - ASSIGN_OR_RETURN_UNWRAP(&dependent, args.This()); + Local<v8::Name> names[] = { + realm->isolate_data()->specifier_string(), + realm->isolate_data()->attributes_string(), + }; + Local<Value> values[] = { + specifier, + attributes, + }; + DCHECK_EQ(arraysize(names), arraysize(values)); - Utf8Value specifier(isolate, args[0]); - dependent->resolve_cache_[specifier.ToString()].Reset(isolate, - args[1].As<Promise>()); + Local<Object> request = Object::New( + isolate, v8::Null(isolate), names, values, arraysize(names)); - if (args[2].As<v8::Boolean>()->Value()) { - dependent->linked_ = true; + requests[i] = request; } + + return Array::New(isolate, requests.data(), requests.size()); } -void ModuleWrap::Link(const FunctionCallbackInfo<Value>& args) { +void ModuleWrap::GetModuleRequests(const FunctionCallbackInfo<Value>& args) { Realm* realm = Realm::GetCurrent(args); Isolate* isolate = args.GetIsolate(); - - CHECK_EQ(args.Length(), 1); - CHECK(args[0]->IsFunction()); - Local<Object> that = args.This(); ModuleWrap* obj; ASSIGN_OR_RETURN_UNWRAP(&obj, that); - if (obj->linked_) - return; - obj->linked_ = true; + Local<Module> module = obj->module_.Get(isolate); + args.GetReturnValue().Set(createModuleRequestsContainer( + realm, isolate, module->GetModuleRequests())); +} - Local<Function> resolver_arg = args[0].As<Function>(); +// moduleWrap.link(specifiers, moduleWraps) +void ModuleWrap::Link(const FunctionCallbackInfo<Value>& args) { + Realm* realm = Realm::GetCurrent(args); + Isolate* isolate = args.GetIsolate(); + Local<Context> context = realm->context(); - Local<Context> mod_context = obj->context(); - Local<Module> module = obj->module_.Get(isolate); + ModuleWrap* dependent; + ASSIGN_OR_RETURN_UNWRAP(&dependent, args.This()); - Local<FixedArray> module_requests = module->GetModuleRequests(); - const int module_requests_length = module_requests->Length(); - MaybeStackBuffer<Local<Value>, 16> promises(module_requests_length); + CHECK_EQ(args.Length(), 2); - // call the dependency resolve callbacks - for (int i = 0; i < module_requests_length; i++) { - Local<ModuleRequest> module_request = - module_requests->Get(realm->context(), i).As<ModuleRequest>(); - Local<String> specifier = module_request->GetSpecifier(); - Utf8Value specifier_utf8(realm->isolate(), specifier); - std::string specifier_std(*specifier_utf8, specifier_utf8.length()); + Local<Array> specifiers = args[0].As<Array>(); + Local<Array> modules = args[1].As<Array>(); + CHECK_EQ(specifiers->Length(), modules->Length()); - Local<FixedArray> raw_attributes = module_request->GetImportAssertions(); - Local<Object> attributes = - createImportAttributesContainer(realm, isolate, raw_attributes, 3); + std::vector<v8::Global<Value>> specifiers_buffer; + if (FromV8Array(context, specifiers, &specifiers_buffer).IsNothing()) { + return; + } + std::vector<v8::Global<Value>> modules_buffer; + if (FromV8Array(context, modules, &modules_buffer).IsNothing()) { + return; + } - Local<Value> argv[] = { - specifier, - attributes, - }; + for (uint32_t i = 0; i < specifiers->Length(); i++) { + Local<String> specifier_str = + specifiers_buffer[i].Get(isolate).As<String>(); + Local<Object> module_object = modules_buffer[i].Get(isolate).As<Object>(); - MaybeLocal<Value> maybe_resolve_return_value = - resolver_arg->Call(mod_context, that, arraysize(argv), argv); - if (maybe_resolve_return_value.IsEmpty()) { - return; - } - Local<Value> resolve_return_value = - maybe_resolve_return_value.ToLocalChecked(); - if (!resolve_return_value->IsPromise()) { - THROW_ERR_VM_MODULE_LINK_FAILURE( - realm, "request for '%s' did not return promise", specifier_std); - return; - } - Local<Promise> resolve_promise = resolve_return_value.As<Promise>(); - obj->resolve_cache_[specifier_std].Reset(isolate, resolve_promise); + CHECK( + realm->isolate_data()->module_wrap_constructor_template()->HasInstance( + module_object)); - promises[i] = resolve_promise; + Utf8Value specifier(isolate, specifier_str); + dependent->resolve_cache_[specifier.ToString()].Reset(isolate, + module_object); } - - args.GetReturnValue().Set( - Array::New(isolate, promises.out(), promises.length())); } void ModuleWrap::Instantiate(const FunctionCallbackInfo<Value>& args) { @@ -542,13 +579,9 @@ void ModuleWrap::InstantiateSync(const FunctionCallbackInfo<Value>& args) { } } - // If --experimental-print-required-tla is true, proceeds to evaluation even - // if it's async because we want to search for the TLA and help users locate - // them. - if (module->IsGraphAsync() && !env->options()->print_required_tla) { - THROW_ERR_REQUIRE_ASYNC_MODULE(env); - return; - } + // TODO(joyeecheung): record Module::HasTopLevelAwait() in every ModuleWrap + // and infer the asynchronicity from a module's children during linking. + args.GetReturnValue().Set(module->IsGraphAsync()); } void ModuleWrap::EvaluateSync(const FunctionCallbackInfo<Value>& args) { @@ -576,6 +609,22 @@ void ModuleWrap::EvaluateSync(const FunctionCallbackInfo<Value>& args) { CHECK(result->IsPromise()); Local<Promise> promise = result.As<Promise>(); if (promise->State() == Promise::PromiseState::kRejected) { + // The rejected promise is created by V8, so we don't get a chance to mark + // it as resolved before the rejection happens from evaluation. But we can + // tell the promise rejection callback to treat it as a promise rejected + // before handler was added which would remove it from the unhandled + // rejection handling, since we are converting it into an error and throw + // from here directly. + Local<Value> type = v8::Integer::New( + isolate, + static_cast<int32_t>( + v8::PromiseRejectEvent::kPromiseHandlerAddedAfterReject)); + Local<Value> args[] = {type, promise, Undefined(isolate)}; + if (env->promise_reject_callback() + ->Call(context, Undefined(isolate), arraysize(args), args) + .IsEmpty()) { + return; + } Local<Value> exception = promise->Result(); Local<v8::Message> message = v8::Exception::CreateMessage(isolate, exception); @@ -671,29 +720,6 @@ void ModuleWrap::GetStatus(const FunctionCallbackInfo<Value>& args) { args.GetReturnValue().Set(module->GetStatus()); } -void ModuleWrap::GetStaticDependencySpecifiers( - const FunctionCallbackInfo<Value>& args) { - Realm* realm = Realm::GetCurrent(args); - ModuleWrap* obj; - ASSIGN_OR_RETURN_UNWRAP(&obj, args.This()); - - Local<Module> module = obj->module_.Get(realm->isolate()); - - Local<FixedArray> module_requests = module->GetModuleRequests(); - int count = module_requests->Length(); - - MaybeStackBuffer<Local<Value>, 16> specifiers(count); - - for (int i = 0; i < count; i++) { - Local<ModuleRequest> module_request = - module_requests->Get(realm->context(), i).As<ModuleRequest>(); - specifiers[i] = module_request->GetSpecifier(); - } - - args.GetReturnValue().Set( - Array::New(realm->isolate(), specifiers.out(), count)); -} - void ModuleWrap::GetError(const FunctionCallbackInfo<Value>& args) { Isolate* isolate = args.GetIsolate(); ModuleWrap* obj; @@ -731,16 +757,8 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback( return MaybeLocal<Module>(); } - Local<Promise> resolve_promise = + Local<Object> module_object = dependent->resolve_cache_[specifier_std].Get(isolate); - - if (resolve_promise->State() != Promise::kFulfilled) { - THROW_ERR_VM_MODULE_LINK_FAILURE( - env, "request for '%s' is not yet fulfilled", specifier_std); - return MaybeLocal<Module>(); - } - - Local<Object> module_object = resolve_promise->Result().As<Object>(); if (module_object.IsEmpty() || !module_object->IsObject()) { THROW_ERR_VM_MODULE_LINK_FAILURE( env, "request for '%s' did not return an object", specifier_std); @@ -958,6 +976,70 @@ void ModuleWrap::CreateCachedData(const FunctionCallbackInfo<Value>& args) { } } +// This v8::Module::ResolveModuleCallback simply links `import 'original'` +// to the env->temporary_required_module_facade_original() which is stashed +// right before this callback is called and will be restored as soon as +// v8::Module::Instantiate() returns. +MaybeLocal<Module> LinkRequireFacadeWithOriginal( + Local<Context> context, + Local<String> specifier, + Local<FixedArray> import_attributes, + Local<Module> referrer) { + Environment* env = Environment::GetCurrent(context); + Isolate* isolate = context->GetIsolate(); + CHECK(specifier->Equals(context, env->original_string()).ToChecked()); + CHECK(!env->temporary_required_module_facade_original.IsEmpty()); + return env->temporary_required_module_facade_original.Get(isolate); +} + +// Wraps an existing source text module with a facade that adds +// .__esModule = true to the exports. +// See env->required_module_facade_source_string() for the source. +void ModuleWrap::CreateRequiredModuleFacade( + const FunctionCallbackInfo<Value>& args) { + Isolate* isolate = args.GetIsolate(); + Local<Context> context = isolate->GetCurrentContext(); + Environment* env = Environment::GetCurrent(context); + CHECK(args[0]->IsObject()); // original module + Local<Object> wrap = args[0].As<Object>(); + ModuleWrap* original; + ASSIGN_OR_RETURN_UNWRAP(&original, wrap); + + // Use the same facade source and URL to hit the compilation cache. + ScriptOrigin origin(isolate, + env->required_module_facade_url_string(), + 0, // line offset + 0, // column offset + true, // is cross origin + -1, // script id + Local<Value>(), // source map URL + false, // is opaque (?) + false, // is WASM + true); // is ES Module + ScriptCompiler::Source source(env->required_module_facade_source_string(), + origin); + + // The module facade instantiation simply links `import 'original'` in the + // facade with the original module and should never fail. + Local<Module> facade = + ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked(); + // Stash the original module in temporary_required_module_facade_original + // for the LinkRequireFacadeWithOriginal() callback to pick it up. + CHECK(env->temporary_required_module_facade_original.IsEmpty()); + env->temporary_required_module_facade_original.Reset( + isolate, original->module_.Get(isolate)); + CHECK(facade->InstantiateModule(context, LinkRequireFacadeWithOriginal) + .IsJust()); + env->temporary_required_module_facade_original.Reset(); + + // The evaluation of the facade is synchronous. + Local<Value> evaluated = facade->Evaluate(context).ToLocalChecked(); + CHECK(evaluated->IsPromise()); + CHECK_EQ(evaluated.As<Promise>()->State(), Promise::PromiseState::kFulfilled); + + args.GetReturnValue().Set(facade->GetModuleNamespace()); +} + void ModuleWrap::CreatePerIsolateProperties(IsolateData* isolate_data, Local<ObjectTemplate> target) { Isolate* isolate = isolate_data->isolate(); @@ -967,9 +1049,7 @@ void ModuleWrap::CreatePerIsolateProperties(IsolateData* isolate_data, ModuleWrap::kInternalFieldCount); SetProtoMethod(isolate, tpl, "link", Link); - SetProtoMethod(isolate, tpl, "getModuleRequestsSync", GetModuleRequestsSync); - SetProtoMethod( - isolate, tpl, "cacheResolvedWrapsSync", CacheResolvedWrapsSync); + SetProtoMethod(isolate, tpl, "getModuleRequests", GetModuleRequests); SetProtoMethod(isolate, tpl, "instantiateSync", InstantiateSync); SetProtoMethod(isolate, tpl, "evaluateSync", EvaluateSync); SetProtoMethod(isolate, tpl, "getNamespaceSync", GetNamespaceSync); @@ -981,12 +1061,8 @@ void ModuleWrap::CreatePerIsolateProperties(IsolateData* isolate_data, SetProtoMethodNoSideEffect(isolate, tpl, "getNamespace", GetNamespace); SetProtoMethodNoSideEffect(isolate, tpl, "getStatus", GetStatus); SetProtoMethodNoSideEffect(isolate, tpl, "getError", GetError); - SetProtoMethodNoSideEffect(isolate, - tpl, - "getStaticDependencySpecifiers", - GetStaticDependencySpecifiers); - SetConstructorFunction(isolate, target, "ModuleWrap", tpl); + isolate_data->set_module_wrap_constructor_template(tpl); SetMethod(isolate, target, @@ -996,6 +1072,10 @@ void ModuleWrap::CreatePerIsolateProperties(IsolateData* isolate_data, target, "setInitializeImportMetaObjectCallback", SetInitializeImportMetaObjectCallback); + SetMethod(isolate, + target, + "createRequiredModuleFacade", + CreateRequiredModuleFacade); } void ModuleWrap::CreatePerContextProperties(Local<Object> target, @@ -1024,8 +1104,7 @@ void ModuleWrap::RegisterExternalReferences( registry->Register(New); registry->Register(Link); - registry->Register(GetModuleRequestsSync); - registry->Register(CacheResolvedWrapsSync); + registry->Register(GetModuleRequests); registry->Register(InstantiateSync); registry->Register(EvaluateSync); registry->Register(GetNamespaceSync); @@ -1036,7 +1115,8 @@ void ModuleWrap::RegisterExternalReferences( registry->Register(GetNamespace); registry->Register(GetStatus); registry->Register(GetError); - registry->Register(GetStaticDependencySpecifiers); + + registry->Register(CreateRequiredModuleFacade); registry->Register(SetImportModuleDynamicallyCallback); registry->Register(SetInitializeImportMetaObjectCallback); diff --git a/src/module_wrap.h b/src/module_wrap.h index 45a338b38e01c8..51b127209af695 100644 --- a/src/module_wrap.h +++ b/src/module_wrap.h @@ -3,10 +3,12 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#include <unordered_map> +#include <optional> #include <string> +#include <unordered_map> #include <vector> #include "base_object.h" +#include "v8-script.h" namespace node { @@ -68,6 +70,26 @@ class ModuleWrap : public BaseObject { return true; } + static v8::Local<v8::PrimitiveArray> GetHostDefinedOptions( + v8::Isolate* isolate, v8::Local<v8::Symbol> symbol); + + // When user_cached_data is not std::nullopt, use the code cache if it's not + // nullptr, otherwise don't use code cache. + // TODO(joyeecheung): when it is std::nullopt, use on-disk cache + // See: https://github.com/nodejs/node/issues/47472 + static v8::MaybeLocal<v8::Module> CompileSourceTextModule( + Realm* realm, + v8::Local<v8::String> source_text, + v8::Local<v8::String> url, + int line_offset, + int column_offset, + v8::Local<v8::PrimitiveArray> host_defined_options, + std::optional<v8::ScriptCompiler::CachedData*> user_cached_data, + bool* cache_rejected); + + static void CreateRequiredModuleFacade( + const v8::FunctionCallbackInfo<v8::Value>& args); + private: ModuleWrap(Realm* realm, v8::Local<v8::Object> object, @@ -78,9 +100,7 @@ class ModuleWrap : public BaseObject { ~ModuleWrap() override; static void New(const v8::FunctionCallbackInfo<v8::Value>& args); - static void GetModuleRequestsSync( - const v8::FunctionCallbackInfo<v8::Value>& args); - static void CacheResolvedWrapsSync( + static void GetModuleRequests( const v8::FunctionCallbackInfo<v8::Value>& args); static void InstantiateSync(const v8::FunctionCallbackInfo<v8::Value>& args); static void EvaluateSync(const v8::FunctionCallbackInfo<v8::Value>& args); @@ -92,8 +112,6 @@ class ModuleWrap : public BaseObject { static void GetNamespace(const v8::FunctionCallbackInfo<v8::Value>& args); static void GetStatus(const v8::FunctionCallbackInfo<v8::Value>& args); static void GetError(const v8::FunctionCallbackInfo<v8::Value>& args); - static void GetStaticDependencySpecifiers( - const v8::FunctionCallbackInfo<v8::Value>& args); static void SetImportModuleDynamicallyCallback( const v8::FunctionCallbackInfo<v8::Value>& args); @@ -113,10 +131,9 @@ class ModuleWrap : public BaseObject { static ModuleWrap* GetFromModule(node::Environment*, v8::Local<v8::Module>); v8::Global<v8::Module> module_; - std::unordered_map<std::string, v8::Global<v8::Promise>> resolve_cache_; + std::unordered_map<std::string, v8::Global<v8::Object>> resolve_cache_; contextify::ContextifyContext* contextify_context_ = nullptr; bool synthetic_ = false; - bool linked_ = false; int module_hash_; }; diff --git a/src/node.cc b/src/node.cc index 1fc236d88e53eb..4ad2c8b80493aa 100644 --- a/src/node.cc +++ b/src/node.cc @@ -308,6 +308,14 @@ std::optional<StartExecutionCallbackInfo> CallbackInfoFromArray( CHECK(process_obj->IsObject()); CHECK(require_fn->IsFunction()); CHECK(runcjs_fn->IsFunction()); + // TODO(joyeecheung): some support for running ESM as an entrypoint + // is needed. The simplest API would be to add a run_esm to + // StartExecutionCallbackInfo which compiles, links (to builtins) + // and evaluates a SourceTextModule. + // TODO(joyeecheung): the env pointer should be part of + // StartExecutionCallbackInfo, otherwise embedders are forced to use + // lambdas to pass it into the callback, which can make the code + // difficult to read. node::StartExecutionCallbackInfo info{process_obj.As<Object>(), require_fn.As<Function>(), runcjs_fn.As<Function>()}; @@ -893,20 +901,26 @@ static ExitCode InitializeNodeWithArgsInternal( HandleEnvOptions(per_process::cli_options->per_isolate->per_env); std::string node_options; - auto file_paths = node::Dotenv::GetPathFromArgs(*argv); + auto env_files = node::Dotenv::GetDataFromArgs(*argv); - if (!file_paths.empty()) { + if (!env_files.empty()) { CHECK(!per_process::v8_initialized); - for (const auto& file_path : file_paths) { - switch (per_process::dotenv_file.ParsePath(file_path)) { + for (const auto& file_data : env_files) { + switch (per_process::dotenv_file.ParsePath(file_data.path)) { case Dotenv::ParseResult::Valid: break; case Dotenv::ParseResult::InvalidContent: - errors->push_back(file_path + ": invalid format"); + errors->push_back(file_data.path + ": invalid format"); break; case Dotenv::ParseResult::FileError: - errors->push_back(file_path + ": not found"); + if (file_data.is_optional) { + fprintf(stderr, + "%s not found. Continuing without it.\n", + file_data.path.c_str()); + continue; + } + errors->push_back(file_data.path + ": not found"); break; default: UNREACHABLE(); diff --git a/src/node_api.h b/src/node_api.h index 526cdd5d406eb6..0fd99a963df3aa 100644 --- a/src/node_api.h +++ b/src/node_api.h @@ -90,9 +90,6 @@ EXTERN_C_START // Deprecated. Replaced by symbol-based registration defined by NAPI_MODULE // and NAPI_MODULE_INIT macros. -#if defined(__cplusplus) && __cplusplus >= 201402L -[[deprecated]] -#endif NAPI_EXTERN void NAPI_CDECL napi_module_register(napi_module* mod); diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 8951cd378a9025..7f82bca746408b 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -28,8 +28,10 @@ #include "node_errors.h" #include "node_external_reference.h" #include "node_internals.h" +#include "node_process.h" #include "node_sea.h" #include "node_snapshot_builder.h" +#include "node_url.h" #include "node_watchdog.h" #include "util-inl.h" @@ -56,6 +58,7 @@ using v8::Maybe; using v8::MaybeLocal; using v8::MeasureMemoryExecution; using v8::MeasureMemoryMode; +using v8::Message; using v8::MicrotaskQueue; using v8::MicrotasksPolicy; using v8::Name; @@ -363,14 +366,12 @@ void ContextifyContext::CreatePerIsolateProperties( Isolate* isolate = isolate_data->isolate(); SetMethod(isolate, target, "makeContext", MakeContext); SetMethod(isolate, target, "compileFunction", CompileFunction); - SetMethod(isolate, target, "containsModuleSyntax", ContainsModuleSyntax); } void ContextifyContext::RegisterExternalReferences( ExternalReferenceRegistry* registry) { registry->Register(MakeContext); registry->Register(CompileFunction); - registry->Register(ContainsModuleSyntax); registry->Register(PropertyGetterCallback); registry->Register(PropertySetterCallback); registry->Register(PropertyDescriptorCallback); @@ -1194,15 +1195,6 @@ ContextifyScript::ContextifyScript(Environment* env, Local<Object> object) ContextifyScript::~ContextifyScript() {} -static Local<PrimitiveArray> GetHostDefinedOptions(Isolate* isolate, - Local<Symbol> id_symbol) { - Local<PrimitiveArray> host_defined_options = - PrimitiveArray::New(isolate, loader::HostDefinedOptions::kLength); - host_defined_options->Set( - isolate, loader::HostDefinedOptions::kID, id_symbol); - return host_defined_options; -} - void ContextifyContext::CompileFunction( const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); @@ -1276,16 +1268,27 @@ void ContextifyContext::CompileFunction( } Local<PrimitiveArray> host_defined_options = - GetHostDefinedOptions(isolate, id_symbol); - ScriptCompiler::Source source = - GetCommonJSSourceInstance(isolate, - code, - filename, - line_offset, - column_offset, - host_defined_options, - cached_data); - ScriptCompiler::CompileOptions options = GetCompileOptions(source); + loader::ModuleWrap::GetHostDefinedOptions(isolate, id_symbol); + + ScriptOrigin origin(isolate, + filename, + line_offset, // line offset + column_offset, // column offset + true, // is cross origin + -1, // script id + Local<Value>(), // source map URL + false, // is opaque (?) + false, // is WASM + false, // is ES Module + host_defined_options); + ScriptCompiler::Source source(code, origin, cached_data); + + ScriptCompiler::CompileOptions options; + if (source.GetCachedData() != nullptr) { + options = ScriptCompiler::kConsumeCodeCache; + } else { + options = ScriptCompiler::kNoCompileOptions; + } Context::Scope scope(parsing_context); @@ -1333,39 +1336,6 @@ void ContextifyContext::CompileFunction( args.GetReturnValue().Set(result); } -ScriptCompiler::Source ContextifyContext::GetCommonJSSourceInstance( - Isolate* isolate, - Local<String> code, - Local<String> filename, - int line_offset, - int column_offset, - Local<PrimitiveArray> host_defined_options, - ScriptCompiler::CachedData* cached_data) { - ScriptOrigin origin(isolate, - filename, - line_offset, // line offset - column_offset, // column offset - true, // is cross origin - -1, // script id - Local<Value>(), // source map URL - false, // is opaque (?) - false, // is WASM - false, // is ES Module - host_defined_options); - return ScriptCompiler::Source(code, origin, cached_data); -} - -ScriptCompiler::CompileOptions ContextifyContext::GetCompileOptions( - const ScriptCompiler::Source& source) { - ScriptCompiler::CompileOptions options; - if (source.GetCachedData() != nullptr) { - options = ScriptCompiler::kConsumeCodeCache; - } else { - options = ScriptCompiler::kNoCompileOptions; - } - return options; -} - static std::vector<Local<String>> GetCJSParameters(IsolateData* data) { return { data->exports_string(), @@ -1447,7 +1417,7 @@ Local<Object> ContextifyContext::CompileFunctionAndCacheResult( // While top-level `await` is not permitted in CommonJS, it returns the same // error message as when `await` is used in a sync function, so we don't use it // as a disambiguation. -constexpr std::array<std::string_view, 3> esm_syntax_error_messages = { +static std::vector<std::string_view> esm_syntax_error_messages = { "Cannot use import statement outside a module", // `import` statements "Unexpected token 'export'", // `export` statements "Cannot use 'import.meta' outside a module"}; // `import.meta` references @@ -1462,7 +1432,7 @@ constexpr std::array<std::string_view, 3> esm_syntax_error_messages = { // - Top-level `await`: if the user writes `await` at the top level of a // CommonJS module, it will throw a syntax error; but the same code is valid // in ESM. -constexpr std::array<std::string_view, 6> throws_only_in_cjs_error_messages = { +static std::vector<std::string_view> throws_only_in_cjs_error_messages = { "Identifier 'module' has already been declared", "Identifier 'exports' has already been declared", "Identifier 'require' has already been declared", @@ -1471,234 +1441,294 @@ constexpr std::array<std::string_view, 6> throws_only_in_cjs_error_messages = { "await is only valid in async functions and " "the top level bodies of modules"}; -void ContextifyContext::ContainsModuleSyntax( - const FunctionCallbackInfo<Value>& args) { - Environment* env = Environment::GetCurrent(args); - Isolate* isolate = env->isolate(); - Local<Context> context = env->context(); - - if (args.Length() == 0) { - return THROW_ERR_MISSING_ARGS( - env, "containsModuleSyntax needs at least 1 argument"); - } +// If cached_data is provided, it would be used for the compilation and +// the on-disk compilation cache from NODE_COMPILE_CACHE (if configured) +// would be ignored. +static MaybeLocal<Function> CompileFunctionForCJSLoader( + Environment* env, + Local<Context> context, + Local<String> code, + Local<String> filename, + bool* cache_rejected, + bool is_cjs_scope, + ScriptCompiler::CachedData* cached_data) { + Isolate* isolate = context->GetIsolate(); + EscapableHandleScope scope(isolate); - // Argument 2: filename; if undefined, use empty string - Local<String> filename = String::Empty(isolate); - if (!args[1]->IsUndefined()) { - CHECK(args[1]->IsString()); - filename = args[1].As<String>(); - } + Local<Symbol> symbol = env->vm_dynamic_import_default_internal(); + Local<PrimitiveArray> hdo = + loader::ModuleWrap::GetHostDefinedOptions(isolate, symbol); + ScriptOrigin origin(isolate, + filename, + 0, // line offset + 0, // column offset + true, // is cross origin + -1, // script id + Local<Value>(), // source map URL + false, // is opaque + false, // is WASM + false, // is ES Module + hdo); - // Argument 1: source code; if undefined, read from filename in argument 2 - Local<String> code; - if (args[0]->IsUndefined()) { - CHECK(!filename.IsEmpty()); - const char* filename_str = Utf8Value(isolate, filename).out(); - std::string contents; - int result = ReadFileSync(&contents, filename_str); - if (result != 0) { - isolate->ThrowException( - ERR_MODULE_NOT_FOUND(isolate, "Cannot read file %s", filename_str)); - return; - } - code = String::NewFromUtf8(isolate, - contents.c_str(), - v8::NewStringType::kNormal, - contents.length()) - .ToLocalChecked(); + ScriptCompiler::Source source(code, origin, cached_data); + ScriptCompiler::CompileOptions options; + if (cached_data == nullptr) { + options = ScriptCompiler::kNoCompileOptions; } else { - CHECK(args[0]->IsString()); - code = args[0].As<String>(); + options = ScriptCompiler::kConsumeCodeCache; } - // TODO(geoffreybooth): Centralize this rather than matching the logic in - // cjs/loader.js and translators.js - Local<String> script_id = String::Concat( - isolate, String::NewFromUtf8(isolate, "cjs:").ToLocalChecked(), filename); - Local<Symbol> id_symbol = Symbol::New(isolate, script_id); - - Local<PrimitiveArray> host_defined_options = - GetHostDefinedOptions(isolate, id_symbol); - ScriptCompiler::Source source = GetCommonJSSourceInstance( - isolate, code, filename, 0, 0, host_defined_options, nullptr); - ScriptCompiler::CompileOptions options = GetCompileOptions(source); - - std::vector<Local<String>> params = GetCJSParameters(env->isolate_data()); - - TryCatchScope try_catch(env); - ShouldNotAbortOnUncaughtScope no_abort_scope(env); - - ContextifyContext::CompileFunctionAndCacheResult(env, - context, - &source, - params, - std::vector<Local<Object>>(), - options, - true, - id_symbol, - try_catch); - - bool should_retry_as_esm = false; - if (try_catch.HasCaught() && !try_catch.HasTerminated()) { - Utf8Value message_value(env->isolate(), try_catch.Message()->Get()); - auto message = message_value.ToStringView(); + std::vector<Local<String>> params; + if (is_cjs_scope) { + params = GetCJSParameters(env->isolate_data()); + } + MaybeLocal<Function> maybe_fn = ScriptCompiler::CompileFunction( + context, + &source, + params.size(), + params.data(), + 0, /* context extensions size */ + nullptr, /* context extensions data */ + // TODO(joyeecheung): allow optional eager compilation. + options); - for (const auto& error_message : esm_syntax_error_messages) { - if (message.find(error_message) != std::string_view::npos) { - should_retry_as_esm = true; - break; - } - } + Local<Function> fn; + if (!maybe_fn.ToLocal(&fn)) { + return scope.EscapeMaybe(MaybeLocal<Function>()); + } - if (!should_retry_as_esm) { - for (const auto& error_message : throws_only_in_cjs_error_messages) { - if (message.find(error_message) != std::string_view::npos) { - // Try parsing again where the CommonJS wrapper is replaced by an - // async function wrapper. If the new parse succeeds, then the error - // was caused by either a top-level declaration of one of the CommonJS - // module variables, or a top-level `await`. - TryCatchScope second_parse_try_catch(env); - code = - String::Concat(isolate, - String::NewFromUtf8(isolate, "(async function() {") - .ToLocalChecked(), - code); - code = String::Concat( - isolate, - code, - String::NewFromUtf8(isolate, "})();").ToLocalChecked()); - ScriptCompiler::Source wrapped_source = GetCommonJSSourceInstance( - isolate, code, filename, 0, 0, host_defined_options, nullptr); - std::ignore = ScriptCompiler::CompileFunction( - context, - &wrapped_source, - params.size(), - params.data(), - 0, - nullptr, - options, - v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason); - if (!second_parse_try_catch.HasTerminated()) { - if (second_parse_try_catch.HasCaught()) { - // If on the second parse an error is thrown by ESM syntax, then - // what happened was that the user had top-level `await` or a - // top-level declaration of one of the CommonJS module variables - // above the first `import` or `export`. - Utf8Value second_message_value( - env->isolate(), second_parse_try_catch.Message()->Get()); - auto second_message = second_message_value.ToStringView(); - for (const auto& error_message : esm_syntax_error_messages) { - if (second_message.find(error_message) != - std::string_view::npos) { - should_retry_as_esm = true; - break; - } - } - } else { - // No errors thrown in the second parse, so most likely the error - // was caused by a top-level `await` or a top-level declaration of - // one of the CommonJS module variables. - should_retry_as_esm = true; - } - } - break; - } - } - } + if (options == ScriptCompiler::kConsumeCodeCache) { + *cache_rejected = source.GetCachedData()->rejected; } - args.GetReturnValue().Set(should_retry_as_esm); + return scope.Escape(fn); } +static bool warned_about_require_esm = false; +// TODO(joyeecheung): this was copied from the warning previously emitted in the +// JS land, but it's not very helpful. There should be specific information +// about which file or which package.json to update. +const char* require_esm_warning = + "To load an ES module, set \"type\": \"module\" in the package.json or use " + "the .mjs extension."; + +static bool ShouldRetryAsESM(Realm* realm, + Local<String> message, + Local<String> code, + Local<String> resource_name); + static void CompileFunctionForCJSLoader( const FunctionCallbackInfo<Value>& args) { CHECK(args[0]->IsString()); CHECK(args[1]->IsString()); + CHECK(args[2]->IsBoolean()); + CHECK(args[3]->IsBoolean()); Local<String> code = args[0].As<String>(); Local<String> filename = args[1].As<String>(); + bool is_sea_main = args[2].As<Boolean>()->Value(); + bool should_detect_module = args[3].As<Boolean>()->Value(); + Isolate* isolate = args.GetIsolate(); Local<Context> context = isolate->GetCurrentContext(); - Environment* env = Environment::GetCurrent(context); + Realm* realm = Realm::GetCurrent(context); + Environment* env = realm->env(); - Local<Symbol> symbol = env->vm_dynamic_import_default_internal(); - Local<PrimitiveArray> hdo = GetHostDefinedOptions(isolate, symbol); - ScriptOrigin origin(isolate, - filename, - 0, // line offset - 0, // column offset - true, // is cross origin - -1, // script id - Local<Value>(), // source map URL - false, // is opaque - false, // is WASM - false, // is ES Module - hdo); - ScriptCompiler::CachedData* cached_data = nullptr; + bool cache_rejected = false; + Local<Function> fn; + Local<Value> cjs_exception; + Local<Message> cjs_message; + ScriptCompiler::CachedData* cached_data = nullptr; #ifndef DISABLE_SINGLE_EXECUTABLE_APPLICATION - bool used_cache_from_sea = false; - if (sea::IsSingleExecutable()) { + if (is_sea_main) { sea::SeaResource sea = sea::FindSingleExecutableResource(); + // Use the "main" field in SEA config for the filename. + Local<Value> filename_from_sea; + if (!ToV8Value(context, sea.code_path).ToLocal(&filename_from_sea)) { + return; + } + filename = filename_from_sea.As<String>(); if (sea.use_code_cache()) { std::string_view data = sea.code_cache.value(); cached_data = new ScriptCompiler::CachedData( reinterpret_cast<const uint8_t*>(data.data()), static_cast<int>(data.size()), v8::ScriptCompiler::CachedData::BufferNotOwned); - used_cache_from_sea = true; } } #endif - ScriptCompiler::Source source(code, origin, cached_data); - - TryCatchScope try_catch(env); - std::vector<Local<String>> params = GetCJSParameters(env->isolate_data()); + { + ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env()); + TryCatchScope try_catch(env); + if (!CompileFunctionForCJSLoader( + env, context, code, filename, &cache_rejected, true, cached_data) + .ToLocal(&fn)) { + CHECK(try_catch.HasCaught()); + CHECK(!try_catch.HasTerminated()); + cjs_exception = try_catch.Exception(); + cjs_message = try_catch.Message(); + errors::DecorateErrorStack(env, cjs_exception, cjs_message); + } + } - MaybeLocal<Function> maybe_fn = ScriptCompiler::CompileFunction( - context, - &source, - params.size(), - params.data(), - 0, /* context extensions size */ - nullptr, /* context extensions data */ - // TODO(joyeecheung): allow optional eager compilation. - cached_data == nullptr ? ScriptCompiler::kNoCompileOptions - : ScriptCompiler::kConsumeCodeCache, - v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason); + bool can_parse_as_esm = false; + if (!cjs_exception.IsEmpty()) { + // Use the URL to match what would be used in the origin if it's going to + // be reparsed as ESM. + Utf8Value filename_utf8(isolate, filename); + std::string url = url::FromFilePath(filename_utf8.ToStringView()); + Local<String> url_value; + if (!String::NewFromUtf8(isolate, url.c_str()).ToLocal(&url_value)) { + return; + } + can_parse_as_esm = + ShouldRetryAsESM(realm, cjs_message->Get(), code, url_value); + if (!can_parse_as_esm) { + // The syntax error is not related to ESM, throw the original error. + isolate->ThrowException(cjs_exception); + return; + } - Local<Function> fn; - if (!maybe_fn.ToLocal(&fn)) { - if (try_catch.HasCaught() && !try_catch.HasTerminated()) { - errors::DecorateErrorStack(env, try_catch); - if (!try_catch.HasTerminated()) { - try_catch.ReThrow(); + if (!should_detect_module) { + bool should_throw = true; + if (!warned_about_require_esm) { + // This needs to call process.emit('warning') in JS which can throw if + // the user listener throws. In that case, don't try to throw the syntax + // error. + should_throw = + ProcessEmitWarningSync(env, require_esm_warning).IsJust(); + } + if (should_throw) { + isolate->ThrowException(cjs_exception); } return; } } - bool cache_rejected = false; -#ifndef DISABLE_SINGLE_EXECUTABLE_APPLICATION - if (used_cache_from_sea) { - cache_rejected = source.GetCachedData()->rejected; - } -#endif - + Local<Value> undefined = v8::Undefined(isolate); std::vector<Local<Name>> names = { env->cached_data_rejected_string(), env->source_map_url_string(), env->function_string(), + FIXED_ONE_BYTE_STRING(isolate, "canParseAsESM"), }; std::vector<Local<Value>> values = { Boolean::New(isolate, cache_rejected), - fn->GetScriptOrigin().SourceMapUrl(), - fn, + fn.IsEmpty() ? undefined : fn->GetScriptOrigin().SourceMapUrl(), + fn.IsEmpty() ? undefined : fn.As<Value>(), + Boolean::New(isolate, can_parse_as_esm), }; Local<Object> result = Object::New( isolate, v8::Null(isolate), names.data(), values.data(), names.size()); args.GetReturnValue().Set(result); } +bool ShouldRetryAsESM(Realm* realm, + Local<String> message, + Local<String> code, + Local<String> resource_name) { + Isolate* isolate = realm->isolate(); + + Utf8Value message_value(isolate, message); + auto message_view = message_value.ToStringView(); + + // These indicates that the file contains syntaxes that are only valid in + // ESM. So it must be true. + for (const auto& error_message : esm_syntax_error_messages) { + if (message_view.find(error_message) != std::string_view::npos) { + return true; + } + } + + // Check if the error message is allowed in ESM but not in CommonJS. If it + // is the case, let's check if file can be compiled as ESM. + bool maybe_valid_in_esm = false; + for (const auto& error_message : throws_only_in_cjs_error_messages) { + if (message_view.find(error_message) != std::string_view::npos) { + maybe_valid_in_esm = true; + break; + } + } + if (!maybe_valid_in_esm) { + return false; + } + + bool cache_rejected = false; + TryCatchScope try_catch(realm->env()); + ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env()); + Local<v8::Module> module; + Local<PrimitiveArray> hdo = loader::ModuleWrap::GetHostDefinedOptions( + isolate, realm->isolate_data()->source_text_module_default_hdo()); + if (loader::ModuleWrap::CompileSourceTextModule( + realm, code, resource_name, 0, 0, hdo, std::nullopt, &cache_rejected) + .ToLocal(&module)) { + return true; + } + + return false; +} + +static void ShouldRetryAsESM(const FunctionCallbackInfo<Value>& args) { + Realm* realm = Realm::GetCurrent(args); + + CHECK_EQ(args.Length(), 3); // message, code, resource_name + CHECK(args[0]->IsString()); + Local<String> message = args[0].As<String>(); + CHECK(args[1]->IsString()); + Local<String> code = args[1].As<String>(); + CHECK(args[2]->IsString()); + Local<String> resource_name = args[2].As<String>(); + + args.GetReturnValue().Set( + ShouldRetryAsESM(realm, message, code, resource_name)); +} + +static void ContainsModuleSyntax(const FunctionCallbackInfo<Value>& args) { + Isolate* isolate = args.GetIsolate(); + Local<Context> context = isolate->GetCurrentContext(); + Realm* realm = Realm::GetCurrent(context); + Environment* env = realm->env(); + + CHECK_GE(args.Length(), 2); + + // Argument 1: source code + CHECK(args[0]->IsString()); + Local<String> code = args[0].As<String>(); + + // Argument 2: filename + CHECK(args[1]->IsString()); + Local<String> filename = args[1].As<String>(); + + // Argument 3: resource name (URL for ES module). + Local<String> resource_name = filename; + if (args[2]->IsString()) { + resource_name = args[2].As<String>(); + } + // Argument 4: flag to indicate if CJS variables should not be in scope + // (they should be for normal CommonJS modules, but not for the + // CommonJS eval scope). + bool cjs_var = !args[3]->IsString(); + + bool cache_rejected = false; + Local<String> message; + { + Local<Function> fn; + TryCatchScope try_catch(env); + ShouldNotAbortOnUncaughtScope no_abort_scope(env); + if (CompileFunctionForCJSLoader( + env, context, code, filename, &cache_rejected, cjs_var, nullptr) + .ToLocal(&fn)) { + args.GetReturnValue().Set(false); + return; + } + CHECK(try_catch.HasCaught()); + message = try_catch.Message()->Get(); + } + + bool result = ShouldRetryAsESM(realm, message, code, resource_name); + args.GetReturnValue().Set(result); +} + static void StartSigintWatchdog(const FunctionCallbackInfo<Value>& args) { int ret = SigintWatchdogHelper::GetInstance()->Start(); args.GetReturnValue().Set(ret == 0); @@ -1755,6 +1785,9 @@ void CreatePerIsolateProperties(IsolateData* isolate_data, target, "compileFunctionForCJSLoader", CompileFunctionForCJSLoader); + + SetMethod(isolate, target, "containsModuleSyntax", ContainsModuleSyntax); + SetMethod(isolate, target, "shouldRetryAsESM", ShouldRetryAsESM); } static void CreatePerContextProperties(Local<Object> target, @@ -1799,6 +1832,8 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(StopSigintWatchdog); registry->Register(WatchdogHasPendingSigint); registry->Register(MeasureMemory); + registry->Register(ContainsModuleSyntax); + registry->Register(ShouldRetryAsESM); } } // namespace contextify } // namespace node diff --git a/src/node_contextify.h b/src/node_contextify.h index 517e3f44d32490..88b5684844b915 100644 --- a/src/node_contextify.h +++ b/src/node_contextify.h @@ -98,18 +98,6 @@ class ContextifyContext : public BaseObject { bool produce_cached_data, v8::Local<v8::Symbol> id_symbol, const errors::TryCatchScope& try_catch); - static v8::ScriptCompiler::Source GetCommonJSSourceInstance( - v8::Isolate* isolate, - v8::Local<v8::String> code, - v8::Local<v8::String> filename, - int line_offset, - int column_offset, - v8::Local<v8::PrimitiveArray> host_defined_options, - v8::ScriptCompiler::CachedData* cached_data); - static v8::ScriptCompiler::CompileOptions GetCompileOptions( - const v8::ScriptCompiler::Source& source); - static void ContainsModuleSyntax( - const v8::FunctionCallbackInfo<v8::Value>& args); static void WeakCallback( const v8::WeakCallbackInfo<ContextifyContext>& data); static void PropertyGetterCallback( diff --git a/src/node_dotenv.cc b/src/node_dotenv.cc index 12eb0446de0a7a..d22783cb779a38 100644 --- a/src/node_dotenv.cc +++ b/src/node_dotenv.cc @@ -11,34 +11,66 @@ using v8::NewStringType; using v8::Object; using v8::String; -std::vector<std::string> Dotenv::GetPathFromArgs( +std::vector<Dotenv::env_file_data> Dotenv::GetDataFromArgs( const std::vector<std::string>& args) { + const std::string_view optional_env_file_flag = "--env-file-if-exists"; + const auto find_match = [](const std::string& arg) { - const std::string_view flag = "--env-file"; - return strncmp(arg.c_str(), flag.data(), flag.size()) == 0; + auto arg_chars = arg.c_str(); + auto arg_len = arg.size(); + if (arg_chars[0] != '-' || arg_chars[1] != '-') return false; + if (arg_len == 2) return true; // arg == "--" + const std::string_view flag = "env-file"; + auto len = flag.size(); + if (strncmp(arg_chars + 2, flag.data(), len) != 0) return false; + if (arg_len == 2 + len) return true; + const std::string_view flag2 = "-if-exists"; + if (strncmp(arg_chars + 2 + len, flag2.data(), flag2.size()) == 0) + len += flag2.size(); + return arg_len == 2 + len || arg_chars[2 + len] == '='; }; - std::vector<std::string> paths; - auto path = std::find_if(args.begin(), args.end(), find_match); - while (path != args.end()) { - auto equal_char = path->find('='); + std::vector<Dotenv::env_file_data> env_files; + // This will be an iterator, pointing to args.end() if no matches are found + auto matched_arg = std::find_if(args.begin(), args.end(), find_match); + + while (matched_arg != args.end()) { + if (matched_arg->size() == 2 && + strncmp(matched_arg->c_str(), "--", 2) == 0) { + return env_files; + } + + auto equal_char_index = matched_arg->find('='); + + if (equal_char_index != std::string::npos) { + // `--env-file=path` + auto flag = matched_arg->substr(0, equal_char_index); + auto file_path = matched_arg->substr(equal_char_index + 1); - if (equal_char != std::string::npos) { - paths.push_back(path->substr(equal_char + 1)); + struct env_file_data env_file_data = { + file_path, strncmp(matched_arg->c_str(), + optional_env_file_flag.data(), + optional_env_file_flag.size()) == 0}; + env_files.push_back(env_file_data); } else { - auto next_path = std::next(path); + // `--env-file path` + auto file_path = std::next(matched_arg); - if (next_path == args.end()) { - return paths; + if (file_path == args.end()) { + return env_files; } - paths.push_back(*next_path); + struct env_file_data env_file_data = { + *file_path, strncmp(matched_arg->c_str(), + optional_env_file_flag.data(), + optional_env_file_flag.size()) == 0}; + env_files.push_back(env_file_data); } - path = std::find_if(++path, args.end(), find_match); + matched_arg = std::find_if(++matched_arg, args.end(), find_match); } - return paths; + return env_files; } void Dotenv::SetEnvironment(node::Environment* env) { @@ -165,7 +197,10 @@ void Dotenv::ParseContent(const std::string_view input) { } store_.insert_or_assign(std::string(key), multi_line_value); - content.remove_prefix(content.find('\n', closing_quote + 1)); + auto newline = content.find('\n', closing_quote + 1); + if (newline != std::string_view::npos) { + content.remove_prefix(newline); + } continue; } } @@ -193,7 +228,10 @@ void Dotenv::ParseContent(const std::string_view input) { store_.insert_or_assign(std::string(key), value); // Select the first newline after the closing quotation mark // since there could be newline characters inside the value. - content.remove_prefix(content.find('\n', closing_quote + 1)); + auto newline = content.find('\n', closing_quote + 1); + if (newline != std::string_view::npos) { + content.remove_prefix(newline); + } } } else { // Regular key value pair. diff --git a/src/node_dotenv.h b/src/node_dotenv.h index ef9ee54a9e75ce..d508b13fc5db74 100644 --- a/src/node_dotenv.h +++ b/src/node_dotenv.h @@ -13,6 +13,10 @@ namespace node { class Dotenv { public: enum ParseResult { Valid, FileError, InvalidContent }; + struct env_file_data { + std::string path; + bool is_optional; + }; Dotenv() = default; Dotenv(const Dotenv& d) = delete; @@ -27,7 +31,7 @@ class Dotenv { void SetEnvironment(Environment* env); v8::Local<v8::Object> ToObject(Environment* env) const; - static std::vector<std::string> GetPathFromArgs( + static std::vector<env_file_data> GetDataFromArgs( const std::vector<std::string>& args); private: diff --git a/src/node_errors.cc b/src/node_errors.cc index 69e474257b0427..52c0179845fdad 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -135,8 +135,13 @@ static std::string GetErrorSource(Isolate* isolate, // Print (filename):(line number): (message). ScriptOrigin origin = message->GetScriptOrigin(); - node::Utf8Value filename(isolate, message->GetScriptResourceName()); - const char* filename_string = *filename; + std::string filename_string; + if (message->GetScriptResourceName()->IsUndefined()) { + filename_string = "<anonymous_script>"; + } else { + node::Utf8Value filename(isolate, message->GetScriptResourceName()); + filename_string = filename.ToString(); + } int linenum = message->GetLineNumber(context).FromJust(); int script_start = (linenum - origin.LineOffset()) == 1 @@ -1141,15 +1146,19 @@ void Initialize(Local<Object> target, void DecorateErrorStack(Environment* env, const errors::TryCatchScope& try_catch) { - Local<Value> exception = try_catch.Exception(); + DecorateErrorStack(env, try_catch.Exception(), try_catch.Message()); +} +void DecorateErrorStack(Environment* env, + Local<Value> exception, + Local<Message> message) { if (!exception->IsObject()) return; Local<Object> err_obj = exception.As<Object>(); if (IsExceptionDecorated(env, err_obj)) return; - AppendExceptionLine(env, exception, try_catch.Message(), CONTEXTIFY_ERROR); + AppendExceptionLine(env, exception, message, CONTEXTIFY_ERROR); TryCatchScope try_catch_scope(env); // Ignore exceptions below. MaybeLocal<Value> stack = err_obj->Get(env->context(), env->stack_string()); MaybeLocal<Value> maybe_value = diff --git a/src/node_errors.h b/src/node_errors.h index ac07b96b5cad0f..d5e2f86f516bbb 100644 --- a/src/node_errors.h +++ b/src/node_errors.h @@ -301,6 +301,9 @@ void PerIsolateMessageListener(v8::Local<v8::Message> message, void DecorateErrorStack(Environment* env, const errors::TryCatchScope& try_catch); +void DecorateErrorStack(Environment* env, + v8::Local<v8::Value> error, + v8::Local<v8::Message> message); class PrinterTryCatch : public v8::TryCatch { public: diff --git a/src/node_file.cc b/src/node_file.cc index 73ad5a1a2c092d..39a70311f4ad21 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -2423,7 +2423,6 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) { } } else { // write(fd, string, pos, enc, undefined, ctx) CHECK_EQ(argc, 6); - FSReqWrapSync req_wrap_sync; FSReqBase::FSReqBuffer stack_buffer; if (buf == nullptr) { if (!StringBytes::StorageSize(isolate, value, enc).To(&len)) @@ -2437,6 +2436,7 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) { buf = *stack_buffer; } uv_buf_t uvbuf = uv_buf_init(buf, len); + FSReqWrapSync req_wrap_sync("write"); FS_SYNC_TRACE_BEGIN(write); int bytesWritten = SyncCall(env, args[5], &req_wrap_sync, "write", uv_fs_write, fd, &uvbuf, 1, pos); diff --git a/src/node_main_instance.cc b/src/node_main_instance.cc index 22b35e33e8fa50..4119ac1b002681 100644 --- a/src/node_main_instance.cc +++ b/src/node_main_instance.cc @@ -103,20 +103,7 @@ ExitCode NodeMainInstance::Run() { void NodeMainInstance::Run(ExitCode* exit_code, Environment* env) { if (*exit_code == ExitCode::kNoFailure) { - bool runs_sea_code = false; -#ifndef DISABLE_SINGLE_EXECUTABLE_APPLICATION - if (sea::IsSingleExecutable()) { - sea::SeaResource sea = sea::FindSingleExecutableResource(); - if (!sea.use_snapshot()) { - runs_sea_code = true; - std::string_view code = sea.main_code_or_snapshot; - LoadEnvironment(env, code); - } - } -#endif - // Either there is already a snapshot main function from SEA, or it's not - // a SEA at all. - if (!runs_sea_code) { + if (!sea::MaybeLoadSingleExecutableApplication(env)) { LoadEnvironment(env, StartExecutionCallback{}); } diff --git a/src/node_metadata.cc b/src/node_metadata.cc index dfbea0c9ea26b2..014499eb046059 100644 --- a/src/node_metadata.cc +++ b/src/node_metadata.cc @@ -2,7 +2,6 @@ #include "acorn_version.h" #include "ada.h" #include "ares.h" -#include "base64_version.h" #include "brotli/encode.h" #include "cjs_module_lexer_version.h" #include "llhttp.h" @@ -121,7 +120,6 @@ Metadata::Versions::Versions() { acorn = ACORN_VERSION; cjs_module_lexer = CJS_MODULE_LEXER_VERSION; - base64 = BASE64_VERSION; uvwasi = UVWASI_VERSION_STRING; #if HAVE_OPENSSL diff --git a/src/node_metadata.h b/src/node_metadata.h index cf051585e779e2..3628a9d04aa65f 100644 --- a/src/node_metadata.h +++ b/src/node_metadata.h @@ -49,8 +49,7 @@ namespace node { V(simdutf) \ V(ada) \ NODE_VERSIONS_KEY_UNDICI(V) \ - V(cjs_module_lexer) \ - V(base64) + V(cjs_module_lexer) #if HAVE_OPENSSL #define NODE_VERSIONS_KEY_CRYPTO(V) V(openssl) diff --git a/src/node_options.cc b/src/node_options.cc index f6ff810953b224..9d5accc3ebc416 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -121,6 +121,10 @@ void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors, } } + if (!experimental_policy.empty() || experimental_https_modules) { + require_module = false; + } + if (!type.empty()) { if (type != "commonjs" && type != "module") { errors->push_back("--experimental-default-type must be " @@ -150,6 +154,11 @@ void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors, errors->push_back("--heapsnapshot-near-heap-limit must not be negative"); } + if (!trace_require_module.empty() && trace_require_module != "all" && + trace_require_module != "no-node-modules") { + errors->push_back("invalid value for --trace-require-module"); + } + if (test_runner) { if (syntax_check_only) { errors->push_back("either --test or --check can be used, not both"); @@ -364,7 +373,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "when ambiguous modules fail to evaluate because they contain " "ES module syntax, try again to evaluate them as ES modules", &EnvironmentOptions::detect_module, - kAllowedInEnvvar); + kAllowedInEnvvar, + true); AddOption("--experimental-print-required-tla", "Print pending top-level await. If --experimental-require-module " "is true, evaluate asynchronous graphs loaded by `require()` but " @@ -373,9 +383,10 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { &EnvironmentOptions::print_required_tla, kAllowedInEnvvar); AddOption("--experimental-require-module", - "Allow loading explicit ES Modules in require().", + "Allow loading synchronous ES Modules in require().", &EnvironmentOptions::require_module, - kAllowedInEnvvar); + kAllowedInEnvvar, + true); AddOption("--diagnostic-dir", "set dir for all output files" " (default: current working directory)", @@ -652,6 +663,10 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "set environment variables from supplied file", &EnvironmentOptions::env_file); Implies("--env-file", "[has_env_file_string]"); + AddOption("--env-file-if-exists", + "set environment variables from supplied file", + &EnvironmentOptions::optional_env_file); + Implies("--env-file-if-exists", "[has_env_file_string]"); AddOption("--test", "launch test runner on startup", &EnvironmentOptions::test_runner); @@ -732,6 +747,14 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "set module system to use by default", &EnvironmentOptions::type, kAllowedInEnvvar); + + AddOption( + "--trace-require-module", + "Print access to require(esm). Options are 'all' (print all usage) and " + "'no-node-modules' (excluding usage from the node_modules folder)", + &EnvironmentOptions::trace_require_module, + kAllowedInEnvvar); + AddOption("--extra-info-on-fatal-exception", "hide extra information on fatal exception that causes exit", &EnvironmentOptions::extra_info_on_fatal_exception, diff --git a/src/node_options.h b/src/node_options.h index 10c220f6612233..f7a5654a5cfcaa 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -115,9 +115,9 @@ class EnvironmentOptions : public Options { public: bool abort_on_uncaught_exception = false; std::vector<std::string> conditions; - bool detect_module = false; + bool detect_module = true; bool print_required_tla = false; - bool require_module = false; + bool require_module = true; std::string dns_result_order; bool enable_source_maps = false; bool experimental_eventsource = false; @@ -177,6 +177,7 @@ class EnvironmentOptions : public Options { std::string redirect_warnings; std::string diagnostic_dir; std::string env_file; + std::string optional_env_file; bool has_env_file_string = false; bool test_runner = false; uint64_t test_runner_concurrency = 0; @@ -199,6 +200,7 @@ class EnvironmentOptions : public Options { bool trace_uncaught = false; bool trace_warnings = false; bool trace_promises = false; + std::string trace_require_module; bool extra_info_on_fatal_exception = true; std::string unhandled_rejections; std::vector<std::string> userland_loaders; diff --git a/src/node_root_certs.h b/src/node_root_certs.h index 2c8670be39e586..ee229fc7740627 100644 --- a/src/node_root_certs.h +++ b/src/node_root_certs.h @@ -569,27 +569,6 @@ "dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=\n" "-----END CERTIFICATE-----", -/* SecureSign RootCA11 */ -"-----BEGIN CERTIFICATE-----\n" -"MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UE\n" -"ChMiSmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJl\n" -"U2lnbiBSb290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNV\n" -"BAYTAkpQMSswKQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRww\n" -"GgYDVQQDExNTZWN1cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\n" -"CgKCAQEA/XeqpRyQBTvLTJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1y\n" -"fIw/XwFndBWW4wI8h9uuywGOwvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyK\n" -"yiyhFTOVMdrAG/LuYpmGYz+/3ZMqg6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9\n" -"UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rPO7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V\n" -"1uinMrPmmECGxc0nEovMe863ETxiYAcjPitAbpSACW22s293bzUIUPsCh8U+iQIDAQABo0Iw\n" -"QDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZXt94wDgYDVR0PAQH/BAQDAgEGMA8GA1Ud\n" -"EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKChOBZmLqdWHyGcBvod7bkixTgm2E5P\n" -"7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4rbnpwrxYO4wJs+0LmGJ1F2FXI\n" -"6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQOh29Dbx7VFALuUKvVaAY\n" -"ga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01y8hSyn+B/tlr0/cR\n" -"7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061lgeLKBObjBmN\n" -"QSdJQO7e5iNEOdyhIta6A/I=\n" -"-----END CERTIFICATE-----", - /* Microsec e-Szigno Root CA 2009 */ "-----BEGIN CERTIFICATE-----\n" "MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJI\n" @@ -2310,40 +2289,6 @@ "UvToiIMrVCjU8jVStDKDYmlkDJGcn5fqdBb9HxEGmpv0\n" "-----END CERTIFICATE-----", -/* Entrust Root Certification Authority - G4 */ -"-----BEGIN CERTIFICATE-----\n" -"MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJ\n" -"BgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVu\n" -"dHJ1c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMu\n" -"IC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0\n" -"aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc0MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDEx\n" -"Nlowgb4xCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9T\n" -"ZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRy\n" -"dXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3Qg\n" -"Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc0MIICIjANBgkqhkiG9w0BAQEFAAOC\n" -"Ag8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3DumSXbcr3DbVZwbPLqGgZ2K+EbTBwXX7zLtJT\n" -"meH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV3imz/f3ET+iq4qA7ec2/a0My3dl0ELn3\n" -"9GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j5pds8ELl3FFLFUHtSUrJ3hCX1nbB76W1\n" -"NhSXNdh4IjVS70O92yfbYVaCNNzLiGAMC1rlLAHGVK/XqsEQe9IFWrhAnoanw5CGAlZSCXqc\n" -"0ieCU0plUmr1POeo8pyvi73TDtTUXm6Hnmo9RR3RXRv06QqsYJn7ibT/mCzPfB3pAqoEmh64\n" -"3IhuJbNsZvc8kPNXwbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5XxNMhIWNlUpEbsZmO\n" -"eX7m640A2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV7rtNOzK+mndm\n" -"nqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8dWbrAuMI\n" -"NClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwlN4y6mACXi0mWHv0l\n" -"iqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNjc0kCAwEAAaNCMEAwDwYDVR0T\n" -"AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ84xFYjwznooHFs6FRM5Og6\n" -"sb9nMA0GCSqGSIb3DQEBCwUAA4ICAQAS5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ\n" -"9POrYs4QjbRaZIxowLByQzTSGwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5\n" -"ZDIBf9PD3Vht7LGrhFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0g\n" -"kLpHZPt/B7NTeLUKYvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uI\n" -"AeV8KEsD+UmDfLJ/fOPtjqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbwH5Lk6rWS\n" -"02FREAutp9lfx1/cH6NcjKF+m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+b7DUUH8i119lAg2m\n" -"9IUe2K4GS0qn0jFmwvjO5QimpAKWRGhXxNUzzxkvFMSUHHuk2fCfDrGA4tGeEWSpiBE6doLl\n" -"YsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjAJOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuI\n" -"jnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh\n" -"7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPTkcpG2om3PVODLAgfi49T3f+sHw==\n" -"-----END CERTIFICATE-----", - /* Microsoft ECC Root Certificate Authority 2017 */ "-----BEGIN CERTIFICATE-----\n" "MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQswCQYDVQQG\n" @@ -3161,37 +3106,6 @@ "Nzf43TNRnXCve1XYAS59BWQOhriR\n" "-----END CERTIFICATE-----", -/* Security Communication RootCA3 */ -"-----BEGIN CERTIFICATE-----\n" -"MIIFfzCCA2egAwIBAgIJAOF8N0D9G/5nMA0GCSqGSIb3DQEBDAUAMF0xCzAJBgNVBAYTAkpQ\n" -"MSUwIwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScwJQYDVQQDEx5TZWN1\n" -"cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTMwHhcNMTYwNjE2MDYxNzE2WhcNMzgwMTE4MDYx\n" -"NzE2WjBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4s\n" -"TFRELjEnMCUGA1UEAxMeU2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EzMIICIjANBgkq\n" -"hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48lySfcw3gl8qUCBWNO0Ot26YQ+TUG5pPDXC7ltz\n" -"kBtnTCHsXzW7OT4rCmDvu20rhvtxosis5FaU+cmvsXLUIKx00rgVrVH+hXShuRD+BYD5UpOz\n" -"QD11EKzAlrenfna84xtSGc4RHwsENPXY9Wk8d/Nk9A2qhd7gCVAEF5aEt8iKvE1y/By7z/MG\n" -"TfmfZPd+pmaGNXHIEYBMwXFAWB6+oHP2/D5Q4eAvJj1+XCO1eXDe+uDRpdYMQXF79+qMHIjH\n" -"7Iv10S9VlkZ8WjtYO/u62C21Jdp6Ts9EriGmnpjKIG58u4iFW/vAEGK78vknR+/RiTlDxN/e\n" -"4UG/VHMgly1s2vPUB6PmudhvrvyMGS7TZ2crldtYXLVqAvO4g160a75BflcJdURQVc1aEWEh\n" -"CmHCqYj9E7wtiS/NYeCVvsq1e+F7NGcLH7YMx3weGVPKp7FKFSBWFHA9K4IsD50VHUeAR/94\n" -"mQ4xr28+j+2GaR57GIgUssL8gjMunEst+3A7caoreyYn8xrC3PsXuKHqy6C0rtOUfnrQq8Ps\n" -"OC0RLoi/1D+tEjtCrI8Cbn3M0V9hvqG8OmpI6iZVIhZdXw3/JzOfGAN0iltSIEdrRU0id4xV\n" -"J/CvHozJgyJUt5rQT9nO/NkuHJYosQLTA70lUhw0Zk8jq/R3gpYd0VcwCBEF/VfR2ccCAwEA\n" -"AaNCMEAwHQYDVR0OBBYEFGQUfPxYchamCik0FW8qy7z8r6irMA4GA1UdDwEB/wQEAwIBBjAP\n" -"BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBDAUAA4ICAQDcAiMI4u8hOscNtybSYpOnpSNy\n" -"ByCCYN8Y11StaSWSntkUz5m5UoHPrmyKO1o5yGwBQ8IibQLwYs1OY0PAFNr0Y/Dq9HHuTofj\n" -"can0yVflLl8cebsjqodEV+m9NU1Bu0soo5iyG9kLFwfl9+qd9XbXv8S2gVj/yP9kaWJ5rW4O\n" -"H3/uHWnlt3Jxs/6lATWUVCvAUm2PVcTJ0rjLyjQIUYWg9by0F1jqClx6vWPGOi//lkkZhOpn\n" -"2ASxYfQAW0q3nHE3GYV5v4GwxxMOdnE+OoAGrgYWp421wsTL/0ClXI2lyTrtcoHKXJg80jQD\n" -"dwj98ClZXSEIx2C/pHF7uNkegr4Jr2VvKKu/S7XuPghHJ6APbw+LP6yVGPO5DtxnVW5inkYO\n" -"0QR4ynKudtml+LLfiAlhi+8kTtFZP1rUPcmTPCtk9YENFpb3ksP+MW/oKjJ0DvRMmEoYDjBU\n" -"1cXrvMUVnuiZIesnKwkK2/HmcBhWuwzkvvnoEKQTkrgc4NtnHVMDpCKn3F2SEDzq//wbEBrD\n" -"2NCcnWXL0CsnMQMeNuE9dnUM/0Umud1RvCPHX9jYhxBAEg09ODfnRDwYwFMJZI//1ZqmfHAu\n" -"c1Uh6N//g7kdPjIe1qZ9LPFm6Vwdp6POXiUyK+OVrCoHzrQoeIY8LaadTdJ0MN1kURXbg4NR\n" -"16/9M51NZg==\n" -"-----END CERTIFICATE-----", - /* Security Communication ECC RootCA1 */ "-----BEGIN CERTIFICATE-----\n" "MIICODCCAb6gAwIBAgIJANZdm7N4gS7rMAoGCCqGSM49BAMDMGExCzAJBgNVBAYTAkpQMSUw\n" diff --git a/src/node_sea.cc b/src/node_sea.cc index 1cb09365dfca54..fb9f933a19fa70 100644 --- a/src/node_sea.cc +++ b/src/node_sea.cc @@ -36,6 +36,7 @@ using v8::FunctionCallbackInfo; using v8::HandleScope; using v8::Isolate; using v8::Local; +using v8::MaybeLocal; using v8::NewStringType; using v8::Object; using v8::ScriptCompiler; @@ -261,25 +262,6 @@ void IsExperimentalSeaWarningNeeded(const FunctionCallbackInfo<Value>& args) { sea_resource.flags & SeaFlags::kDisableExperimentalSeaWarning)); } -void GetCodePath(const FunctionCallbackInfo<Value>& args) { - DCHECK(IsSingleExecutable()); - - Isolate* isolate = args.GetIsolate(); - - SeaResource sea_resource = FindSingleExecutableResource(); - - Local<String> code_path; - if (!String::NewFromUtf8(isolate, - sea_resource.code_path.data(), - NewStringType::kNormal, - sea_resource.code_path.length()) - .ToLocal(&code_path)) { - return; - } - - args.GetReturnValue().Set(code_path); -} - std::tuple<int, char**> FixupArgsForSEA(int argc, char** argv) { // Repeats argv[0] at position 1 on argv as a replacement for the missing // entry point file path. @@ -619,6 +601,46 @@ void GetAsset(const FunctionCallbackInfo<Value>& args) { args.GetReturnValue().Set(ab); } +MaybeLocal<Value> LoadSingleExecutableApplication( + const StartExecutionCallbackInfo& info) { + // Here we are currently relying on the fact that in NodeMainInstance::Run(), + // env->context() is entered. + Local<Context> context = Isolate::GetCurrent()->GetCurrentContext(); + Environment* env = Environment::GetCurrent(context); + SeaResource sea = FindSingleExecutableResource(); + + CHECK(!sea.use_snapshot()); + // TODO(joyeecheung): this should be an external string. Refactor UnionBytes + // and make it easy to create one based on static content on the fly. + Local<Value> main_script = + ToV8Value(env->context(), sea.main_code_or_snapshot).ToLocalChecked(); + return info.run_cjs->Call( + env->context(), Null(env->isolate()), 1, &main_script); +} + +bool MaybeLoadSingleExecutableApplication(Environment* env) { +#ifndef DISABLE_SINGLE_EXECUTABLE_APPLICATION + if (!IsSingleExecutable()) { + return false; + } + + SeaResource sea = FindSingleExecutableResource(); + + if (sea.use_snapshot()) { + // The SEA preparation blob building process should already enforce this, + // this check is just here to guard against the unlikely case where + // the SEA preparation blob has been manually modified by someone. + CHECK(!env->snapshot_deserialize_main().IsEmpty()); + LoadEnvironment(env, StartExecutionCallback{}); + return true; + } + + LoadEnvironment(env, LoadSingleExecutableApplication); + return true; +#endif + return false; +} + void Initialize(Local<Object> target, Local<Value> unused, Local<Context> context, @@ -628,14 +650,12 @@ void Initialize(Local<Object> target, target, "isExperimentalSeaWarningNeeded", IsExperimentalSeaWarningNeeded); - SetMethod(context, target, "getCodePath", GetCodePath); SetMethod(context, target, "getAsset", GetAsset); } void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(IsSea); registry->Register(IsExperimentalSeaWarningNeeded); - registry->Register(GetCodePath); registry->Register(GetAsset); } diff --git a/src/node_sea.h b/src/node_sea.h index 6f2f51d997dc73..f3b3c34d26a969 100644 --- a/src/node_sea.h +++ b/src/node_sea.h @@ -14,6 +14,7 @@ #include "node_exit_code.h" namespace node { +class Environment; namespace sea { // A special number that will appear at the beginning of the single executable // preparation blobs ready to be injected into the binary. We use this to check @@ -49,6 +50,12 @@ node::ExitCode BuildSingleExecutableBlob( const std::string& config_path, const std::vector<std::string>& args, const std::vector<std::string>& exec_args); + +// Try loading the Environment as a single-executable application. +// Returns true if it is loaded as a single-executable application. +// Otherwise returns false and the caller is expected to call LoadEnvironment() +// differently. +bool MaybeLoadSingleExecutableApplication(Environment* env); } // namespace sea } // namespace node diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index 32371a69588ce7..7ea49e74127231 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -982,6 +982,8 @@ ExitCode BuildSnapshotWithoutCodeCache( } Isolate* isolate = setup->isolate(); + v8::Locker locker(isolate); + { HandleScope scope(isolate); TryCatch bootstrapCatch(isolate); @@ -993,25 +995,29 @@ ExitCode BuildSnapshotWithoutCodeCache( } }); + Context::Scope context_scope(setup->context()); + Environment* env = setup->env(); + // Run the custom main script for fully customized snapshots. if (snapshot_type == SnapshotMetadata::Type::kFullyCustomized) { - Context::Scope context_scope(setup->context()); - Environment* env = setup->env(); #if HAVE_INSPECTOR env->InitializeInspector({}); #endif if (LoadEnvironment(env, builder_script_content.value()).IsEmpty()) { return ExitCode::kGenericUserError; } + } - // FIXME(joyeecheung): right now running the loop in the snapshot - // builder might introduce inconsistencies in JS land that need to - // be synchronized again after snapshot restoration. - ExitCode exit_code = - SpinEventLoopInternal(env).FromMaybe(ExitCode::kGenericUserError); - if (exit_code != ExitCode::kNoFailure) { - return exit_code; - } + // Drain the loop and platform tasks before creating a snapshot. This is + // necessary to ensure that the no roots are held by the the platform + // tasks, which may reference objects associated with a context. For + // example, a WeakRef may schedule an per-isolate platform task as a GC + // root, and referencing an object in a context, causing an assertion in + // the snapshot creator. + ExitCode exit_code = + SpinEventLoopInternal(env).FromMaybe(ExitCode::kGenericUserError); + if (exit_code != ExitCode::kNoFailure) { + return exit_code; } } diff --git a/src/node_util.cc b/src/node_util.cc index 019990c688feee..36304498982700 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -254,6 +254,54 @@ static void ParseEnv(const FunctionCallbackInfo<Value>& args) { args.GetReturnValue().Set(dotenv.ToObject(env)); } +bool starts_with(std::string_view view, std::string_view prefix) { + return view.size() >= prefix.size() && + view.substr(0, prefix.size()) == prefix; +} + +static void IsInsideNodeModules(const FunctionCallbackInfo<Value>& args) { + Isolate* isolate = args.GetIsolate(); + CHECK_EQ(args.Length(), 2); + CHECK(args[0]->IsInt32()); // frame_limit + // The second argument is the default value. + + int frames_limit = args[0].As<v8::Int32>()->Value(); + Local<StackTrace> stack = + StackTrace::CurrentStackTrace(isolate, frames_limit); + int frame_count = stack->GetFrameCount(); + + // If the search requires looking into more than |frames_limit| frames, give + // up and return the specified default value. + if (frame_count == frames_limit) { + return args.GetReturnValue().Set(args[1]); + } + + bool result = false; + for (int i = 0; i < frame_count; ++i) { + Local<StackFrame> stack_frame = stack->GetFrame(isolate, i); + Local<String> script_name = stack_frame->GetScriptName(); + + if (script_name.IsEmpty() || script_name->Length() == 0) { + continue; + } + Utf8Value script_name_utf8(isolate, script_name); + std::string_view script_name_str = script_name_utf8.ToStringView(); + if (starts_with(script_name_str, + "node:")) { // Ported to work with C++17 on 20.x. + continue; + } + if (script_name_str.find("/node_modules/") != std::string::npos || + script_name_str.find("\\node_modules\\") != std::string::npos || + script_name_str.find("/node_modules\\") != std::string::npos || + script_name_str.find("\\node_modules/") != std::string::npos) { + result = true; + break; + } + } + + args.GetReturnValue().Set(result); +} + void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(GetPromiseDetails); registry->Register(GetProxyDetails); @@ -269,6 +317,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(FastGuessHandleType); registry->Register(fast_guess_handle_type_.GetTypeInfo()); registry->Register(ParseEnv); + registry->Register(IsInsideNodeModules); } void Initialize(Local<Object> target, @@ -338,6 +387,7 @@ void Initialize(Local<Object> target, target->Set(context, env->constants_string(), constants).Check(); } + SetMethod(context, target, "isInsideNodeModules", IsInsideNodeModules); SetMethodNoSideEffect( context, target, "getPromiseDetails", GetPromiseDetails); SetMethodNoSideEffect(context, target, "getProxyDetails", GetProxyDetails); diff --git a/src/node_version.h b/src/node_version.h index 2a4e7cb087b878..2c049396231d7f 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -23,13 +23,13 @@ #define SRC_NODE_VERSION_H_ #define NODE_MAJOR_VERSION 20 -#define NODE_MINOR_VERSION 18 -#define NODE_PATCH_VERSION 4 +#define NODE_MINOR_VERSION 19 +#define NODE_PATCH_VERSION 0 #define NODE_VERSION_IS_LTS 1 #define NODE_VERSION_LTS_CODENAME "Iron" -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) diff --git a/src/util-inl.h b/src/util-inl.h index 31ffa4934cf005..03db47a8bfaab3 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -403,6 +403,22 @@ inline char* UncheckedCalloc(size_t n) { return UncheckedCalloc<char>(n); } // headers than we really need to. void ThrowErrStringTooLong(v8::Isolate* isolate); +v8::Maybe<void> FromV8Array(v8::Local<v8::Context> context, + v8::Local<v8::Array> js_array, + std::vector<v8::Global<v8::Value>>* out) { + uint32_t count = js_array->Length(); + out->reserve(count); + v8::Isolate* isolate = context->GetIsolate(); + for (size_t i = 0; i < count; ++i) { + v8::Local<v8::Value> element; + if (!js_array->Get(context, i).ToLocal(&element)) { + return v8::Nothing<void>(); + } + out->push_back(v8::Global<v8::Value>(isolate, element)); + } + return v8::JustVoid(); +} + v8::MaybeLocal<v8::Value> ToV8Value(v8::Local<v8::Context> context, std::string_view str, v8::Isolate* isolate) { diff --git a/src/util.h b/src/util.h index b2c152a865ee76..07873fd1d605f4 100644 --- a/src/util.h +++ b/src/util.h @@ -702,6 +702,11 @@ struct FunctionDeleter { template <typename T, void (*function)(T*)> using DeleteFnPtr = typename FunctionDeleter<T, function>::Pointer; +// Mocking the FromV8Array from newer version of Node.js which relies +// on V8 API that does not exist on v20.x to smooth out backports. +inline v8::Maybe<void> FromV8Array(v8::Local<v8::Context> context, + v8::Local<v8::Array> js_array, + std::vector<v8::Global<v8::Value>>* out); std::vector<std::string_view> SplitString(const std::string_view in, const std::string_view delim); diff --git a/test/async-hooks/async-hooks.status b/test/async-hooks/async-hooks.status index 5dca3cb04f240c..673883e4fe3d4d 100644 --- a/test/async-hooks/async-hooks.status +++ b/test/async-hooks/async-hooks.status @@ -9,8 +9,6 @@ prefix async-hooks [$system==win32] [$system==linux] -# https://github.com/nodejs/node/issues/54809 -test-writewrap: PASS, FLAKY [$system==macos] diff --git a/test/cctest/test_base64.cc b/test/cctest/test_base64.cc index 167e5e27bb05fe..ce960a6fc8dd56 100644 --- a/test/cctest/test_base64.cc +++ b/test/cctest/test_base64.cc @@ -1,4 +1,5 @@ #include "base64-inl.h" +#include "simdutf.h" #include <cstddef> #include <cstring> @@ -6,14 +7,16 @@ #include "gtest/gtest.h" using node::base64_decode; -using node::base64_encode; TEST(Base64Test, Encode) { auto test = [](const char* string, const char* base64_string) { const size_t len = strlen(base64_string); + const size_t slen = strlen(string); char* const buffer = new char[len + 1]; buffer[len] = 0; - base64_encode(string, strlen(string), buffer, len); + CHECK(len >= simdutf::base64_length_from_binary(slen) && + "not enough space provided for base64 encode"); + simdutf::binary_to_base64(string, slen, buffer); EXPECT_STREQ(base64_string, buffer); delete[] buffer; }; @@ -47,9 +50,13 @@ TEST(Base64Test, Encode) { TEST(Base64Test, EncodeURL) { auto test = [](const char* string, const char* base64_string) { const size_t len = strlen(base64_string); + const size_t slen = strlen(string); char* const buffer = new char[len + 1]; buffer[len] = 0; - base64_encode(string, strlen(string), buffer, len, node::Base64Mode::URL); + CHECK(len >= + simdutf::base64_length_from_binary(slen, simdutf::base64_url) && + "not enough space provided for base64 encode"); + simdutf::binary_to_base64(string, slen, buffer, simdutf::base64_url); EXPECT_STREQ(base64_string, buffer); delete[] buffer; }; diff --git a/test/common/gc.js b/test/common/gc.js index 82cc4c79edc3dd..87625068c2cbca 100644 --- a/test/common/gc.js +++ b/test/common/gc.js @@ -3,6 +3,8 @@ const wait = require('timers/promises').setTimeout; const assert = require('assert'); const common = require('../common'); +// TODO(joyeecheung): rewrite checkIfCollectable to use this too. +const { setImmediate: setImmediatePromisified } = require('timers/promises'); const gcTrackerMap = new WeakMap(); const gcTrackerTag = 'NODE_TEST_COMMON_GC_TRACKER'; @@ -40,32 +42,26 @@ function onGC(obj, gcListener) { /** * Repeatedly triggers garbage collection until a specified condition is met or a maximum number of attempts is reached. + * This utillity must be run in a Node.js instance that enables --expose-gc. * @param {string|Function} [name] - Optional name, used in the rejection message if the condition is not met. * @param {Function} condition - A function that returns true when the desired condition is met. + * @param {number} maxCount - Maximum number of garbage collections that should be tried. + * @param {object} gcOptions - Options to pass into the global gc() function. * @returns {Promise} A promise that resolves when the condition is met, or rejects after 10 failed attempts. */ -function gcUntil(name, condition) { - if (typeof name === 'function') { - condition = name; - name = undefined; - } - return new Promise((resolve, reject) => { - let count = 0; - function gcAndCheck() { - setImmediate(() => { - count++; - global.gc(); - if (condition()) { - resolve(); - } else if (count < 10) { - gcAndCheck(); - } else { - reject(name === undefined ? undefined : 'Test ' + name + ' failed'); - } - }); +async function gcUntil(name, condition, maxCount = 10, gcOptions) { + for (let count = 0; count < maxCount; ++count) { + await setImmediatePromisified(); + if (gcOptions) { + await global.gc(gcOptions); + } else { + await global.gc(); // Passing in undefined is not the same as empty. } - gcAndCheck(); - }); + if (condition()) { + return; + } + } + throw new Error(`Test ${name} failed`); } // This function can be used to check if an object factor leaks or not, diff --git a/test/common/index.js b/test/common/index.js index c39488dd0b9819..9733f8746baa0e 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -927,9 +927,14 @@ function getPrintedStackTrace(stderr) { * @param {object} mod result returned by require() * @param {object} expectation shape of expected namespace. */ -function expectRequiredModule(mod, expectation) { +function expectRequiredModule(mod, expectation, checkESModule = true) { + const clone = { ...mod }; + if (Object.hasOwn(mod, 'default') && checkESModule) { + assert.strictEqual(mod.__esModule, true); + delete clone.__esModule; + } assert(isModuleNamespaceObject(mod)); - assert.deepStrictEqual({ ...mod }, { ...expectation }); + assert.deepStrictEqual(clone, { ...expectation }); } const common = { diff --git a/test/es-module/test-cjs-esm-warn.js b/test/es-module/test-cjs-esm-warn.js index 7ac85fd58c5f18..44f8e21da9d686 100644 --- a/test/es-module/test-cjs-esm-warn.js +++ b/test/es-module/test-cjs-esm-warn.js @@ -1,3 +1,6 @@ +// Previously, this tested that require(esm) throws ERR_REQUIRE_ESM, which is no longer applicable +// since require(esm) is now supported. The test has been repurposed to ensure that the old behavior +// is preserved when the --no-experimental-require-module flag is used. 'use strict'; const { spawnPromisified } = require('../common'); @@ -22,7 +25,9 @@ describe('CJS ↔︎ ESM interop warnings', { concurrency: true }, () => { fixtures.path('/es-modules/package-type-module/cjs.js') ); const basename = 'cjs.js'; - const { code, signal, stderr } = await spawnPromisified(execPath, [requiringCjsAsEsm]); + const { code, signal, stderr } = await spawnPromisified(execPath, [ + '--no-experimental-require-module', requiringCjsAsEsm, + ]); assert.ok( stderr.replaceAll('\r', '').includes( @@ -48,7 +53,9 @@ describe('CJS ↔︎ ESM interop warnings', { concurrency: true }, () => { fixtures.path('/es-modules/package-type-module/esm.js') ); const basename = 'esm.js'; - const { code, signal, stderr } = await spawnPromisified(execPath, [requiringEsm]); + const { code, signal, stderr } = await spawnPromisified(execPath, [ + '--no-experimental-require-module', requiringEsm, + ]); assert.ok( stderr.replace(/\r/g, '').includes( diff --git a/test/es-module/test-disable-require-module-with-detection.js b/test/es-module/test-disable-require-module-with-detection.js new file mode 100644 index 00000000000000..3ac5ec82171587 --- /dev/null +++ b/test/es-module/test-disable-require-module-with-detection.js @@ -0,0 +1,19 @@ +// Flags: --no-experimental-require-module +'use strict'; + +// Tests that --experimental-require-module is not implied by --experimental-detect-module +// and is checked independently. +require('../common'); +const assert = require('assert'); + +// Check that require() still throws SyntaxError for an ambiguous module that's detected to be ESM. +// TODO(joyeecheung): now that --experimental-detect-module is unflagged, it makes more sense +// to either throw ERR_REQUIRE_ESM for require() of detected ESM instead, or add a hint about the +// use of require(esm) to the SyntaxError. + +assert.throws( + () => require('../fixtures/es-modules/loose.js'), + { + name: 'SyntaxError', + message: /Unexpected token 'export'/ + }); diff --git a/test/es-module/test-esm-cjs-exports.js b/test/es-module/test-esm-cjs-exports.js index 4f79d2ce4bcb8c..6d79517073ab83 100644 --- a/test/es-module/test-esm-cjs-exports.js +++ b/test/es-module/test-esm-cjs-exports.js @@ -21,9 +21,8 @@ describe('ESM: importing CJS', { concurrency: true }, () => { const invalidEntry = fixtures.path('/es-modules/cjs-exports-invalid.mjs'); const { code, signal, stderr } = await spawnPromisified(execPath, [invalidEntry]); + assert.match(stderr, /SyntaxError: The requested module '\.\/invalid-cjs\.js' does not provide an export named 'default'/); assert.strictEqual(code, 1); assert.strictEqual(signal, null); - assert.ok(stderr.includes('Warning: To load an ES module')); - assert.ok(stderr.includes('Unexpected token \'export\'')); }); }); diff --git a/test/es-module/test-esm-detect-ambiguous.mjs b/test/es-module/test-esm-detect-ambiguous.mjs index c027f46328acee..8c26c696fa2e0a 100644 --- a/test/es-module/test-esm-detect-ambiguous.mjs +++ b/test/es-module/test-esm-detect-ambiguous.mjs @@ -4,11 +4,10 @@ import { spawn } from 'node:child_process'; import { describe, it } from 'node:test'; import { strictEqual, match } from 'node:assert'; -describe('--experimental-detect-module', { concurrency: true }, () => { - describe('string input', { concurrency: true }, () => { +describe('Module syntax detection', { concurrency: !process.env.TEST_PARALLEL }, () => { + describe('string input', { concurrency: !process.env.TEST_PARALLEL }, () => { it('permits ESM syntax in --eval input without requiring --input-type=module', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--eval', 'import { version } from "node:process"; console.log(version);', ]); @@ -22,9 +21,7 @@ describe('--experimental-detect-module', { concurrency: true }, () => { // ESM is unsupported for --print via --input-type=module it('permits ESM syntax in STDIN input without requiring --input-type=module', async () => { - const child = spawn(process.execPath, [ - '--experimental-detect-module', - ]); + const child = spawn(process.execPath, []); child.stdin.end('console.log(typeof import.meta.resolve)'); match((await child.stdout.toArray()).toString(), /^function\r?\n$/); @@ -32,7 +29,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it('should be overridden by --input-type', async () => { const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--input-type=commonjs', '--eval', 'import.meta.url', @@ -44,9 +40,20 @@ describe('--experimental-detect-module', { concurrency: true }, () => { strictEqual(signal, null); }); + it('should not switch to module if code is parsable as script', async () => { + const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ + '--eval', + 'let __filename,__dirname,require,module,exports;this.a', + ]); + + strictEqual(stderr, ''); + strictEqual(stdout, ''); + strictEqual(code, 0); + strictEqual(signal, null); + }); + it('should be overridden by --experimental-default-type', async () => { const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--experimental-default-type=commonjs', '--eval', 'import.meta.url', @@ -60,7 +67,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it('does not trigger detection via source code `eval()`', async () => { const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--eval', 'eval("import \'nonexistent\';");', ]); @@ -102,7 +108,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it(testName, async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ '--no-warnings', - '--experimental-detect-module', entryPath, ]); @@ -144,7 +149,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it(testName, async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ '--no-warnings', - '--experimental-detect-module', entryPath, ]); @@ -158,7 +162,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it('should not hint wrong format in resolve hook', async () => { let writeSync; const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--no-warnings', '--loader', `data:text/javascript,import { writeSync } from "node:fs"; export ${encodeURIComponent( @@ -196,7 +199,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { ]) { it(testName, async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', entryPath, ]); @@ -225,7 +227,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { ]) { it(testName, async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', entryPath, ]); @@ -241,7 +242,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { describe('syntax that errors in CommonJS but works in ESM', { concurrency: true }, () => { it('permits top-level `await`', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--eval', 'await Promise.resolve(); console.log("executed");', ]); @@ -252,9 +252,20 @@ describe('--experimental-detect-module', { concurrency: true }, () => { strictEqual(signal, null); }); + it('reports unfinished top-level `await`', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--no-warnings', + fixtures.path('es-modules/tla/unresolved.js'), + ]); + + strictEqual(stderr, ''); + strictEqual(stdout, ''); + strictEqual(code, 13); + strictEqual(signal, null); + }); + it('permits top-level `await` above import/export syntax', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--eval', 'await Promise.resolve(); import "node:os"; console.log("executed");', ]); @@ -267,7 +278,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it('still throws on `await` in an ordinary sync function', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--eval', 'function fn() { await Promise.resolve(); } fn();', ]); @@ -280,7 +290,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it('throws on undefined `require` when top-level `await` triggers ESM parsing', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--eval', 'const fs = require("node:fs"); await Promise.resolve();', ]); @@ -294,7 +303,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it('permits declaration of CommonJS module variables', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ '--no-warnings', - '--experimental-detect-module', fixtures.path('es-modules/package-without-type/commonjs-wrapper-variables.js'), ]); @@ -306,7 +314,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it('permits declaration of CommonJS module variables above import/export', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--eval', 'const module = 3; import "node:os"; console.log("executed");', ]); @@ -319,7 +326,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { it('still throws on double `const` declaration not at the top level', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', '--eval', 'function fn() { const require = 1; const require = 2; } fn();', ]); @@ -348,7 +354,6 @@ describe('--experimental-detect-module', { concurrency: true }, () => { ]) { it(testName, async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', entryPath, ]); @@ -359,9 +364,20 @@ describe('--experimental-detect-module', { concurrency: true }, () => { }); } + it('does not warn when there are no package.json', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + fixtures.path('es-modules/loose.js'), + ]); + + strictEqual(stderr, ''); + strictEqual(stdout, 'executed\n'); + strictEqual(code, 0); + strictEqual(signal, null); + }); + + it('warns only once for a package.json that affects multiple files', async () => { const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ - '--experimental-detect-module', fixtures.path('es-modules/package-without-type/detected-as-esm.js'), ]); @@ -371,18 +387,31 @@ describe('--experimental-detect-module', { concurrency: true }, () => { strictEqual(code, 0); strictEqual(signal, null); }); + + it('can be disabled via --no-experimental-detect-module', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--no-experimental-detect-module', + fixtures.path('es-modules/package-without-type/module.js'), + ]); + + match(stderr, /SyntaxError: Unexpected token 'export'/); + strictEqual(stdout, ''); + strictEqual(code, 1); + strictEqual(signal, null); + }); }); }); -// Validate temporarily disabling `--abort-on-uncaught-exception` -// while running `containsModuleSyntax`. +// Checks the error caught during module detection does not trigger abort when +// `--abort-on-uncaught-exception` is passed in (as that's a caught internal error). // Ref: https://github.com/nodejs/node/issues/50878 describe('Wrapping a `require` of an ES module while using `--abort-on-uncaught-exception`', () => { it('should work', async () => { const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ '--abort-on-uncaught-exception', + '--no-warnings', '--eval', - 'assert.throws(() => require("./package-type-module/esm.js"), { code: "ERR_REQUIRE_ESM" })', + 'require("./package-type-module/esm.js")', ], { cwd: fixtures.path('es-modules'), }); @@ -393,3 +422,17 @@ describe('Wrapping a `require` of an ES module while using `--abort-on-uncaught- strictEqual(signal, null); }); }); + +describe('when working with Worker threads', () => { + it('should support sloppy scripts that declare CJS "global-like" variables', async () => { + const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ + '--eval', + 'new worker_threads.Worker("let __filename,__dirname,require,module,exports;this.a",{eval:true})', + ]); + + strictEqual(stderr, ''); + strictEqual(stdout, ''); + strictEqual(code, 0); + strictEqual(signal, null); + }); +}); diff --git a/test/es-module/test-esm-extensionless-esm-and-wasm.mjs b/test/es-module/test-esm-extensionless-esm-and-wasm.mjs index db20bc047feec1..5ae6c7dc6ae2ff 100644 --- a/test/es-module/test-esm-extensionless-esm-and-wasm.mjs +++ b/test/es-module/test-esm-extensionless-esm-and-wasm.mjs @@ -55,27 +55,20 @@ describe('extensionless Wasm modules within a "type": "module" package scope', { }); }); -describe('extensionless ES modules within no package scope', { concurrency: true }, () => { - // This succeeds with `--experimental-default-type=module` - it('should error as the entry point', async () => { +describe('extensionless ES modules within no package scope', { concurrency: !process.env.TEST_PARALLEL }, () => { + it('should run as the entry point', async () => { const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ fixtures.path('es-modules/noext-esm'), ]); - match(stderr, /SyntaxError/); - strictEqual(stdout, ''); - strictEqual(code, 1); + strictEqual(stdout, 'executed\n'); + strictEqual(stderr, ''); + strictEqual(code, 0); strictEqual(signal, null); }); - // This succeeds with `--experimental-default-type=module` - it('should error on import', async () => { - try { - await import(fixtures.fileURL('es-modules/noext-esm')); - mustNotCall(); - } catch (err) { - ok(err instanceof SyntaxError); - } + it('should run on import', async () => { + await import(fixtures.fileURL('es-modules/noext-esm')); }); }); diff --git a/test/es-module/test-esm-import-flag.mjs b/test/es-module/test-esm-import-flag.mjs index ede317b1d585de..63f5db1fa23d7b 100644 --- a/test/es-module/test-esm-import-flag.mjs +++ b/test/es-module/test-esm-import-flag.mjs @@ -146,9 +146,9 @@ describe('import modules using --import', { concurrency: true }, () => { ] ); - assert.match(stderr, /SyntaxError: Unexpected token 'export'/); + assert.strictEqual(stderr, ''); assert.match(stdout, /^\.mjs file\r?\n$/); - assert.strictEqual(code, 1); + assert.strictEqual(code, 0); assert.strictEqual(signal, null); }); diff --git a/test/es-module/test-esm-loader-hooks.mjs b/test/es-module/test-esm-loader-hooks.mjs index 5b367c7519b16e..1476bc44cb7520 100644 --- a/test/es-module/test-esm-loader-hooks.mjs +++ b/test/es-module/test-esm-loader-hooks.mjs @@ -716,15 +716,15 @@ describe('Loader hooks', { concurrency: true }, () => { '--no-warnings', '--experimental-loader', `data:text/javascript,import{readFile}from"node:fs/promises";import{fileURLToPath}from"node:url";export ${ - async function load(u, c, n) { - const r = await n(u, c); - if (u.endsWith('/common/index.js')) { - r.source = '"use strict";module.exports=require("node:module").createRequire(' + - `${JSON.stringify(u)})(${JSON.stringify(fileURLToPath(u))});\n`; - } else if (c.format === 'commonjs') { - r.source = await readFile(new URL(u)); + async function load(url, context, nextLoad) { + const result = await nextLoad(url, context); + if (url.endsWith('/common/index.js')) { + result.source = '"use strict";module.exports=require("node:module").createRequire(' + + `${JSON.stringify(url)})(${JSON.stringify(fileURLToPath(url))});\n`; + } else if (url.startsWith('file:') && (context.format == null || context.format === 'commonjs')) { + result.source = await readFile(new URL(url)); } - return r; + return result; }}`, '--experimental-loader', fixtures.fileURL('es-module-loaders/loader-resolve-passthru.mjs'), @@ -739,6 +739,7 @@ describe('Loader hooks', { concurrency: true }, () => { describe('should use hooks', async () => { const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ + '--no-experimental-require-module', '--import', fixtures.fileURL('es-module-loaders/builtin-named-exports.mjs'), fixtures.path('es-modules/require-esm-throws-with-loaders.js'), diff --git a/test/es-module/test-esm-resolve-type.mjs b/test/es-module/test-esm-resolve-type.mjs index 0f442ed569f848..9288ce95c55879 100644 --- a/test/es-module/test-esm-resolve-type.mjs +++ b/test/es-module/test-esm-resolve-type.mjs @@ -40,8 +40,8 @@ try { [ [ '/es-modules/package-type-module/index.js', 'module' ], [ '/es-modules/package-type-commonjs/index.js', 'commonjs' ], - [ '/es-modules/package-without-type/index.js', 'commonjs' ], - [ '/es-modules/package-without-pjson/index.js', 'commonjs' ], + [ '/es-modules/package-without-type/index.js', null ], + [ '/es-modules/package-without-pjson/index.js', null ], ].forEach(([ testScript, expectedType ]) => { const resolvedPath = path.resolve(fixtures.path(testScript)); const resolveResult = resolve(url.pathToFileURL(resolvedPath)); @@ -54,11 +54,11 @@ try { * * for test-module-ne: everything .js that is not 'module' is 'commonjs' */ - for (const [ moduleName, moduleExtenstion, moduleType, expectedResolvedType ] of + for (const [ moduleName, moduleExtension, moduleType, expectedResolvedType ] of [ [ 'test-module-mainjs', 'js', 'module', 'module'], [ 'test-module-mainmjs', 'mjs', 'module', 'module'], [ 'test-module-cjs', 'js', 'commonjs', 'commonjs'], - [ 'test-module-ne', 'js', undefined, 'commonjs'], + [ 'test-module-ne', 'js', undefined, null], ]) { process.chdir(previousCwd); tmpdir.refresh(); @@ -72,14 +72,14 @@ try { const mDir = rel(`node_modules/${moduleName}`); const subDir = rel(`node_modules/${moduleName}/subdir`); const pkg = rel(`node_modules/${moduleName}/package.json`); - const script = rel(`node_modules/${moduleName}/subdir/mainfile.${moduleExtenstion}`); + const script = rel(`node_modules/${moduleName}/subdir/mainfile.${moduleExtension}`); createDir(nmDir); createDir(mDir); createDir(subDir); const pkgJsonContent = { ...(moduleType !== undefined) && { type: moduleType }, - main: `subdir/mainfile.${moduleExtenstion}` + main: `subdir/mainfile.${moduleExtension}` }; fs.writeFileSync(pkg, JSON.stringify(pkgJsonContent)); fs.writeFileSync(script, diff --git a/test/es-module/test-esm-type-field-errors-2.js b/test/es-module/test-esm-type-field-errors-2.js new file mode 100644 index 00000000000000..3ea259446c7fb2 --- /dev/null +++ b/test/es-module/test-esm-type-field-errors-2.js @@ -0,0 +1,17 @@ +// Flags: --no-experimental-require-module +// Previously, this tested that require(esm) throws ERR_REQUIRE_ESM, which is no longer applicable +// since require(esm) is now supported. The test has been repurposed to ensure that the old behavior +// is preserved when the --no-experimental-require-module flag is used. + +'use strict'; +require('../common'); +const assert = require('assert'); +const { describe, it } = require('node:test'); + +describe('Errors related to ESM type field', () => { + it('Should throw an error when loading CJS from a `type: "module"` package.', () => { + assert.throws(() => require('../fixtures/es-modules/package-type-module/index.js'), { + code: 'ERR_REQUIRE_ESM' + }); + }); +}); diff --git a/test/es-module/test-esm-type-field-errors.js b/test/es-module/test-esm-type-field-errors.js index 9ec9aa64e18c07..4bf52f3ad6e7d3 100644 --- a/test/es-module/test-esm-type-field-errors.js +++ b/test/es-module/test-esm-type-field-errors.js @@ -50,12 +50,6 @@ describe('ESM type field errors', { concurrency: true }, () => { true, ); }); - - it('--input-type=module disallowed for directories', () => { - assert.throws(() => require('../fixtures/es-modules/package-type-module/index.js'), { - code: 'ERR_REQUIRE_ESM' - }); - }); }); function expect(opt = '', inputFile, want, wantsError = false) { diff --git a/test/es-module/test-import-module-conditional-exports-module.mjs b/test/es-module/test-import-module-conditional-exports-module.mjs new file mode 100644 index 00000000000000..c751996c804529 --- /dev/null +++ b/test/es-module/test-import-module-conditional-exports-module.mjs @@ -0,0 +1,29 @@ +// Flags: --experimental-require-module + +import '../common/index.mjs'; +import assert from 'node:assert'; +import * as staticImport from '../fixtures/es-modules/module-condition/import.mjs'; +import { import as _import } from '../fixtures/es-modules/module-condition/dynamic_import.js'; + +async function dynamicImport(id) { + const result = await _import(id); + return result.resolved; +} + +assert.deepStrictEqual({ ...staticImport }, { + import_module_require: 'import', + module_and_import: 'module', + module_and_require: 'module', + module_import_require: 'module', + module_only: 'module', + module_require_import: 'module', + require_module_import: 'module', +}); + +assert.strictEqual(await dynamicImport('import-module-require'), 'import'); +assert.strictEqual(await dynamicImport('module-and-import'), 'module'); +assert.strictEqual(await dynamicImport('module-and-require'), 'module'); +assert.strictEqual(await dynamicImport('module-import-require'), 'module'); +assert.strictEqual(await dynamicImport('module-only'), 'module'); +assert.strictEqual(await dynamicImport('module-require-import'), 'module'); +assert.strictEqual(await dynamicImport('require-module-import'), 'module'); diff --git a/test/es-module/test-require-as-esm-interop.mjs b/test/es-module/test-require-as-esm-interop.mjs new file mode 100644 index 00000000000000..8364fd6c2fceca --- /dev/null +++ b/test/es-module/test-require-as-esm-interop.mjs @@ -0,0 +1,51 @@ +// Flags: --experimental-require-module +import '../common/index.mjs'; +import assert from 'assert'; +import { directRequireFixture, importFixture } from '../fixtures/pkgexports.mjs'; + +const tests = { + 'false': false, + 'string': 'cjs', + 'object': { a: 'cjs a', b: 'cjs b' }, + 'fauxesmdefault': { default: 'faux esm default' }, + 'fauxesmmixed': { default: 'faux esm default', a: 'faux esm a', b: 'faux esm b' }, + 'fauxesmnamed': { a: 'faux esm a', b: 'faux esm b' } +}; + +// This test demonstrates interop between CJS and CJS represented as ESM +// under the new `export { ... as 'module.exports'}` pattern, for the above cases. +for (const [test, exactShape] of Object.entries(tests)) { + // Each case represents a CJS dependency, which has the expected shape in CJS: + assert.deepStrictEqual(directRequireFixture(`interop-cjsdep-${test}`), exactShape); + + // Each dependency is reexported through CJS as if it is a library being consumed, + // which in CJS is fully shape-preserving: + assert.deepStrictEqual(directRequireFixture(`interop-cjs/${test}`), exactShape); + + // Now we have ESM conversions of these dependencies, using `export ... as "module.exports"` + // staring with the conversion of those dependencies into ESM under require(esm): + assert.deepStrictEqual(directRequireFixture(`interop-cjsdep-${test}-esm`), exactShape); + + // When importing these ESM conversions, from require(esm), we should preserve the shape: + assert.deepStrictEqual(directRequireFixture(`interop-cjs/${test}-esm`), exactShape); + + // Now if the importer itself is converted into ESM, it should still be able to load the original + // CJS and reexport it, preserving the shape: + assert.deepStrictEqual(directRequireFixture(`interop-cjs-esm/${test}`), exactShape); + + // And then if we have the converted CJS to ESM importing from converted CJS to ESM, + // that should also work: + assert.deepStrictEqual(directRequireFixture(`interop-cjs-esm/${test}-esm`), exactShape); + + // Finally, the CJS ESM representation under `import()` should match all these cases equivalently, + // where the CJS module is exported as the default export: + const esmCjsImport = await importFixture(`interop-cjsdep-${test}`); + assert.deepStrictEqual(esmCjsImport.default, exactShape); + + assert.deepStrictEqual((await importFixture(`interop-cjsdep-${test}`)).default, exactShape); + assert.deepStrictEqual((await importFixture(`interop-cjs/${test}`)).default, exactShape); + assert.deepStrictEqual((await importFixture(`interop-cjsdep-${test}-esm`)).default, exactShape); + assert.deepStrictEqual((await importFixture(`interop-cjs/${test}-esm`)).default, exactShape); + assert.deepStrictEqual((await importFixture(`interop-cjs-esm/${test}`)).default, exactShape); + assert.deepStrictEqual((await importFixture(`interop-cjs-esm/${test}-esm`)).default, exactShape); +} diff --git a/test/es-module/test-require-module-conditional-exports-module.js b/test/es-module/test-require-module-conditional-exports-module.js new file mode 100644 index 00000000000000..2a9e83869053d3 --- /dev/null +++ b/test/es-module/test-require-module-conditional-exports-module.js @@ -0,0 +1,15 @@ +// Flags: --experimental-require-module +'use strict'; + +require('../common'); +const assert = require('assert'); + +const loader = require('../fixtures/es-modules/module-condition/require.cjs'); + +assert.strictEqual(loader.require('import-module-require').resolved, 'module'); +assert.strictEqual(loader.require('module-and-import').resolved, 'module'); +assert.strictEqual(loader.require('module-and-require').resolved, 'module'); +assert.strictEqual(loader.require('module-import-require').resolved, 'module'); +assert.strictEqual(loader.require('module-only').resolved, 'module'); +assert.strictEqual(loader.require('module-require-import').resolved, 'module'); +assert.strictEqual(loader.require('require-module-import').resolved, 'require'); diff --git a/test/es-module/test-require-module-cycle-cjs-esm-esm.js b/test/es-module/test-require-module-cycle-cjs-esm-esm.js new file mode 100644 index 00000000000000..a83d7ee7a71bb2 --- /dev/null +++ b/test/es-module/test-require-module-cycle-cjs-esm-esm.js @@ -0,0 +1,8 @@ +// Flags: --experimental-require-module +'use strict'; + +// This tests that ESM <-> ESM cycle is allowed in a require()-d graph. +const common = require('../common'); +const cycle = require('../fixtures/es-modules/cjs-esm-esm-cycle/c.cjs'); + +common.expectRequiredModule(cycle, { b: 5 }); diff --git a/test/es-module/test-require-module-default-extension.js b/test/es-module/test-require-module-default-extension.js index 7c49e21aba9a15..c126affe983264 100644 --- a/test/es-module/test-require-module-default-extension.js +++ b/test/es-module/test-require-module-default-extension.js @@ -1,13 +1,11 @@ // Flags: --experimental-require-module 'use strict'; -require('../common'); +const { expectRequiredModule } = require('../common'); const assert = require('assert'); -const { isModuleNamespaceObject } = require('util/types'); const mod = require('../fixtures/es-modules/package-default-extension/index.mjs'); -assert.deepStrictEqual({ ...mod }, { entry: 'mjs' }); -assert(isModuleNamespaceObject(mod)); +expectRequiredModule(mod, { entry: 'mjs' }); assert.throws(() => { const mod = require('../fixtures/es-modules/package-default-extension'); diff --git a/test/es-module/test-require-module-defined-esmodule.js b/test/es-module/test-require-module-defined-esmodule.js new file mode 100644 index 00000000000000..68225ebdbd93cd --- /dev/null +++ b/test/es-module/test-require-module-defined-esmodule.js @@ -0,0 +1,23 @@ +// Flags: --experimental-require-module +'use strict'; +const common = require('../common'); + +// If an ESM already defines __esModule to be something else, +// require(esm) should allow the user override. +{ + const mod = require('../fixtures/es-modules/export-es-module.mjs'); + common.expectRequiredModule( + mod, + { default: { hello: 'world' }, __esModule: 'test' }, + false, + ); +} + +{ + const mod = require('../fixtures/es-modules/export-es-module-2.mjs'); + common.expectRequiredModule( + mod, + { default: { hello: 'world' }, __esModule: false }, + false, + ); +} diff --git a/test/es-module/test-require-module-detect-entry-point-aou.js b/test/es-module/test-require-module-detect-entry-point-aou.js new file mode 100644 index 00000000000000..128615761f10ea --- /dev/null +++ b/test/es-module/test-require-module-detect-entry-point-aou.js @@ -0,0 +1,7 @@ +// Flags: --experimental-require-module --abort-on-uncaught-exception + +import { mustCall } from '../common/index.mjs'; +const fn = mustCall(() => { + console.log('hello'); +}); +fn(); diff --git a/test/es-module/test-require-module-detect-entry-point.js b/test/es-module/test-require-module-detect-entry-point.js new file mode 100644 index 00000000000000..253fe06fdb7a3d --- /dev/null +++ b/test/es-module/test-require-module-detect-entry-point.js @@ -0,0 +1,7 @@ +// Flags: --experimental-require-module + +import { mustCall } from '../common/index.mjs'; +const fn = mustCall(() => { + console.log('hello'); +}); +fn(); diff --git a/test/es-module/test-require-module-dont-detect-cjs.js b/test/es-module/test-require-module-dont-detect-cjs.js new file mode 100644 index 00000000000000..99f49bc59d17c4 --- /dev/null +++ b/test/es-module/test-require-module-dont-detect-cjs.js @@ -0,0 +1,11 @@ +// Flags: --experimental-require-module +'use strict'; + +require('../common'); +const assert = require('assert'); + +assert.throws(() => { + require('../fixtures/es-modules/es-note-unexpected-export-1.cjs'); +}, { + message: /Unexpected token 'export'/ +}); diff --git a/test/es-module/test-require-module-dynamic-import-1.js b/test/es-module/test-require-module-dynamic-import-1.js index 000e31485f559e..939a2cdbcc93bf 100644 --- a/test/es-module/test-require-module-dynamic-import-1.js +++ b/test/es-module/test-require-module-dynamic-import-1.js @@ -21,8 +21,7 @@ const { pathToFileURL } = require('url'); const url = pathToFileURL(path.resolve(__dirname, id)); const imported = await import(url); const required = require(id); - assert.strictEqual(imported, required, - `import()'ed and require()'ed result of ${id} was not reference equal`); + common.expectRequiredModule(required, imported); } const id = '../fixtures/es-modules/data-import.mjs'; diff --git a/test/es-module/test-require-module-dynamic-import-2.js b/test/es-module/test-require-module-dynamic-import-2.js index 6c31c04f0b2e77..a3e24a800c1803 100644 --- a/test/es-module/test-require-module-dynamic-import-2.js +++ b/test/es-module/test-require-module-dynamic-import-2.js @@ -21,8 +21,7 @@ const path = require('path'); const url = pathToFileURL(path.resolve(__dirname, id)); const required = require(id); const imported = await import(url); - assert.strictEqual(imported, required, - `import()'ed and require()'ed result of ${id} was not reference equal`); + common.expectRequiredModule(required, imported); } const id = '../fixtures/es-modules/data-import.mjs'; diff --git a/test/es-module/test-require-module-dynamic-import-3.js b/test/es-module/test-require-module-dynamic-import-3.js index 7a5fbf1a137f96..53fcdc48c8c552 100644 --- a/test/es-module/test-require-module-dynamic-import-3.js +++ b/test/es-module/test-require-module-dynamic-import-3.js @@ -5,10 +5,9 @@ // be loaded by dynamic import(). const common = require('../common'); -const assert = require('assert'); (async () => { const required = require('../fixtures/es-modules/require-and-import/load.cjs'); const imported = await import('../fixtures/es-modules/require-and-import/load.mjs'); - assert.deepStrictEqual({ ...required }, { ...imported }); + common.expectRequiredModule(required, imported); })().then(common.mustCall()); diff --git a/test/es-module/test-require-module-dynamic-import-4.js b/test/es-module/test-require-module-dynamic-import-4.js index 414cd70d82d33a..88c565d2ba2e47 100644 --- a/test/es-module/test-require-module-dynamic-import-4.js +++ b/test/es-module/test-require-module-dynamic-import-4.js @@ -5,10 +5,9 @@ // be loaded by require(). const common = require('../common'); -const assert = require('assert'); (async () => { const imported = await import('../fixtures/es-modules/require-and-import/load.mjs'); const required = require('../fixtures/es-modules/require-and-import/load.cjs'); - assert.deepStrictEqual({ ...required }, { ...imported }); + common.expectRequiredModule(required, imported); })().then(common.mustCall()); diff --git a/test/es-module/test-require-module-error-catching.js b/test/es-module/test-require-module-error-catching.js new file mode 100644 index 00000000000000..c314513d9bbf04 --- /dev/null +++ b/test/es-module/test-require-module-error-catching.js @@ -0,0 +1,21 @@ +// This tests synchronous errors in ESM from require(esm) can be caught. + +'use strict'; + +require('../common'); +const assert = require('assert'); + +// Runtime errors from throw should be caught. +assert.throws(() => { + require('../fixtures/es-modules/runtime-error-esm.js'); +}, { + message: 'hello' +}); + +// References errors should be caught too. +assert.throws(() => { + require('../fixtures/es-modules/reference-error-esm.js'); +}, { + name: 'ReferenceError', + message: 'exports is not defined' +}); diff --git a/test/es-module/test-require-module-feature-detect.js b/test/es-module/test-require-module-feature-detect.js new file mode 100644 index 00000000000000..8af5bc77d7b32e --- /dev/null +++ b/test/es-module/test-require-module-feature-detect.js @@ -0,0 +1,37 @@ +'use strict'; + +// This tests that process.features.require_module can be used to feature-detect +// require(esm) without triggering a warning. + +require('../common'); +const { spawnSyncAndAssert } = require('../common/child_process'); + +spawnSyncAndAssert(process.execPath, [ + '--experimental-require-module', + '-p', + 'process.features.require_module', +], { + trim: true, + stdout: 'true', + stderr: '', // Should not emit warnings. +}); + +// It is now enabled by default. +spawnSyncAndAssert(process.execPath, [ + '-p', + 'process.features.require_module', +], { + trim: true, + stdout: 'true', + stderr: '', // Should not emit warnings. +}); + +spawnSyncAndAssert(process.execPath, [ + '--no-experimental-require-module', + '-p', + 'process.features.require_module', +], { + trim: true, + stdout: 'false', + stderr: '', // Should not emit warnings. +}); diff --git a/test/es-module/test-require-module-implicit.js b/test/es-module/test-require-module-implicit.js index 5b5a4a4bbb47b0..e9483ba4da1192 100644 --- a/test/es-module/test-require-module-implicit.js +++ b/test/es-module/test-require-module-implicit.js @@ -3,21 +3,8 @@ // Tests that require()ing modules without explicit module type information // warns and errors. -require('../common'); +const common = require('../common'); const assert = require('assert'); -const { isModuleNamespaceObject } = require('util/types'); - -assert.throws(() => { - require('../fixtures/es-modules/package-without-type/noext-esm'); -}, { - message: /Unexpected token 'export'/ -}); - -assert.throws(() => { - require('../fixtures/es-modules/loose.js'); -}, { - message: /Unexpected token 'export'/ -}); { // .mjs should not be matched as default extensions. @@ -28,6 +15,5 @@ assert.throws(() => { code: 'MODULE_NOT_FOUND' }); const mod = require(`${id}.mjs`); - assert.deepStrictEqual({ ...mod }, { hello: 'world' }); - assert(isModuleNamespaceObject(mod)); + common.expectRequiredModule(mod, { hello: 'world' }); } diff --git a/test/es-module/test-require-module-preload.js b/test/es-module/test-require-module-preload.js index cd51e201b63df8..0b8b79118ee8e6 100644 --- a/test/es-module/test-require-module-preload.js +++ b/test/es-module/test-require-module-preload.js @@ -1,71 +1,112 @@ 'use strict'; require('../common'); -const { spawnSyncAndExitWithoutError } = require('../common/child_process'); -const fixtures = require('../common/fixtures'); +const { spawnSyncAndAssert } = require('../common/child_process'); +const { fixturesDir } = require('../common/fixtures'); -const stderr = /ExperimentalWarning: Support for loading ES Module in require/; +function testPreload(preloadFlag) { + // Test named exports. + { + spawnSyncAndAssert( + process.execPath, + [ + '--experimental-require-module', + preloadFlag, + './es-module-loaders/module-named-exports.mjs', + './printA.js', + ], + { + cwd: fixturesDir + }, + { + stdout: 'A', + trim: true, + } + ); + } -// Test named exports. -{ - spawnSyncAndExitWithoutError( - process.execPath, - [ '--experimental-require-module', '-r', fixtures.path('../fixtures/es-module-loaders/module-named-exports.mjs') ], - { - stderr, - } - ); -} + // Test ESM that import ESM. + { + spawnSyncAndAssert( + process.execPath, + [ + '--experimental-require-module', + preloadFlag, + './es-modules/import-esm.mjs', + './printA.js', + ], + { + cwd: fixturesDir + }, + { + stdout: /^world\s+A$/, + trim: true, + } + ); + } -// Test ESM that import ESM. -{ - spawnSyncAndExitWithoutError( - process.execPath, - [ '--experimental-require-module', '-r', fixtures.path('../fixtures/es-modules/import-esm.mjs') ], - { - stderr, - stdout: 'world', - trim: true, - } - ); -} + // Test ESM that import CJS. + { + spawnSyncAndAssert( + process.execPath, + [ + '--experimental-require-module', + preloadFlag, + './es-modules/cjs-exports.mjs', + './printA.js', + ], + { + cwd: fixturesDir + }, + { + stdout: /^ok\s+A$/, + trim: true, + } + ); + } -// Test ESM that import CJS. -{ - spawnSyncAndExitWithoutError( - process.execPath, - [ '--experimental-require-module', '-r', fixtures.path('../fixtures/es-modules/cjs-exports.mjs') ], - { - stdout: 'ok', - stderr, - trim: true, - } - ); + // Test ESM that require() CJS. + // Can't use the common/index.mjs here because that checks the globals, and + // -r injects a bunch of globals. + { + spawnSyncAndAssert( + process.execPath, + [ + '--experimental-require-module', + preloadFlag, + './es-modules/require-cjs.mjs', + './printA.js', + ], + { + cwd: fixturesDir + }, + { + stdout: /^world\s+A$/, + trim: true, + } + ); + } } -// Test ESM that require() CJS. -// Can't use the common/index.mjs here because that checks the globals, and -// -r injects a bunch of globals. -{ - spawnSyncAndExitWithoutError( - process.execPath, - [ '--experimental-require-module', '-r', fixtures.path('../fixtures/es-modules/require-cjs.mjs') ], - { - stdout: 'world', - stderr, - trim: true, - } - ); -} +testPreload('--require'); +testPreload('--import'); -// Test "type": "module" and "main" field in package.json. +// Test "type": "module" and "main" field in package.json, this is only for --require because +// --import does not support extension-less preloads. { - spawnSyncAndExitWithoutError( + spawnSyncAndAssert( process.execPath, - [ '--experimental-require-module', '-r', fixtures.path('../fixtures/es-modules/package-type-module') ], + [ + '--experimental-require-module', + '--require', + './es-modules/package-type-module', + './printA.js', + ], + { + cwd: fixturesDir + }, { - stdout: 'package-type-module', - stderr, + stdout: /^package-type-module\s+A$/, trim: true, } ); diff --git a/test/es-module/test-require-module-retry-import-errored.js b/test/es-module/test-require-module-retry-import-errored.js new file mode 100644 index 00000000000000..4736087d2624a5 --- /dev/null +++ b/test/es-module/test-require-module-retry-import-errored.js @@ -0,0 +1,35 @@ +// This tests that after failing to require an ESM that contains TLA, +// retrying with import() still works, and produces consistent results. +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const { exportedReject } = require('../fixtures/es-modules/tla/export-promise.mjs'); + +assert.throws(() => { + require('../fixtures/es-modules/tla/await-export-promise.mjs'); +}, { + code: 'ERR_REQUIRE_ASYNC_MODULE' +}); + +const interval = setInterval(() => {}, 1000); // Keep the test running, because await alone doesn't. +const err = new Error('rejected'); + +const p1 = import('../fixtures/es-modules/tla/await-export-promise.mjs') + .then(common.mustNotCall(), common.mustCall((e) => { + assert.strictEqual(e, err); + })); + +const p2 = import('../fixtures/es-modules/tla/await-export-promise.mjs') + .then(common.mustNotCall(), common.mustCall((e) => { + assert.strictEqual(e, err); + })); + +const p3 = import('../fixtures/es-modules/tla/await-export-promise.mjs') + .then(common.mustNotCall(), common.mustCall((e) => { + assert.strictEqual(e, err); + })); + +exportedReject(err); + +Promise.all([p1, p2, p3]).then(common.mustCall(() => { clearInterval(interval); })); diff --git a/test/es-module/test-require-module-retry-import-evaluating.js b/test/es-module/test-require-module-retry-import-evaluating.js new file mode 100644 index 00000000000000..df70432f1136e4 --- /dev/null +++ b/test/es-module/test-require-module-retry-import-evaluating.js @@ -0,0 +1,32 @@ +// This tests that after failing to require an ESM that contains TLA, +// retrying with import() still works, and produces consistent results. +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const { exportedResolve } = require('../fixtures/es-modules/tla/export-promise.mjs'); + +assert.throws(() => { + require('../fixtures/es-modules/tla/await-export-promise.mjs'); +}, { + code: 'ERR_REQUIRE_ASYNC_MODULE' +}); + +const interval = setInterval(() => {}, 1000); // Keep the test running, because await alone doesn't. +const value = { hello: 'world' }; + +const p1 = import('../fixtures/es-modules/tla/await-export-promise.mjs').then(common.mustCall((ns) => { + assert.strictEqual(ns.default, value); +}), common.mustNotCall()); + +const p2 = import('../fixtures/es-modules/tla/await-export-promise.mjs').then(common.mustCall((ns) => { + assert.strictEqual(ns.default, value); +}), common.mustNotCall()); + +const p3 = import('../fixtures/es-modules/tla/await-export-promise.mjs').then(common.mustCall((ns) => { + assert.strictEqual(ns.default, value); +}), common.mustNotCall()); + +exportedResolve(value); + +Promise.all([p1, p2, p3]).then(common.mustCall(() => { clearInterval(interval); })); diff --git a/test/es-module/test-require-module-synchronous-rejection-handling.js b/test/es-module/test-require-module-synchronous-rejection-handling.js new file mode 100644 index 00000000000000..76a25e742bb900 --- /dev/null +++ b/test/es-module/test-require-module-synchronous-rejection-handling.js @@ -0,0 +1,13 @@ +// This synchronous rejections from require(esm) still go to the unhandled rejection +// handler. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +process.on('unhandledRejection', common.mustCall((reason, promise) => { + assert.strictEqual(reason, 'reject!'); +})); + +require('../fixtures/es-modules/synchronous-rejection-esm.js'); diff --git a/test/es-module/test-require-module-tla-retry-import-2.js b/test/es-module/test-require-module-tla-retry-import-2.js new file mode 100644 index 00000000000000..aa9c344dd398d7 --- /dev/null +++ b/test/es-module/test-require-module-tla-retry-import-2.js @@ -0,0 +1,26 @@ +// This tests that after loading a ESM with import() and then retrying +// with require(), it errors as expected, and produces consistent results. +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +let ns; +async function test() { + const newNs = await import('../fixtures/es-modules/tla/export-async.mjs'); + if (ns === undefined) { + ns = newNs; + } else { + // Check that re-evalaution is returning the same namespace. + assert.strictEqual(ns, newNs); + } + assert.strictEqual(ns.hello, 'world'); + + assert.throws(() => { + require('../fixtures/es-modules/tla/export-async.mjs'); + }, { + code: 'ERR_REQUIRE_ASYNC_MODULE' + }); +} + +// Run the test twice to check consistency after caching. +test().then(common.mustCall(test)).catch(common.mustNotCall()); diff --git a/test/es-module/test-require-module-tla-retry-import.js b/test/es-module/test-require-module-tla-retry-import.js new file mode 100644 index 00000000000000..70f918fa4f463f --- /dev/null +++ b/test/es-module/test-require-module-tla-retry-import.js @@ -0,0 +1,25 @@ +// This tests that after failing to require an ESM that contains TLA, +// retrying with import() still works, and produces consistent results. +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +let ns; +async function test() { + assert.throws(() => { + require('../fixtures/es-modules/tla/export-async.mjs'); + }, { + code: 'ERR_REQUIRE_ASYNC_MODULE' + }); + const newNs = await import('../fixtures/es-modules/tla/export-async.mjs'); + if (ns === undefined) { + ns = newNs; + } else { + // Check that re-evalaution is returning the same namespace. + assert.strictEqual(ns, newNs); + } + assert.strictEqual(ns.hello, 'world'); +} + +// Run the test twice to check consistency after caching. +test().then(common.mustCall(test)).catch(common.mustNotCall()); diff --git a/test/es-module/test-require-module-tla-retry-require.js b/test/es-module/test-require-module-tla-retry-require.js new file mode 100644 index 00000000000000..d440698fc22b52 --- /dev/null +++ b/test/es-module/test-require-module-tla-retry-require.js @@ -0,0 +1,16 @@ +// This tests that after failing to require an ESM that contains TLA, +// retrying with require() still throws, and produces consistent results. +'use strict'; +require('../common'); +const assert = require('assert'); + +assert.throws(() => { + require('../fixtures/es-modules/tla/resolved.mjs'); +}, { + code: 'ERR_REQUIRE_ASYNC_MODULE' +}); +assert.throws(() => { + require('../fixtures/es-modules/tla/resolved.mjs'); +}, { + code: 'ERR_REQUIRE_ASYNC_MODULE' +}); diff --git a/test/es-module/test-require-module-transpiled.js b/test/es-module/test-require-module-transpiled.js new file mode 100644 index 00000000000000..b927507b876370 --- /dev/null +++ b/test/es-module/test-require-module-transpiled.js @@ -0,0 +1,30 @@ +'use strict'; +require('../common'); +const { spawnSyncAndAssert } = require('../common/child_process'); +const fixtures = require('../common/fixtures'); + +// This is a minimum integration test for CJS transpiled from ESM that tries to load real ESM. + +spawnSyncAndAssert(process.execPath, [ + '--experimental-require-module', + fixtures.path('es-modules', 'transpiled-cjs-require-module', 'dist', 'import-both.cjs'), +], { + trim: true, + stdout: 'import both', +}); + +spawnSyncAndAssert(process.execPath, [ + '--experimental-require-module', + fixtures.path('es-modules', 'transpiled-cjs-require-module', 'dist', 'import-named.cjs'), +], { + trim: true, + stdout: 'import named', +}); + +spawnSyncAndAssert(process.execPath, [ + '--experimental-require-module', + fixtures.path('es-modules', 'transpiled-cjs-require-module', 'dist', 'import-default.cjs'), +], { + trim: true, + stdout: 'import default', +}); diff --git a/test/es-module/test-require-module-warning.js b/test/es-module/test-require-module-warning.js new file mode 100644 index 00000000000000..4c651efd5c0cc7 --- /dev/null +++ b/test/es-module/test-require-module-warning.js @@ -0,0 +1,43 @@ +'use strict'; + +// This checks the warning and the stack trace emitted by --trace-require-module=all. +require('../common'); +const { spawnSyncAndAssert } = require('../common/child_process'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); + +spawnSyncAndAssert(process.execPath, [ + '--trace-warnings', + '--trace-require-module=all', + fixtures.path('es-modules', 'require-module.js'), +], { + trim: true, + stderr(output) { + const lines = output.split('\n'); + assert.match( + lines[0], + /ExperimentalWarning: CommonJS module .*require-module\.js is loading ES Module .*message\.mjs/ + ); + assert.strictEqual( + lines[1], + 'Support for loading ES Module in require() is an experimental feature and might change at any time' + ); + assert.match( + lines[2], + /at require \(.*modules\/helpers:\d+:\d+\)/ + ); + assert.match( + lines[3], + /at Object\.<anonymous> \(.*require-module\.js:1:1\)/ + ); + } +}); + +spawnSyncAndAssert(process.execPath, [ + '--trace-require-module=1', + fixtures.path('es-modules', 'require-module.js'), +], { + status: 9, + trim: true, + stderr: /invalid value for --trace-require-module/ +}); diff --git a/test/es-module/test-require-module-with-detection.js b/test/es-module/test-require-module-with-detection.js new file mode 100644 index 00000000000000..cd94d5fc88e907 --- /dev/null +++ b/test/es-module/test-require-module-with-detection.js @@ -0,0 +1,14 @@ +// Flags: --experimental-require-module +'use strict'; + +const common = require('../common'); + +{ + const mod = require('../fixtures/es-modules/loose.js'); + common.expectRequiredModule(mod, { default: 'module' }); +} + +{ + const mod = require('../fixtures/es-modules/package-without-type/noext-esm'); + common.expectRequiredModule(mod, { default: 'module' }); +} diff --git a/test/es-module/test-require-module.js b/test/es-module/test-require-module.js index 631f5d731a5c86..7e05fbd4a5bf88 100644 --- a/test/es-module/test-require-module.js +++ b/test/es-module/test-require-module.js @@ -3,33 +3,23 @@ const common = require('../common'); const assert = require('assert'); -const { isModuleNamespaceObject } = require('util/types'); - -common.expectWarning( - 'ExperimentalWarning', - 'Support for loading ES Module in require() is an experimental feature ' + - 'and might change at any time' -); // Test named exports. { const mod = require('../fixtures/es-module-loaders/module-named-exports.mjs'); - assert.deepStrictEqual({ ...mod }, { foo: 'foo', bar: 'bar' }); - assert(isModuleNamespaceObject(mod)); + common.expectRequiredModule(mod, { foo: 'foo', bar: 'bar' }); } // Test ESM that import ESM. { const mod = require('../fixtures/es-modules/import-esm.mjs'); - assert.deepStrictEqual({ ...mod }, { hello: 'world' }); - assert(isModuleNamespaceObject(mod)); + common.expectRequiredModule(mod, { hello: 'world' }); } // Test ESM that import CJS. { const mod = require('../fixtures/es-modules/cjs-exports.mjs'); - assert.deepStrictEqual({ ...mod }, {}); - assert(isModuleNamespaceObject(mod)); + common.expectRequiredModule(mod, { }); } // Test ESM that require() CJS. @@ -39,24 +29,20 @@ common.expectWarning( // re-export everything from the CJS version. assert.strictEqual(common.mustCall, mjs.mustCall); assert.strictEqual(common.localIPv6Hosts, mjs.localIPv6Hosts); - assert(!isModuleNamespaceObject(common)); - assert(isModuleNamespaceObject(mjs)); } // Test "type": "module" and "main" field in package.json. // Also, test default export. { const mod = require('../fixtures/es-modules/package-type-module'); - assert.deepStrictEqual({ ...mod }, { default: 'package-type-module' }); - assert(isModuleNamespaceObject(mod)); + common.expectRequiredModule(mod, { default: 'package-type-module' }); } // Test data: import. { const mod = require('../fixtures/es-modules/data-import.mjs'); - assert.deepStrictEqual({ ...mod }, { + common.expectRequiredModule(mod, { data: { hello: 'world' }, id: 'data:text/javascript,export default %7B%20hello%3A%20%22world%22%20%7D' }); - assert(isModuleNamespaceObject(mod)); } diff --git a/test/es-module/test-require-node-modules-warning.js b/test/es-module/test-require-node-modules-warning.js new file mode 100644 index 00000000000000..bb3e38b7d92071 --- /dev/null +++ b/test/es-module/test-require-node-modules-warning.js @@ -0,0 +1,71 @@ +'use strict'; + +// This checks the warning and the stack trace emitted by +// --trace-require-module=no-node-modules. +require('../common'); +const { spawnSyncAndAssert } = require('../common/child_process'); +const fixtures = require('../common/fixtures'); + +const warningRE = /Support for loading ES Module in require\(\)/; + +// The fixtures are placed in a directory that includes "node_modules" in its name +// to check false negatives. + +// require() in non-node_modules -> esm in node_modules should warn. +spawnSyncAndAssert( + process.execPath, + [ + '--trace-require-module=no-node-modules', + fixtures.path('es-modules', 'test_node_modules', 'require-esm.js'), + ], + { + trim: true, + stderr: warningRE, + stdout: 'world', + } +); + +// require() in non-node_modules -> require() in node_modules -> esm in node_modules +// should not warn. +spawnSyncAndAssert( + process.execPath, + [ + '--trace-require-module=no-node-modules', + fixtures.path('es-modules', 'test_node_modules', 'require-require-esm.js'), + ], + { + trim: true, + stderr: '', + stdout: 'world', + } +); + +// Import in non-node_modules -> require() in node_modules -> esm in node_modules +// should not warn. +spawnSyncAndAssert( + process.execPath, + [ + '--trace-require-module=no-node-modules', + fixtures.path('es-modules', 'test_node_modules', 'import-require-esm.mjs'), + ], + { + trim: true, + stderr: '', + stdout: 'world', + } +); + +// Import in non-node_modules -> import in node_modules -> +// require() in node_modules -> esm in node_modules should not warn. +spawnSyncAndAssert( + process.execPath, + [ + '--trace-require-module=no-node-modules', + fixtures.path('es-modules', 'test_node_modules', 'import-import-require-esm.mjs'), + ], + { + trim: true, + stderr: '', + stdout: 'world', + } +); diff --git "a/test/fixtures/copy/utf/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/experimental.json" "b/test/fixtures/copy/utf/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/experimental.json" new file mode 100644 index 00000000000000..12611d2385a5a5 --- /dev/null +++ "b/test/fixtures/copy/utf/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/experimental.json" @@ -0,0 +1,3 @@ +{ + "ofLife": 42 +} diff --git a/test/fixtures/dotenv/no-final-newline-single-quotes.env b/test/fixtures/dotenv/no-final-newline-single-quotes.env new file mode 100644 index 00000000000000..4f1b37d7741e29 --- /dev/null +++ b/test/fixtures/dotenv/no-final-newline-single-quotes.env @@ -0,0 +1 @@ +BASIC='basic' \ No newline at end of file diff --git a/test/fixtures/dotenv/no-final-newline.env b/test/fixtures/dotenv/no-final-newline.env new file mode 100644 index 00000000000000..ef996552bd9c90 --- /dev/null +++ b/test/fixtures/dotenv/no-final-newline.env @@ -0,0 +1 @@ +BASIC="basic" \ No newline at end of file diff --git a/test/fixtures/errors/throw_in_eval_anonymous.js b/test/fixtures/errors/throw_in_eval_anonymous.js new file mode 100644 index 00000000000000..aa9ab6a05803bb --- /dev/null +++ b/test/fixtures/errors/throw_in_eval_anonymous.js @@ -0,0 +1,9 @@ +'use strict'; +require('../../common'); + +Error.stackTraceLimit = 1; +eval(` + + throw new Error('error in anonymous script'); + +`) diff --git a/test/fixtures/errors/throw_in_eval_anonymous.snapshot b/test/fixtures/errors/throw_in_eval_anonymous.snapshot new file mode 100644 index 00000000000000..e6f731f4d99cd7 --- /dev/null +++ b/test/fixtures/errors/throw_in_eval_anonymous.snapshot @@ -0,0 +1,8 @@ +<anonymous_script>:* + throw new Error('error in anonymous script'); + ^ + +Error: error in anonymous script + at eval (eval at <anonymous> (*throw_in_eval_anonymous.js:*:*), <anonymous>:*:*) + +Node.js * diff --git a/test/fixtures/errors/throw_in_eval_named.js b/test/fixtures/errors/throw_in_eval_named.js new file mode 100644 index 00000000000000..0d33fcf4d05dd5 --- /dev/null +++ b/test/fixtures/errors/throw_in_eval_named.js @@ -0,0 +1,9 @@ +'use strict'; +require('../../common'); + +Error.stackTraceLimit = 1; +eval(` + + throw new Error('error in named script'); + +//# sourceURL=evalscript.js`) diff --git a/test/fixtures/errors/throw_in_eval_named.snapshot b/test/fixtures/errors/throw_in_eval_named.snapshot new file mode 100644 index 00000000000000..3be4c3584735fb --- /dev/null +++ b/test/fixtures/errors/throw_in_eval_named.snapshot @@ -0,0 +1,8 @@ +evalscript.js:* + throw new Error('error in named script'); + ^ + +Error: error in named script + at eval (evalscript.js:*:*) + +Node.js * diff --git a/test/fixtures/es-module-loaders/builtin-named-exports-loader.mjs b/test/fixtures/es-module-loaders/builtin-named-exports-loader.mjs index fca31c585a6ea9..f1b770d04f4f61 100644 --- a/test/fixtures/es-module-loaders/builtin-named-exports-loader.mjs +++ b/test/fixtures/es-module-loaders/builtin-named-exports-loader.mjs @@ -28,7 +28,7 @@ export function load(url, context, next) { source: generateBuiltinModule(urlObj.pathname), format: 'commonjs', }; - } else if (context.format === 'commonjs') { + } else if (context.format === undefined || context.format === null || context.format === 'commonjs') { return { shortCircuit: true, source: readFileSync(new URL(url)), diff --git a/test/fixtures/es-module-loaders/loader-with-custom-condition.mjs b/test/fixtures/es-module-loaders/loader-with-custom-condition.mjs index 3aefed51d57d3e..90c55fa576bb3c 100644 --- a/test/fixtures/es-module-loaders/loader-with-custom-condition.mjs +++ b/test/fixtures/es-module-loaders/loader-with-custom-condition.mjs @@ -5,6 +5,7 @@ export async function resolve(specifier, context, defaultResolve) { deepStrictEqual([...context.conditions].sort(), [ 'import', + 'module-sync', 'node', 'node-addons', ]); diff --git a/test/fixtures/es-modules/cjs-esm-esm-cycle/a.mjs b/test/fixtures/es-modules/cjs-esm-esm-cycle/a.mjs new file mode 100644 index 00000000000000..798e86506da2a9 --- /dev/null +++ b/test/fixtures/es-modules/cjs-esm-esm-cycle/a.mjs @@ -0,0 +1 @@ +export { b } from './b.mjs'; diff --git a/test/fixtures/es-modules/cjs-esm-esm-cycle/b.mjs b/test/fixtures/es-modules/cjs-esm-esm-cycle/b.mjs new file mode 100644 index 00000000000000..9e909cd6856455 --- /dev/null +++ b/test/fixtures/es-modules/cjs-esm-esm-cycle/b.mjs @@ -0,0 +1,2 @@ +import './a.mjs' +export const b = 5; diff --git a/test/fixtures/es-modules/cjs-esm-esm-cycle/c.cjs b/test/fixtures/es-modules/cjs-esm-esm-cycle/c.cjs new file mode 100644 index 00000000000000..f9361ecd59d11e --- /dev/null +++ b/test/fixtures/es-modules/cjs-esm-esm-cycle/c.cjs @@ -0,0 +1 @@ +module.exports = require('./a.mjs'); diff --git a/test/fixtures/es-modules/export-es-module-2.mjs b/test/fixtures/es-modules/export-es-module-2.mjs new file mode 100644 index 00000000000000..81f61095ce75af --- /dev/null +++ b/test/fixtures/es-modules/export-es-module-2.mjs @@ -0,0 +1,2 @@ +export const __esModule = false; +export default { hello: 'world' }; diff --git a/test/fixtures/es-modules/export-es-module.mjs b/test/fixtures/es-modules/export-es-module.mjs new file mode 100644 index 00000000000000..a85dea6c5e3d00 --- /dev/null +++ b/test/fixtures/es-modules/export-es-module.mjs @@ -0,0 +1,2 @@ +export const __esModule = 'test'; +export default { hello: 'world' }; diff --git a/test/fixtures/es-modules/loose.js b/test/fixtures/es-modules/loose.js index 69147a3b8ca027..c0d85f7eab9a2b 100644 --- a/test/fixtures/es-modules/loose.js +++ b/test/fixtures/es-modules/loose.js @@ -1,3 +1,5 @@ -// This file can be run or imported only if `--experimental-default-type=module` is set. +// This file can be run or imported only if `--experimental-default-type=module` is set +// or `--experimental-detect-module` is not disabled. If it's loaded by +// require(), then `--experimental-require-module` must not be disabled. export default 'module'; console.log('executed'); diff --git a/test/fixtures/es-modules/module-condition/dynamic_import.js b/test/fixtures/es-modules/module-condition/dynamic_import.js new file mode 100644 index 00000000000000..7c4cd42d7037f4 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/dynamic_import.js @@ -0,0 +1,5 @@ +function load(id) { + return import(id); +} + +export { load as import }; diff --git a/test/fixtures/es-modules/module-condition/import.mjs b/test/fixtures/es-modules/module-condition/import.mjs new file mode 100644 index 00000000000000..ae12fbf1429424 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/import.mjs @@ -0,0 +1,7 @@ +export { resolved as import_module_require } from 'import-module-require'; +export { resolved as module_and_import } from 'module-and-import'; +export { resolved as module_and_require } from 'module-and-require'; +export { resolved as module_import_require } from 'module-import-require'; +export { resolved as module_only } from 'module-only'; +export { resolved as module_require_import } from 'module-require-import'; +export { resolved as require_module_import } from 'require-module-import'; diff --git a/test/fixtures/es-modules/module-condition/node_modules/import-module-require/import.js b/test/fixtures/es-modules/module-condition/node_modules/import-module-require/import.js new file mode 100644 index 00000000000000..58f10e20bf3041 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/import-module-require/import.js @@ -0,0 +1 @@ +export const resolved = 'import'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/import-module-require/module.js b/test/fixtures/es-modules/module-condition/node_modules/import-module-require/module.js new file mode 100644 index 00000000000000..136ec680a7e3a8 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/import-module-require/module.js @@ -0,0 +1 @@ +export const resolved = 'module'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/import-module-require/package.json b/test/fixtures/es-modules/module-condition/node_modules/import-module-require/package.json new file mode 100644 index 00000000000000..46a096c2e7396d --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/import-module-require/package.json @@ -0,0 +1,11 @@ +{ + "type": "module", + "exports": { + "node": { + "import": "./import.js", + "module-sync": "./module.js", + "require": "./require.cjs" + }, + "default": "./module.js" + } +} \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/import-module-require/require.cjs b/test/fixtures/es-modules/module-condition/node_modules/import-module-require/require.cjs new file mode 100644 index 00000000000000..6dd2c2ec97abd6 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/import-module-require/require.cjs @@ -0,0 +1 @@ +exports.resolved = 'require'; diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-and-import/import.js b/test/fixtures/es-modules/module-condition/node_modules/module-and-import/import.js new file mode 100644 index 00000000000000..58f10e20bf3041 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-and-import/import.js @@ -0,0 +1 @@ +export const resolved = 'import'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-and-import/module.js b/test/fixtures/es-modules/module-condition/node_modules/module-and-import/module.js new file mode 100644 index 00000000000000..136ec680a7e3a8 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-and-import/module.js @@ -0,0 +1 @@ +export const resolved = 'module'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-and-import/package.json b/test/fixtures/es-modules/module-condition/node_modules/module-and-import/package.json new file mode 100644 index 00000000000000..4425147f7dab2c --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-and-import/package.json @@ -0,0 +1,10 @@ +{ + "type": "module", + "exports": { + "node": { + "module-sync": "./module.js", + "import": "./import.js" + }, + "default": "./module.js" + } +} diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-and-require/module.js b/test/fixtures/es-modules/module-condition/node_modules/module-and-require/module.js new file mode 100644 index 00000000000000..136ec680a7e3a8 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-and-require/module.js @@ -0,0 +1 @@ +export const resolved = 'module'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-and-require/package.json b/test/fixtures/es-modules/module-condition/node_modules/module-and-require/package.json new file mode 100644 index 00000000000000..57598fb5014bb0 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-and-require/package.json @@ -0,0 +1,10 @@ +{ + "type": "module", + "exports": { + "node": { + "module-sync": "./module.js", + "require": "./require.cjs" + }, + "default": "./module.js" + } +} \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-and-require/require.cjs b/test/fixtures/es-modules/module-condition/node_modules/module-and-require/require.cjs new file mode 100644 index 00000000000000..6dd2c2ec97abd6 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-and-require/require.cjs @@ -0,0 +1 @@ +exports.resolved = 'require'; diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-import-require/import.js b/test/fixtures/es-modules/module-condition/node_modules/module-import-require/import.js new file mode 100644 index 00000000000000..58f10e20bf3041 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-import-require/import.js @@ -0,0 +1 @@ +export const resolved = 'import'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-import-require/module.js b/test/fixtures/es-modules/module-condition/node_modules/module-import-require/module.js new file mode 100644 index 00000000000000..136ec680a7e3a8 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-import-require/module.js @@ -0,0 +1 @@ +export const resolved = 'module'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-import-require/package.json b/test/fixtures/es-modules/module-condition/node_modules/module-import-require/package.json new file mode 100644 index 00000000000000..bbc8c0d286e656 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-import-require/package.json @@ -0,0 +1,11 @@ +{ + "type": "module", + "exports": { + "node": { + "module-sync": "./module.js", + "import": "./import.js", + "require": "./require.cjs" + }, + "default": "./module.js" + } +} \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-import-require/require.cjs b/test/fixtures/es-modules/module-condition/node_modules/module-import-require/require.cjs new file mode 100644 index 00000000000000..6dd2c2ec97abd6 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-import-require/require.cjs @@ -0,0 +1 @@ +exports.resolved = 'require'; diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-only/module.js b/test/fixtures/es-modules/module-condition/node_modules/module-only/module.js new file mode 100644 index 00000000000000..136ec680a7e3a8 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-only/module.js @@ -0,0 +1 @@ +export const resolved = 'module'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-only/package.json b/test/fixtures/es-modules/module-condition/node_modules/module-only/package.json new file mode 100644 index 00000000000000..2d29bbdf325e1a --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-only/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "exports": { + "module-sync": "./module.js" + } +} diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-require-import/import.js b/test/fixtures/es-modules/module-condition/node_modules/module-require-import/import.js new file mode 100644 index 00000000000000..58f10e20bf3041 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-require-import/import.js @@ -0,0 +1 @@ +export const resolved = 'import'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-require-import/module.js b/test/fixtures/es-modules/module-condition/node_modules/module-require-import/module.js new file mode 100644 index 00000000000000..136ec680a7e3a8 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-require-import/module.js @@ -0,0 +1 @@ +export const resolved = 'module'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-require-import/package.json b/test/fixtures/es-modules/module-condition/node_modules/module-require-import/package.json new file mode 100644 index 00000000000000..1490f04b27f9ad --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-require-import/package.json @@ -0,0 +1,11 @@ +{ + "type": "module", + "exports": { + "node": { + "module-sync": "./module.js", + "require": "./require.cjs", + "import": "./import.js" + }, + "default": "./module.js" + } +} diff --git a/test/fixtures/es-modules/module-condition/node_modules/module-require-import/require.cjs b/test/fixtures/es-modules/module-condition/node_modules/module-require-import/require.cjs new file mode 100644 index 00000000000000..f5bf7ed32992e1 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/module-require-import/require.cjs @@ -0,0 +1 @@ +export const resolved = 'require'; diff --git a/test/fixtures/es-modules/module-condition/node_modules/require-module-import/import.js b/test/fixtures/es-modules/module-condition/node_modules/require-module-import/import.js new file mode 100644 index 00000000000000..58f10e20bf3041 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/require-module-import/import.js @@ -0,0 +1 @@ +export const resolved = 'import'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/require-module-import/module.js b/test/fixtures/es-modules/module-condition/node_modules/require-module-import/module.js new file mode 100644 index 00000000000000..136ec680a7e3a8 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/require-module-import/module.js @@ -0,0 +1 @@ +export const resolved = 'module'; \ No newline at end of file diff --git a/test/fixtures/es-modules/module-condition/node_modules/require-module-import/package.json b/test/fixtures/es-modules/module-condition/node_modules/require-module-import/package.json new file mode 100644 index 00000000000000..b62f96c997ecb7 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/require-module-import/package.json @@ -0,0 +1,11 @@ +{ + "type": "module", + "exports": { + "node": { + "require": "./require.cjs", + "module-sync": "./module.js", + "import": "./module.js" + }, + "default": "./module.js" + } +} diff --git a/test/fixtures/es-modules/module-condition/node_modules/require-module-import/require.cjs b/test/fixtures/es-modules/module-condition/node_modules/require-module-import/require.cjs new file mode 100644 index 00000000000000..6dd2c2ec97abd6 --- /dev/null +++ b/test/fixtures/es-modules/module-condition/node_modules/require-module-import/require.cjs @@ -0,0 +1 @@ +exports.resolved = 'require'; diff --git a/test/fixtures/es-modules/module-condition/require.cjs b/test/fixtures/es-modules/module-condition/require.cjs new file mode 100644 index 00000000000000..2457758a98f32b --- /dev/null +++ b/test/fixtures/es-modules/module-condition/require.cjs @@ -0,0 +1 @@ +exports.require = require; diff --git a/test/fixtures/es-modules/reference-error-esm.js b/test/fixtures/es-modules/reference-error-esm.js new file mode 100644 index 00000000000000..baf773c78970ad --- /dev/null +++ b/test/fixtures/es-modules/reference-error-esm.js @@ -0,0 +1,5 @@ +// This module is invalid in both ESM and CJS, because +// 'exports' are not defined in ESM, while require cannot be +// redeclared in CJS. +Object.defineProperty(exports, "__esModule", { value: true }); +const require = () => {}; diff --git a/test/fixtures/es-modules/require-module.js b/test/fixtures/es-modules/require-module.js new file mode 100644 index 00000000000000..5a36590fc6171f --- /dev/null +++ b/test/fixtures/es-modules/require-module.js @@ -0,0 +1 @@ +require('./message.mjs'); diff --git a/test/fixtures/es-modules/runtime-error-esm.js b/test/fixtures/es-modules/runtime-error-esm.js new file mode 100644 index 00000000000000..1df3cc469adbfc --- /dev/null +++ b/test/fixtures/es-modules/runtime-error-esm.js @@ -0,0 +1,2 @@ +import 'node:fs'; // Forces it to be recognized as ESM. +throw new Error('hello'); diff --git a/test/fixtures/es-modules/synchronous-rejection-esm.js b/test/fixtures/es-modules/synchronous-rejection-esm.js new file mode 100644 index 00000000000000..34d066037e2140 --- /dev/null +++ b/test/fixtures/es-modules/synchronous-rejection-esm.js @@ -0,0 +1,2 @@ +import 'node:fs'; // Forces it to be recognized as ESM. +Promise.reject('reject!'); diff --git a/test/fixtures/es-modules/test_node_modules/import-import-require-esm.mjs b/test/fixtures/es-modules/test_node_modules/import-import-require-esm.mjs new file mode 100644 index 00000000000000..d470088c38caee --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/import-import-require-esm.mjs @@ -0,0 +1,2 @@ +import mod from 'import-require-esm'; +console.log(mod.hello); diff --git a/test/fixtures/es-modules/test_node_modules/import-require-esm.mjs b/test/fixtures/es-modules/test_node_modules/import-require-esm.mjs new file mode 100644 index 00000000000000..2ad346de9e841c --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/import-require-esm.mjs @@ -0,0 +1,2 @@ +import mod from 'require-esm'; +console.log(mod.hello); diff --git a/test/fixtures/es-modules/test_node_modules/node_modules/esm/index.js b/test/fixtures/es-modules/test_node_modules/node_modules/esm/index.js new file mode 100644 index 00000000000000..35f468bf4856d8 --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/node_modules/esm/index.js @@ -0,0 +1 @@ +export const hello = 'world'; diff --git a/test/fixtures/es-modules/test_node_modules/node_modules/esm/package.json b/test/fixtures/es-modules/test_node_modules/node_modules/esm/package.json new file mode 100644 index 00000000000000..07aec65d5a4f31 --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/node_modules/esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "main": "index.js" +} diff --git a/test/fixtures/es-modules/test_node_modules/node_modules/import-require-esm/index.js b/test/fixtures/es-modules/test_node_modules/node_modules/import-require-esm/index.js new file mode 100644 index 00000000000000..918bb5d5597e34 --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/node_modules/import-require-esm/index.js @@ -0,0 +1,2 @@ +import mod from 'require-esm'; +export default mod; diff --git a/test/fixtures/es-modules/test_node_modules/node_modules/import-require-esm/package.json b/test/fixtures/es-modules/test_node_modules/node_modules/import-require-esm/package.json new file mode 100644 index 00000000000000..07aec65d5a4f31 --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/node_modules/import-require-esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "main": "index.js" +} diff --git a/test/fixtures/es-modules/test_node_modules/node_modules/require-esm/index.js b/test/fixtures/es-modules/test_node_modules/node_modules/require-esm/index.js new file mode 100644 index 00000000000000..ca6f0c264ad1fc --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/node_modules/require-esm/index.js @@ -0,0 +1,2 @@ +module.exports = require('esm'); + diff --git a/test/fixtures/es-modules/test_node_modules/require-esm.js b/test/fixtures/es-modules/test_node_modules/require-esm.js new file mode 100644 index 00000000000000..60ad3f7fff60c6 --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/require-esm.js @@ -0,0 +1,2 @@ +const { hello } = require('esm'); +console.log(hello); diff --git a/test/fixtures/es-modules/test_node_modules/require-require-esm.js b/test/fixtures/es-modules/test_node_modules/require-require-esm.js new file mode 100644 index 00000000000000..9fe255dce258a6 --- /dev/null +++ b/test/fixtures/es-modules/test_node_modules/require-require-esm.js @@ -0,0 +1,2 @@ +const { hello } = require('require-esm'); +console.log(hello); diff --git a/test/fixtures/es-modules/tla/await-export-promise.mjs b/test/fixtures/es-modules/tla/await-export-promise.mjs new file mode 100644 index 00000000000000..0129793e42b54a --- /dev/null +++ b/test/fixtures/es-modules/tla/await-export-promise.mjs @@ -0,0 +1,4 @@ +import promise from './export-promise.mjs'; +let result; +result = await promise; +export default result; diff --git a/test/fixtures/es-modules/tla/export-async.mjs b/test/fixtures/es-modules/tla/export-async.mjs new file mode 100644 index 00000000000000..b6de9a5a5f68e9 --- /dev/null +++ b/test/fixtures/es-modules/tla/export-async.mjs @@ -0,0 +1,2 @@ +let hello = await Promise.resolve('world'); +export { hello }; diff --git a/test/fixtures/es-modules/tla/export-promise.mjs b/test/fixtures/es-modules/tla/export-promise.mjs new file mode 100644 index 00000000000000..74864d232e3c35 --- /dev/null +++ b/test/fixtures/es-modules/tla/export-promise.mjs @@ -0,0 +1,8 @@ +let exportedResolve; +let exportedReject; +const promise = new Promise((resolve, reject) => { + exportedResolve = resolve; + exportedReject = reject; +}); +export default promise; +export { exportedResolve, exportedReject }; diff --git a/test/fixtures/es-modules/tla/unresolved.js b/test/fixtures/es-modules/tla/unresolved.js new file mode 100644 index 00000000000000..231a8cd634825c --- /dev/null +++ b/test/fixtures/es-modules/tla/unresolved.js @@ -0,0 +1 @@ +await new Promise(() => {}); diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-both.cjs b/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-both.cjs new file mode 100644 index 00000000000000..62c00a7f046304 --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-both.cjs @@ -0,0 +1,27 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var logger_1 = __importStar(require("logger")); +(0, logger_1.log)(new logger_1.default(), 'import both'); diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-default.cjs b/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-default.cjs new file mode 100644 index 00000000000000..9880e20de5c91a --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-default.cjs @@ -0,0 +1,7 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var logger_1 = __importDefault(require("logger")); +new logger_1.default().log('import default'); diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-named.cjs b/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-named.cjs new file mode 100644 index 00000000000000..9daf6c92ff566d --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/dist/import-named.cjs @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var logger_1 = require("logger"); +(0, logger_1.log)(console, 'import named'); diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/node_modules/logger/logger.mjs b/test/fixtures/es-modules/transpiled-cjs-require-module/node_modules/logger/logger.mjs new file mode 100644 index 00000000000000..abcac43fff428f --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/node_modules/logger/logger.mjs @@ -0,0 +1,2 @@ +export default class Logger { log(val) { console.log(val); } } +export function log(logger, val) { logger.log(val) }; diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/node_modules/logger/package.json b/test/fixtures/es-modules/transpiled-cjs-require-module/node_modules/logger/package.json new file mode 100644 index 00000000000000..56c237df953d7a --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/node_modules/logger/package.json @@ -0,0 +1,4 @@ +{ + "name": "logger", + "main": "logger.mjs" +} \ No newline at end of file diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-both.mjs b/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-both.mjs new file mode 100644 index 00000000000000..7773ccb2bc1d20 --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-both.mjs @@ -0,0 +1,2 @@ +import Logger, { log } from 'logger'; +log(new Logger(), 'import both'); diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-default.mjs b/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-default.mjs new file mode 100644 index 00000000000000..16c123bbccb0f9 --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-default.mjs @@ -0,0 +1,2 @@ +import Logger from 'logger'; +new Logger().log('import default'); diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-named.mjs b/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-named.mjs new file mode 100644 index 00000000000000..489d0886e542f7 --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/src/import-named.mjs @@ -0,0 +1,2 @@ +import { log } from 'logger'; +log(console, 'import named'); diff --git a/test/fixtures/es-modules/transpiled-cjs-require-module/transpile.cjs b/test/fixtures/es-modules/transpiled-cjs-require-module/transpile.cjs new file mode 100644 index 00000000000000..da9978164b7c6b --- /dev/null +++ b/test/fixtures/es-modules/transpiled-cjs-require-module/transpile.cjs @@ -0,0 +1,23 @@ +'use strict'; + +// This script is used to transpile ESM fixtures from the src/ directory +// to CJS modules in dist/. The transpiled CJS files are used to test +// integration of transpiled CJS modules loading real ESM. + +const { readFileSync, writeFileSync, readdirSync } = require('node:fs'); + +// We use typescript.js because it's already in the code base as a fixture. +// Most ecosystem tools follow a similar pattern, and this produces a bare +// minimum integration test for existing patterns. +const ts = require('../../snapshot/typescript'); +const { join } = require('node:path'); +const sourceDir = join(__dirname, 'src'); +const files = readdirSync(sourceDir); +for (const filename of files) { + const filePath = join(sourceDir, filename); + const source = readFileSync(filePath, 'utf8'); + const { outputText } = ts.transpileModule(source, { + compilerOptions: { module: ts.ModuleKind.NodeNext } + }); + writeFileSync(join(__dirname, 'dist', filename.replace('.mjs', '.cjs')), outputText, 'utf8'); +} diff --git a/test/message/eval_messages.js b/test/fixtures/eval/eval_messages.js similarity index 98% rename from test/message/eval_messages.js rename to test/fixtures/eval/eval_messages.js index 69dcbd6efa23a7..171bff06b8d6e9 100644 --- a/test/message/eval_messages.js +++ b/test/fixtures/eval/eval_messages.js @@ -21,7 +21,7 @@ 'use strict'; -require('../common'); +require('../../common'); const spawn = require('child_process').spawn; diff --git a/test/fixtures/eval/eval_messages.snapshot b/test/fixtures/eval/eval_messages.snapshot new file mode 100644 index 00000000000000..6a37ad22634617 --- /dev/null +++ b/test/fixtures/eval/eval_messages.snapshot @@ -0,0 +1,76 @@ +[eval] +[eval]:1 +with(this){__filename} +^^^^ + +SyntaxError: Strict mode code may not include a with statement + + + + + + + +Node.js * +42 +42 +[eval]:1 +throw new Error("hello") +^ + +Error: hello + + + + + + + + +Node.js * +[eval]:1 +throw new Error("hello") +^ + +Error: hello + + + + + + + + +Node.js * +100 +[eval]:1 +var x = 100; y = x; + ^ + +ReferenceError: y is not defined + + + + + + + + +Node.js * + +[eval]:1 +var ______________________________________________; throw 10 + ^ +10 +(Use `node --trace-uncaught ...` to show where the exception was thrown) + +Node.js * + +[eval]:1 +var ______________________________________________; throw 10 + ^ +10 +(Use `node --trace-uncaught ...` to show where the exception was thrown) + +Node.js * +done diff --git a/test/message/stdin_messages.js b/test/fixtures/eval/stdin_messages.js similarity index 98% rename from test/message/stdin_messages.js rename to test/fixtures/eval/stdin_messages.js index 79475bd4d217b6..874b473be38e00 100644 --- a/test/message/stdin_messages.js +++ b/test/fixtures/eval/stdin_messages.js @@ -21,7 +21,7 @@ 'use strict'; -require('../common'); +require('../../common'); const spawn = require('child_process').spawn; diff --git a/test/fixtures/eval/stdin_messages.snapshot b/test/fixtures/eval/stdin_messages.snapshot new file mode 100644 index 00000000000000..3c03bd64072061 --- /dev/null +++ b/test/fixtures/eval/stdin_messages.snapshot @@ -0,0 +1,89 @@ +[stdin] +[stdin]:1 +with(this){__filename} +^^^^ + +SyntaxError: Strict mode code may not include a with statement + + + + + + + + + + + +Node.js * +42 +42 +[stdin]:1 +throw new Error("hello") +^ + +Error: hello + + + + + + + + + + + +Node.js * +[stdin]:1 +throw new Error("hello") +^ + +Error: hello + + + + + + + + + + + +Node.js * +100 +[stdin]:1 +let x = 100; y = x; + ^ + +ReferenceError: y is not defined + + + + + + + + + + + +Node.js * + +[stdin]:1 +let ______________________________________________; throw 10 + ^ +10 +(Use `node --trace-uncaught ...` to show where the exception was thrown) + +Node.js * + +[stdin]:1 +let ______________________________________________; throw 10 + ^ +10 +(Use `node --trace-uncaught ...` to show where the exception was thrown) + +Node.js * +done diff --git a/test/fixtures/module-require/relative/subdir/relative-subdir.js b/test/fixtures/module-require/relative/subdir/relative-subdir.js new file mode 100644 index 00000000000000..34eb71b3c6ca39 --- /dev/null +++ b/test/fixtures/module-require/relative/subdir/relative-subdir.js @@ -0,0 +1 @@ +exports.value = 'relative subdir'; diff --git a/test/fixtures/node_modules/interop-cjs-esm/false-esm.js b/test/fixtures/node_modules/interop-cjs-esm/false-esm.js new file mode 100644 index 00000000000000..44dd289dd080f4 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/false-esm.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-false-esm'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/false.js b/test/fixtures/node_modules/interop-cjs-esm/false.js new file mode 100644 index 00000000000000..63d896a4736bd6 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/false.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-false'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/fauxesmdefault-esm.js b/test/fixtures/node_modules/interop-cjs-esm/fauxesmdefault-esm.js new file mode 100644 index 00000000000000..3b87be4bd0c0bc --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/fauxesmdefault-esm.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-fauxesmdefault-esm'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/fauxesmdefault.js b/test/fixtures/node_modules/interop-cjs-esm/fauxesmdefault.js new file mode 100644 index 00000000000000..325fa352e16a81 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/fauxesmdefault.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-fauxesmdefault'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/fauxesmmixed-esm.js b/test/fixtures/node_modules/interop-cjs-esm/fauxesmmixed-esm.js new file mode 100644 index 00000000000000..9390b24f8d8bf4 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/fauxesmmixed-esm.js @@ -0,0 +1,4 @@ +import dep from 'interop-cjsdep-fauxesmmixed-esm'; +export default dep; +export { dep as 'module.exports' } + diff --git a/test/fixtures/node_modules/interop-cjs-esm/fauxesmmixed.js b/test/fixtures/node_modules/interop-cjs-esm/fauxesmmixed.js new file mode 100644 index 00000000000000..d649233736c31c --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/fauxesmmixed.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-fauxesmmixed'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/fauxesmnamed-esm.js b/test/fixtures/node_modules/interop-cjs-esm/fauxesmnamed-esm.js new file mode 100644 index 00000000000000..6ba7e266bc57bd --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/fauxesmnamed-esm.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-fauxesmnamed-esm'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/fauxesmnamed.js b/test/fixtures/node_modules/interop-cjs-esm/fauxesmnamed.js new file mode 100644 index 00000000000000..7c6c6bfc14adcd --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/fauxesmnamed.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-fauxesmnamed'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/object-esm.js b/test/fixtures/node_modules/interop-cjs-esm/object-esm.js new file mode 100644 index 00000000000000..0a4e4283625e5b --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/object-esm.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-object-esm'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/object.js b/test/fixtures/node_modules/interop-cjs-esm/object.js new file mode 100644 index 00000000000000..08ef3ba4f96f3d --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/object.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-object'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/package.json b/test/fixtures/node_modules/interop-cjs-esm/package.json new file mode 100644 index 00000000000000..95315e635e7c30 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/package.json @@ -0,0 +1,17 @@ +{ + "type": "module", + "exports": { + "./false-esm": "./false-esm.js", + "./false": "./false.js", + "./fauxesmdefault-esm": "./fauxesmdefault-esm.js", + "./fauxesmdefault": "./fauxesmdefault.js", + "./fauxesmmixed-esm": "./fauxesmmixed-esm.js", + "./fauxesmmixed": "./fauxesmmixed.js", + "./fauxesmnamed-esm": "./fauxesmnamed-esm.js", + "./fauxesmnamed": "./fauxesmnamed.js", + "./object-esm": "./object-esm.js", + "./object": "./object.js", + "./string-esm": "./string-esm.js", + "./string": "./string.js" + } +} diff --git a/test/fixtures/node_modules/interop-cjs-esm/string-esm.js b/test/fixtures/node_modules/interop-cjs-esm/string-esm.js new file mode 100644 index 00000000000000..6072f01bc95eed --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/string-esm.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-string-esm'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs-esm/string.js b/test/fixtures/node_modules/interop-cjs-esm/string.js new file mode 100644 index 00000000000000..74297e8eee8d39 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs-esm/string.js @@ -0,0 +1,3 @@ +import dep from 'interop-cjsdep-string'; +export default dep; +export { dep as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjs/false-esm.js b/test/fixtures/node_modules/interop-cjs/false-esm.js new file mode 100644 index 00000000000000..eeb934952b51de --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/false-esm.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-false-esm'); diff --git a/test/fixtures/node_modules/interop-cjs/false.js b/test/fixtures/node_modules/interop-cjs/false.js new file mode 100644 index 00000000000000..459ccbeee45944 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/false.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-false'); diff --git a/test/fixtures/node_modules/interop-cjs/fauxesmdefault-esm.js b/test/fixtures/node_modules/interop-cjs/fauxesmdefault-esm.js new file mode 100644 index 00000000000000..45e91e3c3c80da --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/fauxesmdefault-esm.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-fauxesmdefault-esm'); diff --git a/test/fixtures/node_modules/interop-cjs/fauxesmdefault.js b/test/fixtures/node_modules/interop-cjs/fauxesmdefault.js new file mode 100644 index 00000000000000..c6e5176f528416 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/fauxesmdefault.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-fauxesmdefault'); diff --git a/test/fixtures/node_modules/interop-cjs/fauxesmmixed-esm.js b/test/fixtures/node_modules/interop-cjs/fauxesmmixed-esm.js new file mode 100644 index 00000000000000..6b16d657b0e42d --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/fauxesmmixed-esm.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-fauxesmmixed-esm'); diff --git a/test/fixtures/node_modules/interop-cjs/fauxesmmixed.js b/test/fixtures/node_modules/interop-cjs/fauxesmmixed.js new file mode 100644 index 00000000000000..8897d00fb3e563 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/fauxesmmixed.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-fauxesmmixed'); diff --git a/test/fixtures/node_modules/interop-cjs/fauxesmnamed-esm.js b/test/fixtures/node_modules/interop-cjs/fauxesmnamed-esm.js new file mode 100644 index 00000000000000..67ed05bfa7f6d4 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/fauxesmnamed-esm.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-fauxesmnamed-esm'); diff --git a/test/fixtures/node_modules/interop-cjs/fauxesmnamed.js b/test/fixtures/node_modules/interop-cjs/fauxesmnamed.js new file mode 100644 index 00000000000000..092ec333260157 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/fauxesmnamed.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-fauxesmnamed'); diff --git a/test/fixtures/node_modules/interop-cjs/object-esm.js b/test/fixtures/node_modules/interop-cjs/object-esm.js new file mode 100644 index 00000000000000..f0e0d3fa3dad07 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/object-esm.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-object-esm'); diff --git a/test/fixtures/node_modules/interop-cjs/object.js b/test/fixtures/node_modules/interop-cjs/object.js new file mode 100644 index 00000000000000..ff2d57e11b824f --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/object.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-object'); diff --git a/test/fixtures/node_modules/interop-cjs/package.json b/test/fixtures/node_modules/interop-cjs/package.json new file mode 100644 index 00000000000000..9e8c0b3f59712c --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/package.json @@ -0,0 +1,17 @@ +{ + "type": "commonjs", + "exports": { + "./false-esm": "./false-esm.js", + "./false": "./false.js", + "./fauxesmdefault-esm": "./fauxesmdefault-esm.js", + "./fauxesmdefault": "./fauxesmdefault.js", + "./fauxesmmixed-esm": "./fauxesmmixed-esm.js", + "./fauxesmmixed": "./fauxesmmixed.js", + "./fauxesmnamed-esm": "./fauxesmnamed-esm.js", + "./fauxesmnamed": "./fauxesmnamed.js", + "./object-esm": "./object-esm.js", + "./object": "./object.js", + "./string-esm": "./string-esm.js", + "./string": "./string.js" + } +} diff --git a/test/fixtures/node_modules/interop-cjs/string-esm.js b/test/fixtures/node_modules/interop-cjs/string-esm.js new file mode 100644 index 00000000000000..bdd23a1b1db4da --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/string-esm.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-string-esm'); diff --git a/test/fixtures/node_modules/interop-cjs/string.js b/test/fixtures/node_modules/interop-cjs/string.js new file mode 100644 index 00000000000000..65010183f2f76b --- /dev/null +++ b/test/fixtures/node_modules/interop-cjs/string.js @@ -0,0 +1 @@ +module.exports = require('interop-cjsdep-string'); diff --git a/test/fixtures/node_modules/interop-cjsdep-false-esm/dep.js b/test/fixtures/node_modules/interop-cjsdep-false-esm/dep.js new file mode 100644 index 00000000000000..7ef62281a771cb --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-false-esm/dep.js @@ -0,0 +1,3 @@ +const output = false; +export default output; +export { output as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjsdep-false-esm/package.json b/test/fixtures/node_modules/interop-cjsdep-false-esm/package.json new file mode 100644 index 00000000000000..f5b94a85497063 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-false-esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-false/dep.js b/test/fixtures/node_modules/interop-cjsdep-false/dep.js new file mode 100644 index 00000000000000..a5d30209bd0bbc --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-false/dep.js @@ -0,0 +1 @@ +module.exports = false; diff --git a/test/fixtures/node_modules/interop-cjsdep-false/package.json b/test/fixtures/node_modules/interop-cjsdep-false/package.json new file mode 100644 index 00000000000000..e6fc9863573e3d --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-false/package.json @@ -0,0 +1,4 @@ +{ + "type": "commonjs", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault-esm/dep.js b/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault-esm/dep.js new file mode 100644 index 00000000000000..731bf61547a427 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault-esm/dep.js @@ -0,0 +1,7 @@ +const exports = {}; +Object.defineProperty(exports, '__esModule', { value: true }); +exports.default = 'faux esm default'; + +export default exports; + +export { exports as 'module.exports' } \ No newline at end of file diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault-esm/package.json b/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault-esm/package.json new file mode 100644 index 00000000000000..f5b94a85497063 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault-esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault/dep.js b/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault/dep.js new file mode 100644 index 00000000000000..5cd0b37b27d054 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault/dep.js @@ -0,0 +1,2 @@ +Object.defineProperty(exports, '__esModule', { value: true }); +exports.default = 'faux esm default'; diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault/package.json b/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault/package.json new file mode 100644 index 00000000000000..e6fc9863573e3d --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmdefault/package.json @@ -0,0 +1,4 @@ +{ + "type": "commonjs", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed-esm/dep.js b/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed-esm/dep.js new file mode 100644 index 00000000000000..0eef418de77ea7 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed-esm/dep.js @@ -0,0 +1,9 @@ +const exports = {}; +Object.defineProperty(exports, '__esModule', { value: true }); +exports.default = 'faux esm default'; +exports.a = 'faux esm a'; +exports.b = 'faux esm b'; + +export default exports; + +export { exports as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed-esm/package.json b/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed-esm/package.json new file mode 100644 index 00000000000000..f5b94a85497063 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed-esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed/dep.js b/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed/dep.js new file mode 100644 index 00000000000000..926ce033f829a0 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed/dep.js @@ -0,0 +1,4 @@ +Object.defineProperty(exports, '__esModule', { value: true }); +exports.default = 'faux esm default'; +exports.a = 'faux esm a'; +exports.b = 'faux esm b'; diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed/package.json b/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed/package.json new file mode 100644 index 00000000000000..e6fc9863573e3d --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmmixed/package.json @@ -0,0 +1,4 @@ +{ + "type": "commonjs", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed-esm/dep.js b/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed-esm/dep.js new file mode 100644 index 00000000000000..ac048c7b1634a7 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed-esm/dep.js @@ -0,0 +1,8 @@ +const exports = {}; +Object.defineProperty(exports, '__esModule', { value: true }); +exports.a = 'faux esm a'; +exports.b = 'faux esm b'; + +export default exports; + +export { exports as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed-esm/package.json b/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed-esm/package.json new file mode 100644 index 00000000000000..f5b94a85497063 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed-esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed/dep.js b/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed/dep.js new file mode 100644 index 00000000000000..e3218c09b35752 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed/dep.js @@ -0,0 +1,3 @@ +Object.defineProperty(exports, '__esModule', { value: true }); +exports.a = 'faux esm a'; +exports.b = 'faux esm b'; diff --git a/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed/package.json b/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed/package.json new file mode 100644 index 00000000000000..e6fc9863573e3d --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-fauxesmnamed/package.json @@ -0,0 +1,4 @@ +{ + "type": "commonjs", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-object-esm/dep.js b/test/fixtures/node_modules/interop-cjsdep-object-esm/dep.js new file mode 100644 index 00000000000000..f53cd1c055bd0a --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-object-esm/dep.js @@ -0,0 +1,8 @@ +const output = { + a: 'cjs a', + b: 'cjs b' +}; + +export default output; + +export { output as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjsdep-object-esm/package.json b/test/fixtures/node_modules/interop-cjsdep-object-esm/package.json new file mode 100644 index 00000000000000..f5b94a85497063 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-object-esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-object/dep.js b/test/fixtures/node_modules/interop-cjsdep-object/dep.js new file mode 100644 index 00000000000000..c37089bccc741e --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-object/dep.js @@ -0,0 +1,2 @@ +exports.a = 'cjs a'; +exports.b = 'cjs b'; diff --git a/test/fixtures/node_modules/interop-cjsdep-object/package.json b/test/fixtures/node_modules/interop-cjsdep-object/package.json new file mode 100644 index 00000000000000..e6fc9863573e3d --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-object/package.json @@ -0,0 +1,4 @@ +{ + "type": "commonjs", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-string-esm/dep.js b/test/fixtures/node_modules/interop-cjsdep-string-esm/dep.js new file mode 100644 index 00000000000000..8b718c32a1fab5 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-string-esm/dep.js @@ -0,0 +1,3 @@ +const output = 'cjs'; +export default output; +export { output as 'module.exports' } diff --git a/test/fixtures/node_modules/interop-cjsdep-string-esm/package.json b/test/fixtures/node_modules/interop-cjsdep-string-esm/package.json new file mode 100644 index 00000000000000..f5b94a85497063 --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-string-esm/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "exports": "./dep.js" +} diff --git a/test/fixtures/node_modules/interop-cjsdep-string/dep.js b/test/fixtures/node_modules/interop-cjsdep-string/dep.js new file mode 100644 index 00000000000000..b2825bd3c9949b --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-string/dep.js @@ -0,0 +1 @@ +module.exports = 'cjs'; diff --git a/test/fixtures/node_modules/interop-cjsdep-string/package.json b/test/fixtures/node_modules/interop-cjsdep-string/package.json new file mode 100644 index 00000000000000..e6fc9863573e3d --- /dev/null +++ b/test/fixtures/node_modules/interop-cjsdep-string/package.json @@ -0,0 +1,4 @@ +{ + "type": "commonjs", + "exports": "./dep.js" +} diff --git a/test/fixtures/pkgexports.mjs b/test/fixtures/pkgexports.mjs index 7d642c443e6b71..b71566b95c79ac 100644 --- a/test/fixtures/pkgexports.mjs +++ b/test/fixtures/pkgexports.mjs @@ -3,6 +3,10 @@ import { createRequire } from 'module'; const rawRequire = createRequire(fileURLToPath(import.meta.url)); +export function directRequireFixture(specifier) { + return rawRequire(specifier); +} + export async function requireFixture(specifier) { return { default: rawRequire(specifier ) }; } diff --git a/test/fixtures/sea.js b/test/fixtures/sea.js index e7b7f46ff00a86..6dea6960997feb 100644 --- a/test/fixtures/sea.js +++ b/test/fixtures/sea.js @@ -5,10 +5,14 @@ const createdRequire = createRequire(__filename); // because we set NODE_TEST_DIR=/Users/iojs/node-tmp on Jenkins CI. const { expectWarning, mustNotCall } = createdRequire(process.env.COMMON_DIRECTORY); +const builtinWarning = +`Currently the require() provided to the main script embedded into single-executable applications only supports loading built-in modules. +To load a module from disk after the single executable application is launched, use require("module").createRequire(). +Support for bundled module loading or virtual file systems are under discussions in https://github.com/nodejs/single-executable`; + +expectWarning('Warning', builtinWarning); // Triggered by require() calls below. // This additionally makes sure that no unexpected warnings are emitted. -if (createdRequire('./sea-config.json').disableExperimentalSEAWarning) { - process.on('warning', mustNotCall()); -} else { +if (!createdRequire('./sea-config.json').disableExperimentalSEAWarning) { expectWarning('ExperimentalWarning', 'Single executable application is an experimental feature and ' + 'might change at any time'); @@ -22,7 +26,7 @@ const { deepStrictEqual, strictEqual, throws } = require('assert'); const { dirname } = require('node:path'); // Checks that the source filename is used in the error stack trace. -strictEqual(new Error('lol').stack.split('\n')[1], ' at sea.js:25:13'); +strictEqual(new Error('lol').stack.split('\n')[1], ' at sea.js:29:13'); // Should be possible to require a core module that requires using the "node:" // scheme. diff --git a/test/fixtures/source-map/no-throw.js b/test/fixtures/source-map/no-throw.js new file mode 100644 index 00000000000000..4c4e5fa47158da --- /dev/null +++ b/test/fixtures/source-map/no-throw.js @@ -0,0 +1,34 @@ +var Foo = /** @class */ (function () { + function Foo(x) { + if (x === void 0) { x = 33; } + this.x = x ? x : 99; + if (this.x) { + this.methodA(); + } + else { + this.methodB(); + } + this.methodC(); + } + Foo.prototype.methodA = function () { + }; + Foo.prototype.methodB = function () { + }; + Foo.prototype.methodC = function () { + }; + Foo.prototype.methodD = function () { + }; + return Foo; +}()); +var a = new Foo(0); +var b = new Foo(33); +a.methodD(); +module.exports = { + a: a, + b: b, + Foo: Foo, +}; +// To recreate: +// +// npx tsc --outDir test/fixtures/source-map --sourceMap --inlineSources test/fixtures/source-map/no-throw.ts +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm8tdGhyb3cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJuby10aHJvdy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUVFLGFBQWEsQ0FBTTtRQUFOLGtCQUFBLEVBQUEsTUFBTTtRQUNqQixJQUFJLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUE7UUFDbkIsSUFBSSxJQUFJLENBQUMsQ0FBQyxFQUFFLENBQUM7WUFDWCxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUE7UUFDaEIsQ0FBQzthQUFNLENBQUM7WUFDTixJQUFJLENBQUMsT0FBTyxFQUFFLENBQUE7UUFDaEIsQ0FBQztRQUNELElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQTtJQUNoQixDQUFDO0lBQ0QscUJBQU8sR0FBUDtJQUVBLENBQUM7SUFDRCxxQkFBTyxHQUFQO0lBRUEsQ0FBQztJQUNELHFCQUFPLEdBQVA7SUFFQSxDQUFDO0lBQ0QscUJBQU8sR0FBUDtJQUVBLENBQUM7SUFDSCxVQUFDO0FBQUQsQ0FBQyxBQXZCRCxJQXVCQztBQUVELElBQU0sQ0FBQyxHQUFHLElBQUksR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFBO0FBQ3BCLElBQU0sQ0FBQyxHQUFHLElBQUksR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFBO0FBQ3JCLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQTtBQU1YLE1BQU0sQ0FBQyxPQUFPLEdBQUc7SUFDZixDQUFDLEdBQUE7SUFDRCxDQUFDLEdBQUE7SUFDRCxHQUFHLEtBQUE7Q0FDSixDQUFBO0FBRUQsZUFBZTtBQUNmLEVBQUU7QUFDRiw2R0FBNkciLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBGb28ge1xuICB4O1xuICBjb25zdHJ1Y3RvciAoeCA9IDMzKSB7XG4gICAgdGhpcy54ID0geCA/IHggOiA5OVxuICAgIGlmICh0aGlzLngpIHtcbiAgICAgIHRoaXMubWV0aG9kQSgpXG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMubWV0aG9kQigpXG4gICAgfVxuICAgIHRoaXMubWV0aG9kQygpXG4gIH1cbiAgbWV0aG9kQSAoKSB7XG5cbiAgfVxuICBtZXRob2RCICgpIHtcblxuICB9XG4gIG1ldGhvZEMgKCkge1xuXG4gIH1cbiAgbWV0aG9kRCAoKSB7XG5cbiAgfVxufVxuXG5jb25zdCBhID0gbmV3IEZvbygwKVxuY29uc3QgYiA9IG5ldyBGb28oMzMpXG5hLm1ldGhvZEQoKVxuXG5kZWNsYXJlIGNvbnN0IG1vZHVsZToge1xuICBleHBvcnRzOiBhbnlcbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIGEsXG4gIGIsXG4gIEZvbyxcbn1cblxuLy8gVG8gcmVjcmVhdGU6XG4vL1xuLy8gbnB4IHRzYyAtLW91dERpciB0ZXN0L2ZpeHR1cmVzL3NvdXJjZS1tYXAgLS1zb3VyY2VNYXAgLS1pbmxpbmVTb3VyY2VzIHRlc3QvZml4dHVyZXMvc291cmNlLW1hcC9uby10aHJvdy50c1xuIl19 \ No newline at end of file diff --git a/test/fixtures/source-map/no-throw.ts b/test/fixtures/source-map/no-throw.ts new file mode 100644 index 00000000000000..71d065bca933d2 --- /dev/null +++ b/test/fixtures/source-map/no-throw.ts @@ -0,0 +1,42 @@ +class Foo { + x; + constructor (x = 33) { + this.x = x ? x : 99 + if (this.x) { + this.methodA() + } else { + this.methodB() + } + this.methodC() + } + methodA () { + + } + methodB () { + + } + methodC () { + + } + methodD () { + + } +} + +const a = new Foo(0) +const b = new Foo(33) +a.methodD() + +declare const module: { + exports: any +} + +module.exports = { + a, + b, + Foo, +} + +// To recreate: +// +// npx tsc --outDir test/fixtures/source-map --inlineSourceMap --inlineSources test/fixtures/source-map/no-throw.ts diff --git a/test/fixtures/source-map/no-throw2.js b/test/fixtures/source-map/no-throw2.js new file mode 100644 index 00000000000000..57a294ff3a2a63 --- /dev/null +++ b/test/fixtures/source-map/no-throw2.js @@ -0,0 +1,35 @@ +var Foo = /** @class */ (function () { + function Foo(x) { + if (x === void 0) { x = 33; } + this.x = x ? x : 99; + if (this.x) { + this.methodA(); + } + else { + this.methodB(); + } + this.methodC(); + } + Foo.prototype.methodA = function () { + }; + Foo.prototype.methodB = function () { + }; + Foo.prototype.methodC = function () { + }; + Foo.prototype.methodD = function () { + }; + return Foo; +}()); +var a = new Foo(0); +var b = new Foo(33); +a.methodD(); +module.exports = { + a: a, + b: b, + Foo: Foo, +}; +// To recreate: +// +// npx tsc --outDir test/fixtures/source-map --sourceMap --inlineSources test/fixtures/source-map/no-throw.ts +// cp test/fixtures/source-map/no-throw.ts test/fixtures/source-map/no-throw2.ts +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm8tdGhyb3cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJuby10aHJvdy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUVFLGFBQWEsQ0FBTTtRQUFOLGtCQUFBLEVBQUEsTUFBTTtRQUNqQixJQUFJLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUE7UUFDbkIsSUFBSSxJQUFJLENBQUMsQ0FBQyxFQUFFLENBQUM7WUFDWCxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUE7UUFDaEIsQ0FBQzthQUFNLENBQUM7WUFDTixJQUFJLENBQUMsT0FBTyxFQUFFLENBQUE7UUFDaEIsQ0FBQztRQUNELElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQTtJQUNoQixDQUFDO0lBQ0QscUJBQU8sR0FBUDtJQUVBLENBQUM7SUFDRCxxQkFBTyxHQUFQO0lBRUEsQ0FBQztJQUNELHFCQUFPLEdBQVA7SUFFQSxDQUFDO0lBQ0QscUJBQU8sR0FBUDtJQUVBLENBQUM7SUFDSCxVQUFDO0FBQUQsQ0FBQyxBQXZCRCxJQXVCQztBQUVELElBQU0sQ0FBQyxHQUFHLElBQUksR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFBO0FBQ3BCLElBQU0sQ0FBQyxHQUFHLElBQUksR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFBO0FBQ3JCLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQTtBQU1YLE1BQU0sQ0FBQyxPQUFPLEdBQUc7SUFDZixDQUFDLEdBQUE7SUFDRCxDQUFDLEdBQUE7SUFDRCxHQUFHLEtBQUE7Q0FDSixDQUFBO0FBRUQsZUFBZTtBQUNmLEVBQUU7QUFDRiw2R0FBNkciLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBGb28ge1xuICB4O1xuICBjb25zdHJ1Y3RvciAoeCA9IDMzKSB7XG4gICAgdGhpcy54ID0geCA/IHggOiA5OVxuICAgIGlmICh0aGlzLngpIHtcbiAgICAgIHRoaXMubWV0aG9kQSgpXG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMubWV0aG9kQigpXG4gICAgfVxuICAgIHRoaXMubWV0aG9kQygpXG4gIH1cbiAgbWV0aG9kQSAoKSB7XG5cbiAgfVxuICBtZXRob2RCICgpIHtcblxuICB9XG4gIG1ldGhvZEMgKCkge1xuXG4gIH1cbiAgbWV0aG9kRCAoKSB7XG5cbiAgfVxufVxuXG5jb25zdCBhID0gbmV3IEZvbygwKVxuY29uc3QgYiA9IG5ldyBGb28oMzMpXG5hLm1ldGhvZEQoKVxuXG5kZWNsYXJlIGNvbnN0IG1vZHVsZToge1xuICBleHBvcnRzOiBhbnlcbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIGEsXG4gIGIsXG4gIEZvbyxcbn1cblxuLy8gVG8gcmVjcmVhdGU6XG4vL1xuLy8gbnB4IHRzYyAtLW91dERpciB0ZXN0L2ZpeHR1cmVzL3NvdXJjZS1tYXAgLS1zb3VyY2VNYXAgLS1pbmxpbmVTb3VyY2VzIHRlc3QvZml4dHVyZXMvc291cmNlLW1hcC9uby10aHJvdy50c1xuIl19 \ No newline at end of file diff --git a/test/fixtures/source-map/output/source_map_disabled_by_api.js b/test/fixtures/source-map/output/source_map_disabled_by_api.js index d94a6310cff7ae..8f455f26b6c9c4 100644 --- a/test/fixtures/source-map/output/source_map_disabled_by_api.js +++ b/test/fixtures/source-map/output/source_map_disabled_by_api.js @@ -15,10 +15,10 @@ try { console.log(e); } +// Delete the CJS module cache and loading the module again with source maps +// support enabled programmatically. delete require.cache[require .resolve('../enclosing-call-site-min.js')]; - -// Re-enable. process.setSourceMapsEnabled(true); assert.strictEqual(process.sourceMapsEnabled, true); diff --git a/test/fixtures/source-map/output/source_map_prepare_stack_trace.js b/test/fixtures/source-map/output/source_map_prepare_stack_trace.js index d49bad116b479f..1b04e0a3ac221b 100644 --- a/test/fixtures/source-map/output/source_map_prepare_stack_trace.js +++ b/test/fixtures/source-map/output/source_map_prepare_stack_trace.js @@ -20,10 +20,8 @@ try { console.log(e); } -delete require.cache[require - .resolve('../enclosing-call-site-min.js')]; - -// Disable +// Source maps support is disabled programmatically even without deleting the +// CJS module cache. process.setSourceMapsEnabled(false); assert.strictEqual(process.sourceMapsEnabled, false); diff --git a/test/fixtures/test426/LICENSE.md b/test/fixtures/test426/LICENSE.md new file mode 100644 index 00000000000000..39501a3b7c70dd --- /dev/null +++ b/test/fixtures/test426/LICENSE.md @@ -0,0 +1,14 @@ +The Source Map Tests suite ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://www.ecma-international.org/ipr FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS*. + +Copyright (c) 2024, Ecma International +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +* Ecma International Standards hereafter means Ecma International Standards as well as Ecma Technical Reports diff --git a/test/fixtures/test426/README.md b/test/fixtures/test426/README.md new file mode 100644 index 00000000000000..e3e353fd500458 --- /dev/null +++ b/test/fixtures/test426/README.md @@ -0,0 +1,55 @@ +# Source Map Tests + +This repository holds testing discussions and tests for the the Source Map debugging format. Specifically, we're looking to encourage discussion around: + +- Manual and automated testing strategies for Source Maps +- Gathering a list of Soure Map generators and consumers +- General discussion around deviations between source maps + +Open discussion happens in the [GitHub issues](https://github.com/source-map/source-map-tests/issues). + +Source Map spec: + * Repo: https://github.com/tc39/source-map + * Rendered spec: https://tc39.es/source-map/ + +## Test cases + +This repo also contains cross-implementation test cases that can be run in test +suites for source map implementations, including browser devtool and library test +suites. + +### Running the tests + +#### Tools + +[Source map validator](https://github.com/jkup/source-map-validator): + * The tests are included in the validator test suite [here](https://github.com/jkup/source-map-validator/blob/main/src/spec-tests.test.ts). You can run them with `npm test`. + +#### Browsers + +The tests for Firefox are in the Mozilla [source-map](https://github.com/mozilla/source-map) library: + * The upstream repo has a [test file](https://github.com/mozilla/source-map/blob/master/test/test-spec-tests.js) for running the spec tests from this repo. They can be run with `npm test`. + +How to run in WebKit: + * Check out [WebKit](https://github.com/WebKit/WebKit/) + * `cd` to the checked out WebKit directory. + * Run `git am <this-repo>/webkit/0001-Add-harness-for-source-maps-spec-tests.patch` + * Run `Tools/Scripts/build-webkit` (depending on the platform you may need to pass `--gtk` or other flags) + * Run `Tools/Scripts/run-webkit-tests LayoutTests/inspector/model/source-map-spec.html` (again, you may need `--gtk` on Linux) + +How to run in Chrome Devtools: +1. Setup: + * Install depot_tools following this [depot_tools guide](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) + * Check out [Chrome Devtools](https://chromium.googlesource.com/devtools/devtools-frontend): + * Run `gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged` + * Run `cd devtools-frontend` + * Run `gclient sync` + * Run `gn gen out/Default` +2. Build: + * Run `autoninja -C out/Default` +3. Test: + * Run `npm run auto-unittest` +4. Apply patches from this repo: + * Run `git apply <path to .patch file>` in `devtools-frontend` repo + +More information about running Chrome Devtools without building Chromium can be found [here](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/chromium/3965/README.md) diff --git a/test/fixtures/test426/chrome/0001-Add-source-map-specification-tests.patch b/test/fixtures/test426/chrome/0001-Add-source-map-specification-tests.patch new file mode 100644 index 00000000000000..995bcf246c839d --- /dev/null +++ b/test/fixtures/test426/chrome/0001-Add-source-map-specification-tests.patch @@ -0,0 +1,3867 @@ +From afa11641db357e524c8f4d5f573945dd15c1f2e9 Mon Sep 17 00:00:00 2001 +From: Agata Belkius <abelkius@gmail.com> +Date: Fri, 19 Apr 2024 15:30:48 +0100 +Subject: [PATCH 1/2] Add source map specification tests + +--- + front_end/BUILD.gn | 1 + + front_end/core/sdk/BUILD.gn | 1 + + front_end/core/sdk/SourceMapSpec.test.ts | 206 +++ + .../core/sdk/fixtures/sourcemaps/BUILD.gn | 202 +++ + .../sourcemaps/basic-mapping-as-index-map.js | 2 + + .../basic-mapping-as-index-map.js.map | 15 + + .../sourcemaps/basic-mapping-original.js | 8 + + .../sdk/fixtures/sourcemaps/basic-mapping.js | 2 + + .../fixtures/sourcemaps/basic-mapping.js.map | 6 + + .../fixtures/sourcemaps/ignore-list-empty.js | 1 + + .../sourcemaps/ignore-list-empty.js.map | 8 + + .../sourcemaps/ignore-list-out-of-bounds.js | 1 + + .../ignore-list-out-of-bounds.js.map | 8 + + .../sourcemaps/ignore-list-valid-1.js | 1 + + .../sourcemaps/ignore-list-valid-1.js.map | 8 + + .../sourcemaps/ignore-list-wrong-type-1.js | 1 + + .../ignore-list-wrong-type-1.js.map | 8 + + .../sourcemaps/ignore-list-wrong-type-2.js | 1 + + .../ignore-list-wrong-type-2.js.map | 8 + + .../sourcemaps/ignore-list-wrong-type-3.js | 1 + + .../ignore-list-wrong-type-3.js.map | 8 + + .../index-map-invalid-base-mappings.js | 1 + + .../index-map-invalid-base-mappings.js.map | 15 + + .../sourcemaps/index-map-invalid-order.js | 1 + + .../sourcemaps/index-map-invalid-order.js.map | 23 + + .../sourcemaps/index-map-invalid-overlap.js | 1 + + .../index-map-invalid-overlap.js.map | 23 + + .../sourcemaps/index-map-missing-map.js | 1 + + .../sourcemaps/index-map-missing-map.js.map | 8 + + .../index-map-missing-offset-column.js | 1 + + .../index-map-missing-offset-column.js.map | 14 + + .../index-map-missing-offset-line.js | 1 + + .../index-map-missing-offset-line.js.map | 14 + + .../sourcemaps/index-map-missing-offset.js | 1 + + .../index-map-missing-offset.js.map | 13 + + .../index-map-offset-column-wrong-type.js | 1 + + .../index-map-offset-column-wrong-type.js.map | 14 + + .../index-map-offset-line-wrong-type.js | 1 + + .../index-map-offset-line-wrong-type.js.map | 14 + + .../index-map-two-concatenated-sources.js | 2 + + .../index-map-two-concatenated-sources.js.map | 24 + + .../sourcemaps/index-map-wrong-type-map.js | 1 + + .../index-map-wrong-type-map.js.map | 9 + + .../sourcemaps/index-map-wrong-type-offset.js | 1 + + .../index-map-wrong-type-offset.js.map | 14 + + .../index-map-wrong-type-sections.js | 1 + + .../index-map-wrong-type-sections.js.map | 4 + + .../invalid-mapping-bad-separator.js | 2 + + .../invalid-mapping-bad-separator.js.map | 6 + + .../invalid-mapping-not-a-string-1.js | 1 + + .../invalid-mapping-not-a-string-1.js.map | 7 + + .../invalid-mapping-not-a-string-2.js | 1 + + .../invalid-mapping-not-a-string-2.js.map | 7 + + ...nvalid-mapping-segment-column-too-large.js | 1 + + ...id-mapping-segment-column-too-large.js.map | 7 + + ...apping-segment-name-index-out-of-bounds.js | 1 + + ...ng-segment-name-index-out-of-bounds.js.map | 7 + + ...id-mapping-segment-name-index-too-large.js | 1 + + ...apping-segment-name-index-too-large.js.map | 7 + + ...invalid-mapping-segment-negative-column.js | 1 + + ...lid-mapping-segment-negative-column.js.map | 7 + + ...lid-mapping-segment-negative-name-index.js | 1 + + ...mapping-segment-negative-name-index.js.map | 7 + + ...apping-segment-negative-original-column.js | 1 + + ...ng-segment-negative-original-column.js.map | 7 + + ...-mapping-segment-negative-original-line.js | 1 + + ...ping-segment-negative-original-line.js.map | 7 + + ...apping-segment-negative-relative-column.js | 1 + + ...ng-segment-negative-relative-column.js.map | 8 + + ...ng-segment-negative-relative-name-index.js | 1 + + ...egment-negative-relative-name-index.js.map | 8 + + ...gment-negative-relative-original-column.js | 1 + + ...t-negative-relative-original-column.js.map | 8 + + ...segment-negative-relative-original-line.js | 1 + + ...ent-negative-relative-original-line.js.map | 8 + + ...-segment-negative-relative-source-index.js | 1 + + ...ment-negative-relative-source-index.js.map | 8 + + ...d-mapping-segment-negative-source-index.js | 1 + + ...pping-segment-negative-source-index.js.map | 7 + + ...pping-segment-original-column-too-large.js | 1 + + ...g-segment-original-column-too-large.js.map | 7 + + ...mapping-segment-original-line-too-large.js | 1 + + ...ing-segment-original-line-too-large.js.map | 7 + + ...ping-segment-source-index-out-of-bounds.js | 1 + + ...-segment-source-index-out-of-bounds.js.map | 7 + + ...-mapping-segment-source-index-too-large.js | 1 + + ...ping-segment-source-index-too-large.js.map | 7 + + ...valid-mapping-segment-with-three-fields.js | 2 + + ...d-mapping-segment-with-three-fields.js.map | 6 + + ...invalid-mapping-segment-with-two-fields.js | 2 + + ...lid-mapping-segment-with-two-fields.js.map | 6 + + ...nvalid-mapping-segment-with-zero-fields.js | 1 + + ...id-mapping-segment-with-zero-fields.js.map | 7 + + .../invalid-vlq-missing-continuation.js | 1 + + .../invalid-vlq-missing-continuation.js.map | 6 + + .../sourcemaps/invalid-vlq-non-base64-char.js | 1 + + .../invalid-vlq-non-base64-char.js.map | 6 + + .../sdk/fixtures/sourcemaps/names-missing.js | 1 + + .../fixtures/sourcemaps/names-missing.js.map | 5 + + .../fixtures/sourcemaps/names-not-a-list-1.js | 1 + + .../sourcemaps/names-not-a-list-1.js.map | 6 + + .../fixtures/sourcemaps/names-not-a-list-2.js | 1 + + .../sourcemaps/names-not-a-list-2.js.map | 6 + + .../fixtures/sourcemaps/names-not-string.js | 1 + + .../sourcemaps/names-not-string.js.map | 6 + + .../sourcemaps/second-source-original.js | 4 + + .../sourcemaps/source-map-spec-tests.json | 1540 +++++++++++++++++ + .../sources-and-sources-content-both-null.js | 1 + + ...urces-and-sources-content-both-null.js.map | 7 + + .../fixtures/sourcemaps/sources-missing.js | 1 + + .../sourcemaps/sources-missing.js.map | 5 + + .../sources-non-null-sources-content-null.js | 2 + + ...urces-non-null-sources-content-null.js.map | 7 + + .../sourcemaps/sources-not-a-list-1.js | 1 + + .../sourcemaps/sources-not-a-list-1.js.map | 6 + + .../sourcemaps/sources-not-a-list-2.js | 1 + + .../sourcemaps/sources-not-a-list-2.js.map | 6 + + .../sourcemaps/sources-not-string-or-null.js | 1 + + .../sources-not-string-or-null.js.map | 6 + + .../sources-null-sources-content-non-null.js | 2 + + ...urces-null-sources-content-non-null.js.map | 7 + + .../sourcemaps/transitive-mapping-original.js | 5 + + .../transitive-mapping-original.js.map | 8 + + .../transitive-mapping-three-steps.js | 6 + + .../transitive-mapping-three-steps.js.map | 7 + + .../fixtures/sourcemaps/transitive-mapping.js | 2 + + .../sourcemaps/transitive-mapping.js.map | 6 + + .../sourcemaps/typescript-original.ts | 5 + + .../sourcemaps/unrecognized-property.js | 1 + + .../sourcemaps/unrecognized-property.js.map | 8 + + .../valid-mapping-boundary-values.js | 1 + + .../valid-mapping-boundary-values.js.map | 7 + + .../sourcemaps/valid-mapping-empty-groups.js | 1 + + .../valid-mapping-empty-groups.js.map | 8 + + .../sourcemaps/valid-mapping-large-vlq.js | 1 + + .../sourcemaps/valid-mapping-large-vlq.js.map | 6 + + .../sourcemaps/valid-mapping-null-sources.js | 2 + + .../valid-mapping-null-sources.js.map | 6 + + .../fixtures/sourcemaps/version-missing.js | 1 + + .../sourcemaps/version-missing.js.map | 5 + + .../sourcemaps/version-not-a-number.js | 1 + + .../sourcemaps/version-not-a-number.js.map | 6 + + .../sourcemaps/version-numeric-string.js | 1 + + .../sourcemaps/version-numeric-string.js.map | 6 + + .../fixtures/sourcemaps/version-too-high.js | 1 + + .../sourcemaps/version-too-high.js.map | 6 + + .../fixtures/sourcemaps/version-too-low.js | 1 + + .../sourcemaps/version-too-low.js.map | 6 + + .../sdk/fixtures/sourcemaps/version-valid.js | 1 + + .../fixtures/sourcemaps/version-valid.js.map | 6 + + 150 files changed, 2648 insertions(+) + create mode 100644 front_end/core/sdk/SourceMapSpec.test.ts + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/BUILD.gn + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-missing.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-string.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/second-source-original.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-missing.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-missing.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-high.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-low.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-valid.js + create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map + +diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn +index 863a434cea..125b34ba73 100644 +--- a/front_end/BUILD.gn ++++ b/front_end/BUILD.gn +@@ -106,6 +106,7 @@ group("unittests") { + "core/protocol_client:unittests", + "core/root:unittests", + "core/sdk:unittests", ++ "core/sdk/fixtures/sourcemaps", + "entrypoints/formatter_worker:unittests", + "entrypoints/heap_snapshot_worker:unittests", + "entrypoints/inspector_main:unittests", +diff --git a/front_end/core/sdk/BUILD.gn b/front_end/core/sdk/BUILD.gn +index 8d1cf0fa92..f8879365f4 100644 +--- a/front_end/core/sdk/BUILD.gn ++++ b/front_end/core/sdk/BUILD.gn +@@ -165,6 +165,7 @@ ts_library("unittests") { + "SourceMapManager.test.ts", + "SourceMapScopes.test.ts", + "SourceMapScopesInfo.test.ts", ++ "SourceMapSpec.test.ts", + "StorageBucketsModel.test.ts", + "StorageKeyManager.test.ts", + "Target.test.ts", +diff --git a/front_end/core/sdk/SourceMapSpec.test.ts b/front_end/core/sdk/SourceMapSpec.test.ts +new file mode 100644 +index 0000000000..93b26a2e13 +--- /dev/null ++++ b/front_end/core/sdk/SourceMapSpec.test.ts +@@ -0,0 +1,206 @@ ++// Copyright 2024 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++ ++/** ++ This file tests if devtools sourcemaps implementation is matching the sourcemaps spec. ++ Sourcemap Spec tests are using test data coming from: https://github.com/tc39/source-map-tests ++ ++ There is a lot of warnings of invalid source maps passing the validation - this is up to the authors ++ which ones of these could be actually checked in the SourceMaps implementetion and which ones are ok to ignore. ++ ++ **/ ++ ++const {assert} = chai; ++import type * as Platform from '../platform/platform.js'; ++import {assertNotNullOrUndefined} from '../platform/platform.js'; ++import { SourceMapV3, parseSourceMap } from './SourceMap.js'; ++import * as SDK from './sdk.js'; ++import {describeWithEnvironment} from '../../testing/EnvironmentHelpers.js'; ++ ++interface TestSpec { ++ name: string; ++ description: string; ++ baseFile: string; ++ sourceMapFile: string; ++ sourceMapIsValid: boolean; ++ testActions?: TestAction[]; ++} ++ ++interface TestAction { ++ actionType: string; ++ generatedLine: number; ++ generatedColumn: number; ++ originalSource: string; ++ originalLine: number; ++ originalColumn: number; ++ mappedName: null | string; ++ intermediateMaps?: string[] ++} ++ ++// Accept "null", null, or undefined for tests specifying a missing value. ++function nullish(arg : any) { ++ if (arg === "null" || arg === undefined) { ++ return null; ++ } ++ return arg; ++} ++ ++describeWithEnvironment('SourceMapSpec', () => { ++ let testCases : TestSpec[] | undefined; ++ let sourceMapContents : SourceMapV3[] = []; ++ ++ before(async () => { ++ testCases = await loadTestCasesFromFixture('source-map-spec-tests.json'); ++ sourceMapContents = await Promise.all( ++ testCases!.map( ++ async (testCase) => { ++ const { sourceMapFile } = testCase; ++ return loadSourceMapFromFixture(sourceMapFile); ++ } ++ ) ++ ); ++ }); ++ ++ it('Spec tests', () => { ++ const consoleErrorSpy = sinon.spy(console, 'error'); ++ testCases!.forEach(({ ++ baseFile, ++ sourceMapFile, ++ testActions, ++ sourceMapIsValid, ++ name ++ }, index) => { ++ const sourceMapContent = sourceMapContents[index]; ++ ++ // These test cases are ignored because certain validity checks are ++ // not implemented, such as checking the version number is `3`. ++ const ignoredCasesForBasicValidity = [ ++ "fileNotAString1", ++ "fileNotAString2", ++ "versionMissing", ++ "versionNotANumber", ++ "versionNumericString", ++ "versionTooHigh", ++ "versionTooLow", ++ "sourcesNotAList1", ++ "sourcesNotAList2", ++ "sourcesNotStringOrNull", ++ // FIXME: this test should be revised after recent spec changes ++ "namesMissing", ++ "namesNotAList1", ++ "namesNotAList2", ++ "namesNotString", ++ "ignoreListWrongType1", ++ "ignoreListWrongType2", ++ "ignoreListOutOfBounds", ++ "indexMapWrongTypeSections", ++ "indexMapWrongTypeMap", ++ "indexMapMissingOffset", ++ "invalidVLQDueToNonBase64Character", ++ ]; ++ ++ // 1) check if an invalid sourcemap throws on SourceMap instance creation, or ++ // 2) check if an invalid sourcemap throws on mapping creation ++ if (!sourceMapIsValid) { ++ if (ignoredCasesForBasicValidity.includes(name)) ++ return; ++ ++ let thrownDuringParse = false; ++ try { ++ const sourceMap = new SDK.SourceMap.SourceMap( ++ baseFile as Platform.DevToolsPath.UrlString, ++ sourceMapFile as Platform.DevToolsPath.UrlString, ++ sourceMapContent); ++ sourceMap.mappings(); ++ } catch { ++ thrownDuringParse = true; ++ } ++ assert.equal( ++ thrownDuringParse || consoleErrorSpy.calledWith("Failed to parse source map"), ++ true, ++ `${name}: expected invalid source map to fail to load` ++ ); ++ ++ return; ++ } ++ ++ // 3) check if a valid sourcemap can be parsed and a SourceMap instance created ++ const baseFileUrl = baseFile as Platform.DevToolsPath.UrlString; ++ const sourceMapFileUrl = sourceMapFile as Platform.DevToolsPath.UrlString; ++ ++ assert.doesNotThrow( ++ () => parseSourceMap(JSON.stringify(sourceMapContent)), ++ undefined, ++ undefined, ++ `${name}: expected valid source map to parse` ++ ); ++ assert.doesNotThrow(() => new SDK.SourceMap.SourceMap( ++ baseFileUrl, ++ sourceMapFileUrl, ++ sourceMapContent ++ ), undefined, undefined, `${name}: expected valid source map to parse`); ++ ++ // 4) check if the mappings are valid ++ const sourceMap = new SDK.SourceMap.SourceMap( ++ baseFileUrl, ++ sourceMapFileUrl, ++ sourceMapContent); ++ ++ assert.doesNotThrow(() => sourceMap.findEntry(1, 1)); ++ ++ if (testActions !== undefined) { ++ testActions.forEach(({ ++ actionType, ++ originalSource, ++ originalLine, ++ originalColumn, ++ generatedLine, ++ generatedColumn, ++ intermediateMaps ++ }) => { ++ ++ if (actionType === "checkMapping" && sourceMapIsValid) { ++ // 4a) check if the mappings are valid for regular sourcemaps ++ // extract to separate function ++ let actual = sourceMap.findEntry(generatedLine, generatedColumn); ++ assertNotNullOrUndefined(actual); ++ ++ assert.strictEqual(nullish(actual.sourceURL), originalSource, 'unexpected source URL'); ++ assert.strictEqual(nullish(actual.sourceLineNumber), originalLine, 'unexpected source line number'); ++ assert.strictEqual(nullish(actual.sourceColumnNumber), originalColumn, 'unexpected source column number'); ++ } ++ }); ++ } ++ }); ++ }); ++}); ++ ++async function loadTestCasesFromFixture(filename: string): Promise<TestSpec[]> { ++ const testSpec = await getFixtureFileContents<{ tests: TestSpec[] }>(filename); ++ return testSpec?.tests ?? []; ++}; ++ ++async function loadSourceMapFromFixture(filename: string): Promise<SourceMapV3> { ++ return getFixtureFileContents<SourceMapV3>(filename); ++}; ++ ++async function getFixtureFileContents<T>(filename: string): ++ Promise<T> { ++ const url = new URL(`/front_end/core/sdk/fixtures/sourcemaps/${filename}`, window.location.origin); ++ ++ const response = await fetch(url); ++ ++ if (response.status !== 200) { ++ throw new Error(`Unable to load ${url}`); ++ } ++ ++ const contentType = response.headers.get('content-type'); ++ const isGzipEncoded = contentType !== null && contentType.includes('gzip'); ++ let buffer = await response.arrayBuffer(); ++ ++ const decoder = new TextDecoder('utf-8'); ++ const contents = JSON.parse(decoder.decode(buffer)) as T; ++ return contents; ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn b/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn +new file mode 100644 +index 0000000000..a82b09a02d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn +@@ -0,0 +1,202 @@ ++# Copyright 2022 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("../../../../../scripts/build/ninja/copy.gni") ++ ++copy_to_gen("sourcemaps") { ++ sources = [ ++ "basic-mapping-as-index-map.js", ++ "basic-mapping-as-index-map.js.map", ++ "basic-mapping-original.js", ++ "basic-mapping.js", ++ "basic-mapping.js.map", ++ "file-not-a-string-1.js", ++ "file-not-a-string-1.js.map", ++ "file-not-a-string-2.js", ++ "file-not-a-string-2.js.map", ++ "ignore-list-empty.js", ++ "ignore-list-empty.js.map", ++ "ignore-list-out-of-bounds.js", ++ "ignore-list-out-of-bounds.js.map", ++ "ignore-list-valid-1.js", ++ "ignore-list-valid-1.js.map", ++ "ignore-list-wrong-type-1.js", ++ "ignore-list-wrong-type-1.js.map", ++ "ignore-list-wrong-type-2.js", ++ "ignore-list-wrong-type-2.js.map", ++ "ignore-list-wrong-type-3.js", ++ "ignore-list-wrong-type-3.js.map", ++ "index-map-empty-sections.js", ++ "index-map-empty-sections.js.map", ++ "index-map-file-wrong-type-1.js", ++ "index-map-file-wrong-type-1.js.map", ++ "index-map-file-wrong-type-2.js", ++ "index-map-file-wrong-type-2.js.map", ++ "index-map-invalid-base-mappings.js", ++ "index-map-invalid-base-mappings.js.map", ++ "index-map-invalid-order.js", ++ "index-map-invalid-order.js.map", ++ "index-map-invalid-overlap.js", ++ "index-map-invalid-overlap.js.map", ++ "index-map-invalid-sub-map.js", ++ "index-map-invalid-sub-map.js.map", ++ "index-map-missing-file.js", ++ "index-map-missing-file.js.map", ++ "index-map-missing-map.js", ++ "index-map-missing-map.js.map", ++ "index-map-missing-offset-column.js", ++ "index-map-missing-offset-column.js.map", ++ "index-map-missing-offset-line.js", ++ "index-map-missing-offset-line.js.map", ++ "index-map-missing-offset.js", ++ "index-map-missing-offset.js.map", ++ "index-map-offset-column-wrong-type.js", ++ "index-map-offset-column-wrong-type.js.map", ++ "index-map-offset-line-wrong-type.js", ++ "index-map-offset-line-wrong-type.js.map", ++ "index-map-two-concatenated-sources.js", ++ "index-map-two-concatenated-sources.js.map", ++ "index-map-wrong-type-map.js", ++ "index-map-wrong-type-map.js.map", ++ "index-map-wrong-type-offset.js", ++ "index-map-wrong-type-offset.js.map", ++ "index-map-wrong-type-sections.js", ++ "index-map-wrong-type-sections.js.map", ++ "invalid-mapping-bad-separator.js", ++ "invalid-mapping-bad-separator.js.map", ++ "invalid-mapping-not-a-string-1.js", ++ "invalid-mapping-not-a-string-1.js.map", ++ "invalid-mapping-not-a-string-2.js", ++ "invalid-mapping-not-a-string-2.js.map", ++ "invalid-mapping-segment-column-too-large.js", ++ "invalid-mapping-segment-column-too-large.js.map", ++ "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "invalid-mapping-segment-name-index-out-of-bounds.js.map", ++ "invalid-mapping-segment-name-index-too-large.js", ++ "invalid-mapping-segment-name-index-too-large.js.map", ++ "invalid-mapping-segment-negative-column.js", ++ "invalid-mapping-segment-negative-column.js.map", ++ "invalid-mapping-segment-negative-name-index.js", ++ "invalid-mapping-segment-negative-name-index.js.map", ++ "invalid-mapping-segment-negative-original-column.js", ++ "invalid-mapping-segment-negative-original-column.js.map", ++ "invalid-mapping-segment-negative-original-line.js", ++ "invalid-mapping-segment-negative-original-line.js.map", ++ "invalid-mapping-segment-negative-relative-column.js", ++ "invalid-mapping-segment-negative-relative-column.js.map", ++ "invalid-mapping-segment-negative-relative-name-index.js", ++ "invalid-mapping-segment-negative-relative-name-index.js.map", ++ "invalid-mapping-segment-negative-relative-original-column.js", ++ "invalid-mapping-segment-negative-relative-original-column.js.map", ++ "invalid-mapping-segment-negative-relative-original-line.js", ++ "invalid-mapping-segment-negative-relative-original-line.js.map", ++ "invalid-mapping-segment-negative-relative-source-index.js", ++ "invalid-mapping-segment-negative-relative-source-index.js.map", ++ "invalid-mapping-segment-negative-source-index.js", ++ "invalid-mapping-segment-negative-source-index.js.map", ++ "invalid-mapping-segment-original-column-too-large.js", ++ "invalid-mapping-segment-original-column-too-large.js.map", ++ "invalid-mapping-segment-original-line-too-large.js", ++ "invalid-mapping-segment-original-line-too-large.js.map", ++ "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "invalid-mapping-segment-source-index-out-of-bounds.js.map", ++ "invalid-mapping-segment-source-index-too-large.js", ++ "invalid-mapping-segment-source-index-too-large.js.map", ++ "invalid-mapping-segment-with-three-fields.js", ++ "invalid-mapping-segment-with-three-fields.js.map", ++ "invalid-mapping-segment-with-two-fields.js", ++ "invalid-mapping-segment-with-two-fields.js.map", ++ "invalid-mapping-segment-with-zero-fields.js", ++ "invalid-mapping-segment-with-zero-fields.js.map", ++ "invalid-vlq-missing-continuation.js", ++ "invalid-vlq-missing-continuation.js.map", ++ "invalid-vlq-non-base64-char.js", ++ "invalid-vlq-non-base64-char.js.map", ++ "mapping-semantics-column-reset.js", ++ "mapping-semantics-column-reset.js.map", ++ "mapping-semantics-five-field-segment.js", ++ "mapping-semantics-five-field-segment.js.map", ++ "mapping-semantics-four-field-segment.js", ++ "mapping-semantics-four-field-segment.js.map", ++ "mapping-semantics-relative-1.js", ++ "mapping-semantics-relative-1.js.map", ++ "mapping-semantics-relative-2.js", ++ "mapping-semantics-relative-2.js.map", ++ "mapping-semantics-single-field-segment.js", ++ "mapping-semantics-single-field-segment.js.map", ++ "names-missing.js", ++ "names-missing.js.map", ++ "names-not-a-list-1.js", ++ "names-not-a-list-1.js.map", ++ "names-not-a-list-2.js", ++ "names-not-a-list-2.js.map", ++ "names-not-string.js", ++ "names-not-string.js.map", ++ "second-source-original.js", ++ "source-map-spec-tests.json", ++ "source-resolution-absolute-url.js", ++ "source-resolution-absolute-url.js.map", ++ "source-resolution-relative-url.js", ++ "source-resolution-relative-url.js.map", ++ "source-root-not-a-string-1.js", ++ "source-root-not-a-string-1.js.map", ++ "source-root-not-a-string-2.js", ++ "source-root-not-a-string-2.js.map", ++ "source-root-resolution.js", ++ "source-root-resolution.js.map", ++ "sources-and-sources-content-both-null.js", ++ "sources-and-sources-content-both-null.js.map", ++ "sources-missing.js", ++ "sources-missing.js.map", ++ "sources-non-null-sources-content-null.js", ++ "sources-non-null-sources-content-null.js.map", ++ "sources-not-a-list-1.js", ++ "sources-not-a-list-1.js.map", ++ "sources-not-a-list-2.js", ++ "sources-not-a-list-2.js.map", ++ "sources-not-string-or-null.js", ++ "sources-not-string-or-null.js.map", ++ "sources-null-sources-content-non-null.js", ++ "sources-null-sources-content-non-null.js.map", ++ "transitive-mapping-original.js", ++ "transitive-mapping-original.js.map", ++ "transitive-mapping-three-steps.js", ++ "transitive-mapping-three-steps.js.map", ++ "transitive-mapping.js", ++ "transitive-mapping.js.map", ++ "typescript-original.ts", ++ "unrecognized-property.js", ++ "unrecognized-property.js.map", ++ "valid-mapping-boundary-values.js", ++ "valid-mapping-boundary-values.js.map", ++ "valid-mapping-empty-groups.js", ++ "valid-mapping-empty-groups.js.map", ++ "valid-mapping-empty-string.js", ++ "valid-mapping-empty-string.js.map", ++ "valid-mapping-large-vlq.js", ++ "valid-mapping-large-vlq.js.map", ++ "valid-mapping-null-sources.js", ++ "valid-mapping-null-sources.js.map", ++ "version-missing.js", ++ "version-missing.js.map", ++ "version-not-a-number.js", ++ "version-not-a-number.js.map", ++ "version-numeric-string.js", ++ "version-numeric-string.js.map", ++ "version-too-high.js", ++ "version-too-high.js.map", ++ "version-too-low.js", ++ "version-too-low.js.map", ++ "version-valid.js", ++ "version-valid.js.map", ++ "vlq-valid-continuation-bit-present-1.js", ++ "vlq-valid-continuation-bit-present-1.js.map", ++ "vlq-valid-continuation-bit-present-2.js", ++ "vlq-valid-continuation-bit-present-2.js.map", ++ "vlq-valid-negative-digit.js", ++ "vlq-valid-negative-digit.js.map", ++ "vlq-valid-single-digit.js", ++ "vlq-valid-single-digit.js.map", ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js +new file mode 100644 +index 0000000000..b9fae38043 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=basic-mapping-as-index-map.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map +new file mode 100644 +index 0000000000..c0ad870ed2 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "file": "basic-mapping-as-index-map.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js +new file mode 100644 +index 0000000000..301b186cb1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js +@@ -0,0 +1,8 @@ ++function foo() { ++ return 42; ++} ++function bar() { ++ return 24; ++} ++foo(); ++bar(); +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js +new file mode 100644 +index 0000000000..2e479a4175 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=basic-mapping.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map +new file mode 100644 +index 0000000000..12dc9679a4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version":3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js +new file mode 100644 +index 0000000000..385a5c3501 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-empty.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map +new file mode 100644 +index 0000000000..7297863a9b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js +new file mode 100644 +index 0000000000..7a0fbb8833 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-out-of-bounds.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map +new file mode 100644 +index 0000000000..fb2566bb41 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [1] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js +new file mode 100644 +index 0000000000..ea64a5565a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-valid-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map +new file mode 100644 +index 0000000000..98eebdf7f6 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [0] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js +new file mode 100644 +index 0000000000..8b40bd3847 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map +new file mode 100644 +index 0000000000..688740aba8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": ["not a number"] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js +new file mode 100644 +index 0000000000..35c7791164 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-2.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map +new file mode 100644 +index 0000000000..ca1d30de2d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": ["0"] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js +new file mode 100644 +index 0000000000..8735d41758 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-3.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map +new file mode 100644 +index 0000000000..1ac167d56c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": 0 ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js +new file mode 100644 +index 0000000000..e90bef083c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-base-mappings.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map +new file mode 100644 +index 0000000000..b489c1f080 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "mappings": "AAAA", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js +new file mode 100644 +index 0000000000..263fa3c6e0 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-order.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map +new file mode 100644 +index 0000000000..82da69df72 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map +@@ -0,0 +1,23 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 1, "column": 4 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js +new file mode 100644 +index 0000000000..9aff8dc620 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-overlap.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map +new file mode 100644 +index 0000000000..8d42546fd8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map +@@ -0,0 +1,23 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js +new file mode 100644 +index 0000000000..86c8e9a253 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-map.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map +new file mode 100644 +index 0000000000..3bce47e852 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js +new file mode 100644 +index 0000000000..fe6917403f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map +new file mode 100644 +index 0000000000..aa48bbb993 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js +new file mode 100644 +index 0000000000..ba8614e412 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset-line.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map +new file mode 100644 +index 0000000000..3d60444ea7 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js +new file mode 100644 +index 0000000000..9ca2cf3fb5 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map +new file mode 100644 +index 0000000000..7285138bf5 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map +@@ -0,0 +1,13 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js +new file mode 100644 +index 0000000000..ed1e9ec5d5 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-offset-column-wrong-type.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map +new file mode 100644 +index 0000000000..b43e79a9dd +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": true }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js +new file mode 100644 +index 0000000000..d58f2aff99 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-offset-line-wrong-type.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map +new file mode 100644 +index 0000000000..81dbcd6ec4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": true, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js +new file mode 100644 +index 0000000000..b8702d7187 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar();function baz(){return"baz"}baz(); ++//# sourceMappingURL=index-map-two-concatenated-sources.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map +new file mode 100644 +index 0000000000..f67f5de3c5 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map +@@ -0,0 +1,24 @@ ++{ ++ "version": 3, ++ "file": "index-map-two-concatenated-sources.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 62 }, ++ "map": { ++ "version": 3, ++ "names": ["baz"], ++ "sources": ["second-source-original.js"], ++ "mappings":"AAAA,SAASA,MACP,MAAO,KACT,CACAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js +new file mode 100644 +index 0000000000..d31d6d6358 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-map.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map +new file mode 100644 +index 0000000000..0963f623d7 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map +@@ -0,0 +1,9 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": "not a map" ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js +new file mode 100644 +index 0000000000..048e1246f8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-offset.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map +new file mode 100644 +index 0000000000..fbc6e4e678 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": "not an offset", ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js +new file mode 100644 +index 0000000000..011eca806e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-sections.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map +new file mode 100644 +index 0000000000..dbfb4ead30 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map +@@ -0,0 +1,4 @@ ++{ ++ "version": 3, ++ "sections": "not a sections list" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js +new file mode 100644 +index 0000000000..25338aca30 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-bad-separator.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map +new file mode 100644 +index 0000000000..5f4f5b9233 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA.SAASA:MACP" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js +new file mode 100644 +index 0000000000..cb38e2fe9d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map +new file mode 100644 +index 0000000000..5bf3e2a9d8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-not-a-string-1.js", ++ "sources": ["empty-original.js"], ++ "mappings": 5 ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js +new file mode 100644 +index 0000000000..3d84abd6c6 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map +new file mode 100644 +index 0000000000..4527e7f764 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-not-a-string-2.js", ++ "sources": ["empty-original.js"], ++ "mappings": [1, 2, 3, 4] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js +new file mode 100644 +index 0000000000..55591f874b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map +new file mode 100644 +index 0000000000..b4c059e015 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-column-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "ggggggE" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js +new file mode 100644 +index 0000000000..2a6b434eff +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map +new file mode 100644 +index 0000000000..8dd2ea6c2d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "file": "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAC" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js +new file mode 100644 +index 0000000000..709e34dbd3 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map +new file mode 100644 +index 0000000000..c7bf5b98d1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-name-index-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAggggggE" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js +new file mode 100644 +index 0000000000..a202152d6f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map +new file mode 100644 +index 0000000000..403878bfa4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-column.js", ++ "sources": ["empty-original.js"], ++ "mappings": "F" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js +new file mode 100644 +index 0000000000..3e3f634204 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map +new file mode 100644 +index 0000000000..b94f63646e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-name-index.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAF" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js +new file mode 100644 +index 0000000000..f21d5342b3 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map +new file mode 100644 +index 0000000000..011c639d3f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-original-column.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAF" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js +new file mode 100644 +index 0000000000..b37309601c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map +new file mode 100644 +index 0000000000..e7ec993eeb +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-original-line.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAFA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js +new file mode 100644 +index 0000000000..94b835d687 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map +new file mode 100644 +index 0000000000..414884072b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-column.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "C,F" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js +new file mode 100644 +index 0000000000..c965c5f011 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-name-index.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map +new file mode 100644 +index 0000000000..1fbbcfcd32 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-name-index.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AAAAC,AAAAF" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js +new file mode 100644 +index 0000000000..493a6ec88a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-column.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map +new file mode 100644 +index 0000000000..7e62895651 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-original-column.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AAAC,AAAF" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js +new file mode 100644 +index 0000000000..ca8329fb98 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-line.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map +new file mode 100644 +index 0000000000..86b0fb3a04 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-original-line.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AACA,AAFA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js +new file mode 100644 +index 0000000000..fa92225b09 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-source-index.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map +new file mode 100644 +index 0000000000..2efeb047db +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-source-index.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "ACAA,AFAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js +new file mode 100644 +index 0000000000..6e05849b6a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map +new file mode 100644 +index 0000000000..596c2f298b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-source-index.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AFAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js +new file mode 100644 +index 0000000000..0936ed7ea8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map +new file mode 100644 +index 0000000000..ff2103fe24 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-original-column-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAggggggE" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js +new file mode 100644 +index 0000000000..9b3aa5a361 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map +new file mode 100644 +index 0000000000..890f1c71fc +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-original-line-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAggggggEA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js +new file mode 100644 +index 0000000000..2e5fbca268 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map +new file mode 100644 +index 0000000000..86dedb114f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "sources": ["empty-original.js"], ++ "mappings": "ACAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js +new file mode 100644 +index 0000000000..3f4943e127 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map +new file mode 100644 +index 0000000000..e9f858c6e1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-source-index-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AggggggEAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js +new file mode 100644 +index 0000000000..4b868fac9c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map +new file mode 100644 +index 0000000000..c2af1165ad +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js +new file mode 100644 +index 0000000000..96045a7a11 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map +new file mode 100644 +index 0000000000..73cf00fa1c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js +new file mode 100644 +index 0000000000..9d5332a56c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map +new file mode 100644 +index 0000000000..5a34d25b64 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-with-zero-fields.js", ++ "sources": ["empty-original.js"], ++ "mappings": ",,,," ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js +new file mode 100644 +index 0000000000..2c2a0090ac +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-vlq-missing-continuation.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map +new file mode 100644 +index 0000000000..dd0e363ff4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "g" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js +new file mode 100644 +index 0000000000..d1b20b41a2 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-vlq-non-base64-char.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map +new file mode 100644 +index 0000000000..4fa1ac5768 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "A$%?!" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-missing.js b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js +new file mode 100644 +index 0000000000..58781fd887 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-missing.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map +new file mode 100644 +index 0000000000..82170bf784 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js +new file mode 100644 +index 0000000000..dc65f1972b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-a-list-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map +new file mode 100644 +index 0000000000..fe1edaeb96 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": "not a list", ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js +new file mode 100644 +index 0000000000..d7251f78da +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-a-list-2.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map +new file mode 100644 +index 0000000000..3388d2bb71 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": { "foo": 3 }, ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js +new file mode 100644 +index 0000000000..8dc7b4811a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-string.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map +new file mode 100644 +index 0000000000..c0feb0739a +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": [null, 3, true, false, {}, []], ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js b/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js +new file mode 100644 +index 0000000000..c339bc9d15 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js +@@ -0,0 +1,4 @@ ++function baz() { ++ return "baz"; ++} ++baz(); +diff --git a/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json b/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json +new file mode 100644 +index 0000000000..0f7a3c1cb1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json +@@ -0,0 +1,1540 @@ ++{ ++ "tests": [ ++ { ++ "name": "versionValid", ++ "description": "Test a simple source map with a valid version number", ++ "baseFile": "version-valid.js", ++ "sourceMapFile": "version-valid.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "versionMissing", ++ "description": "Test a source map that is missing a version field", ++ "baseFile": "version-missing.js", ++ "sourceMapFile": "version-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionNotANumber", ++ "description": "Test a source map with a version field that is not a number", ++ "baseFile": "version-not-a-number.js", ++ "sourceMapFile": "version-not-a-number.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionNumericString", ++ "description": "Test a source map with a version field that is a number as a string", ++ "baseFile": "version-numeric-string.js", ++ "sourceMapFile": "version-numeric-string.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionTooHigh", ++ "description": "Test a source map with an integer version field that is too high", ++ "baseFile": "version-too-high.js", ++ "sourceMapFile": "version-too-high.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionTooLow", ++ "description": "Test a source map with an integer version field that is too low", ++ "baseFile": "version-too-low.js", ++ "sourceMapFile": "version-too-low.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesMissing", ++ "description": "Test a source map that is missing a necessary sources field", ++ "baseFile": "sources-missing.js", ++ "sourceMapFile": "sources-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotAList1", ++ "description": "Test a source map with a sources field that is not a valid list (string)", ++ "baseFile": "sources-not-a-list-1.js", ++ "sourceMapFile": "sources-not-a-list-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotAList2", ++ "description": "Test a source map with a sources field that is not a valid list (object)", ++ "baseFile": "sources-not-a-list-2.js", ++ "sourceMapFile": "sources-not-a-list-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotStringOrNull", ++ "description": "Test a source map with a sources list that has non-string and non-null items", ++ "baseFile": "sources-not-string-or-null.js", ++ "sourceMapFile": "sources-not-string-or-null.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesAndSourcesContentBothNull", ++ "description": "Test a source map that has both null sources and sourcesContent entries", ++ "baseFile": "sources-and-sources-content-both-null.js", ++ "sourceMapFile": "sources-and-sources-content-both-null.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "fileNotAString1", ++ "description": "Test a source map with a file field that is not a valid string", ++ "baseFile": "file-not-a-string-1.js", ++ "sourceMapFile": "file-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "fileNotAString2", ++ "description": "Test a source map with a file field that is not a valid string", ++ "baseFile": "file-not-a-string-2.js", ++ "sourceMapFile": "file-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourceRootNotAString1", ++ "description": "Test a source map with a sourceRoot field that is not a valid string", ++ "baseFile": "source-root-not-a-string-1.js", ++ "sourceMapFile": "source-root-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourceRootNotAString2", ++ "description": "Test a source map with a sourceRoot field that is not a valid string", ++ "baseFile": "source-root-not-a-string-2.js", ++ "sourceMapFile": "source-root-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesMissing", ++ "description": "Test a source map that is missing a necessary names field", ++ "baseFile": "names-missing.js", ++ "sourceMapFile": "names-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotAList1", ++ "description": "Test a source map with a names field that is not a valid list (string)", ++ "baseFile": "names-not-a-list-1.js", ++ "sourceMapFile": "names-not-a-list-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotAList2", ++ "description": "Test a source map with a names field that is not a valid list (object)", ++ "baseFile": "names-not-a-list-2.js", ++ "sourceMapFile": "names-not-a-list-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotString", ++ "description": "Test a source map with a names list that has non-string items", ++ "baseFile": "names-not-string.js", ++ "sourceMapFile": "names-not-string.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListEmpty", ++ "description": "Test a source map with an ignore list that has no items", ++ "baseFile": "ignore-list-empty.js", ++ "sourceMapFile": "ignore-list-empty.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "ignoreListValid1", ++ "description": "Test a source map with a simple valid ignore list", ++ "baseFile": "ignore-list-valid-1.js", ++ "sourceMapFile": "ignore-list-valid-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkIgnoreList", ++ "present": ["empty-original.js"] ++ } ++ ] ++ }, ++ { ++ "name": "ignoreListWrongType1", ++ "description": "Test a source map with an ignore list with the wrong type of items", ++ "baseFile": "ignore-list-wrong-type-1.js", ++ "sourceMapFile": "ignore-list-wrong-type-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType2", ++ "description": "Test a source map with an ignore list with the wrong type of items", ++ "baseFile": "ignore-list-wrong-type-2.js", ++ "sourceMapFile": "ignore-list-wrong-type-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType3", ++ "description": "Test a source map with an ignore list that is not a list", ++ "baseFile": "ignore-list-wrong-type-3.js", ++ "sourceMapFile": "ignore-list-wrong-type-3.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListOutOfBounds", ++ "description": "Test a source map with an ignore list with an item with an out-of-bounds index", ++ "baseFile": "ignore-list-out-of-bounds.js", ++ "sourceMapFile": "ignore-list-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "unrecognizedProperty", ++ "description": "Test a source map that has an extra field not explicitly encoded in the spec", ++ "baseFile": "unrecognized-property.js", ++ "sourceMapFile": "unrecognized-property.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "invalidVLQDueToNonBase64Character", ++ "description": "Test a source map that has a mapping with an invalid non-base64 character", ++ "baseFile": "invalid-vlq-non-base64-char.js", ++ "sourceMapFile": "invalid-vlq-non-base64-char.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidVLQDueToMissingContinuationDigits", ++ "description": "Test a source map that has a mapping with an invalid VLQ that has a continuation bit but no continuing digits", ++ "baseFile": "invalid-vlq-missing-continuation.js", ++ "sourceMapFile": "invalid-vlq-missing-continuation.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingNotAString1", ++ "description": "Test a source map that has an invalid mapping that is not a string (number)", ++ "baseFile": "invalid-mapping-not-a-string-1.js", ++ "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingNotAString2", ++ "description": "Test a source map that has an invalid mapping that is not a string (array)", ++ "baseFile": "invalid-mapping-not-a-string-2.js", ++ "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentBadSeparator", ++ "description": "Test a source map that uses separator characters not recognized in the spec", ++ "baseFile": "invalid-mapping-bad-separator.js", ++ "sourceMapFile": "invalid-mapping-bad-separator.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithZeroFields", ++ "description": "Test a source map that has the wrong number (zero) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-zero-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithTwoFields", ++ "description": "Test a source map that has the wrong number (two) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-two-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithThreeFields", ++ "description": "Test a source map that has the wrong number (three) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-three-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", ++ "description": "Test a source map that has a source index field that is out of bounds of the sources field", ++ "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNameIndexOutOfBounds", ++ "description": "Test a source map that has a name index field that is out of bounds of the names field", ++ "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeColumn", ++ "description": "Test a source map that has an invalid negative non-relative column field", ++ "baseFile": "invalid-mapping-segment-negative-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeSourceIndex", ++ "description": "Test a source map that has an invalid negative non-relative source index field", ++ "baseFile": "invalid-mapping-segment-negative-source-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeOriginalLine", ++ "description": "Test a source map that has an invalid negative non-relative original line field", ++ "baseFile": "invalid-mapping-segment-negative-original-line.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeOriginalColumn", ++ "description": "Test a source map that has an invalid negative non-relative original column field", ++ "baseFile": "invalid-mapping-segment-negative-original-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeNameIndex", ++ "description": "Test a source map that has an invalid negative non-relative name index field", ++ "baseFile": "invalid-mapping-segment-negative-name-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeColumn", ++ "description": "Test a source map that has an invalid negative relative column field", ++ "baseFile": "invalid-mapping-segment-negative-relative-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeSourceIndex", ++ "description": "Test a source map that has an invalid negative relative source index field", ++ "baseFile": "invalid-mapping-segment-negative-relative-source-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-source-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalLine", ++ "description": "Test a source map that has an invalid negative relative original line field", ++ "baseFile": "invalid-mapping-segment-negative-relative-original-line.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalColumn", ++ "description": "Test a source map that has an invalid negative relative original column field", ++ "baseFile": "invalid-mapping-segment-negative-relative-original-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeNameIndex", ++ "description": "Test a source map that has an invalid negative relative name index field", ++ "baseFile": "invalid-mapping-segment-negative-relative-name-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-name-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithColumnExceeding32Bits", ++ "description": "Test a source map that has a column field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-column-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", ++ "description": "Test a source map that has a source index field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-source-index-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", ++ "description": "Test a source map that has a original line field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-original-line-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", ++ "description": "Test a source map that has an original column field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-original-column-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", ++ "description": "Test a source map that has a name index field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-name-index-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "validMappingFieldsWith32BitMaxValues", ++ "description": "Test a source map that has segment fields with max values representable in 32 bits", ++ "baseFile": "valid-mapping-boundary-values.js", ++ "sourceMapFile": "valid-mapping-boundary-values.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingLargeVLQ", ++ "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", ++ "baseFile": "valid-mapping-large-vlq.js", ++ "sourceMapFile": "valid-mapping-large-vlq.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingEmptyGroups", ++ "description": "Test a source map with a mapping that has many empty groups", ++ "baseFile": "valid-mapping-empty-groups.js", ++ "sourceMapFile": "valid-mapping-empty-groups.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingEmptyString", ++ "description": "Test a source map with an empty string mapping", ++ "baseFile": "valid-mapping-empty-string.js", ++ "sourceMapFile": "valid-mapping-empty-string.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "indexMapWrongTypeSections", ++ "description": "Test an index map with a sections field with the wrong type", ++ "baseFile": "index-map-wrong-type-sections.js", ++ "sourceMapFile": "index-map-wrong-type-sections.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapWrongTypeOffset", ++ "description": "Test an index map with an offset field with the wrong type", ++ "baseFile": "index-map-wrong-type-offset.js", ++ "sourceMapFile": "index-map-wrong-type-offset.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapWrongTypeMap", ++ "description": "Test an index map with a map field with the wrong type", ++ "baseFile": "index-map-wrong-type-map.js", ++ "sourceMapFile": "index-map-wrong-type-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidBaseMappings", ++ "description": "Test that an index map cannot also have a regular mappings field", ++ "baseFile": "index-map-invalid-base-mappings.js", ++ "sourceMapFile": "index-map-invalid-base-mappings.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidOverlap", ++ "description": "Test that an invalid index map with multiple sections that overlap", ++ "baseFile": "index-map-invalid-overlap.js", ++ "sourceMapFile": "index-map-invalid-overlap.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidOrder", ++ "description": "Test that an invalid index map with multiple sections in the wrong order", ++ "baseFile": "index-map-invalid-order.js", ++ "sourceMapFile": "index-map-invalid-order.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingMap", ++ "description": "Test that an index map that is missing a section map", ++ "baseFile": "index-map-missing-map.js", ++ "sourceMapFile": "index-map-missing-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidSubMap", ++ "description": "Test that an index map that has an invalid section map", ++ "baseFile": "index-map-invalid-sub-map.js", ++ "sourceMapFile": "index-map-invalid-sub-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffset", ++ "description": "Test that an index map that is missing a section offset", ++ "baseFile": "index-map-missing-offset.js", ++ "sourceMapFile": "index-map-missing-offset.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffsetLine", ++ "description": "Test that an index map that is missing a section offset's line field", ++ "baseFile": "index-map-missing-offset-line.js", ++ "sourceMapFile": "index-map-missing-offset-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffsetColumn", ++ "description": "Test that an index map that is missing a section offset's column field", ++ "baseFile": "index-map-missing-offset-column.js", ++ "sourceMapFile": "index-map-missing-offset-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapOffsetLineWrongType", ++ "description": "Test that an index map that has an offset line field with the wrong type of value", ++ "baseFile": "index-map-offset-line-wrong-type.js", ++ "sourceMapFile": "index-map-offset-line-wrong-type.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapOffsetColumnWrongType", ++ "description": "Test that an index map that has an offset column field with the wrong type of value", ++ "baseFile": "index-map-offset-column-wrong-type.js", ++ "sourceMapFile": "index-map-offset-column-wrong-type.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapEmptySections", ++ "description": "Test a trivial index map with no sections", ++ "baseFile": "index-map-empty-sections.js", ++ "sourceMapFile": "index-map-empty-sections.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "indexMapFileWrongType1", ++ "description": "Test an index map with a file field with the wrong type", ++ "baseFile": "index-map-file-wrong-type-1.js", ++ "sourceMapFile": "index-map-file-wrong-type-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapFileWrongType2", ++ "description": "Test an index map with a file field with the wrong type", ++ "baseFile": "index-map-file-wrong-type-2.js", ++ "sourceMapFile": "index-map-file-wrong-type-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "basicMapping", ++ "description": "Test a simple source map that has several valid mappings", ++ "baseFile": "basic-mapping.js", ++ "sourceMapFile": "basic-mapping.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "sourceRootResolution", ++ "description": "Similar to basic mapping test, but test resoultion of sources with a sourceRoot field", ++ "baseFile": "source-root-resolution.js", ++ "sourceMapFile": "source-root-resolution.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "theroot/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "theroot/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "sourceResolutionAbsoluteURL", ++ "description": "Test resoultion of sources with absolute URLs", ++ "baseFile": "source-resolution-absolute-url.js", ++ "sourceMapFile": "source-resolution-absolute-url.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "/baz/quux/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "/baz/quux/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "basicMappingWithIndexMap", ++ "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", ++ "baseFile": "basic-mapping-as-index-map.js", ++ "sourceMapFile": "basic-mapping-as-index-map.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "indexMapWithMissingFile", ++ "description": "Same as the basic mapping index map test but without the optional file field", ++ "baseFile": "index-map-missing-file.js", ++ "sourceMapFile": "index-map-missing-file.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "indexMapWithTwoConcatenatedSources", ++ "description": "Test an index map that has two sub-maps for concatenated sources", ++ "baseFile": "index-map-two-concatenated-sources.js", ++ "sourceMapFile": "index-map-two-concatenated-sources.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 62, ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 71, ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "baz" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 77, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 83, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 88, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 89, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": "baz" ++ } ++ ] ++ }, ++ { ++ "name": "sourcesNullSourcesContentNonNull", ++ "description": "Test a source map that has a null source but has a sourcesContent", ++ "baseFile": "sources-null-sources-content-non-null.js", ++ "sourceMapFile": "sources-null-sources-content-non-null.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": null, ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": null, ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "sourcesNonNullSourcesContentNull", ++ "description": "Test a source map that has a non-null source but has a null sourcesContent", ++ "baseFile": "sources-non-null-sources-content-null.js", ++ "sourceMapFile": "sources-non-null-sources-content-null.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "transitiveMapping", ++ "description": "Test a simple two-stage transitive mapping from a minified JS to a TypeScript source", ++ "baseFile": "transitive-mapping.js", ++ "sourceMapFile": "transitive-mapping.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 13, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 13, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 16, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 23, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 29, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "transitiveMappingWithThreeSteps", ++ "description": "Test a three-stage transitive mapping from an un-minified JS to minified JS to a TypeScript source", ++ "baseFile": "transitive-mapping-three-steps.js", ++ "sourceMapFile": "transitive-mapping-three-steps.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 13, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 13, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 1, ++ "generatedColumn": 4, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 1, ++ "generatedColumn": 11, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 2, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 4, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 4, ++ "generatedColumn": 4, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidSingleDigit", ++ "description": "Test VLQ decoding for a single digit, no continuation VLQ", ++ "baseFile": "vlq-valid-single-digit.js", ++ "sourceMapFile": "vlq-valid-single-digit.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-single-digit-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidNegativeDigit", ++ "description": "Test VLQ decoding where there's a negative digit, no continuation bit", ++ "baseFile": "vlq-valid-negative-digit.js", ++ "sourceMapFile": "vlq-valid-negative-digit.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-negative-digit-original.js", ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 2, ++ "originalSource": "vlq-valid-negative-digit-original.js", ++ "originalLine": 1, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidContinuationBitPresent1", ++ "description": "Test VLQ decoding where continuation bits are present (continuations are leading zero)", ++ "baseFile": "vlq-valid-continuation-bit-present-1.js", ++ "sourceMapFile": "vlq-valid-continuation-bit-present-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-continuation-bit-present-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidContinuationBitPresent2", ++ "description": "Test VLQ decoding where continuation bits are present (continuations have non-zero bits)", ++ "baseFile": "vlq-valid-continuation-bit-present-2.js", ++ "sourceMapFile": "vlq-valid-continuation-bit-present-2.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 16, ++ "originalSource": "vlq-valid-continuation-bit-present-2-original.js", ++ "originalLine": 1, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsSingleFieldSegment", ++ "description": "Test mapping semantics for a single field segment mapping", ++ "baseFile": "mapping-semantics-single-field-segment.js", ++ "sourceMapFile": "mapping-semantics-single-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "mapping-semantics-single-field-segment-original.js", ++ "originalLine": 0, ++ "originalColumn": 1, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 2, ++ "originalSource": null, ++ "originalLine": null, ++ "originalColumn": null, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsFourFieldSegment", ++ "description": "Test mapping semantics for a four field segment mapping", ++ "baseFile": "mapping-semantics-four-field-segment.js", ++ "sourceMapFile": "mapping-semantics-four-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-four-field-segment-original.js", ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsFiveFieldSegment", ++ "description": "Test mapping semantics for a five field segment mapping", ++ "baseFile": "mapping-semantics-five-field-segment.js", ++ "sourceMapFile": "mapping-semantics-five-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-five-field-segment-original.js", ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsColumnReset", ++ "description": "Test that the generated column field resets to zero on new lines", ++ "baseFile": "mapping-semantics-column-reset.js", ++ "sourceMapFile": "mapping-semantics-column-reset.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-column-reset-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 1, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-column-reset-original.js", ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsRelative1", ++ "description": "Test that fields are calculated relative to previous ones", ++ "baseFile": "mapping-semantics-relative-1.js", ++ "sourceMapFile": "mapping-semantics-relative-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-relative-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 5, ++ "originalSource": "mapping-semantics-relative-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsRelative2", ++ "description": "Test that fields are calculated relative to previous ones, across lines", ++ "baseFile": "mapping-semantics-relative-2.js", ++ "sourceMapFile": "mapping-semantics-relative-2.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-relative-2-original.js", ++ "originalLine": 0, ++ "originalColumn": 2, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 1, ++ "generatedColumn": 2, ++ "originalSource": "mapping-semantics-relative-2-original.js", ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": "bar" ++ } ++ ] ++ } ++ ] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js +new file mode 100644 +index 0000000000..9263eba549 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-and-sources-content-both-null.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map +new file mode 100644 +index 0000000000..09a7c1f369 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": [null], ++ "sourcesContent": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js +new file mode 100644 +index 0000000000..779b865e27 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-missing.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map +new file mode 100644 +index 0000000000..92aff4fb0e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "version" : 3, ++ "names": ["foo"], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js +new file mode 100644 +index 0000000000..939b568ba1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=sources-non-null-sources-content-null.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map +new file mode 100644 +index 0000000000..e573906b2d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": ["basic-mapping-original.js"], ++ "sourcesContent": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js +new file mode 100644 +index 0000000000..7e33b7e867 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-a-list-1.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map +new file mode 100644 +index 0000000000..26330517b9 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": "not a list", ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js +new file mode 100644 +index 0000000000..4021f763fc +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-a-list-2.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map +new file mode 100644 +index 0000000000..2ed85962fd +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": { "source.js": 3 }, ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js +new file mode 100644 +index 0000000000..7dca97a1da +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-string-or-null.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map +new file mode 100644 +index 0000000000..db25561966 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [3, {}, true, false, []], ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js +new file mode 100644 +index 0000000000..a760594ee9 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=sources-null-sources-content-non-null.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map +new file mode 100644 +index 0000000000..43af03903f +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version":3, ++ "names": ["foo"], ++ "sources": [null], ++ "sourcesContent": ["function foo()\n{ return 42; }\nfunction bar()\n { return 24; }\nfoo();\nbar();"], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js +new file mode 100644 +index 0000000000..0a96699d6e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js +@@ -0,0 +1,5 @@ ++function foo(x) { ++ return x; ++} ++foo("foo"); ++//# sourceMappingURL=transitive-mapping-original.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map +new file mode 100644 +index 0000000000..65af25c1eb +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "file" : "transitive-mapping-original.js", ++ "sourceRoot": "", ++ "sources": ["typescript-original.ts"], ++ "names": [], ++ "mappings": "AACA,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,CAAC,CAAC;AACX,CAAC;AACD,GAAG,CAAC,KAAK,CAAC,CAAC" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js +new file mode 100644 +index 0000000000..fd956164d3 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js +@@ -0,0 +1,6 @@ ++function foo(x) { ++ return x; ++} ++ ++foo("foo"); ++//# sourceMappingURL=transitive-mapping-three-steps.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map +new file mode 100644 +index 0000000000..90459d90f6 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "file": "transitive-mapping-three-steps.js", ++ "sources": ["transitive-mapping.js"], ++ "names": ["foo", "x"], ++ "mappings": "AAAA,SAASA,IAAIC;IAAG,OAAOA;AAAC;;AAACD,IAAI,KAAK" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js +new file mode 100644 +index 0000000000..183c027f1b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js +@@ -0,0 +1,2 @@ ++function foo(x){return x}foo("foo"); ++//# sourceMappingURL=transitive-mapping.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map +new file mode 100644 +index 0000000000..d6a6fa6672 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","x"], ++ "sources": ["transitive-mapping-original.js"], ++ "mappings":"AAAA,SAASA,IAAIC,GACT,OAAOA,CACX,CACAD,IAAI" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts b/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts +new file mode 100644 +index 0000000000..cd51c01ba1 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts +@@ -0,0 +1,5 @@ ++type FooArg = string | number; ++function foo(x : FooArg) { ++ return x; ++} ++foo("foo"); +diff --git a/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js +new file mode 100644 +index 0000000000..19dfb0e2e6 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=unrecognized-property.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map +new file mode 100644 +index 0000000000..40bee558a4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "", ++ "foobar": 42, ++ "unusedProperty": [1, 2, 3, 4] ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js +new file mode 100644 +index 0000000000..3c49709e05 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-boundary-values.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map +new file mode 100644 +index 0000000000..4dd836e63d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "file": "valid-mapping-boundary-values.js", ++ "sources": ["empty-original.js"], ++ "mappings": "+/////DA+/////D+/////DA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js +new file mode 100644 +index 0000000000..a2b767b619 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-empty-groups.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map +new file mode 100644 +index 0000000000..643c9ae784 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "valid-mapping-empty-groups.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js +new file mode 100644 +index 0000000000..b0cd897813 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-large-vlq.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map +new file mode 100644 +index 0000000000..76e18704c4 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["valid-mapping-large-vlq.js"], ++ "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js +new file mode 100644 +index 0000000000..ee2acf0f5b +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=valid-mapping-null-sources.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map +new file mode 100644 +index 0000000000..199cda9369 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version":3, ++ "names": ["foo"], ++ "sources": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-missing.js b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js +new file mode 100644 +index 0000000000..c32d1f1a1c +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-missing.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map +new file mode 100644 +index 0000000000..49d8ce766e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js +new file mode 100644 +index 0000000000..ae2342e2ff +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-not-a-number.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map +new file mode 100644 +index 0000000000..a584d6e695 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : "3foo", ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js +new file mode 100644 +index 0000000000..a55170885d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-numeric-string.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map +new file mode 100644 +index 0000000000..dbe52a7d0d +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : "3", ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js +new file mode 100644 +index 0000000000..55f4e1a298 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-too-high.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map +new file mode 100644 +index 0000000000..ee23be32ff +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 4, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js +new file mode 100644 +index 0000000000..d9642920b3 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-too-low.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map +new file mode 100644 +index 0000000000..64ca7a6e2e +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 2, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-valid.js b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js +new file mode 100644 +index 0000000000..82d0bfa1eb +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-valid.js.map +diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map +new file mode 100644 +index 0000000000..1a163052d8 +--- /dev/null ++++ b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +-- +2.39.2 + diff --git a/test/fixtures/test426/chrome/0002-Add-reverse-mapping-code-to-test.patch b/test/fixtures/test426/chrome/0002-Add-reverse-mapping-code-to-test.patch new file mode 100644 index 00000000000000..dc08ba5fadb482 --- /dev/null +++ b/test/fixtures/test426/chrome/0002-Add-reverse-mapping-code-to-test.patch @@ -0,0 +1,46 @@ +From bebeda0b8133fc8f44382e59edda9203c980e8f3 Mon Sep 17 00:00:00 2001 +From: Asumu Takikawa <asumu@igalia.com> +Date: Thu, 11 Jul 2024 16:44:29 -0700 +Subject: [PATCH 2/2] Add reverse mapping code to test + +--- + front_end/core/sdk/SourceMapSpec.test.ts | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/front_end/core/sdk/SourceMapSpec.test.ts b/front_end/core/sdk/SourceMapSpec.test.ts +index 93b26a2e13..402b82e4c0 100644 +--- a/front_end/core/sdk/SourceMapSpec.test.ts ++++ b/front_end/core/sdk/SourceMapSpec.test.ts +@@ -12,7 +12,6 @@ + + **/ + +-const {assert} = chai; + import type * as Platform from '../platform/platform.js'; + import {assertNotNullOrUndefined} from '../platform/platform.js'; + import { SourceMapV3, parseSourceMap } from './SourceMap.js'; +@@ -170,6 +169,21 @@ describeWithEnvironment('SourceMapSpec', () => { + assert.strictEqual(nullish(actual.sourceURL), originalSource, 'unexpected source URL'); + assert.strictEqual(nullish(actual.sourceLineNumber), originalLine, 'unexpected source line number'); + assert.strictEqual(nullish(actual.sourceColumnNumber), originalColumn, 'unexpected source column number'); ++ ++ if (originalSource != null) { ++ let reverseEntries = sourceMap.findReverseEntries( ++ originalSource as Platform.DevToolsPath.UrlString, ++ originalLine, ++ originalColumn ++ ); ++ ++ const anyEntryMatched = reverseEntries.some((entry) => { ++ return entry.sourceURL === originalSource && ++ entry.sourceLineNumber === originalLine && ++ entry.sourceColumnNumber === originalColumn; ++ }); ++ assert.isTrue(anyEntryMatched, `expected any matching reverse lookup entry, got none`); ++ } + } + }); + } +-- +2.39.2 + diff --git a/test/fixtures/test426/resources/basic-mapping-as-index-map.js b/test/fixtures/test426/resources/basic-mapping-as-index-map.js new file mode 100644 index 00000000000000..b9fae380437d95 --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping-as-index-map.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=basic-mapping-as-index-map.js.map diff --git a/test/fixtures/test426/resources/basic-mapping-as-index-map.js.map b/test/fixtures/test426/resources/basic-mapping-as-index-map.js.map new file mode 100644 index 00000000000000..c0ad870ed2baec --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping-as-index-map.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "file": "basic-mapping-as-index-map.js", + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + } + ] +} diff --git a/test/fixtures/test426/resources/basic-mapping-original.js b/test/fixtures/test426/resources/basic-mapping-original.js new file mode 100644 index 00000000000000..301b186cb15e6d --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping-original.js @@ -0,0 +1,8 @@ +function foo() { + return 42; +} +function bar() { + return 24; +} +foo(); +bar(); diff --git a/test/fixtures/test426/resources/basic-mapping.js b/test/fixtures/test426/resources/basic-mapping.js new file mode 100644 index 00000000000000..2e479a4175b861 --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=basic-mapping.js.map diff --git a/test/fixtures/test426/resources/basic-mapping.js.map b/test/fixtures/test426/resources/basic-mapping.js.map new file mode 100644 index 00000000000000..12dc9679a4b1db --- /dev/null +++ b/test/fixtures/test426/resources/basic-mapping.js.map @@ -0,0 +1,6 @@ +{ + "version":3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +} diff --git a/test/fixtures/test426/resources/file-not-a-string-1.js b/test/fixtures/test426/resources/file-not-a-string-1.js new file mode 100644 index 00000000000000..d049f870450a55 --- /dev/null +++ b/test/fixtures/test426/resources/file-not-a-string-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=file-not-a-string-1.js.map diff --git a/test/fixtures/test426/resources/file-not-a-string-1.js.map b/test/fixtures/test426/resources/file-not-a-string-1.js.map new file mode 100644 index 00000000000000..85e973d881dfbf --- /dev/null +++ b/test/fixtures/test426/resources/file-not-a-string-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "file": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/file-not-a-string-2.js b/test/fixtures/test426/resources/file-not-a-string-2.js new file mode 100644 index 00000000000000..07b8152c0c6cd1 --- /dev/null +++ b/test/fixtures/test426/resources/file-not-a-string-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=file-not-a-string-2.js.map diff --git a/test/fixtures/test426/resources/file-not-a-string-2.js.map b/test/fixtures/test426/resources/file-not-a-string-2.js.map new file mode 100644 index 00000000000000..a5b6b1f9d94fc3 --- /dev/null +++ b/test/fixtures/test426/resources/file-not-a-string-2.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "file": 235324, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/ignore-list-empty.js b/test/fixtures/test426/resources/ignore-list-empty.js new file mode 100644 index 00000000000000..385a5c3501b22c --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-empty.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-empty.js.map diff --git a/test/fixtures/test426/resources/ignore-list-empty.js.map b/test/fixtures/test426/resources/ignore-list-empty.js.map new file mode 100644 index 00000000000000..7297863a9be8ef --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-empty.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [] +} diff --git a/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js b/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js new file mode 100644 index 00000000000000..567174a707ef49 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-out-of-bounds-1.js.map diff --git a/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js.map b/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js.map new file mode 100644 index 00000000000000..fb2566bb419b98 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-out-of-bounds-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [1] +} diff --git a/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js b/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js new file mode 100644 index 00000000000000..4216d9a67315a9 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-out-of-bounds-2.js.map diff --git a/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js.map b/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js.map new file mode 100644 index 00000000000000..41371a76a89663 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-out-of-bounds-2.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [-1] +} diff --git a/test/fixtures/test426/resources/ignore-list-valid-1.js b/test/fixtures/test426/resources/ignore-list-valid-1.js new file mode 100644 index 00000000000000..ea64a5565a6325 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-valid-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-valid-1.js.map diff --git a/test/fixtures/test426/resources/ignore-list-valid-1.js.map b/test/fixtures/test426/resources/ignore-list-valid-1.js.map new file mode 100644 index 00000000000000..98eebdf7f65598 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-valid-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [0] +} diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-1.js b/test/fixtures/test426/resources/ignore-list-wrong-type-1.js new file mode 100644 index 00000000000000..8b40bd38476724 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-wrong-type-1.js.map diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-1.js.map b/test/fixtures/test426/resources/ignore-list-wrong-type-1.js.map new file mode 100644 index 00000000000000..688740aba843fc --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": ["not a number"] +} diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-2.js b/test/fixtures/test426/resources/ignore-list-wrong-type-2.js new file mode 100644 index 00000000000000..35c77911648ef6 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-wrong-type-2.js.map diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-2.js.map b/test/fixtures/test426/resources/ignore-list-wrong-type-2.js.map new file mode 100644 index 00000000000000..ca1d30de2d3626 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-2.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": ["0"] +} diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-3.js b/test/fixtures/test426/resources/ignore-list-wrong-type-3.js new file mode 100644 index 00000000000000..8735d4175804bf --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-3.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-wrong-type-3.js.map diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-3.js.map b/test/fixtures/test426/resources/ignore-list-wrong-type-3.js.map new file mode 100644 index 00000000000000..1ac167d56c4e74 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-3.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": 0 +} diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-4.js b/test/fixtures/test426/resources/ignore-list-wrong-type-4.js new file mode 100644 index 00000000000000..e42f4698a3ec0e --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-4.js @@ -0,0 +1 @@ +//# sourceMappingURL=ignore-list-wrong-type-4.js.map diff --git a/test/fixtures/test426/resources/ignore-list-wrong-type-4.js.map b/test/fixtures/test426/resources/ignore-list-wrong-type-4.js.map new file mode 100644 index 00000000000000..c1a27efe980dd4 --- /dev/null +++ b/test/fixtures/test426/resources/ignore-list-wrong-type-4.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "", + "names": [], + "ignoreList": [0.5] +} diff --git a/test/fixtures/test426/resources/index-map-empty-sections.js b/test/fixtures/test426/resources/index-map-empty-sections.js new file mode 100644 index 00000000000000..abe9f7f30816c6 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-empty-sections.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-empty-sections.js.map diff --git a/test/fixtures/test426/resources/index-map-empty-sections.js.map b/test/fixtures/test426/resources/index-map-empty-sections.js.map new file mode 100644 index 00000000000000..f3efabbe00c395 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-empty-sections.js.map @@ -0,0 +1,4 @@ +{ + "version": 3, + "sections": [] +} diff --git a/test/fixtures/test426/resources/index-map-file-wrong-type-1.js b/test/fixtures/test426/resources/index-map-file-wrong-type-1.js new file mode 100644 index 00000000000000..48bb12855bf5c4 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-file-wrong-type-1.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=index-map-file-wrong-type-1.js.map diff --git a/test/fixtures/test426/resources/index-map-file-wrong-type-1.js.map b/test/fixtures/test426/resources/index-map-file-wrong-type-1.js.map new file mode 100644 index 00000000000000..dd39b5a2b13c19 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-file-wrong-type-1.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "file": [], + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-file-wrong-type-2.js b/test/fixtures/test426/resources/index-map-file-wrong-type-2.js new file mode 100644 index 00000000000000..c002ba726a51bf --- /dev/null +++ b/test/fixtures/test426/resources/index-map-file-wrong-type-2.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=index-map-file-wrong-type-2.js.map diff --git a/test/fixtures/test426/resources/index-map-file-wrong-type-2.js.map b/test/fixtures/test426/resources/index-map-file-wrong-type-2.js.map new file mode 100644 index 00000000000000..0ee0a406be8d60 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-file-wrong-type-2.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "file": 2345234234, + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-invalid-base-mappings.js b/test/fixtures/test426/resources/index-map-invalid-base-mappings.js new file mode 100644 index 00000000000000..e90bef083c4925 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-base-mappings.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-invalid-base-mappings.js.map diff --git a/test/fixtures/test426/resources/index-map-invalid-base-mappings.js.map b/test/fixtures/test426/resources/index-map-invalid-base-mappings.js.map new file mode 100644 index 00000000000000..4ad1fefe65097b --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-base-mappings.js.map @@ -0,0 +1,16 @@ +{ + "version": 3, + "mappings": "AAAA", + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContnet": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-invalid-order.js b/test/fixtures/test426/resources/index-map-invalid-order.js new file mode 100644 index 00000000000000..263fa3c6e0b92e --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-order.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-invalid-order.js.map diff --git a/test/fixtures/test426/resources/index-map-invalid-order.js.map b/test/fixtures/test426/resources/index-map-invalid-order.js.map new file mode 100644 index 00000000000000..74e0c1d052c4bc --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-order.js.map @@ -0,0 +1,25 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 1, "column": 4 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original-1.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + }, + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original-2.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-invalid-overlap.js b/test/fixtures/test426/resources/index-map-invalid-overlap.js new file mode 100644 index 00000000000000..9aff8dc6203abc --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-overlap.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-invalid-overlap.js.map diff --git a/test/fixtures/test426/resources/index-map-invalid-overlap.js.map b/test/fixtures/test426/resources/index-map-invalid-overlap.js.map new file mode 100644 index 00000000000000..3c08cb7beb59d9 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-overlap.js.map @@ -0,0 +1,25 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original-1.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + }, + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original-2.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-invalid-sub-map.js b/test/fixtures/test426/resources/index-map-invalid-sub-map.js new file mode 100644 index 00000000000000..284e8d77e6591e --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-sub-map.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-invalid-sub-map.js.map diff --git a/test/fixtures/test426/resources/index-map-invalid-sub-map.js.map b/test/fixtures/test426/resources/index-map-invalid-sub-map.js.map new file mode 100644 index 00000000000000..4020ae30c5765b --- /dev/null +++ b/test/fixtures/test426/resources/index-map-invalid-sub-map.js.map @@ -0,0 +1,13 @@ +{ + "version": 3, + "file": "index-map-invalid-sub-map.js", + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": "3", + "mappings": 7 + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-file.js b/test/fixtures/test426/resources/index-map-missing-file.js new file mode 100644 index 00000000000000..be2a93cb77cdee --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-file.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=index-map-missing-file.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-file.js.map b/test/fixtures/test426/resources/index-map-missing-file.js.map new file mode 100644 index 00000000000000..8a6d4b5dc78800 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-file.js.map @@ -0,0 +1,14 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-map.js b/test/fixtures/test426/resources/index-map-missing-map.js new file mode 100644 index 00000000000000..86c8e9a2535ad9 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-map.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-missing-map.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-map.js.map b/test/fixtures/test426/resources/index-map-missing-map.js.map new file mode 100644 index 00000000000000..3bce47e852cfec --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-map.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": 0 } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-offset-column.js b/test/fixtures/test426/resources/index-map-missing-offset-column.js new file mode 100644 index 00000000000000..fe6917403f1804 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-missing-offset-column.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-offset-column.js.map b/test/fixtures/test426/resources/index-map-missing-offset-column.js.map new file mode 100644 index 00000000000000..ae27aa5e62c72d --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset-column.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-offset-line.js b/test/fixtures/test426/resources/index-map-missing-offset-line.js new file mode 100644 index 00000000000000..ba8614e412cef8 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset-line.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-missing-offset-line.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-offset-line.js.map b/test/fixtures/test426/resources/index-map-missing-offset-line.js.map new file mode 100644 index 00000000000000..7b128e96b0b7cb --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset-line.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-missing-offset.js b/test/fixtures/test426/resources/index-map-missing-offset.js new file mode 100644 index 00000000000000..9ca2cf3fb5159d --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-missing-offset.js.map diff --git a/test/fixtures/test426/resources/index-map-missing-offset.js.map b/test/fixtures/test426/resources/index-map-missing-offset.js.map new file mode 100644 index 00000000000000..7737595d848cd6 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-missing-offset.js.map @@ -0,0 +1,14 @@ +{ + "version": 3, + "sections": [ + { + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js b/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js new file mode 100644 index 00000000000000..ed1e9ec5d5b8a6 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-offset-column-wrong-type.js.map diff --git a/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js.map b/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js.map new file mode 100644 index 00000000000000..6ea11758c1e448 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-offset-column-wrong-type.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": true }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js b/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js new file mode 100644 index 00000000000000..d58f2aff993e6e --- /dev/null +++ b/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-offset-line-wrong-type.js.map diff --git a/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js.map b/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js.map new file mode 100644 index 00000000000000..d48b2f43f16b21 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-offset-line-wrong-type.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": true, "column": 0 }, + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-two-concatenated-sources.js b/test/fixtures/test426/resources/index-map-two-concatenated-sources.js new file mode 100644 index 00000000000000..b8702d7187c925 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-two-concatenated-sources.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar();function baz(){return"baz"}baz(); +//# sourceMappingURL=index-map-two-concatenated-sources.js.map diff --git a/test/fixtures/test426/resources/index-map-two-concatenated-sources.js.map b/test/fixtures/test426/resources/index-map-two-concatenated-sources.js.map new file mode 100644 index 00000000000000..f67f5de3c5d8c3 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-two-concatenated-sources.js.map @@ -0,0 +1,24 @@ +{ + "version": 3, + "file": "index-map-two-concatenated-sources.js", + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": { + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" + } + }, + { + "offset": { "line": 0, "column": 62 }, + "map": { + "version": 3, + "names": ["baz"], + "sources": ["second-source-original.js"], + "mappings":"AAAA,SAASA,MACP,MAAO,KACT,CACAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-wrong-type-map.js b/test/fixtures/test426/resources/index-map-wrong-type-map.js new file mode 100644 index 00000000000000..d31d6d6358b493 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-map.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-wrong-type-map.js.map diff --git a/test/fixtures/test426/resources/index-map-wrong-type-map.js.map b/test/fixtures/test426/resources/index-map-wrong-type-map.js.map new file mode 100644 index 00000000000000..0963f623d761a9 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-map.js.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "sections": [ + { + "offset": { "line": 0, "column": 0 }, + "map": "not a map" + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-wrong-type-offset.js b/test/fixtures/test426/resources/index-map-wrong-type-offset.js new file mode 100644 index 00000000000000..048e1246f8b01b --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-offset.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-wrong-type-offset.js.map diff --git a/test/fixtures/test426/resources/index-map-wrong-type-offset.js.map b/test/fixtures/test426/resources/index-map-wrong-type-offset.js.map new file mode 100644 index 00000000000000..645278c3b4755a --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-offset.js.map @@ -0,0 +1,15 @@ +{ + "version": 3, + "sections": [ + { + "offset": "not an offset", + "map": { + "version": 3, + "names": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAA" + } + } + ] +} diff --git a/test/fixtures/test426/resources/index-map-wrong-type-sections.js b/test/fixtures/test426/resources/index-map-wrong-type-sections.js new file mode 100644 index 00000000000000..011eca806ed600 --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-sections.js @@ -0,0 +1 @@ +//# sourceMappingURL=index-map-wrong-type-sections.js.map diff --git a/test/fixtures/test426/resources/index-map-wrong-type-sections.js.map b/test/fixtures/test426/resources/index-map-wrong-type-sections.js.map new file mode 100644 index 00000000000000..dbfb4ead3001fb --- /dev/null +++ b/test/fixtures/test426/resources/index-map-wrong-type-sections.js.map @@ -0,0 +1,4 @@ +{ + "version": 3, + "sections": "not a sections list" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-bad-separator.js b/test/fixtures/test426/resources/invalid-mapping-bad-separator.js new file mode 100644 index 00000000000000..25338aca30cefd --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-bad-separator.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=invalid-mapping-bad-separator.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-bad-separator.js.map b/test/fixtures/test426/resources/invalid-mapping-bad-separator.js.map new file mode 100644 index 00000000000000..5f4f5b92330a6b --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-bad-separator.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAAA.SAASA:MACP" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js b/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js new file mode 100644 index 00000000000000..cb38e2fe9d7b1d --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js.map b/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js.map new file mode 100644 index 00000000000000..73d74bef42e202 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-not-a-string-1.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-not-a-string-1.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": 5 +} diff --git a/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js b/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js new file mode 100644 index 00000000000000..3d84abd6c6b480 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js.map b/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js.map new file mode 100644 index 00000000000000..3143cbce170b9e --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-not-a-string-2.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-not-a-string-2.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": [1, 2, 3, 4] +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js new file mode 100644 index 00000000000000..55591f874b1b9e --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js.map new file mode 100644 index 00000000000000..96b3ce97dcb271 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-column-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-column-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "ggggggE" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js new file mode 100644 index 00000000000000..2a6b434eff5819 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map new file mode 100644 index 00000000000000..3efb8da9abbaa6 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": ["foo"], + "file": "invalid-mapping-segment-name-index-out-of-bounds.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAAC" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js new file mode 100644 index 00000000000000..709e34dbd326a0 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js.map new file mode 100644 index 00000000000000..1d44bb8300f7c0 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-name-index-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-name-index-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAAggggggE" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js new file mode 100644 index 00000000000000..a202152d6fdf29 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js.map new file mode 100644 index 00000000000000..bb7e887dc05f4a --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-column.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-column.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "F" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js new file mode 100644 index 00000000000000..3e3f6342046785 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js.map new file mode 100644 index 00000000000000..5197ab23b1d2cd --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-name-index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-name-index.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAAF" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js new file mode 100644 index 00000000000000..f21d5342b395a8 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js.map new file mode 100644 index 00000000000000..4a76cb3e390636 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-column.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-original-column.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAF" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js new file mode 100644 index 00000000000000..b37309601ce013 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js.map new file mode 100644 index 00000000000000..40170361b5ddf8 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-original-line.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-original-line.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAFA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js new file mode 100644 index 00000000000000..94b835d6877c07 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-column.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js.map new file mode 100644 index 00000000000000..414884072b55a5 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-column.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-column.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "C,F" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js new file mode 100644 index 00000000000000..c965c5f011f584 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-name-index.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js.map new file mode 100644 index 00000000000000..1fbbcfcd323e5f --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-name-index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-name-index.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAAC,AAAAF" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js new file mode 100644 index 00000000000000..493a6ec88a391a --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-column.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js.map new file mode 100644 index 00000000000000..7e62895651fa30 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-column.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-original-column.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAC,AAAF" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js new file mode 100644 index 00000000000000..ca8329fb98f02a --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-line.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js.map new file mode 100644 index 00000000000000..86b0fb3a04cc3d --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-original-line.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-original-line.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AACA,AAFA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js new file mode 100644 index 00000000000000..fa92225b096325 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-relative-source-index.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js.map new file mode 100644 index 00000000000000..2efeb047db618e --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-relative-source-index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-relative-source-index.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "ACAA,AFAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js b/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js new file mode 100644 index 00000000000000..6e05849b6a0354 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js.map new file mode 100644 index 00000000000000..ed835d8007ca68 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-negative-source-index.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-negative-source-index.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AFAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js new file mode 100644 index 00000000000000..0936ed7ea8fdd4 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js.map new file mode 100644 index 00000000000000..8dee1df731c241 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-original-column-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-original-column-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAAggggggE" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js new file mode 100644 index 00000000000000..9b3aa5a361ae96 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js.map new file mode 100644 index 00000000000000..8ee6fea9c8350a --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-original-line-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-original-line-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AAggggggEA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js new file mode 100644 index 00000000000000..2e5fbca26825ae --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map new file mode 100644 index 00000000000000..fec001a67329e8 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-source-index-out-of-bounds.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "ACAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js new file mode 100644 index 00000000000000..3f4943e1272d01 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js.map new file mode 100644 index 00000000000000..555489fa65701f --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-source-index-too-large.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-source-index-too-large.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "AggggggEAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js b/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js new file mode 100644 index 00000000000000..ad452d96af8286 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js.map new file mode 100644 index 00000000000000..c2af1165ad8f1f --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-three-fields.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AAA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js b/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js new file mode 100644 index 00000000000000..04c520b47877a1 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js.map new file mode 100644 index 00000000000000..73cf00fa1c9606 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-two-fields.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": ["foo","bar"], + "sources": ["basic-mapping-original.js"], + "mappings": "AA" +} diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js b/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js new file mode 100644 index 00000000000000..cf627825a581f0 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map diff --git a/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js.map b/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js.map new file mode 100644 index 00000000000000..fb8e7cff64c376 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-mapping-segment-with-zero-fields.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "invalid-mapping-segment-with-zero-fields.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": ",,,," +} diff --git a/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js b/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js new file mode 100644 index 00000000000000..2c2a0090aca613 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-vlq-missing-continuation.js.map diff --git a/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js.map b/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js.map new file mode 100644 index 00000000000000..dd0e363ff47354 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-missing-continuation.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": [], + "names": [], + "mappings": "g" +} diff --git a/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js b/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js new file mode 100644 index 00000000000000..557cb6aed3b262 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-vlq-non-base64-char-padding.js.map diff --git a/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js.map b/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js.map new file mode 100644 index 00000000000000..b439caabc88143 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-non-base64-char-padding.js.map @@ -0,0 +1,7 @@ +{ + "version" : 3, + "sources": ["foo.js"], + "sourcesContent": ["hello world"], + "names": [], + "mappings": ";;A=" +} diff --git a/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js b/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js new file mode 100644 index 00000000000000..d1b20b41a29fc5 --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js @@ -0,0 +1 @@ +//# sourceMappingURL=invalid-vlq-non-base64-char.js.map diff --git a/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js.map b/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js.map new file mode 100644 index 00000000000000..4fa1ac5768853e --- /dev/null +++ b/test/fixtures/test426/resources/invalid-vlq-non-base64-char.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": [], + "names": [], + "mappings": "A$%?!" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-column-reset.js b/test/fixtures/test426/resources/mapping-semantics-column-reset.js new file mode 100644 index 00000000000000..b64482d0984324 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-column-reset.js @@ -0,0 +1,3 @@ + foo + bar +//# sourceMappingURL=mapping-semantics-column-reset.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-column-reset.js.map b/test/fixtures/test426/resources/mapping-semantics-column-reset.js.map new file mode 100644 index 00000000000000..97bc9b91a43d51 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-column-reset.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["mapping-semantics-column-reset-original.js"], + "sourcesContent": ["foo\nbar"], + "mappings": "CAAA;CACA" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js b/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js new file mode 100644 index 00000000000000..0f6602d61503c5 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js @@ -0,0 +1,2 @@ +foo +//# sourceMappingURL=mapping-semantics-five-field-segment.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js.map b/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js.map new file mode 100644 index 00000000000000..d0504f511dad2d --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-five-field-segment.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": ["foo"], + "sources": ["unused", "mapping-semantics-five-field-segment-original.js"], + "sourcesContent": ["", "\n\n foo"], + "mappings": "CCEEA" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js b/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js new file mode 100644 index 00000000000000..3dcbee9294c0b4 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js @@ -0,0 +1,2 @@ +foo +//# sourceMappingURL=mapping-semantics-four-field-segment.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js.map b/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js.map new file mode 100644 index 00000000000000..9e01ac4b6c58f8 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-four-field-segment.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["unused", "mapping-semantics-four-field-segment-original.js"], + "sourcesContent": ["", "\n\n foo"], + "mappings": "CCEE" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-relative-1.js b/test/fixtures/test426/resources/mapping-semantics-relative-1.js new file mode 100644 index 00000000000000..281870cc50e772 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-relative-1.js @@ -0,0 +1,2 @@ + 42; 24; +//# sourceMappingURL=mapping-semantics-relative-1.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-relative-1.js.map b/test/fixtures/test426/resources/mapping-semantics-relative-1.js.map new file mode 100644 index 00000000000000..6570031f8983f4 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-relative-1.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["unused", "mapping-semantics-relative-1-original.js"], + "sourcesContent": ["", "42; 24;"], + "mappings": "CCAA,IAAI" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-relative-2.js b/test/fixtures/test426/resources/mapping-semantics-relative-2.js new file mode 100644 index 00000000000000..f4bff1c75bccef --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-relative-2.js @@ -0,0 +1,3 @@ + foo + bar +//# sourceMappingURL=mapping-semantics-relative-2.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-relative-2.js.map b/test/fixtures/test426/resources/mapping-semantics-relative-2.js.map new file mode 100644 index 00000000000000..d6845233f91207 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-relative-2.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": ["foo", "bar"], + "sources": ["unused", "mapping-semantics-relative-2-original.js"], + "sourcesContent": ["", " foo\n bar"], + "mappings": "CCAEA;EACAC" +} diff --git a/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js b/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js new file mode 100644 index 00000000000000..ca06b7c58d8847 --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js @@ -0,0 +1,2 @@ + 3 +//# sourceMappingURL=mapping-semantics-single-field-segment.js.map diff --git a/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js.map b/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js.map new file mode 100644 index 00000000000000..8260d63085d79b --- /dev/null +++ b/test/fixtures/test426/resources/mapping-semantics-single-field-segment.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["mapping-semantics-single-field-segment-original.js"], + "sourcesContent": ["3 3"], + "mappings": "AAAC,E" +} diff --git a/test/fixtures/test426/resources/mappings-missing.js b/test/fixtures/test426/resources/mappings-missing.js new file mode 100644 index 00000000000000..07a8361e8fcae9 --- /dev/null +++ b/test/fixtures/test426/resources/mappings-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=mappings-missing.js.map diff --git a/test/fixtures/test426/resources/mappings-missing.js.map b/test/fixtures/test426/resources/mappings-missing.js.map new file mode 100644 index 00000000000000..7a60084729612d --- /dev/null +++ b/test/fixtures/test426/resources/mappings-missing.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "names": ["foo"], + "sources": ["1.js"], + "sourcesContent": ["hello world"] +} diff --git a/test/fixtures/test426/resources/names-missing.js b/test/fixtures/test426/resources/names-missing.js new file mode 100644 index 00000000000000..58781fd88705d3 --- /dev/null +++ b/test/fixtures/test426/resources/names-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=names-missing.js.map diff --git a/test/fixtures/test426/resources/names-missing.js.map b/test/fixtures/test426/resources/names-missing.js.map new file mode 100644 index 00000000000000..475f4e309b2641 --- /dev/null +++ b/test/fixtures/test426/resources/names-missing.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": ["empty-original.js"], + "sourcesContent" : [""], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/names-not-a-list-1.js b/test/fixtures/test426/resources/names-not-a-list-1.js new file mode 100644 index 00000000000000..dc65f1972b5a87 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-a-list-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=names-not-a-list-1.js.map diff --git a/test/fixtures/test426/resources/names-not-a-list-1.js.map b/test/fixtures/test426/resources/names-not-a-list-1.js.map new file mode 100644 index 00000000000000..fe1edaeb96ad90 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-a-list-1.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": ["source.js"], + "names": "not a list", + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/names-not-a-list-2.js b/test/fixtures/test426/resources/names-not-a-list-2.js new file mode 100644 index 00000000000000..d7251f78da8457 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-a-list-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=names-not-a-list-2.js.map diff --git a/test/fixtures/test426/resources/names-not-a-list-2.js.map b/test/fixtures/test426/resources/names-not-a-list-2.js.map new file mode 100644 index 00000000000000..3388d2bb7109d0 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-a-list-2.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": ["source.js"], + "names": { "foo": 3 }, + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/names-not-string.js b/test/fixtures/test426/resources/names-not-string.js new file mode 100644 index 00000000000000..8dc7b4811a3e91 --- /dev/null +++ b/test/fixtures/test426/resources/names-not-string.js @@ -0,0 +1 @@ +//# sourceMappingURL=names-not-string.js.map diff --git a/test/fixtures/test426/resources/names-not-string.js.map b/test/fixtures/test426/resources/names-not-string.js.map new file mode 100644 index 00000000000000..c0feb0739aecff --- /dev/null +++ b/test/fixtures/test426/resources/names-not-string.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": ["source.js"], + "names": [null, 3, true, false, {}, []], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/second-source-original.js b/test/fixtures/test426/resources/second-source-original.js new file mode 100644 index 00000000000000..c339bc9d15daa0 --- /dev/null +++ b/test/fixtures/test426/resources/second-source-original.js @@ -0,0 +1,4 @@ +function baz() { + return "baz"; +} +baz(); diff --git a/test/fixtures/test426/resources/source-resolution-absolute-url.js b/test/fixtures/test426/resources/source-resolution-absolute-url.js new file mode 100644 index 00000000000000..7ab34b6bd0fac9 --- /dev/null +++ b/test/fixtures/test426/resources/source-resolution-absolute-url.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=source-resolution-absolute-url.js.map diff --git a/test/fixtures/test426/resources/source-resolution-absolute-url.js.map b/test/fixtures/test426/resources/source-resolution-absolute-url.js.map new file mode 100644 index 00000000000000..195dc42ecea399 --- /dev/null +++ b/test/fixtures/test426/resources/source-resolution-absolute-url.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "file": "source-root-resolution.js", + "names": ["foo", "bar"], + "sources": ["/baz/quux/basic-mapping-original.js"], + "sourcesContent": ["function foo() {\nreturn 42;\n }\n function bar() {\n return 24;\n }\n foo();\n bar();"], + "mappings": "AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/source-root-not-a-string-1.js b/test/fixtures/test426/resources/source-root-not-a-string-1.js new file mode 100644 index 00000000000000..f176f3143a4adf --- /dev/null +++ b/test/fixtures/test426/resources/source-root-not-a-string-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=source-root-not-a-string-1.js.map diff --git a/test/fixtures/test426/resources/source-root-not-a-string-1.js.map b/test/fixtures/test426/resources/source-root-not-a-string-1.js.map new file mode 100644 index 00000000000000..e297f5c03e5096 --- /dev/null +++ b/test/fixtures/test426/resources/source-root-not-a-string-1.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sourceRoot": [], + "sources": ["empty-original.js"], + "sourcesContent": [""], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/source-root-not-a-string-2.js b/test/fixtures/test426/resources/source-root-not-a-string-2.js new file mode 100644 index 00000000000000..e7e6d9547825e6 --- /dev/null +++ b/test/fixtures/test426/resources/source-root-not-a-string-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=source-root-not-a-string-2.js.map diff --git a/test/fixtures/test426/resources/source-root-not-a-string-2.js.map b/test/fixtures/test426/resources/source-root-not-a-string-2.js.map new file mode 100644 index 00000000000000..d5705ebfb8e982 --- /dev/null +++ b/test/fixtures/test426/resources/source-root-not-a-string-2.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sourceRoot": -10923409, + "sources": ["empty-original.js"], + "sourcesContent": [""], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/source-root-resolution.js b/test/fixtures/test426/resources/source-root-resolution.js new file mode 100644 index 00000000000000..15a1a4c95026b0 --- /dev/null +++ b/test/fixtures/test426/resources/source-root-resolution.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=source-root-resolution.js.map diff --git a/test/fixtures/test426/resources/source-root-resolution.js.map b/test/fixtures/test426/resources/source-root-resolution.js.map new file mode 100644 index 00000000000000..52fc9a23793f7c --- /dev/null +++ b/test/fixtures/test426/resources/source-root-resolution.js.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "sourceRoot": "theroot", + "file": "source-root-resolution.js", + "names": ["foo", "bar"], + "sources": ["basic-mapping-original.js"], + "sourcesContent": ["function foo() {\n return 42;\n }\n function bar() {\n return 24;\n }\n foo();\n bar();"], + "mappings": "AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/sources-and-sources-content-both-null.js b/test/fixtures/test426/resources/sources-and-sources-content-both-null.js new file mode 100644 index 00000000000000..9263eba549f5b6 --- /dev/null +++ b/test/fixtures/test426/resources/sources-and-sources-content-both-null.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-and-sources-content-both-null.js.map diff --git a/test/fixtures/test426/resources/sources-and-sources-content-both-null.js.map b/test/fixtures/test426/resources/sources-and-sources-content-both-null.js.map new file mode 100644 index 00000000000000..09a7c1f3698ce6 --- /dev/null +++ b/test/fixtures/test426/resources/sources-and-sources-content-both-null.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": ["foo"], + "sources": [null], + "sourcesContent": [null], + "mappings":"AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/sources-content-missing.js b/test/fixtures/test426/resources/sources-content-missing.js new file mode 100644 index 00000000000000..c97d9f133a590d --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-content-missing.js.map diff --git a/test/fixtures/test426/resources/sources-content-missing.js.map b/test/fixtures/test426/resources/sources-content-missing.js.map new file mode 100644 index 00000000000000..fa7922f5c783fe --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-missing.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "names": ["foo"], + "sources": ["basic-mapping-original.js"], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/sources-content-not-a-list-1.js b/test/fixtures/test426/resources/sources-content-not-a-list-1.js new file mode 100644 index 00000000000000..5395f8b6fbe655 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-a-list-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-content-not-a-list-1.js.map diff --git a/test/fixtures/test426/resources/sources-content-not-a-list-1.js.map b/test/fixtures/test426/resources/sources-content-not-a-list-1.js.map new file mode 100644 index 00000000000000..3710f95111b755 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-a-list-1.js.map @@ -0,0 +1,7 @@ +{ + "version" : 3, + "sources": ["first.js"], + "sourcesContent": "not a list", + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-content-not-a-list-2.js b/test/fixtures/test426/resources/sources-content-not-a-list-2.js new file mode 100644 index 00000000000000..0ccc4aa460af30 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-a-list-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-content-not-a-list-2.js.map diff --git a/test/fixtures/test426/resources/sources-content-not-a-list-2.js.map b/test/fixtures/test426/resources/sources-content-not-a-list-2.js.map new file mode 100644 index 00000000000000..ab9ae257c1f9e4 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-a-list-2.js.map @@ -0,0 +1,7 @@ +{ + "version" : 3, + "sources": ["first.js"], + "sourcesContent": { "foobar baz": 3 }, + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-content-not-string-or-null.js b/test/fixtures/test426/resources/sources-content-not-string-or-null.js new file mode 100644 index 00000000000000..480b4ba7403f88 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-string-or-null.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-content-not-string-or-null.js.map diff --git a/test/fixtures/test426/resources/sources-content-not-string-or-null.js.map b/test/fixtures/test426/resources/sources-content-not-string-or-null.js.map new file mode 100644 index 00000000000000..6e6c2517150b96 --- /dev/null +++ b/test/fixtures/test426/resources/sources-content-not-string-or-null.js.map @@ -0,0 +1,7 @@ +{ + "version" : 3, + "sources": ["1.js", "2.js", "3.js", "4.js", "5.js"], + "sourcesContent": [3, {}, true, false, []], + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-missing.js b/test/fixtures/test426/resources/sources-missing.js new file mode 100644 index 00000000000000..779b865e2769ad --- /dev/null +++ b/test/fixtures/test426/resources/sources-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-missing.js.map diff --git a/test/fixtures/test426/resources/sources-missing.js.map b/test/fixtures/test426/resources/sources-missing.js.map new file mode 100644 index 00000000000000..92aff4fb0e74b1 --- /dev/null +++ b/test/fixtures/test426/resources/sources-missing.js.map @@ -0,0 +1,5 @@ +{ + "version" : 3, + "names": ["foo"], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/sources-non-null-sources-content-null.js b/test/fixtures/test426/resources/sources-non-null-sources-content-null.js new file mode 100644 index 00000000000000..939b568ba14251 --- /dev/null +++ b/test/fixtures/test426/resources/sources-non-null-sources-content-null.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=sources-non-null-sources-content-null.js.map diff --git a/test/fixtures/test426/resources/sources-non-null-sources-content-null.js.map b/test/fixtures/test426/resources/sources-non-null-sources-content-null.js.map new file mode 100644 index 00000000000000..e573906b2d7144 --- /dev/null +++ b/test/fixtures/test426/resources/sources-non-null-sources-content-null.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": ["foo"], + "sources": ["basic-mapping-original.js"], + "sourcesContent": [null], + "mappings":"AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/sources-not-a-list-1.js b/test/fixtures/test426/resources/sources-not-a-list-1.js new file mode 100644 index 00000000000000..7e33b7e8672535 --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-a-list-1.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-not-a-list-1.js.map diff --git a/test/fixtures/test426/resources/sources-not-a-list-1.js.map b/test/fixtures/test426/resources/sources-not-a-list-1.js.map new file mode 100644 index 00000000000000..26330517b9884f --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-a-list-1.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": "not a list", + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-not-a-list-2.js b/test/fixtures/test426/resources/sources-not-a-list-2.js new file mode 100644 index 00000000000000..4021f763fc880b --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-a-list-2.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-not-a-list-2.js.map diff --git a/test/fixtures/test426/resources/sources-not-a-list-2.js.map b/test/fixtures/test426/resources/sources-not-a-list-2.js.map new file mode 100644 index 00000000000000..2ed85962fddf31 --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-a-list-2.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": { "source.js": 3 }, + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-not-string-or-null.js b/test/fixtures/test426/resources/sources-not-string-or-null.js new file mode 100644 index 00000000000000..7dca97a1dab557 --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-string-or-null.js @@ -0,0 +1 @@ +//# sourceMappingURL=sources-not-string-or-null.js.map diff --git a/test/fixtures/test426/resources/sources-not-string-or-null.js.map b/test/fixtures/test426/resources/sources-not-string-or-null.js.map new file mode 100644 index 00000000000000..db25561966056d --- /dev/null +++ b/test/fixtures/test426/resources/sources-not-string-or-null.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": [3, {}, true, false, []], + "names": ["foo"], + "mappings": "AAAAA" +} diff --git a/test/fixtures/test426/resources/sources-null-sources-content-non-null.js b/test/fixtures/test426/resources/sources-null-sources-content-non-null.js new file mode 100644 index 00000000000000..a760594ee9bd13 --- /dev/null +++ b/test/fixtures/test426/resources/sources-null-sources-content-non-null.js @@ -0,0 +1,2 @@ +function foo(){return 42}function bar(){return 24}foo();bar(); +//# sourceMappingURL=sources-null-sources-content-non-null.js.map diff --git a/test/fixtures/test426/resources/sources-null-sources-content-non-null.js.map b/test/fixtures/test426/resources/sources-null-sources-content-non-null.js.map new file mode 100644 index 00000000000000..43af03903f64f8 --- /dev/null +++ b/test/fixtures/test426/resources/sources-null-sources-content-non-null.js.map @@ -0,0 +1,7 @@ +{ + "version":3, + "names": ["foo"], + "sources": [null], + "sourcesContent": ["function foo()\n{ return 42; }\nfunction bar()\n { return 24; }\nfoo();\nbar();"], + "mappings":"AAAA,SAASA" +} diff --git a/test/fixtures/test426/resources/transitive-mapping-original.js b/test/fixtures/test426/resources/transitive-mapping-original.js new file mode 100644 index 00000000000000..0a96699d6e2540 --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping-original.js @@ -0,0 +1,5 @@ +function foo(x) { + return x; +} +foo("foo"); +//# sourceMappingURL=transitive-mapping-original.js.map diff --git a/test/fixtures/test426/resources/transitive-mapping-original.js.map b/test/fixtures/test426/resources/transitive-mapping-original.js.map new file mode 100644 index 00000000000000..65af25c1ebbe4c --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping-original.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "file" : "transitive-mapping-original.js", + "sourceRoot": "", + "sources": ["typescript-original.ts"], + "names": [], + "mappings": "AACA,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,CAAC,CAAC;AACX,CAAC;AACD,GAAG,CAAC,KAAK,CAAC,CAAC" +} diff --git a/test/fixtures/test426/resources/transitive-mapping-three-steps.js b/test/fixtures/test426/resources/transitive-mapping-three-steps.js new file mode 100644 index 00000000000000..fd956164d34906 --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping-three-steps.js @@ -0,0 +1,6 @@ +function foo(x) { + return x; +} + +foo("foo"); +//# sourceMappingURL=transitive-mapping-three-steps.js.map diff --git a/test/fixtures/test426/resources/transitive-mapping-three-steps.js.map b/test/fixtures/test426/resources/transitive-mapping-three-steps.js.map new file mode 100644 index 00000000000000..90459d90f6a0ea --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping-three-steps.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "file": "transitive-mapping-three-steps.js", + "sources": ["transitive-mapping.js"], + "names": ["foo", "x"], + "mappings": "AAAA,SAASA,IAAIC;IAAG,OAAOA;AAAC;;AAACD,IAAI,KAAK" +} diff --git a/test/fixtures/test426/resources/transitive-mapping.js b/test/fixtures/test426/resources/transitive-mapping.js new file mode 100644 index 00000000000000..183c027f1bb81e --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping.js @@ -0,0 +1,2 @@ +function foo(x){return x}foo("foo"); +//# sourceMappingURL=transitive-mapping.js.map diff --git a/test/fixtures/test426/resources/transitive-mapping.js.map b/test/fixtures/test426/resources/transitive-mapping.js.map new file mode 100644 index 00000000000000..d6a6fa6672d483 --- /dev/null +++ b/test/fixtures/test426/resources/transitive-mapping.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": ["foo","x"], + "sources": ["transitive-mapping-original.js"], + "mappings":"AAAA,SAASA,IAAIC,GACT,OAAOA,CACX,CACAD,IAAI" +} diff --git a/test/fixtures/test426/resources/typescript-original.ts b/test/fixtures/test426/resources/typescript-original.ts new file mode 100644 index 00000000000000..cd51c01ba1297e --- /dev/null +++ b/test/fixtures/test426/resources/typescript-original.ts @@ -0,0 +1,5 @@ +type FooArg = string | number; +function foo(x : FooArg) { + return x; +} +foo("foo"); diff --git a/test/fixtures/test426/resources/unrecognized-property.js b/test/fixtures/test426/resources/unrecognized-property.js new file mode 100644 index 00000000000000..19dfb0e2e6c7c1 --- /dev/null +++ b/test/fixtures/test426/resources/unrecognized-property.js @@ -0,0 +1 @@ +//# sourceMappingURL=unrecognized-property.js.map diff --git a/test/fixtures/test426/resources/unrecognized-property.js.map b/test/fixtures/test426/resources/unrecognized-property.js.map new file mode 100644 index 00000000000000..40bee558a4ff92 --- /dev/null +++ b/test/fixtures/test426/resources/unrecognized-property.js.map @@ -0,0 +1,8 @@ +{ + "version" : 3, + "sources": [], + "names": [], + "mappings": "", + "foobar": 42, + "unusedProperty": [1, 2, 3, 4] +} diff --git a/test/fixtures/test426/resources/valid-mapping-boundary-values.js b/test/fixtures/test426/resources/valid-mapping-boundary-values.js new file mode 100644 index 00000000000000..3c49709e05ac02 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-boundary-values.js @@ -0,0 +1 @@ +//# sourceMappingURL=valid-mapping-boundary-values.js.map diff --git a/test/fixtures/test426/resources/valid-mapping-boundary-values.js.map b/test/fixtures/test426/resources/valid-mapping-boundary-values.js.map new file mode 100644 index 00000000000000..39943bc891655e --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-boundary-values.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": ["foo"], + "file": "valid-mapping-boundary-values.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "+/////DA+/////D+/////DA" +} diff --git a/test/fixtures/test426/resources/valid-mapping-empty-groups.js b/test/fixtures/test426/resources/valid-mapping-empty-groups.js new file mode 100644 index 00000000000000..a2b767b619a03c --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-empty-groups.js @@ -0,0 +1 @@ +//# sourceMappingURL=valid-mapping-empty-groups.js.map diff --git a/test/fixtures/test426/resources/valid-mapping-empty-groups.js.map b/test/fixtures/test426/resources/valid-mapping-empty-groups.js.map new file mode 100644 index 00000000000000..643c9ae78481a9 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-empty-groups.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "valid-mapping-empty-groups.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" +} diff --git a/test/fixtures/test426/resources/valid-mapping-empty-string.js b/test/fixtures/test426/resources/valid-mapping-empty-string.js new file mode 100644 index 00000000000000..83fc1bf3ac7314 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-empty-string.js @@ -0,0 +1 @@ +//# sourceMappingURL=valid-mapping-empty-string.js.map diff --git a/test/fixtures/test426/resources/valid-mapping-empty-string.js.map b/test/fixtures/test426/resources/valid-mapping-empty-string.js.map new file mode 100644 index 00000000000000..a35268d8f5b88b --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-empty-string.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "names": [], + "file": "valid-mapping-empty-string.js", + "sources": ["empty-original.js"], + "sourcesContent": [""], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/valid-mapping-large-vlq.js b/test/fixtures/test426/resources/valid-mapping-large-vlq.js new file mode 100644 index 00000000000000..b0cd8978132af3 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-large-vlq.js @@ -0,0 +1 @@ +//# sourceMappingURL=valid-mapping-large-vlq.js.map diff --git a/test/fixtures/test426/resources/valid-mapping-large-vlq.js.map b/test/fixtures/test426/resources/valid-mapping-large-vlq.js.map new file mode 100644 index 00000000000000..76e18704c4b1a2 --- /dev/null +++ b/test/fixtures/test426/resources/valid-mapping-large-vlq.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "names": [], + "sources": ["valid-mapping-large-vlq.js"], + "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" +} diff --git a/test/fixtures/test426/resources/version-missing.js b/test/fixtures/test426/resources/version-missing.js new file mode 100644 index 00000000000000..c32d1f1a1cc682 --- /dev/null +++ b/test/fixtures/test426/resources/version-missing.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-missing.js.map diff --git a/test/fixtures/test426/resources/version-missing.js.map b/test/fixtures/test426/resources/version-missing.js.map new file mode 100644 index 00000000000000..49d8ce766edb9f --- /dev/null +++ b/test/fixtures/test426/resources/version-missing.js.map @@ -0,0 +1,5 @@ +{ + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-not-a-number.js b/test/fixtures/test426/resources/version-not-a-number.js new file mode 100644 index 00000000000000..ae2342e2ffe510 --- /dev/null +++ b/test/fixtures/test426/resources/version-not-a-number.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-not-a-number.js.map diff --git a/test/fixtures/test426/resources/version-not-a-number.js.map b/test/fixtures/test426/resources/version-not-a-number.js.map new file mode 100644 index 00000000000000..a584d6e6951171 --- /dev/null +++ b/test/fixtures/test426/resources/version-not-a-number.js.map @@ -0,0 +1,6 @@ +{ + "version" : "3foo", + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-numeric-string.js b/test/fixtures/test426/resources/version-numeric-string.js new file mode 100644 index 00000000000000..a55170885da6dc --- /dev/null +++ b/test/fixtures/test426/resources/version-numeric-string.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-numeric-string.js.map diff --git a/test/fixtures/test426/resources/version-numeric-string.js.map b/test/fixtures/test426/resources/version-numeric-string.js.map new file mode 100644 index 00000000000000..dbe52a7d0df69a --- /dev/null +++ b/test/fixtures/test426/resources/version-numeric-string.js.map @@ -0,0 +1,6 @@ +{ + "version" : "3", + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-too-high.js b/test/fixtures/test426/resources/version-too-high.js new file mode 100644 index 00000000000000..55f4e1a298fad7 --- /dev/null +++ b/test/fixtures/test426/resources/version-too-high.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-too-high.js.map diff --git a/test/fixtures/test426/resources/version-too-high.js.map b/test/fixtures/test426/resources/version-too-high.js.map new file mode 100644 index 00000000000000..ee23be32ff278f --- /dev/null +++ b/test/fixtures/test426/resources/version-too-high.js.map @@ -0,0 +1,6 @@ +{ + "version" : 4, + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-too-low.js b/test/fixtures/test426/resources/version-too-low.js new file mode 100644 index 00000000000000..d9642920b31345 --- /dev/null +++ b/test/fixtures/test426/resources/version-too-low.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-too-low.js.map diff --git a/test/fixtures/test426/resources/version-too-low.js.map b/test/fixtures/test426/resources/version-too-low.js.map new file mode 100644 index 00000000000000..64ca7a6e2e9282 --- /dev/null +++ b/test/fixtures/test426/resources/version-too-low.js.map @@ -0,0 +1,6 @@ +{ + "version" : 2, + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/version-valid.js b/test/fixtures/test426/resources/version-valid.js new file mode 100644 index 00000000000000..82d0bfa1eb2a17 --- /dev/null +++ b/test/fixtures/test426/resources/version-valid.js @@ -0,0 +1 @@ +//# sourceMappingURL=version-valid.js.map diff --git a/test/fixtures/test426/resources/version-valid.js.map b/test/fixtures/test426/resources/version-valid.js.map new file mode 100644 index 00000000000000..1a163052d8fc86 --- /dev/null +++ b/test/fixtures/test426/resources/version-valid.js.map @@ -0,0 +1,6 @@ +{ + "version" : 3, + "sources": [], + "names": [], + "mappings": "" +} diff --git a/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js new file mode 100644 index 00000000000000..511e7be18ae5ba --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js @@ -0,0 +1,2 @@ + 3 +//# sourceMappingURL=vlq-valid-continuation-bit-present-1.js.map diff --git a/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js.map b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js.map new file mode 100644 index 00000000000000..f4acb4b4183754 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-1.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["vlq-valid-continuation-bit-present-1-original.js"], + "sourcesContent": [" 3"], + "mappings": "+gAgAgAigA" +} diff --git a/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js new file mode 100644 index 00000000000000..0c879ce052ad95 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js @@ -0,0 +1,4 @@ + + + 3 +//# sourceMappingURL=vlq-valid-continuation-bit-present-2.js.map diff --git a/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js.map b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js.map new file mode 100644 index 00000000000000..a975cf8591ff6d --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-continuation-bit-present-2.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["vlq-valid-continuation-bit-present-2-original.js"], + "sourcesContent": ["\n 3"], + "mappings": ";;gBACC" +} diff --git a/test/fixtures/test426/resources/vlq-valid-negative-digit.js b/test/fixtures/test426/resources/vlq-valid-negative-digit.js new file mode 100644 index 00000000000000..d8e795090effae --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-negative-digit.js @@ -0,0 +1,4 @@ + + + 4; 3 +//# sourceMappingURL=vlq-valid-negative-digit.js.map diff --git a/test/fixtures/test426/resources/vlq-valid-negative-digit.js.map b/test/fixtures/test426/resources/vlq-valid-negative-digit.js.map new file mode 100644 index 00000000000000..71dec0d65a1aa9 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-negative-digit.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["vlq-valid-negative-digit-original.js"], + "sourcesContent": ["\n 4;3"], + "mappings": ";;eACG,bAAF" +} diff --git a/test/fixtures/test426/resources/vlq-valid-single-digit.js b/test/fixtures/test426/resources/vlq-valid-single-digit.js new file mode 100644 index 00000000000000..54c59aae1fcb44 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-single-digit.js @@ -0,0 +1,2 @@ + 3 +//# sourceMappingURL=vlq-valid-single-digit.js.map diff --git a/test/fixtures/test426/resources/vlq-valid-single-digit.js.map b/test/fixtures/test426/resources/vlq-valid-single-digit.js.map new file mode 100644 index 00000000000000..9e35a7a0a6a591 --- /dev/null +++ b/test/fixtures/test426/resources/vlq-valid-single-digit.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "names": [], + "sources": ["vlq-valid-single-digit-original.js"], + "sourcesContent": ["3"], + "mappings": "eAAA" +} diff --git a/test/fixtures/test426/source-map-spec-tests.json b/test/fixtures/test426/source-map-spec-tests.json new file mode 100644 index 00000000000000..bf3dc64ba5b9c9 --- /dev/null +++ b/test/fixtures/test426/source-map-spec-tests.json @@ -0,0 +1,1596 @@ +{ + "tests": [ + { + "name": "versionValid", + "description": "Test a simple source map with a valid version number", + "baseFile": "version-valid.js", + "sourceMapFile": "version-valid.js.map", + "sourceMapIsValid": true + }, + { + "name": "versionMissing", + "description": "Test a source map that is missing a version field", + "baseFile": "version-missing.js", + "sourceMapFile": "version-missing.js.map", + "sourceMapIsValid": false + }, + { + "name": "versionNotANumber", + "description": "Test a source map with a version field that is not a number", + "baseFile": "version-not-a-number.js", + "sourceMapFile": "version-not-a-number.js.map", + "sourceMapIsValid": false + }, + { + "name": "versionNumericString", + "description": "Test a source map with a version field that is a number as a string", + "baseFile": "version-numeric-string.js", + "sourceMapFile": "version-numeric-string.js.map", + "sourceMapIsValid": false + }, + { + "name": "versionTooHigh", + "description": "Test a source map with an integer version field that is too high", + "baseFile": "version-too-high.js", + "sourceMapFile": "version-too-high.js.map", + "sourceMapIsValid": false + }, + { + "name": "versionTooLow", + "description": "Test a source map with an integer version field that is too low", + "baseFile": "version-too-low.js", + "sourceMapFile": "version-too-low.js.map", + "sourceMapIsValid": false + }, + { + "name": "mappingsMissing", + "description": "Test a source map that is missing a necessary mappings field", + "baseFile": "mappings-missing.js", + "sourceMapFile": "mappings-missing.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesMissing", + "description": "Test a source map that is missing a necessary sources field", + "baseFile": "sources-missing.js", + "sourceMapFile": "sources-missing.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesNotAList1", + "description": "Test a source map with a sources field that is not a valid list (string)", + "baseFile": "sources-not-a-list-1.js", + "sourceMapFile": "sources-not-a-list-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesNotAList2", + "description": "Test a source map with a sources field that is not a valid list (object)", + "baseFile": "sources-not-a-list-2.js", + "sourceMapFile": "sources-not-a-list-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesNotStringOrNull", + "description": "Test a source map with a sources list that has non-string and non-null items", + "baseFile": "sources-not-string-or-null.js", + "sourceMapFile": "sources-not-string-or-null.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesContentMissing", + "description": "Test a source map that is missing an optional sourcesContent field", + "baseFile": "sources-content-missing.js", + "sourceMapFile": "sources-content-missing.js.map", + "sourceMapIsValid": true + }, + { + "name": "sourcesContentNotAList1", + "description": "Test a source map with a sourcesContent field that is not a valid list (string)", + "baseFile": "sources-content-not-a-list-1.js", + "sourceMapFile": "sources-content-not-a-list-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesContentNotAList2", + "description": "Test a source map with a sourcesContent field that is not a valid list (object)", + "baseFile": "sources-content-not-a-list-2.js", + "sourceMapFile": "sources-content-not-a-list-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesContentNotStringOrNull", + "description": "Test a source map with a sourcesContent list that has non-string and non-null items", + "baseFile": "sources-not-string-or-null.js", + "sourceMapFile": "sources-content-not-string-or-null.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourcesAndSourcesContentBothNull", + "description": "Test a source map that has both null sources and sourcesContent entries", + "baseFile": "sources-and-sources-content-both-null.js", + "sourceMapFile": "sources-and-sources-content-both-null.js.map", + "sourceMapIsValid": true + }, + { + "name": "fileNotAString1", + "description": "Test a source map with a file field that is not a valid string", + "baseFile": "file-not-a-string-1.js", + "sourceMapFile": "file-not-a-string-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "fileNotAString2", + "description": "Test a source map with a file field that is not a valid string", + "baseFile": "file-not-a-string-2.js", + "sourceMapFile": "file-not-a-string-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourceRootNotAString1", + "description": "Test a source map with a sourceRoot field that is not a valid string", + "baseFile": "source-root-not-a-string-1.js", + "sourceMapFile": "source-root-not-a-string-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "sourceRootNotAString2", + "description": "Test a source map with a sourceRoot field that is not a valid string", + "baseFile": "source-root-not-a-string-2.js", + "sourceMapFile": "source-root-not-a-string-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "namesMissing", + "description": "Test a source map that is missing the optional names field", + "baseFile": "names-missing.js", + "sourceMapFile": "names-missing.js.map", + "sourceMapIsValid": true + }, + { + "name": "namesNotAList1", + "description": "Test a source map with a names field that is not a valid list (string)", + "baseFile": "names-not-a-list-1.js", + "sourceMapFile": "names-not-a-list-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "namesNotAList2", + "description": "Test a source map with a names field that is not a valid list (object)", + "baseFile": "names-not-a-list-2.js", + "sourceMapFile": "names-not-a-list-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "namesNotString", + "description": "Test a source map with a names list that has non-string items", + "baseFile": "names-not-string.js", + "sourceMapFile": "names-not-string.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListEmpty", + "description": "Test a source map with an ignore list that has no items", + "baseFile": "ignore-list-empty.js", + "sourceMapFile": "ignore-list-empty.js.map", + "sourceMapIsValid": true + }, + { + "name": "ignoreListValid1", + "description": "Test a source map with a simple valid ignore list", + "baseFile": "ignore-list-valid-1.js", + "sourceMapFile": "ignore-list-valid-1.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkIgnoreList", + "present": ["empty-original.js"] + } + ] + }, + { + "name": "ignoreListWrongType1", + "description": "Test a source map with an ignore list with the wrong type of items", + "baseFile": "ignore-list-wrong-type-1.js", + "sourceMapFile": "ignore-list-wrong-type-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListWrongType2", + "description": "Test a source map with an ignore list with the wrong type of items", + "baseFile": "ignore-list-wrong-type-2.js", + "sourceMapFile": "ignore-list-wrong-type-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListWrongType3", + "description": "Test a source map with an ignore list that is not a list", + "baseFile": "ignore-list-wrong-type-3.js", + "sourceMapFile": "ignore-list-wrong-type-3.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListWrongType4", + "description": "Test a source map with an ignore list with a negative index", + "baseFile": "ignore-list-wrong-type-4.js", + "sourceMapFile": "ignore-list-wrong-type-4.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListOutOfBounds1", + "description": "Test a source map with an ignore list with an item with an out-of-bounds index (too big)", + "baseFile": "ignore-list-out-of-bounds-1.js", + "sourceMapFile": "ignore-list-out-of-bounds-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "ignoreListOutOfBounds2", + "description": "Test a source map with an ignore list with an item with an out-of-bounds index (too low)", + "baseFile": "ignore-list-out-of-bounds-2.js", + "sourceMapFile": "ignore-list-out-of-bounds-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "unrecognizedProperty", + "description": "Test a source map that has an extra field not explicitly encoded in the spec", + "baseFile": "unrecognized-property.js", + "sourceMapFile": "unrecognized-property.js.map", + "sourceMapIsValid": true + }, + { + "name": "invalidVLQDueToNonBase64Character", + "description": "Test a source map that has a mapping with an invalid non-base64 character", + "baseFile": "invalid-vlq-non-base64-char.js", + "sourceMapFile": "invalid-vlq-non-base64-char.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidVLQDueToNonBase64CharacterPadding", + "description": "Test a source map that has a mapping with an invalid padding character =", + "baseFile": "invalid-vlq-non-base64-char-padding.js", + "sourceMapFile": "invalid-vlq-non-base64-char-padding.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidVLQDueToMissingContinuationDigits", + "description": "Test a source map that has a mapping with an invalid VLQ that has a continuation bit but no continuing digits", + "baseFile": "invalid-vlq-missing-continuation.js", + "sourceMapFile": "invalid-vlq-missing-continuation.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingNotAString1", + "description": "Test a source map that has an invalid mapping that is not a string (number)", + "baseFile": "invalid-mapping-not-a-string-1.js", + "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingNotAString2", + "description": "Test a source map that has an invalid mapping that is not a string (array)", + "baseFile": "invalid-mapping-not-a-string-2.js", + "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentBadSeparator", + "description": "Test a source map that uses separator characters not recognized in the spec", + "baseFile": "invalid-mapping-bad-separator.js", + "sourceMapFile": "invalid-mapping-bad-separator.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithZeroFields", + "description": "Test a source map that has the wrong number (zero) of segments fields", + "baseFile": "invalid-mapping-segment-with-zero-fields.js", + "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithTwoFields", + "description": "Test a source map that has the wrong number (two) of segments fields", + "baseFile": "invalid-mapping-segment-with-two-fields.js", + "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithThreeFields", + "description": "Test a source map that has the wrong number (three) of segments fields", + "baseFile": "invalid-mapping-segment-with-three-fields.js", + "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", + "description": "Test a source map that has a source index field that is out of bounds of the sources field", + "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", + "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNameIndexOutOfBounds", + "description": "Test a source map that has a name index field that is out of bounds of the names field", + "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", + "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeColumn", + "description": "Test a source map that has an invalid negative non-relative column field", + "baseFile": "invalid-mapping-segment-negative-column.js", + "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeSourceIndex", + "description": "Test a source map that has an invalid negative non-relative source index field", + "baseFile": "invalid-mapping-segment-negative-source-index.js", + "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeOriginalLine", + "description": "Test a source map that has an invalid negative non-relative original line field", + "baseFile": "invalid-mapping-segment-negative-original-line.js", + "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeOriginalColumn", + "description": "Test a source map that has an invalid negative non-relative original column field", + "baseFile": "invalid-mapping-segment-negative-original-column.js", + "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeNameIndex", + "description": "Test a source map that has an invalid negative non-relative name index field", + "baseFile": "invalid-mapping-segment-negative-name-index.js", + "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeColumn", + "description": "Test a source map that has an invalid negative relative column field", + "baseFile": "invalid-mapping-segment-negative-relative-column.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeSourceIndex", + "description": "Test a source map that has an invalid negative relative source index field", + "baseFile": "invalid-mapping-segment-negative-relative-source-index.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-source-index.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeOriginalLine", + "description": "Test a source map that has an invalid negative relative original line field", + "baseFile": "invalid-mapping-segment-negative-relative-original-line.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-original-line.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeOriginalColumn", + "description": "Test a source map that has an invalid negative relative original column field", + "baseFile": "invalid-mapping-segment-negative-relative-original-column.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-original-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNegativeRelativeNameIndex", + "description": "Test a source map that has an invalid negative relative name index field", + "baseFile": "invalid-mapping-segment-negative-relative-name-index.js", + "sourceMapFile": "invalid-mapping-segment-negative-relative-name-index.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithColumnExceeding32Bits", + "description": "Test a source map that has a column field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-column-too-large.js", + "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", + "description": "Test a source map that has a source index field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-source-index-too-large.js", + "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", + "description": "Test a source map that has a original line field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-original-line-too-large.js", + "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", + "description": "Test a source map that has an original column field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-original-column-too-large.js", + "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", + "description": "Test a source map that has a name index field that exceeds 32 bits", + "baseFile": "invalid-mapping-segment-name-index-too-large.js", + "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", + "sourceMapIsValid": false + }, + { + "name": "validMappingFieldsWith32BitMaxValues", + "description": "Test a source map that has segment fields with max values representable in 32 bits", + "baseFile": "valid-mapping-boundary-values.js", + "sourceMapFile": "valid-mapping-boundary-values.js.map", + "sourceMapIsValid": true + }, + { + "name": "validMappingLargeVLQ", + "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", + "baseFile": "valid-mapping-large-vlq.js", + "sourceMapFile": "valid-mapping-large-vlq.js.map", + "sourceMapIsValid": true + }, + { + "name": "validMappingEmptyGroups", + "description": "Test a source map with a mapping that has many empty groups", + "baseFile": "valid-mapping-empty-groups.js", + "sourceMapFile": "valid-mapping-empty-groups.js.map", + "sourceMapIsValid": true + }, + { + "name": "validMappingEmptyString", + "description": "Test a source map with an empty string mapping", + "baseFile": "valid-mapping-empty-string.js", + "sourceMapFile": "valid-mapping-empty-string.js.map", + "sourceMapIsValid": true + }, + { + "name": "indexMapWrongTypeSections", + "description": "Test an index map with a sections field with the wrong type", + "baseFile": "index-map-wrong-type-sections.js", + "sourceMapFile": "index-map-wrong-type-sections.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapWrongTypeOffset", + "description": "Test an index map with an offset field with the wrong type", + "baseFile": "index-map-wrong-type-offset.js", + "sourceMapFile": "index-map-wrong-type-offset.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapWrongTypeMap", + "description": "Test an index map with a map field with the wrong type", + "baseFile": "index-map-wrong-type-map.js", + "sourceMapFile": "index-map-wrong-type-map.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapInvalidBaseMappings", + "description": "Test that an index map cannot also have a regular mappings field", + "baseFile": "index-map-invalid-base-mappings.js", + "sourceMapFile": "index-map-invalid-base-mappings.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapInvalidOverlap", + "description": "Test that an invalid index map with multiple sections that overlap", + "baseFile": "index-map-invalid-overlap.js", + "sourceMapFile": "index-map-invalid-overlap.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapInvalidOrder", + "description": "Test that an invalid index map with multiple sections in the wrong order", + "baseFile": "index-map-invalid-order.js", + "sourceMapFile": "index-map-invalid-order.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapMissingMap", + "description": "Test that an index map that is missing a section map", + "baseFile": "index-map-missing-map.js", + "sourceMapFile": "index-map-missing-map.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapInvalidSubMap", + "description": "Test that an index map that has an invalid section map", + "baseFile": "index-map-invalid-sub-map.js", + "sourceMapFile": "index-map-invalid-sub-map.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapMissingOffset", + "description": "Test that an index map that is missing a section offset", + "baseFile": "index-map-missing-offset.js", + "sourceMapFile": "index-map-missing-offset.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapMissingOffsetLine", + "description": "Test that an index map that is missing a section offset's line field", + "baseFile": "index-map-missing-offset-line.js", + "sourceMapFile": "index-map-missing-offset-line.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapMissingOffsetColumn", + "description": "Test that an index map that is missing a section offset's column field", + "baseFile": "index-map-missing-offset-column.js", + "sourceMapFile": "index-map-missing-offset-column.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapOffsetLineWrongType", + "description": "Test that an index map that has an offset line field with the wrong type of value", + "baseFile": "index-map-offset-line-wrong-type.js", + "sourceMapFile": "index-map-offset-line-wrong-type.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapOffsetColumnWrongType", + "description": "Test that an index map that has an offset column field with the wrong type of value", + "baseFile": "index-map-offset-column-wrong-type.js", + "sourceMapFile": "index-map-offset-column-wrong-type.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapEmptySections", + "description": "Test a trivial index map with no sections", + "baseFile": "index-map-empty-sections.js", + "sourceMapFile": "index-map-empty-sections.js.map", + "sourceMapIsValid": true + }, + { + "name": "indexMapFileWrongType1", + "description": "Test an index map with a file field with the wrong type", + "baseFile": "index-map-file-wrong-type-1.js", + "sourceMapFile": "index-map-file-wrong-type-1.js.map", + "sourceMapIsValid": false + }, + { + "name": "indexMapFileWrongType2", + "description": "Test an index map with a file field with the wrong type", + "baseFile": "index-map-file-wrong-type-2.js", + "sourceMapFile": "index-map-file-wrong-type-2.js.map", + "sourceMapIsValid": false + }, + { + "name": "basicMapping", + "description": "Test a simple source map that has several valid mappings", + "baseFile": "basic-mapping.js", + "sourceMapFile": "basic-mapping.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 15, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 22, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 24, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 25, + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 34, + "originalSource": "basic-mapping-original.js", + "originalLine": 3, + "originalColumn": 9, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 40, + "originalLine": 4, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 47, + "originalLine": 4, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 49, + "originalLine": 5, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 50, + "originalLine": 6, + "originalColumn": 0, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 56, + "originalLine": 7, + "originalColumn": 0, + "mappedName": "bar" + } + ] + }, + { + "name": "sourceRootResolution", + "description": "Similar to basic mapping test, but test resoultion of sources with a sourceRoot field", + "baseFile": "source-root-resolution.js", + "sourceMapFile": "source-root-resolution.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "theroot/basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "theroot/basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + } + ] + }, + { + "name": "sourceResolutionAbsoluteURL", + "description": "Test resoultion of sources with absolute URLs", + "baseFile": "source-resolution-absolute-url.js", + "sourceMapFile": "source-resolution-absolute-url.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "/baz/quux/basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "/baz/quux/basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + } + ] + }, + { + "name": "basicMappingWithIndexMap", + "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", + "baseFile": "basic-mapping-as-index-map.js", + "sourceMapFile": "basic-mapping-as-index-map.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 15, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 22, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 24, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 25, + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 34, + "originalSource": "basic-mapping-original.js", + "originalLine": 3, + "originalColumn": 9, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 40, + "originalLine": 4, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 47, + "originalLine": 4, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 49, + "originalLine": 5, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 50, + "originalLine": 6, + "originalColumn": 0, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 56, + "originalLine": 7, + "originalColumn": 0, + "mappedName": "bar" + } + ] + }, + { + "name": "indexMapWithMissingFile", + "description": "Same as the basic mapping index map test but without the optional file field", + "baseFile": "index-map-missing-file.js", + "sourceMapFile": "index-map-missing-file.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 15, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 22, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 24, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 25, + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 34, + "originalSource": "basic-mapping-original.js", + "originalLine": 3, + "originalColumn": 9, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 40, + "originalLine": 4, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 47, + "originalLine": 4, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 49, + "originalLine": 5, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 50, + "originalLine": 6, + "originalColumn": 0, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 56, + "originalLine": 7, + "originalColumn": 0, + "mappedName": "bar" + } + ] + }, + { + "name": "indexMapWithTwoConcatenatedSources", + "description": "Test an index map that has two sub-maps for concatenated sources", + "baseFile": "index-map-two-concatenated-sources.js", + "sourceMapFile": "index-map-two-concatenated-sources.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 15, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 22, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 24, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 25, + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 34, + "originalSource": "basic-mapping-original.js", + "originalLine": 3, + "originalColumn": 9, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 40, + "originalLine": 4, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 47, + "originalLine": 4, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 49, + "originalLine": 5, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 50, + "originalLine": 6, + "originalColumn": 0, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "originalSource": "basic-mapping-original.js", + "generatedLine": 0, + "generatedColumn": 56, + "originalLine": 7, + "originalColumn": 0, + "mappedName": "bar" + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 62, + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 71, + "originalLine": 0, + "originalColumn": 9, + "mappedName": "baz" + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 77, + "originalLine": 1, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 83, + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 88, + "originalLine": 2, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "originalSource": "second-source-original.js", + "generatedLine": 0, + "generatedColumn": 89, + "originalLine": 3, + "originalColumn": 0, + "mappedName": "baz" + } + ] + }, + { + "name": "sourcesNullSourcesContentNonNull", + "description": "Test a source map that has a null source but has a sourcesContent", + "baseFile": "sources-null-sources-content-non-null.js", + "sourceMapFile": "sources-null-sources-content-non-null.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": null, + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": null, + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + } + ] + }, + { + "name": "sourcesNonNullSourcesContentNull", + "description": "Test a source map that has a non-null source but has a null sourcesContent", + "baseFile": "sources-non-null-sources-content-null.js", + "sourceMapFile": "sources-non-null-sources-content-null.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "basic-mapping-original.js", + "originalLine": 0, + "originalColumn": 9, + "mappedName": "foo" + } + ] + }, + { + "name": "transitiveMapping", + "description": "Test a simple two-stage transitive mapping from a minified JS to a TypeScript source", + "baseFile": "transitive-mapping.js", + "sourceMapFile": "transitive-mapping.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 13, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 13, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 16, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 2, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 23, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 2, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 24, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 25, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 4, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 29, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping-original.js.map"], + "originalLine": 4, + "originalColumn": 4, + "mappedName": null + } + ] + }, + { + "name": "transitiveMappingWithThreeSteps", + "description": "Test a three-stage transitive mapping from an un-minified JS to minified JS to a TypeScript source", + "baseFile": "transitive-mapping-three-steps.js", + "sourceMapFile": "transitive-mapping-three-steps.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 9, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 0, + "generatedColumn": 13, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 1, + "originalColumn": 13, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 1, + "generatedColumn": 4, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 2, + "originalColumn": 2, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 1, + "generatedColumn": 11, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 2, + "originalColumn": 9, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 2, + "generatedColumn": 0, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 3, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 4, + "generatedColumn": 0, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 4, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMappingTransitive", + "generatedLine": 4, + "generatedColumn": 4, + "originalSource": "typescript-original.ts", + "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], + "originalLine": 4, + "originalColumn": 4, + "mappedName": null + } + ] + }, + { + "name": "vlqValidSingleDigit", + "description": "Test VLQ decoding for a single digit, no continuation VLQ", + "baseFile": "vlq-valid-single-digit.js", + "sourceMapFile": "vlq-valid-single-digit.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 15, + "originalSource": "vlq-valid-single-digit-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + } + ] + }, + { + "name": "vlqValidNegativeDigit", + "description": "Test VLQ decoding where there's a negative digit, no continuation bit", + "baseFile": "vlq-valid-negative-digit.js", + "sourceMapFile": "vlq-valid-negative-digit.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 2, + "generatedColumn": 15, + "originalSource": "vlq-valid-negative-digit-original.js", + "originalLine": 1, + "originalColumn": 3, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 2, + "generatedColumn": 2, + "originalSource": "vlq-valid-negative-digit-original.js", + "originalLine": 1, + "originalColumn": 1, + "mappedName": null + } + ] + }, + { + "name": "vlqValidContinuationBitPresent1", + "description": "Test VLQ decoding where continuation bits are present (continuations are leading zero)", + "baseFile": "vlq-valid-continuation-bit-present-1.js", + "sourceMapFile": "vlq-valid-continuation-bit-present-1.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 15, + "originalSource": "vlq-valid-continuation-bit-present-1-original.js", + "originalLine": 0, + "originalColumn": 1, + "mappedName": null + } + ] + }, + { + "name": "vlqValidContinuationBitPresent2", + "description": "Test VLQ decoding where continuation bits are present (continuations have non-zero bits)", + "baseFile": "vlq-valid-continuation-bit-present-2.js", + "sourceMapFile": "vlq-valid-continuation-bit-present-2.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 2, + "generatedColumn": 16, + "originalSource": "vlq-valid-continuation-bit-present-2-original.js", + "originalLine": 1, + "originalColumn": 1, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsSingleFieldSegment", + "description": "Test mapping semantics for a single field segment mapping", + "baseFile": "mapping-semantics-single-field-segment.js", + "sourceMapFile": "mapping-semantics-single-field-segment.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 0, + "originalSource": "mapping-semantics-single-field-segment-original.js", + "originalLine": 0, + "originalColumn": 1, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 2, + "originalSource": null, + "originalLine": null, + "originalColumn": null, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsFourFieldSegment", + "description": "Test mapping semantics for a four field segment mapping", + "baseFile": "mapping-semantics-four-field-segment.js", + "sourceMapFile": "mapping-semantics-four-field-segment.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-four-field-segment-original.js", + "originalLine": 2, + "originalColumn": 2, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsFiveFieldSegment", + "description": "Test mapping semantics for a five field segment mapping", + "baseFile": "mapping-semantics-five-field-segment.js", + "sourceMapFile": "mapping-semantics-five-field-segment.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-five-field-segment-original.js", + "originalLine": 2, + "originalColumn": 2, + "mappedName": "foo" + } + ] + }, + { + "name": "mappingSemanticsColumnReset", + "description": "Test that the generated column field resets to zero on new lines", + "baseFile": "mapping-semantics-column-reset.js", + "sourceMapFile": "mapping-semantics-column-reset.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-column-reset-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 1, + "generatedColumn": 1, + "originalSource": "mapping-semantics-column-reset-original.js", + "originalLine": 1, + "originalColumn": 0, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsRelative1", + "description": "Test that fields are calculated relative to previous ones", + "baseFile": "mapping-semantics-relative-1.js", + "sourceMapFile": "mapping-semantics-relative-1.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-relative-1-original.js", + "originalLine": 0, + "originalColumn": 0, + "mappedName": null + }, + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 5, + "originalSource": "mapping-semantics-relative-1-original.js", + "originalLine": 0, + "originalColumn": 4, + "mappedName": null + } + ] + }, + { + "name": "mappingSemanticsRelative2", + "description": "Test that fields are calculated relative to previous ones, across lines", + "baseFile": "mapping-semantics-relative-2.js", + "sourceMapFile": "mapping-semantics-relative-2.js.map", + "sourceMapIsValid": true, + "testActions": [ + { + "actionType": "checkMapping", + "generatedLine": 0, + "generatedColumn": 1, + "originalSource": "mapping-semantics-relative-2-original.js", + "originalLine": 0, + "originalColumn": 2, + "mappedName": "foo" + }, + { + "actionType": "checkMapping", + "generatedLine": 1, + "generatedColumn": 2, + "originalSource": "mapping-semantics-relative-2-original.js", + "originalLine": 1, + "originalColumn": 2, + "mappedName": "bar" + } + ] + } + ] +} diff --git a/test/fixtures/test426/webkit/0001-Add-test-runner-for-the-source-map-spec-tests.patch b/test/fixtures/test426/webkit/0001-Add-test-runner-for-the-source-map-spec-tests.patch new file mode 100644 index 00000000000000..9ba9f695a7b180 --- /dev/null +++ b/test/fixtures/test426/webkit/0001-Add-test-runner-for-the-source-map-spec-tests.patch @@ -0,0 +1,11542 @@ +From bcb0accac37b7fe585a01cd7de7f6c91e5704426 Mon Sep 17 00:00:00 2001 +From: Asumu Takikawa <asumu@igalia.com> +Date: Mon, 11 Mar 2024 13:41:31 -0700 +Subject: [PATCH] Add test runner for the source map spec tests + +Need the bug URL (OOPS!). + +Reviewed by NOBODY (OOPS!). + +This patch adds a layout test for the inspector using the imported spec +tests from TG4 for the current Source Map specification: + + https://github.com/tc39/source-map + https://github.com/tc39/source-map-tests + +It also adds the tests themselves as imported tests under +`LayoutTests/imported`. + +* LayoutTests/imported/tg4/source-map-tests/LICENSE.md: Added. +* LayoutTests/imported/tg4/source-map-tests/README.WebKit: Added. +* LayoutTests/imported/tg4/source-map-tests/README.md: Added. +* LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch: Added. +* LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch: Added. +* LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch: Added. +* LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js: Added. +(async checkValidity): +(async checkMapping): +(const.testCase.of.testDescriptions.tests.const.testFunction.async const): +(const.testCase.of.testDescriptions.tests.const.testFunction.testCase.name): +(read): +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js: Added. +(foo): +(bar): +(baz): +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js: Added. +(baz): +* LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js: Added. +(foo): +(bar): +* LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js: Added. +(foo): +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js: Added. +(foo): +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js: Added. +(foo): +* LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js: Added. +* LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map: Added. +* LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json: Added. +* LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch: Added. +* LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html: Added. +* LayoutTests/inspector/model/source-map-spec-expected.txt: Added. +* LayoutTests/inspector/model/source-map-spec.html: Added. +--- + .../imported/tg4/source-map-tests/LICENSE.md | 14 + + .../tg4/source-map-tests/README.WebKit | 1 + + .../imported/tg4/source-map-tests/README.md | 176 + + ...1-Add-source-map-specification-tests.patch | 3867 +++++++++++++++++ + ...002-Add-reverse-mapping-code-to-test.patch | 46 + + ...01-WIP-Firefox-source-map-spec-tests.patch | 337 ++ + .../firefox/browser_spec-source-map.js | 71 + + .../resources/basic-mapping-as-index-map.js | 2 + + .../basic-mapping-as-index-map.js.map | 15 + + .../resources/basic-mapping-original.js | 8 + + .../resources/basic-mapping.js | 2 + + .../resources/basic-mapping.js.map | 6 + + .../resources/file-not-a-string-1.js | 1 + + .../resources/file-not-a-string-1.js.map | 8 + + .../resources/file-not-a-string-2.js | 1 + + .../resources/file-not-a-string-2.js.map | 8 + + .../resources/ignore-list-empty.js | 1 + + .../resources/ignore-list-empty.js.map | 8 + + .../resources/ignore-list-out-of-bounds-1.js | 1 + + .../ignore-list-out-of-bounds-1.js.map | 8 + + .../resources/ignore-list-out-of-bounds-2.js | 1 + + .../ignore-list-out-of-bounds-2.js.map | 8 + + .../resources/ignore-list-valid-1.js | 1 + + .../resources/ignore-list-valid-1.js.map | 8 + + .../resources/ignore-list-wrong-type-1.js | 1 + + .../resources/ignore-list-wrong-type-1.js.map | 8 + + .../resources/ignore-list-wrong-type-2.js | 1 + + .../resources/ignore-list-wrong-type-2.js.map | 8 + + .../resources/ignore-list-wrong-type-3.js | 1 + + .../resources/ignore-list-wrong-type-3.js.map | 8 + + .../resources/ignore-list-wrong-type-4.js | 1 + + .../resources/ignore-list-wrong-type-4.js.map | 8 + + .../resources/index-map-empty-sections.js | 1 + + .../resources/index-map-empty-sections.js.map | 4 + + .../resources/index-map-file-wrong-type-1.js | 2 + + .../index-map-file-wrong-type-1.js.map | 15 + + .../resources/index-map-file-wrong-type-2.js | 2 + + .../index-map-file-wrong-type-2.js.map | 15 + + .../index-map-invalid-base-mappings.js | 1 + + .../index-map-invalid-base-mappings.js.map | 15 + + .../resources/index-map-invalid-order.js | 1 + + .../resources/index-map-invalid-order.js.map | 23 + + .../resources/index-map-invalid-overlap.js | 1 + + .../index-map-invalid-overlap.js.map | 23 + + .../resources/index-map-invalid-sub-map.js | 1 + + .../index-map-invalid-sub-map.js.map | 13 + + .../resources/index-map-missing-file.js | 2 + + .../resources/index-map-missing-file.js.map | 14 + + .../resources/index-map-missing-map.js | 1 + + .../resources/index-map-missing-map.js.map | 8 + + .../index-map-missing-offset-column.js | 1 + + .../index-map-missing-offset-column.js.map | 14 + + .../index-map-missing-offset-line.js | 1 + + .../index-map-missing-offset-line.js.map | 14 + + .../resources/index-map-missing-offset.js | 1 + + .../resources/index-map-missing-offset.js.map | 13 + + .../index-map-offset-column-wrong-type.js | 1 + + .../index-map-offset-column-wrong-type.js.map | 14 + + .../index-map-offset-line-wrong-type.js | 1 + + .../index-map-offset-line-wrong-type.js.map | 14 + + .../index-map-two-concatenated-sources.js | 2 + + .../index-map-two-concatenated-sources.js.map | 24 + + .../resources/index-map-wrong-type-map.js | 1 + + .../resources/index-map-wrong-type-map.js.map | 9 + + .../resources/index-map-wrong-type-offset.js | 1 + + .../index-map-wrong-type-offset.js.map | 14 + + .../index-map-wrong-type-sections.js | 1 + + .../index-map-wrong-type-sections.js.map | 4 + + .../invalid-mapping-bad-separator.js | 2 + + .../invalid-mapping-bad-separator.js.map | 6 + + .../invalid-mapping-not-a-string-1.js | 1 + + .../invalid-mapping-not-a-string-1.js.map | 7 + + .../invalid-mapping-not-a-string-2.js | 1 + + .../invalid-mapping-not-a-string-2.js.map | 7 + + ...nvalid-mapping-segment-column-too-large.js | 1 + + ...id-mapping-segment-column-too-large.js.map | 7 + + ...apping-segment-name-index-out-of-bounds.js | 1 + + ...ng-segment-name-index-out-of-bounds.js.map | 7 + + ...id-mapping-segment-name-index-too-large.js | 1 + + ...apping-segment-name-index-too-large.js.map | 7 + + ...invalid-mapping-segment-negative-column.js | 1 + + ...lid-mapping-segment-negative-column.js.map | 7 + + ...lid-mapping-segment-negative-name-index.js | 1 + + ...mapping-segment-negative-name-index.js.map | 7 + + ...apping-segment-negative-original-column.js | 1 + + ...ng-segment-negative-original-column.js.map | 7 + + ...-mapping-segment-negative-original-line.js | 1 + + ...ping-segment-negative-original-line.js.map | 7 + + ...apping-segment-negative-relative-column.js | 1 + + ...ng-segment-negative-relative-column.js.map | 8 + + ...ng-segment-negative-relative-name-index.js | 1 + + ...egment-negative-relative-name-index.js.map | 8 + + ...gment-negative-relative-original-column.js | 1 + + ...t-negative-relative-original-column.js.map | 8 + + ...segment-negative-relative-original-line.js | 1 + + ...ent-negative-relative-original-line.js.map | 8 + + ...-segment-negative-relative-source-index.js | 1 + + ...ment-negative-relative-source-index.js.map | 8 + + ...d-mapping-segment-negative-source-index.js | 1 + + ...pping-segment-negative-source-index.js.map | 7 + + ...pping-segment-original-column-too-large.js | 1 + + ...g-segment-original-column-too-large.js.map | 7 + + ...mapping-segment-original-line-too-large.js | 1 + + ...ing-segment-original-line-too-large.js.map | 7 + + ...ping-segment-source-index-out-of-bounds.js | 1 + + ...-segment-source-index-out-of-bounds.js.map | 7 + + ...-mapping-segment-source-index-too-large.js | 1 + + ...ping-segment-source-index-too-large.js.map | 7 + + ...valid-mapping-segment-with-three-fields.js | 2 + + ...d-mapping-segment-with-three-fields.js.map | 6 + + ...invalid-mapping-segment-with-two-fields.js | 2 + + ...lid-mapping-segment-with-two-fields.js.map | 6 + + ...nvalid-mapping-segment-with-zero-fields.js | 1 + + ...id-mapping-segment-with-zero-fields.js.map | 7 + + .../invalid-vlq-missing-continuation.js | 1 + + .../invalid-vlq-missing-continuation.js.map | 6 + + .../resources/invalid-vlq-non-base64-char.js | 1 + + .../invalid-vlq-non-base64-char.js.map | 6 + + .../mapping-semantics-column-reset.js | 3 + + .../mapping-semantics-column-reset.js.map | 7 + + .../mapping-semantics-five-field-segment.js | 2 + + ...apping-semantics-five-field-segment.js.map | 7 + + .../mapping-semantics-four-field-segment.js | 2 + + ...apping-semantics-four-field-segment.js.map | 7 + + .../resources/mapping-semantics-relative-1.js | 2 + + .../mapping-semantics-relative-1.js.map | 7 + + .../resources/mapping-semantics-relative-2.js | 3 + + .../mapping-semantics-relative-2.js.map | 7 + + .../mapping-semantics-single-field-segment.js | 2 + + ...ping-semantics-single-field-segment.js.map | 7 + + .../resources/names-missing.js | 1 + + .../resources/names-missing.js.map | 6 + + .../resources/names-not-a-list-1.js | 1 + + .../resources/names-not-a-list-1.js.map | 6 + + .../resources/names-not-a-list-2.js | 1 + + .../resources/names-not-a-list-2.js.map | 6 + + .../resources/names-not-string.js | 1 + + .../resources/names-not-string.js.map | 6 + + .../resources/second-source-original.js | 4 + + .../source-resolution-absolute-url.js | 2 + + .../source-resolution-absolute-url.js.map | 8 + + .../resources/source-root-not-a-string-1.js | 1 + + .../source-root-not-a-string-1.js.map | 8 + + .../resources/source-root-not-a-string-2.js | 1 + + .../source-root-not-a-string-2.js.map | 8 + + .../resources/source-root-resolution.js | 2 + + .../resources/source-root-resolution.js.map | 9 + + .../sources-and-sources-content-both-null.js | 1 + + ...urces-and-sources-content-both-null.js.map | 7 + + .../resources/sources-missing.js | 1 + + .../resources/sources-missing.js.map | 5 + + .../sources-non-null-sources-content-null.js | 2 + + ...urces-non-null-sources-content-null.js.map | 7 + + .../resources/sources-not-a-list-1.js | 1 + + .../resources/sources-not-a-list-1.js.map | 6 + + .../resources/sources-not-a-list-2.js | 1 + + .../resources/sources-not-a-list-2.js.map | 6 + + .../resources/sources-not-string-or-null.js | 1 + + .../sources-not-string-or-null.js.map | 6 + + .../sources-null-sources-content-non-null.js | 2 + + ...urces-null-sources-content-non-null.js.map | 7 + + .../resources/transitive-mapping-original.js | 5 + + .../transitive-mapping-original.js.map | 8 + + .../transitive-mapping-three-steps.js | 6 + + .../transitive-mapping-three-steps.js.map | 7 + + .../resources/transitive-mapping.js | 2 + + .../resources/transitive-mapping.js.map | 6 + + .../resources/typescript-original.ts | 5 + + .../resources/unrecognized-property.js | 1 + + .../resources/unrecognized-property.js.map | 8 + + .../valid-mapping-boundary-values.js | 1 + + .../valid-mapping-boundary-values.js.map | 7 + + .../resources/valid-mapping-empty-groups.js | 1 + + .../valid-mapping-empty-groups.js.map | 8 + + .../resources/valid-mapping-empty-string.js | 1 + + .../valid-mapping-empty-string.js.map | 8 + + .../resources/valid-mapping-large-vlq.js | 1 + + .../resources/valid-mapping-large-vlq.js.map | 6 + + .../resources/version-missing.js | 1 + + .../resources/version-missing.js.map | 5 + + .../resources/version-not-a-number.js | 1 + + .../resources/version-not-a-number.js.map | 6 + + .../resources/version-numeric-string.js | 1 + + .../resources/version-numeric-string.js.map | 6 + + .../resources/version-too-high.js | 1 + + .../resources/version-too-high.js.map | 6 + + .../resources/version-too-low.js | 1 + + .../resources/version-too-low.js.map | 6 + + .../resources/version-valid.js | 1 + + .../resources/version-valid.js.map | 6 + + .../vlq-valid-continuation-bit-present-1.js | 2 + + ...lq-valid-continuation-bit-present-1.js.map | 7 + + .../vlq-valid-continuation-bit-present-2.js | 4 + + ...lq-valid-continuation-bit-present-2.js.map | 7 + + .../resources/vlq-valid-negative-digit.js | 4 + + .../resources/vlq-valid-negative-digit.js.map | 7 + + .../resources/vlq-valid-single-digit.js | 2 + + .../resources/vlq-valid-single-digit.js.map | 7 + + .../source-map-spec-tests.json | 1554 +++++++ + ...d-harness-for-source-maps-spec-tests.patch | 1649 +++++++ + .../webkit/source-map-spec.html | 83 + + .../model/source-map-spec-expected.txt | 828 ++++ + .../inspector/model/source-map-spec.html | 87 + + 203 files changed, 9653 insertions(+) + create mode 100644 LayoutTests/imported/tg4/source-map-tests/LICENSE.md + create mode 100644 LayoutTests/imported/tg4/source-map-tests/README.WebKit + create mode 100644 LayoutTests/imported/tg4/source-map-tests/README.md + create mode 100644 LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch + create mode 100644 LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch + create mode 100644 LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch + create mode 100644 LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js + create mode 100644 LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map + create mode 100644 LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json + create mode 100644 LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch + create mode 100644 LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html + create mode 100644 LayoutTests/inspector/model/source-map-spec-expected.txt + create mode 100644 LayoutTests/inspector/model/source-map-spec.html + +diff --git a/LayoutTests/imported/tg4/source-map-tests/LICENSE.md b/LayoutTests/imported/tg4/source-map-tests/LICENSE.md +new file mode 100644 +index 000000000000..39501a3b7c70 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/LICENSE.md +@@ -0,0 +1,14 @@ ++The Source Map Tests suite ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://www.ecma-international.org/ipr FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS*. ++ ++Copyright (c) 2024, Ecma International ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ++ ++1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. ++2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. ++3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++* Ecma International Standards hereafter means Ecma International Standards as well as Ecma Technical Reports +diff --git a/LayoutTests/imported/tg4/source-map-tests/README.WebKit b/LayoutTests/imported/tg4/source-map-tests/README.WebKit +new file mode 100644 +index 000000000000..9d6cf4b7fb68 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/README.WebKit +@@ -0,0 +1 @@ ++FIXME +diff --git a/LayoutTests/imported/tg4/source-map-tests/README.md b/LayoutTests/imported/tg4/source-map-tests/README.md +new file mode 100644 +index 000000000000..a8bb3947c435 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/README.md +@@ -0,0 +1,176 @@ ++# Source Map Tests ++ ++This repository holds testing discussions and tests for the the Source Map debugging format. Specifically, we're looking to encourage discussion around: ++ ++- Manual and automated testing strategies for Source Maps ++- Gathering a list of Soure Map generators and consumers ++- General discussion around deviations between source maps ++ ++Open discussion happens in the [GitHub issues](https://github.com/source-map/source-map-tests/issues). ++ ++Source Map spec: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# ++ ++## Test cases ++ ++These test cases are still a work-in-progress 🚧. ++ ++#### Running the tests ++ ++How to run in WebKit: ++ * Check out [WebKit](https://github.com/WebKit/WebKit/) ++ * `cd` to the checked out WebKit directory. ++ * Run `git am <this-repo>/webkit/0001-Add-harness-for-source-maps-spec-tests.patch` ++ * Run `Tools/Scripts/build-webkit` (depending on the platform you may need to pass `--gtk` or other flags) ++ * Run `Tools/Scripts/run-webkit-tests LayoutTests/inspector/model/source-map-spec.html` (again, you may need `--gtk` on Linux) ++ ++For Firefox, see the Mozilla [source-map](https://github.com/mozilla/source-map) library: ++ * There is a [branch](https://github.com/takikawa/source-map/tree/add-spec-tests) for adding the spec tests to the package. ++ ++How to run in Chrome Devtools: ++1. Setup: ++ * Install depot_tools following this [depot_tools guide](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) ++ * Check out [Chrome Devtools](https://chromium.googlesource.com/devtools/devtools-frontend): ++ * Run `gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged` ++ * Run `cd devtools-frontend` ++ * Run `gclient sync` ++ * Run `gn gen out/Default` ++2. Build: ++ * Run `autoninja -C out/Default` ++3. Test: ++ * Run `npm run auto-unittest` ++4. Apply patches from this repo: ++ * Run `git apply <path to .patch file>` in `devtools-frontend` repo ++ ++More information about running Chrome Devtools without building Chromium can be found [here](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/chromium/3965/README.md) ++ ++### Goals of tests ++ ++* Thoroughly test all aspects of the source maps spec that can be tested. ++* Strictly follow the spec when determining test behavior. ++ ++### Test coverage ++ ++#### Core spec ++ ++* Encoding ++ - [ ] Source map must be a valid JSON document. ++ - Base64 VLQ ++ * VLQs should decode correctly ++ - [X] A VLQ with a non-base64 character will fail to decode. ++ - [ ] A VLQ with one digit and no continuation digits should decode. ++ - [ ] A negative VLQ with the sign bit set to 1 should decode. ++ - [ ] A VLQ with non-zero continuation bits (and more than one digit) should decode. ++ - [X] A VLQ with a non-zero continuation bit with no further digits should fail to decode. ++ - [ ] A VLQ should decode with the correct order of digits (least to most significant). ++ - [x] A long VLQ with many trailing zero digits will decode. ++ * [x] A VLQ exceeding the 32-bit size limit is invalid (note: the spec is unclear on the details of this limit) ++ * [x] A VLQ at exactly the 32-bit size limit should be decoded (positive and negative). ++* Basic format ++ - `version` field ++ * [X] Must be present ++ * [X] Must be a number ++ * [X] Must be 3 ++ - `file` field ++ * [ ] Optional, allow missing ++ * [ ] Must be a string? (spec is not clear) ++ - `sourceRoot` field ++ * [ ] Optional, allow missing ++ * [ ] Must be a string? (spec is not clear) ++ - `sources` field ++ * [X] Must be present ++ * [X] Must be an array ++ * [X] Array elements must be `null` or a string ++ - `sourcesContent` field ++ * [X] Must be present ++ * [X] Must be an array ++ * [X] Array elements must be `null` or a string ++ - `names` field ++ * [X] Must be present (note: the spec implies this but implementations may not agree) ++ * [X] Must be an array ++ * [X] Array elements must be strings ++ - `mappings` field ++ * [X] Must be present ++ * [X] Must be a string ++ * [ ] Empty string is valid ++ - `ignoreList` field ++ * [ ] Optional, allow missing ++ * [ ] Must be an array ++ * [ ] Array elements must be numbers ++ * [ ] Elements must not be out of bounds for the `sources` list ++ - [X] Extra unrecognized fields are allowed ++* Index maps ++ - ? Must be mutually exclusive with non-index map? ++ - `file` field ++ * [ ] Optional, allow missing ++ * [ ] Must be a string? (spec is not clear) ++ - `sections` field ++ * [X] Must be present ++ * [X] Must be an array ++ * [ ] An empty sections array is valid ++ * [X] Array elements are valid section objects ++ - `offset` field ++ * [X] Must be present ++ * `line` field ++ - [X] Must be present ++ - [X] Must be a number ++ * `column` field ++ - [X] Must be present ++ - [X] Must be a number ++ - `map` field ++ * [X] Must be present ++ * [X] Must be an object ++ * [ ] Must be a valid source map ++ - [X] Sections are in order (the spec is not 100% clear, but assumption is increasing numeric order, may need subtests) ++ - [X] Sections are non-overlapping (the definition of overlap is not clear, may need subtests) ++* Mappings format ++ - [X] Each line is separated by ";" ++ - [X] A line may consist of zero segments (e.g., ";;") ++ - [X] Each line consists only of segments separated by "," ++ - [X] Must have greater than zero fields (note: many implementations don't check) ++ - [X] Must have 1, 4, or 5 fields ++ - [X] The source index must not be out of bounds of the sources array ++ - [X] The name index must not be out of bounds of the names array ++ - Absolute VLQ values must be non-negative ++ * [X] The column must be non-negative ++ * [X] The source index must be non-negative ++ * [X] The original line must be non-negative ++ * [X] The original column must be non-negative ++ * [X] The name index must be non-negative ++ - Relative VLQ values must be non-negative after adding to previous value ++ * [X] The column must be non-negative ++ * [X] The source index must be non-negative ++ * [X] The original line must be non-negative ++ * [X] The original column must be non-negative ++ * [X] The name index must be non-negative ++* Ignore list ++ - [X] An ignore list is optional, may be missing ++ - [X] An ignore list can't be a non-array value ++ * [X] An ignore list can be empty ++ * [X] An ignore list entry must be a number ++ * [X] An ignore list entry cannot be out-of-bounds of the sources array ++ - [X] Ignore list entries are detected and are present ++ - [X] Items not specified in the ignore list don't show up as ignored ++* Mappings semantics ++ - [ ] A source map with no mappings does not map any position. ++ - [ ] A single field segment gets mapped to the correct line and column. ++ - [X] A four field segment gets mapped to the correct line and column. ++ - [X] A five field segment gets mapped to the correct line and column. ++ - [X] When a name is present in a segment, it is correctly mapped. ++ - [X] When a source is present in a segment, it is correctly mapped. ++ - [ ] The second occurence of a field segment in a line is mapped relative to the previous one. ++ - [ ] When a new line starts, the generated column field resets to zero rather than being relative to the previous line. ++ - [ ] For fields other than the generated column, a segment field that has occured once in a previous line is mapped relatively when it occurs in the next line. ++ - [ ] Ensure that a transitive source map mapping works as expected ++ - Index maps are correctly used in mappings ++ * [ ] An index map with one sub-map will map correctly. ++ * [X] An index map with multiple sub-maps will map correctly, with appropriate offsets for the second and later sub-maps. ++* Resolution of sources ++ - [ ] When `sourceRoot` is provided, it is prepended to any `sources` entries and will be mapped with the full URL. ++ - [ ] If the source URL is an absolute URL, it is resolved as an absolute URL. ++ - [ ] If the source URL is a relative URL, it is resolved relative to the source map path. ++* Wasm support ++ - [ ] Create versions of the tests that use a Wasm source. ++ ++### Scopes Proposal ++ ++TODO +diff --git a/LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch b/LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch +new file mode 100644 +index 000000000000..c5fbd4baa8b0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/chrome/0001-Add-source-map-specification-tests.patch +@@ -0,0 +1,3867 @@ ++From afa11641db357e524c8f4d5f573945dd15c1f2e9 Mon Sep 17 00:00:00 2001 ++From: Agata Belkius <abelkius@gmail.com> ++Date: Fri, 19 Apr 2024 15:30:48 +0100 ++Subject: [PATCH 1/2] Add source map specification tests ++ ++--- ++ front_end/BUILD.gn | 1 + ++ front_end/core/sdk/BUILD.gn | 1 + ++ front_end/core/sdk/SourceMapSpec.test.ts | 206 +++ ++ .../core/sdk/fixtures/sourcemaps/BUILD.gn | 202 +++ ++ .../sourcemaps/basic-mapping-as-index-map.js | 2 + ++ .../basic-mapping-as-index-map.js.map | 15 + ++ .../sourcemaps/basic-mapping-original.js | 8 + ++ .../sdk/fixtures/sourcemaps/basic-mapping.js | 2 + ++ .../fixtures/sourcemaps/basic-mapping.js.map | 6 + ++ .../fixtures/sourcemaps/ignore-list-empty.js | 1 + ++ .../sourcemaps/ignore-list-empty.js.map | 8 + ++ .../sourcemaps/ignore-list-out-of-bounds.js | 1 + ++ .../ignore-list-out-of-bounds.js.map | 8 + ++ .../sourcemaps/ignore-list-valid-1.js | 1 + ++ .../sourcemaps/ignore-list-valid-1.js.map | 8 + ++ .../sourcemaps/ignore-list-wrong-type-1.js | 1 + ++ .../ignore-list-wrong-type-1.js.map | 8 + ++ .../sourcemaps/ignore-list-wrong-type-2.js | 1 + ++ .../ignore-list-wrong-type-2.js.map | 8 + ++ .../sourcemaps/ignore-list-wrong-type-3.js | 1 + ++ .../ignore-list-wrong-type-3.js.map | 8 + ++ .../index-map-invalid-base-mappings.js | 1 + ++ .../index-map-invalid-base-mappings.js.map | 15 + ++ .../sourcemaps/index-map-invalid-order.js | 1 + ++ .../sourcemaps/index-map-invalid-order.js.map | 23 + ++ .../sourcemaps/index-map-invalid-overlap.js | 1 + ++ .../index-map-invalid-overlap.js.map | 23 + ++ .../sourcemaps/index-map-missing-map.js | 1 + ++ .../sourcemaps/index-map-missing-map.js.map | 8 + ++ .../index-map-missing-offset-column.js | 1 + ++ .../index-map-missing-offset-column.js.map | 14 + ++ .../index-map-missing-offset-line.js | 1 + ++ .../index-map-missing-offset-line.js.map | 14 + ++ .../sourcemaps/index-map-missing-offset.js | 1 + ++ .../index-map-missing-offset.js.map | 13 + ++ .../index-map-offset-column-wrong-type.js | 1 + ++ .../index-map-offset-column-wrong-type.js.map | 14 + ++ .../index-map-offset-line-wrong-type.js | 1 + ++ .../index-map-offset-line-wrong-type.js.map | 14 + ++ .../index-map-two-concatenated-sources.js | 2 + ++ .../index-map-two-concatenated-sources.js.map | 24 + ++ .../sourcemaps/index-map-wrong-type-map.js | 1 + ++ .../index-map-wrong-type-map.js.map | 9 + ++ .../sourcemaps/index-map-wrong-type-offset.js | 1 + ++ .../index-map-wrong-type-offset.js.map | 14 + ++ .../index-map-wrong-type-sections.js | 1 + ++ .../index-map-wrong-type-sections.js.map | 4 + ++ .../invalid-mapping-bad-separator.js | 2 + ++ .../invalid-mapping-bad-separator.js.map | 6 + ++ .../invalid-mapping-not-a-string-1.js | 1 + ++ .../invalid-mapping-not-a-string-1.js.map | 7 + ++ .../invalid-mapping-not-a-string-2.js | 1 + ++ .../invalid-mapping-not-a-string-2.js.map | 7 + ++ ...nvalid-mapping-segment-column-too-large.js | 1 + ++ ...id-mapping-segment-column-too-large.js.map | 7 + ++ ...apping-segment-name-index-out-of-bounds.js | 1 + ++ ...ng-segment-name-index-out-of-bounds.js.map | 7 + ++ ...id-mapping-segment-name-index-too-large.js | 1 + ++ ...apping-segment-name-index-too-large.js.map | 7 + ++ ...invalid-mapping-segment-negative-column.js | 1 + ++ ...lid-mapping-segment-negative-column.js.map | 7 + ++ ...lid-mapping-segment-negative-name-index.js | 1 + ++ ...mapping-segment-negative-name-index.js.map | 7 + ++ ...apping-segment-negative-original-column.js | 1 + ++ ...ng-segment-negative-original-column.js.map | 7 + ++ ...-mapping-segment-negative-original-line.js | 1 + ++ ...ping-segment-negative-original-line.js.map | 7 + ++ ...apping-segment-negative-relative-column.js | 1 + ++ ...ng-segment-negative-relative-column.js.map | 8 + ++ ...ng-segment-negative-relative-name-index.js | 1 + ++ ...egment-negative-relative-name-index.js.map | 8 + ++ ...gment-negative-relative-original-column.js | 1 + ++ ...t-negative-relative-original-column.js.map | 8 + ++ ...segment-negative-relative-original-line.js | 1 + ++ ...ent-negative-relative-original-line.js.map | 8 + ++ ...-segment-negative-relative-source-index.js | 1 + ++ ...ment-negative-relative-source-index.js.map | 8 + ++ ...d-mapping-segment-negative-source-index.js | 1 + ++ ...pping-segment-negative-source-index.js.map | 7 + ++ ...pping-segment-original-column-too-large.js | 1 + ++ ...g-segment-original-column-too-large.js.map | 7 + ++ ...mapping-segment-original-line-too-large.js | 1 + ++ ...ing-segment-original-line-too-large.js.map | 7 + ++ ...ping-segment-source-index-out-of-bounds.js | 1 + ++ ...-segment-source-index-out-of-bounds.js.map | 7 + ++ ...-mapping-segment-source-index-too-large.js | 1 + ++ ...ping-segment-source-index-too-large.js.map | 7 + ++ ...valid-mapping-segment-with-three-fields.js | 2 + ++ ...d-mapping-segment-with-three-fields.js.map | 6 + ++ ...invalid-mapping-segment-with-two-fields.js | 2 + ++ ...lid-mapping-segment-with-two-fields.js.map | 6 + ++ ...nvalid-mapping-segment-with-zero-fields.js | 1 + ++ ...id-mapping-segment-with-zero-fields.js.map | 7 + ++ .../invalid-vlq-missing-continuation.js | 1 + ++ .../invalid-vlq-missing-continuation.js.map | 6 + ++ .../sourcemaps/invalid-vlq-non-base64-char.js | 1 + ++ .../invalid-vlq-non-base64-char.js.map | 6 + ++ .../sdk/fixtures/sourcemaps/names-missing.js | 1 + ++ .../fixtures/sourcemaps/names-missing.js.map | 5 + ++ .../fixtures/sourcemaps/names-not-a-list-1.js | 1 + ++ .../sourcemaps/names-not-a-list-1.js.map | 6 + ++ .../fixtures/sourcemaps/names-not-a-list-2.js | 1 + ++ .../sourcemaps/names-not-a-list-2.js.map | 6 + ++ .../fixtures/sourcemaps/names-not-string.js | 1 + ++ .../sourcemaps/names-not-string.js.map | 6 + ++ .../sourcemaps/second-source-original.js | 4 + ++ .../sourcemaps/source-map-spec-tests.json | 1540 +++++++++++++++++ ++ .../sources-and-sources-content-both-null.js | 1 + ++ ...urces-and-sources-content-both-null.js.map | 7 + ++ .../fixtures/sourcemaps/sources-missing.js | 1 + ++ .../sourcemaps/sources-missing.js.map | 5 + ++ .../sources-non-null-sources-content-null.js | 2 + ++ ...urces-non-null-sources-content-null.js.map | 7 + ++ .../sourcemaps/sources-not-a-list-1.js | 1 + ++ .../sourcemaps/sources-not-a-list-1.js.map | 6 + ++ .../sourcemaps/sources-not-a-list-2.js | 1 + ++ .../sourcemaps/sources-not-a-list-2.js.map | 6 + ++ .../sourcemaps/sources-not-string-or-null.js | 1 + ++ .../sources-not-string-or-null.js.map | 6 + ++ .../sources-null-sources-content-non-null.js | 2 + ++ ...urces-null-sources-content-non-null.js.map | 7 + ++ .../sourcemaps/transitive-mapping-original.js | 5 + ++ .../transitive-mapping-original.js.map | 8 + ++ .../transitive-mapping-three-steps.js | 6 + ++ .../transitive-mapping-three-steps.js.map | 7 + ++ .../fixtures/sourcemaps/transitive-mapping.js | 2 + ++ .../sourcemaps/transitive-mapping.js.map | 6 + ++ .../sourcemaps/typescript-original.ts | 5 + ++ .../sourcemaps/unrecognized-property.js | 1 + ++ .../sourcemaps/unrecognized-property.js.map | 8 + ++ .../valid-mapping-boundary-values.js | 1 + ++ .../valid-mapping-boundary-values.js.map | 7 + ++ .../sourcemaps/valid-mapping-empty-groups.js | 1 + ++ .../valid-mapping-empty-groups.js.map | 8 + ++ .../sourcemaps/valid-mapping-large-vlq.js | 1 + ++ .../sourcemaps/valid-mapping-large-vlq.js.map | 6 + ++ .../sourcemaps/valid-mapping-null-sources.js | 2 + ++ .../valid-mapping-null-sources.js.map | 6 + ++ .../fixtures/sourcemaps/version-missing.js | 1 + ++ .../sourcemaps/version-missing.js.map | 5 + ++ .../sourcemaps/version-not-a-number.js | 1 + ++ .../sourcemaps/version-not-a-number.js.map | 6 + ++ .../sourcemaps/version-numeric-string.js | 1 + ++ .../sourcemaps/version-numeric-string.js.map | 6 + ++ .../fixtures/sourcemaps/version-too-high.js | 1 + ++ .../sourcemaps/version-too-high.js.map | 6 + ++ .../fixtures/sourcemaps/version-too-low.js | 1 + ++ .../sourcemaps/version-too-low.js.map | 6 + ++ .../sdk/fixtures/sourcemaps/version-valid.js | 1 + ++ .../fixtures/sourcemaps/version-valid.js.map | 6 + ++ 150 files changed, 2648 insertions(+) ++ create mode 100644 front_end/core/sdk/SourceMapSpec.test.ts ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/BUILD.gn ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-missing.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-string.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/second-source-original.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-missing.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-missing.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-high.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-low.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-valid.js ++ create mode 100644 front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map ++ ++diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn ++index 863a434cea..125b34ba73 100644 ++--- a/front_end/BUILD.gn +++++ b/front_end/BUILD.gn ++@@ -106,6 +106,7 @@ group("unittests") { ++ "core/protocol_client:unittests", ++ "core/root:unittests", ++ "core/sdk:unittests", +++ "core/sdk/fixtures/sourcemaps", ++ "entrypoints/formatter_worker:unittests", ++ "entrypoints/heap_snapshot_worker:unittests", ++ "entrypoints/inspector_main:unittests", ++diff --git a/front_end/core/sdk/BUILD.gn b/front_end/core/sdk/BUILD.gn ++index 8d1cf0fa92..f8879365f4 100644 ++--- a/front_end/core/sdk/BUILD.gn +++++ b/front_end/core/sdk/BUILD.gn ++@@ -165,6 +165,7 @@ ts_library("unittests") { ++ "SourceMapManager.test.ts", ++ "SourceMapScopes.test.ts", ++ "SourceMapScopesInfo.test.ts", +++ "SourceMapSpec.test.ts", ++ "StorageBucketsModel.test.ts", ++ "StorageKeyManager.test.ts", ++ "Target.test.ts", ++diff --git a/front_end/core/sdk/SourceMapSpec.test.ts b/front_end/core/sdk/SourceMapSpec.test.ts ++new file mode 100644 ++index 0000000000..93b26a2e13 ++--- /dev/null +++++ b/front_end/core/sdk/SourceMapSpec.test.ts ++@@ -0,0 +1,206 @@ +++// Copyright 2024 The Chromium Authors. All rights reserved. +++// Use of this source code is governed by a BSD-style license that can be +++// found in the LICENSE file. +++ +++ +++/** +++ This file tests if devtools sourcemaps implementation is matching the sourcemaps spec. +++ Sourcemap Spec tests are using test data coming from: https://github.com/tc39/source-map-tests +++ +++ There is a lot of warnings of invalid source maps passing the validation - this is up to the authors +++ which ones of these could be actually checked in the SourceMaps implementetion and which ones are ok to ignore. +++ +++ **/ +++ +++const {assert} = chai; +++import type * as Platform from '../platform/platform.js'; +++import {assertNotNullOrUndefined} from '../platform/platform.js'; +++import { SourceMapV3, parseSourceMap } from './SourceMap.js'; +++import * as SDK from './sdk.js'; +++import {describeWithEnvironment} from '../../testing/EnvironmentHelpers.js'; +++ +++interface TestSpec { +++ name: string; +++ description: string; +++ baseFile: string; +++ sourceMapFile: string; +++ sourceMapIsValid: boolean; +++ testActions?: TestAction[]; +++} +++ +++interface TestAction { +++ actionType: string; +++ generatedLine: number; +++ generatedColumn: number; +++ originalSource: string; +++ originalLine: number; +++ originalColumn: number; +++ mappedName: null | string; +++ intermediateMaps?: string[] +++} +++ +++// Accept "null", null, or undefined for tests specifying a missing value. +++function nullish(arg : any) { +++ if (arg === "null" || arg === undefined) { +++ return null; +++ } +++ return arg; +++} +++ +++describeWithEnvironment('SourceMapSpec', () => { +++ let testCases : TestSpec[] | undefined; +++ let sourceMapContents : SourceMapV3[] = []; +++ +++ before(async () => { +++ testCases = await loadTestCasesFromFixture('source-map-spec-tests.json'); +++ sourceMapContents = await Promise.all( +++ testCases!.map( +++ async (testCase) => { +++ const { sourceMapFile } = testCase; +++ return loadSourceMapFromFixture(sourceMapFile); +++ } +++ ) +++ ); +++ }); +++ +++ it('Spec tests', () => { +++ const consoleErrorSpy = sinon.spy(console, 'error'); +++ testCases!.forEach(({ +++ baseFile, +++ sourceMapFile, +++ testActions, +++ sourceMapIsValid, +++ name +++ }, index) => { +++ const sourceMapContent = sourceMapContents[index]; +++ +++ // These test cases are ignored because certain validity checks are +++ // not implemented, such as checking the version number is `3`. +++ const ignoredCasesForBasicValidity = [ +++ "fileNotAString1", +++ "fileNotAString2", +++ "versionMissing", +++ "versionNotANumber", +++ "versionNumericString", +++ "versionTooHigh", +++ "versionTooLow", +++ "sourcesNotAList1", +++ "sourcesNotAList2", +++ "sourcesNotStringOrNull", +++ // FIXME: this test should be revised after recent spec changes +++ "namesMissing", +++ "namesNotAList1", +++ "namesNotAList2", +++ "namesNotString", +++ "ignoreListWrongType1", +++ "ignoreListWrongType2", +++ "ignoreListOutOfBounds", +++ "indexMapWrongTypeSections", +++ "indexMapWrongTypeMap", +++ "indexMapMissingOffset", +++ "invalidVLQDueToNonBase64Character", +++ ]; +++ +++ // 1) check if an invalid sourcemap throws on SourceMap instance creation, or +++ // 2) check if an invalid sourcemap throws on mapping creation +++ if (!sourceMapIsValid) { +++ if (ignoredCasesForBasicValidity.includes(name)) +++ return; +++ +++ let thrownDuringParse = false; +++ try { +++ const sourceMap = new SDK.SourceMap.SourceMap( +++ baseFile as Platform.DevToolsPath.UrlString, +++ sourceMapFile as Platform.DevToolsPath.UrlString, +++ sourceMapContent); +++ sourceMap.mappings(); +++ } catch { +++ thrownDuringParse = true; +++ } +++ assert.equal( +++ thrownDuringParse || consoleErrorSpy.calledWith("Failed to parse source map"), +++ true, +++ `${name}: expected invalid source map to fail to load` +++ ); +++ +++ return; +++ } +++ +++ // 3) check if a valid sourcemap can be parsed and a SourceMap instance created +++ const baseFileUrl = baseFile as Platform.DevToolsPath.UrlString; +++ const sourceMapFileUrl = sourceMapFile as Platform.DevToolsPath.UrlString; +++ +++ assert.doesNotThrow( +++ () => parseSourceMap(JSON.stringify(sourceMapContent)), +++ undefined, +++ undefined, +++ `${name}: expected valid source map to parse` +++ ); +++ assert.doesNotThrow(() => new SDK.SourceMap.SourceMap( +++ baseFileUrl, +++ sourceMapFileUrl, +++ sourceMapContent +++ ), undefined, undefined, `${name}: expected valid source map to parse`); +++ +++ // 4) check if the mappings are valid +++ const sourceMap = new SDK.SourceMap.SourceMap( +++ baseFileUrl, +++ sourceMapFileUrl, +++ sourceMapContent); +++ +++ assert.doesNotThrow(() => sourceMap.findEntry(1, 1)); +++ +++ if (testActions !== undefined) { +++ testActions.forEach(({ +++ actionType, +++ originalSource, +++ originalLine, +++ originalColumn, +++ generatedLine, +++ generatedColumn, +++ intermediateMaps +++ }) => { +++ +++ if (actionType === "checkMapping" && sourceMapIsValid) { +++ // 4a) check if the mappings are valid for regular sourcemaps +++ // extract to separate function +++ let actual = sourceMap.findEntry(generatedLine, generatedColumn); +++ assertNotNullOrUndefined(actual); +++ +++ assert.strictEqual(nullish(actual.sourceURL), originalSource, 'unexpected source URL'); +++ assert.strictEqual(nullish(actual.sourceLineNumber), originalLine, 'unexpected source line number'); +++ assert.strictEqual(nullish(actual.sourceColumnNumber), originalColumn, 'unexpected source column number'); +++ } +++ }); +++ } +++ }); +++ }); +++}); +++ +++async function loadTestCasesFromFixture(filename: string): Promise<TestSpec[]> { +++ const testSpec = await getFixtureFileContents<{ tests: TestSpec[] }>(filename); +++ return testSpec?.tests ?? []; +++}; +++ +++async function loadSourceMapFromFixture(filename: string): Promise<SourceMapV3> { +++ return getFixtureFileContents<SourceMapV3>(filename); +++}; +++ +++async function getFixtureFileContents<T>(filename: string): +++ Promise<T> { +++ const url = new URL(`/front_end/core/sdk/fixtures/sourcemaps/${filename}`, window.location.origin); +++ +++ const response = await fetch(url); +++ +++ if (response.status !== 200) { +++ throw new Error(`Unable to load ${url}`); +++ } +++ +++ const contentType = response.headers.get('content-type'); +++ const isGzipEncoded = contentType !== null && contentType.includes('gzip'); +++ let buffer = await response.arrayBuffer(); +++ +++ const decoder = new TextDecoder('utf-8'); +++ const contents = JSON.parse(decoder.decode(buffer)) as T; +++ return contents; +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn b/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn ++new file mode 100644 ++index 0000000000..a82b09a02d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/BUILD.gn ++@@ -0,0 +1,202 @@ +++# Copyright 2022 The Chromium Authors. All rights reserved. +++# Use of this source code is governed by a BSD-style license that can be +++# found in the LICENSE file. +++ +++import("../../../../../scripts/build/ninja/copy.gni") +++ +++copy_to_gen("sourcemaps") { +++ sources = [ +++ "basic-mapping-as-index-map.js", +++ "basic-mapping-as-index-map.js.map", +++ "basic-mapping-original.js", +++ "basic-mapping.js", +++ "basic-mapping.js.map", +++ "file-not-a-string-1.js", +++ "file-not-a-string-1.js.map", +++ "file-not-a-string-2.js", +++ "file-not-a-string-2.js.map", +++ "ignore-list-empty.js", +++ "ignore-list-empty.js.map", +++ "ignore-list-out-of-bounds.js", +++ "ignore-list-out-of-bounds.js.map", +++ "ignore-list-valid-1.js", +++ "ignore-list-valid-1.js.map", +++ "ignore-list-wrong-type-1.js", +++ "ignore-list-wrong-type-1.js.map", +++ "ignore-list-wrong-type-2.js", +++ "ignore-list-wrong-type-2.js.map", +++ "ignore-list-wrong-type-3.js", +++ "ignore-list-wrong-type-3.js.map", +++ "index-map-empty-sections.js", +++ "index-map-empty-sections.js.map", +++ "index-map-file-wrong-type-1.js", +++ "index-map-file-wrong-type-1.js.map", +++ "index-map-file-wrong-type-2.js", +++ "index-map-file-wrong-type-2.js.map", +++ "index-map-invalid-base-mappings.js", +++ "index-map-invalid-base-mappings.js.map", +++ "index-map-invalid-order.js", +++ "index-map-invalid-order.js.map", +++ "index-map-invalid-overlap.js", +++ "index-map-invalid-overlap.js.map", +++ "index-map-invalid-sub-map.js", +++ "index-map-invalid-sub-map.js.map", +++ "index-map-missing-file.js", +++ "index-map-missing-file.js.map", +++ "index-map-missing-map.js", +++ "index-map-missing-map.js.map", +++ "index-map-missing-offset-column.js", +++ "index-map-missing-offset-column.js.map", +++ "index-map-missing-offset-line.js", +++ "index-map-missing-offset-line.js.map", +++ "index-map-missing-offset.js", +++ "index-map-missing-offset.js.map", +++ "index-map-offset-column-wrong-type.js", +++ "index-map-offset-column-wrong-type.js.map", +++ "index-map-offset-line-wrong-type.js", +++ "index-map-offset-line-wrong-type.js.map", +++ "index-map-two-concatenated-sources.js", +++ "index-map-two-concatenated-sources.js.map", +++ "index-map-wrong-type-map.js", +++ "index-map-wrong-type-map.js.map", +++ "index-map-wrong-type-offset.js", +++ "index-map-wrong-type-offset.js.map", +++ "index-map-wrong-type-sections.js", +++ "index-map-wrong-type-sections.js.map", +++ "invalid-mapping-bad-separator.js", +++ "invalid-mapping-bad-separator.js.map", +++ "invalid-mapping-not-a-string-1.js", +++ "invalid-mapping-not-a-string-1.js.map", +++ "invalid-mapping-not-a-string-2.js", +++ "invalid-mapping-not-a-string-2.js.map", +++ "invalid-mapping-segment-column-too-large.js", +++ "invalid-mapping-segment-column-too-large.js.map", +++ "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "invalid-mapping-segment-name-index-out-of-bounds.js.map", +++ "invalid-mapping-segment-name-index-too-large.js", +++ "invalid-mapping-segment-name-index-too-large.js.map", +++ "invalid-mapping-segment-negative-column.js", +++ "invalid-mapping-segment-negative-column.js.map", +++ "invalid-mapping-segment-negative-name-index.js", +++ "invalid-mapping-segment-negative-name-index.js.map", +++ "invalid-mapping-segment-negative-original-column.js", +++ "invalid-mapping-segment-negative-original-column.js.map", +++ "invalid-mapping-segment-negative-original-line.js", +++ "invalid-mapping-segment-negative-original-line.js.map", +++ "invalid-mapping-segment-negative-relative-column.js", +++ "invalid-mapping-segment-negative-relative-column.js.map", +++ "invalid-mapping-segment-negative-relative-name-index.js", +++ "invalid-mapping-segment-negative-relative-name-index.js.map", +++ "invalid-mapping-segment-negative-relative-original-column.js", +++ "invalid-mapping-segment-negative-relative-original-column.js.map", +++ "invalid-mapping-segment-negative-relative-original-line.js", +++ "invalid-mapping-segment-negative-relative-original-line.js.map", +++ "invalid-mapping-segment-negative-relative-source-index.js", +++ "invalid-mapping-segment-negative-relative-source-index.js.map", +++ "invalid-mapping-segment-negative-source-index.js", +++ "invalid-mapping-segment-negative-source-index.js.map", +++ "invalid-mapping-segment-original-column-too-large.js", +++ "invalid-mapping-segment-original-column-too-large.js.map", +++ "invalid-mapping-segment-original-line-too-large.js", +++ "invalid-mapping-segment-original-line-too-large.js.map", +++ "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "invalid-mapping-segment-source-index-out-of-bounds.js.map", +++ "invalid-mapping-segment-source-index-too-large.js", +++ "invalid-mapping-segment-source-index-too-large.js.map", +++ "invalid-mapping-segment-with-three-fields.js", +++ "invalid-mapping-segment-with-three-fields.js.map", +++ "invalid-mapping-segment-with-two-fields.js", +++ "invalid-mapping-segment-with-two-fields.js.map", +++ "invalid-mapping-segment-with-zero-fields.js", +++ "invalid-mapping-segment-with-zero-fields.js.map", +++ "invalid-vlq-missing-continuation.js", +++ "invalid-vlq-missing-continuation.js.map", +++ "invalid-vlq-non-base64-char.js", +++ "invalid-vlq-non-base64-char.js.map", +++ "mapping-semantics-column-reset.js", +++ "mapping-semantics-column-reset.js.map", +++ "mapping-semantics-five-field-segment.js", +++ "mapping-semantics-five-field-segment.js.map", +++ "mapping-semantics-four-field-segment.js", +++ "mapping-semantics-four-field-segment.js.map", +++ "mapping-semantics-relative-1.js", +++ "mapping-semantics-relative-1.js.map", +++ "mapping-semantics-relative-2.js", +++ "mapping-semantics-relative-2.js.map", +++ "mapping-semantics-single-field-segment.js", +++ "mapping-semantics-single-field-segment.js.map", +++ "names-missing.js", +++ "names-missing.js.map", +++ "names-not-a-list-1.js", +++ "names-not-a-list-1.js.map", +++ "names-not-a-list-2.js", +++ "names-not-a-list-2.js.map", +++ "names-not-string.js", +++ "names-not-string.js.map", +++ "second-source-original.js", +++ "source-map-spec-tests.json", +++ "source-resolution-absolute-url.js", +++ "source-resolution-absolute-url.js.map", +++ "source-resolution-relative-url.js", +++ "source-resolution-relative-url.js.map", +++ "source-root-not-a-string-1.js", +++ "source-root-not-a-string-1.js.map", +++ "source-root-not-a-string-2.js", +++ "source-root-not-a-string-2.js.map", +++ "source-root-resolution.js", +++ "source-root-resolution.js.map", +++ "sources-and-sources-content-both-null.js", +++ "sources-and-sources-content-both-null.js.map", +++ "sources-missing.js", +++ "sources-missing.js.map", +++ "sources-non-null-sources-content-null.js", +++ "sources-non-null-sources-content-null.js.map", +++ "sources-not-a-list-1.js", +++ "sources-not-a-list-1.js.map", +++ "sources-not-a-list-2.js", +++ "sources-not-a-list-2.js.map", +++ "sources-not-string-or-null.js", +++ "sources-not-string-or-null.js.map", +++ "sources-null-sources-content-non-null.js", +++ "sources-null-sources-content-non-null.js.map", +++ "transitive-mapping-original.js", +++ "transitive-mapping-original.js.map", +++ "transitive-mapping-three-steps.js", +++ "transitive-mapping-three-steps.js.map", +++ "transitive-mapping.js", +++ "transitive-mapping.js.map", +++ "typescript-original.ts", +++ "unrecognized-property.js", +++ "unrecognized-property.js.map", +++ "valid-mapping-boundary-values.js", +++ "valid-mapping-boundary-values.js.map", +++ "valid-mapping-empty-groups.js", +++ "valid-mapping-empty-groups.js.map", +++ "valid-mapping-empty-string.js", +++ "valid-mapping-empty-string.js.map", +++ "valid-mapping-large-vlq.js", +++ "valid-mapping-large-vlq.js.map", +++ "valid-mapping-null-sources.js", +++ "valid-mapping-null-sources.js.map", +++ "version-missing.js", +++ "version-missing.js.map", +++ "version-not-a-number.js", +++ "version-not-a-number.js.map", +++ "version-numeric-string.js", +++ "version-numeric-string.js.map", +++ "version-too-high.js", +++ "version-too-high.js.map", +++ "version-too-low.js", +++ "version-too-low.js.map", +++ "version-valid.js", +++ "version-valid.js.map", +++ "vlq-valid-continuation-bit-present-1.js", +++ "vlq-valid-continuation-bit-present-1.js.map", +++ "vlq-valid-continuation-bit-present-2.js", +++ "vlq-valid-continuation-bit-present-2.js.map", +++ "vlq-valid-negative-digit.js", +++ "vlq-valid-negative-digit.js.map", +++ "vlq-valid-single-digit.js", +++ "vlq-valid-single-digit.js.map", +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js ++new file mode 100644 ++index 0000000000..b9fae38043 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=basic-mapping-as-index-map.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map ++new file mode 100644 ++index 0000000000..c0ad870ed2 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-as-index-map.js.map ++@@ -0,0 +1,15 @@ +++{ +++ "version": 3, +++ "file": "basic-mapping-as-index-map.js", +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js ++new file mode 100644 ++index 0000000000..301b186cb1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping-original.js ++@@ -0,0 +1,8 @@ +++function foo() { +++ return 42; +++} +++function bar() { +++ return 24; +++} +++foo(); +++bar(); ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js ++new file mode 100644 ++index 0000000000..2e479a4175 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=basic-mapping.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map ++new file mode 100644 ++index 0000000000..12dc9679a4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/basic-mapping.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js ++new file mode 100644 ++index 0000000000..385a5c3501 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-empty.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map ++new file mode 100644 ++index 0000000000..7297863a9b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-empty.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": [] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js ++new file mode 100644 ++index 0000000000..7a0fbb8833 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-out-of-bounds.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map ++new file mode 100644 ++index 0000000000..fb2566bb41 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-out-of-bounds.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": [1] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js ++new file mode 100644 ++index 0000000000..ea64a5565a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-valid-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map ++new file mode 100644 ++index 0000000000..98eebdf7f6 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-valid-1.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": [0] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js ++new file mode 100644 ++index 0000000000..8b40bd3847 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-wrong-type-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map ++new file mode 100644 ++index 0000000000..688740aba8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-1.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": ["not a number"] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js ++new file mode 100644 ++index 0000000000..35c7791164 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-wrong-type-2.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map ++new file mode 100644 ++index 0000000000..ca1d30de2d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-2.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": ["0"] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js ++new file mode 100644 ++index 0000000000..8735d41758 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=ignore-list-wrong-type-3.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map ++new file mode 100644 ++index 0000000000..1ac167d56c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/ignore-list-wrong-type-3.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "", +++ "names": [], +++ "ignoreList": 0 +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js ++new file mode 100644 ++index 0000000000..e90bef083c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-invalid-base-mappings.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map ++new file mode 100644 ++index 0000000000..b489c1f080 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-base-mappings.js.map ++@@ -0,0 +1,15 @@ +++{ +++ "version": 3, +++ "mappings": "AAAA", +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js ++new file mode 100644 ++index 0000000000..263fa3c6e0 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-invalid-order.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map ++new file mode 100644 ++index 0000000000..82da69df72 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-order.js.map ++@@ -0,0 +1,23 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 1, "column": 4 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ }, +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js ++new file mode 100644 ++index 0000000000..9aff8dc620 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-invalid-overlap.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map ++new file mode 100644 ++index 0000000000..8d42546fd8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-invalid-overlap.js.map ++@@ -0,0 +1,23 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ }, +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js ++new file mode 100644 ++index 0000000000..86c8e9a253 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-missing-map.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map ++new file mode 100644 ++index 0000000000..3bce47e852 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-map.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js ++new file mode 100644 ++index 0000000000..fe6917403f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-missing-offset-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map ++new file mode 100644 ++index 0000000000..aa48bbb993 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-column.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js ++new file mode 100644 ++index 0000000000..ba8614e412 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-missing-offset-line.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map ++new file mode 100644 ++index 0000000000..3d60444ea7 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset-line.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js ++new file mode 100644 ++index 0000000000..9ca2cf3fb5 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-missing-offset.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map ++new file mode 100644 ++index 0000000000..7285138bf5 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-missing-offset.js.map ++@@ -0,0 +1,13 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js ++new file mode 100644 ++index 0000000000..ed1e9ec5d5 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-offset-column-wrong-type.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map ++new file mode 100644 ++index 0000000000..b43e79a9dd ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-column-wrong-type.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": true }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js ++new file mode 100644 ++index 0000000000..d58f2aff99 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-offset-line-wrong-type.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map ++new file mode 100644 ++index 0000000000..81dbcd6ec4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-offset-line-wrong-type.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": true, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js ++new file mode 100644 ++index 0000000000..b8702d7187 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar();function baz(){return"baz"}baz(); +++//# sourceMappingURL=index-map-two-concatenated-sources.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map ++new file mode 100644 ++index 0000000000..f67f5de3c5 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-two-concatenated-sources.js.map ++@@ -0,0 +1,24 @@ +++{ +++ "version": 3, +++ "file": "index-map-two-concatenated-sources.js", +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++ } +++ }, +++ { +++ "offset": { "line": 0, "column": 62 }, +++ "map": { +++ "version": 3, +++ "names": ["baz"], +++ "sources": ["second-source-original.js"], +++ "mappings":"AAAA,SAASA,MACP,MAAO,KACT,CACAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js ++new file mode 100644 ++index 0000000000..d31d6d6358 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-wrong-type-map.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map ++new file mode 100644 ++index 0000000000..0963f623d7 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-map.js.map ++@@ -0,0 +1,9 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": "not a map" +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js ++new file mode 100644 ++index 0000000000..048e1246f8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-wrong-type-offset.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map ++new file mode 100644 ++index 0000000000..fbc6e4e678 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-offset.js.map ++@@ -0,0 +1,14 @@ +++{ +++ "version": 3, +++ "sections": [ +++ { +++ "offset": "not an offset", +++ "map": { +++ "version": 3, +++ "names": [], +++ "sources": ["empty-original.js"], +++ "mappings": "AAAA" +++ } +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js ++new file mode 100644 ++index 0000000000..011eca806e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=index-map-wrong-type-sections.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map ++new file mode 100644 ++index 0000000000..dbfb4ead30 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/index-map-wrong-type-sections.js.map ++@@ -0,0 +1,4 @@ +++{ +++ "version": 3, +++ "sections": "not a sections list" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js ++new file mode 100644 ++index 0000000000..25338aca30 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-bad-separator.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map ++new file mode 100644 ++index 0000000000..5f4f5b9233 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-bad-separator.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA.SAASA:MACP" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js ++new file mode 100644 ++index 0000000000..cb38e2fe9d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map ++new file mode 100644 ++index 0000000000..5bf3e2a9d8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-1.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-not-a-string-1.js", +++ "sources": ["empty-original.js"], +++ "mappings": 5 +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js ++new file mode 100644 ++index 0000000000..3d84abd6c6 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map ++new file mode 100644 ++index 0000000000..4527e7f764 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-not-a-string-2.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-not-a-string-2.js", +++ "sources": ["empty-original.js"], +++ "mappings": [1, 2, 3, 4] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js ++new file mode 100644 ++index 0000000000..55591f874b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map ++new file mode 100644 ++index 0000000000..b4c059e015 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-column-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-column-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "ggggggE" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js ++new file mode 100644 ++index 0000000000..2a6b434eff ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map ++new file mode 100644 ++index 0000000000..8dd2ea6c2d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-out-of-bounds.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "file": "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAC" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js ++new file mode 100644 ++index 0000000000..709e34dbd3 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map ++new file mode 100644 ++index 0000000000..c7bf5b98d1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-name-index-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-name-index-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAggggggE" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js ++new file mode 100644 ++index 0000000000..a202152d6f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map ++new file mode 100644 ++index 0000000000..403878bfa4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-column.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-column.js", +++ "sources": ["empty-original.js"], +++ "mappings": "F" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js ++new file mode 100644 ++index 0000000000..3e3f634204 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map ++new file mode 100644 ++index 0000000000..b94f63646e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-name-index.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-name-index.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAF" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js ++new file mode 100644 ++index 0000000000..f21d5342b3 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map ++new file mode 100644 ++index 0000000000..011c639d3f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-column.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-original-column.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAF" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js ++new file mode 100644 ++index 0000000000..b37309601c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map ++new file mode 100644 ++index 0000000000..e7ec993eeb ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-original-line.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-original-line.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAFA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js ++new file mode 100644 ++index 0000000000..94b835d687 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map ++new file mode 100644 ++index 0000000000..414884072b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-column.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-column.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "C,F" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js ++new file mode 100644 ++index 0000000000..c965c5f011 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-name-index.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map ++new file mode 100644 ++index 0000000000..1fbbcfcd32 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-name-index.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-name-index.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "AAAAC,AAAAF" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js ++new file mode 100644 ++index 0000000000..493a6ec88a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-column.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map ++new file mode 100644 ++index 0000000000..7e62895651 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-column.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-original-column.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "AAAC,AAAF" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js ++new file mode 100644 ++index 0000000000..ca8329fb98 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-line.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map ++new file mode 100644 ++index 0000000000..86b0fb3a04 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-original-line.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-original-line.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "AACA,AAFA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js ++new file mode 100644 ++index 0000000000..fa92225b09 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-relative-source-index.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map ++new file mode 100644 ++index 0000000000..2efeb047db ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-relative-source-index.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-relative-source-index.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": "ACAA,AFAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js ++new file mode 100644 ++index 0000000000..6e05849b6a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map ++new file mode 100644 ++index 0000000000..596c2f298b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-negative-source-index.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-source-index.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AFAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js ++new file mode 100644 ++index 0000000000..0936ed7ea8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map ++new file mode 100644 ++index 0000000000..ff2103fe24 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-column-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-original-column-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAggggggE" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js ++new file mode 100644 ++index 0000000000..9b3aa5a361 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map ++new file mode 100644 ++index 0000000000..890f1c71fc ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-original-line-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-original-line-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAggggggEA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js ++new file mode 100644 ++index 0000000000..2e5fbca268 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map ++new file mode 100644 ++index 0000000000..86dedb114f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-out-of-bounds.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "sources": ["empty-original.js"], +++ "mappings": "ACAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js ++new file mode 100644 ++index 0000000000..3f4943e127 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map ++new file mode 100644 ++index 0000000000..e9f858c6e1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-source-index-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-source-index-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AggggggEAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js ++new file mode 100644 ++index 0000000000..4b868fac9c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map ++new file mode 100644 ++index 0000000000..c2af1165ad ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-three-fields.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js ++new file mode 100644 ++index 0000000000..96045a7a11 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map ++new file mode 100644 ++index 0000000000..73cf00fa1c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-two-fields.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js ++new file mode 100644 ++index 0000000000..9d5332a56c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map ++new file mode 100644 ++index 0000000000..5a34d25b64 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-mapping-segment-with-zero-fields.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-with-zero-fields.js", +++ "sources": ["empty-original.js"], +++ "mappings": ",,,," +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js ++new file mode 100644 ++index 0000000000..2c2a0090ac ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-vlq-missing-continuation.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map ++new file mode 100644 ++index 0000000000..dd0e363ff4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-missing-continuation.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "g" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js ++new file mode 100644 ++index 0000000000..d1b20b41a2 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-vlq-non-base64-char.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map ++new file mode 100644 ++index 0000000000..4fa1ac5768 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/invalid-vlq-non-base64-char.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "A$%?!" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-missing.js b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js ++new file mode 100644 ++index 0000000000..58781fd887 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-missing.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map ++new file mode 100644 ++index 0000000000..82170bf784 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "version" : 3, +++ "sources": ["empty-original.js"], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js ++new file mode 100644 ++index 0000000000..dc65f1972b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-a-list-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map ++new file mode 100644 ++index 0000000000..fe1edaeb96 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-1.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": ["source.js"], +++ "names": "not a list", +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js ++new file mode 100644 ++index 0000000000..d7251f78da ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-a-list-2.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map ++new file mode 100644 ++index 0000000000..3388d2bb71 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-a-list-2.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": ["source.js"], +++ "names": { "foo": 3 }, +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js ++new file mode 100644 ++index 0000000000..8dc7b4811a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-string.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map ++new file mode 100644 ++index 0000000000..c0feb0739a ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/names-not-string.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": ["source.js"], +++ "names": [null, 3, true, false, {}, []], +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js b/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js ++new file mode 100644 ++index 0000000000..c339bc9d15 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/second-source-original.js ++@@ -0,0 +1,4 @@ +++function baz() { +++ return "baz"; +++} +++baz(); ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json b/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json ++new file mode 100644 ++index 0000000000..0f7a3c1cb1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/source-map-spec-tests.json ++@@ -0,0 +1,1540 @@ +++{ +++ "tests": [ +++ { +++ "name": "versionValid", +++ "description": "Test a simple source map with a valid version number", +++ "baseFile": "version-valid.js", +++ "sourceMapFile": "version-valid.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "versionMissing", +++ "description": "Test a source map that is missing a version field", +++ "baseFile": "version-missing.js", +++ "sourceMapFile": "version-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionNotANumber", +++ "description": "Test a source map with a version field that is not a number", +++ "baseFile": "version-not-a-number.js", +++ "sourceMapFile": "version-not-a-number.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionNumericString", +++ "description": "Test a source map with a version field that is a number as a string", +++ "baseFile": "version-numeric-string.js", +++ "sourceMapFile": "version-numeric-string.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooHigh", +++ "description": "Test a source map with an integer version field that is too high", +++ "baseFile": "version-too-high.js", +++ "sourceMapFile": "version-too-high.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooLow", +++ "description": "Test a source map with an integer version field that is too low", +++ "baseFile": "version-too-low.js", +++ "sourceMapFile": "version-too-low.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesMissing", +++ "description": "Test a source map that is missing a necessary sources field", +++ "baseFile": "sources-missing.js", +++ "sourceMapFile": "sources-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotAList1", +++ "description": "Test a source map with a sources field that is not a valid list (string)", +++ "baseFile": "sources-not-a-list-1.js", +++ "sourceMapFile": "sources-not-a-list-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotAList2", +++ "description": "Test a source map with a sources field that is not a valid list (object)", +++ "baseFile": "sources-not-a-list-2.js", +++ "sourceMapFile": "sources-not-a-list-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotStringOrNull", +++ "description": "Test a source map with a sources list that has non-string and non-null items", +++ "baseFile": "sources-not-string-or-null.js", +++ "sourceMapFile": "sources-not-string-or-null.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesAndSourcesContentBothNull", +++ "description": "Test a source map that has both null sources and sourcesContent entries", +++ "baseFile": "sources-and-sources-content-both-null.js", +++ "sourceMapFile": "sources-and-sources-content-both-null.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "fileNotAString1", +++ "description": "Test a source map with a file field that is not a valid string", +++ "baseFile": "file-not-a-string-1.js", +++ "sourceMapFile": "file-not-a-string-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "fileNotAString2", +++ "description": "Test a source map with a file field that is not a valid string", +++ "baseFile": "file-not-a-string-2.js", +++ "sourceMapFile": "file-not-a-string-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourceRootNotAString1", +++ "description": "Test a source map with a sourceRoot field that is not a valid string", +++ "baseFile": "source-root-not-a-string-1.js", +++ "sourceMapFile": "source-root-not-a-string-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourceRootNotAString2", +++ "description": "Test a source map with a sourceRoot field that is not a valid string", +++ "baseFile": "source-root-not-a-string-2.js", +++ "sourceMapFile": "source-root-not-a-string-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesMissing", +++ "description": "Test a source map that is missing a necessary names field", +++ "baseFile": "names-missing.js", +++ "sourceMapFile": "names-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotAList1", +++ "description": "Test a source map with a names field that is not a valid list (string)", +++ "baseFile": "names-not-a-list-1.js", +++ "sourceMapFile": "names-not-a-list-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotAList2", +++ "description": "Test a source map with a names field that is not a valid list (object)", +++ "baseFile": "names-not-a-list-2.js", +++ "sourceMapFile": "names-not-a-list-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotString", +++ "description": "Test a source map with a names list that has non-string items", +++ "baseFile": "names-not-string.js", +++ "sourceMapFile": "names-not-string.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "ignoreListEmpty", +++ "description": "Test a source map with an ignore list that has no items", +++ "baseFile": "ignore-list-empty.js", +++ "sourceMapFile": "ignore-list-empty.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "ignoreListValid1", +++ "description": "Test a source map with a simple valid ignore list", +++ "baseFile": "ignore-list-valid-1.js", +++ "sourceMapFile": "ignore-list-valid-1.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkIgnoreList", +++ "present": ["empty-original.js"] +++ } +++ ] +++ }, +++ { +++ "name": "ignoreListWrongType1", +++ "description": "Test a source map with an ignore list with the wrong type of items", +++ "baseFile": "ignore-list-wrong-type-1.js", +++ "sourceMapFile": "ignore-list-wrong-type-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "ignoreListWrongType2", +++ "description": "Test a source map with an ignore list with the wrong type of items", +++ "baseFile": "ignore-list-wrong-type-2.js", +++ "sourceMapFile": "ignore-list-wrong-type-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "ignoreListWrongType3", +++ "description": "Test a source map with an ignore list that is not a list", +++ "baseFile": "ignore-list-wrong-type-3.js", +++ "sourceMapFile": "ignore-list-wrong-type-3.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "ignoreListOutOfBounds", +++ "description": "Test a source map with an ignore list with an item with an out-of-bounds index", +++ "baseFile": "ignore-list-out-of-bounds.js", +++ "sourceMapFile": "ignore-list-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "unrecognizedProperty", +++ "description": "Test a source map that has an extra field not explicitly encoded in the spec", +++ "baseFile": "unrecognized-property.js", +++ "sourceMapFile": "unrecognized-property.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "invalidVLQDueToNonBase64Character", +++ "description": "Test a source map that has a mapping with an invalid non-base64 character", +++ "baseFile": "invalid-vlq-non-base64-char.js", +++ "sourceMapFile": "invalid-vlq-non-base64-char.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidVLQDueToMissingContinuationDigits", +++ "description": "Test a source map that has a mapping with an invalid VLQ that has a continuation bit but no continuing digits", +++ "baseFile": "invalid-vlq-missing-continuation.js", +++ "sourceMapFile": "invalid-vlq-missing-continuation.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingNotAString1", +++ "description": "Test a source map that has an invalid mapping that is not a string (number)", +++ "baseFile": "invalid-mapping-not-a-string-1.js", +++ "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingNotAString2", +++ "description": "Test a source map that has an invalid mapping that is not a string (array)", +++ "baseFile": "invalid-mapping-not-a-string-2.js", +++ "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentBadSeparator", +++ "description": "Test a source map that uses separator characters not recognized in the spec", +++ "baseFile": "invalid-mapping-bad-separator.js", +++ "sourceMapFile": "invalid-mapping-bad-separator.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithZeroFields", +++ "description": "Test a source map that has the wrong number (zero) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-zero-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithTwoFields", +++ "description": "Test a source map that has the wrong number (two) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-two-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithThreeFields", +++ "description": "Test a source map that has the wrong number (three) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-three-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", +++ "description": "Test a source map that has a source index field that is out of bounds of the sources field", +++ "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNameIndexOutOfBounds", +++ "description": "Test a source map that has a name index field that is out of bounds of the names field", +++ "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeColumn", +++ "description": "Test a source map that has an invalid negative non-relative column field", +++ "baseFile": "invalid-mapping-segment-negative-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeSourceIndex", +++ "description": "Test a source map that has an invalid negative non-relative source index field", +++ "baseFile": "invalid-mapping-segment-negative-source-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeOriginalLine", +++ "description": "Test a source map that has an invalid negative non-relative original line field", +++ "baseFile": "invalid-mapping-segment-negative-original-line.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeOriginalColumn", +++ "description": "Test a source map that has an invalid negative non-relative original column field", +++ "baseFile": "invalid-mapping-segment-negative-original-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeNameIndex", +++ "description": "Test a source map that has an invalid negative non-relative name index field", +++ "baseFile": "invalid-mapping-segment-negative-name-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeColumn", +++ "description": "Test a source map that has an invalid negative relative column field", +++ "baseFile": "invalid-mapping-segment-negative-relative-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeSourceIndex", +++ "description": "Test a source map that has an invalid negative relative source index field", +++ "baseFile": "invalid-mapping-segment-negative-relative-source-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-source-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalLine", +++ "description": "Test a source map that has an invalid negative relative original line field", +++ "baseFile": "invalid-mapping-segment-negative-relative-original-line.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-line.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalColumn", +++ "description": "Test a source map that has an invalid negative relative original column field", +++ "baseFile": "invalid-mapping-segment-negative-relative-original-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeRelativeNameIndex", +++ "description": "Test a source map that has an invalid negative relative name index field", +++ "baseFile": "invalid-mapping-segment-negative-relative-name-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-relative-name-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithColumnExceeding32Bits", +++ "description": "Test a source map that has a column field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-column-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", +++ "description": "Test a source map that has a source index field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-source-index-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", +++ "description": "Test a source map that has a original line field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-original-line-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", +++ "description": "Test a source map that has an original column field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-original-column-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", +++ "description": "Test a source map that has a name index field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-name-index-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "validMappingFieldsWith32BitMaxValues", +++ "description": "Test a source map that has segment fields with max values representable in 32 bits", +++ "baseFile": "valid-mapping-boundary-values.js", +++ "sourceMapFile": "valid-mapping-boundary-values.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingLargeVLQ", +++ "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", +++ "baseFile": "valid-mapping-large-vlq.js", +++ "sourceMapFile": "valid-mapping-large-vlq.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingEmptyGroups", +++ "description": "Test a source map with a mapping that has many empty groups", +++ "baseFile": "valid-mapping-empty-groups.js", +++ "sourceMapFile": "valid-mapping-empty-groups.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingEmptyString", +++ "description": "Test a source map with an empty string mapping", +++ "baseFile": "valid-mapping-empty-string.js", +++ "sourceMapFile": "valid-mapping-empty-string.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "indexMapWrongTypeSections", +++ "description": "Test an index map with a sections field with the wrong type", +++ "baseFile": "index-map-wrong-type-sections.js", +++ "sourceMapFile": "index-map-wrong-type-sections.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapWrongTypeOffset", +++ "description": "Test an index map with an offset field with the wrong type", +++ "baseFile": "index-map-wrong-type-offset.js", +++ "sourceMapFile": "index-map-wrong-type-offset.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapWrongTypeMap", +++ "description": "Test an index map with a map field with the wrong type", +++ "baseFile": "index-map-wrong-type-map.js", +++ "sourceMapFile": "index-map-wrong-type-map.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapInvalidBaseMappings", +++ "description": "Test that an index map cannot also have a regular mappings field", +++ "baseFile": "index-map-invalid-base-mappings.js", +++ "sourceMapFile": "index-map-invalid-base-mappings.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapInvalidOverlap", +++ "description": "Test that an invalid index map with multiple sections that overlap", +++ "baseFile": "index-map-invalid-overlap.js", +++ "sourceMapFile": "index-map-invalid-overlap.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapInvalidOrder", +++ "description": "Test that an invalid index map with multiple sections in the wrong order", +++ "baseFile": "index-map-invalid-order.js", +++ "sourceMapFile": "index-map-invalid-order.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapMissingMap", +++ "description": "Test that an index map that is missing a section map", +++ "baseFile": "index-map-missing-map.js", +++ "sourceMapFile": "index-map-missing-map.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapInvalidSubMap", +++ "description": "Test that an index map that has an invalid section map", +++ "baseFile": "index-map-invalid-sub-map.js", +++ "sourceMapFile": "index-map-invalid-sub-map.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapMissingOffset", +++ "description": "Test that an index map that is missing a section offset", +++ "baseFile": "index-map-missing-offset.js", +++ "sourceMapFile": "index-map-missing-offset.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapMissingOffsetLine", +++ "description": "Test that an index map that is missing a section offset's line field", +++ "baseFile": "index-map-missing-offset-line.js", +++ "sourceMapFile": "index-map-missing-offset-line.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapMissingOffsetColumn", +++ "description": "Test that an index map that is missing a section offset's column field", +++ "baseFile": "index-map-missing-offset-column.js", +++ "sourceMapFile": "index-map-missing-offset-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapOffsetLineWrongType", +++ "description": "Test that an index map that has an offset line field with the wrong type of value", +++ "baseFile": "index-map-offset-line-wrong-type.js", +++ "sourceMapFile": "index-map-offset-line-wrong-type.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapOffsetColumnWrongType", +++ "description": "Test that an index map that has an offset column field with the wrong type of value", +++ "baseFile": "index-map-offset-column-wrong-type.js", +++ "sourceMapFile": "index-map-offset-column-wrong-type.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapEmptySections", +++ "description": "Test a trivial index map with no sections", +++ "baseFile": "index-map-empty-sections.js", +++ "sourceMapFile": "index-map-empty-sections.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "indexMapFileWrongType1", +++ "description": "Test an index map with a file field with the wrong type", +++ "baseFile": "index-map-file-wrong-type-1.js", +++ "sourceMapFile": "index-map-file-wrong-type-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "indexMapFileWrongType2", +++ "description": "Test an index map with a file field with the wrong type", +++ "baseFile": "index-map-file-wrong-type-2.js", +++ "sourceMapFile": "index-map-file-wrong-type-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "basicMapping", +++ "description": "Test a simple source map that has several valid mappings", +++ "baseFile": "basic-mapping.js", +++ "sourceMapFile": "basic-mapping.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "sourceRootResolution", +++ "description": "Similar to basic mapping test, but test resoultion of sources with a sourceRoot field", +++ "baseFile": "source-root-resolution.js", +++ "sourceMapFile": "source-root-resolution.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "theroot/basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "theroot/basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "sourceResolutionAbsoluteURL", +++ "description": "Test resoultion of sources with absolute URLs", +++ "baseFile": "source-resolution-absolute-url.js", +++ "sourceMapFile": "source-resolution-absolute-url.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "/baz/quux/basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "/baz/quux/basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "basicMappingWithIndexMap", +++ "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", +++ "baseFile": "basic-mapping-as-index-map.js", +++ "sourceMapFile": "basic-mapping-as-index-map.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "indexMapWithMissingFile", +++ "description": "Same as the basic mapping index map test but without the optional file field", +++ "baseFile": "index-map-missing-file.js", +++ "sourceMapFile": "index-map-missing-file.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "indexMapWithTwoConcatenatedSources", +++ "description": "Test an index map that has two sub-maps for concatenated sources", +++ "baseFile": "index-map-two-concatenated-sources.js", +++ "sourceMapFile": "index-map-two-concatenated-sources.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 62, +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 71, +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "baz" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 77, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 83, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 88, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "second-source-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 89, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": "baz" +++ } +++ ] +++ }, +++ { +++ "name": "sourcesNullSourcesContentNonNull", +++ "description": "Test a source map that has a null source but has a sourcesContent", +++ "baseFile": "sources-null-sources-content-non-null.js", +++ "sourceMapFile": "sources-null-sources-content-non-null.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": null, +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": null, +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "sourcesNonNullSourcesContentNull", +++ "description": "Test a source map that has a non-null source but has a null sourcesContent", +++ "baseFile": "sources-non-null-sources-content-null.js", +++ "sourceMapFile": "sources-non-null-sources-content-null.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "transitiveMapping", +++ "description": "Test a simple two-stage transitive mapping from a minified JS to a TypeScript source", +++ "baseFile": "transitive-mapping.js", +++ "sourceMapFile": "transitive-mapping.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 13, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 13, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 16, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 2, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 23, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 2, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 4, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 29, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping-original.js.map"], +++ "originalLine": 4, +++ "originalColumn": 4, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "transitiveMappingWithThreeSteps", +++ "description": "Test a three-stage transitive mapping from an un-minified JS to minified JS to a TypeScript source", +++ "baseFile": "transitive-mapping-three-steps.js", +++ "sourceMapFile": "transitive-mapping-three-steps.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 0, +++ "generatedColumn": 13, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 1, +++ "originalColumn": 13, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 1, +++ "generatedColumn": 4, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 2, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 1, +++ "generatedColumn": 11, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 2, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 2, +++ "generatedColumn": 0, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 4, +++ "generatedColumn": 0, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 4, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMappingTransitive", +++ "generatedLine": 4, +++ "generatedColumn": 4, +++ "originalSource": "typescript-original.ts", +++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], +++ "originalLine": 4, +++ "originalColumn": 4, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "vlqValidSingleDigit", +++ "description": "Test VLQ decoding for a single digit, no continuation VLQ", +++ "baseFile": "vlq-valid-single-digit.js", +++ "sourceMapFile": "vlq-valid-single-digit.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalSource": "vlq-valid-single-digit-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "vlqValidNegativeDigit", +++ "description": "Test VLQ decoding where there's a negative digit, no continuation bit", +++ "baseFile": "vlq-valid-negative-digit.js", +++ "sourceMapFile": "vlq-valid-negative-digit.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 2, +++ "generatedColumn": 15, +++ "originalSource": "vlq-valid-negative-digit-original.js", +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 2, +++ "generatedColumn": 2, +++ "originalSource": "vlq-valid-negative-digit-original.js", +++ "originalLine": 1, +++ "originalColumn": 1, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "vlqValidContinuationBitPresent1", +++ "description": "Test VLQ decoding where continuation bits are present (continuations are leading zero)", +++ "baseFile": "vlq-valid-continuation-bit-present-1.js", +++ "sourceMapFile": "vlq-valid-continuation-bit-present-1.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalSource": "vlq-valid-continuation-bit-present-1-original.js", +++ "originalLine": 0, +++ "originalColumn": 1, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "vlqValidContinuationBitPresent2", +++ "description": "Test VLQ decoding where continuation bits are present (continuations have non-zero bits)", +++ "baseFile": "vlq-valid-continuation-bit-present-2.js", +++ "sourceMapFile": "vlq-valid-continuation-bit-present-2.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 2, +++ "generatedColumn": 16, +++ "originalSource": "vlq-valid-continuation-bit-present-2-original.js", +++ "originalLine": 1, +++ "originalColumn": 1, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsSingleFieldSegment", +++ "description": "Test mapping semantics for a single field segment mapping", +++ "baseFile": "mapping-semantics-single-field-segment.js", +++ "sourceMapFile": "mapping-semantics-single-field-segment.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "mapping-semantics-single-field-segment-original.js", +++ "originalLine": 0, +++ "originalColumn": 1, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 2, +++ "originalSource": null, +++ "originalLine": null, +++ "originalColumn": null, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsFourFieldSegment", +++ "description": "Test mapping semantics for a four field segment mapping", +++ "baseFile": "mapping-semantics-four-field-segment.js", +++ "sourceMapFile": "mapping-semantics-four-field-segment.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-four-field-segment-original.js", +++ "originalLine": 2, +++ "originalColumn": 2, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsFiveFieldSegment", +++ "description": "Test mapping semantics for a five field segment mapping", +++ "baseFile": "mapping-semantics-five-field-segment.js", +++ "sourceMapFile": "mapping-semantics-five-field-segment.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-five-field-segment-original.js", +++ "originalLine": 2, +++ "originalColumn": 2, +++ "mappedName": "foo" +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsColumnReset", +++ "description": "Test that the generated column field resets to zero on new lines", +++ "baseFile": "mapping-semantics-column-reset.js", +++ "sourceMapFile": "mapping-semantics-column-reset.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-column-reset-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 1, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-column-reset-original.js", +++ "originalLine": 1, +++ "originalColumn": 0, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsRelative1", +++ "description": "Test that fields are calculated relative to previous ones", +++ "baseFile": "mapping-semantics-relative-1.js", +++ "sourceMapFile": "mapping-semantics-relative-1.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-relative-1-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 5, +++ "originalSource": "mapping-semantics-relative-1-original.js", +++ "originalLine": 0, +++ "originalColumn": 4, +++ "mappedName": null +++ } +++ ] +++ }, +++ { +++ "name": "mappingSemanticsRelative2", +++ "description": "Test that fields are calculated relative to previous ones, across lines", +++ "baseFile": "mapping-semantics-relative-2.js", +++ "sourceMapFile": "mapping-semantics-relative-2.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 1, +++ "originalSource": "mapping-semantics-relative-2-original.js", +++ "originalLine": 0, +++ "originalColumn": 2, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 1, +++ "generatedColumn": 2, +++ "originalSource": "mapping-semantics-relative-2-original.js", +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": "bar" +++ } +++ ] +++ } +++ ] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js ++new file mode 100644 ++index 0000000000..9263eba549 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-and-sources-content-both-null.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map ++new file mode 100644 ++index 0000000000..09a7c1f369 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-and-sources-content-both-null.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "sources": [null], +++ "sourcesContent": [null], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js ++new file mode 100644 ++index 0000000000..779b865e27 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-missing.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map ++new file mode 100644 ++index 0000000000..92aff4fb0e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "version" : 3, +++ "names": ["foo"], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js ++new file mode 100644 ++index 0000000000..939b568ba1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=sources-non-null-sources-content-null.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map ++new file mode 100644 ++index 0000000000..e573906b2d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-non-null-sources-content-null.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "sources": ["basic-mapping-original.js"], +++ "sourcesContent": [null], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js ++new file mode 100644 ++index 0000000000..7e33b7e867 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-a-list-1.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map ++new file mode 100644 ++index 0000000000..26330517b9 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-1.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": "not a list", +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js ++new file mode 100644 ++index 0000000000..4021f763fc ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-a-list-2.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map ++new file mode 100644 ++index 0000000000..2ed85962fd ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-a-list-2.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": { "source.js": 3 }, +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js ++new file mode 100644 ++index 0000000000..7dca97a1da ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-string-or-null.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map ++new file mode 100644 ++index 0000000000..db25561966 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-not-string-or-null.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [3, {}, true, false, []], +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js ++new file mode 100644 ++index 0000000000..a760594ee9 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=sources-null-sources-content-non-null.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map ++new file mode 100644 ++index 0000000000..43af03903f ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/sources-null-sources-content-non-null.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version":3, +++ "names": ["foo"], +++ "sources": [null], +++ "sourcesContent": ["function foo()\n{ return 42; }\nfunction bar()\n { return 24; }\nfoo();\nbar();"], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js ++new file mode 100644 ++index 0000000000..0a96699d6e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js ++@@ -0,0 +1,5 @@ +++function foo(x) { +++ return x; +++} +++foo("foo"); +++//# sourceMappingURL=transitive-mapping-original.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map ++new file mode 100644 ++index 0000000000..65af25c1eb ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-original.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "file" : "transitive-mapping-original.js", +++ "sourceRoot": "", +++ "sources": ["typescript-original.ts"], +++ "names": [], +++ "mappings": "AACA,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,CAAC,CAAC;AACX,CAAC;AACD,GAAG,CAAC,KAAK,CAAC,CAAC" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js ++new file mode 100644 ++index 0000000000..fd956164d3 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js ++@@ -0,0 +1,6 @@ +++function foo(x) { +++ return x; +++} +++ +++foo("foo"); +++//# sourceMappingURL=transitive-mapping-three-steps.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map ++new file mode 100644 ++index 0000000000..90459d90f6 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping-three-steps.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "file": "transitive-mapping-three-steps.js", +++ "sources": ["transitive-mapping.js"], +++ "names": ["foo", "x"], +++ "mappings": "AAAA,SAASA,IAAIC;IAAG,OAAOA;AAAC;;AAACD,IAAI,KAAK" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js ++new file mode 100644 ++index 0000000000..183c027f1b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js ++@@ -0,0 +1,2 @@ +++function foo(x){return x}foo("foo"); +++//# sourceMappingURL=transitive-mapping.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map ++new file mode 100644 ++index 0000000000..d6a6fa6672 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/transitive-mapping.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","x"], +++ "sources": ["transitive-mapping-original.js"], +++ "mappings":"AAAA,SAASA,IAAIC,GACT,OAAOA,CACX,CACAD,IAAI" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts b/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts ++new file mode 100644 ++index 0000000000..cd51c01ba1 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/typescript-original.ts ++@@ -0,0 +1,5 @@ +++type FooArg = string | number; +++function foo(x : FooArg) { +++ return x; +++} +++foo("foo"); ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js ++new file mode 100644 ++index 0000000000..19dfb0e2e6 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=unrecognized-property.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map ++new file mode 100644 ++index 0000000000..40bee558a4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/unrecognized-property.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "", +++ "foobar": 42, +++ "unusedProperty": [1, 2, 3, 4] +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js ++new file mode 100644 ++index 0000000000..3c49709e05 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-boundary-values.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map ++new file mode 100644 ++index 0000000000..4dd836e63d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-boundary-values.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "file": "valid-mapping-boundary-values.js", +++ "sources": ["empty-original.js"], +++ "mappings": "+/////DA+/////D+/////DA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js ++new file mode 100644 ++index 0000000000..a2b767b619 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-empty-groups.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map ++new file mode 100644 ++index 0000000000..643c9ae784 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-empty-groups.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "valid-mapping-empty-groups.js", +++ "sources": ["empty-original.js"], +++ "sourcesContent": [""], +++ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js ++new file mode 100644 ++index 0000000000..b0cd897813 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-large-vlq.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map ++new file mode 100644 ++index 0000000000..76e18704c4 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-large-vlq.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": [], +++ "sources": ["valid-mapping-large-vlq.js"], +++ "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js ++new file mode 100644 ++index 0000000000..ee2acf0f5b ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=valid-mapping-null-sources.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map ++new file mode 100644 ++index 0000000000..199cda9369 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/valid-mapping-null-sources.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo"], +++ "sources": [null], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-missing.js b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js ++new file mode 100644 ++index 0000000000..c32d1f1a1c ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-missing.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map ++new file mode 100644 ++index 0000000000..49d8ce766e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js ++new file mode 100644 ++index 0000000000..ae2342e2ff ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-not-a-number.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map ++new file mode 100644 ++index 0000000000..a584d6e695 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-not-a-number.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3foo", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js ++new file mode 100644 ++index 0000000000..a55170885d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-numeric-string.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map ++new file mode 100644 ++index 0000000000..dbe52a7d0d ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-numeric-string.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js ++new file mode 100644 ++index 0000000000..55f4e1a298 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-too-high.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map ++new file mode 100644 ++index 0000000000..ee23be32ff ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-high.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 4, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js ++new file mode 100644 ++index 0000000000..d9642920b3 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-too-low.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map ++new file mode 100644 ++index 0000000000..64ca7a6e2e ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-too-low.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 2, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-valid.js b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js ++new file mode 100644 ++index 0000000000..82d0bfa1eb ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-valid.js.map ++diff --git a/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map ++new file mode 100644 ++index 0000000000..1a163052d8 ++--- /dev/null +++++ b/front_end/core/sdk/fixtures/sourcemaps/version-valid.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++-- ++2.39.2 ++ +diff --git a/LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch b/LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch +new file mode 100644 +index 000000000000..dc08ba5fadb4 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/chrome/0002-Add-reverse-mapping-code-to-test.patch +@@ -0,0 +1,46 @@ ++From bebeda0b8133fc8f44382e59edda9203c980e8f3 Mon Sep 17 00:00:00 2001 ++From: Asumu Takikawa <asumu@igalia.com> ++Date: Thu, 11 Jul 2024 16:44:29 -0700 ++Subject: [PATCH 2/2] Add reverse mapping code to test ++ ++--- ++ front_end/core/sdk/SourceMapSpec.test.ts | 16 +++++++++++++++- ++ 1 file changed, 15 insertions(+), 1 deletion(-) ++ ++diff --git a/front_end/core/sdk/SourceMapSpec.test.ts b/front_end/core/sdk/SourceMapSpec.test.ts ++index 93b26a2e13..402b82e4c0 100644 ++--- a/front_end/core/sdk/SourceMapSpec.test.ts +++++ b/front_end/core/sdk/SourceMapSpec.test.ts ++@@ -12,7 +12,6 @@ ++ ++ **/ ++ ++-const {assert} = chai; ++ import type * as Platform from '../platform/platform.js'; ++ import {assertNotNullOrUndefined} from '../platform/platform.js'; ++ import { SourceMapV3, parseSourceMap } from './SourceMap.js'; ++@@ -170,6 +169,21 @@ describeWithEnvironment('SourceMapSpec', () => { ++ assert.strictEqual(nullish(actual.sourceURL), originalSource, 'unexpected source URL'); ++ assert.strictEqual(nullish(actual.sourceLineNumber), originalLine, 'unexpected source line number'); ++ assert.strictEqual(nullish(actual.sourceColumnNumber), originalColumn, 'unexpected source column number'); +++ +++ if (originalSource != null) { +++ let reverseEntries = sourceMap.findReverseEntries( +++ originalSource as Platform.DevToolsPath.UrlString, +++ originalLine, +++ originalColumn +++ ); +++ +++ const anyEntryMatched = reverseEntries.some((entry) => { +++ return entry.sourceURL === originalSource && +++ entry.sourceLineNumber === originalLine && +++ entry.sourceColumnNumber === originalColumn; +++ }); +++ assert.isTrue(anyEntryMatched, `expected any matching reverse lookup entry, got none`); +++ } ++ } ++ }); ++ } ++-- ++2.39.2 ++ +diff --git a/LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch b/LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch +new file mode 100644 +index 000000000000..a9e256e02f8a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/firefox/0001-WIP-Firefox-source-map-spec-tests.patch +@@ -0,0 +1,337 @@ ++From 8327515870d595ab04a111f6c37b84eab8a5010c Mon Sep 17 00:00:00 2001 ++From: Asumu Takikawa <asumu@igalia.com> ++Date: Tue, 27 Feb 2024 18:22:45 -0800 ++Subject: [PATCH] WIP Firefox source map spec tests ++ ++--- ++ .../test/browser/browser.toml | 2 + ++ .../test/browser/browser_spec-source-map.js | 68 +++++++++++++++++++ ++ .../fixtures/basic-mapping-original.js | 8 +++ ++ .../test/browser/fixtures/basic-mapping.js | 1 + ++ .../browser/fixtures/basic-mapping.js.map | 6 ++ ++ .../fixtures/source-map-spec-tests.json | 60 ++++++++++++++++ ++ .../browser/fixtures/unrecognized-property.js | 1 + ++ .../fixtures/unrecognized-property.js.map | 8 +++ ++ .../browser/fixtures/version-not-a-number.js | 1 + ++ .../fixtures/version-not-a-number.js.map | 6 ++ ++ .../test/browser/fixtures/version-numbers.js | 6 ++ ++ .../test/browser/fixtures/version-too-high.js | 1 + ++ .../browser/fixtures/version-too-high.js.map | 6 ++ ++ .../test/browser/fixtures/version-too-low.js | 1 + ++ .../browser/fixtures/version-too-low.js.map | 6 ++ ++ .../test/browser/fixtures/version-valid.js | 1 + ++ .../browser/fixtures/version-valid.js.map | 6 ++ ++ 17 files changed, 188 insertions(+) ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/browser_spec-source-map.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping-original.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/source-map-spec-tests.json ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-numbers.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js.map ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js ++ create mode 100644 devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js.map ++ ++diff --git a/devtools/client/shared/source-map-loader/test/browser/browser.toml b/devtools/client/shared/source-map-loader/test/browser/browser.toml ++index 5a602e9eeb893..a670ab0acee89 100644 ++--- a/devtools/client/shared/source-map-loader/test/browser/browser.toml +++++ b/devtools/client/shared/source-map-loader/test/browser/browser.toml ++@@ -19,3 +19,5 @@ skip-if = [ ++ "http3", # Bug 1829298 ++ "http2", ++ ] +++ +++["browser_spec-source-map.js"] ++diff --git a/devtools/client/shared/source-map-loader/test/browser/browser_spec-source-map.js b/devtools/client/shared/source-map-loader/test/browser/browser_spec-source-map.js ++new file mode 100644 ++index 0000000000000..34695d6bd395b ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/browser_spec-source-map.js ++@@ -0,0 +1,68 @@ +++"use strict"; +++ +++const { +++ generatedToOriginalId, +++} = require("resource://devtools/client/shared/source-map-loader/utils/index.js"); +++ +++async function isValidSourceMap(base) { +++ try { +++ await fetchFixtureSourceMap(base); +++ } catch (exn) { +++ return false; +++ } +++ return true; +++} +++ +++async function checkMapping(testCase, action) { +++ const originalId = generatedToOriginalId(testCase.baseFile, `${URL_ROOT_SSL}fixtures/${action.originalSource}`); +++ const generatedLoc = await gSourceMapLoader.getGeneratedLocation({ +++ sourceId: originalId, +++ line: action.originalLine + 1, +++ column: action.originalColumn, +++ }); +++ Assert.ok(generatedLoc !== null, "Location lookup should not return null"); +++ Assert.equal(testCase.baseFile, generatedLoc.sourceId); +++ Assert.equal(action.generatedLine + 1, generatedLoc.line); +++ Assert.equal(action.generatedColumn, generatedLoc.column); +++} +++ +++const SPEC_TESTS_URI = `${URL_ROOT_SSL}fixtures/source-map-spec-tests.json` +++const testDescriptions = JSON.parse(read(SPEC_TESTS_URI)); +++ +++for (const testCase of testDescriptions.tests) { +++ async function testFunction() { +++ const baseName = testCase.baseFile.substring(0, testCase.baseFile.indexOf(".js")); +++ Assert.equal(testCase.sourceMapIsValid, await isValidSourceMap(baseName)); +++ +++ if (testCase.testActions) { +++ for (const action of testCase.testActions) { +++ if (action.actionType === "checkMapping") +++ await checkMapping(testCase, action); +++ } +++ } +++ }; +++ Object.defineProperty(testFunction, "name", { value: testCase.name }); +++ add_task(testFunction); +++} +++ +++function read(srcChromeURL) { +++ const scriptableStream = Cc[ +++ "@mozilla.org/scriptableinputstream;1" +++ ].getService(Ci.nsIScriptableInputStream); +++ +++ const channel = NetUtil.newChannel({ +++ uri: srcChromeURL, +++ loadUsingSystemPrincipal: true, +++ }); +++ const input = channel.open(); +++ scriptableStream.init(input); +++ +++ let data = ""; +++ while (input.available()) { +++ data = data.concat(scriptableStream.read(input.available())); +++ } +++ scriptableStream.close(); +++ input.close(); +++ +++ return data; +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping-original.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping-original.js ++new file mode 100644 ++index 0000000000000..301b186cb15e6 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping-original.js ++@@ -0,0 +1,8 @@ +++function foo() { +++ return 42; +++} +++function bar() { +++ return 24; +++} +++foo(); +++bar(); ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js ++new file mode 100644 ++index 0000000000000..9df72406be544 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js ++@@ -0,0 +1 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); ++\ No newline at end of file ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js.map ++new file mode 100644 ++index 0000000000000..12dc9679a4b1d ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/basic-mapping.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/source-map-spec-tests.json b/devtools/client/shared/source-map-loader/test/browser/fixtures/source-map-spec-tests.json ++new file mode 100644 ++index 0000000000000..16d8442811655 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/source-map-spec-tests.json ++@@ -0,0 +1,60 @@ +++{ +++ "tests": [ +++ { +++ "name": "versionValid", +++ "baseFile": "version-valid.js", +++ "sourceMapFile": "version-valid.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "versionNotANumber", +++ "baseFile": "version-not-a-number.js", +++ "sourceMapFile": "version-not-a-number.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooHigh", +++ "baseFile": "version-too-high.js", +++ "sourceMapFile": "version-too-high.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooLow", +++ "baseFile": "version-too-low.js", +++ "sourceMapFile": "version-too-low.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "unrecognizedProperty", +++ "baseFile": "unrecognized-property.js", +++ "sourceMapFile": "unrecognized-property.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "basicMapping", +++ "baseFile": "basic-mapping.js", +++ "sourceMapFile": "basic-mapping.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "mappedName": "bar" +++ } +++ ] +++ } +++ ] +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js ++new file mode 100644 ++index 0000000000000..47303d1fcf302 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=unrecognized-property.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js.map ++new file mode 100644 ++index 0000000000000..40bee558a4ff9 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/unrecognized-property.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "", +++ "foobar": 42, +++ "unusedProperty": [1, 2, 3, 4] +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js ++new file mode 100644 ++index 0000000000000..5382a716e3a21 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=version-not-a-number.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js.map ++new file mode 100644 ++index 0000000000000..a584d6e695117 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-not-a-number.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3foo", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-numbers.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-numbers.js ++new file mode 100644 ++index 0000000000000..e79993b659db6 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-numbers.js ++@@ -0,0 +1,6 @@ +++// Test that invalid version numbers are rejected. +++ +++assert(isValidSourceMap("./version-valid.map")); +++assert(!isValidSourceMap("./version-not-a-number.map")); +++assert(!isValidSourceMap("./version-too-low.map")); +++assert(!isValidSourceMap("./version-too-high.map")); ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js ++new file mode 100644 ++index 0000000000000..04bfe7f62b7b9 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=version-too-high.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js.map ++new file mode 100644 ++index 0000000000000..ee23be32ff278 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-high.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 4, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js ++new file mode 100644 ++index 0000000000000..54b3526c6b5e2 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=version-too-low.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js.map ++new file mode 100644 ++index 0000000000000..64ca7a6e2e928 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-too-low.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 2, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js ++new file mode 100644 ++index 0000000000000..f8541f9efdc71 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js ++@@ -0,0 +1 @@ +++// # sourceMappingURL=version-valid.js.map ++diff --git a/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js.map b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js.map ++new file mode 100644 ++index 0000000000000..1a163052d8fc8 ++--- /dev/null +++++ b/devtools/client/shared/source-map-loader/test/browser/fixtures/version-valid.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++-- ++2.39.2 ++ +diff --git a/LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js b/LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js +new file mode 100644 +index 000000000000..af18e9bca51d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/firefox/browser_spec-source-map.js +@@ -0,0 +1,71 @@ ++"use strict"; ++ ++const { ++ generatedToOriginalId, ++} = require("resource://devtools/client/shared/source-map-loader/utils/index.js"); ++ ++async function checkValidity(isValid, base, testCase) { ++ try { ++ await fetchFixtureSourceMap(base); ++ const originalId = generatedToOriginalId(testCase.baseFile, "unused"); ++ await gSourceMapLoader.getOriginalRanges(originalId); ++ } catch (exn) { ++ Assert.ok(!isValid, "Source map loading failed with " + exn.message); ++ return; ++ } ++ Assert.ok(isValid, "Source map loading should have failed but did not"); ++} ++ ++async function checkMapping(testCase, action) { ++ const originalId = generatedToOriginalId(testCase.baseFile, `${URL_ROOT_SSL}fixtures/${action.originalSource}`); ++ const generatedLoc = await gSourceMapLoader.getGeneratedLocation({ ++ sourceId: originalId, ++ line: action.originalLine + 1, ++ column: action.originalColumn, ++ }); ++ Assert.ok(generatedLoc !== null, "Location lookup should not return null"); ++ Assert.equal(testCase.baseFile, generatedLoc.sourceId); ++ Assert.equal(action.generatedLine + 1, generatedLoc.line); ++ Assert.equal(action.generatedColumn, generatedLoc.column); ++} ++ ++const SPEC_TESTS_URI = `${URL_ROOT_SSL}fixtures/source-map-spec-tests.json` ++const testDescriptions = JSON.parse(read(SPEC_TESTS_URI)); ++ ++for (const testCase of testDescriptions.tests) { ++ // The following uses a hack to ensure the test case name is used in stack traces. ++ const testFunction = {[testCase.name]: async function() { ++ const baseName = testCase.baseFile.substring(0, testCase.baseFile.indexOf(".js")); ++ await checkValidity(testCase.sourceMapIsValid, baseName, testCase); ++ ++ if (testCase.testActions) { ++ for (const action of testCase.testActions) { ++ if (action.actionType === "checkMapping") ++ await checkMapping(testCase, action); ++ } ++ } ++ }}[testCase.name]; ++ add_task(testFunction); ++} ++ ++function read(srcChromeURL) { ++ const scriptableStream = Cc[ ++ "@mozilla.org/scriptableinputstream;1" ++ ].getService(Ci.nsIScriptableInputStream); ++ ++ const channel = NetUtil.newChannel({ ++ uri: srcChromeURL, ++ loadUsingSystemPrincipal: true, ++ }); ++ const input = channel.open(); ++ scriptableStream.init(input); ++ ++ let data = ""; ++ while (input.available()) { ++ data = data.concat(scriptableStream.read(input.available())); ++ } ++ scriptableStream.close(); ++ input.close(); ++ ++ return data; ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js +new file mode 100644 +index 000000000000..b9fae380437d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=basic-mapping-as-index-map.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map +new file mode 100644 +index 000000000000..c0ad870ed2ba +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-as-index-map.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "file": "basic-mapping-as-index-map.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js +new file mode 100644 +index 000000000000..301b186cb15e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping-original.js +@@ -0,0 +1,8 @@ ++function foo() { ++ return 42; ++} ++function bar() { ++ return 24; ++} ++foo(); ++bar(); +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js +new file mode 100644 +index 000000000000..2e479a4175b8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=basic-mapping.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map +new file mode 100644 +index 000000000000..12dc9679a4b1 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/basic-mapping.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version":3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js +new file mode 100644 +index 000000000000..d049f870450a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=file-not-a-string-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map +new file mode 100644 +index 000000000000..85e973d881df +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "file": [], ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js +new file mode 100644 +index 000000000000..07b8152c0c6c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=file-not-a-string-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map +new file mode 100644 +index 000000000000..a5b6b1f9d94f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/file-not-a-string-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "file": 235324, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js +new file mode 100644 +index 000000000000..385a5c3501b2 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-empty.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map +new file mode 100644 +index 000000000000..7297863a9be8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-empty.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js +new file mode 100644 +index 000000000000..567174a707ef +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-out-of-bounds-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map +new file mode 100644 +index 000000000000..fb2566bb419b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [1] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js +new file mode 100644 +index 000000000000..4216d9a67315 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-out-of-bounds-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map +new file mode 100644 +index 000000000000..41371a76a896 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-out-of-bounds-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [-1] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js +new file mode 100644 +index 000000000000..ea64a5565a63 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-valid-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map +new file mode 100644 +index 000000000000..98eebdf7f655 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-valid-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [0] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js +new file mode 100644 +index 000000000000..8b40bd384767 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map +new file mode 100644 +index 000000000000..688740aba843 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": ["not a number"] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js +new file mode 100644 +index 000000000000..35c77911648e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map +new file mode 100644 +index 000000000000..ca1d30de2d36 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": ["0"] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js +new file mode 100644 +index 000000000000..8735d4175804 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-3.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map +new file mode 100644 +index 000000000000..1ac167d56c4e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-3.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": 0 ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js +new file mode 100644 +index 000000000000..35db5acc432b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=ignore-list-wrong-type-4.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map +new file mode 100644 +index 000000000000..c1a27efe980d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/ignore-list-wrong-type-4.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "", ++ "names": [], ++ "ignoreList": [0.5] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js +new file mode 100644 +index 000000000000..abe9f7f30816 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-empty-sections.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map +new file mode 100644 +index 000000000000..f3efabbe00c3 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-empty-sections.js.map +@@ -0,0 +1,4 @@ ++{ ++ "version": 3, ++ "sections": [] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js +new file mode 100644 +index 000000000000..48bb12855bf5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=index-map-file-wrong-type-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map +new file mode 100644 +index 000000000000..dd39b5a2b13c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-1.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "file": [], ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js +new file mode 100644 +index 000000000000..c002ba726a51 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=index-map-file-wrong-type-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map +new file mode 100644 +index 000000000000..0ee0a406be8d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-file-wrong-type-2.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "file": 2345234234, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js +new file mode 100644 +index 000000000000..e90bef083c49 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-base-mappings.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map +new file mode 100644 +index 000000000000..b489c1f080b1 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-base-mappings.js.map +@@ -0,0 +1,15 @@ ++{ ++ "version": 3, ++ "mappings": "AAAA", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js +new file mode 100644 +index 000000000000..263fa3c6e0b9 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-order.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map +new file mode 100644 +index 000000000000..82da69df720e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-order.js.map +@@ -0,0 +1,23 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 1, "column": 4 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js +new file mode 100644 +index 000000000000..9aff8dc6203a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-overlap.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map +new file mode 100644 +index 000000000000..8d42546fd899 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-overlap.js.map +@@ -0,0 +1,23 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js +new file mode 100644 +index 000000000000..284e8d77e659 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-invalid-sub-map.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map +new file mode 100644 +index 000000000000..4020ae30c576 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-invalid-sub-map.js.map +@@ -0,0 +1,13 @@ ++{ ++ "version": 3, ++ "file": "index-map-invalid-sub-map.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": "3", ++ "mappings": 7 ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js +new file mode 100644 +index 000000000000..be2a93cb77cd +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=index-map-missing-file.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map +new file mode 100644 +index 000000000000..8a6d4b5dc788 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-file.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js +new file mode 100644 +index 000000000000..86c8e9a2535a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-map.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map +new file mode 100644 +index 000000000000..3bce47e852cf +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-map.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js +new file mode 100644 +index 000000000000..fe6917403f18 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map +new file mode 100644 +index 000000000000..aa48bbb99317 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-column.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js +new file mode 100644 +index 000000000000..ba8614e412ce +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset-line.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map +new file mode 100644 +index 000000000000..3d60444ea74f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset-line.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js +new file mode 100644 +index 000000000000..9ca2cf3fb515 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-missing-offset.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map +new file mode 100644 +index 000000000000..7285138bf51e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-missing-offset.js.map +@@ -0,0 +1,13 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js +new file mode 100644 +index 000000000000..ed1e9ec5d5b8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-offset-column-wrong-type.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map +new file mode 100644 +index 000000000000..b43e79a9dd85 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-column-wrong-type.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": true }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js +new file mode 100644 +index 000000000000..d58f2aff993e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-offset-line-wrong-type.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map +new file mode 100644 +index 000000000000..81dbcd6ec434 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-offset-line-wrong-type.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": true, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js +new file mode 100644 +index 000000000000..b8702d7187c9 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar();function baz(){return"baz"}baz(); ++//# sourceMappingURL=index-map-two-concatenated-sources.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map +new file mode 100644 +index 000000000000..f67f5de3c5d8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-two-concatenated-sources.js.map +@@ -0,0 +1,24 @@ ++{ ++ "version": 3, ++ "file": "index-map-two-concatenated-sources.js", ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": { ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" ++ } ++ }, ++ { ++ "offset": { "line": 0, "column": 62 }, ++ "map": { ++ "version": 3, ++ "names": ["baz"], ++ "sources": ["second-source-original.js"], ++ "mappings":"AAAA,SAASA,MACP,MAAO,KACT,CACAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js +new file mode 100644 +index 000000000000..d31d6d6358b4 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-map.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map +new file mode 100644 +index 000000000000..0963f623d761 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-map.js.map +@@ -0,0 +1,9 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": { "line": 0, "column": 0 }, ++ "map": "not a map" ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js +new file mode 100644 +index 000000000000..048e1246f8b0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-offset.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map +new file mode 100644 +index 000000000000..fbc6e4e67887 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-offset.js.map +@@ -0,0 +1,14 @@ ++{ ++ "version": 3, ++ "sections": [ ++ { ++ "offset": "not an offset", ++ "map": { ++ "version": 3, ++ "names": [], ++ "sources": ["empty-original.js"], ++ "mappings": "AAAA" ++ } ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js +new file mode 100644 +index 000000000000..011eca806ed6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=index-map-wrong-type-sections.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map +new file mode 100644 +index 000000000000..dbfb4ead3001 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/index-map-wrong-type-sections.js.map +@@ -0,0 +1,4 @@ ++{ ++ "version": 3, ++ "sections": "not a sections list" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js +new file mode 100644 +index 000000000000..25338aca30ce +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-bad-separator.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map +new file mode 100644 +index 000000000000..5f4f5b92330a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-bad-separator.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAAA.SAASA:MACP" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js +new file mode 100644 +index 000000000000..cb38e2fe9d7b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map +new file mode 100644 +index 000000000000..5bf3e2a9d85b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-1.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-not-a-string-1.js", ++ "sources": ["empty-original.js"], ++ "mappings": 5 ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js +new file mode 100644 +index 000000000000..3d84abd6c6b4 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map +new file mode 100644 +index 000000000000..4527e7f7641c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-not-a-string-2.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-not-a-string-2.js", ++ "sources": ["empty-original.js"], ++ "mappings": [1, 2, 3, 4] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js +new file mode 100644 +index 000000000000..55591f874b1b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map +new file mode 100644 +index 000000000000..b4c059e0151b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-column-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-column-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "ggggggE" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js +new file mode 100644 +index 000000000000..2a6b434eff58 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map +new file mode 100644 +index 000000000000..8dd2ea6c2da0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "file": "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js +new file mode 100644 +index 000000000000..709e34dbd326 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map +new file mode 100644 +index 000000000000..c7bf5b98d120 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-name-index-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-name-index-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAggggggE" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js +new file mode 100644 +index 000000000000..a202152d6fdf +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map +new file mode 100644 +index 000000000000..403878bfa47a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-column.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-column.js", ++ "sources": ["empty-original.js"], ++ "mappings": "F" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js +new file mode 100644 +index 000000000000..3e3f63420467 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map +new file mode 100644 +index 000000000000..b94f63646e46 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-name-index.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-name-index.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js +new file mode 100644 +index 000000000000..f21d5342b395 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map +new file mode 100644 +index 000000000000..011c639d3f91 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-column.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-original-column.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js +new file mode 100644 +index 000000000000..b37309601ce0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map +new file mode 100644 +index 000000000000..e7ec993eebda +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-original-line.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-original-line.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAFA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js +new file mode 100644 +index 000000000000..94b835d6877c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map +new file mode 100644 +index 000000000000..414884072b55 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-column.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-column.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "C,F" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js +new file mode 100644 +index 000000000000..c965c5f011f5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-name-index.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map +new file mode 100644 +index 000000000000..1fbbcfcd323e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-name-index.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-name-index.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AAAAC,AAAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js +new file mode 100644 +index 000000000000..493a6ec88a39 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-column.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map +new file mode 100644 +index 000000000000..7e62895651fa +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-column.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-original-column.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AAAC,AAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js +new file mode 100644 +index 000000000000..ca8329fb98f0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-original-line.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map +new file mode 100644 +index 000000000000..86b0fb3a04cc +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-original-line.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-original-line.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "AACA,AAFA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js +new file mode 100644 +index 000000000000..fa92225b0963 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-relative-source-index.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map +new file mode 100644 +index 000000000000..2efeb047db61 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-relative-source-index.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-relative-source-index.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "ACAA,AFAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js +new file mode 100644 +index 000000000000..6e05849b6a03 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map +new file mode 100644 +index 000000000000..596c2f298bbe +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-negative-source-index.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-negative-source-index.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AFAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js +new file mode 100644 +index 000000000000..0936ed7ea8fd +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map +new file mode 100644 +index 000000000000..ff2103fe24fe +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-column-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-original-column-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAAggggggE" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js +new file mode 100644 +index 000000000000..9b3aa5a361ae +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map +new file mode 100644 +index 000000000000..890f1c71fc5b +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-original-line-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-original-line-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AAggggggEA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js +new file mode 100644 +index 000000000000..2e5fbca26825 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map +new file mode 100644 +index 000000000000..86dedb114fa9 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "sources": ["empty-original.js"], ++ "mappings": "ACAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js +new file mode 100644 +index 000000000000..3f4943e1272d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map +new file mode 100644 +index 000000000000..e9f858c6e15d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-source-index-too-large.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-source-index-too-large.js", ++ "sources": ["empty-original.js"], ++ "mappings": "AggggggEAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js +new file mode 100644 +index 000000000000..4b868fac9c5e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map +new file mode 100644 +index 000000000000..c2af1165ad8f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-three-fields.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js +new file mode 100644 +index 000000000000..96045a7a11dd +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map +new file mode 100644 +index 000000000000..73cf00fa1c96 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-two-fields.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","bar"], ++ "sources": ["basic-mapping-original.js"], ++ "mappings": "AA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js +new file mode 100644 +index 000000000000..9d5332a56ca5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map +new file mode 100644 +index 000000000000..5a34d25b645e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-mapping-segment-with-zero-fields.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "invalid-mapping-segment-with-zero-fields.js", ++ "sources": ["empty-original.js"], ++ "mappings": ",,,," ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js +new file mode 100644 +index 000000000000..2c2a0090aca6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-vlq-missing-continuation.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map +new file mode 100644 +index 000000000000..dd0e363ff473 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-missing-continuation.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "g" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js +new file mode 100644 +index 000000000000..d1b20b41a29f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=invalid-vlq-non-base64-char.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map +new file mode 100644 +index 000000000000..4fa1ac576885 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/invalid-vlq-non-base64-char.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "A$%?!" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js +new file mode 100644 +index 000000000000..b64482d09843 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js +@@ -0,0 +1,3 @@ ++ foo ++ bar ++//# sourceMappingURL=mapping-semantics-column-reset.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map +new file mode 100644 +index 000000000000..97bc9b91a43d +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-column-reset.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["mapping-semantics-column-reset-original.js"], ++ "sourcesContent": ["foo\nbar"], ++ "mappings": "CAAA;CACA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js +new file mode 100644 +index 000000000000..0f6602d61503 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js +@@ -0,0 +1,2 @@ ++foo ++//# sourceMappingURL=mapping-semantics-five-field-segment.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map +new file mode 100644 +index 000000000000..d0504f511dad +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-five-field-segment.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": ["unused", "mapping-semantics-five-field-segment-original.js"], ++ "sourcesContent": ["", "\n\n foo"], ++ "mappings": "CCEEA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js +new file mode 100644 +index 000000000000..3dcbee9294c0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js +@@ -0,0 +1,2 @@ ++foo ++//# sourceMappingURL=mapping-semantics-four-field-segment.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map +new file mode 100644 +index 000000000000..9e01ac4b6c58 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-four-field-segment.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["unused", "mapping-semantics-four-field-segment-original.js"], ++ "sourcesContent": ["", "\n\n foo"], ++ "mappings": "CCEE" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js +new file mode 100644 +index 000000000000..281870cc50e7 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js +@@ -0,0 +1,2 @@ ++ 42; 24; ++//# sourceMappingURL=mapping-semantics-relative-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map +new file mode 100644 +index 000000000000..6570031f8983 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-1.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["unused", "mapping-semantics-relative-1-original.js"], ++ "sourcesContent": ["", "42; 24;"], ++ "mappings": "CCAA,IAAI" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js +new file mode 100644 +index 000000000000..f4bff1c75bcc +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js +@@ -0,0 +1,3 @@ ++ foo ++ bar ++//# sourceMappingURL=mapping-semantics-relative-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map +new file mode 100644 +index 000000000000..d6845233f912 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-relative-2.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo", "bar"], ++ "sources": ["unused", "mapping-semantics-relative-2-original.js"], ++ "sourcesContent": ["", " foo\n bar"], ++ "mappings": "CCAEA;EACAC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js +new file mode 100644 +index 000000000000..ca06b7c58d88 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js +@@ -0,0 +1,2 @@ ++ 3 ++//# sourceMappingURL=mapping-semantics-single-field-segment.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map +new file mode 100644 +index 000000000000..8260d63085d7 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/mapping-semantics-single-field-segment.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["mapping-semantics-single-field-segment-original.js"], ++ "sourcesContent": ["3 3"], ++ "mappings": "AAAC,E" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js b/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js +new file mode 100644 +index 000000000000..58781fd88705 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-missing.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map +new file mode 100644 +index 000000000000..475f4e309b26 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-missing.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["empty-original.js"], ++ "sourcesContent" : [""], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js +new file mode 100644 +index 000000000000..dc65f1972b5a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-a-list-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map +new file mode 100644 +index 000000000000..fe1edaeb96ad +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-1.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": "not a list", ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js +new file mode 100644 +index 000000000000..d7251f78da84 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-a-list-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map +new file mode 100644 +index 000000000000..3388d2bb7109 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-a-list-2.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": { "foo": 3 }, ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js +new file mode 100644 +index 000000000000..8dc7b4811a3e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=names-not-string.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map +new file mode 100644 +index 000000000000..c0feb0739aec +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/names-not-string.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": ["source.js"], ++ "names": [null, 3, true, false, {}, []], ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js b/LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js +new file mode 100644 +index 000000000000..c339bc9d15da +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/second-source-original.js +@@ -0,0 +1,4 @@ ++function baz() { ++ return "baz"; ++} ++baz(); +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js b/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js +new file mode 100644 +index 000000000000..7ab34b6bd0fa +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=source-resolution-absolute-url.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map +new file mode 100644 +index 000000000000..195dc42ecea3 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-resolution-absolute-url.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "file": "source-root-resolution.js", ++ "names": ["foo", "bar"], ++ "sources": ["/baz/quux/basic-mapping-original.js"], ++ "sourcesContent": ["function foo() {\nreturn 42;\n }\n function bar() {\n return 24;\n }\n foo();\n bar();"], ++ "mappings": "AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js +new file mode 100644 +index 000000000000..f176f3143a4a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=source-root-not-a-string-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map +new file mode 100644 +index 000000000000..e297f5c03e50 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-1.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sourceRoot": [], ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js +new file mode 100644 +index 000000000000..f176f3143a4a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=source-root-not-a-string-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map +new file mode 100644 +index 000000000000..d5705ebfb8e9 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-not-a-string-2.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sourceRoot": -10923409, ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js +new file mode 100644 +index 000000000000..15a1a4c95026 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=source-root-resolution.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map +new file mode 100644 +index 000000000000..b2067265c02e +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/source-root-resolution.js.map +@@ -0,0 +1,9 @@ ++{ ++ "version": 3, ++ "sourceRoot": "theroot", ++ "file": "source-root-resolution.js", ++ "names": ["foo", "bar"], ++ "sources": ["basic-mapping-original.js"], ++ "sourcesContent": ["function foo() {\n return 42;\n }\n function bar() {\n return 24;\n }\n foo();\n bar();"], ++ "mappings": "AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js +new file mode 100644 +index 000000000000..9263eba549f5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-and-sources-content-both-null.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map +new file mode 100644 +index 000000000000..09a7c1f3698c +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-and-sources-content-both-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": [null], ++ "sourcesContent": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js +new file mode 100644 +index 000000000000..779b865e2769 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-missing.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map +new file mode 100644 +index 000000000000..92aff4fb0e74 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "version" : 3, ++ "names": ["foo"], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js +new file mode 100644 +index 000000000000..939b568ba142 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=sources-non-null-sources-content-null.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map +new file mode 100644 +index 000000000000..e573906b2d71 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-non-null-sources-content-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "sources": ["basic-mapping-original.js"], ++ "sourcesContent": [null], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js +new file mode 100644 +index 000000000000..7e33b7e86725 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-a-list-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map +new file mode 100644 +index 000000000000..26330517b988 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-1.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": "not a list", ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js +new file mode 100644 +index 000000000000..4021f763fc88 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-a-list-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map +new file mode 100644 +index 000000000000..2ed85962fddf +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-a-list-2.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": { "source.js": 3 }, ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js +new file mode 100644 +index 000000000000..7dca97a1dab5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=sources-not-string-or-null.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map +new file mode 100644 +index 000000000000..db2556196605 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-not-string-or-null.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [3, {}, true, false, []], ++ "names": ["foo"], ++ "mappings": "AAAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js b/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js +new file mode 100644 +index 000000000000..a760594ee9bd +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js +@@ -0,0 +1,2 @@ ++function foo(){return 42}function bar(){return 24}foo();bar(); ++//# sourceMappingURL=sources-null-sources-content-non-null.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map +new file mode 100644 +index 000000000000..43af03903f64 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/sources-null-sources-content-non-null.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version":3, ++ "names": ["foo"], ++ "sources": [null], ++ "sourcesContent": ["function foo()\n{ return 42; }\nfunction bar()\n { return 24; }\nfoo();\nbar();"], ++ "mappings":"AAAA,SAASA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js +new file mode 100644 +index 000000000000..0a96699d6e25 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js +@@ -0,0 +1,5 @@ ++function foo(x) { ++ return x; ++} ++foo("foo"); ++//# sourceMappingURL=transitive-mapping-original.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map +new file mode 100644 +index 000000000000..65af25c1ebbe +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-original.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "file" : "transitive-mapping-original.js", ++ "sourceRoot": "", ++ "sources": ["typescript-original.ts"], ++ "names": [], ++ "mappings": "AACA,SAAS,GAAG,CAAC,CAAU;IACrB,OAAO,CAAC,CAAC;AACX,CAAC;AACD,GAAG,CAAC,KAAK,CAAC,CAAC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js +new file mode 100644 +index 000000000000..fd956164d349 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js +@@ -0,0 +1,6 @@ ++function foo(x) { ++ return x; ++} ++ ++foo("foo"); ++//# sourceMappingURL=transitive-mapping-three-steps.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map +new file mode 100644 +index 000000000000..90459d90f6a0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping-three-steps.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "file": "transitive-mapping-three-steps.js", ++ "sources": ["transitive-mapping.js"], ++ "names": ["foo", "x"], ++ "mappings": "AAAA,SAASA,IAAIC;IAAG,OAAOA;AAAC;;AAACD,IAAI,KAAK" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js +new file mode 100644 +index 000000000000..183c027f1bb8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js +@@ -0,0 +1,2 @@ ++function foo(x){return x}foo("foo"); ++//# sourceMappingURL=transitive-mapping.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map +new file mode 100644 +index 000000000000..d6a6fa6672d4 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/transitive-mapping.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": ["foo","x"], ++ "sources": ["transitive-mapping-original.js"], ++ "mappings":"AAAA,SAASA,IAAIC,GACT,OAAOA,CACX,CACAD,IAAI" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts b/LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts +new file mode 100644 +index 000000000000..cd51c01ba129 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/typescript-original.ts +@@ -0,0 +1,5 @@ ++type FooArg = string | number; ++function foo(x : FooArg) { ++ return x; ++} ++foo("foo"); +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js b/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js +new file mode 100644 +index 000000000000..19dfb0e2e6c7 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=unrecognized-property.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map +new file mode 100644 +index 000000000000..40bee558a4ff +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/unrecognized-property.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "", ++ "foobar": 42, ++ "unusedProperty": [1, 2, 3, 4] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js +new file mode 100644 +index 000000000000..3c49709e05ac +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-boundary-values.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map +new file mode 100644 +index 000000000000..4dd836e63d8f +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-boundary-values.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": ["foo"], ++ "file": "valid-mapping-boundary-values.js", ++ "sources": ["empty-original.js"], ++ "mappings": "+/////DA+/////D+/////DA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js +new file mode 100644 +index 000000000000..a2b767b619a0 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-empty-groups.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map +new file mode 100644 +index 000000000000..643c9ae78481 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-groups.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "valid-mapping-empty-groups.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js +new file mode 100644 +index 000000000000..83fc1bf3ac73 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-empty-string.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map +new file mode 100644 +index 000000000000..a35268d8f5b8 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-empty-string.js.map +@@ -0,0 +1,8 @@ ++{ ++ "version": 3, ++ "names": [], ++ "file": "valid-mapping-empty-string.js", ++ "sources": ["empty-original.js"], ++ "sourcesContent": [""], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js +new file mode 100644 +index 000000000000..b0cd8978132a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=valid-mapping-large-vlq.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map +new file mode 100644 +index 000000000000..76e18704c4b1 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/valid-mapping-large-vlq.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["valid-mapping-large-vlq.js"], ++ "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js +new file mode 100644 +index 000000000000..c32d1f1a1cc6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-missing.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map +new file mode 100644 +index 000000000000..49d8ce766edb +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-missing.js.map +@@ -0,0 +1,5 @@ ++{ ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js +new file mode 100644 +index 000000000000..ae2342e2ffe5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-not-a-number.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map +new file mode 100644 +index 000000000000..a584d6e69511 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-not-a-number.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : "3foo", ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js +new file mode 100644 +index 000000000000..a55170885da6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-numeric-string.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map +new file mode 100644 +index 000000000000..dbe52a7d0df6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-numeric-string.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : "3", ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js +new file mode 100644 +index 000000000000..55f4e1a298fa +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-too-high.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map +new file mode 100644 +index 000000000000..ee23be32ff27 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-high.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 4, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js +new file mode 100644 +index 000000000000..d9642920b313 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-too-low.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map +new file mode 100644 +index 000000000000..64ca7a6e2e92 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-too-low.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 2, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js b/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js +new file mode 100644 +index 000000000000..82d0bfa1eb2a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js +@@ -0,0 +1 @@ ++//# sourceMappingURL=version-valid.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map +new file mode 100644 +index 000000000000..1a163052d8fc +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/version-valid.js.map +@@ -0,0 +1,6 @@ ++{ ++ "version" : 3, ++ "sources": [], ++ "names": [], ++ "mappings": "" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js +new file mode 100644 +index 000000000000..511e7be18ae5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js +@@ -0,0 +1,2 @@ ++ 3 ++//# sourceMappingURL=vlq-valid-continuation-bit-present-1.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map +new file mode 100644 +index 000000000000..f4acb4b41837 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-1.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["vlq-valid-continuation-bit-present-1-original.js"], ++ "sourcesContent": [" 3"], ++ "mappings": "+gAgAgAigA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js +new file mode 100644 +index 000000000000..0c879ce052ad +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js +@@ -0,0 +1,4 @@ ++ ++ ++ 3 ++//# sourceMappingURL=vlq-valid-continuation-bit-present-2.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map +new file mode 100644 +index 000000000000..a975cf8591ff +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-continuation-bit-present-2.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["vlq-valid-continuation-bit-present-2-original.js"], ++ "sourcesContent": ["\n 3"], ++ "mappings": ";;gBACC" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js +new file mode 100644 +index 000000000000..d8e795090eff +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js +@@ -0,0 +1,4 @@ ++ ++ ++ 4; 3 ++//# sourceMappingURL=vlq-valid-negative-digit.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map +new file mode 100644 +index 000000000000..71dec0d65a1a +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-negative-digit.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["vlq-valid-negative-digit-original.js"], ++ "sourcesContent": ["\n 4;3"], ++ "mappings": ";;eACG,bAAF" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js +new file mode 100644 +index 000000000000..54c59aae1fcb +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js +@@ -0,0 +1,2 @@ ++ 3 ++//# sourceMappingURL=vlq-valid-single-digit.js.map +diff --git a/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map +new file mode 100644 +index 000000000000..9e35a7a0a6a5 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/resources/vlq-valid-single-digit.js.map +@@ -0,0 +1,7 @@ ++{ ++ "version": 3, ++ "names": [], ++ "sources": ["vlq-valid-single-digit-original.js"], ++ "sourcesContent": ["3"], ++ "mappings": "eAAA" ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json b/LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json +new file mode 100644 +index 000000000000..4601502fffd6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/source-map-spec-tests.json +@@ -0,0 +1,1554 @@ ++{ ++ "tests": [ ++ { ++ "name": "versionValid", ++ "description": "Test a simple source map with a valid version number", ++ "baseFile": "version-valid.js", ++ "sourceMapFile": "version-valid.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "versionMissing", ++ "description": "Test a source map that is missing a version field", ++ "baseFile": "version-missing.js", ++ "sourceMapFile": "version-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionNotANumber", ++ "description": "Test a source map with a version field that is not a number", ++ "baseFile": "version-not-a-number.js", ++ "sourceMapFile": "version-not-a-number.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionNumericString", ++ "description": "Test a source map with a version field that is a number as a string", ++ "baseFile": "version-numeric-string.js", ++ "sourceMapFile": "version-numeric-string.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionTooHigh", ++ "description": "Test a source map with an integer version field that is too high", ++ "baseFile": "version-too-high.js", ++ "sourceMapFile": "version-too-high.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "versionTooLow", ++ "description": "Test a source map with an integer version field that is too low", ++ "baseFile": "version-too-low.js", ++ "sourceMapFile": "version-too-low.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesMissing", ++ "description": "Test a source map that is missing a necessary sources field", ++ "baseFile": "sources-missing.js", ++ "sourceMapFile": "sources-missing.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotAList1", ++ "description": "Test a source map with a sources field that is not a valid list (string)", ++ "baseFile": "sources-not-a-list-1.js", ++ "sourceMapFile": "sources-not-a-list-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotAList2", ++ "description": "Test a source map with a sources field that is not a valid list (object)", ++ "baseFile": "sources-not-a-list-2.js", ++ "sourceMapFile": "sources-not-a-list-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesNotStringOrNull", ++ "description": "Test a source map with a sources list that has non-string and non-null items", ++ "baseFile": "sources-not-string-or-null.js", ++ "sourceMapFile": "sources-not-string-or-null.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourcesAndSourcesContentBothNull", ++ "description": "Test a source map that has both null sources and sourcesContent entries", ++ "baseFile": "sources-and-sources-content-both-null.js", ++ "sourceMapFile": "sources-and-sources-content-both-null.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "fileNotAString1", ++ "description": "Test a source map with a file field that is not a valid string", ++ "baseFile": "file-not-a-string-1.js", ++ "sourceMapFile": "file-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "fileNotAString2", ++ "description": "Test a source map with a file field that is not a valid string", ++ "baseFile": "file-not-a-string-2.js", ++ "sourceMapFile": "file-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourceRootNotAString1", ++ "description": "Test a source map with a sourceRoot field that is not a valid string", ++ "baseFile": "source-root-not-a-string-1.js", ++ "sourceMapFile": "source-root-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "sourceRootNotAString2", ++ "description": "Test a source map with a sourceRoot field that is not a valid string", ++ "baseFile": "source-root-not-a-string-2.js", ++ "sourceMapFile": "source-root-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesMissing", ++ "description": "Test a source map that is missing the optional names field", ++ "baseFile": "names-missing.js", ++ "sourceMapFile": "names-missing.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "namesNotAList1", ++ "description": "Test a source map with a names field that is not a valid list (string)", ++ "baseFile": "names-not-a-list-1.js", ++ "sourceMapFile": "names-not-a-list-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotAList2", ++ "description": "Test a source map with a names field that is not a valid list (object)", ++ "baseFile": "names-not-a-list-2.js", ++ "sourceMapFile": "names-not-a-list-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "namesNotString", ++ "description": "Test a source map with a names list that has non-string items", ++ "baseFile": "names-not-string.js", ++ "sourceMapFile": "names-not-string.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListEmpty", ++ "description": "Test a source map with an ignore list that has no items", ++ "baseFile": "ignore-list-empty.js", ++ "sourceMapFile": "ignore-list-empty.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "ignoreListValid1", ++ "description": "Test a source map with a simple valid ignore list", ++ "baseFile": "ignore-list-valid-1.js", ++ "sourceMapFile": "ignore-list-valid-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkIgnoreList", ++ "present": ["empty-original.js"] ++ } ++ ] ++ }, ++ { ++ "name": "ignoreListWrongType1", ++ "description": "Test a source map with an ignore list with the wrong type of items", ++ "baseFile": "ignore-list-wrong-type-1.js", ++ "sourceMapFile": "ignore-list-wrong-type-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType2", ++ "description": "Test a source map with an ignore list with the wrong type of items", ++ "baseFile": "ignore-list-wrong-type-2.js", ++ "sourceMapFile": "ignore-list-wrong-type-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType3", ++ "description": "Test a source map with an ignore list that is not a list", ++ "baseFile": "ignore-list-wrong-type-3.js", ++ "sourceMapFile": "ignore-list-wrong-type-3.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListWrongType4", ++ "description": "Test a source map with an ignore list with a negative index", ++ "baseFile": "ignore-list-wrong-type-4.js", ++ "sourceMapFile": "ignore-list-wrong-type-4.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListOutOfBounds1", ++ "description": "Test a source map with an ignore list with an item with an out-of-bounds index (too big)", ++ "baseFile": "ignore-list-out-of-bounds-1.js", ++ "sourceMapFile": "ignore-list-out-of-bounds-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "ignoreListOutOfBounds2", ++ "description": "Test a source map with an ignore list with an item with an out-of-bounds index (too low)", ++ "baseFile": "ignore-list-out-of-bounds-2.js", ++ "sourceMapFile": "ignore-list-out-of-bounds-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "unrecognizedProperty", ++ "description": "Test a source map that has an extra field not explicitly encoded in the spec", ++ "baseFile": "unrecognized-property.js", ++ "sourceMapFile": "unrecognized-property.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "invalidVLQDueToNonBase64Character", ++ "description": "Test a source map that has a mapping with an invalid non-base64 character", ++ "baseFile": "invalid-vlq-non-base64-char.js", ++ "sourceMapFile": "invalid-vlq-non-base64-char.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidVLQDueToMissingContinuationDigits", ++ "description": "Test a source map that has a mapping with an invalid VLQ that has a continuation bit but no continuing digits", ++ "baseFile": "invalid-vlq-missing-continuation.js", ++ "sourceMapFile": "invalid-vlq-missing-continuation.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingNotAString1", ++ "description": "Test a source map that has an invalid mapping that is not a string (number)", ++ "baseFile": "invalid-mapping-not-a-string-1.js", ++ "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingNotAString2", ++ "description": "Test a source map that has an invalid mapping that is not a string (array)", ++ "baseFile": "invalid-mapping-not-a-string-2.js", ++ "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentBadSeparator", ++ "description": "Test a source map that uses separator characters not recognized in the spec", ++ "baseFile": "invalid-mapping-bad-separator.js", ++ "sourceMapFile": "invalid-mapping-bad-separator.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithZeroFields", ++ "description": "Test a source map that has the wrong number (zero) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-zero-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithTwoFields", ++ "description": "Test a source map that has the wrong number (two) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-two-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithThreeFields", ++ "description": "Test a source map that has the wrong number (three) of segments fields", ++ "baseFile": "invalid-mapping-segment-with-three-fields.js", ++ "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", ++ "description": "Test a source map that has a source index field that is out of bounds of the sources field", ++ "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", ++ "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNameIndexOutOfBounds", ++ "description": "Test a source map that has a name index field that is out of bounds of the names field", ++ "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", ++ "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeColumn", ++ "description": "Test a source map that has an invalid negative non-relative column field", ++ "baseFile": "invalid-mapping-segment-negative-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeSourceIndex", ++ "description": "Test a source map that has an invalid negative non-relative source index field", ++ "baseFile": "invalid-mapping-segment-negative-source-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeOriginalLine", ++ "description": "Test a source map that has an invalid negative non-relative original line field", ++ "baseFile": "invalid-mapping-segment-negative-original-line.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeOriginalColumn", ++ "description": "Test a source map that has an invalid negative non-relative original column field", ++ "baseFile": "invalid-mapping-segment-negative-original-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeNameIndex", ++ "description": "Test a source map that has an invalid negative non-relative name index field", ++ "baseFile": "invalid-mapping-segment-negative-name-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeColumn", ++ "description": "Test a source map that has an invalid negative relative column field", ++ "baseFile": "invalid-mapping-segment-negative-relative-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeSourceIndex", ++ "description": "Test a source map that has an invalid negative relative source index field", ++ "baseFile": "invalid-mapping-segment-negative-relative-source-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-source-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalLine", ++ "description": "Test a source map that has an invalid negative relative original line field", ++ "baseFile": "invalid-mapping-segment-negative-relative-original-line.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeOriginalColumn", ++ "description": "Test a source map that has an invalid negative relative original column field", ++ "baseFile": "invalid-mapping-segment-negative-relative-original-column.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-original-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNegativeRelativeNameIndex", ++ "description": "Test a source map that has an invalid negative relative name index field", ++ "baseFile": "invalid-mapping-segment-negative-relative-name-index.js", ++ "sourceMapFile": "invalid-mapping-segment-negative-relative-name-index.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithColumnExceeding32Bits", ++ "description": "Test a source map that has a column field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-column-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", ++ "description": "Test a source map that has a source index field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-source-index-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", ++ "description": "Test a source map that has a original line field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-original-line-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", ++ "description": "Test a source map that has an original column field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-original-column-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", ++ "description": "Test a source map that has a name index field that exceeds 32 bits", ++ "baseFile": "invalid-mapping-segment-name-index-too-large.js", ++ "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "validMappingFieldsWith32BitMaxValues", ++ "description": "Test a source map that has segment fields with max values representable in 32 bits", ++ "baseFile": "valid-mapping-boundary-values.js", ++ "sourceMapFile": "valid-mapping-boundary-values.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingLargeVLQ", ++ "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", ++ "baseFile": "valid-mapping-large-vlq.js", ++ "sourceMapFile": "valid-mapping-large-vlq.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingEmptyGroups", ++ "description": "Test a source map with a mapping that has many empty groups", ++ "baseFile": "valid-mapping-empty-groups.js", ++ "sourceMapFile": "valid-mapping-empty-groups.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "validMappingEmptyString", ++ "description": "Test a source map with an empty string mapping", ++ "baseFile": "valid-mapping-empty-string.js", ++ "sourceMapFile": "valid-mapping-empty-string.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "indexMapWrongTypeSections", ++ "description": "Test an index map with a sections field with the wrong type", ++ "baseFile": "index-map-wrong-type-sections.js", ++ "sourceMapFile": "index-map-wrong-type-sections.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapWrongTypeOffset", ++ "description": "Test an index map with an offset field with the wrong type", ++ "baseFile": "index-map-wrong-type-offset.js", ++ "sourceMapFile": "index-map-wrong-type-offset.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapWrongTypeMap", ++ "description": "Test an index map with a map field with the wrong type", ++ "baseFile": "index-map-wrong-type-map.js", ++ "sourceMapFile": "index-map-wrong-type-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidBaseMappings", ++ "description": "Test that an index map cannot also have a regular mappings field", ++ "baseFile": "index-map-invalid-base-mappings.js", ++ "sourceMapFile": "index-map-invalid-base-mappings.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidOverlap", ++ "description": "Test that an invalid index map with multiple sections that overlap", ++ "baseFile": "index-map-invalid-overlap.js", ++ "sourceMapFile": "index-map-invalid-overlap.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidOrder", ++ "description": "Test that an invalid index map with multiple sections in the wrong order", ++ "baseFile": "index-map-invalid-order.js", ++ "sourceMapFile": "index-map-invalid-order.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingMap", ++ "description": "Test that an index map that is missing a section map", ++ "baseFile": "index-map-missing-map.js", ++ "sourceMapFile": "index-map-missing-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapInvalidSubMap", ++ "description": "Test that an index map that has an invalid section map", ++ "baseFile": "index-map-invalid-sub-map.js", ++ "sourceMapFile": "index-map-invalid-sub-map.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffset", ++ "description": "Test that an index map that is missing a section offset", ++ "baseFile": "index-map-missing-offset.js", ++ "sourceMapFile": "index-map-missing-offset.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffsetLine", ++ "description": "Test that an index map that is missing a section offset's line field", ++ "baseFile": "index-map-missing-offset-line.js", ++ "sourceMapFile": "index-map-missing-offset-line.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapMissingOffsetColumn", ++ "description": "Test that an index map that is missing a section offset's column field", ++ "baseFile": "index-map-missing-offset-column.js", ++ "sourceMapFile": "index-map-missing-offset-column.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapOffsetLineWrongType", ++ "description": "Test that an index map that has an offset line field with the wrong type of value", ++ "baseFile": "index-map-offset-line-wrong-type.js", ++ "sourceMapFile": "index-map-offset-line-wrong-type.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapOffsetColumnWrongType", ++ "description": "Test that an index map that has an offset column field with the wrong type of value", ++ "baseFile": "index-map-offset-column-wrong-type.js", ++ "sourceMapFile": "index-map-offset-column-wrong-type.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapEmptySections", ++ "description": "Test a trivial index map with no sections", ++ "baseFile": "index-map-empty-sections.js", ++ "sourceMapFile": "index-map-empty-sections.js.map", ++ "sourceMapIsValid": true ++ }, ++ { ++ "name": "indexMapFileWrongType1", ++ "description": "Test an index map with a file field with the wrong type", ++ "baseFile": "index-map-file-wrong-type-1.js", ++ "sourceMapFile": "index-map-file-wrong-type-1.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "indexMapFileWrongType2", ++ "description": "Test an index map with a file field with the wrong type", ++ "baseFile": "index-map-file-wrong-type-2.js", ++ "sourceMapFile": "index-map-file-wrong-type-2.js.map", ++ "sourceMapIsValid": false ++ }, ++ { ++ "name": "basicMapping", ++ "description": "Test a simple source map that has several valid mappings", ++ "baseFile": "basic-mapping.js", ++ "sourceMapFile": "basic-mapping.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "sourceRootResolution", ++ "description": "Similar to basic mapping test, but test resoultion of sources with a sourceRoot field", ++ "baseFile": "source-root-resolution.js", ++ "sourceMapFile": "source-root-resolution.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "theroot/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "theroot/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "sourceResolutionAbsoluteURL", ++ "description": "Test resoultion of sources with absolute URLs", ++ "baseFile": "source-resolution-absolute-url.js", ++ "sourceMapFile": "source-resolution-absolute-url.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "/baz/quux/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "/baz/quux/basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "basicMappingWithIndexMap", ++ "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", ++ "baseFile": "basic-mapping-as-index-map.js", ++ "sourceMapFile": "basic-mapping-as-index-map.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "indexMapWithMissingFile", ++ "description": "Same as the basic mapping index map test but without the optional file field", ++ "baseFile": "index-map-missing-file.js", ++ "sourceMapFile": "index-map-missing-file.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ } ++ ] ++ }, ++ { ++ "name": "indexMapWithTwoConcatenatedSources", ++ "description": "Test an index map that has two sub-maps for concatenated sources", ++ "baseFile": "index-map-two-concatenated-sources.js", ++ "sourceMapFile": "index-map-two-concatenated-sources.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 22, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 34, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 3, ++ "originalColumn": 9, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 40, ++ "originalLine": 4, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 47, ++ "originalLine": 4, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 49, ++ "originalLine": 5, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 50, ++ "originalLine": 6, ++ "originalColumn": 0, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "basic-mapping-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 56, ++ "originalLine": 7, ++ "originalColumn": 0, ++ "mappedName": "bar" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 62, ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 71, ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "baz" ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 77, ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 83, ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 88, ++ "originalLine": 2, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "originalSource": "second-source-original.js", ++ "generatedLine": 0, ++ "generatedColumn": 89, ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": "baz" ++ } ++ ] ++ }, ++ { ++ "name": "sourcesNullSourcesContentNonNull", ++ "description": "Test a source map that has a null source but has a sourcesContent", ++ "baseFile": "sources-null-sources-content-non-null.js", ++ "sourceMapFile": "sources-null-sources-content-non-null.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": null, ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": null, ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "sourcesNonNullSourcesContentNull", ++ "description": "Test a source map that has a non-null source but has a null sourcesContent", ++ "baseFile": "sources-non-null-sources-content-null.js", ++ "sourceMapFile": "sources-non-null-sources-content-null.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "basic-mapping-original.js", ++ "originalLine": 0, ++ "originalColumn": 9, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "transitiveMapping", ++ "description": "Test a simple two-stage transitive mapping from a minified JS to a TypeScript source", ++ "baseFile": "transitive-mapping.js", ++ "sourceMapFile": "transitive-mapping.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 13, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 13, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 16, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 23, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 24, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 25, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 29, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "transitiveMappingWithThreeSteps", ++ "description": "Test a three-stage transitive mapping from an un-minified JS to minified JS to a TypeScript source", ++ "baseFile": "transitive-mapping-three-steps.js", ++ "sourceMapFile": "transitive-mapping-three-steps.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 9, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 0, ++ "generatedColumn": 13, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 1, ++ "originalColumn": 13, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 1, ++ "generatedColumn": 4, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 1, ++ "generatedColumn": 11, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 2, ++ "originalColumn": 9, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 2, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 3, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 4, ++ "generatedColumn": 0, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMappingTransitive", ++ "generatedLine": 4, ++ "generatedColumn": 4, ++ "originalSource": "typescript-original.ts", ++ "intermediateMaps": ["transitive-mapping.js.map", "transitive-mapping-original.js.map"], ++ "originalLine": 4, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidSingleDigit", ++ "description": "Test VLQ decoding for a single digit, no continuation VLQ", ++ "baseFile": "vlq-valid-single-digit.js", ++ "sourceMapFile": "vlq-valid-single-digit.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-single-digit-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidNegativeDigit", ++ "description": "Test VLQ decoding where there's a negative digit, no continuation bit", ++ "baseFile": "vlq-valid-negative-digit.js", ++ "sourceMapFile": "vlq-valid-negative-digit.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-negative-digit-original.js", ++ "originalLine": 1, ++ "originalColumn": 3, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 2, ++ "originalSource": "vlq-valid-negative-digit-original.js", ++ "originalLine": 1, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidContinuationBitPresent1", ++ "description": "Test VLQ decoding where continuation bits are present (continuations are leading zero)", ++ "baseFile": "vlq-valid-continuation-bit-present-1.js", ++ "sourceMapFile": "vlq-valid-continuation-bit-present-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 15, ++ "originalSource": "vlq-valid-continuation-bit-present-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "vlqValidContinuationBitPresent2", ++ "description": "Test VLQ decoding where continuation bits are present (continuations have non-zero bits)", ++ "baseFile": "vlq-valid-continuation-bit-present-2.js", ++ "sourceMapFile": "vlq-valid-continuation-bit-present-2.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 2, ++ "generatedColumn": 16, ++ "originalSource": "vlq-valid-continuation-bit-present-2-original.js", ++ "originalLine": 1, ++ "originalColumn": 1, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsSingleFieldSegment", ++ "description": "Test mapping semantics for a single field segment mapping", ++ "baseFile": "mapping-semantics-single-field-segment.js", ++ "sourceMapFile": "mapping-semantics-single-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 0, ++ "originalSource": "mapping-semantics-single-field-segment-original.js", ++ "originalLine": 0, ++ "originalColumn": 1, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 2, ++ "originalSource": null, ++ "originalLine": null, ++ "originalColumn": null, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsFourFieldSegment", ++ "description": "Test mapping semantics for a four field segment mapping", ++ "baseFile": "mapping-semantics-four-field-segment.js", ++ "sourceMapFile": "mapping-semantics-four-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-four-field-segment-original.js", ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsFiveFieldSegment", ++ "description": "Test mapping semantics for a five field segment mapping", ++ "baseFile": "mapping-semantics-five-field-segment.js", ++ "sourceMapFile": "mapping-semantics-five-field-segment.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-five-field-segment-original.js", ++ "originalLine": 2, ++ "originalColumn": 2, ++ "mappedName": "foo" ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsColumnReset", ++ "description": "Test that the generated column field resets to zero on new lines", ++ "baseFile": "mapping-semantics-column-reset.js", ++ "sourceMapFile": "mapping-semantics-column-reset.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-column-reset-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 1, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-column-reset-original.js", ++ "originalLine": 1, ++ "originalColumn": 0, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsRelative1", ++ "description": "Test that fields are calculated relative to previous ones", ++ "baseFile": "mapping-semantics-relative-1.js", ++ "sourceMapFile": "mapping-semantics-relative-1.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-relative-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 0, ++ "mappedName": null ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 5, ++ "originalSource": "mapping-semantics-relative-1-original.js", ++ "originalLine": 0, ++ "originalColumn": 4, ++ "mappedName": null ++ } ++ ] ++ }, ++ { ++ "name": "mappingSemanticsRelative2", ++ "description": "Test that fields are calculated relative to previous ones, across lines", ++ "baseFile": "mapping-semantics-relative-2.js", ++ "sourceMapFile": "mapping-semantics-relative-2.js.map", ++ "sourceMapIsValid": true, ++ "testActions": [ ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 0, ++ "generatedColumn": 1, ++ "originalSource": "mapping-semantics-relative-2-original.js", ++ "originalLine": 0, ++ "originalColumn": 2, ++ "mappedName": "foo" ++ }, ++ { ++ "actionType": "checkMapping", ++ "generatedLine": 1, ++ "generatedColumn": 2, ++ "originalSource": "mapping-semantics-relative-2-original.js", ++ "originalLine": 1, ++ "originalColumn": 2, ++ "mappedName": "bar" ++ } ++ ] ++ } ++ ] ++} +diff --git a/LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch b/LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch +new file mode 100644 +index 000000000000..050bf042bac6 +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/webkit/0001-Add-harness-for-source-maps-spec-tests.patch +@@ -0,0 +1,1649 @@ ++From d2ac7108de0b2a76e072ba8d7d4a9e733d3782ef Mon Sep 17 00:00:00 2001 ++From: Asumu Takikawa <asumu@igalia.com> ++Date: Mon, 11 Mar 2024 13:41:31 -0700 ++Subject: [PATCH] Add harness for source maps spec tests ++ ++Need a short description (OOPS!). ++Need the bug URL (OOPS!). ++ ++Reviewed by NOBODY (OOPS!). ++ ++Explanation of why this fixes the bug (OOPS!). ++ ++* LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map: Added. ++* LayoutTests/inspector/model/resources/basic-mapping-original.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/basic-mapping.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/basic-mapping.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js: Added. ++* LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map: Added. ++* LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js: Added. ++* LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map: Added. ++* LayoutTests/inspector/model/resources/names-missing.js: Added. ++* LayoutTests/inspector/model/resources/names-missing.js.map: Added. ++* LayoutTests/inspector/model/resources/names-not-a-list-1.js: Added. ++* LayoutTests/inspector/model/resources/names-not-a-list-1.js.map: Added. ++* LayoutTests/inspector/model/resources/names-not-a-list-2.js: Added. ++* LayoutTests/inspector/model/resources/names-not-a-list-2.js.map: Added. ++* LayoutTests/inspector/model/resources/source-map-spec-tests.json: Added. ++* LayoutTests/inspector/model/resources/sources-missing.js: Added. ++* LayoutTests/inspector/model/resources/sources-missing.js.map: Added. ++* LayoutTests/inspector/model/resources/sources-not-a-list-1.js: Added. ++* LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map: Added. ++* LayoutTests/inspector/model/resources/sources-not-a-list-2.js: Added. ++* LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map: Added. ++* LayoutTests/inspector/model/resources/unrecognized-property.js: Added. ++* LayoutTests/inspector/model/resources/unrecognized-property.js.map: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map: Added. ++* LayoutTests/inspector/model/resources/valid-mapping-null-sources.js: Added. ++(foo): ++(bar): ++* LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map: Added. ++* LayoutTests/inspector/model/resources/version-not-a-number.js: Added. ++* LayoutTests/inspector/model/resources/version-not-a-number.js.map: Added. ++* LayoutTests/inspector/model/resources/version-numeric-string.js: Added. ++* LayoutTests/inspector/model/resources/version-numeric-string.js.map: Added. ++* LayoutTests/inspector/model/resources/version-too-high.js: Added. ++* LayoutTests/inspector/model/resources/version-too-high.js.map: Added. ++* LayoutTests/inspector/model/resources/version-too-low.js: Added. ++* LayoutTests/inspector/model/resources/version-too-low.js.map: Added. ++* LayoutTests/inspector/model/resources/version-valid.js: Added. ++* LayoutTests/inspector/model/resources/version-valid.js.map: Added. ++* LayoutTests/inspector/model/source-map-spec-expected.txt: Added. ++* LayoutTests/inspector/model/source-map-spec.html: Added. ++--- ++ .../resources/basic-mapping-as-index-map.js | 2 + ++ .../basic-mapping-as-index-map.js.map | 23 + ++ .../model/resources/basic-mapping-original.js | 8 + ++ .../model/resources/basic-mapping.js | 2 + ++ .../model/resources/basic-mapping.js.map | 6 + ++ .../invalid-mapping-bad-separator.js | 2 + ++ .../invalid-mapping-bad-separator.js.map | 6 + ++ .../invalid-mapping-not-a-string-1.js | 1 + ++ .../invalid-mapping-not-a-string-1.js.map | 7 + ++ .../invalid-mapping-not-a-string-2.js | 1 + ++ .../invalid-mapping-not-a-string-2.js.map | 7 + ++ ...nvalid-mapping-segment-column-too-large.js | 1 + ++ ...id-mapping-segment-column-too-large.js.map | 7 + ++ ...apping-segment-name-index-out-of-bounds.js | 1 + ++ ...ng-segment-name-index-out-of-bounds.js.map | 7 + ++ ...id-mapping-segment-name-index-too-large.js | 1 + ++ ...apping-segment-name-index-too-large.js.map | 7 + ++ ...invalid-mapping-segment-negative-column.js | 1 + ++ ...lid-mapping-segment-negative-column.js.map | 7 + ++ ...lid-mapping-segment-negative-name-index.js | 1 + ++ ...mapping-segment-negative-name-index.js.map | 7 + ++ ...apping-segment-negative-original-column.js | 1 + ++ ...ng-segment-negative-original-column.js.map | 7 + ++ ...-mapping-segment-negative-original-line.js | 1 + ++ ...ping-segment-negative-original-line.js.map | 7 + ++ ...d-mapping-segment-negative-source-index.js | 1 + ++ ...pping-segment-negative-source-index.js.map | 7 + ++ ...pping-segment-original-column-too-large.js | 1 + ++ ...g-segment-original-column-too-large.js.map | 7 + ++ ...mapping-segment-original-line-too-large.js | 1 + ++ ...ing-segment-original-line-too-large.js.map | 7 + ++ ...ping-segment-source-index-out-of-bounds.js | 1 + ++ ...-segment-source-index-out-of-bounds.js.map | 7 + ++ ...-mapping-segment-source-index-too-large.js | 1 + ++ ...ping-segment-source-index-too-large.js.map | 7 + ++ ...valid-mapping-segment-with-three-fields.js | 2 + ++ ...d-mapping-segment-with-three-fields.js.map | 6 + ++ ...invalid-mapping-segment-with-two-fields.js | 2 + ++ ...lid-mapping-segment-with-two-fields.js.map | 6 + ++ ...nvalid-mapping-segment-with-zero-fields.js | 1 + ++ ...id-mapping-segment-with-zero-fields.js.map | 7 + ++ .../resources/invalid-vlq-non-base64-char.js | 1 + ++ .../invalid-vlq-non-base64-char.js.map | 6 + ++ .../model/resources/names-missing.js | 1 + ++ .../model/resources/names-missing.js.map | 5 + ++ .../model/resources/names-not-a-list-1.js | 1 + ++ .../model/resources/names-not-a-list-1.js.map | 6 + ++ .../model/resources/names-not-a-list-2.js | 1 + ++ .../model/resources/names-not-a-list-2.js.map | 6 + ++ .../resources/source-map-spec-tests.json | 503 ++++++++++++++++++ ++ .../model/resources/sources-missing.js | 1 + ++ .../model/resources/sources-missing.js.map | 5 + ++ .../model/resources/sources-not-a-list-1.js | 1 + ++ .../resources/sources-not-a-list-1.js.map | 6 + ++ .../model/resources/sources-not-a-list-2.js | 1 + ++ .../resources/sources-not-a-list-2.js.map | 6 + ++ .../model/resources/unrecognized-property.js | 1 + ++ .../resources/unrecognized-property.js.map | 8 + ++ .../valid-mapping-boundary-values.js | 1 + ++ .../valid-mapping-boundary-values.js.map | 7 + ++ .../resources/valid-mapping-empty-groups.js | 1 + ++ .../valid-mapping-empty-groups.js.map | 7 + ++ .../resources/valid-mapping-large-vlq.js | 1 + ++ .../resources/valid-mapping-large-vlq.js.map | 6 + ++ .../resources/valid-mapping-null-sources.js | 2 + ++ .../valid-mapping-null-sources.js.map | 6 + ++ .../model/resources/version-not-a-number.js | 1 + ++ .../resources/version-not-a-number.js.map | 6 + ++ .../model/resources/version-numeric-string.js | 1 + ++ .../resources/version-numeric-string.js.map | 6 + ++ .../model/resources/version-too-high.js | 1 + ++ .../model/resources/version-too-high.js.map | 6 + ++ .../model/resources/version-too-low.js | 1 + ++ .../model/resources/version-too-low.js.map | 6 + ++ .../model/resources/version-valid.js | 1 + ++ .../model/resources/version-valid.js.map | 6 + ++ .../model/source-map-spec-expected.txt | 22 + ++ .../inspector/model/source-map-spec.html | 83 +++ ++ 78 files changed, 915 insertions(+) ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping-original.js ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping.js ++ create mode 100644 LayoutTests/inspector/model/resources/basic-mapping.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js ++ create mode 100644 LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/names-missing.js ++ create mode 100644 LayoutTests/inspector/model/resources/names-missing.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/names-not-a-list-1.js ++ create mode 100644 LayoutTests/inspector/model/resources/names-not-a-list-1.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/names-not-a-list-2.js ++ create mode 100644 LayoutTests/inspector/model/resources/names-not-a-list-2.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/source-map-spec-tests.json ++ create mode 100644 LayoutTests/inspector/model/resources/sources-missing.js ++ create mode 100644 LayoutTests/inspector/model/resources/sources-missing.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/sources-not-a-list-1.js ++ create mode 100644 LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/sources-not-a-list-2.js ++ create mode 100644 LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/unrecognized-property.js ++ create mode 100644 LayoutTests/inspector/model/resources/unrecognized-property.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-null-sources.js ++ create mode 100644 LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-not-a-number.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-not-a-number.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-numeric-string.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-numeric-string.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-too-high.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-too-high.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-too-low.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-too-low.js.map ++ create mode 100644 LayoutTests/inspector/model/resources/version-valid.js ++ create mode 100644 LayoutTests/inspector/model/resources/version-valid.js.map ++ create mode 100644 LayoutTests/inspector/model/source-map-spec-expected.txt ++ create mode 100644 LayoutTests/inspector/model/source-map-spec.html ++ ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js b/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js ++new file mode 100644 ++index 000000000000..b9fae380437d ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=basic-mapping-as-index-map.js.map ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map b/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map ++new file mode 100644 ++index 000000000000..12053a5698a6 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping-as-index-map.js.map ++@@ -0,0 +1,23 @@ +++{ +++ "version": "3", +++ "sections": [ +++ { +++ "offset": { "line": 0, "column": 0 }, +++ "map": { +++ "version": "3", +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA,SAASA,MACP,OAAO,EACT,CACA" +++ } +++ }, +++ { +++ "offset": { "line": 0, "column": 34 }, +++ "map": { +++ "version": "3", +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAGSC,MACP,OAAO,EACT,CACAD,MACAC" +++ } +++ } +++ ] +++} ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping-original.js b/LayoutTests/inspector/model/resources/basic-mapping-original.js ++new file mode 100644 ++index 000000000000..301b186cb15e ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping-original.js ++@@ -0,0 +1,8 @@ +++function foo() { +++ return 42; +++} +++function bar() { +++ return 24; +++} +++foo(); +++bar(); ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping.js b/LayoutTests/inspector/model/resources/basic-mapping.js ++new file mode 100644 ++index 000000000000..2e479a4175b8 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=basic-mapping.js.map ++diff --git a/LayoutTests/inspector/model/resources/basic-mapping.js.map b/LayoutTests/inspector/model/resources/basic-mapping.js.map ++new file mode 100644 ++index 000000000000..12dc9679a4b1 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/basic-mapping.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings":"AAAA,SAASA,MACP,OAAO,EACT,CACA,SAASC,MACP,OAAO,EACT,CACAD,MACAC" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js b/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js ++new file mode 100644 ++index 000000000000..25338aca30ce ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-bad-separator.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map ++new file mode 100644 ++index 000000000000..5f4f5b92330a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-bad-separator.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAAA.SAASA:MACP" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js ++new file mode 100644 ++index 000000000000..cb38e2fe9d7b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-not-a-string-1.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map ++new file mode 100644 ++index 000000000000..5bf3e2a9d85b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-1.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-not-a-string-1.js", +++ "sources": ["empty-original.js"], +++ "mappings": 5 +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js ++new file mode 100644 ++index 000000000000..3d84abd6c6b4 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-not-a-string-2.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map ++new file mode 100644 ++index 000000000000..4527e7f7641c ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-not-a-string-2.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-not-a-string-2.js", +++ "sources": ["empty-original.js"], +++ "mappings": [1, 2, 3, 4] +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js ++new file mode 100644 ++index 000000000000..55591f874b1b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-column-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map ++new file mode 100644 ++index 000000000000..b4c059e0151b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-column-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-column-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "ggggggE" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js ++new file mode 100644 ++index 000000000000..2a6b434eff58 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-name-index-out-of-bounds.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map ++new file mode 100644 ++index 000000000000..8dd2ea6c2da0 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-out-of-bounds.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "file": "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAC" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js ++new file mode 100644 ++index 000000000000..709e34dbd326 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-name-index-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map ++new file mode 100644 ++index 000000000000..c7bf5b98d120 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-name-index-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-name-index-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAggggggE" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js ++new file mode 100644 ++index 000000000000..a202152d6fdf ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-column.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map ++new file mode 100644 ++index 000000000000..403878bfa47a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-column.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-column.js", +++ "sources": ["empty-original.js"], +++ "mappings": "F" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js ++new file mode 100644 ++index 000000000000..3e3f63420467 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-name-index.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map ++new file mode 100644 ++index 000000000000..b94f63646e46 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-name-index.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-name-index.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAAF" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js ++new file mode 100644 ++index 000000000000..f21d5342b395 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-original-column.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map ++new file mode 100644 ++index 000000000000..011c639d3f91 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-column.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-original-column.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAF" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js ++new file mode 100644 ++index 000000000000..b37309601ce0 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-original-line.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map ++new file mode 100644 ++index 000000000000..e7ec993eebda ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-original-line.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-original-line.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAFA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js ++new file mode 100644 ++index 000000000000..6e05849b6a03 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-negative-source-index.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map ++new file mode 100644 ++index 000000000000..596c2f298bbe ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-negative-source-index.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-negative-source-index.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AFAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js ++new file mode 100644 ++index 000000000000..0936ed7ea8fd ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-original-column-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map ++new file mode 100644 ++index 000000000000..ff2103fe24fe ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-column-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-original-column-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAAggggggE" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js ++new file mode 100644 ++index 000000000000..9b3aa5a361ae ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-original-line-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map ++new file mode 100644 ++index 000000000000..890f1c71fc5b ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-original-line-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-original-line-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AAggggggEA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js ++new file mode 100644 ++index 000000000000..2e5fbca26825 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-source-index-out-of-bounds.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map ++new file mode 100644 ++index 000000000000..86dedb114fa9 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-out-of-bounds.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "sources": ["empty-original.js"], +++ "mappings": "ACAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js ++new file mode 100644 ++index 000000000000..3f4943e1272d ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-source-index-too-large.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map ++new file mode 100644 ++index 000000000000..e9f858c6e15d ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-source-index-too-large.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-source-index-too-large.js", +++ "sources": ["empty-original.js"], +++ "mappings": "AggggggEAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js ++new file mode 100644 ++index 000000000000..4b868fac9c5e ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-segment-with-three-fields.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map ++new file mode 100644 ++index 000000000000..c2af1165ad8f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-three-fields.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js ++new file mode 100644 ++index 000000000000..96045a7a11dd ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=invalid-mapping-segment-with-two-fields.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map ++new file mode 100644 ++index 000000000000..73cf00fa1c96 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-two-fields.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": ["foo","bar"], +++ "sources": ["basic-mapping-original.js"], +++ "mappings": "AA" +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js ++new file mode 100644 ++index 000000000000..9d5332a56ca5 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-mapping-segment-with-zero-fields.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map ++new file mode 100644 ++index 000000000000..5a34d25b645e ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-mapping-segment-with-zero-fields.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "invalid-mapping-segment-with-zero-fields.js", +++ "sources": ["empty-original.js"], +++ "mappings": ",,,," +++} ++diff --git a/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js b/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js ++new file mode 100644 ++index 000000000000..d1b20b41a29f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=invalid-vlq-non-base64-char.js.map ++diff --git a/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map b/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map ++new file mode 100644 ++index 000000000000..4fa1ac576885 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/invalid-vlq-non-base64-char.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "A$%?!" +++} ++diff --git a/LayoutTests/inspector/model/resources/names-missing.js b/LayoutTests/inspector/model/resources/names-missing.js ++new file mode 100644 ++index 000000000000..58781fd88705 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-missing.js.map ++diff --git a/LayoutTests/inspector/model/resources/names-missing.js.map b/LayoutTests/inspector/model/resources/names-missing.js.map ++new file mode 100644 ++index 000000000000..7dc1b929e485 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "version" : "3", +++ "sources": ["empty-original.js"], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/names-not-a-list-1.js b/LayoutTests/inspector/model/resources/names-not-a-list-1.js ++new file mode 100644 ++index 000000000000..dc65f1972b5a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-not-a-list-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-a-list-1.js.map ++diff --git a/LayoutTests/inspector/model/resources/names-not-a-list-1.js.map b/LayoutTests/inspector/model/resources/names-not-a-list-1.js.map ++new file mode 100644 ++index 000000000000..843f7cc2e6fd ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-not-a-list-1.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": ["source.js"], +++ "names": "not a list", +++ "mappings": "AAAAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/names-not-a-list-2.js b/LayoutTests/inspector/model/resources/names-not-a-list-2.js ++new file mode 100644 ++index 000000000000..d7251f78da84 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-not-a-list-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=names-not-a-list-2.js.map ++diff --git a/LayoutTests/inspector/model/resources/names-not-a-list-2.js.map b/LayoutTests/inspector/model/resources/names-not-a-list-2.js.map ++new file mode 100644 ++index 000000000000..cd7a42a74c4f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/names-not-a-list-2.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": ["source.js"], +++ "names": { "foo": 3 }, +++ "mappings": "AAAAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/source-map-spec-tests.json b/LayoutTests/inspector/model/resources/source-map-spec-tests.json ++new file mode 100644 ++index 000000000000..3091a3c93273 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/source-map-spec-tests.json ++@@ -0,0 +1,503 @@ +++{ +++ "tests": [ +++ { +++ "name": "versionValid", +++ "description": "Test a simple source map with a valid version number", +++ "baseFile": "version-valid.js", +++ "sourceMapFile": "version-valid.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "versionNotANumber", +++ "description": "Test a source map with a version field that is not a number", +++ "baseFile": "version-not-a-number.js", +++ "sourceMapFile": "version-not-a-number.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionNumericString", +++ "description": "Test a source map with a version field that is a number as a string", +++ "baseFile": "version-numeric-string.js", +++ "sourceMapFile": "version-numeric-string.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooHigh", +++ "description": "Test a source map with an integer version field that is too high", +++ "baseFile": "version-too-high.js", +++ "sourceMapFile": "version-too-high.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "versionTooLow", +++ "description": "Test a source map with an integer version field that is too low", +++ "baseFile": "version-too-low.js", +++ "sourceMapFile": "version-too-low.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesMissing", +++ "description": "Test a source map that is missing a necessary sources field", +++ "baseFile": "sources-missing.js", +++ "sourceMapFile": "sources-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotAList1", +++ "description": "Test a source map with a sources field that is not a valid list (string)", +++ "baseFile": "sources-not-a-list-1.js", +++ "sourceMapFile": "sources-not-a-list-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "sourcesNotAList2", +++ "description": "Test a source map with a sources field that is not a valid list (object)", +++ "baseFile": "sources-not-a-list-2.js", +++ "sourceMapFile": "sources-not-a-list-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesMissing", +++ "description": "Test a source map that is missing a necessary names field", +++ "baseFile": "names-missing.js", +++ "sourceMapFile": "names-missing.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotAList1", +++ "description": "Test a source map with a names field that is not a valid list (string)", +++ "baseFile": "names-not-a-list-1.js", +++ "sourceMapFile": "names-not-a-list-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "namesNotAList2", +++ "description": "Test a source map with a names field that is not a valid list (object)", +++ "baseFile": "names-not-a-list-2.js", +++ "sourceMapFile": "names-not-a-list-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "unrecognizedProperty", +++ "description": "Test a source map that has an extra field not explicitly encoded in the spec", +++ "baseFile": "unrecognized-property.js", +++ "sourceMapFile": "unrecognized-property.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "invalidVLQDueToNonBase64Character", +++ "description": "Test a source map that has a mapping with an invalid non-base64 character", +++ "baseFile": "invalid-vlq-non-base64-char.js", +++ "sourceMapFile": "invalid-vlq-non-base64-char.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingNotAString1", +++ "description": "Test a source map that has an invalid mapping that is not a string (number)", +++ "baseFile": "invalid-mapping-not-a-string-1.js", +++ "sourceMapFile": "invalid-mapping-not-a-string-1.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingNotAString2", +++ "description": "Test a source map that has an invalid mapping that is not a string (array)", +++ "baseFile": "invalid-mapping-not-a-string-2.js", +++ "sourceMapFile": "invalid-mapping-not-a-string-2.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentBadSeparator", +++ "description": "Test a source map that uses separator characters not recognized in the spec", +++ "baseFile": "invalid-mapping-bad-separator.js", +++ "sourceMapFile": "invalid-mapping-bad-separator.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithZeroFields", +++ "description": "Test a source map that has the wrong number (zero) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-zero-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-zero-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithTwoFields", +++ "description": "Test a source map that has the wrong number (two) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-two-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-two-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithThreeFields", +++ "description": "Test a source map that has the wrong number (three) of segments fields", +++ "baseFile": "invalid-mapping-segment-with-three-fields.js", +++ "sourceMapFile": "invalid-mapping-segment-with-three-fields.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithSourceIndexOutOfBounds", +++ "description": "Test a source map that has a source index field that is out of bounds of the sources field", +++ "baseFile": "invalid-mapping-segment-source-index-out-of-bounds.js", +++ "sourceMapFile": "invalid-mapping-segment-source-index-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNameIndexOutOfBounds", +++ "description": "Test a source map that has a name index field that is out of bounds of the names field", +++ "baseFile": "invalid-mapping-segment-name-index-out-of-bounds.js", +++ "sourceMapFile": "invalid-mapping-segment-name-index-out-of-bounds.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeColumn", +++ "description": "Test a source map that has an invalid negative non-relative column field", +++ "baseFile": "invalid-mapping-segment-negative-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeSourceIndex", +++ "description": "Test a source map that has an invalid negative non-relative source index field", +++ "baseFile": "invalid-mapping-segment-negative-source-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-source-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeOriginalLine", +++ "description": "Test a source map that has an invalid negative non-relative original line field", +++ "baseFile": "invalid-mapping-segment-negative-original-line.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-original-line.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeOriginalColumn", +++ "description": "Test a source map that has an invalid negative non-relative original column field", +++ "baseFile": "invalid-mapping-segment-negative-original-column.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-original-column.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNegativeNameIndex", +++ "description": "Test a source map that has an invalid negative non-relative name index field", +++ "baseFile": "invalid-mapping-segment-negative-name-index.js", +++ "sourceMapFile": "invalid-mapping-segment-negative-name-index.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithColumnExceeding32Bits", +++ "description": "Test a source map that has a column field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-column-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-column-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithSourceIndexExceeding32Bits", +++ "description": "Test a source map that has a source index field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-source-index-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-source-index-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithOriginalLineExceeding32Bits", +++ "description": "Test a source map that has a original line field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-original-line-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-original-line-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithOriginalColumnExceeding32Bits", +++ "description": "Test a source map that has an original column field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-original-column-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-original-column-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "invalidMappingSegmentWithNameIndexExceeding32Bits", +++ "description": "Test a source map that has a name index field that exceeds 32 bits", +++ "baseFile": "invalid-mapping-segment-name-index-too-large.js", +++ "sourceMapFile": "invalid-mapping-segment-name-index-too-large.js.map", +++ "sourceMapIsValid": false +++ }, +++ { +++ "name": "validMappingFieldsWith32BitMaxValues", +++ "description": "Test a source map that has segment fields with max values representable in 32 bits", +++ "baseFile": "valid-mapping-boundary-values.js", +++ "sourceMapFile": "valid-mapping-boundary-values.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingLargeVLQ", +++ "description": "Test a source map that has a segment field VLQ that is very long but within 32-bits", +++ "baseFile": "valid-mapping-large-vlq.js", +++ "sourceMapFile": "valid-mapping-large-vlq.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "validMappingEmptyGroups", +++ "description": "Test a source map with a mapping that has many empty groups", +++ "baseFile": "valid-mapping-empty-groups.js", +++ "sourceMapFile": "valid-mapping-empty-groups.js.map", +++ "sourceMapIsValid": true +++ }, +++ { +++ "name": "basicMapping", +++ "description": "Test a simple source map that has several valid mappings", +++ "baseFile": "basic-mapping.js", +++ "sourceMapFile": "basic-mapping.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "basicMappingWithIndexMap", +++ "description": "Test a version of basic-mapping.js.map that is split into sections with an index map", +++ "baseFile": "basic-mapping-as-index-map.js", +++ "sourceMapFile": "basic-mapping-as-index-map.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 15, +++ "originalLine": 1, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 22, +++ "originalLine": 1, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 24, +++ "originalLine": 2, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 25, +++ "originalLine": 3, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 34, +++ "originalSource": "basic-mapping-original.js", +++ "originalLine": 3, +++ "originalColumn": 9, +++ "mappedName": "bar" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 40, +++ "originalLine": 4, +++ "originalColumn": 2, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 47, +++ "originalLine": 4, +++ "originalColumn": 9, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 49, +++ "originalLine": 5, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 50, +++ "originalLine": 6, +++ "originalColumn": 0, +++ "mappedName": "foo" +++ }, +++ { +++ "actionType": "checkMapping", +++ "originalSource": "basic-mapping-original.js", +++ "generatedLine": 0, +++ "generatedColumn": 56, +++ "originalLine": 7, +++ "originalColumn": 0, +++ "mappedName": "bar" +++ } +++ ] +++ }, +++ { +++ "name": "validMappingNullSources", +++ "description": "Test a source map that has null sources", +++ "baseFile": "valid-mapping-null-sources.js", +++ "sourceMapFile": "valid-mapping-null-sources.js.map", +++ "sourceMapIsValid": true, +++ "testActions": [ +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 0, +++ "originalSource": null, +++ "originalLine": 0, +++ "originalColumn": 0, +++ "mappedName": null +++ }, +++ { +++ "actionType": "checkMapping", +++ "generatedLine": 0, +++ "generatedColumn": 9, +++ "originalSource": null, +++ "originalLine": 0, +++ "originalColumn": 9, +++ "mappedName": "foo" +++ } +++ ] +++ } +++ ] +++} ++diff --git a/LayoutTests/inspector/model/resources/sources-missing.js b/LayoutTests/inspector/model/resources/sources-missing.js ++new file mode 100644 ++index 000000000000..779b865e2769 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-missing.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-missing.js.map ++diff --git a/LayoutTests/inspector/model/resources/sources-missing.js.map b/LayoutTests/inspector/model/resources/sources-missing.js.map ++new file mode 100644 ++index 000000000000..61122fcb3f25 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-missing.js.map ++@@ -0,0 +1,5 @@ +++{ +++ "version" : "3", +++ "names": ["foo"], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/sources-not-a-list-1.js b/LayoutTests/inspector/model/resources/sources-not-a-list-1.js ++new file mode 100644 ++index 000000000000..7e33b7e86725 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-not-a-list-1.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-a-list-1.js.map ++diff --git a/LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map b/LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map ++new file mode 100644 ++index 000000000000..b2e24787bc16 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-not-a-list-1.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": "not a list", +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/sources-not-a-list-2.js b/LayoutTests/inspector/model/resources/sources-not-a-list-2.js ++new file mode 100644 ++index 000000000000..4021f763fc88 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-not-a-list-2.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=sources-not-a-list-2.js.map ++diff --git a/LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map b/LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map ++new file mode 100644 ++index 000000000000..6a6a8635729c ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/sources-not-a-list-2.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": { "source.js": 3 }, +++ "names": ["foo"], +++ "mappings": "AAAAA" +++} ++diff --git a/LayoutTests/inspector/model/resources/unrecognized-property.js b/LayoutTests/inspector/model/resources/unrecognized-property.js ++new file mode 100644 ++index 000000000000..19dfb0e2e6c7 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/unrecognized-property.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=unrecognized-property.js.map ++diff --git a/LayoutTests/inspector/model/resources/unrecognized-property.js.map b/LayoutTests/inspector/model/resources/unrecognized-property.js.map ++new file mode 100644 ++index 000000000000..40bee558a4ff ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/unrecognized-property.js.map ++@@ -0,0 +1,8 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "", +++ "foobar": 42, +++ "unusedProperty": [1, 2, 3, 4] +++} ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js b/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js ++new file mode 100644 ++index 000000000000..3c49709e05ac ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-boundary-values.js.map ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map b/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map ++new file mode 100644 ++index 000000000000..4dd836e63d8f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-boundary-values.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": ["foo"], +++ "file": "valid-mapping-boundary-values.js", +++ "sources": ["empty-original.js"], +++ "mappings": "+/////DA+/////D+/////DA" +++} ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js b/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js ++new file mode 100644 ++index 000000000000..a2b767b619a0 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-empty-groups.js.map ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map b/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map ++new file mode 100644 ++index 000000000000..53be4ae4ae91 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-empty-groups.js.map ++@@ -0,0 +1,7 @@ +++{ +++ "version": 3, +++ "names": [], +++ "file": "valid-mapping-empty-groups.js", +++ "sources": ["empty-original.js"], +++ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" +++} ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js b/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js ++new file mode 100644 ++index 000000000000..b0cd8978132a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=valid-mapping-large-vlq.js.map ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map b/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map ++new file mode 100644 ++index 000000000000..76e18704c4b1 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-large-vlq.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version": 3, +++ "names": [], +++ "sources": ["valid-mapping-large-vlq.js"], +++ "mappings": "igggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggA" +++} ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js b/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js ++new file mode 100644 ++index 000000000000..ee2acf0f5b2f ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js ++@@ -0,0 +1,2 @@ +++function foo(){return 42}function bar(){return 24}foo();bar(); +++//# sourceMappingURL=valid-mapping-null-sources.js.map ++diff --git a/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map b/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map ++new file mode 100644 ++index 000000000000..199cda936955 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/valid-mapping-null-sources.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version":3, +++ "names": ["foo"], +++ "sources": [null], +++ "mappings":"AAAA,SAASA" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-not-a-number.js b/LayoutTests/inspector/model/resources/version-not-a-number.js ++new file mode 100644 ++index 000000000000..ae2342e2ffe5 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-not-a-number.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-not-a-number.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-not-a-number.js.map b/LayoutTests/inspector/model/resources/version-not-a-number.js.map ++new file mode 100644 ++index 000000000000..a584d6e69511 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-not-a-number.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3foo", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-numeric-string.js b/LayoutTests/inspector/model/resources/version-numeric-string.js ++new file mode 100644 ++index 000000000000..a55170885da6 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-numeric-string.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-numeric-string.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-numeric-string.js.map b/LayoutTests/inspector/model/resources/version-numeric-string.js.map ++new file mode 100644 ++index 000000000000..dbe52a7d0df6 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-numeric-string.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : "3", +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-too-high.js b/LayoutTests/inspector/model/resources/version-too-high.js ++new file mode 100644 ++index 000000000000..55f4e1a298fa ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-too-high.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-too-high.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-too-high.js.map b/LayoutTests/inspector/model/resources/version-too-high.js.map ++new file mode 100644 ++index 000000000000..ee23be32ff27 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-too-high.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 4, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-too-low.js b/LayoutTests/inspector/model/resources/version-too-low.js ++new file mode 100644 ++index 000000000000..d9642920b313 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-too-low.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-too-low.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-too-low.js.map b/LayoutTests/inspector/model/resources/version-too-low.js.map ++new file mode 100644 ++index 000000000000..64ca7a6e2e92 ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-too-low.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 2, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/resources/version-valid.js b/LayoutTests/inspector/model/resources/version-valid.js ++new file mode 100644 ++index 000000000000..82d0bfa1eb2a ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-valid.js ++@@ -0,0 +1 @@ +++//# sourceMappingURL=version-valid.js.map ++diff --git a/LayoutTests/inspector/model/resources/version-valid.js.map b/LayoutTests/inspector/model/resources/version-valid.js.map ++new file mode 100644 ++index 000000000000..1a163052d8fc ++--- /dev/null +++++ b/LayoutTests/inspector/model/resources/version-valid.js.map ++@@ -0,0 +1,6 @@ +++{ +++ "version" : 3, +++ "sources": [], +++ "names": [], +++ "mappings": "" +++} ++diff --git a/LayoutTests/inspector/model/source-map-spec-expected.txt b/LayoutTests/inspector/model/source-map-spec-expected.txt ++new file mode 100644 ++index 000000000000..c74ab5bcfb32 ++--- /dev/null +++++ b/LayoutTests/inspector/model/source-map-spec-expected.txt ++@@ -0,0 +1,22 @@ +++Ensure a source map loads for resources with sourceMappingURLs. +++ +++ +++== Running test suite: SourceMapSpec +++-- Running test case: SourceMapSpec +++PASS: Resource should have loaded 1 SourceMap. +++PASS: SourceMap should be a WI.SourceMap instance. +++PASS: Resource may or may not load a SourceMap. +++PASS: Resource may or may not load a SourceMap. +++PASS: Resource may or may not load a SourceMap. +++PASS: Resource may or may not load a SourceMap. +++PASS: Resource should have loaded 1 SourceMap. +++PASS: SourceMap should be a WI.SourceMap instance. +++PASS: Resource should have loaded 1 SourceMap. +++PASS: SourceMap should be a WI.SourceMap instance. +++PASS: expectEqual(0, 0) +++PASS: expectEqual(9, 9) +++PASS: expectEqual("basic-mapping-original.js", "basic-mapping-original.js") +++PASS: expectEqual(3, 3) +++PASS: expectEqual(9, 9) +++PASS: expectEqual("basic-mapping-original.js", "basic-mapping-original.js") +++ ++diff --git a/LayoutTests/inspector/model/source-map-spec.html b/LayoutTests/inspector/model/source-map-spec.html ++new file mode 100644 ++index 000000000000..b30b1dd526fc ++--- /dev/null +++++ b/LayoutTests/inspector/model/source-map-spec.html ++@@ -0,0 +1,83 @@ +++<!DOCTYPE html> +++<html> +++<head> +++<script src="../../http/tests/inspector/resources/inspector-test.js"></script> +++<script> +++function triggerScriptResource(scriptName) { +++ let script = document.createElement("script"); +++ script.src = `resources/${scriptName}`; +++ document.body.appendChild(script); +++} +++ +++async function setup() +++{ +++ const response = await fetch("resources/source-map-spec-tests.json"); +++ const json = await response.json(); +++ TestPage.dispatchEventToFrontend("TestDescriptionsFetched", {json}); +++} +++ +++ +++function test() +++{ +++ function checkMapping(resource, testCase, action) +++ { +++ const location = resource.createSourceCodeLocation(action.generatedLine, action.generatedColumn); +++ InspectorTest.expectEqual(location.displayLineNumber, action.originalLine, "Original line should match"); +++ InspectorTest.expectEqual(location.displayColumnNumber, action.originalColumn, "Original column should match"); +++ InspectorTest.expectEqual(location.displaySourceCode.displayName, action.originalSource, "Original source should match"); +++ } +++ +++ function withTimeout(promise, seconds) +++ { +++ return Promise.race([promise, new Promise((resolve, reject) => { +++ setTimeout(resolve, seconds); +++ })]); +++ } +++ +++ let suite = InspectorTest.createAsyncSuite("SourceMapSpec"); +++ +++ suite.addTestCase({ +++ name: "SourceMapSpec", +++ description: "Run test cases from the source maps spec test suite", +++ async test(resolve, reject) { +++ InspectorTest.evaluateInPage("setup()"); +++ const event = await InspectorTest.awaitEvent("TestDescriptionsFetched"); +++ const testDescriptions = event.data.json; +++ +++ for (const testCase of testDescriptions.tests) { +++ InspectorTest.log(testCase.name); +++ InspectorTest.evaluateInPage(`triggerScriptResource('${testCase.baseFile}')`); +++ let resourceEvent = await WI.Frame.awaitEvent(WI.Frame.Event.ResourceWasAdded); +++ let resource = resourceEvent.data.resource; +++ let sourceMapEvent = await withTimeout(resource.awaitEvent(WI.SourceCode.Event.SourceMapAdded), 50); +++ +++ if (testCase.sourceMapIsValid) { +++ InspectorTest.expectEqual(resource.sourceMaps.length, 1, "Resource should have loaded 1 SourceMap."); +++ InspectorTest.expectThat(resource.sourceMaps[0] instanceof WI.SourceMap, "SourceMap should be a WI.SourceMap instance."); +++ if (!(resource.sourceMaps[0] instanceof WI.SourceMap)) { +++ continue; +++ } +++ } else { +++ const hasFailedSourceMap = WI.networkManager.isSourceMapURL(absoluteURL(testCase.sourceMapFile, resource.displayURL)); +++ InspectorTest.expectThat(hasFailedSourceMap, "Expected that there is an associated failed source map URL"); +++ InspectorTest.expectEqual(resource.sourceMaps.length, 0, "Expected no source map resource loaded"); +++ } +++ +++ if (testCase.testActions) { +++ for (const action of testCase.testActions) { +++ if (action.actionType === "checkMapping") +++ checkMapping(resource, testCase, action); +++ } +++ } +++ } +++ } +++ }); +++ +++ suite.runTestCasesAndFinish(); +++} +++</script> +++</head> +++<body onload="runTest()"> +++<p>Ensure a source map loads for resources with sourceMappingURLs.</p> +++</body> +++</html> ++-- ++2.39.2 ++ +diff --git a/LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html b/LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html +new file mode 100644 +index 000000000000..b30b1dd526fc +--- /dev/null ++++ b/LayoutTests/imported/tg4/source-map-tests/webkit/source-map-spec.html +@@ -0,0 +1,83 @@ ++<!DOCTYPE html> ++<html> ++<head> ++<script src="../../http/tests/inspector/resources/inspector-test.js"></script> ++<script> ++function triggerScriptResource(scriptName) { ++ let script = document.createElement("script"); ++ script.src = `resources/${scriptName}`; ++ document.body.appendChild(script); ++} ++ ++async function setup() ++{ ++ const response = await fetch("resources/source-map-spec-tests.json"); ++ const json = await response.json(); ++ TestPage.dispatchEventToFrontend("TestDescriptionsFetched", {json}); ++} ++ ++ ++function test() ++{ ++ function checkMapping(resource, testCase, action) ++ { ++ const location = resource.createSourceCodeLocation(action.generatedLine, action.generatedColumn); ++ InspectorTest.expectEqual(location.displayLineNumber, action.originalLine, "Original line should match"); ++ InspectorTest.expectEqual(location.displayColumnNumber, action.originalColumn, "Original column should match"); ++ InspectorTest.expectEqual(location.displaySourceCode.displayName, action.originalSource, "Original source should match"); ++ } ++ ++ function withTimeout(promise, seconds) ++ { ++ return Promise.race([promise, new Promise((resolve, reject) => { ++ setTimeout(resolve, seconds); ++ })]); ++ } ++ ++ let suite = InspectorTest.createAsyncSuite("SourceMapSpec"); ++ ++ suite.addTestCase({ ++ name: "SourceMapSpec", ++ description: "Run test cases from the source maps spec test suite", ++ async test(resolve, reject) { ++ InspectorTest.evaluateInPage("setup()"); ++ const event = await InspectorTest.awaitEvent("TestDescriptionsFetched"); ++ const testDescriptions = event.data.json; ++ ++ for (const testCase of testDescriptions.tests) { ++ InspectorTest.log(testCase.name); ++ InspectorTest.evaluateInPage(`triggerScriptResource('${testCase.baseFile}')`); ++ let resourceEvent = await WI.Frame.awaitEvent(WI.Frame.Event.ResourceWasAdded); ++ let resource = resourceEvent.data.resource; ++ let sourceMapEvent = await withTimeout(resource.awaitEvent(WI.SourceCode.Event.SourceMapAdded), 50); ++ ++ if (testCase.sourceMapIsValid) { ++ InspectorTest.expectEqual(resource.sourceMaps.length, 1, "Resource should have loaded 1 SourceMap."); ++ InspectorTest.expectThat(resource.sourceMaps[0] instanceof WI.SourceMap, "SourceMap should be a WI.SourceMap instance."); ++ if (!(resource.sourceMaps[0] instanceof WI.SourceMap)) { ++ continue; ++ } ++ } else { ++ const hasFailedSourceMap = WI.networkManager.isSourceMapURL(absoluteURL(testCase.sourceMapFile, resource.displayURL)); ++ InspectorTest.expectThat(hasFailedSourceMap, "Expected that there is an associated failed source map URL"); ++ InspectorTest.expectEqual(resource.sourceMaps.length, 0, "Expected no source map resource loaded"); ++ } ++ ++ if (testCase.testActions) { ++ for (const action of testCase.testActions) { ++ if (action.actionType === "checkMapping") ++ checkMapping(resource, testCase, action); ++ } ++ } ++ } ++ } ++ }); ++ ++ suite.runTestCasesAndFinish(); ++} ++</script> ++</head> ++<body onload="runTest()"> ++<p>Ensure a source map loads for resources with sourceMappingURLs.</p> ++</body> ++</html> +diff --git a/LayoutTests/inspector/model/source-map-spec-expected.txt b/LayoutTests/inspector/model/source-map-spec-expected.txt +new file mode 100644 +index 000000000000..fd0094a8ac46 +--- /dev/null ++++ b/LayoutTests/inspector/model/source-map-spec-expected.txt +@@ -0,0 +1,828 @@ ++Run source map specification consumer test cases. ++ ++ ++== Running test suite: SourceMapSpec ++-- Running test case: SourceMapSpec ++versionValid ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++versionMissing ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++versionNotANumber ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++versionNumericString ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++versionTooHigh ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++versionTooLow ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++sourcesMissing ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++sourcesNotAList1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++sourcesNotAList2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++sourcesNotStringOrNull ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++sourcesAndSourcesContentBothNull ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++fileNotAString1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++fileNotAString2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++sourceRootNotAString1 ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++sourceRootNotAString2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++namesMissing ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++namesNotAList1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++namesNotAList2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++namesNotString ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListEmpty ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++ignoreListValid1 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++Ignore list test ignored (unsupported) ++ignoreListWrongType1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListWrongType2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListWrongType3 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListWrongType4 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++ignoreListOutOfBounds1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++ignoreListOutOfBounds2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++unrecognizedProperty ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++invalidVLQDueToNonBase64Character ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidVLQDueToMissingContinuationDigits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingNotAString1 ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++invalidMappingNotAString2 ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++invalidMappingSegmentBadSeparator ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithZeroFields ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++invalidMappingSegmentWithTwoFields ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++invalidMappingSegmentWithThreeFields ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++PASS: Expected no source map resource loaded ++invalidMappingSegmentWithSourceIndexOutOfBounds ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNameIndexOutOfBounds ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeSourceIndex ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeOriginalLine ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeOriginalColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeNameIndex ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeSourceIndex ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeOriginalLine ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeOriginalColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNegativeRelativeNameIndex ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithColumnExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithSourceIndexExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithOriginalLineExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithOriginalColumnExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++invalidMappingSegmentWithNameIndexExceeding32Bits ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++validMappingFieldsWith32BitMaxValues ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++validMappingLargeVLQ ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++validMappingEmptyGroups ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++validMappingEmptyString ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++indexMapWrongTypeSections ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapWrongTypeOffset ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapWrongTypeMap ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapInvalidBaseMappings ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapInvalidOverlap ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapInvalidOrder ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapMissingMap ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapInvalidSubMap ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapMissingOffset ++PASS: Expected that there is an associated failed source map URL ++PASS: Expected no source map resource loaded ++indexMapMissingOffsetLine ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapMissingOffsetColumn ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapOffsetLineWrongType ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapOffsetColumnWrongType ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapEmptySections ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++indexMapFileWrongType1 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++indexMapFileWrongType2 ++FAIL: Expected that there is an associated failed source map URL ++ Expected: truthy ++ Actual: false ++FAIL: Expected no source map resource loaded ++ Expected: 0 ++ Actual: 1 ++basicMapping ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 22) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 24) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 25) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 34) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 40) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 47) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 49) should be mapped ++PASS: Original line: 5, expected: 5 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 50) should be mapped ++PASS: Original line: 6, expected: 6 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 56) should be mapped ++PASS: Original line: 7, expected: 7 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++sourceRootResolution ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++FAIL: Original source: basic-mapping-original.js, expected: theroot/basic-mapping-original.js ++ Expected: "theroot/basic-mapping-original.js" ++ Actual: "basic-mapping-original.js" ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++FAIL: Original source: basic-mapping-original.js, expected: theroot/basic-mapping-original.js ++ Expected: "theroot/basic-mapping-original.js" ++ Actual: "basic-mapping-original.js" ++sourceResolutionAbsoluteURL ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++FAIL: Original source: basic-mapping-original.js, expected: /baz/quux/basic-mapping-original.js ++ Expected: "/baz/quux/basic-mapping-original.js" ++ Actual: "basic-mapping-original.js" ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++FAIL: Original source: basic-mapping-original.js, expected: /baz/quux/basic-mapping-original.js ++ Expected: "/baz/quux/basic-mapping-original.js" ++ Actual: "basic-mapping-original.js" ++basicMappingWithIndexMap ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 22) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 24) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 25) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 34) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 40) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 47) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 49) should be mapped ++PASS: Original line: 5, expected: 5 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 50) should be mapped ++PASS: Original line: 6, expected: 6 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 56) should be mapped ++PASS: Original line: 7, expected: 7 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++indexMapWithMissingFile ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 22) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 24) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 25) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 34) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 40) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 47) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 49) should be mapped ++PASS: Original line: 5, expected: 5 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 50) should be mapped ++PASS: Original line: 6, expected: 6 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 56) should be mapped ++PASS: Original line: 7, expected: 7 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++indexMapWithTwoConcatenatedSources ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 22) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 24) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 25) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 34) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 40) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 47) should be mapped ++PASS: Original line: 4, expected: 4 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 49) should be mapped ++PASS: Original line: 5, expected: 5 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 50) should be mapped ++PASS: Original line: 6, expected: 6 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 56) should be mapped ++PASS: Original line: 7, expected: 7 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 62) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 71) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 77) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 83) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 88) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++PASS: Test location (0, 89) should be mapped ++PASS: Original line: 3, expected: 3 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: second-source-original.js, expected: second-source-original.js ++sourcesNullSourcesContentNonNull ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++FAIL: Original source: sources-null-sources-content-non-null.js.map, expected: null ++ Expected: null ++ Actual: "sources-null-sources-content-non-null.js.map" ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++FAIL: Original source: sources-null-sources-content-non-null.js.map, expected: null ++ Expected: null ++ Actual: "sources-null-sources-content-non-null.js.map" ++sourcesNonNullSourcesContentNull ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++PASS: Test location (0, 9) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 9, expected: 9 ++PASS: Original source: basic-mapping-original.js, expected: basic-mapping-original.js ++transitiveMapping ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++transitiveMappingWithThreeSteps ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++Transitive mapping test ignored ++vlqValidSingleDigit ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: vlq-valid-single-digit-original.js, expected: vlq-valid-single-digit-original.js ++vlqValidNegativeDigit ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (2, 15) should be mapped ++PASS: Original line: 1, expected: 1 ++FAIL: Original column: 1, expected: 3 ++ Expected: 3 ++ Actual: 1 ++PASS: Original source: vlq-valid-negative-digit-original.js, expected: vlq-valid-negative-digit-original.js ++PASS: Test location (2, 2) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 1, expected: 1 ++PASS: Original source: vlq-valid-negative-digit-original.js, expected: vlq-valid-negative-digit-original.js ++vlqValidContinuationBitPresent1 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 15) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 1, expected: 1 ++PASS: Original source: vlq-valid-continuation-bit-present-1-original.js, expected: vlq-valid-continuation-bit-present-1-original.js ++vlqValidContinuationBitPresent2 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (2, 16) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 1, expected: 1 ++PASS: Original source: vlq-valid-continuation-bit-present-2-original.js, expected: vlq-valid-continuation-bit-present-2-original.js ++mappingSemanticsSingleFieldSegment ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 0) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 1, expected: 1 ++PASS: Original source: mapping-semantics-single-field-segment-original.js, expected: mapping-semantics-single-field-segment-original.js ++PASS: Test location (0, 2) should be mapped ++FAIL: Original line: 0, expected: null ++ Expected: null ++ Actual: 0 ++FAIL: Original column: 1, expected: null ++ Expected: null ++ Actual: 1 ++FAIL: Original source: mapping-semantics-single-field-segment-original.js, expected: null ++ Expected: null ++ Actual: "mapping-semantics-single-field-segment-original.js" ++mappingSemanticsFourFieldSegment ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: mapping-semantics-four-field-segment-original.js, expected: mapping-semantics-four-field-segment-original.js ++mappingSemanticsFiveFieldSegment ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 2, expected: 2 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: mapping-semantics-five-field-segment-original.js, expected: mapping-semantics-five-field-segment-original.js ++mappingSemanticsColumnReset ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: mapping-semantics-column-reset-original.js, expected: mapping-semantics-column-reset-original.js ++PASS: Test location (1, 1) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: mapping-semantics-column-reset-original.js, expected: mapping-semantics-column-reset-original.js ++mappingSemanticsRelative1 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 0, expected: 0 ++PASS: Original source: mapping-semantics-relative-1-original.js, expected: mapping-semantics-relative-1-original.js ++PASS: Test location (0, 5) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 4, expected: 4 ++PASS: Original source: mapping-semantics-relative-1-original.js, expected: mapping-semantics-relative-1-original.js ++mappingSemanticsRelative2 ++PASS: Resource should have loaded 1 SourceMap. ++PASS: SourceMap should be a WI.SourceMap instance. ++PASS: Test location (0, 1) should be mapped ++PASS: Original line: 0, expected: 0 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: mapping-semantics-relative-2-original.js, expected: mapping-semantics-relative-2-original.js ++PASS: Test location (1, 2) should be mapped ++PASS: Original line: 1, expected: 1 ++PASS: Original column: 2, expected: 2 ++PASS: Original source: mapping-semantics-relative-2-original.js, expected: mapping-semantics-relative-2-original.js ++ +diff --git a/LayoutTests/inspector/model/source-map-spec.html b/LayoutTests/inspector/model/source-map-spec.html +new file mode 100644 +index 000000000000..08979e569710 +--- /dev/null ++++ b/LayoutTests/inspector/model/source-map-spec.html +@@ -0,0 +1,87 @@ ++<!DOCTYPE html> ++<html> ++<head> ++<script src="../../http/tests/inspector/resources/inspector-test.js"></script> ++<script> ++function triggerScriptResource(scriptName) { ++ let script = document.createElement("script"); ++ script.src = `../../imported/tg4/source-map-tests/resources/${scriptName}`; ++ document.body.appendChild(script); ++} ++ ++async function setup() ++{ ++ const response = await fetch("../../imported/tg4/source-map-tests/source-map-spec-tests.json"); ++ const json = await response.json(); ++ TestPage.dispatchEventToFrontend("TestDescriptionsFetched", {json}); ++} ++ ++function test() ++{ ++ function checkMapping(resource, testCase, action) ++ { ++ const location = resource.createSourceCodeLocation(action.generatedLine, action.generatedColumn); ++ InspectorTest.expectThat(location.hasMappedLocation(), `Test location (${action.generatedLine}, ${action.generatedColumn}) should be mapped`); ++ InspectorTest.expectEqual(location.displayLineNumber, action.originalLine, `Original line: ${location.displayLineNumber}, expected: ${action.originalLine}`); ++ InspectorTest.expectEqual(location.displayColumnNumber, action.originalColumn, `Original column: ${location.displayColumnNumber}, expected: ${action.originalColumn}`); ++ InspectorTest.expectEqual(location.displaySourceCode.displayName, action.originalSource, `Original source: ${location.displaySourceCode.displayName}, expected: ${action.originalSource}`); ++ } ++ ++ function withTimeout(promise, seconds) ++ { ++ return Promise.race([promise, new Promise((resolve, reject) => { ++ setTimeout(resolve, seconds); ++ })]); ++ } ++ ++ let suite = InspectorTest.createAsyncSuite("SourceMapSpec"); ++ ++ suite.addTestCase({ ++ name: "SourceMapSpec", ++ description: "Run test cases from the source maps spec test suite", ++ async test() { ++ InspectorTest.evaluateInPage("setup()"); ++ const event = await InspectorTest.awaitEvent("TestDescriptionsFetched"); ++ const testDescriptions = event.data.json; ++ ++ for (const testCase of testDescriptions.tests) { ++ InspectorTest.log(testCase.name); ++ InspectorTest.evaluateInPage(`triggerScriptResource('${testCase.baseFile}')`); ++ let resourceEvent = await WI.Frame.awaitEvent(WI.Frame.Event.ResourceWasAdded); ++ let resource = resourceEvent.data.resource; ++ let sourceMapEvent = await withTimeout(resource.awaitEvent(WI.SourceCode.Event.SourceMapAdded), 50); ++ ++ if (testCase.sourceMapIsValid) { ++ InspectorTest.expectEqual(resource.sourceMaps.length, 1, "Resource should have loaded 1 SourceMap."); ++ InspectorTest.expectThat(resource.sourceMaps[0] instanceof WI.SourceMap, "SourceMap should be a WI.SourceMap instance."); ++ if (!(resource.sourceMaps[0] instanceof WI.SourceMap)) { ++ continue; ++ } ++ } else { ++ const hasFailedSourceMap = WI.networkManager.isSourceMapURL(absoluteURL(testCase.sourceMapFile, resource.displayURL)); ++ InspectorTest.expectThat(hasFailedSourceMap, "Expected that there is an associated failed source map URL"); ++ InspectorTest.expectEqual(resource.sourceMaps.length, 0, "Expected no source map resource loaded"); ++ } ++ ++ if (testCase.testActions) { ++ for (const action of testCase.testActions) { ++ if (action.actionType === "checkMapping") ++ checkMapping(resource, testCase, action); ++ else if (action.actionType === "checkMappingTransitive") ++ InspectorTest.log("Transitive mapping test ignored"); ++ else if (action.actionType === "checkIgnoreList") ++ InspectorTest.log("Ignore list test ignored (unsupported)") ++ } ++ } ++ } ++ } ++ }); ++ ++ suite.runTestCasesAndFinish(); ++} ++</script> ++</head> ++<body onload="runTest()"> ++<p>Run source map specification consumer test cases.</p> ++</body> ++</html> +-- +2.39.2 + diff --git a/test/fixtures/warning_node_modules/new-buffer-cjs.js b/test/fixtures/warning_node_modules/new-buffer-cjs.js new file mode 100644 index 00000000000000..be2877fa30c46d --- /dev/null +++ b/test/fixtures/warning_node_modules/new-buffer-cjs.js @@ -0,0 +1 @@ +require('new-buffer-cjs'); diff --git a/test/fixtures/warning_node_modules/new-buffer-esm.mjs b/test/fixtures/warning_node_modules/new-buffer-esm.mjs new file mode 100644 index 00000000000000..9aa56f759f8ae4 --- /dev/null +++ b/test/fixtures/warning_node_modules/new-buffer-esm.mjs @@ -0,0 +1 @@ +import 'new-buffer-esm' diff --git a/test/fixtures/warning_node_modules/node_modules/new-buffer-cjs/index.js b/test/fixtures/warning_node_modules/node_modules/new-buffer-cjs/index.js new file mode 100644 index 00000000000000..514db554ed6edf --- /dev/null +++ b/test/fixtures/warning_node_modules/node_modules/new-buffer-cjs/index.js @@ -0,0 +1 @@ +new Buffer(10); diff --git a/test/fixtures/warning_node_modules/node_modules/new-buffer-cjs/package.json b/test/fixtures/warning_node_modules/node_modules/new-buffer-cjs/package.json new file mode 100644 index 00000000000000..f2c75cf8e443b4 --- /dev/null +++ b/test/fixtures/warning_node_modules/node_modules/new-buffer-cjs/package.json @@ -0,0 +1,3 @@ +{ + "main": "index.js" +} \ No newline at end of file diff --git a/test/fixtures/warning_node_modules/node_modules/new-buffer-esm/index.js b/test/fixtures/warning_node_modules/node_modules/new-buffer-esm/index.js new file mode 100644 index 00000000000000..9dadaeb12413c2 --- /dev/null +++ b/test/fixtures/warning_node_modules/node_modules/new-buffer-esm/index.js @@ -0,0 +1,2 @@ +import { Buffer } from 'node:buffer'; +new Buffer(10); diff --git a/test/fixtures/warning_node_modules/node_modules/new-buffer-esm/package.json b/test/fixtures/warning_node_modules/node_modules/new-buffer-esm/package.json new file mode 100644 index 00000000000000..07fe0622822c0e --- /dev/null +++ b/test/fixtures/warning_node_modules/node_modules/new-buffer-esm/package.json @@ -0,0 +1,4 @@ +{ + "main": "index.js", + "type": "module" +} \ No newline at end of file diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 34fe91f03191da..fa23c5f61e2708 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -27,7 +27,7 @@ Last update: - resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing - resources: https://github.com/web-platform-tests/wpt/tree/1e140d63ec/resources - streams: https://github.com/web-platform-tests/wpt/tree/2bd26e124c/streams -- url: https://github.com/web-platform-tests/wpt/tree/6a39784534/url +- url: https://github.com/web-platform-tests/wpt/tree/67880a4eb8/url - user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi diff --git a/test/fixtures/wpt/url/META.yml b/test/fixtures/wpt/url/META.yml index 094b266b64b61b..415bd0f094c6b9 100644 --- a/test/fixtures/wpt/url/META.yml +++ b/test/fixtures/wpt/url/META.yml @@ -3,5 +3,4 @@ suggested_reviewers: - mikewest - domenic - annevk - - GPHemsley - TimothyGu diff --git a/test/fixtures/wpt/url/README.md b/test/fixtures/wpt/url/README.md index fa5e3b0dc72385..50227bc4b330ef 100644 --- a/test/fixtures/wpt/url/README.md +++ b/test/fixtures/wpt/url/README.md @@ -1,11 +1,13 @@ -## urltestdata.json +## urltestdata.json / urltestdata-javascript-only.json -`resources/urltestdata.json` contains URL parsing tests suitable for any URL parser implementation. +[`resources/urltestdata.json`](resources/urltestdata.json) contains URL parsing tests suitable for any URL parser implementation. +[`resources/urltestdata-javascript-only.json`](resources/urltestdata-javascript-only.json) contains URL parsing tests specifically meant +for JavaScript's `URL()` class as well as other languages accepting non-scalar-value strings. -It's used as a source of tests by `a-element.html`, `failure.html`, `url-constructor.any.js`, and -other test files in this directory. +These files are used as a source of tests by `a-element.html`, `failure.html`, `url-constructor.any.js`, +and other test files in this directory. -The format of `resources/urltestdata.json` is a JSON array of comments as strings and test cases as +Both files share the same format. They consist of a JSON array of comments as strings and test cases as objects. The keys for each test case are: * `input`: a string to be parsed as URL. diff --git a/test/fixtures/wpt/url/a-element-origin-xhtml.xhtml b/test/fixtures/wpt/url/a-element-origin-xhtml.xhtml index effcf04bee3fb0..e68e68dda2ad6c 100644 --- a/test/fixtures/wpt/url/a-element-origin-xhtml.xhtml +++ b/test/fixtures/wpt/url/a-element-origin-xhtml.xhtml @@ -12,4 +12,8 @@ <script src="resources/a-element-origin.js"></script> </body> </html> -<!-- Other dependencies: resources/urltestdata.json --> +<!-- + Other dependencies: + * resources/urltestdata.json, + * resources/urltestdata-javascript-only.json, +--> diff --git a/test/fixtures/wpt/url/a-element-origin.html b/test/fixtures/wpt/url/a-element-origin.html index 9cc8e94cbed060..7015f853f01a1d 100644 --- a/test/fixtures/wpt/url/a-element-origin.html +++ b/test/fixtures/wpt/url/a-element-origin.html @@ -5,4 +5,8 @@ <base id=base> <div id=log></div> <script src=resources/a-element-origin.js></script> -<!-- Other dependencies: resources/urltestdata.json --> +<!-- + Other dependencies: + * resources/urltestdata.json, + * resources/urltestdata-javascript-only.json, +--> diff --git a/test/fixtures/wpt/url/a-element-xhtml.xhtml b/test/fixtures/wpt/url/a-element-xhtml.xhtml index 05bec4ce4b2f1e..610481a7819d62 100644 --- a/test/fixtures/wpt/url/a-element-xhtml.xhtml +++ b/test/fixtures/wpt/url/a-element-xhtml.xhtml @@ -17,4 +17,8 @@ <script src="resources/a-element.js"></script> </body> </html> -<!-- Other dependencies: resources/urltestdata.json --> +<!-- + Other dependencies: + * resources/urltestdata.json, + * resources/urltestdata-javascript-only.json, +--> diff --git a/test/fixtures/wpt/url/a-element.html b/test/fixtures/wpt/url/a-element.html index 3428fa00574c4d..a7621d2ded76c4 100644 --- a/test/fixtures/wpt/url/a-element.html +++ b/test/fixtures/wpt/url/a-element.html @@ -10,7 +10,11 @@ <base id=base> <div id=log></div> <script src=resources/a-element.js></script> -<!-- Other dependencies: resources/urltestdata.json --> +<!-- + Other dependencies: + * resources/urltestdata.json, + * resources/urltestdata-javascript-only.json, +--> <a id="multline-entity" download="multline-entity.txt" href="data:text/plain;charset=utf-8,first%20line second%20line"> Link with embedded \n is parsed correctly </a> diff --git a/test/fixtures/wpt/url/failure.html b/test/fixtures/wpt/url/failure.html index e61f462f97456f..d95b1d52d67237 100644 --- a/test/fixtures/wpt/url/failure.html +++ b/test/fixtures/wpt/url/failure.html @@ -6,7 +6,10 @@ <script src=/resources/testharnessreport.js></script> <div id=log></div> <script> -promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runTests), "Loading data…") +promise_test(() => Promise.all([ + fetch("resources/urltestdata.json").then(res => res.json()), + fetch("resources/urltestdata-javascript-only.json").then(res => res.json()), +]).then((tests) => tests.flat()).then(runTests), "Loading data…"); function runTests(testData) { for (const test of testData) { diff --git a/test/fixtures/wpt/url/idlharness-shadowrealm.window.js b/test/fixtures/wpt/url/idlharness-shadowrealm.window.js deleted file mode 100644 index 2373f84e0e251a..00000000000000 --- a/test/fixtures/wpt/url/idlharness-shadowrealm.window.js +++ /dev/null @@ -1,2 +0,0 @@ -// META: script=/resources/idlharness-shadowrealm.js -idl_test_shadowrealm(["url"], []); diff --git a/test/fixtures/wpt/url/idlharness.any.js b/test/fixtures/wpt/url/idlharness.any.js index 4a0e52f12b3c32..c0642729c0bec8 100644 --- a/test/fixtures/wpt/url/idlharness.any.js +++ b/test/fixtures/wpt/url/idlharness.any.js @@ -1,5 +1,6 @@ // META: script=/resources/WebIDLParser.js // META: script=/resources/idlharness.js +// META: global=window,dedicatedworker,shadowrealm-in-window idl_test( ['url'], diff --git a/test/fixtures/wpt/url/resources/a-element-origin.js b/test/fixtures/wpt/url/resources/a-element-origin.js index c1c24c8986b4aa..3e5e6cd0c76e43 100644 --- a/test/fixtures/wpt/url/resources/a-element-origin.js +++ b/test/fixtures/wpt/url/resources/a-element-origin.js @@ -1,4 +1,7 @@ -promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runURLTests), "Loading data…"); +promise_test(() => Promise.all([ + fetch("resources/urltestdata.json").then(res => res.json()), + fetch("resources/urltestdata-javascript-only.json").then(res => res.json()), +]).then((tests) => tests.flat()).then(runURLTests), "Loading data…"); function setBase(base) { document.getElementById("base").href = base diff --git a/test/fixtures/wpt/url/resources/a-element.js b/test/fixtures/wpt/url/resources/a-element.js index cff4160d328942..4a925d9d0e6b2f 100644 --- a/test/fixtures/wpt/url/resources/a-element.js +++ b/test/fixtures/wpt/url/resources/a-element.js @@ -1,4 +1,7 @@ -promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runURLTests), "Loading data…"); +promise_test(() => Promise.all([ + fetch("resources/urltestdata.json").then(res => res.json()), + fetch("resources/urltestdata-javascript-only.json").then(res => res.json()), +]).then((tests) => tests.flat()).then(runURLTests), "Loading data…"); function setBase(base) { document.getElementById("base").href = base; diff --git a/test/fixtures/wpt/url/resources/urltestdata-javascript-only.json b/test/fixtures/wpt/url/resources/urltestdata-javascript-only.json new file mode 100644 index 00000000000000..a3793c1f472f00 --- /dev/null +++ b/test/fixtures/wpt/url/resources/urltestdata-javascript-only.json @@ -0,0 +1,18 @@ +[ + "See ../README.md for a description of the format.", + { + "input": "http://example.com/\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF?\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF", + "base": null, + "href": "http://example.com/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", + "search": "?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", + "hash": "" + } +] diff --git a/test/fixtures/wpt/url/resources/urltestdata.json b/test/fixtures/wpt/url/resources/urltestdata.json index 53f6d575e165bf..0ebaf4cd4c42e7 100644 --- a/test/fixtures/wpt/url/resources/urltestdata.json +++ b/test/fixtures/wpt/url/resources/urltestdata.json @@ -4849,21 +4849,6 @@ "search": "", "hash": "" }, - { - "input": "http://example.com/\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF?\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF", - "base": null, - "href": "http://example.com/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", - "origin": "http://example.com", - "protocol": "http:", - "username": "", - "password": "", - "host": "example.com", - "hostname": "example.com", - "port": "", - "pathname": "/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", - "search": "?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", - "hash": "" - }, "Forbidden host code points", { "input": "sc://a\u0000b/", @@ -9658,6 +9643,201 @@ "search": "", "hash": "" }, + { + "input": "android://x:0/a", + "base": null, + "href": "android://x:0/a", + "origin": "null", + "protocol": "android:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "/a", + "search": "", + "hash": "" + }, + { + "input": "drivefs://x:0/a", + "base": null, + "href": "drivefs://x:0/a", + "origin": "null", + "protocol": "drivefs:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "/a", + "search": "", + "hash": "" + }, + { + "input": "chromeos-steam://x:0/a", + "base": null, + "href": "chromeos-steam://x:0/a", + "origin": "null", + "protocol": "chromeos-steam:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "/a", + "search": "", + "hash": "" + }, + { + "input": "steam://x:0/a", + "base": null, + "href": "steam://x:0/a", + "origin": "null", + "protocol": "steam:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "/a", + "search": "", + "hash": "" + }, + { + "input": "materialized-view://x:0/a", + "base": null, + "href": "materialized-view://x:0/a", + "origin": "null", + "protocol": "materialized-view:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "/a", + "search": "", + "hash": "" + }, + { + "input": "android-app://x:0", + "base": null, + "href": "android-app://x:0", + "origin": "null", + "protocol": "android-app:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "chrome-distiller://x:0", + "base": null, + "href": "chrome-distiller://x:0", + "origin": "null", + "protocol": "chrome-distiller:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "chrome-extension://x:0", + "base": null, + "href": "chrome-extension://x:0", + "origin": "null", + "protocol": "chrome-extension:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "chrome-native://x:0", + "base": null, + "href": "chrome-native://x:0", + "origin": "null", + "protocol": "chrome-native:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "chrome-resource://x:0", + "base": null, + "href": "chrome-resource://x:0", + "origin": "null", + "protocol": "chrome-resource:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "chrome-search://x:0", + "base": null, + "href": "chrome-search://x:0", + "origin": "null", + "protocol": "chrome-search:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "fuchsia-dir://x:0", + "base": null, + "href": "fuchsia-dir://x:0", + "origin": "null", + "protocol": "fuchsia-dir:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "isolated-app://x:0", + "base": null, + "href": "isolated-app://x:0", + "origin": "null", + "protocol": "isolated-app:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, "Scheme relative path starting with multiple slashes", { "input": "///test", @@ -9812,5 +9992,101 @@ "pathname": "/", "search": "", "hash": "" + }, + "# Non-special URL and backslashes", + { + "input": "non-special:\\\\opaque", + "base": null, + "href": "non-special:\\\\opaque", + "origin": "null", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "\\\\opaque", + "search": "", + "hash": "" + }, + { + "input": "non-special:\\\\opaque/path", + "base": null, + "href": "non-special:\\\\opaque/path", + "origin": "null", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "\\\\opaque/path", + "search": "", + "hash": "" + }, + { + "input": "non-special:\\\\opaque\\path", + "base": null, + "href": "non-special:\\\\opaque\\path", + "origin": "null", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "\\\\opaque\\path", + "search": "", + "hash": "" + }, + { + "input": "non-special:\\/opaque", + "base": null, + "href": "non-special:\\/opaque", + "origin": "null", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "\\/opaque", + "search": "", + "hash": "" + }, + { + "input": "non-special:/\\path", + "base": null, + "href": "non-special:/\\path", + "origin": "null", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/\\path", + "search": "", + "hash": "" + }, + { + "input": "non-special://host\\a", + "base": null, + "failure": true + }, + { + "input": "non-special://host/a\\b", + "base": null, + "href": "non-special://host/a\\b", + "origin": "null", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/a\\b", + "search": "", + "hash": "" } ] diff --git a/test/fixtures/wpt/url/url-constructor.any.js b/test/fixtures/wpt/url/url-constructor.any.js index bea06d025b7188..b4b639b813e975 100644 --- a/test/fixtures/wpt/url/url-constructor.any.js +++ b/test/fixtures/wpt/url/url-constructor.any.js @@ -50,4 +50,7 @@ function runURLTests(urlTests) { } } -promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runURLTests), "Loading data…"); +promise_test(() => Promise.all([ + fetch("resources/urltestdata.json").then(res => res.json()), + fetch("resources/urltestdata-javascript-only.json").then(res => res.json()), +]).then((tests) => tests.flat()).then(runURLTests), "Loading data…"); diff --git a/test/fixtures/wpt/url/url-origin.any.js b/test/fixtures/wpt/url/url-origin.any.js index 599984c6c17dfe..b9e0c8585312f6 100644 --- a/test/fixtures/wpt/url/url-origin.any.js +++ b/test/fixtures/wpt/url/url-origin.any.js @@ -1,4 +1,7 @@ -promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runURLTests), "Loading data…"); +promise_test(() => Promise.all([ + fetch("resources/urltestdata.json").then(res => res.json()), + fetch("resources/urltestdata-javascript-only.json").then(res => res.json()), +]).then((tests) => tests.flat()).then(runURLTests), "Loading data…"); function runURLTests(urlTests) { for (const expected of urlTests) { diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 1fca131df462a1..b2aea8fdbff061 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -68,7 +68,7 @@ "path": "streams" }, "url": { - "commit": "6a39784534e118acc102cf5252c542378831401d", + "commit": "67880a4eb83ca9aa732eec4b35a1971ff5bf37ff", "path": "url" }, "user-timing": { diff --git a/test/message/eval_messages.out b/test/message/eval_messages.out deleted file mode 100644 index e07bbe4d6acd3c..00000000000000 --- a/test/message/eval_messages.out +++ /dev/null @@ -1,77 +0,0 @@ -[eval] -[eval]:1 -with(this){__filename} -^^^^ - -SyntaxError: Strict mode code may not include a with statement - at makeContextifyScript (node:internal/vm:*:*) - at node:internal/process/execution:*:* - at [eval]-wrapper:*:* - at runScript (node:internal/process/execution:*:*) - at evalScript (node:internal/process/execution:*:*) - at node:internal/main/eval_string:*:* - -Node.js * -42 -42 -[eval]:1 -throw new Error("hello") -^ - -Error: hello - at [eval]:1:7 - at runScriptInThisContext (node:internal/vm:*:*) - at node:internal/process/execution:*:* - at [eval]-wrapper:*:* - at runScript (node:internal/process/execution:*:*) - at evalScript (node:internal/process/execution:*:*) - at node:internal/main/eval_string:*:* - -Node.js * - -[eval]:1 -throw new Error("hello") -^ - -Error: hello - at [eval]:1:7 - at runScriptInThisContext (node:internal/vm:*:*) - at node:internal/process/execution:*:* - at [eval]-wrapper:*:* - at runScript (node:internal/process/execution:*:*) - at evalScript (node:internal/process/execution:*:*) - at node:internal/main/eval_string:*:* - -Node.js * -100 -[eval]:1 -var x = 100; y = x; - ^ - -ReferenceError: y is not defined - at [eval]:1:16 - at runScriptInThisContext (node:internal/vm:*:*) - at node:internal/process/execution:*:* - at [eval]-wrapper:*:* - at runScript (node:internal/process/execution:*:*) - at evalScript (node:internal/process/execution:*:*) - at node:internal/main/eval_string:*:* - -Node.js * - -[eval]:1 -var ______________________________________________; throw 10 - ^ -10 -(Use `* --trace-uncaught ...` to show where the exception was thrown) - -Node.js * - -[eval]:1 -var ______________________________________________; throw 10 - ^ -10 -(Use `* --trace-uncaught ...` to show where the exception was thrown) - -Node.js * -done diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out deleted file mode 100644 index 6afc8a62d7fcd9..00000000000000 --- a/test/message/stdin_messages.out +++ /dev/null @@ -1,89 +0,0 @@ -[stdin] -[stdin]:1 -with(this){__filename} -^^^^ - -SyntaxError: Strict mode code may not include a with statement - at makeContextifyScript (node:internal/vm:*:*) - at node:internal/process/execution:*:* - at [stdin]-wrapper:*:* - at runScript (node:internal/process/execution:*:*) - at evalScript (node:internal/process/execution:*:*) - at node:internal/main/eval_stdin:*:* - at Socket.<anonymous> (node:internal/process/execution:*:*) - at Socket.emit (node:events:*:*) - at endReadableNT (node:internal/streams/readable:*:*) - at process.processTicksAndRejections (node:internal/process/task_queues:*:*) - -Node.js * -42 -42 -[stdin]:1 -throw new Error("hello") -^ - -Error: hello - at [stdin]:1:7 - at runScriptInThisContext (node:internal/vm:*:*) - at node:internal/process/execution:*:* - at [stdin]-wrapper:*:* - at runScript (node:internal/process/execution:*:*) - at evalScript (node:internal/process/execution:*:*) - at node:internal/main/eval_stdin:*:* - at Socket.<anonymous> (node:internal/process/execution:*:*) - at Socket.emit (node:events:*:*) - at endReadableNT (node:internal/streams/readable:*:*) - -Node.js * -[stdin]:1 -throw new Error("hello") -^ - -Error: hello - at [stdin]:1:* - at runScriptInThisContext (node:internal/vm:*:*) - at node:internal/process/execution:*:* - at [stdin]-wrapper:*:* - at runScript (node:internal/process/execution:*:*) - at evalScript (node:internal/process/execution:*:*) - at node:internal/main/eval_stdin:*:* - at Socket.<anonymous> (node:internal/process/execution:*:*) - at Socket.emit (node:events:*:*) - at endReadableNT (node:internal/streams/readable:*:*) - -Node.js * -100 -[stdin]:1 -let x = 100; y = x; - ^ - -ReferenceError: y is not defined - at [stdin]:1:16 - at runScriptInThisContext (node:internal/vm:*:*) - at node:internal/process/execution:*:* - at [stdin]-wrapper:*:* - at runScript (node:internal/process/execution:*:*) - at evalScript (node:internal/process/execution:*:*) - at node:internal/main/eval_stdin:*:* - at Socket.<anonymous> (node:internal/process/execution:*:*) - at Socket.emit (node:events:*:*) - at endReadableNT (node:internal/streams/readable:*:*) - -Node.js * - -[stdin]:1 -let ______________________________________________; throw 10 - ^ -10 -(Use `* --trace-uncaught ...` to show where the exception was thrown) - -Node.js * - -[stdin]:1 -let ______________________________________________; throw 10 - ^ -10 -(Use `* --trace-uncaught ...` to show where the exception was thrown) - -Node.js * -done diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index 0c2831c4780574..3663983a699386 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -140,6 +140,7 @@ if (common.isMainThread) { 'NativeModule internal/streams/writable', 'NativeModule internal/worker', 'NativeModule internal/worker/io', + 'NativeModule internal/worker/messaging', 'NativeModule stream', 'NativeModule stream/promises', 'NativeModule string_decoder', diff --git a/test/parallel/test-buffer-constructor-node-modules.js b/test/parallel/test-buffer-constructor-node-modules.js new file mode 100644 index 00000000000000..e865b9e0ae2f0b --- /dev/null +++ b/test/parallel/test-buffer-constructor-node-modules.js @@ -0,0 +1,48 @@ +'use strict'; + +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const { spawnSyncAndAssert } = require('../common/child_process'); + +if (process.env.NODE_PENDING_DEPRECATION) + common.skip('test does not work when NODE_PENDING_DEPRECATION is set'); + +spawnSyncAndAssert( + process.execPath, + [ fixtures.path('warning_node_modules', 'new-buffer-cjs.js') ], + { + trim: true, + stderr: '', + } +); + +spawnSyncAndAssert( + process.execPath, + [ fixtures.path('warning_node_modules', 'new-buffer-esm.mjs') ], + { + trim: true, + stderr: '', + } +); + +spawnSyncAndAssert( + process.execPath, + [ + '--pending-deprecation', + fixtures.path('warning_node_modules', 'new-buffer-cjs.js'), + ], + { + stderr: /DEP0005/ + } +); + +spawnSyncAndAssert( + process.execPath, + [ + '--pending-deprecation', + fixtures.path('warning_node_modules', 'new-buffer-esm.mjs'), + ], + { + stderr: /DEP0005/ + } +); diff --git a/test/parallel/test-child-process-advanced-serialization-splitted-length-field.js b/test/parallel/test-child-process-advanced-serialization-splitted-length-field.js new file mode 100644 index 00000000000000..5407a56f495c8f --- /dev/null +++ b/test/parallel/test-child-process-advanced-serialization-splitted-length-field.js @@ -0,0 +1,24 @@ +'use strict'; +const common = require('../common'); +const child_process = require('child_process'); + +// Regression test for https://github.com/nodejs/node/issues/55834 +const msgLen = 65521; +let cnt = 10; + +if (process.argv[2] === 'child') { + const msg = Buffer.allocUnsafe(msgLen); + (function send() { + if (cnt--) { + process.send(msg, send); + } else { + process.disconnect(); + } + })(); +} else { + const child = child_process.spawn(process.execPath, [__filename, 'child'], { + stdio: ['inherit', 'inherit', 'inherit', 'ipc'], + serialization: 'advanced' + }); + child.on('message', common.mustCall(cnt)); +} diff --git a/test/parallel/test-child-process-bad-stdio.js b/test/parallel/test-child-process-bad-stdio.js index 1f382e2966043d..bbcf3bba6d7e1b 100644 --- a/test/parallel/test-child-process-bad-stdio.js +++ b/test/parallel/test-child-process-bad-stdio.js @@ -1,21 +1,23 @@ 'use strict'; // Flags: --expose-internals const common = require('../common'); -const assert = require('assert'); -const cp = require('child_process'); if (process.argv[2] === 'child') { setTimeout(() => {}, common.platformTimeout(100)); return; } +const assert = require('node:assert'); +const cp = require('node:child_process'); +const { mock, test } = require('node:test'); +const { ChildProcess } = require('internal/child_process'); + // Monkey patch spawn() to create a child process normally, but destroy the // stdout and stderr streams. This replicates the conditions where the streams // cannot be properly created. -const ChildProcess = require('internal/child_process').ChildProcess; const original = ChildProcess.prototype.spawn; -ChildProcess.prototype.spawn = function() { +mock.method(ChildProcess.prototype, 'spawn', function() { const err = original.apply(this, arguments); this.stdout.destroy(); @@ -24,7 +26,7 @@ ChildProcess.prototype.spawn = function() { this.stderr = null; return err; -}; +}); function createChild(options, callback) { const cmd = `"${process.execPath}" "${__filename}" child`; @@ -32,32 +34,32 @@ function createChild(options, callback) { return cp.exec(cmd, options, common.mustCall(callback)); } -// Verify that normal execution of a child process is handled. -{ +test('normal execution of a child process is handled', (_, done) => { createChild({}, (err, stdout, stderr) => { assert.strictEqual(err, null); assert.strictEqual(stdout, ''); assert.strictEqual(stderr, ''); + done(); }); -} +}); -// Verify that execution with an error event is handled. -{ +test('execution with an error event is handled', (_, done) => { const error = new Error('foo'); const child = createChild({}, (err, stdout, stderr) => { assert.strictEqual(err, error); assert.strictEqual(stdout, ''); assert.strictEqual(stderr, ''); + done(); }); child.emit('error', error); -} +}); -// Verify that execution with a killed process is handled. -{ +test('execution with a killed process is handled', (_, done) => { createChild({ timeout: 1 }, (err, stdout, stderr) => { assert.strictEqual(err.killed, true); assert.strictEqual(stdout, ''); assert.strictEqual(stderr, ''); + done(); }); -} +}); diff --git a/test/parallel/test-child-process-windows-hide.js b/test/parallel/test-child-process-windows-hide.js index ef4a8be8784ebc..c218c901a7f2ea 100644 --- a/test/parallel/test-child-process-windows-hide.js +++ b/test/parallel/test-child-process-windows-hide.js @@ -3,49 +3,48 @@ const common = require('../common'); const assert = require('assert'); const cp = require('child_process'); +const { test } = require('node:test'); const internalCp = require('internal/child_process'); const cmd = process.execPath; const args = ['-p', '42']; const options = { windowsHide: true }; -// Since windowsHide isn't really observable, monkey patch spawn() and -// spawnSync() to verify that the flag is being passed through correctly. -const originalSpawn = internalCp.ChildProcess.prototype.spawn; -const originalSpawnSync = internalCp.spawnSync; +// Since windowsHide isn't really observable, this test relies on monkey +// patching spawn() and spawnSync() to verify that the flag is being passed +// through correctly. -internalCp.ChildProcess.prototype.spawn = common.mustCall(function(options) { - assert.strictEqual(options.windowsHide, true); - return originalSpawn.apply(this, arguments); -}, 2); - -internalCp.spawnSync = common.mustCall(function(options) { - assert.strictEqual(options.windowsHide, true); - return originalSpawnSync.apply(this, arguments); -}); - -{ +test('spawnSync() passes windowsHide correctly', (t) => { + const spy = t.mock.method(internalCp, 'spawnSync'); const child = cp.spawnSync(cmd, args, options); assert.strictEqual(child.status, 0); assert.strictEqual(child.signal, null); assert.strictEqual(child.stdout.toString().trim(), '42'); assert.strictEqual(child.stderr.toString().trim(), ''); -} + assert.strictEqual(spy.mock.calls.length, 1); + assert.strictEqual(spy.mock.calls[0].arguments[0].windowsHide, true); +}); -{ +test('spawn() passes windowsHide correctly', (t, done) => { + const spy = t.mock.method(internalCp.ChildProcess.prototype, 'spawn'); const child = cp.spawn(cmd, args, options); child.on('exit', common.mustCall((code, signal) => { assert.strictEqual(code, 0); assert.strictEqual(signal, null); + assert.strictEqual(spy.mock.calls.length, 1); + assert.strictEqual(spy.mock.calls[0].arguments[0].windowsHide, true); + done(); })); -} +}); -{ - const callback = common.mustSucceed((stdout, stderr) => { +test('execFile() passes windowsHide correctly', (t, done) => { + const spy = t.mock.method(internalCp.ChildProcess.prototype, 'spawn'); + cp.execFile(cmd, args, options, common.mustSucceed((stdout, stderr) => { assert.strictEqual(stdout.trim(), '42'); assert.strictEqual(stderr.trim(), ''); - }); - - cp.execFile(cmd, args, options, callback); -} + assert.strictEqual(spy.mock.calls.length, 1); + assert.strictEqual(spy.mock.calls[0].arguments[0].windowsHide, true); + done(); + })); +}); diff --git a/test/parallel/test-crypto-aes-wrap.js b/test/parallel/test-crypto-aes-wrap.js index 6fe35258f7d6b2..21d48d8a3fbae7 100644 --- a/test/parallel/test-crypto-aes-wrap.js +++ b/test/parallel/test-crypto-aes-wrap.js @@ -1,62 +1,60 @@ 'use strict'; const common = require('../common'); -if (!common.hasCrypto) +if (!common.hasCrypto) { common.skip('missing crypto'); +} + +// Tests that the AES wrap and unwrap functions are working correctly. const assert = require('assert'); const crypto = require('crypto'); -const test = [ +const ivShort = Buffer.from('3fd838af', 'hex'); +const ivLong = Buffer.from('3fd838af4093d749', 'hex'); +const key1 = Buffer.from('b26f309fbe57e9b3bb6ae5ef31d54450', 'hex'); +const key2 = Buffer.from('40978085d68091f7dfca0d7dfc7a5ee76d2cc7f2f345a304', 'hex'); +const key3 = Buffer.from('29c9eab5ed5ad44134a1437fe2e673b4d88a5b7c72e68454fea08721392b7323', 'hex'); + +[ { algorithm: 'aes128-wrap', - key: 'b26f309fbe57e9b3bb6ae5ef31d54450', - iv: '3fd838af4093d749', + key: key1, + iv: ivLong, text: '12345678123456781234567812345678' }, { algorithm: 'id-aes128-wrap-pad', - key: 'b26f309fbe57e9b3bb6ae5ef31d54450', - iv: '3fd838af', + key: key1, + iv: ivShort, text: '12345678123456781234567812345678123' }, { algorithm: 'aes192-wrap', - key: '40978085d68091f7dfca0d7dfc7a5ee76d2cc7f2f345a304', - iv: '3fd838af4093d749', + key: key2, + iv: ivLong, text: '12345678123456781234567812345678' }, { algorithm: 'id-aes192-wrap-pad', - key: '40978085d68091f7dfca0d7dfc7a5ee76d2cc7f2f345a304', - iv: '3fd838af', + key: key2, + iv: ivShort, text: '12345678123456781234567812345678123' }, { algorithm: 'aes256-wrap', - key: '29c9eab5ed5ad44134a1437fe2e673b4d88a5b7c72e68454fea08721392b7323', - iv: '3fd838af4093d749', + key: key3, + iv: ivLong, text: '12345678123456781234567812345678' }, { algorithm: 'id-aes256-wrap-pad', - key: '29c9eab5ed5ad44134a1437fe2e673b4d88a5b7c72e68454fea08721392b7323', - iv: '3fd838af', + key: key3, + iv: ivShort, text: '12345678123456781234567812345678123' }, -]; - -test.forEach((data) => { - const cipher = crypto.createCipheriv( - data.algorithm, - Buffer.from(data.key, 'hex'), - Buffer.from(data.iv, 'hex')); - const ciphertext = cipher.update(data.text, 'utf8'); - - const decipher = crypto.createDecipheriv( - data.algorithm, - Buffer.from(data.key, 'hex'), - Buffer.from(data.iv, 'hex')); - const msg = decipher.update(ciphertext, 'buffer', 'utf8'); - - assert.strictEqual(msg, data.text, `${data.algorithm} test case failed`); +].forEach(({ algorithm, key, iv, text }) => { + const cipher = crypto.createCipheriv(algorithm, key, iv); + const decipher = crypto.createDecipheriv(algorithm, key, iv); + const msg = decipher.update(cipher.update(text, 'utf8'), 'buffer', 'utf8'); + assert.strictEqual(msg, text, `${algorithm} test case failed`); }); diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js index af2146982c7a3b..8a946ac55adb00 100644 --- a/test/parallel/test-crypto-hash.js +++ b/test/parallel/test-crypto-hash.js @@ -7,6 +7,7 @@ const assert = require('assert'); const crypto = require('crypto'); const fs = require('fs'); +const { hasOpenSSL } = common; const fixtures = require('../common/fixtures'); let cryptoType; @@ -182,19 +183,21 @@ assert.throws( // Test XOF hash functions and the outputLength option. { - // Default outputLengths. - assert.strictEqual(crypto.createHash('shake128').digest('hex'), - '7f9c2ba4e88f827d616045507605853e'); - assert.strictEqual(crypto.createHash('shake128', null).digest('hex'), - '7f9c2ba4e88f827d616045507605853e'); - assert.strictEqual(crypto.createHash('shake256').digest('hex'), - '46b9dd2b0ba88d13233b3feb743eeb24' + - '3fcd52ea62b81b82b50c27646ed5762f'); - assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 }) - .copy() // Default outputLength. - .digest('hex'), - '46b9dd2b0ba88d13233b3feb743eeb24' + - '3fcd52ea62b81b82b50c27646ed5762f'); + // Default outputLengths. Since OpenSSL 3.4 an outputLength is mandatory + if (!hasOpenSSL(3, 4)) { + assert.strictEqual(crypto.createHash('shake128').digest('hex'), + '7f9c2ba4e88f827d616045507605853e'); + assert.strictEqual(crypto.createHash('shake128', null).digest('hex'), + '7f9c2ba4e88f827d616045507605853e'); + assert.strictEqual(crypto.createHash('shake256').digest('hex'), + '46b9dd2b0ba88d13233b3feb743eeb24' + + '3fcd52ea62b81b82b50c27646ed5762f'); + assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 }) + .copy() // Default outputLength. + .digest('hex'), + '46b9dd2b0ba88d13233b3feb743eeb24' + + '3fcd52ea62b81b82b50c27646ed5762f'); + } // Short outputLengths. assert.strictEqual(crypto.createHash('shake128', { outputLength: 0 }) diff --git a/test/parallel/test-crypto-oneshot-hash.js b/test/parallel/test-crypto-oneshot-hash.js index 56b4c04a65a1c1..69051c43d9e882 100644 --- a/test/parallel/test-crypto-oneshot-hash.js +++ b/test/parallel/test-crypto-oneshot-hash.js @@ -31,6 +31,9 @@ const methods = crypto.getHashes(); const input = fs.readFileSync(fixtures.path('utf8_test_text.txt')); for (const method of methods) { + // Skip failing tests on OpenSSL 3.4.0 + if (method.startsWith('shake') && common.hasOpenSSL(3, 4)) + continue; for (const outputEncoding of ['buffer', 'hex', 'base64', undefined]) { const oldDigest = crypto.createHash(method).update(input).digest(outputEncoding || 'hex'); const digestFromBuffer = crypto.hash(method, input, outputEncoding); diff --git a/test/parallel/test-dotenv-edge-cases.js b/test/parallel/test-dotenv-edge-cases.js index f8cd262c8a8092..1366c9753cd647 100644 --- a/test/parallel/test-dotenv-edge-cases.js +++ b/test/parallel/test-dotenv-edge-cases.js @@ -8,32 +8,57 @@ const fixtures = require('../common/fixtures'); const validEnvFilePath = '../fixtures/dotenv/valid.env'; const nodeOptionsEnvFilePath = '../fixtures/dotenv/node-options.env'; +const noFinalNewlineEnvFilePath = '../fixtures/dotenv/no-final-newline.env'; +const noFinalNewlineSingleQuotesEnvFilePath = '../fixtures/dotenv/no-final-newline-single-quotes.env'; describe('.env supports edge cases', () => { - - it('supports multiple declarations', async () => { - // process.env.BASIC is equal to `basic` because the second .env file overrides it. + it('supports multiple declarations, including optional ones', async () => { const code = ` const assert = require('assert'); assert.strictEqual(process.env.BASIC, 'basic'); assert.strictEqual(process.env.NODE_NO_WARNINGS, '1'); `.trim(); + const children = await Promise.all(Array.from({ length: 4 }, (_, i) => + common.spawnPromisified( + process.execPath, + [ + // Bitwise AND to create all 4 possible combinations: + // i & 0b01 is truthy when i has value 0bx1 (i.e. 0b01 (1) and 0b11 (3)), falsy otherwise. + // i & 0b10 is truthy when i has value 0b1x (i.e. 0b10 (2) and 0b11 (3)), falsy otherwise. + `${i & 0b01 ? '--env-file' : '--env-file-if-exists'}=${nodeOptionsEnvFilePath}`, + `${i & 0b10 ? '--env-file' : '--env-file-if-exists'}=${validEnvFilePath}`, + '--eval', code, + ], + { cwd: __dirname }, + ))); + assert.deepStrictEqual(children, Array.from({ length: 4 }, () => ({ + code: 0, + signal: null, + stdout: '', + stderr: '', + }))); + }); + + it('supports absolute paths', async () => { + const code = ` + require('assert').strictEqual(process.env.BASIC, 'basic'); + `.trim(); const child = await common.spawnPromisified( process.execPath, - [ `--env-file=${nodeOptionsEnvFilePath}`, `--env-file=${validEnvFilePath}`, '--eval', code ], - { cwd: __dirname }, + [ `--env-file=${path.resolve(__dirname, validEnvFilePath)}`, '--eval', code ], ); assert.strictEqual(child.stderr, ''); assert.strictEqual(child.code, 0); }); - it('supports absolute paths', async () => { + it('supports a space instead of \'=\' for the flag ', async () => { const code = ` require('assert').strictEqual(process.env.BASIC, 'basic'); `.trim(); const child = await common.spawnPromisified( process.execPath, - [ `--env-file=${path.resolve(__dirname, validEnvFilePath)}`, '--eval', code ], + [ '--env-file', validEnvFilePath, '--eval', code ], + { cwd: __dirname }, ); assert.strictEqual(child.stderr, ''); assert.strictEqual(child.code, 0); @@ -48,10 +73,23 @@ describe('.env supports edge cases', () => { [ '--env-file=.env', '--eval', code ], { cwd: __dirname }, ); - assert.notStrictEqual(child.stderr.toString(), ''); + assert.notStrictEqual(child.stderr, ''); assert.strictEqual(child.code, 9); }); + it('should handle non-existent optional .env file', async () => { + const code = ` + require('assert').strictEqual(1,1); + `.trim(); + const child = await common.spawnPromisified( + process.execPath, + ['--env-file-if-exists=.env', '--eval', code], + { cwd: __dirname }, + ); + assert.notStrictEqual(child.stderr, ''); + assert.strictEqual(child.code, 0); + }); + it('should not override existing environment variables but introduce new vars', async () => { const code = ` require('assert').strictEqual(process.env.BASIC, 'existing'); @@ -98,4 +136,50 @@ describe('.env supports edge cases', () => { assert.strictEqual(child.stderr, ''); assert.strictEqual(child.code, 0); }); + + it('should handle when --env-file is passed along with --', async () => { + const child = await common.spawnPromisified( + process.execPath, + [ + '--eval', 'assert.strictEqual(process.env.BASIC, undefined);', + '--', '--env-file', validEnvFilePath, + ], + { cwd: __dirname }, + ); + assert.strictEqual(child.stdout, ''); + assert.strictEqual(child.stderr, ''); + assert.strictEqual(child.code, 0); + }); + + it('should handle file without a final newline', async () => { + const code = ` + require('assert').strictEqual(process.env.BASIC, 'basic'); + `.trim(); + const child = await common.spawnPromisified( + process.execPath, + [ `--env-file=${path.resolve(__dirname, noFinalNewlineEnvFilePath)}`, '--eval', code ], + ); + + const SingleQuotesChild = await common.spawnPromisified( + process.execPath, + [ `--env-file=${path.resolve(__dirname, noFinalNewlineSingleQuotesEnvFilePath)}`, '--eval', code ], + ); + + assert.strictEqual(child.stderr, ''); + assert.strictEqual(child.code, 0); + assert.strictEqual(SingleQuotesChild.stderr, ''); + assert.strictEqual(SingleQuotesChild.code, 0); + }); + + it('should reject invalid env file flag', async () => { + const child = await common.spawnPromisified( + process.execPath, + ['--env-file-ABCD', validEnvFilePath], + { cwd: __dirname }, + ); + + assert.strictEqual(child.stdout, ''); + assert.strictEqual(child.code, 9); + assert.match(child.stderr, /bad option: --env-file-ABCD/); + }); }); diff --git a/test/parallel/test-esm-loader-hooks-inspect-brk.js b/test/parallel/test-esm-loader-hooks-inspect-brk.js index 881bdfd2dd101a..251ebb230dcd31 100644 --- a/test/parallel/test-esm-loader-hooks-inspect-brk.js +++ b/test/parallel/test-esm-loader-hooks-inspect-brk.js @@ -10,23 +10,20 @@ const assert = require('assert'); const fixtures = require('../common/fixtures'); const { NodeInstance } = require('../common/inspector-helper.js'); -async function runIfWaitingForDebugger(session) { - const commands = [ - { 'method': 'Runtime.enable' }, - { 'method': 'Debugger.enable' }, - { 'method': 'Runtime.runIfWaitingForDebugger' }, - ]; - - await session.send(commands); - await session.waitForNotification('Debugger.paused'); -} - async function runTest() { const main = fixtures.path('es-module-loaders', 'register-loader.mjs'); const child = new NodeInstance(['--inspect-brk=0'], '', main); const session = await child.connectInspectorSession(); - await runIfWaitingForDebugger(session); + await session.send({ method: 'NodeRuntime.enable' }); + await session.waitForNotification('NodeRuntime.waitingForDebugger'); + await session.send([ + { 'method': 'Runtime.enable' }, + { 'method': 'Debugger.enable' }, + { 'method': 'Runtime.runIfWaitingForDebugger' }, + ]); + await session.send({ method: 'NodeRuntime.disable' }); + await session.waitForNotification('Debugger.paused'); await session.runToCompletion(); assert.strictEqual((await child.expectShutdown()).exitCode, 0); } diff --git a/test/parallel/test-global-setters.js b/test/parallel/test-global-setters.js index 7fd070ed8e1c4e..3117118563a78d 100644 --- a/test/parallel/test-global-setters.js +++ b/test/parallel/test-global-setters.js @@ -1,4 +1,10 @@ -/* eslint-disable strict */ +// When setters and getters were added for global.process and global.Buffer to +// create a deprecation path for them in ESM, this test was added to make sure +// the setters and getters behaved as expected. +// Ref: https://github.com/nodejs/node/pull/26882 +// Ref: https://github.com/nodejs/node/pull/26334 + +'use strict'; require('../common'); const assert = require('assert'); const _process = require('process'); diff --git a/test/parallel/test-http-multiple-headers.js b/test/parallel/test-http-multiple-headers.js index b83360edca2c4f..f9c654ba2f8730 100644 --- a/test/parallel/test-http-multiple-headers.js +++ b/test/parallel/test-http-multiple-headers.js @@ -1,6 +1,5 @@ 'use strict'; -// TODO@PI: Run all tests const common = require('../common'); const assert = require('assert'); const { createServer, request } = require('http'); diff --git a/test/parallel/test-http-outgoing-destroyed.js b/test/parallel/test-http-outgoing-destroyed.js index 2dd3d76fde7d40..4f8fd47eaa8222 100644 --- a/test/parallel/test-http-outgoing-destroyed.js +++ b/test/parallel/test-http-outgoing-destroyed.js @@ -51,5 +51,27 @@ const assert = require('assert'); .on('error', common.mustCall()) .write('asd'); }); +} +{ + const server = http.createServer(common.mustCall((req, res) => { + assert.strictEqual(res.closed, false); + res.end(); + res.destroy(); + // Make sure not to emit 'error' after .destroy(). + res.end('asd'); + assert.strictEqual(res.errored, undefined); + })).listen(0, () => { + http + .request({ + port: server.address().port, + method: 'GET' + }) + .on('response', common.mustCall((res) => { + res.resume().on('end', common.mustCall(() => { + server.close(); + })); + })) + .end(); + }); } diff --git a/test/parallel/test-http-server-headers-timeout-delayed-headers.js b/test/parallel/test-http-server-headers-timeout-delayed-headers.js index af4a5df4b7f530..652969ae324cdf 100644 --- a/test/parallel/test-http-server-headers-timeout-delayed-headers.js +++ b/test/parallel/test-http-server-headers-timeout-delayed-headers.js @@ -38,25 +38,29 @@ server.listen(0, common.mustCall(() => { response += chunk; })); - const errOrEnd = common.mustSucceed(function(err) { + client.on('error', () => { + // Ignore errors like 'write EPIPE' that might occur while the request is + // sent. + }); + + client.on('close', common.mustCall(() => { assert.strictEqual( response, 'HTTP/1.1 408 Request Timeout\r\nConnection: close\r\n\r\n' ); server.close(); - }); - - client.on('end', errOrEnd); - client.on('error', errOrEnd); + })); client.resume(); sendDelayedRequestHeaders = common.mustCall(() => { setTimeout(() => { - client.write('POST / HTTP/1.1\r\n'); - client.write('Content-Length: 20\r\n'); - client.write('Connection: close\r\n\r\n'); - client.write('12345678901234567890\r\n\r\n'); + client.write( + 'POST / HTTP/1.1\r\n' + + 'Content-Length: 20\r\n' + + 'Connection: close\r\n\r\n' + + '12345678901234567890\r\n\r\n' + ); }, common.platformTimeout(headersTimeout * 2)).unref(); }); })); diff --git a/test/parallel/test-http-server-headers-timeout-interrupted-headers.js b/test/parallel/test-http-server-headers-timeout-interrupted-headers.js index 9d25940ec65cd1..863057dc2819f5 100644 --- a/test/parallel/test-http-server-headers-timeout-interrupted-headers.js +++ b/test/parallel/test-http-server-headers-timeout-interrupted-headers.js @@ -38,21 +38,25 @@ server.listen(0, common.mustCall(() => { response += chunk; })); - const errOrEnd = common.mustSucceed(function(err) { + client.on('error', () => { + // Ignore errors like 'write EPIPE' that might occur while the request is + // sent. + }); + + client.on('close', common.mustCall(() => { assert.strictEqual( response, 'HTTP/1.1 408 Request Timeout\r\nConnection: close\r\n\r\n' ); server.close(); - }); - - client.on('end', errOrEnd); - client.on('error', errOrEnd); + })); client.resume(); - client.write('GET / HTTP/1.1\r\n'); - client.write('Connection: close\r\n'); - client.write('X-CRASH: '); + client.write( + 'GET / HTTP/1.1\r\n' + + 'Connection: close\r\n' + + 'X-CRASH: ' + ); sendDelayedRequestHeaders = common.mustCall(() => { setTimeout(() => { diff --git a/test/parallel/test-http-server-request-timeout-delayed-body.js b/test/parallel/test-http-server-request-timeout-delayed-body.js index fdfbbb2f4cb4e8..2bc6b55a6fcb76 100644 --- a/test/parallel/test-http-server-request-timeout-delayed-body.js +++ b/test/parallel/test-http-server-request-timeout-delayed-body.js @@ -45,27 +45,30 @@ server.listen(0, common.mustCall(() => { response += chunk; })); - client.resume(); - client.write('POST / HTTP/1.1\r\n'); - client.write('Host: example.com\r\n'); - client.write('Content-Length: 20\r\n'); - client.write('Connection: close\r\n'); - client.write('\r\n'); - - sendDelayedRequestBody = common.mustCall(() => { - setTimeout(() => { - client.write('12345678901234567890\r\n\r\n'); - }, common.platformTimeout(requestTimeout * 2)).unref(); + client.on('error', () => { + // Ignore errors like 'write EPIPE' that might occur while the request is + // sent. }); - const errOrEnd = common.mustSucceed(function(err) { + client.on('close', common.mustCall(() => { assert.strictEqual( response, 'HTTP/1.1 408 Request Timeout\r\nConnection: close\r\n\r\n' ); server.close(); - }); + })); - client.on('end', errOrEnd); - client.on('error', errOrEnd); + client.resume(); + client.write( + 'POST / HTTP/1.1\r\n' + + 'Host: example.com\r\n' + + 'Content-Length: 20\r\n' + + 'Connection: close\r\n\r\n' + ); + + sendDelayedRequestBody = common.mustCall(() => { + setTimeout(() => { + client.write('12345678901234567890\r\n\r\n'); + }, common.platformTimeout(requestTimeout * 2)).unref(); + }); })); diff --git a/test/parallel/test-http-server-request-timeout-delayed-headers.js b/test/parallel/test-http-server-request-timeout-delayed-headers.js index 304a78b96a77d3..e0d4945ec927e1 100644 --- a/test/parallel/test-http-server-request-timeout-delayed-headers.js +++ b/test/parallel/test-http-server-request-timeout-delayed-headers.js @@ -33,25 +33,29 @@ server.listen(0, common.mustCall(() => { response += chunk; })); - const errOrEnd = common.mustSucceed(function(err) { + client.on('error', () => { + // Ignore errors like 'write EPIPE' that might occur while the request is + // sent. + }); + + client.on('close', common.mustCall(() => { assert.strictEqual( response, 'HTTP/1.1 408 Request Timeout\r\nConnection: close\r\n\r\n' ); server.close(); - }); - - client.on('end', errOrEnd); - client.on('error', errOrEnd); + })); client.resume(); sendDelayedRequestHeaders = common.mustCall(() => { setTimeout(() => { - client.write('POST / HTTP/1.1\r\n'); - client.write('Content-Length: 20\r\n'); - client.write('Connection: close\r\n\r\n'); - client.write('12345678901234567890\r\n\r\n'); + client.write( + 'POST / HTTP/1.1\r\n' + + 'Content-Length: 20\r\n' + + 'Connection: close\r\n\r\n' + + '12345678901234567890\r\n\r\n' + ); }, common.platformTimeout(requestTimeout * 2)).unref(); }); })); diff --git a/test/parallel/test-http-server-request-timeout-interrupted-body.js b/test/parallel/test-http-server-request-timeout-interrupted-body.js index 82c2f3171736a6..97e0a21d53d747 100644 --- a/test/parallel/test-http-server-request-timeout-interrupted-body.js +++ b/test/parallel/test-http-server-request-timeout-interrupted-body.js @@ -45,24 +45,27 @@ server.listen(0, common.mustCall(() => { response += chunk; })); - const errOrEnd = common.mustSucceed(function(err) { + client.on('error', () => { + // Ignore errors like 'write EPIPE' that might occur while the request is + // sent. + }); + + client.on('close', common.mustCall(() => { assert.strictEqual( response, 'HTTP/1.1 408 Request Timeout\r\nConnection: close\r\n\r\n' ); server.close(); - }); - - client.on('error', errOrEnd); - client.on('end', errOrEnd); + })); client.resume(); - client.write('POST / HTTP/1.1\r\n'); - client.write('Host: example.com\r\n'); - client.write('Content-Length: 20\r\n'); - client.write('Connection: close\r\n'); - client.write('\r\n'); - client.write('1234567890'); + client.write( + 'POST / HTTP/1.1\r\n' + + 'Host: example.com\r\n' + + 'Content-Length: 20\r\n' + + 'Connection: close\r\n\r\n' + + '1234567890' + ); sendDelayedRequestBody = common.mustCall(() => { setTimeout(() => { diff --git a/test/parallel/test-http-server-request-timeout-interrupted-headers.js b/test/parallel/test-http-server-request-timeout-interrupted-headers.js index eb9914dad1f56a..752156ed0ed9da 100644 --- a/test/parallel/test-http-server-request-timeout-interrupted-headers.js +++ b/test/parallel/test-http-server-request-timeout-interrupted-headers.js @@ -33,21 +33,25 @@ server.listen(0, common.mustCall(() => { response += chunk; })); - const errOrEnd = common.mustSucceed(function(err) { + client.on('error', () => { + // Ignore errors like 'write EPIPE' that might occur while the request is + // sent. + }); + + client.on('close', common.mustCall(() => { assert.strictEqual( response, 'HTTP/1.1 408 Request Timeout\r\nConnection: close\r\n\r\n' ); server.close(); - }); - - client.on('end', errOrEnd); - client.on('error', errOrEnd); + })); client.resume(); - client.write('GET / HTTP/1.1\r\n'); - client.write('Connection: close\r\n'); - client.write('X-CRASH: '); + client.write( + 'GET / HTTP/1.1\r\n' + + 'Connection: close\r\n' + + 'X-CRASH: ' + ); sendDelayedRequestHeaders = common.mustCall(() => { setTimeout(() => { diff --git a/test/parallel/test-http2-ip-address-host.js b/test/parallel/test-http2-ip-address-host.js new file mode 100644 index 00000000000000..b6f882dd22d1cb --- /dev/null +++ b/test/parallel/test-http2-ip-address-host.js @@ -0,0 +1,53 @@ +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) { common.skip('missing crypto'); } +const assert = require('assert'); +const fixtures = require('../common/fixtures'); +const h2 = require('http2'); + +function loadKey(keyname) { + return fixtures.readKey(keyname, 'binary'); +} + +const key = loadKey('agent8-key.pem'); +const cert = fixtures.readKey('agent8-cert.pem'); + +const server = h2.createSecureServer({ key, cert }); +const hasIPv6 = common.hasIPv6; +const testCount = hasIPv6 ? 2 : 1; + +server.on('stream', common.mustCall((stream) => { + const session = stream.session; + assert.strictEqual(session.servername, undefined); + stream.respond({ 'content-type': 'application/json' }); + stream.end(JSON.stringify({ + servername: session.servername, + originSet: session.originSet + }) + ); +}, testCount)); + +let done = 0; + +server.listen(0, common.mustCall(() => { + function handleRequest(url) { + const client = h2.connect(url, + { rejectUnauthorized: false }); + const req = client.request(); + let data = ''; + req.setEncoding('utf8'); + req.on('data', (d) => data += d); + req.on('end', common.mustCall(() => { + const originSet = req.session.originSet; + assert.strictEqual(originSet[0], url); + client.close(); + if (++done === testCount) server.close(); + })); + } + + const ipv4Url = `https://127.0.0.1:${server.address().port}`; + const ipv6Url = `https://[::1]:${server.address().port}`; + handleRequest(ipv4Url); + if (hasIPv6) handleRequest(ipv6Url); +})); diff --git a/test/parallel/test-icu-env.js b/test/parallel/test-icu-env.js index 45b9fea8dbd8c8..7a153d41beae5a 100644 --- a/test/parallel/test-icu-env.js +++ b/test/parallel/test-icu-env.js @@ -127,7 +127,7 @@ if (isMockable) { '25/7/1980, 1:35:33 am', '25/7/1980, 1:35:33', '25/07/1980 01:35:33', - '٢٥‏/٧‏/١٩٨٠، ١:٣٥:٣٣ ص', + '25‏/7‏/1980، 1:35:33 ص', '২৫/৭/১৯৮০, ১:৩৫:৩৩ AM', '25.07.1980, 01:35:33', '25/07/1980, 01:35:33', @@ -155,7 +155,7 @@ if (isMockable) { [ '7/25/1980', '1980/7/25', '25/7/1980', '25/7/1980', - '25/07/1980', '٢٥‏/٧‏/١٩٨٠', + '25/07/1980', '25‏/7‏/1980', '২৫/৭/১৯৮০', '25.07.1980', '25/07/1980', '25/7/1980', '25/7/1980', '25.7.1980', @@ -181,7 +181,7 @@ if (isMockable) { [ '275,760.913', '275,760.913', '2,75,760.913', '275.760,913', - '275 760,913', '٢٧٥٬٧٦٠٫٩١٣', + '275 760,913', '275,760.913', '২,৭৫,৭৬০.৯১৩', '275 760,913', '275.760,913', '275,760.913', '275.760,913', '275.760,913', @@ -206,7 +206,7 @@ if (isMockable) { '5,86,920.617 घंटे पहले', 'hace 586.920,617 horas', 'il y a 586 920,617 heures', - 'قبل ٥٨٦٬٩٢٠٫٦١٧ ساعة', + 'قبل 586,920.617 ساعة', '৫,৮৬,৯২০.৬১৭ ঘন্টা আগে', '586 920,617 часа назад', 'há 586.920,617 horas', diff --git a/test/parallel/test-internal-iterable-weak-map.js b/test/parallel/test-internal-iterable-weak-map.js deleted file mode 100644 index f2befe13da87f3..00000000000000 --- a/test/parallel/test-internal-iterable-weak-map.js +++ /dev/null @@ -1,101 +0,0 @@ -// Flags: --expose-gc --expose-internals -'use strict'; - -const common = require('../common'); -const { deepStrictEqual, strictEqual } = require('assert'); -const { IterableWeakMap } = require('internal/util/iterable_weak_map'); - -// Ensures iterating over the map does not rely on methods which can be -// mutated by users. -Reflect.getPrototypeOf(function*() {}).prototype.next = common.mustNotCall(); -Reflect.getPrototypeOf(new Set()[Symbol.iterator]()).next = - common.mustNotCall(); - -// It drops entry if a reference is no longer held. -{ - const wm = new IterableWeakMap(); - const _cache = { - moduleA: {}, - moduleB: {}, - moduleC: {}, - }; - wm.set(_cache.moduleA, 'hello'); - wm.set(_cache.moduleB, 'discard'); - wm.set(_cache.moduleC, 'goodbye'); - delete _cache.moduleB; - setImmediate(() => { - _cache; // eslint-disable-line no-unused-expressions - globalThis.gc(); - const values = [...wm]; - deepStrictEqual(values, ['hello', 'goodbye']); - }); -} - -// It updates an existing entry, if the same key is provided twice. -{ - const wm = new IterableWeakMap(); - const _cache = { - moduleA: {}, - moduleB: {}, - }; - wm.set(_cache.moduleA, 'hello'); - wm.set(_cache.moduleB, 'goodbye'); - wm.set(_cache.moduleB, 'goodnight'); - const values = [...wm]; - deepStrictEqual(values, ['hello', 'goodnight']); -} - -// It allows entry to be deleted by key. -{ - const wm = new IterableWeakMap(); - const _cache = { - moduleA: {}, - moduleB: {}, - moduleC: {}, - }; - wm.set(_cache.moduleA, 'hello'); - wm.set(_cache.moduleB, 'discard'); - wm.set(_cache.moduleC, 'goodbye'); - wm.delete(_cache.moduleB); - const values = [...wm]; - deepStrictEqual(values, ['hello', 'goodbye']); -} - -// It handles delete for key that does not exist. -{ - const wm = new IterableWeakMap(); - const _cache = { - moduleA: {}, - moduleB: {}, - moduleC: {}, - }; - wm.set(_cache.moduleA, 'hello'); - wm.set(_cache.moduleC, 'goodbye'); - wm.delete(_cache.moduleB); - const values = [...wm]; - deepStrictEqual(values, ['hello', 'goodbye']); -} - -// It allows an entry to be fetched by key. -{ - const wm = new IterableWeakMap(); - const _cache = { - moduleA: {}, - moduleB: {}, - moduleC: {}, - }; - wm.set(_cache.moduleA, 'hello'); - wm.set(_cache.moduleB, 'discard'); - wm.set(_cache.moduleC, 'goodbye'); - strictEqual(wm.get(_cache.moduleB), 'discard'); -} - -// It returns true for has() if key exists. -{ - const wm = new IterableWeakMap(); - const _cache = { - moduleA: {}, - }; - wm.set(_cache.moduleA, 'hello'); - strictEqual(wm.has(_cache.moduleA), true); -} diff --git a/test/parallel/test-internal-module-wrap.js b/test/parallel/test-internal-module-wrap.js index 520a83a3a47c0e..3839338bc2da98 100644 --- a/test/parallel/test-internal-module-wrap.js +++ b/test/parallel/test-internal-module-wrap.js @@ -5,23 +5,21 @@ const assert = require('assert'); const { internalBinding } = require('internal/test/binding'); const { ModuleWrap } = internalBinding('module_wrap'); -const { getPromiseDetails, isPromise } = internalBinding('util'); -const setTimeoutAsync = require('util').promisify(setTimeout); const foo = new ModuleWrap('foo', undefined, 'export * from "bar";', 0, 0); const bar = new ModuleWrap('bar', undefined, 'export const five = 5', 0, 0); (async () => { - const promises = foo.link(() => setTimeoutAsync(1000).then(() => bar)); - assert.strictEqual(promises.length, 1); - assert(isPromise(promises[0])); - - await Promise.all(promises); - - assert.strictEqual(getPromiseDetails(promises[0])[1], bar); + const moduleRequests = foo.getModuleRequests(); + assert.strictEqual(moduleRequests.length, 1); + assert.strictEqual(moduleRequests[0].specifier, 'bar'); + foo.link(['bar'], [bar]); foo.instantiate(); assert.strictEqual(await foo.evaluate(-1, false), undefined); assert.strictEqual(foo.getNamespace().five, 5); + + // Check that the module requests are the same after linking, instantiate, and evaluation. + assert.deepStrictEqual(moduleRequests, foo.getModuleRequests()); })().then(common.mustCall()); diff --git a/test/parallel/test-module-create-require-multibyte.js b/test/parallel/test-module-create-require-multibyte.js new file mode 100644 index 00000000000000..f9c4b6345dc59e --- /dev/null +++ b/test/parallel/test-module-create-require-multibyte.js @@ -0,0 +1,24 @@ +'use strict'; + +require('../common'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); + +// This test ensures that the module can be resolved +// even if the path given to createRequire contains multibyte characters. + +const { createRequire } = require('module'); + +{ + const u = fixtures.fileURL('あ.js'); + + const reqToo = createRequire(u); + assert.deepStrictEqual(reqToo('./experimental'), { ofLife: 42 }); +} + +{ + const u = fixtures.fileURL('copy/utf/新建文件夹/index.js'); + + const reqToo = createRequire(u); + assert.deepStrictEqual(reqToo('./experimental'), { ofLife: 42 }); +} diff --git a/test/parallel/test-node-output-errors.mjs b/test/parallel/test-node-output-errors.mjs index 84f20a77dda367..6f36dbeb15b869 100644 --- a/test/parallel/test-node-output-errors.mjs +++ b/test/parallel/test-node-output-errors.mjs @@ -60,6 +60,8 @@ describe('errors output', { concurrency: true }, () => { { name: 'errors/if-error-has-good-stack.js', transform: errTransform }, { name: 'errors/throw_custom_error.js', transform: errTransform }, { name: 'errors/throw_error_with_getter_throw.js', transform: errTransform }, + { name: 'errors/throw_in_eval_anonymous.js', transform: errTransform }, + { name: 'errors/throw_in_eval_named.js', transform: errTransform }, { name: 'errors/throw_in_line_with_tabs.js', transform: errTransform }, { name: 'errors/throw_non_error.js', transform: errTransform }, { name: 'errors/throw_null.js', transform: errTransform }, diff --git a/test/parallel/test-node-output-eval.mjs b/test/parallel/test-node-output-eval.mjs new file mode 100644 index 00000000000000..2fa60206e1ea1c --- /dev/null +++ b/test/parallel/test-node-output-eval.mjs @@ -0,0 +1,34 @@ +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import * as snapshot from '../common/assertSnapshot.js'; +import { describe, it } from 'node:test'; + +describe('eval output', { concurrency: true }, () => { + function normalize(str) { + return str.replaceAll(snapshot.replaceWindowsPaths(process.cwd()), '') + .replaceAll(/\d+:\d+/g, '*:*'); + } + + const defaultTransform = snapshot.transform( + removeStackTraces, + normalize, + snapshot.replaceWindowsLineEndings, + snapshot.replaceWindowsPaths, + snapshot.replaceNodeVersion + ); + + function removeStackTraces(output) { + return output.replaceAll(/^ *at .+$/gm, ''); + } + + const tests = [ + { name: 'eval/eval_messages.js' }, + { name: 'eval/stdin_messages.js' }, + ]; + + for (const { name } of tests) { + it(name, async () => { + await snapshot.spawnAndAssert(fixtures.path(name), defaultTransform); + }); + } +}); diff --git a/test/parallel/test-process-features.js b/test/parallel/test-process-features.js index 3b4677c5617fa0..56245c0af5482f 100644 --- a/test/parallel/test-process-features.js +++ b/test/parallel/test-process-features.js @@ -10,6 +10,7 @@ assert.deepStrictEqual(keys, new Set([ 'debug', 'uv', 'ipv6', + 'require_module', 'tls_alpn', 'tls_sni', 'tls_ocsp', diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js index 98dbda9ee8f20b..edf475d106e31e 100644 --- a/test/parallel/test-process-versions.js +++ b/test/parallel/test-process-versions.js @@ -21,7 +21,6 @@ const expected_keys = [ 'simdutf', 'ada', 'cjs_module_lexer', - 'base64', ]; const hasUndici = process.config.variables.node_builtin_shareable_builtins.includes('deps/undici/undici.js'); diff --git a/test/parallel/test-require-mjs.js b/test/parallel/test-require-mjs.js index 112f08879d4290..c169ec07ab6bd8 100644 --- a/test/parallel/test-require-mjs.js +++ b/test/parallel/test-require-mjs.js @@ -1,3 +1,8 @@ +// Flags: --no-experimental-require-module +// Previously, this tested that require(esm) throws ERR_REQUIRE_ESM, which is no longer applicable +// since require(esm) is now supported. The test has been repurposed to ensure that the old behavior +// is preserved when the --no-experimental-require-module flag is used. + 'use strict'; require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-require-resolve-opts-paths-relative.js b/test/parallel/test-require-resolve-opts-paths-relative.js new file mode 100644 index 00000000000000..13d17d478b753d --- /dev/null +++ b/test/parallel/test-require-resolve-opts-paths-relative.js @@ -0,0 +1,44 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fixtures = require('../common/fixtures'); +const { isMainThread } = require('worker_threads'); + +if (!isMainThread) + common.skip('process.chdir is not available in Workers'); + +const subdir = fixtures.path('module-require', 'relative', 'subdir'); + +process.chdir(subdir); + +// Parent directory paths (`..`) work as intended +{ + assert(require.resolve('.', { paths: ['../'] }).endsWith('index.js')); + assert(require.resolve('./index.js', { paths: ['../'] }).endsWith('index.js')); + + // paths: [".."] should resolve like paths: ["../"] + assert(require.resolve('.', { paths: ['..'] }).endsWith('index.js')); + assert(require.resolve('./index.js', { paths: ['..'] }).endsWith('index.js')); +} + +process.chdir('..'); + +// Current directory paths (`.`) work as intended +{ + assert(require.resolve('.', { paths: ['.'] }).endsWith('index.js')); + assert(require.resolve('./index.js', { paths: ['./'] }).endsWith('index.js')); + + // paths: ["."] should resolve like paths: ["../"] + assert(require.resolve('.', { paths: ['.'] }).endsWith('index.js')); + assert(require.resolve('./index.js', { paths: ['.'] }).endsWith('index.js')); +} + +// Sub directory paths work as intended +{ + // assert.deepStrictEqual(fs.readdirSync('./subdir'), [5]); + assert(require.resolve('./relative-subdir.js', { paths: ['./subdir'] }).endsWith('relative-subdir.js')); + + // paths: ["subdir"] should resolve like paths: ["./subdir"] + assert(require.resolve('./relative-subdir.js', { paths: ['subdir'] }).endsWith('relative-subdir.js')); +} diff --git a/test/parallel/test-runner-module-mocking.js b/test/parallel/test-runner-module-mocking.js index 1906903dfac868..1b19ce49657ad6 100644 --- a/test/parallel/test-runner-module-mocking.js +++ b/test/parallel/test-runner-module-mocking.js @@ -338,7 +338,7 @@ test('ESM mocking with namedExports option', async (t) => { assert.strictEqual(mocked.default, 'mock default'); assert.strictEqual(mocked.val1, 'mock value'); t.mock.reset(); - assert.strictEqual(original, require(fixture)); + common.expectRequiredModule(require(fixture), original); }); await t.test('throws if named exports cannot be applied to defaultExport as CJS', async (t) => { diff --git a/test/parallel/test-set-http-max-http-headers.js b/test/parallel/test-set-http-max-http-headers.js index c4df779d2bd4fa..01061a0916595c 100644 --- a/test/parallel/test-set-http-max-http-headers.js +++ b/test/parallel/test-set-http-max-http-headers.js @@ -4,17 +4,10 @@ const common = require('../common'); const assert = require('assert'); const { spawn } = require('child_process'); const path = require('path'); +const { suite, test } = require('node:test'); const testName = path.join(__dirname, 'test-http-max-http-headers.js'); -const timeout = common.platformTimeout(100); - -const tests = []; - -function test(fn) { - tests.push(fn); -} - -test(function(cb) { +test(function(_, cb) { console.log('running subtest expecting failure'); // Validate that the test fails if the max header size is too small. @@ -30,7 +23,7 @@ test(function(cb) { })); }); -test(function(cb) { +test(function(_, cb) { console.log('running subtest expecting success'); const env = Object.assign({}, process.env, { @@ -54,13 +47,13 @@ test(function(cb) { })); }); -// Next, repeat the same checks using NODE_OPTIONS if it is supported. -if (!process.config.variables.node_without_node_options) { +const skip = process.config.variables.node_without_node_options; +suite('same checks using NODE_OPTIONS if it is supported', { skip }, () => { const env = Object.assign({}, process.env, { NODE_OPTIONS: '--max-http-header-size=1024' }); - test(function(cb) { + test(function(_, cb) { console.log('running subtest expecting failure'); // Validate that the test fails if the max header size is too small. @@ -74,7 +67,7 @@ if (!process.config.variables.node_without_node_options) { })); }); - test(function(cb) { + test(function(_, cb) { // Validate that the test now passes if the same limit is large enough. const args = ['--expose-internals', testName, '1024']; const cp = spawn(process.execPath, args, { env, stdio: 'inherit' }); @@ -85,18 +78,4 @@ if (!process.config.variables.node_without_node_options) { cb(); })); }); -} - -function runTest() { - const fn = tests.shift(); - - if (!fn) { - return; - } - - fn(() => { - setTimeout(runTest, timeout); - }); -} - -runTest(); +}); diff --git a/test/parallel/test-source-map-cjs-require-cache.js b/test/parallel/test-source-map-cjs-require-cache.js new file mode 100644 index 00000000000000..155b7a66efab1b --- /dev/null +++ b/test/parallel/test-source-map-cjs-require-cache.js @@ -0,0 +1,37 @@ +// Flags: --enable-source-maps --max-old-space-size=10 --expose-gc + +/** + * This test verifies that the source map of a CJS module is cleared after the + * CJS module is reclaimed by GC. + */ + +'use strict'; +require('../common'); +const { gcUntil } = require('../common/gc'); +const assert = require('node:assert'); +const { findSourceMap } = require('node:module'); + +const moduleId = require.resolve('../fixtures/source-map/no-throw.js'); +const moduleIdRepeat = require.resolve('../fixtures/source-map/no-throw2.js'); + +function run(moduleId) { + require(moduleId); + delete require.cache[moduleId]; + const idx = module.children.findIndex((child) => child.id === moduleId); + assert.ok(idx >= 0); + module.children.splice(idx, 1); + + // Verify that the source map is still available + assert.notStrictEqual(findSourceMap(moduleId), undefined); +} + +// Run the test in a function scope so that every variable can be reclaimed by GC. +run(moduleId); + +// Run until the source map is cleared by GC, or fail the test after determined iterations. +gcUntil('SourceMap of deleted CJS module is cleared', () => { + // Repetitively load a second module with --max-old-space-size=10 to make GC more aggressive. + run(moduleIdRepeat); + // Verify that the source map is cleared. + return findSourceMap(moduleId) == null; +}); diff --git a/test/parallel/test-stream-compose.js b/test/parallel/test-stream-compose.js index 1ff8c39b7a2234..d7a54e177668a2 100644 --- a/test/parallel/test-stream-compose.js +++ b/test/parallel/test-stream-compose.js @@ -1,5 +1,3 @@ -// Flags: --expose-internals - 'use strict'; const common = require('../common'); @@ -9,9 +7,9 @@ const { Transform, Writable, finished, + compose, PassThrough } = require('stream'); -const compose = require('internal/streams/compose'); const assert = require('assert'); { diff --git a/test/parallel/test-tls-psk-circuit.js b/test/parallel/test-tls-psk-circuit.js index e93db3eb1b4923..c06e61c321ef67 100644 --- a/test/parallel/test-tls-psk-circuit.js +++ b/test/parallel/test-tls-psk-circuit.js @@ -66,7 +66,8 @@ const expectedHandshakeErr = common.hasOpenSSL(3, 2) ? 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'; test({ psk: USERS.UserB, identity: 'UserC' }, {}, expectedHandshakeErr); // Recognized user but incorrect secret should fail handshake -const expectedIllegalParameterErr = common.hasOpenSSL(3, 2) ? - 'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER' : 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER'; +const expectedIllegalParameterErr = common.hasOpenSSL(3, 4) ? 'ERR_SSL_TLSV1_ALERT_DECRYPT_ERROR' : + common.hasOpenSSL(3, 2) ? + 'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER' : 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER'; test({ psk: USERS.UserA, identity: 'UserB' }, {}, expectedIllegalParameterErr); test({ psk: USERS.UserB, identity: 'UserB' }); diff --git a/test/parallel/test-worker-messaging-errors-handler.js b/test/parallel/test-worker-messaging-errors-handler.js new file mode 100644 index 00000000000000..c50c5e3bf160f7 --- /dev/null +++ b/test/parallel/test-worker-messaging-errors-handler.js @@ -0,0 +1,34 @@ +'use strict'; + +const common = require('../common'); +const { + parentPort, + postMessageToThread, + Worker, + workerData, +} = require('node:worker_threads'); +const { rejects } = require('node:assert'); + +async function test() { + const worker = new Worker(__filename, { workerData: { children: true } }); + + await rejects(common.mustCall(function() { + return postMessageToThread(worker.threadId); + }), { + name: 'Error', + code: 'ERR_WORKER_MESSAGING_ERRORED', + }); + + worker.postMessage('success'); +} + +if (!workerData?.children) { + test(); +} else { + process.on('workerMessage', () => { + throw new Error('KABOOM'); + }); + + parentPort.postMessage('ready'); + parentPort.once('message', common.mustCall()); +} diff --git a/test/parallel/test-worker-messaging-errors-invalid.js b/test/parallel/test-worker-messaging-errors-invalid.js new file mode 100644 index 00000000000000..48f8a3a444fe15 --- /dev/null +++ b/test/parallel/test-worker-messaging-errors-invalid.js @@ -0,0 +1,48 @@ +'use strict'; + +const common = require('../common'); +const { once } = require('node:events'); +const { + parentPort, + postMessageToThread, + threadId, + Worker, + workerData, +} = require('node:worker_threads'); +const { rejects } = require('node:assert'); + +async function test() { + await rejects(common.mustCall(function() { + return postMessageToThread(threadId); + }), { + name: 'Error', + code: 'ERR_WORKER_MESSAGING_SAME_THREAD', + }); + + await rejects(common.mustCall(function() { + return postMessageToThread(Date.now()); + }), { + name: 'Error', + code: 'ERR_WORKER_MESSAGING_FAILED', + }); + + // The delivery to the first worker will fail as there is no listener for `workerMessage` + const worker = new Worker(__filename, { workerData: { children: true } }); + await once(worker, 'message'); + + await rejects(common.mustCall(function() { + return postMessageToThread(worker.threadId); + }), { + name: 'Error', + code: 'ERR_WORKER_MESSAGING_FAILED', + }); + + worker.postMessage('success'); +} + +if (!workerData?.children) { + test(); +} else { + parentPort.postMessage('ready'); + parentPort.once('message', common.mustCall()); +} diff --git a/test/parallel/test-worker-messaging-errors-timeout.js b/test/parallel/test-worker-messaging-errors-timeout.js new file mode 100644 index 00000000000000..a46daa01e7e84e --- /dev/null +++ b/test/parallel/test-worker-messaging-errors-timeout.js @@ -0,0 +1,38 @@ +'use strict'; + +const common = require('../common'); +const { + postMessageToThread, + workerData, + Worker, +} = require('node:worker_threads'); +const { rejects } = require('node:assert'); + +const memory = new SharedArrayBuffer(4); + +async function test() { + const worker = new Worker(__filename, { workerData: { memory, children: true } }); + const array = new Int32Array(memory); + + await rejects(common.mustCall(function() { + return postMessageToThread(worker.threadId, 0, common.platformTimeout(500)); + }), { + name: 'Error', + code: 'ERR_WORKER_MESSAGING_TIMEOUT', + }); + + Atomics.store(array, 0, 1); + Atomics.notify(array, 0); +} + +if (!workerData?.children) { + test(); +} else { + process.on('beforeExit', common.mustCall()); + + const array = new Int32Array(workerData.memory); + + // Starve this thread waiting for the status to be unlocked. + // This happens in the main thread AFTER the timeout. + Atomics.wait(array, 0, 0); +} diff --git a/test/parallel/test-worker-messaging.js b/test/parallel/test-worker-messaging.js new file mode 100644 index 00000000000000..c155735f8c876a --- /dev/null +++ b/test/parallel/test-worker-messaging.js @@ -0,0 +1,112 @@ +'use strict'; + +const common = require('../common'); +const Countdown = require('../common/countdown'); +const { + parentPort, + postMessageToThread, + threadId, + workerData, + Worker, +} = require('node:worker_threads'); +const { strictEqual, deepStrictEqual } = require('node:assert'); +const { once } = require('node:events'); + +// Spawn threads on three levels: 1 main thread, two children, four grand childrens. 7 threads total, max id = 6 +const MAX_LEVEL = 2; +const MAX_THREAD = 6; + +// This is to allow the test to run in --worker mode +const mainThread = workerData?.mainThread ?? threadId; +const level = workerData?.level ?? 0; + +const channel = new BroadcastChannel('nodejs:test-worker-connection'); +let completed; + +if (level === 0) { + completed = new Countdown(MAX_THREAD + 1, () => { + channel.postMessage('exit'); + channel.close(); + }); +} + +async function createChildren() { + const worker = new Worker(__filename, { workerData: { mainThread, level: level + 1 } }); + await once(worker, 'message'); +} + +async function ping() { + let target; + do { + target = mainThread + Math.floor(Math.random() * MAX_THREAD); + } while (target === threadId); + + const { port1, port2 } = new MessageChannel(); + await postMessageToThread(target, { level, port: port2 }, [port2]); + + port1.on('message', common.mustCall(function(message) { + deepStrictEqual(message, { message: 'pong', source: target, destination: threadId }); + port1.close(); + + if (level === 0) { + completed.dec(); + } else { + channel.postMessage('end'); + } + })); + + port1.postMessage({ message: 'ping', source: threadId, destination: target }); +} + +// Do not use mustCall here as the thread might not receive any connection request +process.on('workerMessage', ({ port, level }, source) => { + // Let's verify the source hierarchy + // Given we do depth first, the level is 1 for thread 1 and 4, 2 for other threads + if (source !== mainThread) { + const currentThread = source - mainThread; + strictEqual(level, (currentThread === 1 || currentThread === 4) ? 1 : 2); + } else { + strictEqual(level, 0); + } + + // Verify communication + port.on('message', common.mustCall(function(message) { + deepStrictEqual(message, { message: 'ping', source, destination: threadId }); + port.postMessage({ message: 'pong', source: threadId, destination: source }); + port.close(); + })); +}); + +async function test() { + if (level < MAX_LEVEL) { + await createChildren(); + await createChildren(); + } + + channel.onmessage = function(message) { + switch (message.data) { + case 'start': + ping(); + break; + case 'end': + if (level === 0) { + completed.dec(); + } + break; + case 'exit': + channel.close(); + break; + } + }; + + if (level > 0) { + const currentThread = threadId - mainThread; + strictEqual(level, (currentThread === 1 || currentThread === 4) ? 1 : 2); + parentPort.postMessage({ type: 'ready', threadId }); + } else { + channel.postMessage('start'); + ping(); + } +} + +test(); diff --git a/test/parallel/test-zlib-const.js b/test/parallel/test-zlib-const.js index 342c8c712a475b..5b9a127f0eaa02 100644 --- a/test/parallel/test-zlib-const.js +++ b/test/parallel/test-zlib-const.js @@ -1,4 +1,4 @@ -/* eslint-disable strict */ +'use strict'; require('../common'); const assert = require('assert'); @@ -9,27 +9,17 @@ assert.strictEqual(zlib.constants.Z_OK, 0, 'Expected Z_OK to be 0;', `got ${zlib.constants.Z_OK}`, ].join(' ')); -zlib.constants.Z_OK = 1; -assert.strictEqual(zlib.constants.Z_OK, 0, - [ - 'Z_OK should be immutable.', - `Expected to get 0, got ${zlib.constants.Z_OK}`, - ].join(' ')); + +assert.throws(() => { zlib.constants.Z_OK = 1; }, + TypeError, 'zlib.constants.Z_OK should be immutable'); assert.strictEqual(zlib.codes.Z_OK, 0, `Expected Z_OK to be 0; got ${zlib.codes.Z_OK}`); -zlib.codes.Z_OK = 1; -assert.strictEqual(zlib.codes.Z_OK, 0, - [ - 'Z_OK should be immutable.', - `Expected to get 0, got ${zlib.codes.Z_OK}`, - ].join(' ')); -zlib.codes = { Z_OK: 1 }; -assert.strictEqual(zlib.codes.Z_OK, 0, - [ - 'Z_OK should be immutable.', - `Expected to get 0, got ${zlib.codes.Z_OK}`, - ].join(' ')); +assert.throws(() => { zlib.codes.Z_OK = 1; }, + TypeError, 'zlib.codes.Z_OK should be immutable'); + +assert.throws(() => { zlib.codes = { Z_OK: 1 }; }, + TypeError, 'zlib.codes should be immutable'); assert.ok(Object.isFrozen(zlib.codes), [ diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status index dd2275ddc95404..a3199b385dd99d 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -32,6 +32,7 @@ test-single-executable-application-empty: PASS, FLAKY test-http-server-request-timeouts-mixed: PASS, FLAKY [$system==solaris] # Also applies to SmartOS +test-worker-prof: PASS, FLAKY [$system==freebsd] @@ -51,7 +52,3 @@ test-tls-securepair-client: PASS, FLAKY [$arch==arm] # https://github.com/nodejs/node/issues/49933 test-watch-mode-inspect: SKIP - -[$arch==s390x] -# https://github.com/nodejs/node/issues/41286 -test-performance-eventloopdelay: PASS, FLAKY diff --git a/test/sequential/test-performance-eventloopdelay.js b/test/sequential/test-performance-eventloopdelay.js index 24e5744118cc38..9429acb7039400 100644 --- a/test/sequential/test-performance-eventloopdelay.js +++ b/test/sequential/test-performance-eventloopdelay.js @@ -3,6 +3,7 @@ const common = require('../common'); const assert = require('assert'); +const os = require('os'); const { monitorEventLoopDelay } = require('perf_hooks'); @@ -51,9 +52,13 @@ const { sleep } = require('internal/util'); } { + const s390x = os.arch() === 's390x'; const histogram = monitorEventLoopDelay({ resolution: 1 }); histogram.enable(); let m = 5; + if (s390x) { + m = m * 2; + } function spinAWhile() { sleep(1000); if (--m > 0) { diff --git a/test/test426/README.md b/test/test426/README.md new file mode 100644 index 00000000000000..edf4b3a95b8e96 --- /dev/null +++ b/test/test426/README.md @@ -0,0 +1,17 @@ +# test426 (Source Map Tests) + +The tests here are drivers for running the [Source Map Tests][]. This test +suite ensures that the Node.js source map implementation conforms to the +[Source Map Specification][] ([ECMA426][]). + +The [`test/fixtures/test426`](../fixtures/test426/) contains a copy of the set of +[Source Map Tests][] suite. The last updated hash is: + +* <https://github.com/tc39/source-map-tests/commit/cbed127c46330ff4b52525e73b9356e2ad3d6369> + +See the json files in [the `status` folder](./status) for prerequisites, +expected failures, and support status for specific tests. + +[ECMA426]: https://tc39.es/ecma426/ +[Source Map Specification]: https://github.com/tc39/ecma426 +[Source Map Tests]: https://github.com/tc39/source-map-tests diff --git a/test/test426/status/source-map-spec-tests.json b/test/test426/status/source-map-spec-tests.json new file mode 100644 index 00000000000000..967da8e59679af --- /dev/null +++ b/test/test426/status/source-map-spec-tests.json @@ -0,0 +1,14 @@ +{ + "sourceRootResolution": { + "testActions": { + "skip": "sourceRoot is not supported" + } + }, + "mappingSemanticsSingleFieldSegment": { + "testActions": { + "1": { + "skip": "Might be incorrect test" + } + } + } +} diff --git a/test/test426/test-source-map-spec.mjs b/test/test426/test-source-map-spec.mjs new file mode 100644 index 00000000000000..61b51305bf9a85 --- /dev/null +++ b/test/test426/test-source-map-spec.mjs @@ -0,0 +1,58 @@ +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; + +import assert from 'node:assert'; +import test from 'node:test'; +import { SourceMap } from 'node:module'; +import { readFileSync } from 'node:fs'; + +const specJson = fixtures.readSync('test426/source-map-spec-tests.json', 'utf8'); +const spec = JSON.parse(specJson); + +const kStatus = JSON.parse(readFileSync(new URL('./status/source-map-spec-tests.json', import.meta.url), 'utf8')); + +const kActionRunner = { + checkMapping, +}; + +spec.tests.forEach((testSpec) => { + const sourceMapJson = fixtures.readSync(['test426/resources', testSpec.sourceMapFile], 'utf8'); + const sourceMapPayload = JSON.parse(sourceMapJson); + + test(testSpec.name, async (t) => { + let sourceMap; + try { + sourceMap = new SourceMap(sourceMapPayload); + } catch { + // Be lenient with invalid source maps. Some source maps are invalid spec-wise, + // let's try the best to parse them. Maybe a strict parsing mode can be introduced + // for future-proof source map format. + assert.ok(!testSpec.sourceMapIsValid); + return; + } + assert.ok(sourceMap); + + const subtests = (testSpec.testActions ?? []).map((action, idx) => { + const testRunner = kActionRunner[action.actionType]; + const testName = `action#${idx} - ${action.actionType}`; + if (testRunner == null) { + return t.test(testName, { + todo: true, + }); + } + const skip = kStatus[testSpec.name]?.testActions?.skip || kStatus[testSpec.name]?.testActions?.[idx]?.skip; + return t.test(testName, { + skip, + }, testRunner.bind(null, sourceMap, action)); + }); + + await Promise.all(subtests); + }); +}); + +function checkMapping(sourceMap, action) { + const result = sourceMap.findEntry(action.generatedLine, action.generatedColumn); + assert.strictEqual(result.originalSource, action.originalSource); + assert.strictEqual(result.originalLine, action.originalLine); + assert.strictEqual(result.originalColumn, action.originalColumn); +} diff --git a/test/test426/testcfg.py b/test/test426/testcfg.py new file mode 100644 index 00000000000000..235311f0dddde8 --- /dev/null +++ b/test/test426/testcfg.py @@ -0,0 +1,6 @@ +import sys, os +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +import testpy + +def GetConfiguration(context, root): + return testpy.ParallelTestConfiguration(context, root, 'test426') diff --git a/tools/actions/create-release.sh b/tools/actions/create-release-proposal.sh similarity index 97% rename from tools/actions/create-release.sh rename to tools/actions/create-release-proposal.sh index 1392c4dd458476..cc5e8b5b7834fd 100755 --- a/tools/actions/create-release.sh +++ b/tools/actions/create-release-proposal.sh @@ -126,4 +126,4 @@ if (data.errors?.length) { console.log(util.inspect(data, { depth: Infinity })); EOF -gh pr edit "$PR_URL" --add-label release --add-assignee "$RELEASER" +gh pr edit "$PR_URL" --add-label release --add-label "v$RELEASE_LINE.x" --add-assignee "$RELEASER" diff --git a/tools/actions/lint-release-proposal-commit-list.mjs b/tools/actions/lint-release-proposal-commit-list.mjs new file mode 100755 index 00000000000000..13db27bfdc5e7a --- /dev/null +++ b/tools/actions/lint-release-proposal-commit-list.mjs @@ -0,0 +1,62 @@ +#!/usr/bin/env node + +// Takes a stream of JSON objects as inputs, validates the CHANGELOG contains a +// line corresponding, then outputs the prURL value. +// +// Example: +// $ git log upstream/vXX.x...upstream/vX.X.X-proposal \ +// --format='{"prURL":"%(trailers:key=PR-URL,valueonly,separator=)","title":"%s","smallSha":"%h"}' \ +// | ./lint-release-proposal-commit-list.mjs "path/to/CHANGELOG.md" "$(git rev-parse upstream/vX.X.X-proposal)" + +const [,, CHANGELOG_PATH, RELEASE_COMMIT_SHA] = process.argv; + +import assert from 'node:assert'; +import { readFile } from 'node:fs/promises'; +import { createInterface } from 'node:readline'; + +// Creating the iterator early to avoid missing any data: +const stdinLineByLine = createInterface(process.stdin)[Symbol.asyncIterator](); + +const changelog = await readFile(CHANGELOG_PATH, 'utf-8'); +const commitListingStart = changelog.indexOf('\n### Commits\n'); +const commitListingEnd = changelog.indexOf('\n\n<a', commitListingStart); +const commitList = changelog.slice(commitListingStart, commitListingEnd === -1 ? undefined : commitListingEnd + 1) + // Checking for semverness is too expansive, it is left as a exercice for human reviewers. + .replaceAll('**(SEMVER-MINOR)** ', '') + // Correct Markdown escaping is validated by the linter, getting rid of it here helps. + .replaceAll('\\', ''); + +let expectedNumberOfCommitsLeft = commitList.match(/\n\* \[/g).length; +for await (const line of stdinLineByLine) { + const { smallSha, title, prURL } = JSON.parse(line); + + if (smallSha === RELEASE_COMMIT_SHA.slice(0, 10)) { + assert.strictEqual( + expectedNumberOfCommitsLeft, 0, + 'Some commits are listed without being included in the proposal, or are listed more than once', + ); + continue; + } + + const lineStart = commitList.indexOf(`\n* [[\`${smallSha}\`]`); + assert.notStrictEqual(lineStart, -1, `Cannot find ${smallSha} on the list`); + const lineEnd = commitList.indexOf('\n', lineStart + 1); + + const colonIndex = title.indexOf(':'); + const expectedCommitTitle = `${`**${title.slice(0, colonIndex)}`.replace('**Revert "', '_**Revert**_ "**')}**${title.slice(colonIndex)}`; + try { + assert(commitList.lastIndexOf(`/${smallSha})] - ${expectedCommitTitle} (`, lineEnd) > lineStart, 'Commit title doesn\'t match'); + } catch (e) { + if (e?.code === 'ERR_ASSERTION') { + e.operator = 'includes'; + e.expected = expectedCommitTitle; + e.actual = commitList.slice(lineStart + 1, lineEnd); + } + throw e; + } + assert.strictEqual(commitList.slice(lineEnd - prURL.length - 2, lineEnd), `(${prURL})`, `when checking ${smallSha} ${title}`); + + expectedNumberOfCommitsLeft--; + console.log(prURL); +} +assert.strictEqual(expectedNumberOfCommitsLeft, 0, 'Release commit is not the last commit in the proposal'); diff --git a/tools/certdata.txt b/tools/certdata.txt index 110a814718cfd7..e0f60abcd6cf62 100644 --- a/tools/certdata.txt +++ b/tools/certdata.txt @@ -323,7 +323,10 @@ CKA_VALUE MULTILINE_OCTAL \174\136\232\166\351\131\220\305\174\203\065\021\145\121 END CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +# For Server Distrust After: Sat Nov 30 23:59:59 2024 +CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL +\062\064\061\061\063\060\062\063\065\071\065\071\132 +END CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE # Trust for "Entrust.net Premium 2048 Secure Server CA" @@ -627,7 +630,10 @@ CKA_VALUE MULTILINE_OCTAL \036\177\132\264\074 END CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +# For Server Distrust After: Sat Nov 30 23:59:59 2024 +CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL +\062\064\061\061\063\060\062\063\065\071\065\071\132 +END CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE # Trust for "Entrust Root Certification Authority" @@ -3808,140 +3814,6 @@ CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE -# -# Certificate "SecureSign RootCA11" -# -# Issuer: CN=SecureSign RootCA11,O="Japan Certification Services, Inc.",C=JP -# Serial Number: 1 (0x1) -# Subject: CN=SecureSign RootCA11,O="Japan Certification Services, Inc.",C=JP -# Not Valid Before: Wed Apr 08 04:56:47 2009 -# Not Valid After : Sun Apr 08 04:56:47 2029 -# Fingerprint (SHA-256): BF:0F:EE:FB:9E:3A:58:1A:D5:F9:E9:DB:75:89:98:57:43:D2:61:08:5C:4D:31:4F:6F:5D:72:59:AA:42:16:12 -# Fingerprint (SHA1): 3B:C4:9F:48:F8:F3:73:A0:9C:1E:BD:F8:5B:B1:C3:65:C7:D8:11:B3 -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "SecureSign RootCA11" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\130\061\013\060\011\006\003\125\004\006\023\002\112\120\061 -\053\060\051\006\003\125\004\012\023\042\112\141\160\141\156\040 -\103\145\162\164\151\146\151\143\141\164\151\157\156\040\123\145 -\162\166\151\143\145\163\054\040\111\156\143\056\061\034\060\032 -\006\003\125\004\003\023\023\123\145\143\165\162\145\123\151\147 -\156\040\122\157\157\164\103\101\061\061 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\130\061\013\060\011\006\003\125\004\006\023\002\112\120\061 -\053\060\051\006\003\125\004\012\023\042\112\141\160\141\156\040 -\103\145\162\164\151\146\151\143\141\164\151\157\156\040\123\145 -\162\166\151\143\145\163\054\040\111\156\143\056\061\034\060\032 -\006\003\125\004\003\023\023\123\145\143\165\162\145\123\151\147 -\156\040\122\157\157\164\103\101\061\061 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\001\001 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\003\155\060\202\002\125\240\003\002\001\002\002\001\001 -\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060 -\130\061\013\060\011\006\003\125\004\006\023\002\112\120\061\053 -\060\051\006\003\125\004\012\023\042\112\141\160\141\156\040\103 -\145\162\164\151\146\151\143\141\164\151\157\156\040\123\145\162 -\166\151\143\145\163\054\040\111\156\143\056\061\034\060\032\006 -\003\125\004\003\023\023\123\145\143\165\162\145\123\151\147\156 -\040\122\157\157\164\103\101\061\061\060\036\027\015\060\071\060 -\064\060\070\060\064\065\066\064\067\132\027\015\062\071\060\064 -\060\070\060\064\065\066\064\067\132\060\130\061\013\060\011\006 -\003\125\004\006\023\002\112\120\061\053\060\051\006\003\125\004 -\012\023\042\112\141\160\141\156\040\103\145\162\164\151\146\151 -\143\141\164\151\157\156\040\123\145\162\166\151\143\145\163\054 -\040\111\156\143\056\061\034\060\032\006\003\125\004\003\023\023 -\123\145\143\165\162\145\123\151\147\156\040\122\157\157\164\103 -\101\061\061\060\202\001\042\060\015\006\011\052\206\110\206\367 -\015\001\001\001\005\000\003\202\001\017\000\060\202\001\012\002 -\202\001\001\000\375\167\252\245\034\220\005\073\313\114\233\063 -\213\132\024\105\244\347\220\026\321\337\127\322\041\020\244\027 -\375\337\254\326\037\247\344\333\174\367\354\337\270\003\332\224 -\130\375\135\162\174\214\077\137\001\147\164\025\226\343\002\074 -\207\333\256\313\001\216\302\363\146\306\205\105\364\002\306\072 -\265\142\262\257\372\234\277\244\346\324\200\060\230\363\015\266 -\223\217\251\324\330\066\362\260\374\212\312\054\241\025\063\225 -\061\332\300\033\362\356\142\231\206\143\077\277\335\223\052\203 -\250\166\271\023\037\267\316\116\102\205\217\042\347\056\032\362 -\225\011\262\005\265\104\116\167\241\040\275\251\362\116\012\175 -\120\255\365\005\015\105\117\106\161\375\050\076\123\373\004\330 -\055\327\145\035\112\033\372\317\073\260\061\232\065\156\310\213 -\006\323\000\221\362\224\010\145\114\261\064\006\000\172\211\342 -\360\307\003\131\317\325\326\350\247\062\263\346\230\100\206\305 -\315\047\022\213\314\173\316\267\021\074\142\140\007\043\076\053 -\100\156\224\200\011\155\266\263\157\167\157\065\010\120\373\002 -\207\305\076\211\002\003\001\000\001\243\102\060\100\060\035\006 -\003\125\035\016\004\026\004\024\133\370\115\117\262\245\206\324 -\072\322\361\143\232\240\276\011\366\127\267\336\060\016\006\003 -\125\035\017\001\001\377\004\004\003\002\001\006\060\017\006\003 -\125\035\023\001\001\377\004\005\060\003\001\001\377\060\015\006 -\011\052\206\110\206\367\015\001\001\005\005\000\003\202\001\001 -\000\240\241\070\026\146\056\247\126\037\041\234\006\372\035\355 -\271\042\305\070\046\330\116\117\354\243\177\171\336\106\041\241 -\207\167\217\007\010\232\262\244\305\257\017\062\230\013\174\146 -\051\266\233\175\045\122\111\103\253\114\056\053\156\172\160\257 -\026\016\343\002\154\373\102\346\030\235\105\330\125\310\350\073 -\335\347\341\364\056\013\034\064\134\154\130\112\373\214\210\120 -\137\225\034\277\355\253\042\265\145\263\205\272\236\017\270\255 -\345\172\033\212\120\072\035\275\015\274\173\124\120\013\271\102 -\257\125\240\030\201\255\145\231\357\276\344\234\277\304\205\253 -\101\262\124\157\334\045\315\355\170\342\216\014\215\011\111\335 -\143\173\132\151\226\002\041\250\275\122\131\351\175\065\313\310 -\122\312\177\201\376\331\153\323\367\021\355\045\337\370\347\371 -\244\372\162\227\204\123\015\245\320\062\030\121\166\131\024\154 -\017\353\354\137\200\214\165\103\203\303\205\230\377\114\236\055 -\015\344\167\203\223\116\265\226\007\213\050\023\233\214\031\215 -\101\047\111\100\356\336\346\043\104\071\334\241\042\326\272\003 -\362 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE - -# Trust for "SecureSign RootCA11" -# Issuer: CN=SecureSign RootCA11,O="Japan Certification Services, Inc.",C=JP -# Serial Number: 1 (0x1) -# Subject: CN=SecureSign RootCA11,O="Japan Certification Services, Inc.",C=JP -# Not Valid Before: Wed Apr 08 04:56:47 2009 -# Not Valid After : Sun Apr 08 04:56:47 2029 -# Fingerprint (SHA-256): BF:0F:EE:FB:9E:3A:58:1A:D5:F9:E9:DB:75:89:98:57:43:D2:61:08:5C:4D:31:4F:6F:5D:72:59:AA:42:16:12 -# Fingerprint (SHA1): 3B:C4:9F:48:F8:F3:73:A0:9C:1E:BD:F8:5B:B1:C3:65:C7:D8:11:B3 -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "SecureSign RootCA11" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\073\304\237\110\370\363\163\240\234\036\275\370\133\261\303\145 -\307\330\021\263 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\267\122\164\342\222\264\200\223\362\165\344\314\327\362\352\046 -END -CKA_ISSUER MULTILINE_OCTAL -\060\130\061\013\060\011\006\003\125\004\006\023\002\112\120\061 -\053\060\051\006\003\125\004\012\023\042\112\141\160\141\156\040 -\103\145\162\164\151\146\151\143\141\164\151\157\156\040\123\145 -\162\166\151\143\145\163\054\040\111\156\143\056\061\034\060\032 -\006\003\125\004\003\023\023\123\145\143\165\162\145\123\151\147 -\156\040\122\157\157\164\103\101\061\061 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\001\001 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - # # Certificate "Microsec e-Szigno Root CA 2009" # @@ -4939,7 +4811,10 @@ CKA_VALUE MULTILINE_OCTAL \007\072\027\144\265\004\265\043\041\231\012\225\073\227\174\357 END CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +# For Server Distrust After: Sat Nov 30 23:59:59 2024 +CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL +\062\064\061\061\063\060\062\063\065\071\065\071\132 +END CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE # Trust for "AffirmTrust Commercial" @@ -5067,7 +4942,10 @@ CKA_VALUE MULTILINE_OCTAL \355\132\000\124\205\034\026\066\222\014\134\372\246\255\277\333 END CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +# For Server Distrust After: Sat Nov 30 23:59:59 2024 +CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL +\062\064\061\061\063\060\062\063\065\071\065\071\132 +END CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE # Trust for "AffirmTrust Networking" @@ -5227,7 +5105,10 @@ CKA_VALUE MULTILINE_OCTAL \051\340\266\270\011\150\031\034\030\103 END CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +# For Server Distrust After: Sat Nov 30 23:59:59 2024 +CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL +\062\064\061\061\063\060\062\063\065\071\065\071\132 +END CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE # Trust for "AffirmTrust Premium" @@ -5335,7 +5216,10 @@ CKA_VALUE MULTILINE_OCTAL \214\171 END CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +# For Server Distrust After: Sat Nov 30 23:59:59 2024 +CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL +\062\064\061\061\063\060\062\063\065\071\065\071\132 +END CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE # Trust for "AffirmTrust Premium ECC" @@ -10269,7 +10153,10 @@ CKA_VALUE MULTILINE_OCTAL \105\366 END CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +# For Server Distrust After: Sat Nov 30 23:59:59 2024 +CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL +\062\064\061\061\063\060\062\063\065\071\065\071\132 +END CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE # Trust for "Entrust Root Certification Authority - G2" @@ -10416,7 +10303,10 @@ CKA_VALUE MULTILINE_OCTAL \231\267\046\101\133\045\140\256\320\110\032\356\006 END CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +# For Server Distrust After: Sat Nov 30 23:59:59 2024 +CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL +\062\064\061\061\063\060\062\063\065\071\065\071\132 +END CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE # Trust for "Entrust Root Certification Authority - EC1" @@ -15014,7 +14904,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL \002\021\000\331\265\103\177\257\251\071\017\000\000\000\000\125 \145\255\130 END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE @@ -21228,173 +21118,6 @@ CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE -# -# Certificate "Security Communication RootCA3" -# -# Issuer: CN=Security Communication RootCA3,O="SECOM Trust Systems CO.,LTD.",C=JP -# Serial Number:00:e1:7c:37:40:fd:1b:fe:67 -# Subject: CN=Security Communication RootCA3,O="SECOM Trust Systems CO.,LTD.",C=JP -# Not Valid Before: Thu Jun 16 06:17:16 2016 -# Not Valid After : Mon Jan 18 06:17:16 2038 -# Fingerprint (SHA-256): 24:A5:5C:2A:B0:51:44:2D:06:17:76:65:41:23:9A:4A:D0:32:D7:C5:51:75:AA:34:FF:DE:2F:BC:4F:5C:52:94 -# Fingerprint (SHA1): C3:03:C8:22:74:92:E5:61:A2:9C:5F:79:91:2B:1E:44:13:91:30:3A -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Security Communication RootCA3" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\135\061\013\060\011\006\003\125\004\006\023\002\112\120\061 -\045\060\043\006\003\125\004\012\023\034\123\105\103\117\115\040 -\124\162\165\163\164\040\123\171\163\164\145\155\163\040\103\117 -\056\054\114\124\104\056\061\047\060\045\006\003\125\004\003\023 -\036\123\145\143\165\162\151\164\171\040\103\157\155\155\165\156 -\151\143\141\164\151\157\156\040\122\157\157\164\103\101\063 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\135\061\013\060\011\006\003\125\004\006\023\002\112\120\061 -\045\060\043\006\003\125\004\012\023\034\123\105\103\117\115\040 -\124\162\165\163\164\040\123\171\163\164\145\155\163\040\103\117 -\056\054\114\124\104\056\061\047\060\045\006\003\125\004\003\023 -\036\123\145\143\165\162\151\164\171\040\103\157\155\155\165\156 -\151\143\141\164\151\157\156\040\122\157\157\164\103\101\063 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\341\174\067\100\375\033\376\147 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\005\177\060\202\003\147\240\003\002\001\002\002\011\000 -\341\174\067\100\375\033\376\147\060\015\006\011\052\206\110\206 -\367\015\001\001\014\005\000\060\135\061\013\060\011\006\003\125 -\004\006\023\002\112\120\061\045\060\043\006\003\125\004\012\023 -\034\123\105\103\117\115\040\124\162\165\163\164\040\123\171\163 -\164\145\155\163\040\103\117\056\054\114\124\104\056\061\047\060 -\045\006\003\125\004\003\023\036\123\145\143\165\162\151\164\171 -\040\103\157\155\155\165\156\151\143\141\164\151\157\156\040\122 -\157\157\164\103\101\063\060\036\027\015\061\066\060\066\061\066 -\060\066\061\067\061\066\132\027\015\063\070\060\061\061\070\060 -\066\061\067\061\066\132\060\135\061\013\060\011\006\003\125\004 -\006\023\002\112\120\061\045\060\043\006\003\125\004\012\023\034 -\123\105\103\117\115\040\124\162\165\163\164\040\123\171\163\164 -\145\155\163\040\103\117\056\054\114\124\104\056\061\047\060\045 -\006\003\125\004\003\023\036\123\145\143\165\162\151\164\171\040 -\103\157\155\155\165\156\151\143\141\164\151\157\156\040\122\157 -\157\164\103\101\063\060\202\002\042\060\015\006\011\052\206\110 -\206\367\015\001\001\001\005\000\003\202\002\017\000\060\202\002 -\012\002\202\002\001\000\343\311\162\111\367\060\336\011\174\251 -\100\201\130\323\264\072\335\272\141\017\223\120\156\151\074\065 -\302\356\133\163\220\033\147\114\041\354\137\065\273\071\076\053 -\012\140\357\273\155\053\206\373\161\242\310\254\344\126\224\371 -\311\257\261\162\324\040\254\164\322\270\025\255\121\376\205\164 -\241\271\020\376\005\200\371\122\223\263\100\075\165\020\254\300 -\226\267\247\176\166\274\343\033\122\031\316\021\037\013\004\064 -\365\330\365\151\074\167\363\144\364\015\252\205\336\340\011\120 -\004\027\226\204\267\310\212\274\115\162\374\034\273\317\363\006 -\115\371\237\144\367\176\246\146\206\065\161\310\021\200\114\301 -\161\100\130\036\276\240\163\366\374\076\120\341\340\057\046\075 -\176\134\043\265\171\160\336\372\340\321\245\326\014\101\161\173 -\367\352\214\034\210\307\354\213\365\321\057\125\226\106\174\132 -\073\130\073\373\272\330\055\265\045\332\172\116\317\104\256\041 -\246\236\230\312\040\156\174\273\210\205\133\373\300\020\142\273 -\362\371\047\107\357\321\211\071\103\304\337\336\341\101\277\124 -\163\040\227\055\154\332\363\324\007\243\346\271\330\157\256\374 -\214\031\056\323\147\147\053\225\333\130\134\265\152\002\363\270 -\203\136\264\153\276\101\176\127\011\165\104\120\125\315\132\021 -\141\041\012\141\302\251\210\375\023\274\055\211\057\315\141\340 -\225\276\312\265\173\341\173\064\147\013\037\266\014\307\174\036 -\031\123\312\247\261\112\025\040\126\024\160\075\053\202\054\017 -\235\025\035\107\200\107\377\170\231\016\061\257\157\076\217\355 -\206\151\036\173\030\210\024\262\302\374\202\063\056\234\113\055 -\373\160\073\161\252\053\173\046\047\363\032\302\334\373\027\270 -\241\352\313\240\264\256\323\224\176\172\320\253\303\354\070\055 -\021\056\210\277\324\077\255\022\073\102\254\217\002\156\175\314 -\321\137\141\276\241\274\072\152\110\352\046\125\042\026\135\137 -\015\377\047\063\237\030\003\164\212\133\122\040\107\153\105\115 -\042\167\214\125\047\360\257\036\214\311\203\042\124\267\232\320 -\117\331\316\374\331\056\034\226\050\261\002\323\003\275\045\122 -\034\064\146\117\043\253\364\167\202\226\035\321\127\060\010\021 -\005\375\127\321\331\307\002\003\001\000\001\243\102\060\100\060 -\035\006\003\125\035\016\004\026\004\024\144\024\174\374\130\162 -\026\246\012\051\064\025\157\052\313\274\374\257\250\253\060\016 -\006\003\125\035\017\001\001\377\004\004\003\002\001\006\060\017 -\006\003\125\035\023\001\001\377\004\005\060\003\001\001\377\060 -\015\006\011\052\206\110\206\367\015\001\001\014\005\000\003\202 -\002\001\000\334\002\043\010\342\357\041\072\307\015\267\046\322 -\142\223\247\245\043\162\007\040\202\140\337\030\327\124\255\151 -\045\222\236\331\024\317\231\271\122\201\317\256\154\212\073\132 -\071\310\154\001\103\302\042\155\002\360\142\315\116\143\103\300 -\024\332\364\143\360\352\364\161\356\116\207\343\161\251\364\311 -\127\345\056\137\034\171\273\043\252\207\104\127\351\275\065\115 -\101\273\113\050\243\230\262\033\331\013\027\007\345\367\352\235 -\365\166\327\277\304\266\201\130\377\310\377\144\151\142\171\255 -\156\016\037\177\356\035\151\345\267\162\161\263\376\245\001\065 -\224\124\053\300\122\155\217\125\304\311\322\270\313\312\064\010 -\121\205\240\365\274\264\027\130\352\012\134\172\275\143\306\072 -\057\377\226\111\031\204\352\147\330\004\261\141\364\000\133\112 -\267\234\161\067\031\205\171\277\201\260\307\023\016\166\161\076 -\072\200\006\256\006\026\247\215\265\302\304\313\377\100\245\134 -\215\245\311\072\355\162\201\312\134\230\074\322\064\003\167\010 -\375\360\051\131\135\041\010\307\140\277\244\161\173\270\331\036 -\202\276\011\257\145\157\050\253\277\113\265\356\076\010\107\047 -\240\017\157\017\213\077\254\225\030\363\271\016\334\147\125\156 -\142\236\106\016\321\004\170\312\162\256\166\331\245\370\262\337 -\210\011\141\213\357\044\116\321\131\077\132\324\075\311\223\074 -\053\144\365\201\015\026\226\367\222\303\376\061\157\350\052\062 -\164\016\364\114\230\112\030\016\060\124\325\305\353\274\305\025 -\236\350\231\041\353\047\053\011\012\333\361\346\160\030\126\273 -\014\344\276\371\350\020\244\023\222\270\034\340\333\147\035\123 -\003\244\042\247\334\135\222\020\074\352\377\374\033\020\032\303 -\330\320\234\235\145\313\320\053\047\061\003\036\066\341\075\166 -\165\014\377\105\046\271\335\121\274\043\307\137\330\330\207\020 -\100\022\015\075\070\067\347\104\074\030\300\123\011\144\217\377 -\325\232\246\174\160\056\163\125\041\350\337\377\203\271\035\076 -\062\036\326\246\175\054\361\146\351\134\035\247\243\316\136\045 -\062\053\343\225\254\052\007\316\264\050\170\206\074\055\246\235 -\115\322\164\060\335\144\121\025\333\203\203\121\327\257\375\063 -\235\115\146 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE - -# Trust for "Security Communication RootCA3" -# Issuer: CN=Security Communication RootCA3,O="SECOM Trust Systems CO.,LTD.",C=JP -# Serial Number:00:e1:7c:37:40:fd:1b:fe:67 -# Subject: CN=Security Communication RootCA3,O="SECOM Trust Systems CO.,LTD.",C=JP -# Not Valid Before: Thu Jun 16 06:17:16 2016 -# Not Valid After : Mon Jan 18 06:17:16 2038 -# Fingerprint (SHA-256): 24:A5:5C:2A:B0:51:44:2D:06:17:76:65:41:23:9A:4A:D0:32:D7:C5:51:75:AA:34:FF:DE:2F:BC:4F:5C:52:94 -# Fingerprint (SHA1): C3:03:C8:22:74:92:E5:61:A2:9C:5F:79:91:2B:1E:44:13:91:30:3A -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Security Communication RootCA3" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\303\003\310\042\164\222\345\141\242\234\137\171\221\053\036\104 -\023\221\060\072 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\034\232\026\377\236\134\340\115\212\024\001\364\065\135\051\046 -END -CKA_ISSUER MULTILINE_OCTAL -\060\135\061\013\060\011\006\003\125\004\006\023\002\112\120\061 -\045\060\043\006\003\125\004\012\023\034\123\105\103\117\115\040 -\124\162\165\163\164\040\123\171\163\164\145\155\163\040\103\117 -\056\054\114\124\104\056\061\047\060\045\006\003\125\004\003\023 -\036\123\145\143\165\162\151\164\171\040\103\157\155\155\165\156 -\151\143\141\164\151\157\156\040\122\157\157\164\103\101\063 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\341\174\067\100\375\033\376\147 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - # # Certificate "Security Communication ECC RootCA1" # diff --git a/tools/dep_updaters/update-base64.sh b/tools/dep_updaters/update-base64.sh deleted file mode 100755 index 2771cc12e840c0..00000000000000 --- a/tools/dep_updaters/update-base64.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -set -e -# Shell script to update base64 in the source tree to a specific version - -BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) -DEPS_DIR="$BASE_DIR/deps" - -[ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" -[ -x "$NODE" ] || NODE=$(command -v node) - -# shellcheck disable=SC1091 -. "$BASE_DIR/tools/dep_updaters/utils.sh" - -NEW_VERSION="$("$NODE" --input-type=module <<'EOF' -const res = await fetch('https://api.github.com/repos/aklomp/base64/releases/latest', - process.env.GITHUB_TOKEN && { - headers: { - "Authorization": `Bearer ${process.env.GITHUB_TOKEN}` - }, - }); -if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); -const { tag_name } = await res.json(); -console.log(tag_name.replace('v', '')); -EOF -)" - -CURRENT_VERSION=$(grep "base64 LANGUAGES C VERSION" ./deps/base64/base64/CMakeLists.txt | sed -n "s/^.*VERSION \(.*\))/\1/p") - -# This function exit with 0 if new version and current version are the same -compare_dependency_version "base64" "$NEW_VERSION" "$CURRENT_VERSION" - -echo "Making temporary workspace" - -WORKSPACE=$(mktemp -d 2> /dev/null || mktemp -d -t 'tmp') - -cleanup () { - EXIT_CODE=$? - [ -d "$WORKSPACE" ] && rm -rf "$WORKSPACE" - exit $EXIT_CODE -} - -trap cleanup INT TERM EXIT - -cd "$WORKSPACE" - -BASE64_TARBALL="base64-v$NEW_VERSION.tar.gz" - -echo "Fetching base64 source archive" -curl -sL -o "$BASE64_TARBALL" "https://api.github.com/repos/aklomp/base64/tarball/v$NEW_VERSION" -log_and_verify_sha256sum "base64" "$BASE64_TARBALL" -gzip -dc "$BASE64_TARBALL" | tar xf - -rm "$BASE64_TARBALL" -mv aklomp-base64-* base64 - -echo "Replacing existing base64" -rm -rf "$DEPS_DIR/base64/base64" -mv "$WORKSPACE/base64" "$DEPS_DIR/base64/" - -# Build configuration is handled by `deps/base64/base64.gyp`, but since `config.h` has to be present for the build -# to work, we create it and leave it empty. -echo "// Intentionally empty" > "$DEPS_DIR/base64/base64/lib/config.h" - -# Clear out .gitignore, otherwise config.h is ignored. That's dangerous when -# people check in our tarballs into source control and run `git clean`. -echo "# Intentionally empty" > "$DEPS_DIR/base64/base64/.gitignore" - -# update the base64_version.h -cat > "$BASE_DIR/src/base64_version.h" << EOL -// This is an auto generated file, please do not edit. -// Refer to tools/dep_updaters/update-base64.sh -#ifndef SRC_BASE64_VERSION_H_ -#define SRC_BASE64_VERSION_H_ -#define BASE64_VERSION "$NEW_VERSION" -#endif // SRC_BASE64_VERSION_H_ -EOL - -# Update the version number on maintaining-dependencies.md -# and print the new version as the last line of the script as we need -# to add it to $GITHUB_ENV variable -finalize_version_update "base64" "$NEW_VERSION" "src/base64_version.h" diff --git a/tools/doc/html.mjs b/tools/doc/html.mjs index e0e7706821908f..eee3b48d292a72 100644 --- a/tools/doc/html.mjs +++ b/tools/doc/html.mjs @@ -527,11 +527,11 @@ function altDocs(filename, docCreated, versions) { return list ? ` <li class="picker-header"> - <a href="#"> + <a href="#alt-docs" aria-controls="alt-docs"> <span class="picker-arrow"></span> Other versions </a> - <div class="picker"><ol id="alt-docs">${list}</ol></div> + <div class="picker" tabindex="-1"><ol id="alt-docs">${list}</ol></div> </li> ` : ''; } @@ -557,12 +557,12 @@ function gtocPicker(id) { return ` <li class="picker-header"> - <a href="#"> + <a href="#gtoc-picker" aria-controls="gtoc-picker"> <span class="picker-arrow"></span> Index </a> - <div class="picker">${gtoc}</div> + <div class="picker" tabindex="-1" id="gtoc-picker">${gtoc}</div> </li> `; } @@ -574,12 +574,12 @@ function tocPicker(id, content) { return ` <li class="picker-header"> - <a href="#"> + <a href="#toc-picker" aria-controls="toc-picker"> <span class="picker-arrow"></span> Table of contents </a> - <div class="picker">${content.tocPicker}</div> + <div class="picker" tabindex="-1">${content.tocPicker.replace('<ul', '<ul id="toc-picker"')}</div> </li> `; } diff --git a/tools/doc/package-lock.json b/tools/doc/package-lock.json index a7c2088abd3ad5..bbb562ae9c9100 100644 --- a/tools/doc/package-lock.json +++ b/tools/doc/package-lock.json @@ -11,7 +11,7 @@ "node-doc-generator": "generate.js" }, "devDependencies": { - "highlight.js": "^11.9.0", + "highlight.js": "^11.11.1", "js-yaml": "^4.1.0", "rehype-raw": "^7.0.0", "rehype-stringify": "^10.0.0", @@ -441,9 +441,9 @@ } }, "node_modules/highlight.js": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", - "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", + "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", "dev": true, "engines": { "node": ">=12.0.0" diff --git a/tools/doc/package.json b/tools/doc/package.json index d27ce6ca5102f9..1bfd9f853d9990 100644 --- a/tools/doc/package.json +++ b/tools/doc/package.json @@ -7,7 +7,7 @@ "node": ">=14.8.0" }, "devDependencies": { - "highlight.js": "^11.9.0", + "highlight.js": "^11.11.1", "js-yaml": "^4.1.0", "rehype-raw": "^7.0.0", "rehype-stringify": "^10.0.0", diff --git a/tools/icu/current_ver.dep b/tools/icu/current_ver.dep index fc208957f064d9..a2c73ee25ae6c4 100644 --- a/tools/icu/current_ver.dep +++ b/tools/icu/current_ver.dep @@ -1,6 +1,6 @@ [ { - "url": "https://github.com/unicode-org/icu/releases/download/release-75-1/icu4c-75_1-src.tgz", - "md5": "a83c1499e508f73ddbc60002f84ea42a" + "url": "https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-src.tgz", + "md5": "857fdafff8127139cc175a3ec9b43bd6" } ] diff --git a/tools/license-builder.sh b/tools/license-builder.sh index 444d077d15cbdb..e2e24404eed11f 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -145,6 +145,4 @@ addlicense "nghttp3" "deps/ngtcp2/nghttp3/" "$licenseText" licenseText="$(curl -sL https://raw.githubusercontent.com/jprichardson/node-fs-extra/b34da2762a4865b025cac06d02d6a2f1f1027b65/LICENSE)" addlicense "node-fs-extra" "lib/internal/fs/cp" "$licenseText" -addlicense "base64" "deps/base64/base64/" "$(cat "${rootdir}/deps/base64/base64/LICENSE" || true)" - mv "$tmplicense" "$licensefile" diff --git a/tools/snapshot/README.md b/tools/snapshot/README.md index 3ae6547a0a2a2d..d61c2306e3516f 100644 --- a/tools/snapshot/README.md +++ b/tools/snapshot/README.md @@ -8,9 +8,46 @@ instead of executing code to bootstrap, it can deserialize the context from an embedded snapshot, which readily contains the result of the bootstrap, so that Node.js can start up faster. -Currently only the main context of the main Node.js instance supports snapshot -deserialization, and the snapshot does not yet cover the entire bootstrap -process. Work is being done to expand the support. +The built-in snapshot consists of the following snapshots: + +## Isolate snapshot + +Which is used whenever a `v8::Isolate` is created using the data returned by +`node::SnapshotBuilder::GetEmbeddedSnapshotData`. + +## Context snapshots + +Which are used when a `v8::Context` is created from a `v8::Isolate` deserialized +from the snapshot. There are four context snapshots in the snapshot blob. + +1. The default context snapshot, used for contexts created by + `v8::Context::New()`, it only contains V8 built-ins, matching the + layout of the isolate snapshot. +1. The vm context snapshot, which can be deserialized using + `v8::Context::FromSnapshot(isolate, node::SnapshotData::kNodeVMContextIndex, ...)`. + It captures initializations specific to vm contexts done by + `node::contextify::ContextifyContext::CreateV8Context()`. +1. The base context snapshot, which can be deserialized using + `v8::Context::FromSnapshot(isolate, node::SnapshotData::kNodeBaseContextIndex, ...)`. + It currently captures initializations done by `node::NewContext()` + but is intended to include more as a basis for worker thread + contexts. +1. The main context snapshot, which can be deserialized using + `v8::Context::FromSnapshot(isolate, node::SnapshotData::kNodeMainContextIndex, ...)`. + This is the snapshot for the main context on the main thread, and + captures initializations done by `node::CommonEnvironmentSetup::CreateForSnapshotting()`, + most notably `node::CreateEnvironment()`, which runs the following scripts via + `node::Realm::RunBootstrapping()` for the main context as a principal realm, + so that at runtime, these scripts do not need to be run. Instead only the context + initialized by them is deserialized at runtime. + 1. `internal/bootstrap/realm` + 2. `internal/bootstrap/node` + 3. `internal/bootstrap/web/exposed-wildcard` + 4. `internal/bootstrap/web/exposed-window-or-worker` + 5. `internal/bootstrap/switches/is_main_thread` + 6. `internal/bootstrap/switches/does_own_process_state` + +For more information about these contexts, see the comment in `src/node_context_data.h`. ## How it's built and used @@ -39,3 +76,22 @@ For debugging, Node.js can be built without Node.js's own snapshot if `--without-node-snapshot` is passed to `configure`. A Node.js executable with Node.js snapshot embedded can also be launched without deserializing from it if the command line argument `--no-node-snapshot` is passed. + +### When `node_mksnapshot` crashes.. + +Due to this two-phase building process, sometimes when there is an issue +in the code, the build may crash early at executing `node_mksnapshot` instead of crashing +at executing the final executable `node`. If the crash can be reproduced when running +the `node` executable built with `--without-node-snapshot`, it means the crash likely +has nothing to do with snapshots, and only shows up in `node_mksnapshot` because it's +the first Node.js executable being run. + +If the crash comes from a `mksnapshot` executable (notice that it doesn't have the `node_` +prefix), that comes from V8's own snapshot building process, not the one in Node.js, and the +fix likely needs to be in V8 or the build configurations of V8. + +If it `node_mksnapshot` crashes with an error message containing +something like `Unknown external reference 0x107769200`, see +[Registering binding functions used in bootstrap][] on how to fix it. + +[Registering binding functions used in bootstrap]: ../../src/README.md#registering-binding-functions-used-in-bootstrap diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 45f6e0db865424..9120a68908417c 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -41,6 +41,19 @@ 'AdditionalOptions': ['/utf-8'] } }, + 'conditions': [ + ['OS=="mac"', { + # Hide symbols that are not explicitly exported with V8_EXPORT. + # TODO(joyeecheung): enable it on other platforms. Currently gcc times out + # or run out of memory with -fvisibility=hidden on some machines in the CI. + 'xcode_settings': { + 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden + }, + 'defines': [ + 'BUILDING_V8_SHARED', # Make V8_EXPORT visible. + ], + }], + ], }, 'targets': [ { @@ -1032,6 +1045,11 @@ '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc', ], }], + ['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux")', { + 'sources': [ + '<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc', + ], + }], ], }], ],